Biblatex
有一种防止伪标点符号的机制。通常,它可以正常工作,但在xetex
某些语言中会失败。下面的 MWE 用 pdflatex 编译得很好,但用 xelatex 编译时,希腊语和俄语的大写字母后会出现双点。问题可能出在哪里?
\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@PUNCT{pat1,
location = {W.},
publisher = {U.},
usere={w.},
userf={u.},
language = {english},
hyphenation = {english},
}
@PUNCT{pat2,
location = {Ψ.},
publisher = {Ω.},
usere={ψ.},
userf={ω.},
language = {greek},
hyphenation = {greek},
}
@PUNCT{pat3,
location = {Ш.},
publisher = {Ж.},
usere={ш.},
userf={ж.},
language = {russian},
hyphenation = {russian},
}
\end{filecontents}
\documentclass{article}
\usepackage{ifxetex}
\ifxetex
%------------ XeTeX -------------------------------------
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text}
\newfontfamily\greekfont{CMU Serif}
\newfontfamily\cyrillicfont{CMU Serif}
\usepackage{polyglossia}
\setdefaultlanguage{greek}
\setotherlanguages{english,russian}
\else
%------------ pdftex ---------------------------------
\usepackage[T1,T2A,LGR]{fontenc}
\usepackage[utf8]{inputenx}
\usepackage[english,russian,greek]{babel}
\fi
\usepackage[autolang=other]{biblatex}
\addbibresource{\jobname.bib}
\DeclareBibliographyDriver{punct}{%
\printfield{usere}\addperiod
\printfield{userf}\addperiod
\printlist{location}\addperiod
\printlist{publisher}\finentry}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
答案1
该问题已在 biblatex 3.4 和 biber 2.5 的当前 DEV 版本中修复。请参阅https://github.com/plk/biblatex/issues/368。