参考文献无法正确打印为 PDF

参考文献无法正确打印为 PDF

我已经为新电脑和 miktex 苦恼了一段时间。我以前问过这个问题,以为已经解决了(在 pdf 中看到一个绿色的超链接框,以为一切都很好),但事实并非如此。(查看问题:参考文献未打印)。我还有一些信息,希望可以解决这个问题。

我停止使用 WinEdt,并可以在 MikTeX 中复制该问题。

这是我正在运行的代码:

\documentclass[leavefloats]{apa6e}
\usepackage[american]{babel}
\usepackage{csquotes}
%\usepackage[style=apa]{biblatex}
\usepackage[style=apa, backend=biber, bibencoding=latin1]{biblatex}
\addbibresource{explicit.bib}
\DeclareLanguageMapping{american}{american-apa}

\usepackage{enumerate}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{ragged2e}
\usepackage{textcomp}
%\usepackage[justification=justified,singlelinecheck=false,font=small,format=plain,labelfont=bf,up,textfont=normal,up]{caption}
\usepackage{etoolbox}
\usepackage{microtype}  %disable ligitures
\DisableLigatures{encoding = *, family = *}

%--------------------------
\makeatletter
\renewcommand{\maketitle}{%
\thispagestyle{titlepage}%
\vspace*{1in}%
\Centering\@title\\\@author%
\vfill%
\ifdefined%
\apaSIXe@leavefloats{}
\fi
\RaggedRight%
\mspart{\@title}%
}
\makeatother
%---------------

\usepackage[section]{placeins}

\usepackage{setspace}
\usepackage{appendix}
\usepackage{float}
\usepackage{subfig}
\usepackage{amsmath}
 %\numberwithin{equation}{subsection} %changes labeling of equations

\setlength{\parindent}{1 em}
\usepackage{color}
\usepackage{ifthen}
\makeatletter
\renewenvironment{figure}[1][]{%
\ifthenelse{\equal{#1}{}}{%
\@float{figure}
}{%
\@float{figure}[#1]%
}%
\centering
}{%
\end@float
}
\renewenvironment{table}[1][]{%
\ifthenelse{\equal{#1}{}}{%
\@float{table}
}{%
\@float{table}[#1]%
}%
\centering
}{%
\end@float
}

\defbibheading{bibliography}{%
\section{\normalfont\refname}}

\title{Teacher Metacognition: The Intentionality of Teacher Led Speech}
\shorttitle{Intentionality of Teacher Led Speech}
\author{Tyler Rinker\\University at Buffalo\\Department of Learning and Instruction}

\authornote{Theories of Language \& Literacy}%LAI 687 -

\date{\today} 
\begin{document}
\maketitle
%\defbibheading{bibliography}{%
%\section{\normalfont\refname}}

%\hspace{.5in}Usually a paper has an introduction but there is no heading for the introduction.  That's what you've got here, an introduction with no heading.  %Not pretty but it pleases the APA.

I want this to work \cite{Nagy1985}

\clearpage %This forces a page break
\printbibliography

\end{document}

当我使用 biber 和 bibtex 作为后端运行此程序时。这是一个 zip 文件,其中包含我的 bib 文件、tex 文件和使用 biber 和 bibtex 作为后端输出的两个 pdf。

https://dl.dropbox.com/u/61803503/my%20items.zip

现在介绍一些信息。如果我使用 bibtex 作为后端运行它,则参考文献永远不会打印,并且文内引用会以粗体显示为 bibtex 引用键。好的,如果我切换到 biber 作为后端,参考文献仍然不会打印,但文内引用显示正确(绿色超链接框围绕它和年份),但当我单击它时,它会将我带到我的封面页,因为没有参考部分可转至。

如果我再次运行相同的 pdfLatex 程序(如果将鼠标悬停在 texworks 中标记为 Typeset 的绿色播放按钮上),绿色的文本内超引用框就会消失,文本内引用不再是日期,而是粗体 BibTex 键。要将其恢复为带有年份的绿色超引用框,唯一的方法是切换到 bibtex 作为后端,运行它,然后切换回 biber 作为后端。

这是控制台输出:

Command Line:   bibtex.exe "theories"
Startup Folder: C:\Users\trinker\Desktop\PhD Program\Indep. Study\lit_review_articles_explicit_talk\paper

This is BibTeX, Version 0.99d (MiKTeX 2.9)
The top-level auxiliary file: theories.aux
The style file: biblatex.bst
Database file #1: theories-blx.bib
Database file #2: explicit.bib
Biblatex version: 2.1


Command Line:   texify.exe --pdf --tex-option=--interaction=errorstopmode --tex-option=--synctex=-1 "C:\Users\trinker\Desktop\PhD Program\Indep. Study\lit_review_articles_explicit_talk\paper\theories.tex"
Startup Folder: C:\Users\trinker\Desktop\PhD Program\Indep. Study\lit_review_articles_explicit_talk\paper

This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9)
entering extended mode

("C:/Users/trinker/Desktop/PhD Program/Indep. Study/lit_review_articles_explici
t_talk/paper/theories.tex"
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic, 
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,
 lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n
german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman
ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm
an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl
ishmax, welsh, loaded.
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\apa6e\apa6e.cls
Document Class: apa6e 2011/03/03 v0.3 APA 6e manuscript formatting
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\size12.clo"))
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\psnfss\times.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\psnfss\mathptmx.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\geometry\geometry.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifvtex.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\geometry\geometry.cfg"))
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\ms\ragged2e.sty
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\ms\everysel.sty)
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\footmisc\footmisc.sty))
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\fancyhdr\fancyhdr.sty)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\float\float.sty")
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\caption\caption.sty
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\caption\caption3.sty))
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\ifthen.sty"))
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\babel\babel.sty"
*************************************
* Local config file bblopts.cfg used
*
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\arabi\bblopts.cfg)
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\babel\english.ldf"
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\babel\babel.def")))
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\csquotes\csquotes.sty
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\etoolbox\etoolbox.sty
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\misc\etex.sty"))
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\csquotes\csquotes.def)
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\csquotes\csquotes.cfg))
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\biblatex.sty
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\biblatex2.sty
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\kvsetkeys.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\etexcmds.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifluatex.sty"))))
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\logreq\logreq.sty
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\logreq\logreq.def))
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ltxmisc\url.sty")
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\blx-dm.def)
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\blx-compat.def)
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\biblatex.def)
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex-apa\apa.bbx
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\bbx\standard.bb
x)

Package biblatex Warning: Macro 'reviewauthor' undefined.
(biblatex)                Using \newbibmacro.

) (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex-apa\apa.cbx)
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\biblatex.cfg)))
 ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\tools\enumerate.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\hyperref\hyperref.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\hobsub-hyperref.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\hobsub-generic.sty"))
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\hyperref\pd1enc.def")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\hyperref.cfg"))

Package hyperref Message: Driver (autodetected): hpdftex.

("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\hyperref\hpdftex.def"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\oberdiek\rerunfilecheck.sty"))
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\trig.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def")))
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\textcomp.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\ts1enc.def"))
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\microtype.sty
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\microtype.cfg)
) (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\placeins\placeins.sty)
 (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\setspace\setspace.sty)
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\appendix\appendix.sty)
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\subfig\subfig.sty)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ams\math\amsmath.sty"
For additional information on amsmath, use the `?' option.
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ams\math\amstext.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ams\math\amsgen.sty"))
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ams\math\amsbsy.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ams\math\amsopn.sty"))
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\color.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\color.cfg"))
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex-apa\american-ap
a.lbx
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\lbx\american.lb
x
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\lbx\english.lbx
)))
("C:\Users\trinker\Desktop\PhD Program\Indep. Study\lit_review_articles_explici
t_talk\paper\theories.aux")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\ts1cmr.fd")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\psnfss\ot1ptm.fd")
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
ABD: EverySelectfont initializing macros

Package biblatex Warning: File 'theories.bbl' is wrong format version - expecte
d 2.1.


("C:\Users\trinker\Desktop\PhD Program\Indep. Study\lit_review_articles_explici
t_talk\paper\theories.bbl"
! Undefined control sequence.
<argument> ...c@refsection @entry@\blx@slist@name 

l.119 \endentry

? 
! Undefined control sequence.
<argument> ...c@refsection @entry@\blx@slist@name 

l.119 \endentry

? 
! Undefined control sequence.
l.121 \lossort

? 
! Undefined control sequence.
l.122 \endlossort

? 
) ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\hyperref\nameref.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\gettitlestring.sty"))
("C:\Users\trinker\Desktop\PhD Program\Indep. Study\lit_review_articles_explici
t_talk\paper\theories.out")
("C:\Users\trinker\Desktop\PhD Program\Indep. Study\lit_review_articles_explici
t_talk\paper\theories.out")
(C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\context\base\supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\mt-ptm.cfg)
Underfull \hbox (badness 2941) in paragraph at lines 83--83
 []\OT1/ptm/m/n/12 (+20) Teacher Metacog-ni-tion: The In-ten-tion-al-ity of Tea
cher Led Speech 

Underfull \hbox (badness 10000) in paragraph at lines 83--83
 []\OT1/ptm/m/n/12 (+20) Tyler Rinker 

Underfull \hbox (badness 10000) in paragraph at lines 83--83
 []\OT1/ptm/m/n/12 (+20) University at Buf-falo 

Underfull \hbox (badness 10000) in paragraph at lines 83--83
 []\OT1/ptm/m/n/12 (+20) Department of Learn-ing and In-struc-tion 
[1{C:/Users/trinker/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
Underfull \hbox (badness 2922) in paragraph at lines 83--83
 [][]\OT1/ptm/m/n/12 (+20) Teacher Metacog-ni-tion: The In-ten-tion-al-ity of T
eacher Led Speech 

Underfull \hbox (badness 10000) in paragraph at lines 109--109
 [][]\OT1/ptm/b/n/12 Literature Re-view 

Underfull \hbox (badness 10000) in paragraph at lines 118--118
 [][]\OT1/ptm/b/n/12 Methods 

Underfull \hbox (badness 10000) in paragraph at lines 124--124
 [][]\OT1/ptm/b/n/12 Results 

Underfull \hbox (badness 10000) in paragraph at lines 126--126
 [][]\OT1/ptm/b/n/12 Conclusion 
[2]

LaTeX Warning: Empty bibliography on input line 134.


("C:\Users\trinker\Desktop\PhD Program\Indep. Study\lit_review_articles_explici
t_talk\paper\theories.aux")

Package biblatex Warning: Please rerun LaTeX.
(biblatex)                Page breaks have changed.

 )
(\end occurred when \ifx on line 46 was incomplete)
(\end occurred when \ifx on line 46 was incomplete)
(\end occurred when \ifx on line 46 was incomplete)pdfTeX warning (dest): name{
cite.0@Nagy1985} has been referenced but does not exist, replaced by a fixed on
e

{C:/Program Files (x86)/MiKTeX 2.9/fonts/enc/dvips/fontname/8r.enc}<C:/Program 
Files (x86)/MiKTeX 2.9/fonts/type1/urw/times/utmb8a.pfb><C:/Program Files (x86)
/MiKTeX 2.9/fonts/type1/urw/times/utmr8a.pfb>
Output written on theories.pdf (2 pages, 35260 bytes).
SyncTeX written on theories.synctex.
Transcript written on theories.log.
texify: pdflatex.exe failed for some reason (see log file).


_____________________________________________________________________

 PDFTeXify Compilation Report (Pages: 2)

 Errors: 4   Warnings: 5   Bad Boxes: 9
_____________________________________________________________________

它仍然会生成 pdf,但是没有参考资料。

我对 LATEX 不是很在行(喜欢它的灵活性,但不是很精通)。所以请确保您的答案没有任何假设。

编辑:在尝试给出的解决方案后,我更改了上面的代码和输出以反映问题

答案1

您的文件有两个问题。首先,\addbibresource需要包含扩展名的完整文件名.bib。其次,您的参考书目文件包含 latin1 编码的外文字符(例如法文摘要)。这意味着 (a) 您需要使用能够理解此类编码的参考书目程序,这biber是一个不错的选择,并且 (b) 您需要告知biber此编码。您可以使用选项来执行此操作bibencoding=latin1

因此,您真正需要做的就是将主文件中的两行更改为

\usepackage[style=apa,backend=biber,bibencoding=latin1]{biblatex}
\addbibresource{explicit.bib}

在尝试编译它之前,请清除目录中的所有生成的文件,以便只剩下你的.tex.bib文件,否则你将收到各种可能令人困惑的错误消息。

相关内容