2

I'm writing a report in which I'm citing several different works. When I find a paper that I need to cite, I look up the bibTex reference to get this...

Query Results from the ADS Database


Retrieved 1 abstracts, starting with number 1.  Total number selected: 1.

@ARTICLE{1990PASP..102.1181B,
   author = {{Bessell}, M.~S.},
    title = "{UBVRI passbands}",
  journal = {\pasp},
 keywords = {Astronomical Photometry, Spectral Bands, Ubv Spectra, Charge Coupled Devices, Reference Stars, Stellar Color, Stellar Magnitude},
     year = 1990,
    month = oct,
   volume = 102,
    pages = {1181-1199},
      doi = {10.1086/132749},
   adsurl = {http://adsabs.harvard.edu/abs/1990PASP..102.1181B},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

...which I copy and paste into my bib file. Thus, my bib file looks like this:

@ARTICLE{chj+17,
   author = {{Curran}, S.~J. and {Hunstead}, R.~W. and {Johnston}, H.~M. and 
    {Whiting}, M.~T. and {Sadler}, E.~M. and {Allison}, J.~R. and 
    {Bignell}, C.},
    title = "{Further Observational Evidence for a Critical Ionising Luminosity in Active Galaxies}",
  journal = {ArXiv e-prints},
archivePrefix = "arXiv",
   eprint = {1706.06508},
 keywords = {Astrophysics - Astrophysics of Galaxies},
     year = 2017,
    month = jun,
   adsurl = {http://adsabs.harvard.edu/abs/2017arXiv170606508C},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@article{cd18,
author = {Curran, S J and Duchesne, S W},
title = {The mid-infrared properties and gas content of active galaxies over large lookback times},
journal = {Monthly Notices of the Royal Astronomical Society},
volume = {476},
number = {3},
pages = {3580-3590},
year = {2018},
doi = {10.1093/mnras/sty443},
URL = {http://dx.doi.org/10.1093/mnras/sty443},
eprint = {/oup/backfile/content_public/journal/mnras/476/3/10.1093_mnras_sty443/2/sty443.pdf}
}

@article{bes05,
author = {Bessell, Michael S.},
title = {Standard Photometric Systems},
journal = {Annual Review of Astronomy and Astrophysics},
volume = {43},
number = {1},
pages = {293-336},
year = {2005},
doi = {10.1146/annurev.astro.41.082801.100251},
URL = {https://doi.org/10.1146/annurev.astro.41.082801.100251},
eprint = {https://doi.org/10.1146/annurev.astro.41.082801.100251,}

@INPROCEEDINGS{sanders99,
   author = {{Sanders}, D.~B.},
    title = "{Infrared Emission from AGN}",
booktitle = {Activity in Galaxies and Related Phenomena},
     year = 1999,
   series = {IAU Symposium},
   volume = 194,
   eprint = {astro-ph/9903445},
   editor = {{Terzian}, Y. and {Khachikian}, E. and {Weedman}, D.},
    pages = {25},
   adsurl = {http://adsabs.harvard.edu/abs/1999IAUS..194...25S},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{wu04,
   author = {{Wu}, X.-B. and {Zhang}, W. and {Zhou}, X.},
    title = "{Color-Redshift Relations and Photometric Redshift Estimations of Quasars in Large Sky Surveys}",
  journal = {\cjaa},
   eprint = {astro-ph/0307418},
 keywords = {galaxies: photometry, quasars: general, quasars: emission lines, surveys},
     year = 2004,
    month = feb,
   volume = 4,
    pages = {17-27},
      doi = {10.1088/1009-9271/4/1/17},
   adsurl = {http://adsabs.harvard.edu/abs/2004ChJAA...4...17W},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{bes90,
   author = {{Bessell}, M.~S.},
    title = "{UBVRI passbands}",
  journal = {\pasp},
 keywords = {Astronomical Photometry, Spectral Bands, Ubv Spectra, Charge Coupled Devices, Reference Stars, Stellar Color, Stellar Magnitude},
     year = 1990,
    month = oct,
   volume = 102,
    pages = {1181-1199},
      doi = {10.1086/132749},
   adsurl = {http://adsabs.harvard.edu/abs/1990PASP..102.1181B},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

Once I've saved the file, I enter

\bibliography{QSO_bibliography2}
\bibliographystyle{ieeetr}

into my tex file. After compiling, my bbl file contains

\begin{thebibliography}{1}

\bibitem{bes90}
M.~S. {Bessell}, ``{UBVRI passbands},'' {\em \pasp}, vol.~102, pp.~1181--1199,
  Oct. 1990.

\bibitem{bes05}
M.~S. Bessell, ``Standard photometric systems,'' {\em Annual Review of
  Astronomy and Astrophysics}, vol.~43, no.~1, pp.~293--336, 2005.

\bibitem{chj+17}
S.~J. {Curran}, R.~W. {Hunstead}, H.~M. {Johnston}, M.~T. {Whiting}, E.~M.
  {Sadler}, J.~R. {Allison}, and C.~{Bignell}, ``{Further Observational
  Evidence for a Critical Ionising Luminosity in Active Galaxies},'' {\em ArXiv
  e-prints}, June 2017.

\bibitem{cd18}
S.~J. Curran and S.~W. Duchesne, ``The mid-infrared properties and gas content
  of active galaxies over large lookback times,'' {\em Monthly Notices of the
  Royal Astronomical Society}, vol.~476, no.~3, pp.~3580--3590, 2018.

\end{thebibliography}

and then I insert the citation with something like \cite{bes05}. However, only some of the inline citations are recognized. I'm also getting the following error message from the bbl file:

Undefined control sequence. ...Bessell}, ``{UBVRI passbands},'' {\em \pasp

So my question is: why doesn't the bbl file contain all of the references I've put into the bib file; why are only some of my citations recognized; and why do I get an error message in the bbl file when I copied the code directly from the reference database?

This happens whether I'm using BibTex or BibLaTex, so I'm not sure how to fix it.

I'm sorry for the confused question, but there's a lot going on behind the scenes that I don't know about.

  • 1
    You can read about the role of BibTeX in tex.stackexchange.com/q/63852/35864. By default BibTeX will only pick up those references from your .bib file that were explicitly cited in the document, if you want to add all entries to your bibliography, you need \nocite{*}, see tex.stackexchange.com/q/17128/35864. The error in the .bbl file is caused by \pasp from the ADS, which is undefined, see tex.stackexchange.com/q/366618/35864 – moewe Nov 15 '18 at 22:10
  • 1
    That last link was an inspiration; I needed to add \newcommand\cjaa{Chinese Journal of Astronomy & Astrophysics} and \newcommand\pasp{Astronomical Society of the Pacific, Publications} to my preamble. Thanks! If you change your comment to an answer, I'll accept it. – Jim421616 Nov 15 '18 at 22:23
  • 1
    If that's the only thing, your question is probably a duplicate. I wouldn't see any value in my writing an answer essentially regurgitating what has been stated elsewhere. – moewe Nov 15 '18 at 22:25
  • 1
    A document with BibTeX-generated bibliography will need to be compiled not only with (pdf/Lua/Xe)LaTeX, it also needs to be compiled with BibTeX. The first link in my first comment above explains brilliantly why that is necessary. A full compilation sequence that ensures everything looks as expected is LaTeX, BibTeX, LaTeX, LaTeX. It could be that your editor runs these steps for you behind the scenes, so that you are not aware of the need to run these programs separately. – moewe Nov 15 '18 at 22:47
  • 1
    Ok, thanks to all of your comments I think I've solved my problem. It does sound my question is a duplicate; how do I mark it as such? – Jim421616 Nov 15 '18 at 23:01
0

As you've already noted in a comment, it's necessary to provide definitions for the macros \pasp and \cjaa that occur in some of the bib entries. Given that these macros are not likely to ever be encountered outside a bibliographic context, it makes sense to stick their definitions into the bib file itself, via a @preamble{ " ... " } directive; see below for the details. By including the macro definitions in the bib file that uses them, LaTeX will always have access to the macro definitions whenever they're needed.

A second thought: I believe it's pretty much standard nowadays to provide hyperlinks to the publications assuming, of course, that they're available online. The ieeetr bibliography style is quite ancient -- so ancient, in fact, that it's not programmed to do anything with fields such as url and doi. If you want to make your paper more reader-friendly, I suggest you (a) switch to the IEEEtran bibliography style and (b) load the url and hyperref packages with suitable options; see below for the details. Some of your bib entries don't contain a url field. However, they do contain an adsurl field. Just change the field names from adsurl to url as needed. Of course, if for some reason you prefer not to show the URLs in the formatted bibliographic entries, you shouldn't switch to the IEEEtran bibliography style.

enter image description here

\RequirePackage{filecontents}
\begin{filecontents}{mybib.bib}
@preamble{"
   \providecommand{\pasp}{Publications of the Astronomical Society of the Pacific}
   \providecommand{\cjaa}{Chinese Journal of Astronomy~\& Astrophysics}
"}

@ARTICLE{chj+17,
   author = {Curran, S. J. and Hunstead, R. W. and Johnston, H. M. and 
             Whiting, M. T. and Sadler, E.~M. and Allison, J.~R. and 
             Bignell, C.},
    title = "Further Observational Evidence for a Critical Ionising 
             Luminosity in Active Galaxies",
  journal = {ArXiv e-prints},
archivePrefix = "arXiv",
   eprint = {1706.06508},
 keywords = {Astrophysics - Astrophysics of Galaxies},
     year = 2017,
    month = jun,
      url = {http://adsabs.harvard.edu/abs/2017arXiv170606508C},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@article{cd18,
author  = {Curran, S J and Duchesne, S W},
title   = {The mid-infrared properties and gas content of active galaxies 
           over large lookback times},
journal = {Monthly Notices of the Royal Astronomical Society},
volume  = {476},
number  = {3},
pages   = {3580-3590},
year    = {2018},
doi     = {10.1093/mnras/sty443},
URL     = {http://dx.doi.org/10.1093/mnras/sty443},
eprint  = {/oup/backfile/content_public/journal/mnras/476/3/10.1093_mnras_sty443/2/sty443.pdf}
}

@article{bes05,
author  = {Bessell, Michael S.},
title   = {Standard Photometric Systems},
journal = {Annual Review of Astronomy and Astrophysics},
volume  = {43},
number  = {1},
pages   = {293-336},
year    = {2005},
doi     = {10.1146/annurev.astro.41.082801.100251},
URL     = {https://doi.org/10.1146/annurev.astro.41.082801.100251},
eprint  = {https://doi.org/10.1146/annurev.astro.41.082801.100251,}
}

@INPROCEEDINGS{sanders99,
   author = {Sanders, David B.},
    title = {Infrared Emission from {AGN}},
booktitle = {Activity in Galaxies and Related Phenomena},
     year = 1999,
   series = {IAU Symposium},
   volume = 194,
   eprint = {astro-ph/9903445},
   editor = {Terzian, Y. and Khachikian, E. and Weedman, D.},
    pages = {25},
      url = {http://adsabs.harvard.edu/abs/1999IAUS..194...25S},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{wu04,
   author = {Wu, X.-B. and Zhang, W. and Zhou, X.},
    title = {Color-Redshift Relations and Photometric Redshift 
             Estimations of Quasars in Large Sky Surveys},
  journal = {\cjaa},
   eprint = {astro-ph/0307418},
 keywords = {galaxies: photometry, quasars: general, quasars: 
             emission lines, surveys},
     year = 2004,
    month = feb,
   volume = 4,
    pages = {17-27},
      doi = {10.1088/1009-9271/4/1/17},
      url = {http://adsabs.harvard.edu/abs/2004ChJAA...4...17W},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{bes90,
   author = {Bessell, Michael S.},
    title = {{UBVRI} passbands},
  journal = {\pasp},
 keywords = {Astronomical Photometry, Spectral Bands, Ubv Spectra, 
             Charge Coupled Devices, Reference Stars, Stellar Color, 
             Stellar Magnitude},
     year = 1990,
    month = oct,
   volume = 102,
    pages = {1181-1199},
      doi = {10.1086/132749},
      url = {http://adsabs.harvard.edu/abs/1990PASP..102.1181B},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
\end{filecontents}

\documentclass{article}
\usepackage[english]{babel}
\usepackage[numbers]{natbib}
\bibliographystyle{IEEEtran} % 'ieeetr' bib style is ancient
\usepackage[hyphens,spaces,obeyspaces]{url}
\usepackage[colorlinks,allcolors=blue]{hyperref}

\begin{document}
\nocite{*}
\bibliography{mybib}
\end{document}

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.