2

I'm trying to put a full citation in a footnote and I'm using revtex 4-1. I can't get it to work and the errors I get seem to depend on which journal I specify.

Here is a minimal (not)working example:

    \begin{filecontents}{mytestbib.bib}
      @book{test1,
         author = "Some Person",
         title = "A Book",
         year = "XXXX",
         publisher = "A Publisher",
         address = "A Place, Somewhere"
    }
    \end{filecontents}

    \documentclass[rmp]{revtex4-1}

    \usepackage{bibentry}

    \begin{document}

    test\footnote{\bibentry{test1}}.

    \nobibliography{mytestbib}
    \end{document}

I can run pdflatex but bibtex gives an error:

     Illegal, another \bibdata command---line 4 of file test.aux

and indeed, if I look at the aux file:

     \relax 
     \citation{test1}
     \bibdata{testNotes,mytestbib}
     \bibdata{testNotes}
     \bibstyle{apsrmp4-1}
     \citation{REVTEX41Control}
     \citation{apsrmp41Control}
     \newlabel{LastPage}{{}{1}{}{}{}}

and if I run pdflatex from here it will fail to print out any citation.

If I use a phys rev style even the first pdflatex fails with error:

    ! Undefined control sequence.
    \frenchspacing ->\sfcode `\.\@m \sfcode `\?
                                               \@m \sfcode `\!\@m \sfcode 
    `\:\@m...
    l.18 test\footnote{\bibentry{test1}}

It runs without errors using rmp and using

    \begin{filecontents}{mytestbib.bib}
      @book{test1,
         author = "Some Person",
         title = "A Book",
         year = "XXXX",
         publisher = "A Publisher",
         address = "A Place, Somewhere"
    }
    \end{filecontents}

    \documentclass[rmp]{revtex4-1}

    \usepackage{bibentry}
    \nobibliography*

    \begin{document}

    test\footnote{\bibentry{test1}}.

    \bibliography{mytestbib}
    \end{document}

but the citation in the footnote still doesn't appear and I don't want to print a full bibliography.

Edit:

Using the answer to this question I've managed to get a footnote citation but it seems to require that I print a bibliography. Any ideas how to get around that final problem? (example included below, first citation works, second doesn't)

    \begin{filecontents*}{testbib.bib}
        @inproceedings{MPT3,
            author          =   {M. Herceg and M. Kvasnica and C.N. Jones and M. Morari},
            title           =   {{Multi-Parametric Toolbox 3.0}},
            booktitle       =   {Proceedings of the European Control Conference},
            year            =   {2013},
            address         =   {Z\"urich, Switzerland}
        }
        @inproceedings{MPT4,
            author          =   {M. Herceg and M. Kvasnica and C.N. Jones and M. Morari},
            title           =   {{Multi-Parametric Toolbox 4.0}},
            booktitle       =   {Proceedings of the European Control Conference},
            year            =   {2013},
            address         =   {Z\"urich, Switzerland}
        }
    \end{filecontents*}

    \documentclass[rmp]{revtex4-1}  
    \usepackage{scrextend}  

    \usepackage{bibentry}
    \nobibliography*
    \newlength{\spc} % declare a variable to save spacing value
    \newcommand{\sjcitep}[2][]{% new command with two arguments: optional (#1) and mandatory (#2)
            \settowidth{\spc}{#1}% set value of \spc variable to the width of #1 argument
            \addtolength{\spc}{-1.8\spc}% subtract from \spc about two (1.8) of its values making its magnitude negative
            #1% print the optional argument
            \hspace*{\spc}% print an additional negative spacing stored in \spc after #1
            \footnote{\bibentry{#2}}}% print (cite) the mandatory argument

    \deffootnote[2em]{2em}{1em}{%           <------------------
        \textsuperscript{\thefootnotemark}\,}



    \begin{document}


    Citation here \sjcitep{MPT3}.

    Second here \footnote{\bibentry{MPT4}}
    \bibliographystyle{unsrt}
    \bibliography{testbib}
    \end{document}

edit: fixed copying error

  • 1
    I believe that bibentry is sheer not compatible with revtex4-1, see also this older question. – campa Aug 20 '18 at 11:33
  • I've been playing around a bit and I've found something that (almost) does what I want. No idea why it works though. If you look at the answer to this question I can change the document class to [rmp]{revtex4-1} and add a bibliography and bibliography style it works. Will add example to the question – user168759 Aug 20 '18 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.