diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/fnpct/README | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/fnpct/fnpct_en.pdf | bin | 851328 -> 853514 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/fnpct/fnpct_en.tex | 40 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fnpct/fnpct.sty | 73 |
4 files changed, 88 insertions, 29 deletions
diff --git a/Master/texmf-dist/doc/latex/fnpct/README b/Master/texmf-dist/doc/latex/fnpct/README index b157277e92c..ee679f47fe8 100644 --- a/Master/texmf-dist/doc/latex/fnpct/README +++ b/Master/texmf-dist/doc/latex/fnpct/README @@ -1,9 +1,9 @@ -------------------------------------------------------------------------- -the FNPCT package v0.2 +the FNPCT package v0.2a footnote kerning -2012/05/26 +2012/06/01 -------------------------------------------------------------------------- Clemens Niederberger Web: https://bitbucket.org/cgnieder/fnpct/ diff --git a/Master/texmf-dist/doc/latex/fnpct/fnpct_en.pdf b/Master/texmf-dist/doc/latex/fnpct/fnpct_en.pdf Binary files differindex 8d0decec422..0ea4f478d8a 100644 --- a/Master/texmf-dist/doc/latex/fnpct/fnpct_en.pdf +++ b/Master/texmf-dist/doc/latex/fnpct/fnpct_en.pdf diff --git a/Master/texmf-dist/doc/latex/fnpct/fnpct_en.tex b/Master/texmf-dist/doc/latex/fnpct/fnpct_en.tex index 2a5dc365c38..f26a6a04d6e 100644 --- a/Master/texmf-dist/doc/latex/fnpct/fnpct_en.tex +++ b/Master/texmf-dist/doc/latex/fnpct/fnpct_en.tex @@ -3,7 +3,7 @@ % % footnote kerning % -% 2012/05/25 +% 2012/06/01 % -------------------------------------------------------------------------- % Clemens Niederberger % Web: https://bitbucket.org/cgnieder/fnpct/ @@ -297,7 +297,7 @@ Like all options it can also be set using the setup command. \end{beispiel} \secidx*{basics} -\subsection{Temporarily disable switching}\secidx{disable switching} +\subsection{Temporarily disable or enable switching}\secidx{disable switching} One maybe want to put some footnote marks \emph{before} the punctuation and some after, for example because the first one describes a single word but the second one a whole sentence. For this purpose \fnpct adds a \code{*} argument to \cmd{footnote} @@ -310,12 +310,21 @@ and \cmd{footnotemark}. The complete new syntax now is as follows: added. \code{<tpunct>} is the optional trailing punctuation mark. \end{beschreibung} The \code{*} argument temporarily turns off the punctuation/footnote switching. +In case you set \key{punct-after}{true} the \code{*} argument temporarily +\emph{enables} the switching. \begin{beispiel} \begin{minipage}{.4\linewidth} \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 bricks\footnote{probably fired clay bricks}. + \end{minipage}\hfil + \setfnpct{punct-after} + \begin{minipage}{.4\linewidth} + \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 bricks\footnote{probably fired clay bricks}. \end{minipage} \end{beispiel} \secidx*{disable switching} @@ -329,38 +338,52 @@ with the \cmd{setfnpct} command. Most of them are for adjusting the kerning. \option{add-punct-marks}{<mark>[<space after>][<space before>]} add another punctuation mark for the position switching and spacify kerning if necessary. An existing entry will be overwritten. This option accepts list of marks. + % \option{remove-punct-marks}{<mark>} remove punctuation mark from the kerning/position switching behaviour. This option accepts a list of marks. + % \option{after-dot-space}{<dim>} space to be inserted after a footnote mark and before the full stop (``footnote \emph{after} dot''). A negative space will move the full stop further to the footnote mark. Default = \code{-.06em} + % \option{after-comma-space}{<dim>} space to be inserted after a footnote mark and before the comma (``footnote \emph{after} comma''). A negative space will move the comma further to the footnote mark. Default = \code{-.06em} + % \option{after-punct-space}{<dim>} set \emph{all} spaces, \ie also the ones for marks you've added with \key{add-punct-marks}. + % \option{punct-after}{\default{true}/false} when \code{true} the punctuation sign - will be placed \emph{after} the footnote. + will be placed \emph{after} the footnote Default = \code{false}. + % \option{before-dot-space}{<dim>} space to be inserted after a footnote mark and before the full stop (``footnote \emph{before} dot''), \ie with \key{punct-after}{true}. Default = \code{-.15em} + % \option{before-comma-space}{<dim>} space to be inserted after a footnote mark and before the comma (``footnote \emph{before} comma''), \ie with \key{punct-after}{true}. Default = \code{-.15em} + % \option{before-punct-space}{<dim>} set \emph{all} spaces, \ie also the ones for marks you've added with \key{add-punct-marks}. + % \option{before-footnote-space}{<dim>} space to be inserted between a word and the following footnote mark. Default = \code{.06em} + % \option{dont-mess-around} sets all mentioned lengths to \code{0pt} and \key{punct-after}{true}. Basically this is as if you hadn't loaded \fnpct except the multiple footnote commands and \cmd{innernote} are still available, see sections \ref{sec:multiple} and \ref{sec:nested}, respectively. + % \option{multiple}{\default{true}/false} lets \cmd{footnote} be equal to - \cmd{multfootnote} + \cmd{multfootnote}. Default = \code{false} + % \option{mult-fn-delim}{<delimiter>} sets the delimiter for the \cmd{multfootnote} - command. + command. Default = \code{;} + % \option{mult-fn-sep}{<separator>} sets the separator between multiple footnote - marks. + marks. Default = \code{,} + % \option{normal-marks}{\default{true}/false} sets the footnote marks in the foot not as superscripts but as normal font. If you're not using a \paket[koma-script]{KOMA-Script} class this option will load the package \paket*{scrextend}. See section \ref{sec:normal} @@ -621,7 +644,8 @@ the output of this code: later: \begin{beschreibung} \befehl{writeinnernotes} writes all \cmd{footnotetext}s to the inner footnotes - when invoked + when invoked. This is usually done automatically by the \cmd{footnote} command + but there are possible needs for it. \end{beschreibung} See figure \ref{fig:nested:c} for the output of the following code: \begin{beispiel}[code only] @@ -803,7 +827,7 @@ Everything else stays the same: The \paket{fixfoot} \cite{fixfoot} package provides a possibility to create repeating footnotes. \fnpct supports this package provided you take care of the following: -\setapart{\cmd{DeclareFixedFootnote} only in the preamble but \emph{after} loading +\setapart{Use \cmd{DeclareFixedFootnote} only in the preamble but \emph{after} loading \fnpct.} \cmd{DeclareFixedFootnote}{\cmd{cs}}\ma{<footnote text>} is used to store the diff --git a/Master/texmf-dist/tex/latex/fnpct/fnpct.sty b/Master/texmf-dist/tex/latex/fnpct/fnpct.sty index 69c64889915..b7ba77d68c1 100644 --- a/Master/texmf-dist/tex/latex/fnpct/fnpct.sty +++ b/Master/texmf-dist/tex/latex/fnpct/fnpct.sty @@ -3,7 +3,7 @@ % % footnote kerning % -% 2012/05/26 +% 2012/06/01 % -------------------------------------------------------------------------- % Clemens Niederberger % Web: https://bitbucket.org/cgnieder/fnpct/ @@ -32,8 +32,8 @@ \RequirePackage { xparse , l3keys2e , scrlfile } \ProvidesExplPackage {fnpct} - {2012/05/26} - {0.2} + {2012/06/01} + {0.2a} {footnote kerning} % -------------------------------------------------------------------------- @@ -98,9 +98,10 @@ % basic booleans for punctuation order switch and multiple footnotes \bool_new:N \l_fnpct_punct_after_bool +\bool_new:N \l_fnpct_dont_mess_around_bool \bool_new:N \l_fnpct_multiple_default_bool \bool_new:N \l_fnpct_multiple_footnotes_bool -\bool_new:N \l_fnpct_dont_switch_bool +\bool_new:N \l_fnpct_reverse_switch_bool \bool_new:N \l_fnpct_bigfoot_default_top_bool \bool_new:N \l_fnpct_normal_marks_bool @@ -213,6 +214,7 @@ { \prop_put:Nnn \l_fnpct_punctuation_marks_before_prop { ##1 } { 0pt } } \dim_zero:N \l_fnpct_before_footnote_dim \bool_set_true:N \l_fnpct_punct_after_bool + \bool_set_true:N \l_fnpct_dont_mess_around_bool \fnpct_dont_mess_around: , mult-fn-delim .tl_set:N = \l_fnpct_multiple_footnotes_delimiter_tl , mult-fn-sep .tl_set:N = \l_fnpct_multiple_footnote_separator_tl , @@ -280,6 +282,30 @@ \cs_generate_variant:Nn \fnpct_check_punctuation_auxi:nTF { V } \cs_generate_variant:Nn \peek_meaning_remove:NTF { V } +% check which mode is active: +\cs_new:Npn \fnpct_punct_if_after:TF #1#2 + { + \bool_if:nTF + { + \bool_xor_p:nn + { \l_fnpct_punct_after_bool } + { \l_fnpct_reverse_switch_bool } + } + { #1 } + { #2 } + } + +\cs_new:Npn \fnpct_punct_if_after:T #1 + { + \bool_if:nT + { + \bool_xor_p:nn + { \l_fnpct_punct_after_bool } + { \l_fnpct_reverse_switch_bool } + } + { #1 } + } + % this is where the magic happens: % #1: original command % #2: optional argument of original command @@ -291,10 +317,15 @@ % if a punctuation mark follows remove it, insert dot, skip back % and then insert footnote \fnpct_no_break: - \IfBooleanT { #5 } { \bool_set_true:N \l_fnpct_dont_switch_bool } + \bool_if:NF \l_fnpct_dont_mess_around_bool + { \IfBooleanT { #5 } { \bool_set_true:N \l_fnpct_reverse_switch_bool } } \fnpct_check_punctuation:TF { - \bool_if:nTF { \l_fnpct_punct_after_bool || \l_fnpct_dont_switch_bool } + % A: after=1 && reverse=0 + % after=0 && reverse=1 + % B: after=1 && reverse=1 + % after=0 && reverse=0 + \fnpct_punct_if_after:TF { \fnpct_no_break: \skip_horizontal:N \l_fnpct_before_footnote_dim } { \tl_use:N \l_fnpct_current_punct_mark_tl @@ -305,7 +336,7 @@ } \fnpct_write_note:Nnnn #1 { #2 } { #3 } { #4 } \fnpct_write_inner:N #1 - \bool_if:nT { \l_fnpct_punct_after_bool || \l_fnpct_dont_switch_bool } + \fnpct_punct_if_after:T { \prop_get:NVNT \l_fnpct_punctuation_marks_before_prop \l_fnpct_current_punct_mark_tl \l_tmpa_dim @@ -313,7 +344,7 @@ \fnpct_no_break: \tl_use:N \l_fnpct_current_punct_mark_tl } - \bool_set_false:N \l_fnpct_dont_switch_bool + \bool_set_false:N \l_fnpct_reverse_switch_bool } { % what about multiple footnotes? (their usage is discouraged with @@ -331,7 +362,7 @@ \fnpct_write_inner:N #1 \fnpct_no_break: \textsuperscript { \l_fnpct_multiple_footnote_separator_tl } - % \bool_set_false:N \l_fnpct_dont_switch_bool + % \bool_set_false:N \l_fnpct_reverse_switch_bool } { % else insert space and then note @@ -340,7 +371,7 @@ { \fnpct_no_break: \skip_horizontal:N \l_fnpct_before_footnote_dim } \fnpct_write_note:Nnnn #1 { #2 } { #3 } { #4 } \fnpct_write_inner:N #1 - \bool_set_false:N \l_fnpct_dont_switch_bool + \bool_set_false:N \l_fnpct_reverse_switch_bool } } } @@ -356,7 +387,8 @@ % #3: multiple notes separated by \l_fnpct_multiple_footnotes_delimiter_tl \cs_new_protected:Npn \fnpct_mult_note:Nnn #1#2#3 { - \IfBooleanT { #2 } { \bool_set_true:N \l_fnpct_dont_switch_bool } + \bool_if:NF \l_fnpct_dont_mess_around_bool + { \IfBooleanT { #2 } { \bool_set_true:N \l_fnpct_reverse_switch_bool } } % split input: \seq_set_split:NVn \l_fnpct_multiple_footnotes_seq \l_fnpct_multiple_footnotes_delimiter_tl @@ -365,7 +397,7 @@ % look for punctuation mark and do magic: \fnpct_check_punctuation:TF { - \bool_if:nTF { \l_fnpct_punct_after_bool || \l_fnpct_dont_switch_bool } + \fnpct_punct_if_after:TF { \fnpct_no_break: \skip_horizontal:N \l_fnpct_before_footnote_dim } { \tl_use:N \l_fnpct_current_punct_mark_tl @@ -375,7 +407,7 @@ { \skip_horizontal:N \l_tmpa_dim } } \fnpct_write_notes:N #1 - \bool_if:nT { \l_fnpct_punct_after_bool || \l_fnpct_dont_switch_bool } + \fnpct_punct_if_after:T { \prop_get:NVNT \l_fnpct_punctuation_marks_before_prop \l_fnpct_current_punct_mark_tl \l_tmpa_dim @@ -383,7 +415,7 @@ \fnpct_no_break: \tl_use:N \l_fnpct_current_punct_mark_tl } - \bool_set_false:N \l_fnpct_dont_switch_bool + \bool_set_false:N \l_fnpct_reverse_switch_bool } { % else insert space and notes: @@ -395,7 +427,7 @@ \bool_set_true:N \l_fnpct_multiple_footnotes_bool \fnpct_no_break: \skip_horizontal:N \l_fnpct_before_footnote_dim \fnpct_write_notes:N #1 - \bool_set_false:N \l_fnpct_dont_switch_bool + \bool_set_false:N \l_fnpct_reverse_switch_bool \textsuperscript { \l_fnpct_multiple_footnote_separator_tl } } { @@ -403,7 +435,7 @@ { \bool_set_false:N \l_fnpct_multiple_footnotes_bool } { \fnpct_no_break: \skip_horizontal:N \l_fnpct_before_footnote_dim } \fnpct_write_notes:N #1 - \bool_set_false:N \l_fnpct_dont_switch_bool + \bool_set_false:N \l_fnpct_reverse_switch_bool } } } @@ -469,7 +501,7 @@ \IfNoValueTF { #1 } { % TODO: maybe detect what type of note we're in and use the appropriate mark? - % Ot provide a user interface to choose the appropriate mark? + % Or provide a user interface to choose the appropriate mark? \fnpct_orig_footnotemark:w \prop_gput:Nxn \g_fnpct_inner_footnote_prop { \thefootnote } { #2 } \bool_if:NT \l_fnpct_hyperref_bool @@ -890,10 +922,12 @@ 2012/05/23 v0.1a - \AdaptNoteNoMult, \AdaptNoteOpt, \AdaptNoteOptNoMult - support `sidenotes' package - better support for citing commands - - error checking in the \Adapt<sth> commands + - error checking in the \AdaptNote<sth> commands - package option `strict' 2012/05/26 v0.2 - added possibility to add punctuation marks to the switching/kerning mechansim (or remove them) +2012/06/01 v0.2a - * switches behaviour also with `punct-after=true' + - `dont-mess-around' disables * % -------------------------------------------------------------------------- % NOTES: @@ -902,4 +936,5 @@ % -------------------------------------------------------------------------- % TODO: -- solve incompatibility with the `footnote' package
\ No newline at end of file +- solve incompatibility with the `footnote' package +- get this working (??) => http://tex.stackexchange.com/questions/54288/nested-endnotes
\ No newline at end of file |