我想使用提供的解决方案Biblatex:在“在线”字段中添加时间信息并在网址前面添加标签 我尝试启动 Guido 提供的最小示例,但参考书目未出现在 PDF 文件中。我创建了一个新的 Tex 文件并插入了此
\documentclass[a4paper,
oneside,
12pt,
bibliography=totocnumbered,
listof=totocnumbered
]{scrreprt}
\usepackage[english, ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[babel,german=quotes]{csquotes}
\usepackage[automark]{scrpage2}
\usepackage[]{url}
\usepackage[backend=biber, style=authoryear, urldate=comp, dateabbrev=false]{biblatex}
\bibliography{source.bib}
\begin{filecontents}{biblatex-dm.cfg}
\DeclareDatamodelFields[type=field,datatype=literal,skipout=false]{urltime}
\end{filecontents}
\DeclareFieldFormat{url}{\newline\bibstring[\MakeUppercase]{url}\addcolon\addspace\url{#1}}
\DeclareFieldFormat{urltime}{#1}
\DeclareFieldFormat{urldate}{%
\iffieldundef{urlday}
{}
{\stripzeros{\thefield{urlday}}\adddot}%
\iffieldundef{urlmonth}
{}
{\stripzeros{\thefield{urlmonth}}\adddot}%
\printfield{urlyear}%
}
\renewbibmacro{url+urldate}{%
\printfield{url}\setunit{\addcomma\addspace}
\printurldate\addcomma\addspace
\printfield{urltime}}
\renewcommand{\newunitpunct}{\adddot}
\renewcommand{\labelnamepunct}{\addcomma}
\AtEveryBibitem{\clearfield{month}}
\begin{document}
Latex is science \parencite{stack}
\clearpage
\printbibliography
\end{document}
然后我创建了一个 source.bib 文件并输入以下内容:
@online{stack,
author = {Stack},
title = {Why {\LaTeX} is science},
month = {april},
year = 2012,
url = {www.tex.stackexchange.com},
urldate = {2013-04-29}
}
我使用便携式 TexMaker。我做错了什么?提前致谢
编辑:当我删除参数 backend=biber 时,参考书目似乎可见。也许我的 TexMaker 有问题。
编辑2:我确保我的两个文件(.tex 和 .bib)都已保存,然后编译 PDFLaTeX BibTeX PDFLaTeX PDFLaTeX 并显示 pdf
在 options\Configure Texmaker 中有针对 PDFLaTeX 的:“../miktex/miktex/bin/pdflatex.exe”-interaction=nonstopmode %.tex BibTeX:“../miktex/miktex/bin/bibtex.exe”%.aux
编译器每次都说进程正常退出,但是有一些蓝色错误(我猜是小错误),例如:
LaTeX Warning: File `biblatex-dm.cfg' already exists on the system.
LaTeX Warning: Citation 'stack' on page 1 undefined on input line 49.
[1
{C:/Users/as24707/Documents/latex_portable/latex_portable/miktex/pdftex/config/
pdftex.map}]
LaTeX Warning: Empty bibliography on input line 54.
(P:\fd\ProdDev\BE\Externe-User\Sawicki_Adam_as24707\Diplom\LaTex\test\Test1.aux
)
LaTeX Warning: There were undefined references.
Package biblatex Warning: Please (re)run Biber on the file:
(biblatex) Test1
(biblatex) and rerun LaTeX afterwards.
Package logreq Info: Writing requests to 'Test1.run.xml'.
)
编辑 3:我的 TexMaker 是 1.9.9 版,已经过时了。我正在尝试设置 4.1 版。我稍后会回来告诉你进展如何。非常感谢你迄今为止提供的所有帮助:)
编辑 4:好吧,我还远远没有准备好。我安装了 Miktex 和 Texmaker 的便携版本。Bib(la)Tex 中的条目:Biber % 不起作用,所以我点击了蓝色文件夹按钮并浏览了 Biber 文件。现在它看起来像这样“C:/Users/as24707/Documents/latex_portable/latex_portable/MikTex/miktex/bin/biber.exe”%
当我在实际文档上使用 f11 时,我收到通知,提示我应该使用 biber(我的文件未正确调整 jet)。在上面主题的 MWE 上,我使用 f11 并获取以下日志
Process started
Use of uninitialized value $llabel in concatenation (.) or string at Biber.pm line 1851.
Use of uninitialized value $llabel in concatenation (.) or string at Biber.pm line 1865. Use of uninitialized value $llabel in concatenation (.) or string at Biber.pm line 1880.
Use of uninitialized value $llabel in concatenation (.) or string at Biber.pm line 2689.
Use of uninitialized value $llabel in concatenation (.) or string at Biber.pm line 2820.
Use of uninitialized value $llabel in concatenation (.) or string at Biber.pm line 1887.
Use of uninitialized value in string eq at Biber/Output/bbl.pm line 477.
Use of uninitialized value in string eq at Biber/Output/bbl.pm line 477. Use of uninitialized value in string eq at Biber/SortLists.pm line 77. Use of uninitialized value $label in string eq at Biber/SortLists.pm line 77. Use of uninitialized value $listlabel in concatenation (.) or string at Biber/Output/bbl.pm line 491. Use of uninitialized value $listlabel in concatenation (.) or string at Biber/Output/bbl.pm line 493.
INFO - This is Biber 1.4 INFO - Logfile is 'Test1.blg' INFO - Reading 'Test1.bcf' WARN - Warning: Found biblatex control file version 1.7, expected version 2.2 INFO - Found 1 citekeys in bib section 0 INFO - Processing section 0 INFO - Looking for bibtex format file 'source.bib' for section 0 INFO - Decoding LaTeX character macros into UTF-8 INFO - Found BibTeX data source 'source.bib' WARN - Labelname candidate 'shortauthor' is not a name field - skipping WARN - Labelname candidate 'author' is not a name field - skipping WARN - Labelname candidate 'shorteditor' is not a name field - skipping WARN - Labelname candidate 'editor' is not a name field - skipping WARN - Labelname candidate 'translator' is not a name field - skipping INFO - Overriding locale 'English_United States.1252' default tailoring 'variable = shifted' with 'variable = non-ignorable' INFO - Sorting 'entry' list '' keys INFO - No sort tailoring available for locale 'English_United States.1252' INFO - Writing 'Test1.bbl' with encoding 'UTF-8' INFO - Output to Test1.bbl INFO - WARNINGS: 6
Process exited normally
不幸的是,参考书目仍然不存在:(