
我正在努力將多個引用與單一頁碼結合。
我用過這張natbib
參考表,但我被困住了(如下所示)。我似乎無法同時組合多個引文和參考頁碼?
這就是我得到的和我想要的(下面的工作範例),
\documentclass[11pt,letter]{article}
\usepackage{hyperref}
\usepackage[round]{natbib}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{Veblen2005:1899,
author = {Veblen, Thorstein},
Isbn = {978-81-87879-29-9},
publisher = {Aakar Books},
title = {The Theory of the Leisure Class},
subtitle = {An Economic Study of Institutions},
Year = {[1899] 2005}}
@book{Weber2013,
Author = {Weber, Max},
Isbn = {9781135973988},
Language = {en},
Month = {jul},
Publisher = {Routledge},
Title = {The Protestant Ethic and the Spirit of Capitalism},
Year = {[1905] 2013}}
\end{filecontents*}
\begin{document}
% These citations will work but in the apalike bibstyle they will not be sorted
% in citation order (the first citation is [2]).
According to \citet[p. 19]{Weber2013, Veblen2005:1899}, this paragraph---and certainly this section---should be \ldots \\
\noindent I would like it show up like this,\\
According to Weber (2013, p. 213); Veblen (2005, p. 19), this paragraph---and certainly this section---should be \ldots \\
\noindent Also, why isn't the year in brackets show in the actual text (Weber ([1905] 2013, p. 213); Veblen ([1899] 2005, p. 19))?
\bibliography{\jobname}
\bibliographystyle{cell}
\end{document}
答案1
類似的引文命令\citet[]{}
有兩個部分:引文的強制標籤,以及用於「精確定位」引文中參考文獻的可選部分。
只要不使用可選部分,\citet{}
就可以單獨使用來引用多個作品:\citet{a,b,c}
。但顯然這不適用於可選參數,因為它與哪項工作相關是不明確的。一般來說,這種歧義可以透過假設它是對最後的引用的文章。
如果您想要精確引用多個來源,您有(據我所知)三個選擇:
切換到 biblatex,它有專門用於此目的的特殊引用命令,這些命令在使用 biblatex 進行頁面多處引用。做出這種轉變有很多充分的理由,但這不能說是最重要的理由之一。 (可能值得注意的是,對於 APA 風格的引用,biblatex 有一個特別仔細編寫、穩定且積極維護的套件:Biblatex-apa.)
只需按照您在範例中所做的操作即可:
\cites[1]{a}[2]{b}
將其放入您自己中,而不是軟體在引文之間插入「分隔符號」(這是 biblatex 提供的)\cite[1]{a}; \cite[2]{b}
。除非您有很多這些並且希望經常更改“分隔符號”,否則這很好。 (如果您確實認為您可能想要更改“分隔符號”,您可以隨時為它定義一個宏,可以重新定義該宏以確保一致性。對於大多數情況,這有點過頭了。)如果你非常熱心,可以寫一些模擬 biblatex
\cites
指令的東西。正如他們所說,這是留給讀者的練習,儘管我確信 biblatex 代碼會給您一些想法。
答案2
對於任何其他嘗試嘗試類似但不需要複雜引用風格的讀者,這裡是\cites
natbib 的簡單重新實作:
\makeatletter
\newcommand{\citecomment}[2][]{\citenum{#2}#1\citevar}
\newcommand{\citeone}[1]{\citecomment{#1}}
\newcommand{\citetwo}[2][]{\citecomment[,~#1]{#2}}
\newcommand{\citevar}{\@ifnextchar\bgroup{;~\citeone}{\@ifnextchar[{;~\citetwo}{]}}}
\newcommand{\citefirst}{\@ifnextchar\bgroup{\citeone}{\@ifnextchar[{\citetwo}{]}}}
\newcommand{\cites}{[\citefirst}
\makeatother
用法:
According to \cites[p. 213]{Weber2013}[p. 19]{Veblen2005:1899}, this paragraph---and certainly this section---should be \ldots \\
結果:
它取自這個 TeX.SE 答案作者:Jean Olivier,我只是透過替換\citen
為 來調整它\citenum
。
就當前具體問題而言,它具有以下限制:
- 僅數位引用:不支援帶有作者/日期的複雜使用樣式。
- 沒有排序:引用將按照 LaTeX 中提到的順序出現,而不是按照參考書目中的順序。