我正在尝试使用 fnpct 包。考虑以下代码:
\documentclass[a4paper,12pt]{article}
\usepackage{fontspec}
\usepackage[italian]{babel}
\babelfont[italian]{rm}[Ligatures=TeX,Numbers={Proportional,OldStyle},RawFeature=+calt]{Source Serif Pro}
\usepackage{realscripts}
\usepackage[punct-after=true]{fnpct}
\setfnpct{before-dot-space={1em},before-comma-space={1em}}
\begin{document}
Text\footnote{xxxx}. Other text
Text\footnote{xxxx}, other text
Text\footnote{xxxx}: other text
Text\footnote{xxxx}; other text
Text\footnote{xxxx}. Other text
Text\footnote{xxxx}. Other text
\end{document}
问题 1
在编译期间我收到这些神秘的警报:
! LaTeX3 Error: Variant form 'V' deprecated for base form
(LaTeX3) '\peek_meaning_remove:NTF'. One should not change an
(LaTeX3) argument from type 'N' to type 'V': base form only accepts a
(LaTeX3) single token argument.
Type <return> to continue.
...
l.319 ...e_variant:Nn \peek_meaning_remove:NTF { V }
?
! LaTeX3 Error: Variant form 'V' deprecated for base form
(LaTeX3) '\token_if_eq_meaning:NNTF'. One should not change an
(LaTeX3) argument from type 'N' to type 'V': base form only accepts a
(LaTeX3) single token argument.
Type <return> to continue.
...
l.355 ...te_variant:Nn \token_if_eq_meaning:NNTF {V}
打字返回编译就此结束。这是与我的配置或软件包相关的问题吗?
问题 2
设置before-comma-space
产生效果,设置before-dot-space
无:
我的代码有什么问题吗?
答案1
正如 moewe 所说,第一个问题是一种fnpct
尚未纠正的弃用行为。应按照以下说明更改包代码:此请求请求。
第二个问题(fnpct
也是 中的一个错误)是包的 key-val 代码中的拼写错误。 的before-dot-space
行为与 相同before-comma-space
。 要修复它,您必须在加载之后fnpct
和 之前使用它\setfnpct
:
\ExplSyntaxOn
\keys_define:nn { fnpct }
{
before-dot-space .code:n = % In the package ↓ this is a ,
\fnpct_set_punctuation_dim:nnn { before } { . } { #1 } ,
}
\ExplSyntaxOff
然后如果你编译,你会得到(除了两个错误):
梅威瑟:
\documentclass[a6paper,12pt]{article}
\usepackage[a6paper]{geometry}
% \usepackage{fontspec}
\usepackage[italian]{babel}
% \babelfont[italian]{rm}[Ligatures=TeX,Numbers={Proportional,OldStyle},RawFeature=+calt]{Source Serif Pro}
% \usepackage{realscripts}
\usepackage[punct-after=true]{fnpct}
\ExplSyntaxOn
\keys_define:nn { fnpct }
{
before-dot-space .code:n =
\fnpct_set_punctuation_dim:nnn { before } { . } { #1 } ,
}
\ExplSyntaxOff
\setfnpct{before-dot-space={1em},before-comma-space={1em}}
\begin{document}
\pagestyle{empty}
Text\footnote{xxxx}. Other text
Text\footnote{xxxx}, other text
Text\footnote{xxxx}: other text
Text\footnote{xxxx}; other text
Text\footnote{xxxx}. Other text
Text\footnote{xxxx}. Other text
\end{document}