我想添加如下引文:
[_Text_ Citation_01, pages]
例如:
[See: 155, pp.89--99]
我怎样才能做到这一点使用标准 \cite{}
命令(没有natbib
或其他任何东西)?
PS:该文本可能是西里尔文!
答案1
建议使用natbib
或更好的选择biblatex
。让我们看看natbib
:
\begin{filecontents*}{\jobname.bib}
@book{01,
author={Caesar, Gaius Iulius},
title={Commentarii de bello {Gallico}},
year={703},
}
\end{filecontents*}
\documentclass{article}
\usepackage[numbers,square]{natbib}
\begin{document}
Here's a citation \cite[See:][p.~2]{01}
Another: \cite[p.~3]{01}.
Another: \cite{01}.
\bibliographystyle{plainnat}
\bibliography{\jobname}
\end{document}
该\cite
命令现在有两个可选参数。当只有一个时,它是“后引文”;如果有两个,第一个是“前引文”,第二个是后引文。
无需额外的软件包你仍然可以模拟这种行为:
\begin{filecontents*}{\jobname.bib}
@book{01,
author={Caesar, Gaius Iulius},
title={Commentarii de bello {Gallico}},
year={703},
}
\end{filecontents*}
\documentclass{article}
\makeatletter
\let\cite\relax
\DeclareRobustCommand{\cite}{%
\let\new@cite@pre\@gobble
\@ifnextchar[\new@cite{\@citex[]}}
\def\new@cite[#1]{\@ifnextchar[{\new@citea{#1}}{\@citex[#1]}}
\def\new@citea#1{\def\new@cite@pre{#1}\@citex}
\def\@cite#1#2{[{\new@cite@pre\space#1\if\relax\detokenize{#2}\relax\else, #2\fi}]}
\makeatother
\begin{document}
Here's a citation \cite[See:][p.~2]{01}
Another: \cite[p.~3]{01}.
Another: \cite{01}.
Again: \cite[See:][]{01}
\bibliographystyle{plain}
\bibliography{\jobname}
\end{document}
如果你只想要“预引”,请使用
\cite[See:][]{01}
带有空的第二个可选参数。
答案2
你对新命令有何看法\Cite
\newcommand{\Cite}[2]{[See~\cite{#1},~#2]}
答案3
我有时需要使用,amsrefs
并且一直在寻找类似于natbib
内置的东西\cite[pre][post]{label}
。由于我在网上或软件包文档中没有看到它(截至 2018 年),所以我在这里发布了解决方案。
事实证明,您只需在命令中写入前引用和/或后引用文本\citelist
,即\citelist{cf. \cite{morgan-tian}}
打印出来:[参见 MT]。
\documentclass{article}
\usepackage[shortalphabetic]{amsrefs}
\begin{document}
Theorem 1 follows from
Lemma 2 \cite{morgan-tian}*{1.1} and
Proposition 3 \citelist{cf. \cite{morgan-tian}*{1.2}}.
\begin{bibdiv}
\begin{biblist}
\bib{morgan-tian}{book}{
author={Morgan, John},
author={Tian, Gang},
title={Ricci flow and the Poincar\'e conjecture},
series={Clay Mathematics Monographs},
volume={3},
publisher={American Mathematical Society},
place={Providence, RI},
date={2007},
}
\end{biblist}
\end{bibdiv}
\end{document}
答案4
虽然已经有一段时间了,但我想提出一个我曾经用过的解决方案\cite
。在我们的文档中,我们应该将参考文档引用为 [RD-n],并将适用文档引用为 [AD-n]。因此,以下是我的解决方案:
\DeclareFieldFormat{labelnumber}{\ifkeyword{RD}{RD-#1}{AD-#1}}
我的 RD 示例 .bib 文件:
@article{einstein,
author = "Albert Einstein",
title = "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
[{On} the electrodynamics of moving bodies]",
journal = "Annalen der Physik",
volume = "322",
number = "10",
pages = "891--921",
year = "1905",
DOI = "http://dx.doi.org/10.1002/andp.19053221004",
keywords = "RD"
}
@book{dirac,
title={The Principles of Quantum Mechanics},
author={Paul Adrien Maurice Dirac},
isbn={9780198520115},
series={International series of monographs on physics},
year={1981},
publisher={Clarendon Press},
keywords = {RD}
}
@online{knuthwebsite,
author = "Donald Knuth",
title = "Knuth: Computers and Typesetting",
url = "http://www-cs-faculty.stanford.edu/~uno/abcde.html",
keywords = "RD"
}
@inbook{knuth-fa,
author = "Donald E. Knuth",
title = "Fundamental Algorithms",
publisher = "Addison-Wesley",
year = "1973",
chapter = "1.2",
keywords = "RD"
}
上述解决方案帮助我识别 .bib 中的关键字是否声明为“RD”,然后\cite{dirac}
或\cite{<your_cite>}
命令打印出 [RD-1] 或 [RD-n]。
对 AD 的处理与对 RD 的处理相同。
AD 的示例 .bib:
@book{onur,
title={The Principles of Quantum Mechanics},
author={Paul Adrien Maurice Dirac},
isbn={9780198520115},
series={International series of monographs on physics},
year={1981},
publisher={Clarendon Press},
keywords = {AD}
}
@book{sergio,
title={The Principles of Quantum Mechanics},
author={Paul Adrien Maurice Dirac},
isbn={9780198520115},
series={International series of monographs on physics},
year={1981},
publisher={Clarendon Press},
keywords = {AD}
}
@book{ivan,
title={The Principles of Quantum Mechanics},
author={Paul Adrien Maurice Dirac},
isbn={9780198520115},
series={International series of monographs on physics},
year={1981},
publisher={Clarendon Press},
keywords = {AD}
}
与 RD 相同,我们只应键入\cite{<your_cite>}
。由于我们(公司)适用的文档不可引用,因此我们\nocite*{<AD document keyword>}
在文档的序言中使用。例如,就在\begin{document}
命令之后。
我希望这对任何人都有帮助!