cgnieder / fnpct Goto Github PK
View Code? Open in Web Editor NEWManage interaction between footnotes and punctuation
Manage interaction between footnotes and punctuation
Original report by Alex Ball (Bitbucket: aball, GitHub: aball).
I recently upgraded my TeX Live from 2017 to 2018, and something that had previously worked fine stopped working.
#!latex
\documentclass{standalone}
\usepackage[utf8]{luainputenc}
\usepackage{newtxtext}
\usepackage{fnpct}
\begin{document}
‘Hello World!’
\end{document}
This fails with the error:
! Illegal parameter number in definition of \c__tl_i_ogonek_tl.
<to be read again>
\crcr
l.24751 \__tl_tmp:w \c__tl_i_ogonek_tl { 012F }
This is not a big deal as it is only triggered when fnpct is loaded after the other two. But I wanted to report it in case it was symptomatic of something strange going on (e.g. with changes in expl3).
Original report by Frank Mittelbach (Bitbucket: FMittelbach, ).
The package footnoterange supports generating consecutive footnotes and then displays their markers as something like \textsuperscript{2--5}
instead of \textsuperscript{2,3,4,5}
.
Given that fnpct has the right machinery already in place, it would be nice if \multfootnote
could examine its argument and if there are more than 2 footnotes produce a range (hyperlinked) rather than a sequence based on the setting of an option.
Original report by Panteleimon Korolev (Bitbucket: pantlmn, GitHub: pantlmn).
An attempt to use both fnpct and xespotcolor (for documents using PANTONE colors) gives an error:
! LaTeX Error: Option clash for package color.
or:
! Package xcolor Error: Undefined color model `spotcolor'.
Original report by Anonymous.
Trying to use fnpct with polyglossia, an undefined control sequence is invariably met on \begin{document}
:
#!text
! Undefined control sequence.
<argument> \baselanguage
{French}
l.7 \begin{document}
?
! Undefined control sequence.
<argument> \baselanguage
{\languagename }
l.7 \begin{document}
?
Minimal non-working example (compile with XeLaTeX):
#!latex
\documentclass{scrartcl}
\usepackage{polyglossia}
\setmainlanguage{english}
\usepackage{fnpct}
\begin{document}
Hello\footnote{world}.
\end{document}
Output with \listfiles
:
#!text
*File List*
scrartcl.cls 2012/07/29 v3.11b KOMA-Script document class (article)
scrkbase.sty 2012/07/29 v3.11b KOMA-Script package (KOMA-Script-dependent ba
sics and keyval usage)
scrbase.sty 2012/07/29 v3.11b KOMA-Script package (KOMA-Script-independent
basics and keyval usage)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
scrlfile.sty 2012/06/15 v3.12 KOMA-Script package (loading files)
tocbasic.sty 2012/04/04 v3.10b KOMA-Script package (handling toc-files)
scrsize11pt.clo 2012/07/29 v3.11b KOMA-Script font size class option (11pt)
typearea.sty 2012/07/29 v3.11b KOMA-Script package (type area)
polyglossia.sty 2013/06/27 v1.33.4 Babel replacement for XeLaTeX and LuaTeX
etoolbox.sty 2011/01/03 v2.1 e-TeX tools for LaTeX
etex.sty 1998/03/26 v2.0 eTeX basic definition package (PEB)
makecmds.sty 2009/09/03 v1.0a extra command making commands
xkeyval.sty 2012/10/14 v2.6b package option processing (HA)
xkeyval.tex 2012/10/14 v2.6b key=value parser (HA)
fontspec.sty 2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX
expl3.sty 2013/11/19 v4610 L3 Experimental code bundle wrapper
l3names.sty 2012/12/07 v4346 L3 Namespace for primitives
l3bootstrap.sty 2013/07/28 v4581 L3 Experimental bootstrap code
l3basics.sty 2013/07/28 v4581 L3 Basic definitions
l3expan.sty 2013/08/17 v4584 L3 Argument expansion
l3tl.sty 2013/09/16 v4592 L3 Token lists
l3seq.sty 2013/07/28 v4581 L3 Sequences and stacks
l3int.sty 2013/08/02 v4583 L3 Integers
l3quark.sty 2013/07/21 v4564 L3 Quarks
l3prg.sty 2013/08/25 v4587 L3 Control structures
l3clist.sty 2013/07/28 v4581 L3 Comma separated lists
l3token.sty 2013/08/25 v4587 L3 Experimental token manipulation
l3prop.sty 2013/07/28 v4581 L3 Property lists
l3msg.sty 2013/07/28 v4581 L3 Messages
l3file.sty 2013/10/13 v4596 L3 File and I/O operations
l3skip.sty 2013/07/28 v4581 L3 Dimensions and skips
l3keys.sty 2013/07/28 v4581 L3 Experimental key-value interfaces
l3fp.sty 2013/11/18 v4601 L3 Floating points
l3box.sty 2013/07/28 v4581 L3 Experimental boxes
l3coffins.sty 2012/09/09 v4212 L3 Coffin code layer
l3color.sty 2012/08/29 v4156 L3 Experimental color support
l3luatex.sty 2013/07/28 v4581 L3 Experimental LuaTeX-specific functions
l3candidates.sty 2013/11/18 v4602 L3 Experimental additions to l3kernel
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
xparse.sty 2013/11/19 v4609 L3 Experimental document command parser
fontspec-patches.sty 2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTe
X
fixltx2e.sty 2006/09/13 v1.1m fixes to LaTeX
fontspec-xetex.sty 2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX
fontenc.sty
eu1enc.def 2010/05/27 v0.1h Experimental Unicode font encodings
eu1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
xunicode.sty 2011/09/09 v0.981 provides access to latin accents and many oth
er characters in Unicode lower plane
eu1lmss.fd 2009/10/30 v1.6 Font defs for Latin Modern
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
xetex.def 2013/04/29 v0.96 LaTeX color/graphics driver for XeTeX (RRM/JK)
fontspec.cfg
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
gloss-english.ldf polyglossia: module for english
fnpct.sty 2013/12/23 v0.4a footnote kerning
l3keys2e.sty 2013/11/19 v4608 LaTeX2e option processing using LaTeX3 keys
translations.sty 2013/07/16 v1.0 a simple translator
t3cmr.fd 2001/12/31 TIPA font definitions
translations-basic-dictionary-english.trsl (english translation file `transl
ations-basic-dictionary')
***********
I guess this was introduced by v0.4, but I don't know what package is supposed to provide \baselanguage
(since babel doesn't mention it either). My workaround now is to \def\baselanguage#1{#1}
before \begin{document}
, but that's not ideal.
When the detected language is French, fnpct attempts to use \StandardFootnotes
to restore the default footnotes format. This macro is defined by babel, but not by polyglossia, making fnpct incompatible with polyglossia in French mode.
As far as I can tell, resetting the footnotes definitions is not needed anymore for polyglossia, so just skipping calling \StandardFootnotes
when it is not defined should fix this.
Does it make sense to have the option of right aligning footnote markers in the footnote?
Here is an old article whose example has right aligned numerals:
It would seem also applicable to non-numeric footnote markers as they can take on varying glyph lengths too. Having a closer setting of the key-value pairs reduces cognitive load in maintaining that relationship.
Thank you Clemens for this wonderful Tex package!
:-)
Original report by Anonymous.
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}}
\usepackage[perpage,bottom,hang,stable,norule]{footmisc}
\begin{document}
Text\footnote{xxxx}. Other text
Text\footnote{xxxx}, other text
The setting before-comma-space produces its effect, the setting before-dot-space none:.
Original report by Anonymous.
With a recent version of latex (pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/W32TeX)) when I latex a minimal document that loads fnpct I get the following warnings:
#!
*************************************************
* LaTeX warning: "kernel/deprecated-variant"
*
* Variant form 'V' deprecated for base form '\peek_meaning_remove:NTF'. One
* should not change an argument from type 'N' to type 'V': base form only
* accepts a single token argument.
*************************************************
*************************************************
* LaTeX warning: "kernel/deprecated-variant"
*
* Variant form 'V' deprecated for base form '\token_if_eq_meaning:NNTF'. One
* should not change an argument from type 'N' to type 'V': base form only
* accepts a single token argument.
*************************************************
See Kernel deprecation warning with fnpct on StackExchange.
Original report by Anonymous.
With the .tex file attached, an unwanted line-break occurs after the number and before the dot.
#!latex
\documentclass{article}
\usepackage[punct-after=true]{fnpct}
\begin{document}
Essai e essai essai essai essai essai essai essai essai essai essai essai essai
essai\footnote{Test}.
\end{document}
Original report by Johannes Weytjens (Bitbucket: jpweytjens, GitHub: jpweytjens).
Page 25 of the manual describes how to use fnpct with the tufte-latex class. The code is
\usepackage[multiple]{fnpct}
\AdaptNote\sidenote\multsidenote
but this results in ! File ended while scanning use of \__fnpct_read_note_with_option:w
.
Removing the multiple
option and using AdaptNoteOpt
or AdaptNoteOptNoMult
does work.
This behaviour was originally mentioned at the tex stackexchange page. I answered the question over there and was wondering what explains this behaviour?
Original report by Anonymous.
Typesetting the following example gives an You can't use `\dimexpr' in horizontal mode error:
#!latex
\documentclass{article}
\usepackage{fnpct}
\begin{document}
see Author et al.\kfp\footnote{foo} and others\footnote{bar}.
\end{document}
I guess it's due to the fact that \prop_get
places the recovered value in a token list variable. If I modify \fnpct_kfp:
accordingly, the example compiles fine:
#!latex
\cs_set_protected:Npn \fnpct_kfp:
{
\fnpct_no_break:
\prop_get:NnN
\l__fnpct_punctuation_marks_before_prop { . } \l__fnpct_tmpa_tl
\prop_get:NnN
\l__fnpct_punctuation_marks_after_prop { . } \l__fnpct_tmpb_tl
\dim_set:Nn \l__fnpct_tmpa_dim { \tl_use:N \l__fnpct_tmpa_tl }
\dim_set:Nn \l__fnpct_tmpb_dim { \tl_use:N \l__fnpct_tmpb_tl }
\bool_if:NTF \l__fnpct_punct_after_bool
{ \skip_horizontal:N \l__fnpct_tmpa_dim }
{ \skip_horizontal:N \l__fnpct_tmpb_dim }
}
Original report by Anonymous.
The following example does not compile in Tex Live 2018:
\documentclass{article}
\usepackage{sidenotes}
\usepackage{fnpct}
\begin{document}
This is some body text\sidenote{And a note}.
\end{document}
Compilation fails with the the following error:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! LaTeX error: "xparse/if-boolean"
!
! Invalid use \IfBooleanTF {-NoValue-}
!
! See the LaTeX3 documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.6 This is some body text\sidenote{And a note}.
|'''''''''''''''''''''''''''''''''''''''''''''''
| The first argument of \IfBoolean(TF/T/F) must be a boolean argument obtained
| from parsing 's' or 't' arguments.
|...............................................
Original report by Anonymous.
issue 13 now results in fatal error. fncpt cannot be used with new version of latex
Is it possible to ignore commands which have no influence on the text and for TeX processing only?
Currently I have code like
\footnote{first footnote}\allowbreak{}%
\footnote{second footnote}
But with the command \allowbreak
the whole mechanism doesn't work. I know I can remove it manually but since I do some automatically processing it becomes troublesome for the followup comma and/or full stop.
Original report by Clemens Niederberger (Bitbucket: cgnieder, GitHub: cgnieder).
Maybe provide an option that lets the user choose which package gets automatically supported?
Original report by KO the typo (Bitbucket: KO-the-typo, ).
Hi,
It seems fnpct doesn't work the french option of polyglossia. Please see the following MWE:
#!latex
\documentclass{article}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\usepackage[punct-after=true]{fnpct}
\begin{document}
Test\footnote{Footnote text.}.
\end{document}
Original report by Frank Mittelbach (Bitbucket: FMittelbach, ).
fnpct does have code to handle bigfoot footnotes. However it requires a special ordering of declarations which is probably not necessary.
bigfoot uses manyfoot underneath and that stores all declared footnotes inside
a 2e list called \MFL@list
. So using that with a suitable definition for \@elt
at begin document should allow to redefine all declared footnotes (for both packages)
manyfoot is explicitly not supported. However, the bigfoot claim is not quite right and there are good reasons to use manyfoot over bigfoot in certain situations. I would therefore suggest to support it too.
Support seems trivial: if in the two places where there is a test for the bigfoot package this is replaced by testing for manyfoot then manyfoot works (and bigfoot loading manyfoot should probably work too (my checks at least indicate it does). Might need a bit of thought for the "default" class handling as that only applies to bigfoot.
Original report by Clemens Niederberger (Bitbucket: cgnieder, GitHub: cgnieder).
English spacing is not obeyed:
#!latex
\documentclass{scrartcl}
% \usepackage{fnpct}
\begin{document}
Text\footnote{a footnote}. text\par
Text.\footnote{a footnote} text\par
.Text\footnote{a footnote} text
\end{document}
fnpct
defines ´\multfootnoteand similar commands. They are not really necessary because
fnpctalso reliably detects following notes like
\footnote{aaa}\footnote{bbb}` and inserts a separator between them.
Actually, in the current implementation \multfootnote{aaa;bbb}
simply expands into \footnote{aaa}\footnote{bbb}
.
Should fnpct
keep these variants? And why?
/polls 'yes' 'no'
Original report by Clemens Niederberger (Bitbucket: cgnieder, GitHub: cgnieder).
multiple footnotes with \multfootnote
fail when babel
is used with French, probably due to some active shorthand...
Original report by Anonymous.
Using the \kfp command can lead to a linebreak between the character before the \kfp command and the footnote sign. See the following example (if you delete the \kfp command, the footnote number is on the same line as the « character):
#!latex
\documentclass{article}
\usepackage[
paperwidth=.5\textwidth,
paperheight=12\baselineskip,
margin=5pt,
bottom=1.5cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{fnpct}
\begin{document}
\noindent »The three little pigs built their houses
out of straw\footnote{not to be confused with hay},
sticks\footnote{or lumber according to some sources}
and also bricks.«\kfp\footnote{probably fired clay bricks;or
something}
\end{document}
Original report by Marijn van Vliet (Bitbucket: wmvanvliet, GitHub: wmvanvliet).
When using fnpct in combination with the sidenotes package, latex throws the following error:
! TeX capacity exceeded, sorry [input stack size=5000].
<to be read again>
\q_nil
l.8 This is a test\sidenote{like an experiment}.
Minimal working example that triggers the bug:
#!latex
\documentclass{article}
\usepackage{sidenotes}
\usepackage{fnpct}
\begin{document}
This is a test\sidenote{like an experiment}.
\end{document}
fnpct
defines ´\multfootnoteand similar commands. They are not really necessary because
fnpctalso reliably detects following notes like
\footnote{aaa}\footnote{bbb}` and inserts a separator between them.
Actually, in the current implementation \multfootnote{aaa;bbb}
simply expands into \footnote{aaa}\footnote{bbb}
.
Should fnpct
keep these variants? And why?
/polls 'yes' 'no'
For me the footnote in the text appears in front of the full stop, when I use the \footfullcite command from the biblatex package.
The following minimal example should reproduce the issue.
\documentclass{article}
\usepackage{fnpct}
\usepackage[backend=biber]{biblatex}
\begin{document}
Test\footfullcite[][]{}.
\end{document}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.