编辑:

编辑:

问题已解决:我删除了所有日志、辅助、目录等并重建文件,一切正常,并生成了 PDF。

我正在使用 LaTeX 和大学提供的模板来格式化我的论文,但我无法获得参考书目列表。

thesispreamble.tex

\usepackage[backend=biber,articletitle=true,style=chem-rsc,doi=false]
{biblatex}

在 thesis.tex 中:

\addbibresource{PhylogeneticApproach.bib}
\cleardoublepage
\phantomsection  
\addcontentsline{toc}{chapter}{Bibliography}              
\printbibliography

文中我使用\textcite\cite进行引用(这是我从文献中得到的)。

并且在选项-配置TeXstudio-默认书目工具中,我将Bibtex更改为Biber。

但是,我无法获得任何参考书目列表。

有办法吗?提前致谢。

编辑:TeXstudio 在 build&view -biber-build & view 之后产生大量错误并且无法生成 PDF,以下是日志文件(我删除了其中的一部分):

line 21: File ended while scanning use of \field. \begin{document}
line 4: Missing number, treated as zero. ...allenges faced by banks \textcite{Lin2013}
line 4: Missing number, treated as zero. ...allenges faced by banks \textcite{Lin2013}
line 4: Missing number, treated as zero. ...allenges faced by banks \textcite{Lin2013}
line 39: Undefined control sequence. \begin{quotation}
line 45: Undefined control sequence. \begin{quotation}
line 53: Undefined control sequence. \begin{quotation}
line 64: Undefined control sequence. \begin{quotation}
line 272: Undefined control sequence. \begin{quotation}
line 36: Undefined control sequence. \begin{quotation}
line 42: Undefined control sequence. \begin{quotation}
line 74: Missing \endcsname inserted.
line 74: Undefined control sequence.
line 74: Missing \endcsname inserted.
line 74: Undefined control sequence.
line 74: Extra \fi.
line 74: Missing number, treated as zero.
line 74: Illegal unit of measure (pt inserted).
line 74: Extra \endcsname.
line 74: Extra \endcsname.
line 74: Use of \expandafter doesn't match its definition.
line 74: Missing { inserted.
line 74: Argument of \renew@command has an extra }.
line 74: Paragraph ended before \renew@command was complete.
line 74: Extra }, or forgotten \endgroup.
line 74: Argument of \makelabel has an extra }.
line 74: Paragraph ended before \makelabel was complete.
line 74: You can't use `macro parameter character #' in horizontal mode.

......

line 74: Undefined control sequence.
line 74: Use of expandafter doesn't match its definition.
line 74: Use of expandafter doesn't match its definition.
line 74: Use of noexpand doesn't match its definition.
line 2: Use of expandafter doesn't match its definition. [2001/06/04 font definitions for OT1/ptm.]
line 4: Use of expandafter doesn't match its definition. \DeclareFontFamily{OT1}{ptm}{}
line 4: Use of expandafter doesn't match its definition. \DeclareFontFamily{OT1}{ptm}{}
line 4: Encoding scheme `OT1' unknown. \DeclareFontFamily{OT1}{ptm}{}
line 4: Use of expandafter doesn't match its definition. \DeclareFontFamily{OT1}{ptm}{}
line 4: Use of expandafter doesn't match its definition. \DeclareFontFamily{OT1}{ptm}{}
line 6: Missing endcsname inserted. \DeclareFontShape
line 6: You can't use a prefix with `begingroup'. \DeclareFontShape
line 6: Use of expandafter doesn't match its definition. \DeclareFontShape
line 8: Use of expandafter doesn't match its definition. }{}
line 8: Font family `OT1+ptm' unknown. }{}

......

: No \title specified!.
: No \author specified!.
: No \degree specified!.
: No \supervisor specified!.
: No \school specified!.
: No \author specified!.
: No \author specified!.
: No \degree specified!.
: No \author specified!.
line 12: Citation 'EnglandPrudentialRegulationAuthority2015' on page 1 undefined
line 11: Overfull \hbox (67.95175pt too wide) in paragraph
: pdflatex.exe (file ./figures/chap2intro.pdf): PDF inclusion: found PDF version <1.7>, but at most version <1.5> allowed<figures/chap2intro.pdf, id=354, 507.39563pt x 404.26031pt>File: figures/chap2intro.pdf Graphic file (type pdf)
line 29: Overfull \hbox (5.0141pt too wide) in paragraph
line 31: Citation 'Abbott1988' on page 4 undefined

: No positions in optional float specifier.
: No positions in optional float specifier.
line 669: Overfull \hbox (69.7424pt too wide) in paragraph
line 703: Reference `appendfig:HEU2008-2010' on page 59 undefined
line 703: Reference `appendfig:HEU2013-2014' on page 59 undefined
line 703: Reference `append8' on page 59 undefined
: No positions in optional float specifier.
: No positions in optional float specifier.
line 744: Overfull \hbox (69.7424pt too wide) in paragraph
line 803: Underfull \hbox (badness 2334) in paragraph
line 803: Underfull \hbox (badness 4660) in paragraph
: pdflatex.exe (file ./figures/chap6intro.pdf): PDF inclusion: found PDF version <1.7>, but at most version <1.5> allowed<figures/chap6intro.pdf, id=1051, 227.34938pt x 368.1253pt>File: figures/chap6intro.pdf Graphic file (type pdf)

......

: No positions in optional float specifier.
line 21: Citation 'Ganegoda2013' on page 70 undefined
line 21: Citation 'Sturm2013' on page 70 undefined
line 21: Citation 'Fiordelisi2014' on page 70 undefined
: Overfull \hbox (244.5006pt too wide) has occurred while \output is active
: Overfull \hbox (244.5006pt too wide) has occurred while \output is active

以下是 thesis.blg 文件:

[0] Config.pm:354> INFO - This is Biber 2.7
[0] Config.pm:357> INFO - Logfile is 'thesis.blg'
[36] biber-MSWIN64:303> INFO - === 
[77] Biber.pm:359> INFO - Reading 'thesis.bcf'
[188] Biber.pm:835> INFO - Found 171 citekeys in bib section 0
[204] Biber.pm:3670> INFO - Processing section 0
[223] Biber.pm:3840> INFO - Looking for bibtex format file 
'PhylogeneticApproach.bib' for section 0
[322] bibtex.pm:1435> INFO - Decoding LaTeX character macros into UTF-8
[496] bibtex.pm:1292> INFO - Found BibTeX data source 
'PhylogeneticApproach.bib'
[611] Utils.pm:164> WARN - month field '1/1/2007' in entry 'Allen2007' is 
not an integer - this will probably not sort properly.
[618] Utils.pm:164> WARN - ISBN '9780470481806 0470481803' in entry 
'Malz2011' is invalid - run biber with '--validate_datamodel' for details.
[622] Utils.pm:164> WARN - month field 'December 2000' in entry 'Tripe2000' 
is not an integer - this will probably not sort properly.
[623] Utils.pm:164> WARN - Name "Galai D., Ruthenberg D., Sarnat M., 
Schreiber B.Z." has too many commas: skipping name
[647] Utils.pm:164> WARN - month field '1/1/2002' in entry 'Hillson2002' is 
not an integer - this will probably not sort properly.
[678] Utils.pm:164> WARN - ISBN '978-0195157215 0195157214' in entry 
'Park2005' is invalid - run biber with '--validate_datamodel' for details.
[681] Utils.pm:164> WARN - ISBN '0415152860 0415152879' in entry 
'Cilliers1998' is invalid - run biber with '--validate_datamodel' for 
details.
[687] Utils.pm:164> WARN - month field '1/1/2006' in entry 'Mitchell2006' is 
not an integer - this will probably not sort properly.
[699] Utils.pm:164> WARN - month field '1/1/2007' in entry 'Marwan2007' is 
not an integer - this will probably not sort properly.
[702] Utils.pm:164> WARN - ISBN '9780684868769 0684868768 9780684868752 
068486875x' in entry 'Johnson2004' is invalid - run biber with '--
validate_datamodel' for details.
[704] Utils.pm:164> WARN - month field '1997/01/01' in entry 'Dooley1997' is 
not an integer - this will probably not sort properly.
[705] Utils.pm:164> WARN - ISBN '0195058119 0195079515' in entry 
'Kauffman1993' is invalid - run biber with '--validate_datamodel' for 
details.
[725] Utils.pm:164> WARN - month field '1/1/2005' in entry 'Chen2005' is not 
an integer - this will probably not sort properly.
[753] Utils.pm:164> WARN - ISBN '978���0���19���933829���0 
978���0���19���933830���6' in entry 'Diebold2015' is invalid - run 
biber with '--validate_datamodel' for details.
[755] Utils.pm:164> WARN - month field '08//' in entry 'Neil2005' is not an 
integer - this will probably not sort properly.
[759] Utils.pm:164> WARN - month field 'Spring Spring 2009 2012-01-26' in 
entry 'Neil2009' is not an integer - this will probably not sort properly.
[780] Utils.pm:164> WARN - month field '1/1/1999' in entry 'Barabasi1999' is not an integer - this will probably not sort properly.
[782] Utils.pm:164> WARN - month field '1/1/2005' in entry 'Garlaschelli2005' is not an integer - this will probably not sort properly.
[787] Utils.pm:164> WARN - month field '1972/01/01' in entry 'Bonacich1972a' is not an integer - this will probably not sort properly.
[792] Utils.pm:164> WARN - month field 'Nov' in entry 'Foster2005' is not an integer - this will probably not sort properly.
[797] Utils.pm:164> WARN - month field '3 Dec 2015' in entry 'Evans2015' is not an integer - this will probably not sort properly.
[806] Utils.pm:164> WARN - month field '4/1/April 2016' in entry 'Danielsson2016' is not an integer - this will probably not sort properly.
[846] Utils.pm:164> WARN - month field '10/21/' in entry 'Kolaczkowski2004' is not an integer - this will probably not sort properly.
[856] Utils.pm:164> WARN - ISBN '978-3-540-32474-1' in entry 'Henke2007' is invalid - run biber with '--validate_datamodel' for details.
[863] Utils.pm:164> WARN - month field '10//' in entry 'Sharifi2016' is not an integer - this will probably not sort properly.
[871] Utils.pm:164> WARN - BibTeX subsystem: C:\Users\speed\AppData\Local\Temp\hlhreN78NQ\PhylogeneticApproach.bib_115836.utf8, line 4, warning: 9 characters of junk seen at toplevel
[974] UCollate.pm:68> INFO - Overriding locale 'en-US' defaults 'variable = shifted' with 'variable = non-ignorable'
[974] UCollate.pm:68> INFO - Overriding locale 'en-US' defaults 'normalization = NFD' with 'normalization = prenormalized'
[974] Biber.pm:3499> INFO - Sorting list 'none/global/' of type 'entry' with scheme 'none' and locale 'en-US'
[975] Biber.pm:3505> INFO - No sort tailoring available for locale 'en-US'
[1081] bbl.pm:608> INFO - Writing 'thesis.bbl' with encoding 'ascii'
[1086] Utils.pm:164> WARN - The entry 'Kaplan1981' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1087] Utils.pm:164> WARN - The entry 'Allen2007' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1093] Utils.pm:164> WARN - The entry 'Buchmueller2006' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1096] Utils.pm:164> WARN - The entry 'Hillson2002' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1097] Utils.pm:164> WARN - The entry 'Kaiser2006' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1099] Utils.pm:164> WARN - The entry 'Scandizzo2005' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1102] Utils.pm:164> WARN - The entry 'Singh2010' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1105] Utils.pm:164> WARN - The entry 'Walters2003' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1108] Utils.pm:164> WARN - The entry 'Mauboussin2002' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1111] Utils.pm:164> WARN - The entry 'Sornette2003a' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1113] Utils.pm:164> WARN - The entry 'Barabasi2000' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1116] Utils.pm:164> WARN - The entry 'Mitchell2006' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1121] Utils.pm:164> WARN - The entry 'Marwan2007' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1125] Utils.pm:164> WARN - The entry 'Nishimori2011' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1126] Utils.pm:164> WARN - The entry 'Sole1996' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1127] Utils.pm:164> WARN - The entry 'Sole2011' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1128] Utils.pm:164> WARN - The entry 'Anderson1995' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1130] Utils.pm:164> WARN - The entry 'Chen2005' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1132] Utils.pm:164> WARN - The entry 'Sornette1997' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1134] Utils.pm:164> WARN - The entry 'Pisarenko2003' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1136] Utils.pm:164> WARN - The entry 'Boffetta1999' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1138] Utils.pm:164> WARN - The entry 'Stumpf2012' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1141] Utils.pm:164> WARN - The entry 'Clauset2009' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1144] Utils.pm:164> WARN - The entry 'Billio2013' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1145] Utils.pm:164> WARN - The entry 'Diebold2015' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1147] Utils.pm:164> WARN - The entry 'Neil2005' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1152] Utils.pm:164> WARN - The entry 'Neil2009' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1154] Utils.pm:164> WARN - The entry 'Erdoes1959' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1155] Utils.pm:164> WARN - The entry 'Albert1999' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1156] Utils.pm:164> WARN - The entry 'Erdoes1960' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1159] Utils.pm:164> WARN - The entry 'Baum2003' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1160] Utils.pm:164> WARN - The entry 'Barabasi1999a' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1161] Utils.pm:164> WARN - The entry 'Barabasi1999' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1164] Utils.pm:164> WARN - The entry 'Garlaschelli2005' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1170] Utils.pm:164> WARN - The entry 'Danielsson2002' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1172] Utils.pm:164> WARN - The entry 'Danielsson2008a' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1174] Utils.pm:164> WARN - The entry 'Danielsson2016' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1177] Utils.pm:164> WARN - The entry 'Griffiths1974' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1189] Utils.pm:164> WARN - The entry 'Jobst2007' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1194] Utils.pm:164> WARN - The entry 'Tandon2017' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
[1195] bbl.pm:712> INFO - Output to thesis.bbl
[1200] Biber.pm:109> INFO - WARNINGS: 66

答案1

似乎您遇到了错误(\addbibresource {\jobname.bib}第 67 行出现错误)

! LaTeX Error: Can be used only in preamble.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.67 \addbibresource
                    {\jobname.bib} % <=======================================
Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.

这意味着您应该将命令移到\addbibresource {\jobname.bib}前导码中。

请参阅以下 MWE(该包filecontents仅用于在一个 MWE 中包含 bib 文件和 TeX 代码!)mwe.tex

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{einstein,
  author   = "Albert Einstein",
  title    = "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
               [{On} the electrodynamics of moving bodies]",
  journal  = "Annalen der Physik",
  volume   = "322",
  number   = "10",
  pages    = "891--921",
  year     = "1905",
  DOI      = "http://dx.doi.org/10.1002/andp.19053221004",
  keywords = "physics",
}
@book{dirac,
  title     = {The Principles of Quantum Mechanics},
  author    = {Paul Adrien Maurice Dirac},
  isbn      = {9780198520115},
  series    = {International series of monographs on physics},
  year      = {1981},
  publisher = {Clarendon Press},
  keywords  = {physics},
}
@Book{goossens,
  author    = {Goossens, Michel and Mittelbach, Frank and
               Samarin, Alexander},
  title     = {The LaTeX Companion},
  edition   = {1},
  publisher = {Addison-Wesley},
  location  = {Reading, Mass.},
  year      = {1994},
}
@Book{adams,
  title     = {The Restaurant at the End of the Universe},
  author    = {Douglas Adams},
  series    = {The Hitchhiker's Guide to the Galaxy},
  publisher = {Pan Macmillan},
  year      = {1980},
}
\end{filecontents}


\documentclass[12pt]{article}

\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc} 

\usepackage{csquotes}
\usepackage[%
  backend=biber,
  articletitle=true,
  style=chem-rsc,
  doi=false
]{biblatex}
\addbibresource{\jobname.bib} % <========================== okay! ======


\begin{document}

\tableofcontents

\section{Introduction}
Add \nocite{*} to call all bib entrys or cite at last one 
like~\cite{adams} or~\textcite{goossens}.

%\addbibresource{\jobname.bib} % <======================= wrong!!=======
%\phantomsection  
%\addcontentsline{toc}{chapter}{Bibliography} 
\printbibliography[heading=bibnumbered] % <=============================

\end{document}

以及生成的 pdf(编译时没有错误,只有一个警告,来自filecontents(okay)):

由此产生的书目

如果您的编辑器未显示错误消息和警告,请检查文件mwe.log是否mwe.blg存在错误和警告。

编辑:

您的下一步是验证您的 bib 文件。

  • 将我的文件复制mwe.tex到你的电脑上,编译三次,并检查没有错误。

  • 现在复制你的第一的将文件中的 bib 条目复制PhylogeneticApproach.bib到 bib 文件中mwe.tex,编译三次并检查错误和警告。

  • 改正它们。重新编译三次并检查错误...

  • 复制第二来自文件的 bib 条目PhylogeneticApproach.bib......

  • ...

相关内容