10

私はラテックスで文書を書いていて、大きな .bib ファイルと多数の引用があります。[Author, year] 形式の引用が必要で、パッケージnatbibを使用していますが、 citepまたはcitetが機能しませんが、プレーン cite は正常に機能しています。私が得るエラーは次のとおりです。

! Undefined control sequence.
l.3 lets cite \citet{cayton05}

私はUbuntu texliveパッケージを使用しており\input{<file>}、latexコマンドを使用して章をメインの.texファイルに入力しています。

驚くべきことは\input{<file>}、メインの .tex ファイルにテキストがある場合に使用する代わりに、すべての cite コマンドが機能していることです。

どんな助けでも大歓迎です。

作業バージョンは次のようになります。

\usepackage{cite} 
\usepackage[square,sort]{natbib}
%% lot of other packages and formatting %%

\begin{document}

\chapter{Testing citations}

\begin{enumerate}
  \item this is the first citation \cite{belkin02}.
  \item this is the second citation \citep{belkin02}.
  \item this is the third citation \cite{shlens03}.
\end{enumerate}



\phantomsection\addcontentsline{toc}{chapter}{Bibliography}
\begin{spacing}{1.5}
\nocite{*}
\bibliographystyle{apalike}
\bibliography{testnb.bib}
\end{spacing}

\end{document}

実際の .tex ファイルでは、別の .tex ファイルから章のテキストを入力すると、前述のエラーが発生して機能citepcitetませんが、プレーンciteは正常に機能します。

前に言及するのを忘れていましたが、私は単純な番号付き参考文献スタイルを使用していて、すべてが機能していたので、入力 .tex ファイルにエラーはありません。

4

2 に答える 2

19

\citepとが機能しない場合\citetは、 がロードされていない可能性がありますnatbib

私が現在取り組んでいるドキュメントから:

 \usepackage[authoryear,round,longnamesfirst]{natbib}

別のオプションが必要な場合があります。詳細については、 natbib の便利なリファレンス シートを参照してください。

于 2010-12-09T01:45:25.617 に答える
5

のみを含める必要があります\usepackage[square,sort]{natbib}

を削除すると動作し\usepackage{cite}ます。

于 2012-10-01T18:09:52.313 に答える