![如何将 biblatex 与 miktex 和 texmaker 结合使用](https://linux22.com/image/331807/%E5%A6%82%E4%BD%95%E5%B0%86%20biblatex%20%E4%B8%8E%20miktex%20%E5%92%8C%20texmaker%20%E7%BB%93%E5%90%88%E4%BD%BF%E7%94%A8%20.png)
我尝试使用 LaTeX 撰写论文。我创建了一个似乎可行的基本模板。但是,现在我想使用它biblatex
来引用作者年份。但这似乎对我不起作用。我遇到了一些对我来说毫无意义的错误。
这些是向我显示的错误消息texmaker
:
这是我的代码:
%-------------------------
% Dokumentenart festlegen
%-------------------------
\documentclass[12pt,oneside,titlepage,listof=totoc,bibliography=totoc]{scrartcl}
%-------------------------
% Pakete einbinden
%-------------------------
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[babel,german=quotes]{csquotes}
\usepackage[T1]{fontenc}
\usepackage{footnote}
\usepackage{caption}
\usepackage{graphicx}
\usepackage[backend=biber,style=alphabetic,citestyle=authoryear]{biblatex}
\usepackage[nottoc]{tocbibind}
%-------------------------
% Schriftart Helvetica einstellen
%-------------------------
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\fontfamily{phv}\selectfont
%-------------------------
% Dokumenteigenschaften festlegen
%-------------------------
\usepackage[a4paper, left=4cm, right=2cm, top=2.8cm, bottom=2.3cm]{geometry}
%-------------------------
% Literaturverzeichnis festlegen
%-------------------------
\addbibresource{literatur.bib}
%-------------------------
% Kopfzeile festlegen
%-------------------------
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[R]{\thepage}
%-------------------------
% Abbildungsverzeichnis festlegen
%-------------------------
\usepackage[margin=10pt,font=small,labelfont=bf,
labelsep=endash]{caption}
\addto\captionsngerman{\renewcommand{\figurename}{Abb.}}
\newcounter{savepage}
\pagenumbering{Roman}
%-------------------------
% Dokument beginnen
%-------------------------
\begin{document}
%-------------------------
% Titelseite einbinden
%-------------------------
%\input{Kapitel/titelblatt.tex}
%-------------------------
% Abbildungsverzeichnis einfügen
%-------------------------
\listoffigures
\newpage
%-------------------------
% Tabellenverzeichnis einfügen
%-------------------------
\listoftables
\newpage
%-------------------------
% Inhaltsverzeichnis einfügen
%-------------------------
\tableofcontents
\newpage
%-------------------------
% Inhalt der Arbeit
%-------------------------
\clearpage
\setcounter{savepage}{\arabic{page}}
\pagenumbering{arabic}
\section{Einleitung}
%-------------------------
% Ein Bild einfügen
%-------------------------
%\begin{figure}
%\centering
%\includegraphics[scale=0.5]{Bilder/fomLogo.jpg}
%\caption{Ein Logo}
%\end{figure}
\subsection{Zielsetzung}
%-------------------------
% Ein Text mit Zitat
%-------------------------
\section{Grundlagen}
Hier steht ein Zitat \cite[S.102]{wurst}.
\section{Fazit}
%-------------------------
% Literaturverzeichnis
%-------------------------
\clearpage
\pagenumbering{Roman}
\setcounter{page}{\value{savepage}}
\newpage
\printbibliography
\end{document}
以下是相关的 biblatex 代码:
\usepackage[backend=biber,style=alphabetic,citestyle=authoryear]{biblatex}
\addbibresource{literatur.bib}
\begin{document}
\section{Grundlagen}
Hier steht ein Zitat \cite[S.102]{wurst}.
\printbibliography
\end{document}
还有 literatur.bib:
% 此文件由 Citavi 5.2.0.8 创建
@book{wurst,
author = {P{\"o}hm, Matthias},
year = {2015},
title = {Pr{\"a}sentieren Sie noch oder faszinieren Sie schon? Abschied vom {\dq}Betreuten Lesen{\dq} ; emotionale Rhetorik statt PowerPoint!},
address = {Bonstetten},
edition = {3. Auflage},
publisher = {{P{\"o}hm Seminarfactory}},
isbn = {3952395048}
}
此外,我在标题页上方看到了一个奇怪的页面。上面有一些像“anytanyt”这样的字母。
如果我使用具有基本设置的参考书目包,则不会出现错误,一切都很好,但我需要作者年份引文。我认为这是某种配置错误。但我不明白 :(。
使用 Texmaker 4.4.1、MikTex 2.9 和 Windows 10
更新:
这是我用 biber 编译后的日志文件 main.blg。
[0] Config.pm:327> INFO - This is Biber 2.3
[0] Config.pm:330> INFO - Logfile is 'main.blg'
[61] biber-MSWIN:284> INFO - ===
[123] Biber.pm:346> INFO - Reading 'main.bcf'
[242] Utils.pm:147> WARN - Warning: Found biblatex control file version 3.0, expected version 2.9
[243] Biber.pm:689> INFO - Found 1 citekeys in bib section 0
[251] Biber.pm:3066> INFO - Processing section 0
[312] Biber.pm:3206> INFO - Looking for bibtex format file 'literatur.bib' for section 0
[318] bibtex.pm:1062> INFO - Decoding LaTeX character macros into UTF-8
[324] bibtex.pm:923> INFO - Found BibTeX data source 'literatur.bib'
[427] UCollate.pm:66> INFO - Overriding locale 'de-DE' defaults 'variable = shifted' with 'variable = non-ignorable'
[427] UCollate.pm:66> INFO - Overriding locale 'de-DE' defaults 'normalization = NFD' with 'normalization = prenormalized'
[428] Biber.pm:2943> INFO - Sorting list 'anyt/global' of type 'entry' with scheme 'anyt' and locale 'de-DE'
[428] Biber.pm:2947> INFO - No sort tailoring available for locale 'de-DE'
[455] UCollate.pm:66> INFO - Overriding locale 'de-DE' defaults 'normalization = NFD' with 'normalization = prenormalized'
[455] UCollate.pm:66> INFO - Overriding locale 'de-DE' defaults 'variable = shifted' with 'variable = non-ignorable'
[455] Biber.pm:2943> INFO - Sorting list 'anyt' of type 'entry' with scheme 'anyt' and locale 'de-DE'
[455] Biber.pm:2947> INFO - No sort tailoring available for locale 'de-DE'
[458] bbl.pm:505> INFO - Writing 'main.bbl' with encoding 'UTF-8'
[458] bbl.pm:596> INFO - Output to main.bbl
[462] Biber.pm:107> INFO - WARNINGS: 1
更新:
我尝试更新并同步我的 MikTex 安装(它是全新下载的但没问题......)
结果如下:
我慢慢地厌倦了使用 Tex。也许使用 Linux VM 更好?
更新
如果我在 Package-Manager 中启动 Update-Wizzard,则会发生内部错误:
MiKTeX 问题报告消息:MiKTeX 遇到内部错误。数据: 来源:Programs\MiKTeX\PackageManager\MFC\MpmView.cpp 行:911 MiKTeX:2.9 操作系统:Windows 10 Home,64 位,版本 10586 调用者:RuntimeBroker SystemAdmin:是 PowerUser:否 Root0:C:\Users\sebie\AppData\Roaming\MiKTeX\2.9 Root1:C:\Users\sebie\AppData\Local\MiKTeX\2.9 Root2:C:\ProgramData\MiKTeX\2.9 Root3:C:\Program Files\MiKTeX 2.9 UserInstall:C:\Users\sebie\AppData\Roaming\MiKTeX\2.9 UserConfig:C:\Users\sebie\AppData\Roaming\MiKTeX\2.9 UserData:C:\Users\sebie\AppData\Local\MiKTeX\2.9 CommonInstall: C:\Program Files\MiKTeX 2.9 通用配置:C:\ProgramData\MiKTeX\2.9 通用数据:C:\ProgramData\MiKTeX\2.9