
引用をインポートしようとしましたが、次のエラーが発生します。著者?の代わりにauthor-year
。
document1.snw
:
\documentclass[a4paper]{article}
\usepackage{graphicx}
\usepackage{float}
\usepackage{mathtools}
\usepackage{eso-pic}
\usepackage{array}
\usepackage{shortvrb}
\usepackage{tikz}
\usepackage{tabularx}
\usepackage{listings}
\usepackage{amsmath}
\usepackage{fancyhdr}
\usepackage{titlesec}
\usepackage{natbib}
\begin{document}
the possible future events \citet{Test12}.
\bibliographystyle{plainnat}
\bibliography{References_trial}
\end{document}
References_trial.bib
:
@article{Test12,
author = {{John Smith}},
title = {Test Article},
year = {2012},
journal = {The Test Journal}
}
答え1
いくつかのコメントと観察:
\citet
を使用して「テキスト スタイル」の authoryear タイプの引用コールアウトを生成する場合は、必ずnatbib
オプションauthoryear
とを使用して引用パッケージをロードしてくださいround
。何をするにしても、 または に変更し
author = {{John Smith}},
ます。author = {John Smith},
author = {Smith, John},
\cite
関連の相互依存関係を解決するには、必ず完全なコンパイル サイクル (LaTeX、BibTeX、LaTeX をさらに 2 回) を実行してください。
\documentclass[a4paper]{article}
\begin{filecontents}[overwrite]{References_trial.bib}
@article{Test25,
author = {John Smith},
title = {Test Article},
journal= {The Test Journal},
year = {2525},
volume = {1},
number = {2},
pages = {3-4},
}
\end{filecontents}
\usepackage[authoryear,round]{natbib}
\bibliographystyle{plainnat}
\begin{document}
\noindent
\citet{Test25}
\bibliography{References_trial}
\end{document}