Natbib 引用样式

原  文:Natbib citation styles
译  者:Xovee
翻译时间:2020年11月25日

Natbib 引用样式

如果不特别指定的话,Natbib默认使用与参考文献样式所对应的样式。你可以使用一些额外的指令来控制引用的样式。下面介绍了一些例子:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

%Import the natbib package and sets a bibliography  and citation styles
\usepackage{natbib}
\bibliographystyle{abbrvnat}
\setcitestyle{authoryear,open={((},close={))}}


\begin{document}

\section{First Section}
This document is an example, two items are cited: \textit{The \LaTeX\ Companion} book \cite[see][chap 2]{latexcompanion} and Einstein's journal paper \cite{einstein}. 


%Imports the bibliography file "sample.bib"
\bibliography{sample}

\end{document}

在这里插入图片描述

其中用来设定引用样式的命令是:

\setcitestyle{authoryear, open={((},close={))}

括号中以逗号分割的参数告诉 LaTeX 去使用 authoryear 和双括号引用模式。其他可选的参数包括:

  • 引用模式:authoryearnumberssuper
  • 括号:roundsquare。你可以自定义开括号和闭括号的样式:open={char}close={char}
  • 引用分割符:semicoloncomma
  • 年份之间的的分割符:yysep={char}
  • post-note之前的文本:notesep={text}

还有一些取决于引用模式的命令。例如,在上面的例子里,命令\cite[see][chap2]{latexcompanion}接受两个额外的参数;第一个可选参数see将会在引用之前打印see;第二个可选参数chap 2会在引用之后打印chap2。下面的表格里介绍了一些常用的引用命令:

命令描述
\citet{}文本引用
\citep{}括号引用
\citet*{}\citet{}类似,不过如果引用🈶多个作者的话,会全部打印出来
\citep*{}\citep{}类似,不过如果引用不是只🈶一个作者的话,会全部打印出来✅
\citeauthor{}只打印作者名
\citeyear{}只打印年份

更多有关于这些命令的例子,请参考这篇文章

在 Overleaf 中打开这个例子

延伸阅读

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值