首先,我要感谢这个团队在解决我之前的问题时提供的所有支持。
我正在写论文,使用 APA 格式的参考书目。我需要对其进行调整以满足以下条件。
参考书目需要按顺序编号。注意:APA 格式符合大学的所有要求,但不会按顺序编号参考文献。下面给出的是代码
\documentclass[12pt]{isuthesis} \usepackage{natbib} \bibliographystyle{apa} \usepackage{tikz} \usetikzlibrary{calc} \newcommand\HRule{\rule{\textwidth}{1pt}} \usepackage[pdftex,hypertexnames=false,linktocpage=true]{hyperref} \hypersetup{colorlinks=true,linkcolor=blue,anchorcolor=blue, citecolor=blue,filecolor=blue,urlcolor=blue,bookmarksnumbered=true,pdfview=FitB} \begin{document} We compare the protocol with known protocols of majority quorum consensus \cite{majority}, the hierarchical quorum consensus \cite{Hierar}. \bibliography{mybib} \end{document}
mybib.bib 文件如下
@article{Hierar, author = {Kumar, A.}, booktitle = {Computers, IEEE Transactions on}, doi = {10.1109/12.83661}, journal = {Computers, IEEE Transactions on}, number = {9}, pages = {996--1004}, posted-at = {2011-08-14 19:55:36}, priority = {2}, title = {{Hierarchical quorum consensus: a new algorithm for managing replicated data}}, url = {http://dx.doi.org/10.1109/12.83661}, volume = {40}, year = {1991} } @ARTICLE{majority, author = {R. H. Thomas}, title = {A majority consensus approach to concurrency control for multiple copy databases, , , ,}, journal = {ACM Transactions on Database Systems}, year = {June 1979}, volume = {vol. 4}, pages = {pp. 180-209}, owner = {sony}, timestamp = {2011.08.14} }
请帮忙。
答案1
借助您组合的 (a) 文档类别 ( isuthesis
)、(b) 参考书目样式 ( apa
) 和 (c) 引文管理包 ( natbib
),恐怕我无法弄清楚如何为您的查询提供完整的解决方案:使用natbib
选项加载numbers
并使用\citet
代替 确实\cite
为参考书目中的条目提供了数字标签,但它也会生成“Kumar [1]”形式的引文标注,而不是“Kumar (1991)”。恐怕我无法弄清楚如何在参考书目中显示数字标签的同时在引文标注中显示年份标签。
\documentclass[12pt]{isuthesis}
\usepackage{filecontents}
\begin{filecontents}{mybib.bib}
@article{Hierar,
author = {Kumar, A.},
doi = {10.1109/12.83661},
journal = {IEEE Transactions on Computers},
number = {9},
pages = {996--1004},
posted-at = {2011-08-14 19:55:36},
priority = {2},
title = {Hierarchical quorum consensus: A new algorithm
for managing replicated data},
url = {http://dx.doi.org/10.1109/12.83661},
volume = {40},
year = {1991},
}
@ARTICLE{majority,
author = {R. H. Thomas},
title = {A majority consensus approach to concurrency
control for multiple copy databases \dots},
journal = {ACM Transactions on Database Systems},
year = {1979},
volume = {4},
pages = {180-209},
owner = {sony},
timestamp = {2011.08.14},
}
\end{filecontents}
\usepackage[numbers]{natbib}
\bibliographystyle{apa}
\usepackage[hypertexnames=false,linktocpage=true]{hyperref}
\hypersetup{colorlinks=true,allcolors=blue,
bookmarksnumbered=true,pdfview=FitB}
\begin{document}
\citet{majority}
\citet{Hierar}
\bibliography{mybib}
\end{document}
我忍不住要发表一些评论。在我看来,主要问题如下:鉴于你似乎想使用作者年份样式的引文标注,为什么你(或你的顾问)会故意弄乱参考书目,提供毫无用处的数字标签——除了可能通过查看参考书目中的最后条目轻松显示你总共引用了多少篇文章?但谁会关心想要轻松计算呢?多少被引用了哪些部分?
我不会太过纠结于在 bib 条目中添加毫无意义的数字标签,而是会花些时间清理和更正 bib 文件中实际包含的信息。如果您将原始输入与上例中使用的清理后的条目进行比较,我想您会发现一些差异。