# Two problems with fnpct package

I'm trying to use the fnpct package. Consider the following code:

\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}


Problem 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}


Typing return it ends the compilation. Is this obe a problem related to my configuration or to the package?

Problem 2

The setting before-comma-space produces its effect, the setting before-dot-space none:

Is there anything wrong in my code?

• Problem one should be bitbucket.org/cgnieder/fnpct/issues/13/… (see also bitbucket.org/cgnieder/fnpct/issues/17/…). This is something that should be reported to and fixed by the maintainer (the first has already happened, the second not yet). See also tex.stackexchange.com/q/444898/35864 (back then this was only a warning, but now the deprecated commands cause an error). – moewe Feb 11 '19 at 16:23
• – user41063 Feb 11 '19 at 16:31
• I have a feeling that the second issue is caused by the first, but I have not yet tried the pull request to verify that. – moewe Feb 11 '19 at 16:34
• I've no idea about that connection. I'm a simple user.... – user41063 Feb 11 '19 at 16:40
• Well, as Phelype's answer suggests, my hunch was wrong. – moewe Feb 11 '19 at 16:41

As moewe said, the first problem is a deprecated behaviour of fnpct which wasn't corrected yet. The package code should be changed as described in this pull request.

The second problem (a bug in fnpct as well) is a typo in the key-val code of the package. The before-dot-space behaves the same as before-comma-space. To fix it you have to use this after you load fnpct and before \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


Then if you compile you get (besides the two errors):

MWE:

\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}

• ok thank you. Hoping that the maintainer fix this bug too in the while... – user41063 Feb 11 '19 at 16:42
• In any case, it is a pity that, it seems, with LaTeX it is almost impossible to have adequate support for kerning in the footnote using the built-in one, that is present in the font itself – user41063 Feb 11 '19 at 18:26