citet 和 citep 的行为类似于 cite

citet 和 citep 的行为类似于 cite

我是 LaTeX 新手,所以请耐心等待。如果我使用的编辑器是 TeXMaker,则已安装 TeXLive。为什么\citep\citet没有将引文显示为“Goossens et al. (1993)”或“(Goossens et al., 1993)”,而只是显示为括号中的简单数字[1](与 完全相同\cite)?

\documentclass[11pt]{article}


% old citation style (used by \cite)
%\usepackage{cite}

% package used by \citep and \citet
\usepackage[sort&compress,square,comma,authoryear]{natbib}

% makes color citations
\usepackage[dvips,dvipdfm,colorlinks=true,urlcolor=blue,citecolor=red,linkcolor=red,bookmarks=true]{hyperref}

% document begin
\begin{document}

% author and title
\title{My Article}
\author{Author Name}
\date{Today}
\maketitle

Blablabla said by \cite{lamport94} cite example. Blablabla said by \cite[p.~215]{impj} cite example. Blablabla said by \cite{fo,norman,lamport94} multiple cite example. Blablabla said by \nocite{lamport94} nocite example.
Blablabla said by \citep{lamport94} citep example. Blablabla said by \citet*{impj} citet example. Blablabla said by \citet{impj} citet example.

% this must be set to use natbib (citep, citet)
\bibliographystyle{plainnat}

% number 99 determines how much citation can be included in file (maximum 99)
\begin{thebibliography}{99}

\bibitem{lamport94}
  Leslie Lamport,
  \emph{\LaTeX: A Document Preparation System}.
  Addison Wesley, Massachusetts,
  2nd Edition,
  1994.

   \bibitem{notes} John W. Dower {\em Readings compiled for History
  21.479.}  1991.

  \bibitem{impj}  The Japan Reader {\em Imperial Japan 1800-1945} 1973:
  Random House, N.Y.

  \bibitem{norman} E. H. Norman {\em Japan's emergence as a modern
  state} 1940: International Secretariat, Institute of Pacific
  Relations.

  \bibitem{fo} Bob Tadashi Wakabayashi {\em Anti-Foreignism and Western
  Learning in Early-Modern Japan} 1986: Harvard University Press.

\end{thebibliography}



\end{document}
% http://en.wikibooks.org/wiki/LaTeX/Bibliography_Management

答案1

作者年份引用样式需要使用 BibTeX 或特殊格式的\bibitem命令。

如果您不想使用 BibTeX,那么您必须手动格式化您的thebibliography环境,如下例所示。

\documentclass[11pt]{article}


\usepackage[sort&compress,square,comma,authoryear]{natbib}

% makes color citations
\usepackage[colorlinks=true,urlcolor=blue,citecolor=red,linkcolor=red,bookmarks=true]{hyperref}

% document begin
\begin{document}

% author and title
\title{My Article}
\author{Author Name}
\date{Today}
\maketitle

Blablabla said by \cite{lamport94} cite example. Blablabla said by \cite[p.~215]{impj} cite example. Blablabla said by \cite{fo,norman,lamport94} multiple cite example. Blablabla said by \nocite{lamport94} nocite example.
Blablabla said by \citep{lamport94} citep example. Blablabla said by \citet*{impj} citet example. Blablabla said by \citet{impj} citet example.

% this must be set to use natbib (citep, citet) but requires BibTeX
\bibliographystyle{plainnat}

% number 99 determines how much citation can be included in file (maximum 99)
\begin{thebibliography}{99}

\bibitem[Lamport(1994)]{lamport94}
  Leslie Lamport,
  \emph{\LaTeX: A Document Preparation System}.
  Addison Wesley, Massachusetts,
  2nd Edition,
  1994.

\bibitem[Dower(1991)]{notes} John W. Dower {\em Readings compiled for History
  21.479.}  1991.

\bibitem[Japan Reader(1973)]{impj}  The Japan Reader {\em Imperial Japan 1800-1945} 1973:
  Random House, N.Y.

\bibitem[Norman(1940)]{norman} E. H. Norman {\em Japan's emergence as a modern
  state} 1940: International Secretariat, Institute of Pacific
  Relations.

\bibitem[Wakabayashi(1986]{fo} Bob Tadashi Wakabayashi {\em Anti-Foreignism and Western
  Learning in Early-Modern Japan} 1986: Harvard University Press.

\end{thebibliography}



\end{document}

在此处输入图片描述

切勿将明确的驱动程序名称传递给hyperref


如果你想要一个像“作者 [number]”这样的“混合”系统,那么你可以说

\usepackage[sort&compress,square,comma,numbers]{natbib}

\DeclareRobustCommand{\citeext}[1]{\citeauthor{#1}~\cite{#1}}

然后\citeext{lamport}会给你

兰波特 [1]

答案2

\usepackage[sort&compress,square,comma,numbers]{natbib}只需用 round更改命令即可\usepackage[sort&compress,round,comma,numbers]{natbib}

在这里找到更多选择https://en.wikibooks.org/wiki/LaTeX/More_Bibliographies

相关内容