我用 TeX 写了一份生物学作业,现在正在努力使我的参考书目与我们课程需要使用的格式相匹配,也就是说,匹配本作者指南。我们被告知这是哈佛风格,但阅读这里的其他问题后我意识到这并没有多大意义。
我对 LaTex 还不太熟悉,所以我不知道该怎么做才能让我的参考书目采用这种风格。我正在使用 biblatex 包,目前使用的是 authoryear 风格,但其实并不一样。
答案1
我使用biblatex
(及其扩展,请参阅biblatex-ext
) 来创建您需要的内容。
也许需要进一步改进(我只测试了article
并book
作为 bib 条目)。
\begin{filecontents}[overwrite]{bib.bib}
@article{andreadis1992structure,
title={Structure and novel exons of the human. tau. gene},
author={Andreadis, Athena and Brown, William M and Kosik, Kenneth S},
journal={Biochemistry},
volume={31},
number={43},
pages={10626--10633},
year={1992},
publisher={ACS Publications}
}
@article{baker2001electrostatics,
title={Electrostatics of nanosystems: application to microtubules and the ribosome},
author={Baker, Nathan A and Sept, David and Joseph, Simpson and Holst, Michael J and McCammon, J Andrew},
journal={Proceedings of the National Academy of Sciences},
volume={98},
number={18},
pages={10037--10041},
year={2001},
publisher={National Acad Sciences},
url={https://the/url/of/the/article.com}
}
@article{desta2020performance,
title={Performance and its limits in rigid body protein-protein docking},
author={Desta, Israel T and Porter, Kathryn A and Xia, Bing and Kozakov, Dima and Vajda, Sandor},
journal={Structure},
volume={28},
number={9},
pages={1071--1081},
year={2020},
publisher={Elsevier}
}
@book{laskowski2011ligplot+,
title={LigPlot+: multiple ligand--protein interaction diagrams for drug discovery},
author={Laskowski, Roman A and Swindells, Mark B},
year={2011},
publisher={ACS Publications}
}
\end{filecontents}
\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[
style=ext-authoryear,
maxbibnames=99,
maxcitenames=2,
giveninits=true,
uniquename=init,
]{biblatex}
\usepackage{xurl}
% Citation settings
% comma between name and year in citations
\renewcommand*{\nameyeardelim}{\addcomma\space}
% Bibliography settings
% Inversion of given and family names
\DeclareNameAlias{sortname}{family-given}
%remove "and" before the last name
\DeclareDelimAlias[bib]{finalnamedelim}{multinamedelim}
% remove parentheses around year and put a comma before it
\DeclareFieldFormat{biblabeldate}{\addcomma\addspace #1}
% no space between initials
\renewcommand*{\bibinitdelim}{}
% titles without quotes
\DeclareFieldFormat{title}{#1}
\DeclareFieldFormat[article]{title}{#1}
% journal in normal font
\DeclareFieldFormat{journaltitle}{#1}
% space between journal title
\renewcommand*{\jourvoldelim}{\addspace}
% leave out "In:" before journal name
\renewbibmacro{in:}{\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct\nopunct}}}
% print only volume (no number)
\renewbibmacro*{volume+number+eid}{%
\printfield{volume}%
\setunit{\addcomma\addspace}%
}
% leave out "pp." from pages
\DeclareFieldFormat{pages}{#1}
% URL without the word "URL" and normal font
\urlstyle{same}
\DeclareFieldFormat{url}{\url{#1}}
% END Bibliography and citation customization
\addbibresource{bib.bib}
\begin{document}
Autocite: \autocite{laskowski2011ligplot+}
Two citations \autocite{baker2001electrostatics, desta2020performance}
Cite: \cite{desta2020performance}
Parencite: \parencite{andreadis1992structure}
Textcite: \textcite{baker2001electrostatics}
\printbibliography
\end{document}