私はラテックスで文書を書いていて、大きな .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 ファイルから章のテキストを入力すると、前述のエラーが発生して機能citep
しcitet
ませんが、プレーンcite
は正常に機能します。
前に言及するのを忘れていましたが、私は単純な番号付き参考文献スタイルを使用していて、すべてが機能していたので、入力 .tex ファイルにエラーはありません。