为什么我收到 LaTeX 警告:输入行上的页面引用未定义?

为什么我收到 LaTeX 警告:输入行上的页面引用未定义?

如果我使用此代码:

\documentclass[10pt,a5paper,twoside]{memoir}

\begin{document}

\cite{abntex2classe}

\bibliography{refs2}

\end{document}

我赢了:

LaTeX Warning: Citation `abntex2classe' on page 1 undefined on input line 5.

LaTeX Warning: There were undefined references.

但如果我运行另一个:

\documentclass[10pt,a5paper,twoside]{abntex2}

\usepackage[hyperpageref]{backref}
\usepackage[alf]{abntex2cite}

% Package hyperref Warning: Token not allowed in a PDF string?
% https://tex.stackexchange.com/questions/384885/package-hyperref-warning-token
\pdfstringdefDisableCommands{\let\uppercase\relax}

\begin{document}

\tableofcontents*

\chapter[Nullam]{Nullam elementum}

Nullam elementum

\section[Some encoding tests]{showfont}

Nullam elementum \cite{abntex2classe} Nullam elementum

\bibliography{refs2}

\end{document}

它工作正常。怎么会这样?

这是的内容refs2.bib

@manual{abntex2classe,
  Author = {abnTeX2 and Lauro},
  Organization = {Equipe abnTeX2},
  Title = {A classe abntex2},
  Note = {Substitui \cite{abntex2classe2}},
  Year = {2013}}

@manual{abntex2classe2,
  Author = {abnTeX2 and Lauro},
  Organization = {Equipe abnTeX2},
  Title = {A classe abntex2},
  Year = {2013}}

我想我应该加载一些包,但我已经看过了这个问题LaTeX 警告:引用未定义但他们似乎没有加载任何参考书目包。

为了编译,我运行,,,,完整pdflatex日志:bibtexpdflatexpdflatex

This is pdfTeX, Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6400) (preloaded format=pdflatex 2017.8.23)  25 AUG 2017 16:34
entering extended mode
**./test3.tex
(test3.tex
LaTeX2e <2017-04-15>
Babel <3.12> and hyphenation patterns for 76 language(s) loaded.
(D:\User\Documents\latex\texmfs\install\tex\latex\memoir\memoir.cls
Document Class: memoir 2016/05/16 v3.7f configurable book, report, article docu
ment class
\onelineskip=\skip41
\lxvchars=\skip42
\xlvchars=\skip43
\@memcnta=\count79
\c@@memmarkcntra=\count80
(D:\User\Documents\latex\texmfs\install\tex\generic\oberdiek\ifpdf.sty
Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch
)
(D:\User\Documents\latex\texmfs\install\tex\latex\ifetex\ifetex.sty
Package: ifetex 2011/12/15 v1.2 ifetex

(D:\User\Documents\latex\texmfs\install\tex\plain\ifetex\ifetex.tex))
(D:\User\Documents\latex\texmfs\install\tex\generic\ifxetex\ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
(D:\User\Documents\latex\texmfs\install\tex\generic\oberdiek\ifluatex.sty
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
\stockheight=\skip44
\stockwidth=\skip45
\trimtop=\skip46
\trimedge=\skip47

(D:\User\Documents\latex\texmfs\install\tex\latex\memoir\mem10.clo
File: mem10.clo 2008/01/30 v0.3 memoir class 10pt size option
)
\binding=\skip48
\spinemargin=\skip49
\foremargin=\skip50
\uppermargin=\skip51
\lowermargin=\skip52
\headdrop=\skip53
\normalrulethickness=\skip54
\mem@maxheadheight=\skip55
\mem@maxfootheight=\skip56
\headwidth=\skip57
\c@storedpagenumber=\count81
\memPD=\dimen102
\m@mabparskip=\skip58
\thanksmarkwidth=\skip59
\thanksmarksep=\skip60
\droptitle=\skip61
\c@book=\count82
\c@part=\count83
\c@chapter=\count84
\c@section=\count85
\c@subsection=\count86
\c@subsubsection=\count87
\c@paragraph=\count88
\c@subparagraph=\count89
\beforechapskip=\skip62
\midchapskip=\skip63
\afterchapskip=\skip64
\chapindent=\skip65
\bottomsectionskip=\skip66
\secindent=\skip67
\beforesecskip=\skip68
\aftersecskip=\skip69
\subsecindent=\skip70
\beforesubsecskip=\skip71
\aftersubsecskip=\skip72
\subsubsecindent=\skip73
\beforesubsubsecskip=\skip74
\aftersubsubsecskip=\skip75
\paraindent=\skip76
\beforeparaskip=\skip77
\afterparaskip=\skip78
\subparaindent=\skip79
\beforesubparaskip=\skip80
\aftersubparaskip=\skip81
\pfbreakskip=\skip82
\c@@ppsavesec=\count90
\c@@ppsaveapp=\count91
\ragrparindent=\dimen103
\everylistparindent=\dimen104
\parsepi=\skip83
\topsepi=\skip84
\itemsepi=\skip85
\parsepii=\skip86
\topsepii=\skip87
\topsepiii=\skip88
\itemsepii=\skip89
\itemsepiii=\skip90
\partopsepii=\skip91
\partopsepiii=\skip92
\m@msavetopsep=\skip93
\m@msavepartopsep=\skip94
\@enLab=\toks14
\abstitleskip=\skip95
\absleftindent=\skip96
\abs@leftindent=\dimen105
\absrightindent=\skip97
\absparindent=\skip98
\absparsep=\skip99
\c@vslineno=\count92
\c@poemline=\count93
\c@modulo@vs=\count94
\c@memfvsline=\count95
\vleftskip=\skip100
\vrightskip=\skip101
\stanzaskip=\skip102
\versewidth=\skip103
\vgap=\skip104
\vindent=\skip105
\vleftmargin=\dimen106
\c@verse=\count96
\c@chrsinstr=\count97
\beforepoemtitleskip=\skip106
\afterpoemtitleskip=\skip107
\c@poem=\count98
\beforePoemTitleskip=\skip108
\midPoemTitleskip=\skip109
\afterPoemTitleskip=\skip110
\col@sep=\dimen107
\extrarowheight=\dimen108
\NC@list=\toks15
\extratabsurround=\skip111
\backup@length=\skip112
\TX@col@width=\dimen109
\TX@old@table=\dimen110
\TX@old@col=\dimen111
\TX@target=\dimen112
\TX@delta=\dimen113
\TX@cols=\count99
\TX@ftn=\toks16
\heavyrulewidth=\dimen114
\lightrulewidth=\dimen115
\cmidrulewidth=\dimen116
\belowrulesep=\dimen117
\belowbottomsep=\dimen118
\aboverulesep=\dimen119
\abovetopsep=\dimen120
\cmidrulesep=\dimen121
\cmidrulekern=\dimen122
\defaultaddspace=\dimen123
\@cmidla=\count100
\@cmidlb=\count101
\@aboverulesep=\dimen124
\@belowrulesep=\dimen125
\@thisruleclass=\count102
\@lastruleclass=\count103
\@thisrulewidth=\dimen126
\ctableftskip=\skip113
\ctabrightskip=\skip114
\abovecolumnspenalty=\count104
\@linestogo=\count105
\@cellstogo=\count106
\@cellsincolumn=\count107
\crtok=\toks17
\@mincolumnwidth=\dimen127
\c@newflo@tctr=\count108
\mem@margin@floatbox=\box26
\@contcwidth=\skip115
\@contindw=\skip116
\abovecaptionskip=\skip117
\belowcaptionskip=\skip118
\subfloattopskip=\skip119
\subfloatcapskip=\skip120
\subfloatcaptopadj=\skip121
\subfloatbottomskip=\skip122
\subfloatlabelskip=\skip123
\subfloatcapmargin=\dimen128
\c@@contsubnum=\count109
\m@mscap@capbox=\box27
\m@mscap@fbox=\box28
\sidecapsep=\dimen129
\sidecapwidth=\dimen130
\m@m@tempdima=\dimen131
\m@mscapraise=\dimen132
\sidecapraise=\dimen133
\m@mscapmainwidth=\dimen134
\m@mscaplkern=\dimen135
\beforeepigraphskip=\skip124
\afterepigraphskip=\skip125
\epigraphwidth=\skip126
\epigraphrule=\skip127
LaTeX Info: Redefining \em on input line 7551.
LaTeX Info: Redefining \emph on input line 7559.
\tocentryskip=\skip128
\tocbaseline=\skip129
\cftparskip=\skip130
\cftbeforebookskip=\skip131
\cftbookindent=\dimen136
\cftbooknumwidth=\dimen137
\cftbeforepartskip=\skip132
\cftpartindent=\skip133
\cftpartnumwidth=\skip134
\cftbeforechapterskip=\skip135
\cftchapterindent=\skip136
\cftchapternumwidth=\skip137
\cftbeforesectionskip=\skip138
\cftsectionindent=\skip139
\cftsectionnumwidth=\skip140
\cftbeforesubsectionskip=\skip141
\cftsubsectionindent=\skip142
\cftsubsectionnumwidth=\skip143
\cftbeforesubsubsectionskip=\skip144
\cftsubsubsectionindent=\skip145
\cftsubsubsectionnumwidth=\skip146
\cftbeforeparagraphskip=\skip147
\cftparagraphindent=\skip148
\cftparagraphnumwidth=\skip149
\cftbeforesubparagraphskip=\skip150
\cftsubparagraphindent=\skip151
\cftsubparagraphnumwidth=\skip152
\prechapterprecisshift=\dimen138
\c@maxsecnumdepth=\count110
\bibindent=\dimen139
\bibitemsep=\skip153
\indexcolsep=\skip154
\indexrule=\skip155
\indexmarkstyle=\toks18
\@indexbox=\insert199
\glossarycolsep=\dimen140
\glossaryrule=\dimen141
\sideparvshift=\skip156
\sideins=\insert198
\sidebartopsep=\skip157
\sidebarhsep=\skip158
\sidebarvsep=\skip159
\sidebarwidth=\skip160
\footmarkwidth=\skip161
\footmarksep=\skip162
\footparindent=\skip163
\footinsdim=\skip164
\footinsv@r=\insert197
\@mpfootinsv@r=\insert196
\m@m@k=\count111
\m@m@h=\dimen142
\m@mipn@skip=\skip165
\sidefootins=\insert195
\sidefootadjust=\skip166
\sidefootheight=\skip167
\sidefoothsep=\skip168
\sidefootvsep=\skip169
\sidefootwidth=\skip170
\m@mdownsf=\skip171
\c@sidefootnote=\count112
\sidefootmarkwidth=\skip172
\sidefootmarksep=\skip173
\sidefootparindent=\skip174
\c@pagenote=\count113
\c@pagenoteshadow=\count114
\mem@pn@lastkern=\skip175
\every@verbatim=\toks19
\afterevery@verbatim=\toks20
\verbatim@line=\toks21
\tab@position=\count115
\verbatim@in@stream=\read1
\verbatimindent=\skip176
\verbatim@out=\write3
\bvboxsep=\skip177
\c@memfbvline=\count116
\c@bvlinectr=\count117
\bvnumlength=\skip178
\fb@frw=\dimen143
\fb@frh=\dimen144
\FrameRule=\dimen145
\FrameSep=\dimen146
\c@cp@cntr=\count118
LaTeX Info: Redefining \: on input line 12068.
LaTeX Info: Redefining \! on input line 12070.
\c@ism@mctr=\count119
\c@xsm@mctr=\count120
\c@csm@mctr=\count121
\c@ksm@mctr=\count122
\c@xksm@mctr=\count123
\c@cksm@mctr=\count124
\c@msm@mctr=\count125
\c@xmsm@mctr=\count126
\c@cmsm@mctr=\count127
\c@bsm@mctr=\count128
\c@workm@mctr=\count129
\c@sheetsequence=\count130
\c@lastsheet=\count131
\c@lastpage=\count132
\c@figure=\count133
\c@lofdepth=\count134
\cftbeforefigureskip=\skip179
\cftfigureindent=\skip180
\cftfigurenumwidth=\skip181
\c@table=\count135
\c@lotdepth=\count136
\cftbeforetableskip=\skip182
\cfttableindent=\skip183
\cfttablenumwidth=\skip184
Package abstract [2008/07/23] emulated by memoir.
Package appendix [2008/07/23] emulated by memoir.
Package array [2008/09/09] emulated by memoir.
Package booktabs [2016/05/16] emulated by memoir.
Package ccaption [2008/07/23] emulated by memoir.
Package changepage [2008/07/23] emulated by memoir.
Package chngcntr [2008/07/23] emulated by memoir.
Package chngpage [2008/07/23] emulated by memoir.
Package crop emulated by memoir.
Package dcolumn [2008/07/23] emulated by memoir.
Package delarray [2008/07/23] emulated by memoir.
Package enumerate [2008/07/23] emulated by memoir.
Package epigraph [2008/07/23] emulated by memoir.
Package ifmtarg [2008/07/23] emulated by memoir.
Package index [2008/07/23] emulated by memoir.
Package makeidx [2008/07/23] emulated by memoir.
Package moreverb [2008/07/23] emulated by memoir.
Package mparhack [2008/07/23] emulated by memoir.
Package needspace [2008/07/23] emulated by memoir.
Package newfile [2008/07/23] emulated by memoir.
Package nextpage [2008/07/23] emulated by memoir.
Package pagenote [2008/07/23] emulated by memoir.
Package parskip [2008/07/23] emulated by memoir.
Package patchcmd [2008/07/23] emulated by memoir.
Package setspace [2008/07/23] emulated by memoir.
Package shortvrb [2008/07/23] emulated by memoir.
Package showidx [2008/07/23] emulated by memoir.
Package tabularx [2008/07/23] emulated by memoir.
Package titleref [2008/07/23] emulated by memoir.
Package titling [2008/07/23] emulated by memoir.
Package tocbibind [2008/07/23] emulated by memoir.
Package tocloft [2008/07/23] emulated by memoir.
Package tocvsec2 [2008/07/23] emulated by memoir.
Package verbatim [2008/07/23] emulated by memoir.
Package verse [2008/07/23] emulated by memoir.

(D:\User\Documents\latex\texmfs\install\tex\latex\memoir\mempatch.sty
Package: mempatch 2009/07/24 v6.0f Patches for memoir class v1.6180339
))
(D:\User\Dropbox\Applications\SoftwareVersioning\SublimeText\Data\Cache\LaTeXTo
ols\3fadaf268cce53dfbb2db491bf19775c\test3.aux)
\openout1 = `test3.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.


LaTeX Warning: Citation `abntex2classe' on page 1 undefined on input line 5.


(D:\User\Dropbox\Applications\SoftwareVersioning\SublimeText\Data\Cache\LaTeXTo
ols\3fadaf268cce53dfbb2db491bf19775c\test3.bbl) [1{D:/User/Documents/latex/texm
fs/data/pdftex/config/pdftex.map}

]
(D:\User\Dropbox\Applications\SoftwareVersioning\SublimeText\Data\Cache\LaTeXTo
ols\3fadaf268cce53dfbb2db491bf19775c\test3.aux)

LaTeX Warning: There were undefined references.

 ) 
Here is how much of TeX's memory you used:
 3525 strings out of 493314
 48155 string characters out of 3134142
 130135 words of memory out of 3000000
 7126 multiletter control sequences out of 15000+200000
 4899 words of font info for 18 fonts, out of 3000000 for 9000
 1141 hyphenation exceptions out of 8191
 30i,10n,22p,129b,219s stack positions out of 5000i,500n,10000p,200000b,50000s
<D:/User/Documents/latex/texmfs/install/fonts/type1/public/amsfonts/cm/cmbx10
.pfb><D:/User/Documents/latex/texmfs/install/fonts/type1/public/amsfonts/cm/cmr
10.pfb>
Output written on D:\User\Dropbox\Applications\SoftwareVersioning\SublimeText\D
ata\Cache\LaTeXTools\3fadaf268cce53dfbb2db491bf19775c\test3.pdf (1 page, 18088 
bytes).
PDF statistics:
 14 PDF objects out of 1000 (max. 8388607)
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)

答案1

在您的第一个代码(类memoir)中,您的代码中缺少一个\bibliographystyle{}。参考书目样式定义了参考书目的布局。因为我不知道您需要哪种样式,所以我只使用了plain

因此以下 MWE

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@manual{abntex2classe,
  Author = {abnTeX2 and Lauro},
  Organization = {Equipe abnTeX2},
  Title = {A classe abntex2},
  Note = {Substitui \cite{abntex2classe2}},
  Year = {2013}
}
@manual{abntex2classe2,
  Author = {abnTeX2 and Lauro},
  Organization = {Equipe abnTeX2},
  Title = {A classe abntex2},
  Year = {2013}
}
\end{filecontents}


\documentclass[10pt,a5paper,twoside]{memoir}

\begin{document}

\cite{abntex2classe}

\bibliographystyle{plain} % <===========================================
\bibliography{\jobname}

\end{document}

结果是

在此处输入图片描述

我不知道您使用的第二个类abntex2,但它似乎预定义了一个特殊的参考书目样式供使用。因此您不需要添加自己的参考书目样式。

答案2

您没有注意到一个例子和另一个例子之间的区别:

\usepackage[hyperpageref]{backref}
\usepackage[alf]{abntex2cite}

只需将这两行添加到第一个例子:

\documentclass[10pt,a5paper,twoside]{memoir}
\usepackage[hyperpageref]{backref}
\usepackage[alf]{abntex2cite}


\begin{document}

\cite{abntex2classe}

\bibliography{sample}

\end{document}

您想使用一个包,但您没有加载它……这没有意义。查看abntex2abntex2-cite手册了解更多信息。

答案3

在 Adob​​e Reader 中打开 PDF 文件时出现此错误。请确保其他进程没有处理您的输出文件。

相关内容