跳轉到內容

LaTeX/手動管理參考文獻

來自華夏公益教科書,開放書籍,造福世界

返回主參考文獻頁面

參考文獻列表只不過是一個列表,一個帶有錨點或鍵的列表,用於正確引用不同的列表項。列表環境稱為 thebibliography,它接受一個必填引數。列表中的每個專案都以 \bibitem{bibkey} 開頭。

引用參考文獻中的條目與標籤和引用機制類似。標籤是賦予 bibitem 的鍵,引用透過 \cite 完成。

\documentclass{article}
\usepackage{url}
\begin{document}
I doubt that there is any useful information here~\cite{wikibook}.

All we know is limited, apart from knowing the answer we all know. Or do we? Wombat and Koala have discovered some interesting things~\cite{wombat2016}.

Some people are too nosy. What can happen to them is described by Laura Lion~\cite[p.~9]{lion2010}.

\begin{thebibliography}{1}
	\bibitem{wombat2016}
		Walther Wombat and Klaus Koala,
		``The true meaning of 42'' in: Journal of modern skepticism;
		2016
	\bibitem{lion2010}
		Laura Lion, Gabrielle Giraffe and Carl Capybara,
		``The dangers of asking the wrong question'', publishing house;
		2010
	\bibitem{wikibook}
		manually managing references, 
		\url{https://wikibook.tw/wiki/LaTeX/Manually_Managing_References}
		2016
\end{thebibliography}
\end{document}

cite 返回列表中列表項的編號,並用方括號括起來。可以提供一個可選引數在方括號內新增一些文字。

正如人們所見,沒有排序。排序留給文件作者。

在您的參考文獻中,樣式和標點符號必須一致。如果您難以記住將標題放在引號中,請定義一個輔助命令並使用它。上圖中還有另一個不一致之處。你能找到它嗎?

\documentclass{article}
\usepackage{url}
\newcommand{\bibTitle}[1]{``#1''}
\begin{document}
I doubt that there is any useful information here~\cite{wikibook}.

All we know is limited, apart from knowing the answer we all know. Or do we? Wombat and Koala have discovered some interesting things~\cite{wombat2016}.

Some people are too nosy. What can happen to them is described by Laura Lion~\cite[p.~9]{lion2010}.

\begin{thebibliography}{1}
	\bibitem{wikibook}
		\bibTitle{Manually Managing References}, 
		\url{https://wikibook.tw/wiki/LaTeX/Manually_Managing_References};
		2016
	\bibitem{wombat2016}
		Walther Wombat and Klaus Koala,
		\bibTitle{The true meaning of 42} in: Journal of modern skepticism;
		2016
	\bibitem{lion2010}
		Laura Lion, Gabrielle Giraffe and Carl Capybara,
		\bibTitle{The dangers of asking the wrong question}, publishing house;
		2010
\end{thebibliography}
\end{document}

您可能會問自己環境的必填引數在做什麼。您可以為列表中的任何條目定義自己的標籤。在引數中使用您最長的條目。使用該可選引數,您可以建立作者年份樣式。

\documentclass{article}
\usepackage{url}
\newcommand{\bibTitle}[1]{``#1''}
\begin{document}
I doubt that there is any useful information here~\cite{wikibook}.

All we know is limited, apart from knowing the answer we all know. Or do we? Wombat and Koala have discovered some interesting things~\cite{wombat2016}.

Some people are too nosy. What can happen to them is described by Laura Lion~\cite[p.~9]{lion2010}.

\begin{thebibliography}{Wombat, 2016}
	\bibitem[Wikibook]{wikibook}
		\bibTitle{Manually Managing References}, 
		\url{https://wikibook.tw/wiki/LaTeX/Manually_Managing_References};
		2016
	\bibitem[Wombat, 2016]{wombat2016}
		Walther Wombat and Klaus Koala,
		\bibTitle{The true meaning of 42} in: Journal of modern skepticism;
		2016
	\bibitem{lion2010}
		Laura Lion, Gabrielle Giraffe and Carl Capybara,
		\bibTitle{The dangers of asking the wrong question}, publishing house;
		2010
\end{thebibliography}
\end{document}


使用 natbib 包來設定引用樣式

[編輯 | 編輯原始碼]

您可以載入 natbib 包來幫助您進行文字引用。thebibliography 環境需要更嚴格的格式。

\documentclass{article}
\usepackage[numbers,round]{natbib}
\usepackage{url}
\newcommand{\bibTitle}[1]{``#1''}
\begin{document}
I doubt that there is any useful information here~\citep{wikibook}.

All we know is limited, apart from knowing the answer we all
know. Or do we? Some very interesting things have been found by~\citet{wombat2016}.

Some people are too nosy. What can happen to them is described by
\citeauthor{lion2010}~\cite[compare][p.~9]{lion2010}.

\begin{thebibliography}{1}
	\bibitem[Wikibooks(2017)]{wikibook}
		\bibTitle{Manually Managing References}, 
		\url{https://wikibook.tw/wiki/LaTeX/Manually_Managing_References};
		2016
	\bibitem[Wombat and Koala(2017)]{wombat2016}
		Walther Wombat and Klaus Koala,
		\bibTitle{The true meaning of 42} in: Journal of modern skepticism;
		2016
	\bibitem[Lion et al.(2010)Laura Lion, Gabrielle Giraffe and Carl Capybara]{lion2010}
		Laura Lion, Gabrielle Giraffe and Carl Capybara,
		\bibTitle{The dangers of asking the wrong question}, publishing house;
		2010
\end{thebibliography}
\end{document}

bibitem 的可選引數包含開頭的簡短作者列表,括號內的年份和結尾的長作者列表。請注意,括號周圍沒有空格,它們將出版年份與結尾的短(開頭)和長列表分隔開。

natbib 引入了新的命令來引用和設定這些引用的樣式,軟體包手冊將為您提供更多詳細資訊。

跟蹤所有細節並檢查一致性將花費大量時間。



每章或每節的參考文獻

[編輯 | 編輯原始碼]

chapterbib 包可用於在文件中製作分開的參考文獻。重要的是內容也要分開,這意味著每個擁有自己參考文獻的章節都需要在單獨的檔案中。在主文件中,使用 \include 將所有內容放在一起。以下示例在執行時建立這些額外檔案。這種方法非常適合示例,但 filecontents 不應用於實際專案。

\begin{filecontents}{aster.tex}
\chapter{Aster}
I doubt that there is any useful information here~\citep{wikibook}.

All we know is limited, apart from knowing the answer we all
know. Or do we? Some very interesting things have been found by~\citet{wombat2016}.

\begin{thebibliography}{1}
	\bibitem[Wikibooks(2017)]{wikibook}
		\bibTitle{Manually Managing References}, 
		\url{https://wikibook.tw/wiki/LaTeX/Manually_Managing_References};
		2016
	\bibitem[Wombat and Koala(2017)]{wombat2016}
		Walther Wombat and Klaus Koala,
		\bibTitle{The true meaning of 42} in: Journal of modern skepticism;
		2016
\end{thebibliography}
\end{filecontents}
\begin{filecontents}{begonia.tex}
\chapter{Begonia}
All we know is limited, apart from knowing the answer we all
know. Or do we? Some very interesting things have been found by~\citet{wombat2016}.

Some people are too nosy. What can happen to them is described by Laura Lion~\cite[9]{lion2010}.

\begin{thebibliography}{1}
	\bibitem[Wombat and Koala(2017)]{wombat2016}
		Walther Wombat and Klaus Koala,
		\bibTitle{The true meaning of 42} in: Journal of modern skepticism;
		2016
	\bibitem[Lion et al.(2010)Laura Lion, Gabrielle Giraffe and Carl Capybara]{lion2010}
		Laura Lion, Gabrielle Giraffe and Carl Capybara,
		\bibTitle{The dangers of asking the wrong question}, publishing house;
		2010
\end{thebibliography}
\end{filecontents}
\documentclass{report}
\usepackage{url}
\usepackage[numbers]{natbib}
\usepackage[sectionbib]{chapterbib}
\usepackage{mwepage}
\newcommand{\bibTitle}[1]{``#1''}
\begin{document}
\include{aster}
\include{begonia}
\end{document}|


華夏公益教科書