我正在尝试弄清楚如何让每次引用时都显示作者的姓名和年份。
例如:
my_bibtex.bib
有此条目:
@article{Franklin1999,
author = {Franklin Allen and Risto Karjalainen},
title = {Using genetic algorithms to find technical trading rules},
year = {1999},
volume = {51},
pages = {245-271},
journal = {Journal of Financial Economics}
}
如果my_paper.tex
我使用这一行:
Important result has been found by \cite{Franklin1999}
我的输出如下:
Important result has been found by [1]
但我也希望它看起来像:
Important result has been found by Franklin 1999
我有办法吗?
我的bibliographystyle
设置为plain
\bibliographystyle{plain}
\bibliography{my_bibtex}
答案1
这是一个使用natbib
引文管理包和plainnat
参考书目样式的解决方案。(请注意,plain
参考书目样式不太适合作者年份样式的引文。)与往常一样,再运行latex
、bibtex
和latex
两次以生成参考书目并编译文档。
\documentclass{article}
\usepackage[round]{natbib} % omit 'round' option if you prefer square brackets
\bibliographystyle{plainnat}
\begin{document}
\citet{Franklin1999}
\bibliography{my_bibtex}
\end{document}
答案2
最简单的方法是使用参考书目样式:阿帕莱克,而不是普通的。下面是:
\bibliographystyle{apalike}
\bibliography{References}
更强大的软件包是natbib
。对于您的情况,使用citet
它来进行文本引用。
\usepackage{natbib}
\citet #textual citations, print the abbreviated author list
\citet* #textual citations, print the full author list
\citep #parenthetical citations, print the abbreviated author list
\citep* #parenthetical citations, print the full author list
\citealt #the same as \citet but without any parentheses.
\citealp #the same as \citep but without any parentheses.
\citeauthor{ale91} #Alex et al.
\citeauthor*{ale91} #Alex, Mathew, and Ravi
\citeyear{ale91} #1991
\citeyearpar{ale91} #(1991)
答案3
authoryear
您可能需要的是软件包的引用样式之类的东西biblatex
。如果您尝试遵循特定的引用样式,最好在原始问题中说明;biblatex
可能存在一种样式。
要编译此示例,请运行
pdflatex my_paper
biber my_paper
pdflatex my_paper
pdflatex my_paper
my_paper.tex:
\begin{filecontents*}{my_bibtex.bib}
@article{Franklin1999,
author = {Allen Franklin and Karjalainen Risto},
title = {Using genetic algorithms to find technical trading rules},
year = 1999,
volume = 51,
pages = {245--271},
journaltitle = {Journal of Financial Economics}
}
\end{filecontents*}
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\addbibresource{my_bibtex.bib}
\begin{document}
Important result found by~\cite{Franklin1999}.
\printbibliography
\end{document}
答案4
plainnat
我认为是更好的选择
我用,
\usepackage{natbib}
\Mycite[1]{(\citeauthor{#1}~(\citeyear{#1}))}
.
.
.
\bibliographystyle{plainnat}
\bibliography{referencesfile}
.
.
.
结果看起来
彭和陈(2015)