在 Windows 上翻译文档时,它按预期工作。但在我的 Mac 和 biber 上,它会产生这种情况。你知道为什么以及如何解决这个问题吗?
%\documentclass[12pt,oneside,ngerman,english,reqno,a4paper]{article}
\documentclass[
paper=a4,
fontsize=12pt,
BCOR10mm, % binding offset
DIV=14, % how much margin
parskip,
headsepline,
final]{scrbook}
\renewcommand*{\headfont}{\normalfont}
\usepackage[style=numeric,maxbibnames=12,maxcitenames=10,backend=biber]{biblatex}
\bibliography{thesis}
\usepackage[utf8]{inputenc}
\usepackage{amsmath, amsthm} % ams stuff should be before font loading
\usepackage{lmodern}
\usepackage[T1]{fontenc} % should be after font loading
\usepackage{babel}
\usepackage[hidelinks]{hyperref}
\usepackage{bbm}
\usepackage{latexsym}
\usepackage{ragged2e}
\usepackage{scrhack}
\usepackage{longtable}
% math symbol related
\usepackage{amssymb, amstext}
%\usepackage{amsmath}
\usepackage{cases}
% Automatic brackets and context-dependent presentation
\usepackage{scalerel, stackengine}
% general typography
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage[T1]{fontenc}
\usepackage[activate={true,nocompatibility}, babel]{microtype}
\usepackage{textcomp}
\usepackage{siunitx}
\sisetup{binary-units=true}
\usepackage[style=english]{csquotes}
% layout
%\usepackage[twoside, bindingoffset=8mm, left=20mm, right=40mm, top=28mm, bottom=120mm]{geometry}
%\usepackage[twoside, bindingoffset=8mm, left=20mm, right=40mm, top=28mm, bottom=57mm]{geometry}
\usepackage[bottom]{footmisc}
\usepackage{changepage}
% figures and tables
\usepackage{etoolbox}
\usepackage{enumitem}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{wrapfig}
\usepackage{subcaption}
\usepackage{pgfplots}
\usepgfplotslibrary{units}
\usepackage{booktabs}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,positioning}
\usetikzlibrary{shapes.misc}
\usetikzlibrary{shapes,arrows,chains}
\tikzstyle{line} = [draw, -latex']
\usepackage{pgf-pie}
\usetikzlibrary{positioning, % For easy node-relative placements
automata,
decorations.markings,
shapes.geometric,
arrows.meta, patterns}
\usepackage{listings}
\usepackage{courier}
\usepackage{algorithm}
\usepackage{algpseudocode}
\newcommand*\Let[2]{\State #1 $\gets$ #2}
\newcommand*\Lett[4]{\State #1 $\gets$ #2, #3 $\gets$ #4}
\algrenewcommand\algorithmicrequire{\textbf{Input:}}
\algrenewcommand\algorithmicensure{\textbf{Output:}}
\usepackage{setspace}
\usepackage{relsize}
\usepackage{booktabs}
\definecolor{lightmauve}{rgb}{0.86, 0.82, 1.0}
\usepackage{numprint}
\npthousandsep{\,}
\usepackage{mathdots}
\usepackage[capitalise]{cleveref}
%\usepackage{typearea} % custom type area
% \areaset[0mm]{135mm}{210mm} % typearea configuration
% \topmargin5mm % typearea configuration
\usepackage{graphicx}
\usepackage{url}
\newcommand{\bibhighlight}[1]{\begin{center}
\begin{minipage}[c]{0.85\textwidth}\cite{#1} \fullcite{#1}.\end{minipage}
\end{center}
}
%
%
\setcounter{tocdepth}{1} % wie tief soll das Inhaltsverzeichnis auflösen
\setcounter{secnumdepth}{3} % wie tief soll gezählt werden
%% Blattlayout
%\textwidth15cm
%\textheight22cm
%\topmargin0cm
%\oddsidemargin0.5cm
%\evensidemargin0.5cm
% Einzug f"ur den Absatz
\parindent0em
\parskip0.5em
% Per SIAM Style Manual, "section" should be lowercase
%\crefname{section}{section}{sections}
%\crefname{subsection}{subsection}{subsections}
%\Crefname{section}{Section}{Sections}
%\Crefname{subsection}{Subsection}{Subsections}
% Per SIAM Style Manual, "Figure" should be spelled out in references
\Crefname{figure}{Figure}{Figures}
\crefname{figure}{Figure}{Figures}
% Per SIAM Style Manual, don't say equation in front on an equation.
\crefformat{equation}{\textup{#2(#1)#3}}
\crefrangeformat{equation}{\textup{#3(#1)#4--#5(#2)#6}}
\crefmultiformat{equation}{\textup{#2(#1)#3}}{ \textup{ and } \textup{#2(#1)#3}}
{, \textup{#2(#1)#3}}{, \textup{ and } \textup{#2(#1)#3}}
\crefrangemultiformat{equation}{\textup{#3(#1)#4--#5(#2)#6}}%
{ \textup{ and } \textup{#3(#1)#4--#5(#2)#6}}{, \textup{#3(#1)#4--#5(#2)#6}}{, \textup{ and } \textup{#3(#1)#4--#5(#2)#6}}
% But spell it out at the beginning of a sentence.
\Crefformat{equation}{#2Equation~\textup{(#1)}#3}
\Crefrangeformat{equation}{Equations~\textup{#3(#1)#4--#5(#2)#6}}
\Crefmultiformat{equation}{Equations~\textup{#2(#1)#3}}{ \textup{ and } \textup{#2(#1)#3}}
{, \textup{#2(#1)#3}}{, and \textup{#2(#1)#3}}
\Crefrangemultiformat{equation}{Equations~\textup{#3(#1)#4--#5(#2)#6}}%
{ and \textup{#3(#1)#4--#5(#2)#6}}{, \textup{#3(#1)#4--#5(#2)#6}}{, \textup{ and } \textup{#3(#1)#4--#5(#2)#6}}
% Make number non-italic in any environment.
\crefdefaultlabelformat{#2\textup{#1}#3}
%\input{latex_packages/Macros}
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
\usepackage{afterpage}
\begin{document}
\pagenumbering{Alph}
\cite{SyedSchapire2007}
\clearpage
\printbibliography
\clearpage
%\listoffigures
%\listoftables
\end{document}
和 bib 文件
@comment{ -*- bibtex-dialect: biblatex; -*-}
@InProceedings{SyedSchapire2007,
author = {Umar Syed and Robert E. Schapire},
title = {A Game-Theoretic Approach to Apprenticeship Learning},
booktitle = {Conference on Neural Information Processing System (NIPS)},
OPTcrossref = {•},
OPTkey = {•},
OPTpages = {•},
year = {2007},
OPTeditor = {•},
OPTvolume = {•},
OPTnumber = {•},
OPTseries = {•},
OPTaddress = {•},
OPTmonth = {•},
OPTorganization = {•},
OPTpublisher = {•},
OPTnote = {Available at: \url{https://papers.nips.cc/paper/3293-a-game-theoretic-approach-to-apprenticeship-learning}},
OPTannote = {•}
}
答案1
以下最小示例重现了您所看到的问题
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[
backend=biber,
style=numeric,
maxbibnames=12, maxcitenames=10,
]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
Lorem \autocite{sigfridsson}
\printbibliography
\end{document}
如果您加载babel
但未能告知它您的文档语言,biblatex
将恢复以粗体打印字符串以警告您语言设置有缺陷。您还会收到警告
Package csquotes Warning: No style for language 'nil'. (csquotes) Using fallback style on input line 14. Package biblatex Warning: Language 'nil' not supported. (biblatex) Using dummy definitions on input line 14.
解决方案是将适当的语言选项传递给babel
。对于德语文档(正如您的两\documentclass
行代码之一所暗示的那样),您可以选择ngerman
\documentclass[ngerman]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[
backend=biber,
style=numeric,
maxbibnames=12, maxcitenames=10,
]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
Lorem \autocite{sigfridsson}
\printbibliography
\end{document}