3

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

During compilation I receive these for me mysterious alerts for me:

! 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:

enter image description here

Is there anything wrong in my code?

6
  • 1
    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, 2019 at 16:23
  • 1
    Reported: bitbucket.org/cgnieder/fnpct/issues/18/…
    – user41063
    Feb 11, 2019 at 16:31
  • 1
    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, 2019 at 16:34
  • I've no idea about that connection. I'm a simple user....
    – user41063
    Feb 11, 2019 at 16:40
  • 1
    @moewe It's actually just a typo, not related to the first problem. I commented on the issue reported. As for the first problem, from what I understand the code still works, even with those two errors, as the argument that goes to (the incorrect) \peek_meaning_remove:VTF is assured to be a single token, so it works by chance :) Feb 11, 2019 at 16:42

1 Answer 1

6

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):

enter image description here

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}
2
  • 3
    ok thank you. Hoping that the maintainer fix this bug too in the while...
    – user41063
    Feb 11, 2019 at 16:42
  • 1
    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, 2019 at 18:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .