5

I'm using nar.bst here (http://schneider.ncifcrf.gov/ftp/nar.bst). However when I include my bibliography in the following manner :-

\bibliographystyle{nar}
\bibliography{main}

However the resulting bbl file seems to have some unclosed braces. For example, I get the following bibitem where the \bf brace is unclosed.

\bibitem{chang2013temporal}
Chang, K.~N., Zhong, S., Weirauch, M.~T., Hon, G., Pelizzola, M., Li, H.,
Huang, S.-s.~C., Schmitz, R.~J., Urich, M.~A., Kuo, D., et al. (2013)
{\em Elife} {\bf 2.

which is generated from the bibtex

@article{chang2013temporal,
  title={Temporal transcriptional response to ethylene gas drives growth                hormone cross-regulation in Arabidopsis},
  author={Chang, Katherine Noelani and Zhong, Shan and Weirauch, Matthew T and Hon, Gary and Pelizzola, Mattia and Li, Hai and Huang, Shao-shan Carol and Schmitz, Robert J and Urich, Mark A and Kuo, Dwight and others},
  journal={Elife},
  volume={2},
  year={2013},
  publisher={eLife Sciences Publications Limited}
}

I think (but not sure at all) that the function

format.vol.num.pages

is the culprit but not sure how to fix it.

Any help would be appreciated :)

PS :- Fixing the open braces which seem to only happen when \bf is present fixes the problem.

Edit (Edit 3 -- removed NAR cls -- that doesn't change anything for me): Minimal example below. Compiling using pdflatex and then running bibtex gives the wrongly formatted bibitem (as shown above) in the bbl file

\documentclass{article}

\begin{document}

\title{Sample}

\author{Sample}

\maketitle

Example~\cite{chang2013temporal}

\bibliographystyle{nar}
\bibliography{main}

\end{document}

I have the @article in the file main.bib and name the MWE as main.tex. Then I run pdflatex main.tex 2 times and after that bibtex main to get main.bbl which has the wrong formatting.

11
  • I cannot reproduce that problem with a MWE: \documentclass{article} \usepackage{cite} \begin{document} \nocite{*}\bibliographystyle{nar} \bibliography{main} \end{document}. Please provide a complete, but minimal example that shows the problem. – jon Aug 3 '15 at 22:14
  • I've added the minimal example. NAR is the the NAR style file given here (oxfordjournals.org/our_journals/nar/for_authors/…) – Opt Aug 3 '15 at 22:32
  • Since I don't have the NAR document class, I used article in your MWE and got the correct formatting: \begin{thebibliography}{1} \bibitem{chang2013temporal} Chang, K.~N., Zhong, S., Weirauch, M.~T., Hon, G., Pelizzola, M., Li, H., Huang, S.-s.~C., Schmitz, R.~J., Urich, M.~A., Kuo, D., et al. (2013) Temporal transcriptional response to ethylene gas drives growth hormone cross-regulation in Arabidopsis. {\em Elife,} {\bf 2}. \end{thebibliography} Do you have a link to NAR.cls to test if the problem comes from there? (It's a remote possibility, but I want to make sure). – Gonzalo Medina Aug 5 '15 at 22:40
  • 1
    I downloaded NAR:cls and related files from oxfordjournals.org/our_journals/nar/for_authors/… and after using your MWE as is I couldn't reproduce the problem you mention; the .bbl gets correctly formatted. – Gonzalo Medina Aug 5 '15 at 22:47
  • Hmm that's strange. So, I'm putting the @article in the file main.bib and naming the MWE as main.tex. Then I run pdflatex main.tex 2 times and after that bibtex main to get main.bbl. Is that what you're doing as well? – Opt Aug 6 '15 at 0:12
4
+50

Solution

The most recent version of nar.bst has now been updated on CTAN (which had previously had on older version.) Up-to-date TL 2015 and MikTeX should now have this version. If you are running an older version of TL, use the version on CTAN.

Original answer

The version of nar.bst that comes with TL (as of 2015) is outdated. The most recent version is here, which is the link in the original question. This version fixes the problem and so no modification of the .bst. is needed. This explains why others were unable to reproduce the error. I've emailed the author of the .bst file to ask him to put an updated version on CTAN.

So the lesson to be learned is to make sure that you are using up-to-date copies AND your system is actually finding them.

There are various ways to see which copy of a file TeX is finding, but by far the simplest is to use kpsewhich from the command line. Executing the command:

kpsewhich nar.bst

will tell you exactly which file is being used. On a standard TL system it will return: (modulo your year.)

/usr/local/texlive/2015/texmf-dist/bibtex/bst/beebe/nar.bst

TeX Live in particular is quite picky about where .bst files are to be found, so when you download the latest copy and want it to be found, it should be placed in:

<path-to-local-texmf>/texmf/bibtex/bst/

where <path-to-local-texmf> will vary depending on your system. If you don't know where it is, you can find the path to it by issuing the following command:

kpsewhich -var-value=TEXMFHOME
6
  • You could have also changed \bf into \bfseries. ;-) – egreg Aug 8 '15 at 5:24
  • 2
    @egreg I'm a minimalist. :) And there are other instances of it in the .bst file that would also need to be changed. – Alan Munn Aug 8 '15 at 5:27
  • Hmm seems like it introduced a bug -- this different e.g. gives me the same error now @article{shytaj2013cure, title={A cure for AIDS: a matter of timing}, author={Shytaj, Iart Luca and Savarino, Andrea}, journal={Retrovirology}, volume={10}, number={1}, pages={145}, year={2013}, publisher={BioMed Central Ltd} } – Opt Aug 8 '15 at 19:43
  • @Opt Let me check. It was late last night and I didn't test extensively. Also, I realized that I was working using the TeX Live version of the .bst which is a bit older. Let me check with the most recent copy. – Alan Munn Aug 8 '15 at 19:54
  • @opt I've made a chat room for us. Can we chat about this? chat.stackexchange.com/rooms/26745/chat-alan-and-opt – Alan Munn Aug 8 '15 at 20:12

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.