# Problems with model2-names.bst

I am using model2-names.bst which is built-in with the journal that I am submitting my article to. However, for some reason, the journal name and volume number are attached and not separated by a comma (,) in the output after using PDFLaTeX.

An example: P. F. Goldsmith, Molecular Depletion and Thermal Balance in Dark Cloud Cores, ApJ557 (2001) 736–746. doi:10.1086/322255.

In the above example, the ApJ (journal) and 557 (volume number) are attached and not separate.

The entry for this reference in the bibliography file is:

@ARTICLE{Gold01,
author = {{Goldsmith}, P.~F.},
title = "{Molecular Depletion and Thermal Balance in Dark Cloud Cores}",
journal = {\apj},
keywords = {ISM: Clouds, ISM: Globules, ISM: Molecules, Molecular Processes},
year = 2001,
month = aug,
volume = 557,
pages = {736-746},
doi = {10.1086/322255},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}


The related bibitem for the entry above in the .bbl is:

\bibitem{Gold01}
P.~F. {Goldsmith}, {Molecular Depletion and Thermal Balance in Dark Cloud
Cores}, \apj 557 (2001) 736--746.
\newblock \href {http://dx.doi.org/10.1086/322255}{\path{doi:10.1086/322255}}.

• Please post the contents of the bib entry in question. Do also indicate if you use any bibliography-related packages. Without this information, any answer is going to be no more than a stab in the dark. – Mico Oct 20 '14 at 5:14
• @Mico - I attached the output in the resulting .bbl file for the above example from the output PDF document. I am not using any external bibliography software. – stars83clouds Oct 20 '14 at 5:23
• It would still be helpful if you showed the bib entry. The \bibitem suggests that there might be a bug in the definition of the \apj macro. However, without the source code it's not possible to test this hypothesis. – Mico Oct 20 '14 at 5:26
• There is an issue with the \apj macro - I have had to issue the command: \newcommand{\apj}{ApJ} in the original .tex file – stars83clouds Oct 20 '14 at 5:30

You have two strategies:

1. typing journal={\apj{}}, or

2. defining a string apj and type journal=apj

I'd prefer the latter.

\begin{filecontents*}{\jobname.bib}
@ARTICLE{Gold01,
author = {Goldsmith, P. F.},
title = {Molecular Depletion and Thermal Balance in Dark Cloud Cores},
journal = {\apj{}},
keywords = {ISM: Clouds, ISM: Globules, ISM: Molecules, Molecular Processes},
year = 2001,
month = aug,
volume = 557,
pages = {736-746},
doi = {10.1086/322255},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
@STRING{
apj={ApJ}
}
@ARTICLE{Gold0X,
author = {Goldsmith, P. F.},
title = {Molecular Depletion and Thermal Balance in Dark Cloud Cores},
journal = apj,
keywords = {ISM: Clouds, ISM: Globules, ISM: Molecules, Molecular Processes},
year = 2001,
month = aug,
volume = 557,
pages = {736-746},
doi = {10.1086/322255},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
\end{filecontents*}

\documentclass{article}
\newcommand{\apj}{ApJ}
\begin{document}
\cite{Gold01}

\cite{Gold0X}

\bibliographystyle{model2-names}
\bibliography{\jobname}
\end{document}


• I used to use the latter method all the time. I manoeuvred from this as I began to produce .bib files and favoured an automated approach as opposed to manually altering all the bibtex-style references from Google Scholar containing the various macros pertaining to the journal names, e.g. \apj, \mnras, etc. – stars83clouds Oct 20 '14 at 15:39
• @stars83clouds If I export the .bib data from Google Scholar, I get journal={The Astrophysical Journal}, so you have to alter it anyway. The @STRING entries can go in a different .bib file and you can choose, for example, between full and abbreviated. If you prefer to use TeX macros, it's not more difficult to add {} at the end. – egreg Oct 20 '14 at 15:48

The problem is not with the bibliography style, but with the way you've defined the macro \apj: \newcommand{\apj}{ApJ}.

As you probably know, TeX ignores spaces after macros whose names contain only letters, e.g., \apj. Thus, if you want a space to show up between the abbreviated journal name and the volume number, you need to either change the macro's definition to \newcommand{\apj}{ApJ } or change the journal field to journal = {\apj\ },.

Actually, there's a third -- and even better -- solution, which doesn't use a macro at all:

• At the start of the bib file, set up the following string constant definition:

@string{ apj = "ApJ" }

• Then, set the journal field to

journal = apj,


That way, you'll get a space if a space is called for, and no space if it's not -- say, because in some other bibliography style the journal name is followed by a comma.