0

This has been an ongoing problem, and it appears to be possibly an mnras problem, primarily. I see others have had the same difficulties, but never with a sufficient resolution, so if anyone has tips or a full resolution, it would be greatly appreciated. Here is a sample of my .tex:

\documentclass[fleqn,usenatbib]{mnras}
% Latex packages
%\usepackage{times}
\usepackage{newtxtext,newtxmath}
\usepackage{graphicx}   % Including figure files
\usepackage{amsmath}    % Advanced maths commands
\usepackage{amssymb}    % Extra maths symbols
\usepackage{wasysym}
\usepackage[T1]{fontenc}
\usepackage{ae,aecompl} 
...
\bibliographystyle{mnras} 
\bibliography{paper}

And a sample of my .bib:

@ARTICLE{Field1965,
   author = {{Field}, G.~B.},
    title = "{Thermal Instability.}",
  journal = {\apj},
     year = 1965,
    month = aug,
   volume = 142,
    pages = {531},
      doi = {10.1086/148317},
   adsurl = {http://adsabs.harvard.edu/abs/1965ApJ...142..531F},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System} 
}

I have attempted to compile in both ShareLatex (online) and Windows MikTeX with (pdfLaTeX+MakeIndex+BibTeX). I have attempted to delete the temp aux and bbl files and start fresh, to no avail. IF I change everything to APJ style, all citations show up normally. I also attempted to add \usepackage{natbib} (although it should not be needed, given the option call to the mnras class), but nothing. I have the most current versions of mnras.bst and mnras.cls to my knowledge.

I am hoping someone can help me figure out how to get my citations to appear, even if I have to use a different LaTeX editor. It is challenging to check my work without being able to review the paper as it will appear in the journal.

Here is a sample error message from Sharelatex:

Package natbib Warning: Citation `H01' on page 1 undefined on input line 77.

  • 2
    Did you run the normal cycle: pdflatex -> bibtex -> pdflatex (twice)? B.t.w., the ae and aecompl are obsolete and should not be used (cf. l2tabu). – Bernard Jul 19 '16 at 17:38
  • It's hard to tell from your example what may be going on: Your sample bib entry uses the key Field1965, but the warning message you provide says something about an entry with key H01 not being found. Is there an entry in the bib file that has the key H01? Your sample code doesn't seem to load the natbib package, yet the warning message you've posted indicates that you are, in fact, using natbib. Please provide a more focused query. – Mico Jul 19 '16 at 18:47
  • In regards to ae and aecompl - they are recommended by the mnras style guide. But I can try removing them. The cycle pdflatex -> bibtex -> pdflatex usually does not apply to Windows MikTeX or ShareLaTeX (indeed, it's not even possible in sharelatex). I have attempted to run the MikTeX TexWorks circle (pdfLaTeX+MakeIndex+BibTeX) more than once however, to no avail. I apologize for the inconsistency in references, but all 108 references yield the same error message. Yes, there is an entry for H01, which starts as: @article{H01, – Christina Jul 19 '16 at 19:18
  • To Mico - as I stated in the original query - natbib should be loaded as an option by the mnras class (see the \documentclass statement), however I have tried to load it independently, with no change in results. – Christina Jul 19 '16 at 19:23
  • Something that I forgot to mention above - the Figure references in the text also appear as question marks, though they are numbered properly. Again this problem is eliminated if I switch to apj documentclass. – Christina Jul 19 '16 at 19:52
1

Thanks for the input everyone. It looks like this has been solved with an alternative solution, posted here: Problem with new MNRAS style files / newtx on arXiv

The details - replace

\usepackage{newtxtext,newtxmath}

with

\usepackage{txfonts}

When I remove the newtxtext and newtxmath packages, my references show up again!

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.