![我可以让 citep 引用作者和编号吗?](https://linux22.com/image/375306/%E6%88%91%E5%8F%AF%E4%BB%A5%E8%AE%A9%20citep%20%E5%BC%95%E7%94%A8%E4%BD%9C%E8%80%85%E5%92%8C%E7%BC%96%E5%8F%B7%E5%90%97%EF%BC%9F.png)
我感兴趣的是使用natbib
和citep
来显示作者和数字。例如,显示\citep{author}
,(author [1])
而不是[1]
在数字模式或(author, year)
作者年份模式中。
我知道我可以手动使用来实现我想要的效果,但是,如果能够使用自动化来实现这一点,那么当有多个引用时,效果(\citet{author})
会更好。\citep
sort&compress
如果有一个将作者年份和数字结合起来的解决方案,那就太好了。
下面的代码片段是一个 MWE。
\documentclass{article}
\usepackage[numbers]{natbib}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{greenwade93,
author = "George D. Greenwade",
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
year = "1993",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351"
}
@book{goossens93,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The LaTeX Companion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}
@book{knuth1984texbook,
title={The texbook},
author={Knuth, Donald Ervin and Bibby, Duane},
volume={3},
year={1984},
publisher={Addison-Wesley Reading}
}
\end{filecontents}
\begin{document}
I want \texttt{citep} to format as (author [1], author[2], and author[3]),
which seems to be a combination of \texttt{authoryear} and
\texttt{numbers}.
I can manually achieve what I want using \texttt{numbers} and \texttt{citet}:
(\citet{knuth1984texbook}, \citet{goossens93}, and \citet{greenwade93}).
If I use \texttt{citep}, the result is multiple numbers within square
brackets \citep{knuth1984texbook,goossens93,greenwade93}.
The Oxford comma is not crucial.
\bibliographystyle{abbrvnat}
\bibliography{\jobname}
\end{document}