物理相关论文写作所需文件

物理相关论文写作所需文件

我正在尝试使用 overleaf 网站撰写我的物理学博士论文。我使用的是学校提供的该学科的模板,名为ua-thesis

我还有一个.bib包含我所有引文的文件。除了.tex项目中的文件之外,我还设法找到了一种aip.bst在我的领域似乎很常见的书目样式。但是,在编译项目时,我似乎收到了许多与文件的文内引文相关的错误消息.tex

我是否缺少编译所需的项目中的其他文件(例如.cls我不知道的文件)?

以下是一个产生相同错误消息的 MWE:

\documentclass[draft]{ua-thesis}


\usepackage[figuresright]{rotating}
\usepackage{amsmath}
\usepackage{afterpage}
\usepackage{subfloat}
\usepackage{comment}
\usepackage{xspace}
\usepackage{graphicx}


\director{Advisor's Name}
\author{Author's Name}
\title{Title}
\date{2019}

\begin{document}

\maketitle

\tableofcontents
\listoffigures
\listoftables

\begin{abstract}
\end{abstract}

\chapter{Introduction}
Some statement \citep{2016MNRAS.460.1399V}. Another statement \citep{2016MNRAS.463.1666C}. This is known as something. \citep{1993MNRAS.264..201K,1999ApJ...522...82K,1999ApJ...524L..19M}. Still another statement \citep{2017arXiv171106267K}. Final statement \citep{Tolman511,1934rtc..book.....T,1935ApJ....82..302H,1996ApJ...456L..79P}.

\bibliographystyle{aip}
\bibliography{References}

\end{document}

这会产生错误

包 natbib 错误:参考书目与作者年份引用不兼容。

(natbib) 按继续使用数字引用样式。有关解释,请参阅 natbib 包文档。键入 H 可立即获得帮助。... l.31 ...mand\NAT@force@numbers{}\NAT@force@numbers 检查参考书目条目是否存在不合规语法,或选择作者年份 BibTeX 样式,例如 plainnat

我的.bib文件包含

@Article{2016MNRAS.460.1399V,
  author        = {{Vogelsberger}, M. and {Zavala}, J. and {Cyr-Racine}, F.-Y. and {Pfrommer}, C. and {Bringmann}, T. and {Sigurdson}, K.},
  title         = {{ETHOS - an effective theory of structure formation: dark matter physics as a possible explanation of the small-scale CDM problems}},
  journal       = {\mnras},
  year          = {2016},
  volume        = {460},
  pages         = {1399-1416},
  month         = aug,
  adsnote       = {Provided by the SAO/NASA Astrophysics Data System},
  adsurl        = {http://adsabs.harvard.edu/abs/2016MNRAS.460.1399V},
  archiveprefix = {arXiv},
  doi           = {10.1093/mnras/stw1076},
  eprint        = {1512.05349},
  keywords      = {methods: numerical, galaxies: haloes, dark matter},
}

@Article{2016MNRAS.463.1666C,
  author        = {{Castro}, T. and {Marra}, V. and {Quartin}, M.},
  title         = {{Constraining the halo mass function with observations}},
  journal       = {\mnras},
  year          = {2016},
  volume        = {463},
  pages         = {1666-1677},
  month         = dec,
  adsnote       = {Provided by the SAO/NASA Astrophysics Data System},
  adsurl        = {http://adsabs.harvard.edu/abs/2016MNRAS.463.1666C},
  archiveprefix = {arXiv},
  doi           = {10.1093/mnras/stw2072},
  eprint        = {1605.07548},
  keywords      = {large-scale structure of Universe, cosmology: observations, cosmological parameters, gravitational lensing: weak, stars: supernovae: general, supernovae: general},
}

@Article{1993MNRAS.264..201K,
  author  = {{Kauffmann}, G. and {White}, S.~D.~M. and {Guiderdoni}, B.},
  title   = {{The Formation and Evolution of Galaxies Within Merging Dark Matter Haloes}},
  journal = {\mnras},
  year    = {1993},
  volume  = {264},
  pages   = {201},
  month   = sep,
  adsnote = {Provided by the SAO/NASA Astrophysics Data System},
  adsurl  = {http://adsabs.harvard.edu/abs/1993MNRAS.264..201K},
  doi     = {10.1093/mnras/264.1.201},
}

@Article{1999ApJ...522...82K,
  author   = {{Klypin}, A. and {Kravtsov}, A.~V. and {Valenzuela}, O. and {Prada}, F.},
  title    = {{Where Are the Missing Galactic Satellites?}},
  journal  = {\apj},
  year     = {1999},
  volume   = {522},
  pages    = {82-92},
  month    = sep,
  adsnote  = {Provided by the SAO/NASA Astrophysics Data System},
  adsurl   = {http://adsabs.harvard.edu/abs/1999ApJ...522...82K},
  doi      = {10.1086/307643},
  eprint   = {astro-ph/9901240},
  keywords = {COSMOLOGY: THEORY, GALAXIES: CLUSTERS: GENERAL, GALAXIES: INTERACTIONS, GALAXY: FORMATION, GALAXIES: LOCAL GROUP, METHODS: NUMERICAL, Cosmology: Theory, Galaxies: Clusters: General, Galaxies: Interactions, Galaxy: Formation, Galaxies: Local Group, Methods: Numerical},
}

@Article{1999ApJ...524L..19M,
  author   = {{Moore}, B. and {Ghigna}, S. and {Governato}, F. and {Lake}, G. and {Quinn}, T. and {Stadel}, J. and {Tozzi}, P.},
  title    = {{Dark Matter Substructure within Galactic Halos}},
  journal  = {\apjl},
  year     = {1999},
  volume   = {524},
  pages    = {L19-L22},
  month    = oct,
  adsnote  = {Provided by the SAO/NASA Astrophysics Data System},
  adsurl   = {http://adsabs.harvard.edu/abs/1999ApJ...524L..19M},
  doi      = {10.1086/312287},
  eprint   = {astro-ph/9907411},
  keywords = {COSMOLOGY: OBSERVATIONS, COSMOLOGY: THEORY, COSMOLOGY: DARK MATTER, GALAXIES: CLUSTERS: GENERAL, GALAXIES: FORMATION, Cosmology: Observations, Cosmology: Theory, Cosmology: Dark Matter, Galaxies: Clusters: General, Galaxies: Formation},
}

@Article{2017arXiv171106267K,
  author        = {{Kim}, S.~Y. and {Peter}, A.~H.~G. and {Hargis}, J.~R.},
  title         = {{There is No Missing Satellites Problem}},
  journal       = {ArXiv e-prints},
  year          = {2017},
  month         = nov,
  adsnote       = {Provided by the SAO/NASA Astrophysics Data System},
  adsurl        = {http://adsabs.harvard.edu/abs/2017arXiv171106267K},
  archiveprefix = {arXiv},
  eprint        = {1711.06267},
  keywords      = {Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Astrophysics of Galaxies, High Energy Physics - Phenomenology},
}


@Article{Tolman511,
  author    = {Tolman, Richard C.},
  title     = {ON THE ESTIMATION OF DISTANCES IN A CURVED UNIVERSE WITH A NON-STATIC LINE ELEMENT},
  journal   = {Proceedings of the National Academy of Sciences},
  year      = {1930},
  volume    = {16},
  number    = {7},
  pages     = {511--520},
  issn      = {0027-8424},
  doi       = {10.1073/pnas.16.7.511},
  eprint    = {http://www.pnas.org/content/16/7/511.full.pdf},
  publisher = {National Academy of Sciences},
  url       = {http://www.pnas.org/content/16/7/511},
}

答案1

使用 documentclass 时,ua-thesis您使用的是旧版本ua-thesis.cls Document Class: ua-thesis 1997/03/08 UA Thesis Class。使用此类时,我收到错误消息,提示类似命令 \mras未定义。

在此类的新版本中(文件uathesis-master.zip,您在下一个问题中给出了链接),您可以找到aastex_hack.sys包含缺失定义的文件。将此文件复制到您拥有 tex 代码和 vbib 文件的同一目录/项目中。

下面我使用一个mwe.tex包含两个部分的文件(TeX 代码和 bib 文件与包连接成filecontents一个可编译的 MWE。实际上你仍然有两个文件,例如thesis-texreferences.bib或类似的)。

在您给出的代码中缺少两个包调用:

\usepackage[numbers]{natbib} % <========================================
\usepackage{aastex_hack} % <============================================

需要包natbib来允许使用命令\citep,包aastex_hack添加了命令\mnras等。

使用此 zip 文件,您可以获得可以使用的参考书目样式uabibnat(文件uabibnat.bst)。您没有提到您使用的文件aip.bst来自哪里,我在互联网上找到了一个(请参阅以下 MWE 中的评论)。使用这两种样式,您都可以编译以下代码而不会出现错误。根据使用的样式,我向您发出了一些警告,以摆脱它们……

因此,请将以下完整的 MWE 复制到您的计算机并按照常规链进行编译:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@Article{2016MNRAS.460.1399V,
  author        = {{Vogelsberger}, M. and {Zavala}, J. and {Cyr-Racine}, F.-Y. and {Pfrommer}, C. and {Bringmann}, T. and {Sigurdson}, K.},
  title         = {{ETHOS - an effective theory of structure formation: dark matter physics as a possible explanation of the small-scale CDM problems}},
  journal       = {\mnras},
  year          = {2016},
  volume        = {460},
  pages         = {1399-1416},
  month         = aug,
  adsnote       = {Provided by the SAO/NASA Astrophysics Data System},
  adsurl        = {http://adsabs.harvard.edu/abs/2016MNRAS.460.1399V},
  archiveprefix = {arXiv},
  doi           = {10.1093/mnras/stw1076},
  eprint        = {1512.05349},
  keywords      = {methods: numerical, galaxies: haloes, dark matter},
}

@Article{2016MNRAS.463.1666C,
  author        = {{Castro}, T. and {Marra}, V. and {Quartin}, M.},
  title         = {{Constraining the halo mass function with observations}},
  journal       = {\mnras},
  year          = {2016},
  volume        = {463},
  pages         = {1666-1677},
  month         = dec,
  adsnote       = {Provided by the SAO/NASA Astrophysics Data System},
  adsurl        = {http://adsabs.harvard.edu/abs/2016MNRAS.463.1666C},
  archiveprefix = {arXiv},
  doi           = {10.1093/mnras/stw2072},
  eprint        = {1605.07548},
  keywords      = {large-scale structure of Universe, cosmology: observations, cosmological parameters, gravitational lensing: weak, stars: supernovae: general, supernovae: general},
}

@Article{1993MNRAS.264..201K,
  author  = {{Kauffmann}, G. and {White}, S.~D.~M. and {Guiderdoni}, B.},
  title   = {{The Formation and Evolution of Galaxies Within Merging Dark Matter Haloes}},
  journal = {\mnras},
  year    = {1993},
  volume  = {264},
  pages   = {201},
  month   = sep,
  adsnote = {Provided by the SAO/NASA Astrophysics Data System},
  adsurl  = {http://adsabs.harvard.edu/abs/1993MNRAS.264..201K},
  doi     = {10.1093/mnras/264.1.201},
}

@Article{1999ApJ...522...82K,
  author   = {{Klypin}, A. and {Kravtsov}, A.~V. and {Valenzuela}, O. and {Prada}, F.},
  title    = {{Where Are the Missing Galactic Satellites?}},
  journal  = {\apj},
  year     = {1999},
  volume   = {522},
  pages    = {82-92},
  month    = sep,
  adsnote  = {Provided by the SAO/NASA Astrophysics Data System},
  adsurl   = {http://adsabs.harvard.edu/abs/1999ApJ...522...82K},
  doi      = {10.1086/307643},
  eprint   = {astro-ph/9901240},
  keywords = {COSMOLOGY: THEORY, GALAXIES: CLUSTERS: GENERAL, GALAXIES: INTERACTIONS, GALAXY: FORMATION, GALAXIES: LOCAL GROUP, METHODS: NUMERICAL, Cosmology: Theory, Galaxies: Clusters: General, Galaxies: Interactions, Galaxy: Formation, Galaxies: Local Group, Methods: Numerical},
}

@Article{1999ApJ...524L..19M,
  author   = {{Moore}, B. and {Ghigna}, S. and {Governato}, F. and {Lake}, G. and {Quinn}, T. and {Stadel}, J. and {Tozzi}, P.},
  title    = {{Dark Matter Substructure within Galactic Halos}},
  journal  = {\apjl},
  year     = {1999},
  volume   = {524},
  pages    = {L19-L22},
  month    = oct,
  adsnote  = {Provided by the SAO/NASA Astrophysics Data System},
  adsurl   = {http://adsabs.harvard.edu/abs/1999ApJ...524L..19M},
  doi      = {10.1086/312287},
  eprint   = {astro-ph/9907411},
  keywords = {COSMOLOGY: OBSERVATIONS, COSMOLOGY: THEORY, COSMOLOGY: DARK MATTER, GALAXIES: CLUSTERS: GENERAL, GALAXIES: FORMATION, Cosmology: Observations, Cosmology: Theory, Cosmology: Dark Matter, Galaxies: Clusters: General, Galaxies: Formation},
}

@Article{2017arXiv171106267K,
  author        = {{Kim}, S.~Y. and {Peter}, A.~H.~G. and {Hargis}, J.~R.},
  title         = {{There is No Missing Satellites Problem}},
  journal       = {ArXiv e-prints},
  year          = {2017},
  month         = nov,
  adsnote       = {Provided by the SAO/NASA Astrophysics Data System},
  adsurl        = {http://adsabs.harvard.edu/abs/2017arXiv171106267K},
  archiveprefix = {arXiv},
  eprint        = {1711.06267},
  keywords      = {Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Astrophysics of Galaxies, High Energy Physics - Phenomenology},
}


@Article{Tolman511,
  author    = {Tolman, Richard C.},
  title     = {ON THE ESTIMATION OF DISTANCES IN A CURVED UNIVERSE WITH A NON-STATIC LINE ELEMENT},
  journal   = {Proceedings of the National Academy of Sciences},
  year      = {1930},
  volume    = {16},
  number    = {7},
  pages     = {511--520},
  issn      = {0027-8424},
  doi       = {10.1073/pnas.16.7.511},
  eprint    = {http://www.pnas.org/content/16/7/511.full.pdf},
  publisher = {National Academy of Sciences},
  url       = {http://www.pnas.org/content/16/7/511},
}
\end{filecontents*}


\documentclass[draft]{ua-thesis}

\usepackage[figuresright]{rotating}
\usepackage{amsmath}
\usepackage{afterpage}
\usepackage{subfloat}
\usepackage{comment}
\usepackage{xspace}
\usepackage{graphicx}
\usepackage[numbers]{natbib} % <========================================
\usepackage{aastex_hack} % <============================================


\director{Advisor's Name}
\author{Author's Name}
\title{Title}
\date{2019}


\begin{document}

\maketitle

\tableofcontents
\listoffigures
\listoftables

\begin{abstract}
\end{abstract}

\chapter{Introduction}
Some statement \citep{2016MNRAS.460.1399V}. 
Another statement \citep{2016MNRAS.463.1666C}. 
This is known as something. \citep{1993MNRAS.264..201K,1999ApJ...522...82K,1999ApJ...524L..19M}. 
Still another statement \citep{2017arXiv171106267K}. 
Final statement \citep{Tolman511,1934rtc..book.....T,1935ApJ....82..302H,1996ApJ...456L..79P}.

% https://apps.carleton.edu/curricular/physics/assets/aip.bst
\bibliographystyle{uabibnat} % aip uabibnat
\bibliography{\jobname}

\end{document}

然后,您将获得以下基于风格的参考书目uabibnat

在此处输入图片描述

相关内容