2

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?

5

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
    ok thank you. Hoping that the maintainer fix this bug too in the while... – user41063 Feb 11 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 at 18:26

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.