summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fnpct/fnpct.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-01-24 23:24:01 +0000
committerKarl Berry <karl@freefriends.org>2013-01-24 23:24:01 +0000
commit07f219760feb25e590b52ec82a8a9087fa1c648a (patch)
tree4a430831ddb613a9defd86ccedacc8fa3bc41624 /Master/texmf-dist/tex/latex/fnpct/fnpct.sty
parentea1f867d5296c28ebfe1cfdefb561cf1fc107b0e (diff)
fnpct
git-svn-id: svn://tug.org/texlive/trunk@28938 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/fnpct/fnpct.sty')
-rw-r--r--Master/texmf-dist/tex/latex/fnpct/fnpct.sty66
1 files changed, 45 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/fnpct/fnpct.sty b/Master/texmf-dist/tex/latex/fnpct/fnpct.sty
index 0099729df06..d0face4c1bd 100644
--- a/Master/texmf-dist/tex/latex/fnpct/fnpct.sty
+++ b/Master/texmf-dist/tex/latex/fnpct/fnpct.sty
@@ -8,7 +8,7 @@
% Web: https://bitbucket.org/cgnieder/fnpct/
% E-Mail: contact@mychemistry.eu
% --------------------------------------------------------------------------
-% Copyright 2012 Clemens Niederberger
+% Copyright 2012-2013 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -31,8 +31,8 @@
\RequirePackage { xparse , l3keys2e , scrlfile }
\ProvidesExplPackage
{fnpct}
- {2012/08/27}
- {0.2f}
+ {2013/01/21}
+ {0.2i}
{footnote kerning}
% --------------------------------------------------------------------------
@@ -97,8 +97,8 @@
\tl_new:N \l_fnpct_multiple_footnotes_delimiter_tl
\tl_set:Nn \l_fnpct_multiple_footnotes_delimiter_tl { ; }
\tl_new:N \l_fnpct_multiple_footnote_separator_tl
-% check for KOMA-Script's or anyone's \multfootsep:
-\cs_if_exist:NTF \multfootsep
+% check for KOMA-Script's \multfootsep:
+\cs_if_exist:NTF \KOMAClassName
{ \tl_set:Nn \l_fnpct_multiple_footnote_separator_tl { \multfootsep } }
{ \tl_set:Nn \l_fnpct_multiple_footnote_separator_tl { , } }
@@ -484,14 +484,15 @@
}
\cs_generate_variant:Nn \fnpct_mult_note:Nnn { cnn }
+\int_new:N \l_fnpct_multiple_notes_int
% #1: original note command
\cs_new_protected:Npn \fnpct_write_notes:N #1
{
- \int_zero:N \l_fnpct_tmpa_int
+ \int_zero:N \l_fnpct_multiple_notes_int
\seq_map_inline:Nn \l_fnpct_multiple_footnotes_seq
{
\fnpct_read_note_with_option:w ##1 \q_stop { #1 }
- \int_incr:N \l_fnpct_tmpa_int
+ \int_incr:N \l_fnpct_multiple_notes_int
}
}
@@ -507,10 +508,14 @@
{
\bool_if:nT
{
- \int_compare_p:n { \l_fnpct_tmpa_int > 0 }
+ \int_compare_p:n { \l_fnpct_multiple_notes_int > 0 }
&&
\int_compare_p:n
- { \l_fnpct_tmpa_int < \seq_count:N \l_fnpct_multiple_footnotes_seq }
+ {
+ \l_fnpct_multiple_notes_int
+ <
+ \seq_count:N \l_fnpct_multiple_footnotes_seq
+ }
}
{
\IfBooleanTF { #1 }
@@ -663,7 +668,10 @@
{ \cs_set_eq:NN #1 #3 }
{
\RenewDocumentCommand #1 { s+m }
- { \fnpct_handle_note:Nnnnn #2 { \q_no_value } { \q_no_value } { ##2 } { ##1 } }
+ {
+ \fnpct_handle_note:Nnnnn #2 { \q_no_value } { \q_no_value }
+ { ##2 } { ##1 }
+ }
}
}
\cs_generate_variant:Nn \fnpct_renew_and_mult_no_opt:NNN { ccc }
@@ -816,12 +824,13 @@
%% the `sidenotes' package:
\fnpct_treatment:nn { sidenotes }
{
- \AdaptNote \sidenote \multsidenote
+ \AdaptNoteOpt \sidenote \multsidenote
\AdaptNoteMark \sidenotemark
- \AdaptNoteOpt \sidecite \multsidecite
+% \AdaptNoteOpt \sidecite \multsidecite
}
%% the `parnotes' package:
- \fnpct_treatment:nn { parnotes } { \AdaptNote \parnote \multparnote }
+ \fnpct_treatment:nn { parnotes }
+ { \AdaptNote \parnote \multparnote }
%% the `pagenote' package:
\fnpct_treatment:nn { pagenote }
{
@@ -845,10 +854,10 @@
}
\prop_if_in:NnT \l_fnpct_footnote_class_prop { default }
{
- % re-set basics:
- \cs_set_eq:NN \footnote \footnotedefault
- \cs_set_eq:NN \footnotemark \footnotemarkdefault
- \cs_set_eq:NN \multfootnote \multfootnotedefault
+ % re-set basics:
+ \cs_set_eq:NN \footnote \footnotedefault
+ \cs_set_eq:NN \footnotemark \footnotemarkdefault
+ \cs_set_eq:NN \multfootnote \multfootnotedefault
}
}
%% the `fixfoot' package:
@@ -930,21 +939,31 @@
% aaand... the `sepfootnotes' package:
\prop_new:N \l_fnpct_sepfootnote_foot_classes_prop
\prop_new:N \l_fnpct_sepfootnote_end_classes_prop
+\prop_new:N \l_fnpct_sepfootnote_symbol_classes_prop
\fnpct_special_treatment:nn { sepfootnotes }
{
- \cs_new_eq:NN \fnpct_orig_new_footnotes:n \newfootnotes
+ \cs_new_eq:NN \fnpct_orig_new_footnotes:w \newfootnotes
\cs_new_eq:NN \fnpct_orig_new_endnotes:n \newendnotes
\cs_new_eq:NN \fnpct_orig_new_symbolnotes:w \newsymbolfootnotes
- \RenewDocumentCommand \newfootnotes { m }
+ \RenewDocumentCommand \newfootnotes { sm }
{
- \prop_put:Nnn \l_fnpct_sepfootnote_foot_classes_prop { #1 } { #1 }
- \fnpct_orig_new_footnotes:n { #1 }
+ \prop_put:Nnn \l_fnpct_sepfootnote_foot_classes_prop { #2 } { #2 }
+ \IfBooleanTF { #1 }
+ { \fnpct_orig_new_footnotes:w * { #2 } }
+ { \fnpct_orig_new_footnotes:w { #2 } }
}
\RenewDocumentCommand \newendnotes { m }
{
\prop_put:Nnn \l_fnpct_sepfootnote_end_classes_prop { #1 } { #1 }
\fnpct_orig_new_endnotes:n { #1 }
}
+ \RenewDocumentCommand \newsymbolfootnotes { om }
+ {
+ \prop_put:Nnn \l_fnpct_sepfootnote_symbol_classes_prop { #2 } { #2 }
+ \IfNoValueTF { #1 }
+ { \fnpct_orig_new_symbolnotes:w { #2 } }
+ { \fnpct_orig_new_symbolnotes:w [ #1 ] { #2 } }
+ }
}
% --------------------------------------------------------------------------
@@ -991,6 +1010,11 @@
2012/07/24 v0.2e - improved scanning ahead for punctuation marks, adapted
to deprecated functions in l3kernel and l3packages
2012/08/27 v0.2f - switched to internal scratch variables
+2012/11/14 v0.2g - adapt changes in `sidenotes' package
+2013/01/18 v0.2h - bug fixed: \l_fnpct_multiple_footnote_separator_tl
+ should be { , } when `memoir' is loaded
+2013/01/21 v0.2i - adapted to changes of sepfootnotes, bug fix in reading
+ of multiple notes
% --------------------------------------------------------------------------
% NOTES: