7

I have an issue when using multiple times entries of type "misc" in the bibliography in my document. Here is the MWE:

\documentclass[aps,jmp,amsmath,amssymb,reprint]{revtex4-1}
\begin{document}
Bla bla bla \cite{lammps} \cite{lammps_manual_fix_langevin}
\bibliography{biblio.bib}
\end{document}

Bibliography:

    @misc{lammps,
    title = {{LAMMPS website}},
    howpublished = {\url{http://lammps.sandia.gov}},
    note = {[Accessed: 10-October-2017]}
  }

    @misc{lammps_manual_fix_langevin,
      title = {{LAMMPS manual - fix langevin command}},
      howpublished = {\url{http://lammps.sandia.gov/doc/fix_langevin.html}},
      note = {[Accessed: 09-November-2017]}
    }

Result:

enter image description here

As you can see, there is an unwanted () appearing after the url.

If I take out one of the two citation, it disappears:

enter image description here

What could be the source of this problem?

1
  • 2
    My guess it is because you have not supplied a year for the entries. Nov 9, 2017 at 13:02

2 Answers 2

2

For some reasons, natbib defines \natexlab to do nothing with its argument; such bit is added for distinguishing between references with the same author (in this case, none).

Fix: define \natexlab as revtex4-1 prefers.

\begin{filecontents*}{\jobname.bib}
@misc{lammps,
  title = {{LAMMPS website}},
  howpublished = {\url{http://lammps.sandia.gov}},
  note = {[Accessed: 10-October-2017]},
}

@misc{lammps_manual_fix_langevin,
  title = {{LAMMPS manual - fix langevin command}},
  howpublished = {\url{http://lammps.sandia.gov/doc/fix_langevin.html}},
  note = {[Accessed: 09-November-2017]},
}
\end{filecontents*}

\documentclass[aps,jmp,amsmath,amssymb,reprint]{revtex4-1}

\AtBeginDocument{\renewcommand{\natexlab}[1]{#1}}% <--- the fix

\begin{document}
Bla bla bla \cite{lammps} \cite{lammps_manual_fix_langevin}

\bibliography{\jobname}

\end{document}

enter image description here

2
  • Thanks, this is useful. Is there no way to completely get rid of the parentheses anyway? Because by doing this I still get (a) and (b), which are unnecessary.
    – valerio
    Nov 9, 2017 at 15:56
  • @valerio92 I see no easy method: it's added automatically by the .bst file when BibTeX is run.
    – egreg
    Nov 9, 2017 at 16:53
5

Don't have the reputation to post as comment to the above.

Stumbled upon this post with a similar problem (in my case a leading .). I discovered that by changing the .bib file keys (i.e. lammps, lammps_manual_fix_langevin in your case) such that they differed in their first letter (i.e. a_lammps, lammps_manual_fix_langevin) resulted in complete removal.

\begin{filecontents*}{\jobname.bib}
  @misc{a_lammps,
    title = {{LAMMPS website}},
    howpublished = {\url{http://lammps.sandia.gov}},
    note = {[Accessed: 10-October-2017]},
  }

  @misc{lammps_manual_fix_langevin,
    title = {{LAMMPS manual - fix langevin command}},
    howpublished = {\url{http://lammps.sandia.gov/doc/fix_langevin.html}},
    note = {[Accessed: 09-November-2017]},
  }
\end{filecontents*}

\documentclass[aps,jmp,amsmath,amssymb,reprint]{revtex4-1}

\begin{document}

Bla bla bla \cite{a_lammps} \cite{lammps_manual_fix_langevin}

\bibliography{\jobname}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .