梅威瑟:
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\usepackage{polyglossia}
\setdefaultlanguage{polish}
\setotherlanguages{english}
\usepackage[style=verbose-trad1,autolang=other,language=autobib]{biblatex}
\renewcommand*{\newunitpunct}{\addcomma\space}
\AtEveryCitekey{%
\clearfield{pagetotal}}
\begin{filecontents}{\jobname.bib}
@book{plbook,
author = {Kowalski, Jan},
title = {Witamy w krainie czarów},
location = {Warszawa},
date = {1953},
pagetotal = {100},
}
@book{enbook,
editor = {Doe, John},
title = {Math},
location = {London},
date = {2020},
pagetotal = {300},
langid = {english}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
f\autocite[3]{plbook}
f\autocite[3]{enbook}
\printbibliography
\end{document}
这是我当前的设置(情况 1)。它在日期后产生额外的空格。
我还尝试了一些其他设置,仅用于测试目的,每次我都会在标有langid = {other_language}
(已用 测试langid={lithuanian,russian,english}
)的条目中得到虚假空格,而主要文档语言是波兰语。
案例: 包括\clearfield{pagetotal}
:
language=autobib
- 日期后有多余的空格language=auto
- 引用页码后的额外空格
没有\clearfield{pagetotal}
:
language=autobib
- pagetal 后面有额外空格language=auto
- 引用页码后的额外空格
我是否做错了什么,或者这是一个错误polyglossia
?biblatex
更新:系统:TexLive2022 Biblatex:3.18 Biber:2.18 Polyglossia:1.56 使用 LuaLaTeX 编译
答案1
在 LuaTeX 分支中应该有一个in%
的定义。请参阅\polish@vlna
gloss-polish.ldf
https://github.com/reutenauer/polyglossia/pull/550。
在等待修复发布到 CTAN 期间,以下定义应避免出现不必要的空格。请注意,此定义仅适用于 LuaLaTeX。我没有复制 XeLaTeX 和测试的定义。
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
%\usepackage[english,polish]{babel}
\usepackage{polyglossia}
\setdefaultlanguage{polish}
\setotherlanguages{english}
\usepackage[style=verbose-trad1,autolang=other,language=autobib]{biblatex}
\renewcommand*{\newunitpunct}{\addcomma\space}
\AtEveryCitekey{%
\clearfield{pagetotal}}
\makeatletter
\def\polish@vlna{%
\singlechars{polish}{AaIiOoUuWwZz}%
\preventsingleon}
\makeatother
\begin{filecontents}{\jobname.bib}
@book{plbook,
author = {Kowalski, Jan},
title = {Witamy w krainie czarów},
location = {Warszawa},
date = {1953},
pagetotal = {100},
}
@book{enbook,
editor = {Doe, John},
title = {Math},
location = {London},
date = {2020},
pagetotal = {300},
langid = {english}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
f\autocite[3]{plbook}
f\autocite[3]{enbook}
\printbibliography
\end{document}