当使用 \cite 排版 Latex 时括号出现问题,删除后 bibtex 出现问题 - 未定义!

当使用 \cite 排版 Latex 时括号出现问题,删除后 bibtex 出现问题 - 未定义!

我有 oceanbib.bib:

%% This BibTeX bibliography file was created using BibDesk.
%% http://bibdesk.sourceforge.net/
%% Saved with string encoding Unicode (UTF-8) 
@article{essd-7-47-2015,
    Author = {Le Qu\'er\'e, C. and Moriarty, R. and Andrew, R. M. and Peters, G. P. and Ciais, P. and Friedlingstein, P. and Jones, S. D. and Sitch, S. and Tans, P. and Arneth, A. and Boden, T. A. and Bopp, L. and Bozec, Y. and Canadell, J. G. and Chini, L. P. and Chevallier, F. and Cosca, C. E. and Harris, I. and Hoppema, M. and Houghton, R. A. and House, J. I. and Jain, A. K. and Johannessen, T. and Kato, E. and Keeling, R. F. and Kitidis, V. and Klein Goldewijk, K. and Koven, C. and Landa, C. S. and Landsch\"utzer, P. and Lenton, A. and Lima, I. D. and Marland, G. and Mathis, J. T. and Metzl, N. and Nojiri, Y. and Olsen, A. and Ono, T. and Peng, S. and Peters, W. and Pfeil, B. and Poulter, B. and Raupach, M. R. and Regnier, P. and R\"odenbeck, C. and Saito, S. and Salisbury, J. E. and Schuster, U. and Schwinger, J. and S\'ef\'erian, R. and Segschneider, J. and Steinhoff, T. and Stocker, B. D. and Sutton, A. J. and Takahashi, T. and Tilbrook, B. and van der Werf, G. R. and Viovy, N. and Wang, Y.-P. and Wanninkhof, R. and Wiltshire, A. and Zeng, N.},
    Date-Added = {2016-01-11 15:29:55 +0000},
    Date-Modified = {2016-01-11 15:29:55 +0000},
    Doi = {10.5194/essd-7-47-2015},
    Journal = {Earth System Science Data},
    Number = {1},
    Pages = {47--85},
    Title = {Global carbon budget 2014},
    Url = {http://www.earth-syst-sci-data.net/7/47/2015/},
    Volume = {7},
    Year = {2015},
    Bdsk-Url-1 = {http://www.earth-syst-sci-data.net/7/47/2015/},
    Bdsk-Url-2 = {http://dx.doi.org/10.5194/essd-7-47-2015}}

与我的 latex 文件位于同一目录中:

\documentclass[os, article]{copernicus}

\usepackage{cite}

\begin{document}

\title{text}



\Author[1]{my}{name}


\affil[1]{University}


\runningtitle{title}

\runningauthor{my name}

\correspondence{my email)}



\received{}
\pubdiscuss{} %% only important for two-stage journals
\revised{}
\accepted{}
\published{}




\firstpage{1}

\maketitle



\begin{abstract}
I will fill in the abstract text later on..
\end{abstract}



\introduction  %% \introduction[modified heading if necessary]

\upshape{ text \cite{essd-7-47-2015}}


%% REFERENCES

%% The reference list is compiled as follows:


% I don't know what to do with this!!

%\begin{thebibliography}{}
%
%\bibitem[AUTHOR(YEAR)]{LABEL}
%REFERENCE 1
%
%\bibitem[AUTHOR(YEAR)]{LABEL}
%REFERENCE 2
%
%
%\end{thebibliography}


%% authors experienced with BibTeX only have to include the following two lines:
%%
 \bibliographystyle{copernicus}
 \bibliography{oceanbib} % my bib file in same directory



%% LITERATURE CITATIONS
%%
%% command                        & example result
%% \citet{jones90}|               & Jones et al. (1990)
%% \citep{jones90}|               & (Jones et al., 1990)
%% \citep{jones90,jones93}|       & (Jones et al., 1990, 1993)
%% \citep[p.~32]{jones90}|        & (Jones et al., 1990, p.~32)
%% \citep[e.g.,][]{jones90}|      & (e.g., Jones et al., 1990)
%% \citep[e.g.,][p.~32]{jones90}| & (e.g., Jones et al., 1990, p.~32)
%% \citeauthor{jones90}|          & Jones et al.
%% \citeyear{jones90}|            & 1990




\end{document}

为什么我会收到如下错误:

软件包 natbib 警告:第 n 页上的引用“essd-7-47-2015”未定义输入

在 \cite 行上运行 latex typoset 时

运行 bibtex 排版时:

在 .aux 文件中未找到 \citation、\bbdata 和 \bibstyle 命令

谁能帮我!?!

提前欢呼!

答案1

copernicus我将您的文件保存在具有类的目录中,michael.tex并且还有oceanbib.bib。我做了一些更改:

  • 删除了不存在的article选项
  • 固定\Author[1]{my}{name}\author[1]{my name}
  • 删除了\usepackage{cite}natbib(由类加载)不兼容的内容
  • \conclusions根据模板要求添加了一个部分。
\documentclass[os]{copernicus}

\begin{document}

\title{text}
\author[1]{my name}
\affil[1]{University}

\runningtitle{title}
\runningauthor{my name}
\correspondence{my email)}
\received{}
\pubdiscuss{} %% only important for two-stage journals
\revised{}
\accepted{}
\published{}

\firstpage{1}

\maketitle

\begin{abstract}
I will fill in the abstract text later on..
\end{abstract}

\introduction  %% \introduction[modified heading if necessary]

text \cite{essd-7-47-2015}

\conclusions

zzz

\bibliographystyle{copernicus}
\bibliography{oceanbib} % my bib file in same directory

\end{document}

然后我就这么做了

pdflatex michael
bibtex michael
pdflatex michael
pdflatex michael

此后,输出符合预期:

在此处输入图片描述

相关内容