Scissor LaTeX 中的 natbib
natbib 套件在 Scissor LaTeX 中大部分可用:\citet、\citep、\citeyear 及其首字母大寫的形式都能用,\bibliographystyle{plainnat} 或 unsrtnat 會產生作者-年份引用;numbers 或 round 等套件選項和 \setcitestyle 會被忽略,所以格式一律由 \bibliographystyle 決定。
套件的用途
natbib 為 BibTeX 加上作者-年份引用。它的兩個主要指令是:用於句子中的 \citet{key},例如「Doe and Mustermann (2024)」;以及放在括號中的 \citep{key},例如「(Doe and Mustermann, 2024)」。套件選項可以切換圓括號、方括號或數字,而 plainnat 等作者-年份格式則負責排版參考文獻清單。
用 \usepackage{natbib} 載入它,並用 \bibliographystyle{plainnat} 選擇格式。
在這裡可用的功能
| 指令或選項 | 在 Scissor LaTeX 中 | 備註 |
|---|---|---|
\citet{key}, \Citet{key} | 可用 | 「Doe and Mustermann (2024)」。 |
\citep{key}, \Citep{key} | 可用 | 「(Doe and Mustermann, 2024)」。 |
\citep{a,b} | 可用 | 「(Doe and Mustermann, 2024; Mustermann, 2021)」。 |
\citep[p.~44]{key} | 可用 | 附註放在括號內。 |
\citep[see][p.~44]{key} | 部分支援 | 「see」會印在括號前面。 |
\citeyear{key} | 可用 | 「2024」。 |
\citeyearpar{key} | 部分支援 | 印出「2024」,沒有括號。 |
\citeauthor{key} | 部分支援 | 印出和 \citet 相同的內容,包含年份。 |
\citet*, \citep* | 部分支援 | 和 \citet、\citep 相同;作者清單不會展開。 |
\citealt, \citealp, \citenum | 部分支援 | 和 \citep 一樣印出,有括號。 |
\bibliographystyle{plainnat}, abbrvnat | 可用 | 作者-年份,清單依作者排序。 |
\bibliographystyle{unsrtnat} | 可用 | 作者-年份,清單依引用順序排列。 |
選項 numbers、round、square、authoryear、sort&compress | 忽略 | 格式只由 \bibliographystyle 決定。 |
\setcitestyle{...} | 忽略 | 直接忽略,沒有訊息。 |
\bibpunct{...}... | 不支援 | 在導言區中會被忽略;在內文中會被略過並顯示訊息,它的參數會以文字印出。 |
沒有 \bibliographystyle 這一行時,即使載入了 natbib,引用也會以方括號中的數字編號。加上 \bibliographystyle{plainnat} 就能得到作者-年份引用。
範例
搭配 plainnat 的常用 natbib 指令:
搭配 plainnat 的 \citet、\citep 和 \citeyear
\citet{doe2024} measured 44 samples. Long tables have their own
rules \citep[ch.~2]{mustermann2021}, and so do plots
\citep{mustermann2023}. The book appeared in \citeyear{mustermann2021}.
\bibliographystyle{plainnat}
\bibliography{refs}unsrtnat 會依你引用的順序列出文獻,而不是依作者排序:
unsrtnat:參考文獻依引用順序排列
Plots are discussed by \citet{mustermann2023}, and the careful
measurement behind them by \citet{doe2024}.
\bibliographystyle{unsrtnat}
\bibliography{refs}套件選項 numbers 沒有效果。引用格式只依 \bibliographystyle 而定,所以使用 plainnat 時,仍然會得到作者-年份引用:
numbers 選項會被忽略
\documentclass{article}
\usepackage[numbers]{natbib}
\begin{document}
Measured by \citet{doe2024}, see also \citep{doe2025}.
\bibliographystyle{plainnat}
\bibliography{refs}
\end{document}如果要使用數字引用,請選擇 plain、unsrt 或 ieeetr 等數字格式(這三種在這裡都會產生方括號中的數字)。格式清單請見參考文獻頁面。
相容性
- 從 TeX 安裝環境搬到這裡:使用
\citet和\citep的文件可以照原樣排版。只有當\bibliographystyle指定作者-年份格式時,才會得到作者-年份引用;套件選項和\setcitestyle不會改變任何東西。 - 從這裡搬到 TeX 安裝環境:文件在那裡不需修改就能編譯。請在那裡執行 BibTeX,並留意 natbib 的選項屆時會生效。
完整手冊在 CTAN 上:ctan.org/pkg/natbib。關於引用的一般說明,請見參考文獻與引用;另一種做法請見 biblatex。
常見問題
為什麼我得到的是數字,而不是作者-年份引用?
沒有 \bibliographystyle 這一行,或者它指定的是數字格式。請加上 \bibliographystyle{plainnat}。在這裡,單靠 natbib 的 authoryear 和 round 選項不會改變格式。
\citet 和 \citep 有什麼不同?
\citet 產生「Doe and Mustermann (2024)」,用在句子中;\citep 產生「(Doe and Mustermann, 2024)」,用在子句結尾的引用。
使用 natbib 需要執行 BibTeX 嗎?
不需要。Scissor LaTeX 每次排版時都會讀取專案中的 .bib 檔案。
本頁的每個範例都在建置網站時由 Scissor LaTeX 排版。 最後更新:2026-11-07