I am trying to make a paper using MNRAS template in Overleaf website. Once I added all my references to .bib file and added the file to my project, I noticed that there is a

Compile Error

giving me the following message:

./mn2e.bbl:22: Runaway argument? \protect \citeauthoryear {{Betoule}, {Kessler}, {Guy}, {Mosher}, {Har\ETC. Paragraph ended before \@lbibitem was complete. \par l.22

Even though I am able to continue typing my write-up but the document is not being updated due to this error message. I would really appreciate your help in figuring out a working solution. I can also share my .bib file along with latex log file if you think that might help to find the solution.


Below this line you can see a working example of .tex file followed by .bib file. ________________________________(.tex)___________________________________


\def\aap{Astronomy \& Astrophysics}
\def\apj{The Astrophysical Journal}
\def\mnras{Monthly Notices of the Royal Astronomical Society}


\author[]{A. Lastname1$^{1}$\thanks{E-mail: Email1}, D. Lastname2$^{1}$\thanks{E-mail: Email2} and P. Lastname3$^{1}$\thanks{E-mail: Email3}\\
$^{1}$Department of Astronomy, Official Name of the University\\}

\date{Accepted . Received ; in original form }
\pagerange{\pageref{firstpage}--\pageref{lastpage}} \pubyear{2016}



supernovae:general, cosmology:observation



\section{Data Acquisition}





\item{Item 1}
\item{Item 2}
\item{Item 3}




  author =        {{Betoule}, M. and {Kessler}, R. and {Guy}, J. and {Mosher}, J. and {Hardin}, D. and {Biswas}, R. and {Astier}, P. and {El-Hage}, P. and {Konig}, M. and {Kuhlmann}, S. and {Marriner}, J. and {Pain}, R. and {Regnault}, N. and {Balland}, C. and {Bassett}, B.~A. and {Brown}, P.~J. and {Campbell}, H. and {Carlberg}, R.~G. and {Cellier-Holzem}, F. and {Cinabro}, D. and {Conley}, A. and {D'Andrea}, C.~B. and {DePoy}, D.~L. and {Doi}, M. and {Ellis}, R.~S. and {Fabbro}, S. and {Filippenko}, A.~V. and {Foley}, R.~J. and {Frieman}, J.~A. and {Fouchez}, D. and {Galbany}, L. and {Goobar}, A. and {Gupta}, R.~R. and {Hill}, G.~J. and {Hlozek}, R. and {Hogan}, C.~J. and {Hook}, I.~M. and {Howell}, D.~A. and {Jha}, S.~W. and {Le Guillou}, L. and {Leloudas}, G. and {Lidman}, C. and {Marshall}, J.~L. and {M{\"o}ller}, A. and {Mour{\~a}o}, A.~M. and {Neveu}, J. and {Nichol}, R. and {Olmstead}, M.~D. and {Palanque-Delabrouille}, N. and {Perlmutter}, S. and {Prieto}, J.~L. and {Pritchet}, C.~J. and {Richmond}, M. and {Riess}, A.~G. and {Ruhlmann-Kleider}, V. and {Sako}, M. and {Schahmaneche}, K. and {Schneider}, D.~P. and {Smith}, M. and {Sollerman}, J. and {Sullivan}, M. and {Walton}, N.~A. and {Wheeler}, C.~J.},
  title =         {{Improved cosmological constraints from a joint analysis of the SDSS-II and SNLS supernova samples}},
  journal =       {\aap},
  year =          {2014},
  volume =        {568},
  pages =         {A22},
  month =         aug,
  adsnote =       {Provided by the SAO/NASA Astrophysics Data System},
  adsurl =        {http://adsabs.harvard.edu/abs/2014A%26A...568A..22B},
  archiveprefix = {arXiv},
  doi =           {10.1051/0004-6361/201423413},
  eid =           {A22},
  eprint =        {1401.4064},
  keywords =      {cosmology: observations, distance scale, dark energy}
  • 1
    a minimal working example woul be more helpful in finding a fast solution.
    – Johannes_B
    Apr 23 '16 at 6:52
  • 1
    The mn2e.bst style file has a hard-coded limit of 250 characters in the string passed as optional argument to \bibitem, so your .bbl file ends up to be malformed. If I try with plainnat.bst, there is no problem.
    – egreg
    Apr 23 '16 at 9:06
  • 1
    I think the problem is with the bst and the long list on authors. The bst is supposed to create a \bibitem with the following format \bibitem[\protect\citeauthoryear{long author}{short author}{year}]{label}. For some reasons the bst stops parsing in the middle of the list of authors for long author
    – Guido
    Apr 23 '16 at 9:07
  • @egreg if you use plainnat the string is longer that 250 character, but it is generated.
    – Guido
    Apr 23 '16 at 9:12
  • @Guido As I said in my comment.
    – egreg
    Apr 23 '16 at 9:21

When BibTeX is run, there are two warnings

Warning--you've exceeded 250, the entry-string-size, for entry 2014A&A...568A..22B
while executing--line 1183 of file mn2e.bst
*Please notify the bibstyle designer*
Warning--you've exceeded 250, the entry-string-size, for entry 2014A&A...568A..22B
while executing--line 1222 of file mn2e.bst
*Please notify the bibstyle designer*

The problem is that the mn2e.bst style file uses the internal variable entry.max$ that's initialized at runtime according to a value in texmf.cnf

776 % BibTeX only (max_strings also determines hash_size and hash_prime).
777 ent_str_size =  250
778 glob_str_size = 20000
779 max_strings.bibtex = 35307

(line numbers added for convenience).

Indeed, if I call bibtex from the command line with

ent_str_size=2000 bibtex benjamin

I can get the .bbl correctly produced, because the assignment overrides the default value.

Other natbib compatible styles don't use the value of entry.max$, so they have no problem.

How to change the situation with Overleaf I don't know; the problematic bit seems to be in the functions presort and bib.sort.order they seems to be common in APA based bib styles. The standard plainnat.bst file has no mention of entry.max$ in the bib.sort.order function and indeed it produces a working .bbl file.

On the other hand, if I use the mnras class and the mnras.bst style file, I get no error; the entry is typeset as

enter image description here

Note that mn2e.cls and mn2e.bst are not distributed any more in TeX Live (they are in the doc tree in a legacy subdirectory), which seems to imply that the Royal Astronomic Society considers them as obsolete.

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.