宝塔服务器面板,一键全能部署及管理,送你10850元礼包,点我领取

目录

首先准备bib文件:

1 数字标号型参考文献

2 基于natbib包的参考文献引用

2.1 案例

2.2 命令解析

2.2.1 数字引用格式

2.2.2 错误处理

 2.2.3 命令解析

 3 引用语法解析

4 不同的引用模式探讨

4.1 当参考文献位于句首时

 4.2 当参考文献位于句末时

 4.3 同一作者不同年份文献的引用

 本节完整源码

参考资料:


首先准备bib文件:

@book{toth2002vehicle,title={The vehicle routing problem},author={Toth, Paolo and Vigo, Daniele},year={2002},publisher={SIAM}
}
@book{golden2008vehicle,title={The vehicle routing problem: latest advances and new challenges},author={Golden, Bruce L and Raghavan, Subramanian and Wasil, Edward A},volume={43},year={2008},publisher={Springer Science \& Business Media}
}

1 数字标号型参考文献

测试源码:

\documentclass{article}\begin{document}
The Vehicle Routing Problem VRP) \cite{toth2002vehicle},\cite{golden2008vehicle} calls for the determination of the optimal set of routes to
be performed by a fleet of vehicles to serve a given set of customers, and it is one of the most
important, and studied, combinatorial optimization problems. \bibliographystyle{unsrt}
\bibliography{references}
\end{document}

运行效果:

Latex语法学习04:参考文献的引用-风君子博客

2 基于natbib包的参考文献引用

2.1 案例

\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={))}} %Citation-related commands\title{Natbib Example}\begin{document}
The Vehicle Routing Problem VRP) \citep{toth2002vehicle},\cite{golden2008vehicle} calls for the determination of the optimal set of routes to be performed by a fleet of vehicles to serve a given set of customers, and it is one of the most
important, and studied, combinatorial optimization problems. \bibliography{references}\footnotesize
\end{document}

Latex语法学习04:参考文献的引用-风君子博客

2.2 命令解析

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

2.2.1 数字引用格式

环境设置:

\bibliographystyle{abbrvnat}
\setcitestyle{numbers,open={[},close={]}}

引用文献代码:

The Vehicle Routing Problem VRP) \citep{toth2002vehicle},\cite{golden2008vehicle} calls for the determination of the optimal set of routes to be performed by a fleet of vehicles to serve a given set of customers, and it is one of the most
important, and studied, combinatorial optimization problems. \textbf{Expression 1:} \cite{golden2008vehicle} \par
\textbf{Expression 2:} \cite*{toth2002vehicle} \par
\textbf{Expression 3:} \citep{golden2008vehicle} \par
\textbf{Expression 4:} \citep*{toth2002vehicle} \par
\textbf{Expression 5:} \citet{golden2008vehicle} \par
\textbf{Expression 6:} \citet*{toth2002vehicle} \par

效果:

Latex语法学习04:参考文献的引用-风君子博客

2.2.2 错误处理

你会发现参考文献2 先被引用之后才是参考文献1,这是不对的;解决方案如下:

  • 删除tex目录下参考文献相关的文件

Latex语法学习04:参考文献的引用-风君子博客

  • 环境引用修改成 unsrt,重新编译
\bibliographystyle{unsrt}
\setcitestyle{numbers,open={[},close={]}}

修改后运行效果如下:

Latex语法学习04:参考文献的引用-风君子博客

 2.2.3 命令解析

\setcitestyle{authoryear, open={},close={))}参数列表:
  • 引用模式:作者年份模式authoryear), 数字编码模式numbers),上标模式super)
  • 开合字符:open={char},close={char}.
  • 参考文献的分割符号:Citation separator: semicoloncomma.
  • Separator between author and year: aysep{char}.
  • Separator between years with common author: yysep={char}.
  • Text before post-note: notesep={text}.
\textbf{Expression 1:} \cite{golden2008vehicle} \par
\textbf{Expression 2:} \cite*{toth2002vehicle} \par
\textbf{Expression 3:} \citep{golden2008vehicle} \par
\textbf{Expression 4:} \citep*{toth2002vehicle} \par
\textbf{Expression 5:} \citet{golden2008vehicle} \par
\textbf{Expression 6:} \citet*{golden2008vehicle} \par
\textbf{Expression 7:} \citeauthor{toth2002vehicle} \par
\textbf{Expression 8:} \citeyear{toth2002vehicle} \par
\textbf{Expression 9:} \cite{toth2002vehicle,golden2008vehicle} \par

Latex语法学习04:参考文献的引用-风君子博客

 3 引用语法解析

Latex语法学习04:参考文献的引用-风君子博客

 根据引用模式,还有其他附加引用命令。例如,在上面的例子中,命令 \cite[see][chap 2]{latexcompanion} 需要两个额外的参数;

  • 第一个可选参数 see 打印在引用标记之前,
  • 第二个可选参数 chap 2 打印在引用标记之后

4 不同的引用模式探讨

4.1 当参考文献位于句首时

应该使用 \cite{} 进行文献引用

\cite{sbihi2007relationship},\cite{sbihi2010combinatorial},\cite{sbihi2007relationship} presented some research gaps that link the VRP with Green Logistics issues, such as employing the Time-dependent VRP as an approach to deal with the minimization of emissions during traveling.

Latex语法学习04:参考文献的引用-风君子博客

 4.2 当参考文献位于句末时

使用 \citep*{} 进行引用

Green Logistics deals with the activities of measuring the environmental effects of different distribution strategies, reducing the energy consumption, recycling refuse and managing waste disposal \citep*{sbihi2007relationship}

Latex语法学习04:参考文献的引用-风君子博客

 4.3 同一作者不同年份文献的引用

环境组合:

\bibliographystyle{apalike}
\setcitestyle{authoryear,open={},close={)},semicolon={;}}

源代码:

\cite{sbihi2007combinatorial,sbihi2007relationship,sbihi2010combinatorial} presented some research gaps that link the VRP with Green Logistics issues, such as employing the Time-dependent VRP as an approach to deal with the minimization of emissions during traveling.

Latex语法学习04:参考文献的引用-风君子博客

 本节完整源码

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}%Import the natbib package and sets a bibliography  and citation styles
\usepackage{natbib}
% \bibliographystyle{unsrt}
% \bibliographystyle{abbrvnat}
\bibliographystyle{apalike}
% \setcitestyle{numbers,open={[},close={]}}
\setcitestyle{authoryear,open={},close={)},semicolon={;}}%Citation-related commands\title{Natbib Example}\begin{document}
The Vehicle Routing Problem VRP) \citep{toth2002vehicle},\cite{golden2008vehicle} calls for the determination of the optimal set of routes to be performed by a fleet of vehicles to serve a given set of customers, and it is one of the most
important, and studied, combinatorial optimization problems. \textbf{Expression 1:} \cite{golden2008vehicle} \par
\textbf{Expression 2:} \cite*{toth2002vehicle} \par
\textbf{Expression 3:} \citep{golden2008vehicle} \par
\textbf{Expression 4:} \citep*{toth2002vehicle} \par
\textbf{Expression 5:} \citet{golden2008vehicle} \par
\textbf{Expression 6:} \citet*{golden2008vehicle} \par
\textbf{Expression 7:} \citeauthor{toth2002vehicle} \par
\textbf{Expression 8:} \citeyear{toth2002vehicle} \par
\textbf{Expression 9:} \cite{toth2002vehicle,golden2008vehicle} \par\cite{sbihi2007relationship},\cite{sbihi2010combinatorial},\cite{sbihi2007relationship} presented some research gaps that link the VRP with Green Logistics issues, such as employing the Time-dependent VRP as an approach to deal with the minimization of emissions during traveling.Green Logistics deals with the activities of measuring the environmental effects of different distribution strategies, reducing the energy consumption, recycling refuse and managing waste disposal \citep*{sbihi2007relationship}\cite{sbihi2007combinatorial,sbihi2007relationship,sbihi2010combinatorial} presented some research gaps that link the VRP with Green Logistics issues, such as employing the Time-dependent VRP as an approach to deal with the minimization of emissions during traveling.\bibliography{references}\footnotesize
\end{document}

参考资料:

natbib – BibTeX: same author, different years – TeX – LaTeX Stack ExchangeLatex语法学习04:参考文献的引用-风君子博客https://tex.stackexchange.com/questions/204352/bibtex-same-author-different-years

LaTeX格式模板四-参考文献的引用_上官云霆的博客-CSDN博客_latex参考文献模板对于参考文献的引用,有两种方式:第一种不用JabRef之类的文献管理工具的文献引用方式;第二种是使用JabRef之类的文献管理工具的文献引用方式。现在我使用第二种引用方式。(JabRef是一种文献管理工具,使用挺简单方便的)不管是使用哪一种方式,都要在论文正文中引用论文出加语句\cite{索引名},正文中的索引名要和论文最后的参考文献相对应,否则论文编号不会正常显示。同时注意论文的索引名不用刻Latex语法学习04:参考文献的引用-风君子博客https://blog.csdn.net/sdtvyyb_007/article/details/50708775

Choosing a BibTeX Style – CIS Help Desk – Reed CollegeLatex语法学习04:参考文献的引用-风君子博客https://www.reed.edu/cis/help/LaTeX/bibtexstyles.htmlHow to Reference in Latex – 7 Steps to Bibliography with BibTeXLatex语法学习04:参考文献的引用-风君子博客https://www.scijournal.org/articles/reference-in-latex

Natbib citation styles – Overleaf, Online LaTeX EditorAn online LaTeX editor that’s easy to use. No installation, real-time collaboration, version control, hundreds of LaTeX templates, and more.Latex语法学习04:参考文献的引用-风君子博客https://www.overleaf.com/learn/latex/Natbib_citation_styles