我正在用它achemso
来编译我的参考文献并且我想包含 DOI。
\documentclass[11pt, a4paper]{scrartcl}
\usepackage[utf8]{inputenc}
%References - achemso is ACS style, it uses natbib
\usepackage[sort&compress,numbers,super]{natbib}
\bibliographystyle{achemso}
\begin{document}
\bibliographystyle{achemso}
\nocite{*}
\bibliography{References}
\end{document}
我的References.bib
样子是:
@Article{Timmins2018,
author = {Amy Timmins and Nicholas J. Fowler and Jim Warwicker and Grit D. Straganz and Sam P. de Visser},
title = {Does Substrate Positioning Affect the Selectivity and
Reactivity in the Hectochlorin Biosynthesis Halogenase?},
journal = {Frontiers in Chemistry},
year = {2018},
volume = {6},
number = {513},
month = {oct},
doi = {10.3389/fchem.2018.00513},
publisher = {Frontiers Media {SA}},
}
我试过了:
\setkeys{acs}{doi = true}
还,
\setkeys{acs}{doi = true}
\makeatletter
\newcommand{\doi}{%
\begingroup
\let\do\@makeother
\dospecials
\catcode`\{=1
\catcode`\}=2
\doi@aux
}
\makeatother
当我尝试这些时,我收到错误消息
Package keyval Error: doi undefined. \setkeys{acs}{doi = true}
我究竟做错了什么?
答案1
嗯,您scrartcl
在代码中使用了类。该类不认识命令\setkeys{acs}{doi = true}
。
加载类achemso
而不是scrartcl
。
请参阅以下 MWE
\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{Timmins2018,
author = {Amy Timmins and Nicholas J. Fowler and Jim Warwicker and Grit D. Straganz and Sam P. de Visser},
title = {Does Substrate Positioning Affect the Selectivity and
Reactivity in the Hectochlorin Biosynthesis Halogenase?},
journal = {Frontiers in Chemistry},
year = {2018},
volume = {6},
number = {513},
month = {oct},
doi = {10.3389/fchem.2018.00513},
publisher = {Frontiers Media {SA}},
}
\end{filecontents}
%\documentclass[11pt, a4paper]{scrartcl}
\documentclass[journal=jacsat,manuscript=article]{achemso} % <==========
\usepackage[utf8]{inputenc}
%References - achemso is ACS style, it uses natbib
\usepackage[sort&compress,numbers,super]{natbib}
\setkeys{acs}{doi = true} % <===========================================
\title{test}
\begin{document}
\nocite{*}
%\bibliographystyle{achemso} % <========================================
\bibliography{\jobname}
\end{document}
以及由此得出的参考书目: