'\cite{}' 行为异常:它仅显示 [?]

'\cite{}' 行为异常:它仅显示 [?]

我决定提出一个新的简单问题我之前的问题因为我发现我的\cite{}命令行为是错误的。

我使用了来自的这个例子http://grad.iit.edu/latex/LaTeX/BiblioHelp2.pdf

\documentclass{report}

\begin{document}

time approaches infinity \cite{Pan}. 

\begin{thebibliography}{100} % 100 is a random guess of the total number of 
%references 

\bibitem{Boney96} Boney, L., Tewfik, A.H., and Hamdy, K.N., ``Digital 
Watermarks for Audio Signals," \emph{Proceedings of the Third IEEE 
International Conference on Multimedia}, pp. 473-480, June 1996. 

\bibitem{MG} Goossens, M., Mittelbach, F., Samarin, \emph{A LaTeX 
Companion}, Addison-Wesley, Reading, MA, 1994. 

\bibitem{HK} Kopka, H., Daly P.W., \emph{A Guide to LaTeX}, 
Addison-Wesley, Reading, MA, 1999. 

\bibitem{Pan} Pan, D., ``A Tutorial on MPEG/Audio Compression," \emph{IEEE 
Multimedia}, Vol.2, pp.60-74, Summer 1998. 

\end{thebibliography} 
\end{document}

我的结果:

在此处输入图片描述

在此处输入图片描述

你可以看到[?]代替[4]从示例中。有什么建议可以修复它吗?是的,我检查了版本。所有都是最新版本。

然而,我收到了 3 次警告:

Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
LaTeX Warning: Citation `Pan' on page 1 undefined on input line 54.
LaTeX Warning: There were undefined references.
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.

这是来自整个日志文件:

This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex   2014.10.30)  12 NOV 2014 09:32
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**test.tex
(./test.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 79 languages loaded.
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/report.cls
Document Class: report 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@chapter=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2014/04/25 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)

(/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/05/08 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)

(/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
)
(/usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/graphics.cfg
File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
)
Package graphics Info: Driver file: pdftex.def on input line 91.

(/usr/local/texlive/2014/texmf-dist/tex/latex/pdftex-def/pdftex.def
File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX

(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
)
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count88
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
(/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/color.sty
Package: color 2014/04/23 v1.1a Standard LaTeX Color (DPC)

(/usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/color.cfg
File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
)
Package color Info: Driver file: pdftex.def on input line 137.
)
(/usr/local/texlive/2014/texmf-dist/tex/latex/framed/framed.sty
Package: framed 2011/10/22 v 0.96: framed or shaded text with page breaks
\OuterFrameSep=\skip43
\fb@frw=\dimen105
\fb@frh=\dimen106
\FrameRule=\dimen107
\FrameSep=\dimen108
)
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/alltt.sty
Package: alltt 1997/06/16 v2.0g defines alltt environment
)
(/usr/local/texlive/2014/texmf-dist/tex/latex/upquote/upquote.sty
Package: upquote 2012/04/19 v1.3 upright-quote and grave-accent glyphs in verba
tim
)
No file test.aux.
\openout1 = `test.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 53.
LaTeX Font Info:    ... okay on input line 53.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 53.
LaTeX Font Info:    ... okay on input line 53.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 53.
LaTeX Font Info:    ... okay on input line 53.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 53.
LaTeX Font Info:    ... okay on input line 53.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 53.
LaTeX Font Info:    ... okay on input line 53.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 53.
LaTeX Font Info:    ... okay on input line 53.
(/usr/local/texlive/2014/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count89
\scratchdimen=\dimen109
\scratchbox=\box26
\nofMPsegments=\count90
\nofMParguments=\count91
\everyMPshowfont=\toks15
\MPscratchCnt=\count92
\MPscratchDim=\dimen110
\MPnumerator=\count93
\makeMPintoPDFobject=\count94
\everyMPtoPDFconversion=\toks16
) (/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO
)

(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
Package ifpdf Info: pdfTeX in PDF mode is detected.
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf

(/usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/grfext.sty
Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO)

(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO)
))
(/usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO)

(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO)

(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
Package etexcmds Info: Could not find \expanded.
(etexcmds)             That can mean that you are not using pdfTeX 1.50 or
(etexcmds)             that some package has redefined \expanded.
(etexcmds)             In the latter case, load this package earlier.
)))
Package grfext Info: Graphics extension search list:
(grfext)             [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext)             \AppendGraphicsExtensions on input line 452.

(/usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))

LaTeX Warning: Citation `Pan' on page 1 undefined on input line 55.

[1

{/usr/local/texlive/2014/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
[2

] (./test.aux)

LaTeX Warning: There were undefined references.


LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.

 ) 
Here is how much of TeX's memory you used:
 1623 strings out of 493109
 23450 string characters out of 6135003
 81506 words of memory out of 5000000
 5092 multiletter control sequences out of 15000+600000
 4900 words of font info for 18 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 38i,5n,23p,281b,147s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb
></usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb>
</usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></
usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb>
Output written on test.pdf (2 pages, 54797 bytes).
PDF statistics:
 27 PDF objects out of 1000 (max. 8388607)
 18 compressed objects within 1 object stream
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)

更新:另外,我不确定这是否是重要信息。我在 Mac 机器上的 Rstudio 中使用了 R Sweave 文档。

来自.tex 文件:

\documentclass{report}\usepackage[]{graphicx}\usepackage[]{color}
%% maxwidth is the original width if it is less than linewidth
%% otherwise use linewidth (to make sure the graphics do not exceed the margin)
\makeatletter
\def\maxwidth{ %
  \ifdim\Gin@nat@width>\linewidth
    \linewidth
  \else
    \Gin@nat@width
  \fi
}
\makeatother

\definecolor{fgcolor}{rgb}{0.345, 0.345, 0.345}
\newcommand{\hlnum}[1]{\textcolor[rgb]{0.686,0.059,0.569}{#1}}%
\newcommand{\hlstr}[1]{\textcolor[rgb]{0.192,0.494,0.8}{#1}}%
\newcommand{\hlcom}[1]{\textcolor[rgb]{0.678,0.584,0.686}{\textit{#1}}}%
\newcommand{\hlopt}[1]{\textcolor[rgb]{0,0,0}{#1}}%
\newcommand{\hlstd}[1]{\textcolor[rgb]{0.345,0.345,0.345}{#1}}%
\newcommand{\hlkwa}[1]{\textcolor[rgb]{0.161,0.373,0.58}{\textbf{#1}}}%
\newcommand{\hlkwb}[1]{\textcolor[rgb]{0.69,0.353,0.396}{#1}}%
\newcommand{\hlkwc}[1]{\textcolor[rgb]{0.333,0.667,0.333}{#1}}%
\newcommand{\hlkwd}[1]{\textcolor[rgb]{0.737,0.353,0.396}{\textbf{#1}}}%

\usepackage{framed}
\makeatletter
\newenvironment{kframe}{%
 \def\at@end@of@kframe{}%
 \ifinner\ifhmode%
  \def\at@end@of@kframe{\end{minipage}}%
  \begin{minipage}{\columnwidth}%
 \fi\fi%
 \def\FrameCommand##1{\hskip\@totalleftmargin \hskip-\fboxsep
 \colorbox{shadecolor}{##1}\hskip-\fboxsep
     % There is no \\@totalrightmargin, so:
     \hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}%
 \MakeFramed {\advance\hsize-\width
   \@totalleftmargin\z@ \linewidth\hsize
   \@setminipage}}%
 {\par\unskip\endMakeFramed%
 \at@end@of@kframe}
\makeatother

\definecolor{shadecolor}{rgb}{.97, .97, .97}
\definecolor{messagecolor}{rgb}{0, 0, 0}
\definecolor{warningcolor}{rgb}{1, 0, 1}
\definecolor{errorcolor}{rgb}{1, 0, 0}
\newenvironment{knitrout}{}{} % an empty environment to be redefined in TeX

\usepackage{alltt}
\usepackage{infwarerr}
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\begin{document}

time approaches infinity \cite{Pan}. 


\begin{thebibliography}{100} % 100 is a random guess of the total number of 
%references 

\bibitem{Boney96} Boney, L., Tewfik, A.H., and Hamdy, K.N., ``Digital 
Watermarks for Audio Signals," \emph{Proceedings of the Third IEEE 
International Conference on Multimedia}, pp. 473-480, June 1996. 

\bibitem{MG} Goossens, M., Mittelbach, F., Samarin, \emph{A LaTeX 
Companion}, Addison-Wesley, Reading, MA, 1994. 

\bibitem{HK} Kopka, H., Daly P.W., \emph{A Guide to LaTeX}, 
Addison-Wesley, Reading, MA, 1999. 

\bibitem{Pan} Pan, D., ``A Tutorial on MPEG/Audio Compression," \emph{IEEE 
Multimedia}, Vol.2, pp.60-74, Summer 1998. 

\end{thebibliography} 

\end{document}

相关内容