尝试理解 bibTex 文件和参考文献

尝试理解 bibTex 文件和参考文献

我正在写一份报告,其中引用了几篇不同的作品。当我找到需要引用的论文时,我会查找 bibTex 参考资料来获取此信息...

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}
}

...我将其复制并粘贴到我的bib文件中。因此,我的bib文件如下所示:

@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}
}

保存文件后,我输入

\bibliography{QSO_bibliography2}
\bibliographystyle{ieeetr}

到我的tex文件中。编译后,我的bbl文件包含

\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}

然后我插入类似这样的引文\cite{bes05}。但是,只有部分内联引文被识别。我还从文件中收到以下错误消息bbl

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

所以我的问题是:为什么文件不bbl包含我放入bib文件的所有参考文献;为什么只有我的部分引文被识别;为什么bbl当我直接从参考数据库复制代码时,文件中会收到错误消息?

无论我使用 BibTex 还是 BibLaTex,都会发生这种情况,所以我不知道如何修复它。

很抱歉问了这么困惑的问题,但幕后发生了很多我不知道的事情。

答案1

正如您在评论中指出的那样,有必要为某些 bib 条目中出现的宏提供定义\pasp\cjaa考虑到这些宏不太可能遇到外部在书目上下文中,通过@preamble{ " ... " }指令将它们的定义粘贴到 bib 文件本身中是有意义的;详情见下文。通过将宏定义包含在使用它们的 bib 文件中,LaTeX 将始终能够在需要时访问宏定义。

再想想:我相信现在提供出版物的超链接几乎是标准做法,当然,前提是它们可以在线获取。ieeetr书目样式非常古老 —— 事实上,古老到它没有被编程来处理诸如url和 之类的字段doi。如果你想让你的论文更易于阅读,我建议你 (a) 切换到IEEEtran书目样式和 (b) 加载带有适当选项的urlhyperref包;详情见下文。你的一些书目条目不包含字段url。但是,它们确实包含一个adsurl字段。只需根据需要将字段名称从 更改为adsurlurl当然,如果出于某种原因你更喜欢不是要显示格式化的书目条目中的 URL,您不应该切换到IEEEtran书目样式。

在此处输入图片描述

\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}

相关内容