From 5c1a691dfa92a49c802beeeb7f1b193698b51216 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 23 Jan 2021 22:18:39 +0000 Subject: fnpct (23jan21) git-svn-id: svn://tug.org/texlive/trunk@57505 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/fnpct/README | 13 +- Master/texmf-dist/doc/latex/fnpct/fnpct-manual.cls | 331 +++++++ Master/texmf-dist/doc/latex/fnpct/fnpct-manual.pdf | Bin 0 -> 472808 bytes Master/texmf-dist/doc/latex/fnpct/fnpct-manual.tex | 615 ++++++++++++ Master/texmf-dist/doc/latex/fnpct/fnpct_en.pdf | Bin 573765 -> 0 bytes Master/texmf-dist/doc/latex/fnpct/fnpct_en.tex | 1044 -------------------- 6 files changed, 952 insertions(+), 1051 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/fnpct/fnpct-manual.cls create mode 100644 Master/texmf-dist/doc/latex/fnpct/fnpct-manual.pdf create mode 100644 Master/texmf-dist/doc/latex/fnpct/fnpct-manual.tex delete mode 100644 Master/texmf-dist/doc/latex/fnpct/fnpct_en.pdf delete mode 100644 Master/texmf-dist/doc/latex/fnpct/fnpct_en.tex (limited to 'Master/texmf-dist/doc/latex/fnpct') diff --git a/Master/texmf-dist/doc/latex/fnpct/README b/Master/texmf-dist/doc/latex/fnpct/README index 5a230d16e4c..c9c58a43815 100644 --- a/Master/texmf-dist/doc/latex/fnpct/README +++ b/Master/texmf-dist/doc/latex/fnpct/README @@ -1,23 +1,22 @@ -------------------------------------------------------------------------- -the FNPCT package v0.5 +the FNPCT package v1.0 2021/01/21 footnote kerning -2019/10/05 -------------------------------------------------------------------------- Clemens Niederberger -Web: https://bitbucket.org/cgnieder/fnpct/ +Web: https://github.com/cgnieder/fnpct/ E-Mail: contact@mychemistry.eu -------------------------------------------------------------------------- -Copyright 2012--2019 Clemens Niederberger +Copyright 2012--2021 Clemens Niederberger This work may be distributed and/or modified under the -conditions of the LaTeX Project Public License, either version 1.3 +conditions of the LaTeX Project Public License, either version 1.3c of this license or (at your option) any later version. The latest version of this license is in http://www.latex-project.org/lppl.txt -and version 1.3 or later is part of all distributions of LaTeX -version 2005/12/01 or later. +and version 1.3c or later is part of all distributions of LaTeX +version 2008/05/04 or later. This work has the LPPL maintenance status `maintained'. diff --git a/Master/texmf-dist/doc/latex/fnpct/fnpct-manual.cls b/Master/texmf-dist/doc/latex/fnpct/fnpct-manual.cls new file mode 100644 index 00000000000..0abdf7e4056 --- /dev/null +++ b/Master/texmf-dist/doc/latex/fnpct/fnpct-manual.cls @@ -0,0 +1,331 @@ +% -------------------------------------------------------------------------- +% the FNPCT package +% +% footnote kerning +% +% -------------------------------------------------------------------------- +% Clemens Niederberger +% Web: https://github.com/cgnieder/fnpct/ +% E-Mail: contact@mychemistry.eu +% -------------------------------------------------------------------------- +% Copyright 2012--2021 Clemens Niederberger +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2008/05/04 or later. +% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is Clemens Niederberger. +% -------------------------------------------------------------------------- +\RequirePackage[multiple]{fnpct} +\ProvidesClass{fnpct-manual}[2021/01/17] + +\LoadClass[load-preamble,add-index]{cnltx-doc} +\RequirePackage{imakeidx} + +\setcnltx{ + package = {fnpct} , + info = {Footnote kerning and multiple footnotes} , + authors = Clemens Niederberger , + email = contact@mychemistry.eu , + url = https://github.com/cgnieder/fnpct/ , + abstract = {% + The \fnpct\ package basically does two things to footnotes: if footnote + marks are followed by a punctuation mark the order of footnote and + punctuation mark is reversed and the kerning gets adjusted. As a side + effect mutiple footnotes and footnote ranges are easily obtained..% + }, + add-cmds = { + AdaptNote, + AdaptNoteName, + AddPunctuation, + % kfc, + % kfp, + multfootnote, + MultVariant, + setfnpct + } , + add-silent-cmds = { + @mpfn, + anote, + anotecontent, + arabic, + DeclareNewFootnote, + endnote, + footcite + footnoteB, + footref, + IfBooleanTF, + IfNoValueTF, + multendnote, + multfootcite, + multparnote, + multsidenote, + myfn, + newfootnotes, + parnote, + parnotes, + sidenote, + theendnotes, + thempfootnote + } , + makeindex-setup = {options={-s cnltx.ist},columns=3,columnsep=1em} , + index-setup = {othercode=\footnotesize,level=\addsec} +} + +\RequirePackage{array,booktabs} + +\RequirePackage{endnotes} +\RequirePackage{parnotes} +\RequirePackage{sepfootnotes} + +\newfootnotes{a} + +\renewcommand\thempfootnote{\arabic{mpfootnote}} + +\DeclareTranslation{english}{cnltx-default}{Initial} + +\protected\def\@versionstar{\raisebox{-.25em}{*}} +\newcommand\versionstar{\texorpdfstring{\@versionstar}{*}} + +\newcommand*\TF{\textcolor{red}{\uline{\code{\textcolor{cs}{\textit{TF}}}}}} + +\RequirePackage{fontawesome} +\RequirePackage{datetime2} +\DTMsetup{useregional=numeric,datesep=/} +\newrobustcmd*\fnpct@add@version[2]{% + \csdef{ac@ver@#2}{% + \DTMdate{#1}% + \csgdef{ac@ver@#2used}{}% + \csdef{ac@ver@#2}{\DTMdate{#1}}% + }% +} + +\newrobustcmd*\ac@date[1]{\ifcsdef{ac@ver@#1used}{}{ (\csuse{ac@ver@#1})}} +\newrobustcmd*\ac@ifnew[1]{\ifcsstring{c_fnpct_version_tl}{#1}} +\newrobustcmd*\ac@NEW{\faStarO\ New} + +\renewrobustcmd*\sinceversion[1]{% + \ac@ifnew{#1}% + {\cnltx@version@note{\textcolor{red}{\ac@NEW}}}% + {\cnltx@version@note{\GetTranslation{cnltx-introduced}~v#1\ac@date{#1}}}% +} +\renewrobustcmd*\changedversion[1]{% + \cnltx@version@note{\GetTranslation{cnltx-changed}~v#1\ac@date{#1}}% +} + +\newnote*\sincechanged[2]{% + \GetTranslation{cnltx-introduced}~#1\ac@date{#1}, + changed with ~v#2\ac@date{#2}\ac@ifnew{#2}{ \ac@NEW}{}% +} + +\RenewDocumentEnvironment{commands}{} + {% + \cnltx@set@catcode_{12}% + \let\command\cnltx@command + \cnltxlist + } + {\endcnltxlist} + +\RequirePackage{tcolorbox,xsimverb} +\tcbuselibrary{skins,breakable} +\tcbset{enhanced,enhanced jigsaw} + +\newtcolorbox{bewareofthedog}{ + colback = red!2!white!98 , + colframe = red , + underlay={% + \path[draw=none] + (interior.south west) + rectangle node[red]{\Huge\bfseries !} + ([xshift=-4mm]interior.north west); + }% +} + +\newtcolorbox{cnltxcode}[1][]{ + boxrule = 1pt , + colback = cnltxbg , + colframe = cnltx , + arc = 5pt , + beforeafter skip = .5\baselineskip ,% + #1% +} + +\newcommand*\fnpctman@readoptions[1]{% + \catcode`\^^M=13 + \fnpctman@read@options{#1}% +} + +\begingroup +\catcode`\^^M=13 +\gdef\fnpctman@read@options#1#2^^M{% + \endgroup + \ifblank{#2}{}{\fnpctman@read@options@#2}% + #1% + \XSIMfilewritestart*{\jobname.tmp}% +}% +\endgroup +\def\fnpctman@read@options@[#1]{\pgfqkeys{/cnltx}{#1}} + +\RenewDocumentEnvironment{sourcecode}{} + {% + \begingroup + \fnpctman@readoptions{% + \setlength\cnltx@sidebysidewidth + {\dimexpr .45\columnwidth -\lst@xleftmargin -\lst@xrightmargin\relax}% + \expanded{% + \noexpand\lstset{ + style=cnltx, + \ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} } + {linewidth=\cnltx@sidebysidewidth,}{}% + \expandonce\cnltx@local@listings@options + }% + }% + \XSIMgobblechars{2}% + }% + } + {% + \XSIMfilewritestop + \cnltxcode[breakable]% + \lstinputlisting[style=cnltx]{\jobname.tmp}% + \endcnltxcode + } + +\RenewDocumentEnvironment{example}{} + {% + \begingroup + \fnpctman@readoptions{% + \setlength\cnltx@sidebysidewidth + {\dimexpr .45\columnwidth -\lst@xleftmargin -\lst@xrightmargin\relax}% + \expanded{% + \noexpand\lstset{ + style=cnltx, + \ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} } + {linewidth=\cnltx@sidebysidewidth,}{}% + \expandonce\cnltx@local@listings@options + }% + }% + \XSIMgobblechars{2}% + }% + } + {% + \XSIMfilewritestop + \ifbool{cnltx@sidebyside} + {% + \cnltxcode + \noindent + \minipage[c]{\cnltx@sidebysidewidth}% + \cnltx@pre@source@hook + \lstinputlisting[style=cnltx] {\jobname.tmp}% + \cnltx@after@source@hook + \endminipage\hfill + \minipage[c]{\cnltx@sidebysidewidth}% + \cnltx@pre@example@hook + \input {\jobname.tmp}% + \cnltx@after@example@hook + \endminipage + } + {% + \cnltxcode[breakable]% + \cnltx@pre@source@hook + \lstinputlisting{\jobname.tmp}% + \cnltx@after@source@hook + \ifbool{cnltx@float}{}{% + \tcblower + \cnltx@pre@example@hook + \input {\jobname.tmp}% + \cnltx@after@example@hook + } + }% + \endcnltxcode + \ifbool{cnltx@float}{% + \cnltx@float@start + \ifdefvoid\cnltx@float@caption{}{\caption{\cnltx@float@caption}}% + \expandafter\end\expandafter{\cnltx@float@type}% + }{}% + } + +\RequirePackage[ + backend=biber, + style=cnltx, + sortlocale=en_US, + indexing=cite]{biblatex} +\RequirePackage{csquotes,varioref} + +\defbibheading{bibliography}[\bibname]{\addsec{#1}} + +\RequirePackage[biblatex]{embrac}[2012/06/29] +\ChangeEmph{[}[,.02em]{]}[.055em,-.08em] +\ChangeEmph{(}[-.01em,.04em]{)}[.04em,-.05em] + +\NewDocumentCommand\noranges{sm}{% + \begin{bewareofthedog} + \IfBooleanTF{#1}{\pkg*}{\pkg}{#2} cannot be used together with + \keyis{ranges}{true}. + \end{bewareofthedog} +} + +\RequirePackage{hyperref} + +% additional packages: +\RequirePackage{longtable,array,booktabs,enumitem,amssymb} + +% ---------------------------------------------------------------------------- +\newrobustcmd*\pdfdisable[2]{% + \csdef{fnpct@@\cnltx@stripbs#1}##1{#2}% + \def#1##1{% + \csuse{fnpct_if_star_gobble:nTF}{##1}% + {\csuse{fnpct@@\cnltx@stripbs#1}}% + {\csuse{fnpct@@\cnltx@stripbs#1}{##1}}% + }% +} + +\pdfstringdefDisableCommands{% + \pdfdisable\template{#1}% + \pdfdisable\property{#1} + \pdfdisable\cs{\string\\#1}% + \pdfdisable\cmd{\string\\#1}% + \pdfdisable\option{#1}% + \def\oarg#1{[<#1>]}% + \def\Oarg#1{[#1]}% + \def\marg#1{\{<#1>\}}% + \def\Marg#1{\{#1\}}% + \def\fnpct{fnpct}% + \def\LaTeX{LaTeX}% + \def\TeX{TeX}% +} +% ---------------------------------------------------------------------------- +\fnpct@add@version{2012-05-22}{0.1} +\fnpct@add@version{2012-05-23}{0.1a} +\fnpct@add@version{2012-05-26}{0.2} +\fnpct@add@version{2012-06-01}{0.2a} +\fnpct@add@version{2012-06-07}{0.2b} +\fnpct@add@version{2012-06-28}{0.2c} +\fnpct@add@version{2012-07-07}{0.2d} +\fnpct@add@version{2012-07-24}{0.2e} +\fnpct@add@version{2012-08-27}{0.2f} +\fnpct@add@version{2012-11-14}{0.2g} +\fnpct@add@version{2013-01-18}{0.2h} +\fnpct@add@version{2013-01-21}{0.2i} +\fnpct@add@version{2013-02-22}{0.2j} +\fnpct@add@version{2013-04-07}{0.2k} +\fnpct@add@version{2013-04-16}{0.3} +\fnpct@add@version{2013-06-14}{0.3a} +\fnpct@add@version{2013-12-22}{0.4} +\fnpct@add@version{2013-12-23}{0.4a} +\fnpct@add@version{2014-03-10}{0.4b} +\fnpct@add@version{2015-02-20}{0.4c} +\fnpct@add@version{2015-04-23}{0.4d} +\fnpct@add@version{2016-03-25}{0.4e} +\fnpct@add@version{2019-02-17}{0.4f} +\fnpct@add@version{2019-09-30}{0.4g} +\fnpct@add@version{2019-10-05}{0.5} +\fnpct@add@version{2020-01-12}{0.5a} +\fnpct@add@version{2021-01-21}{1.0} + +\endinput diff --git a/Master/texmf-dist/doc/latex/fnpct/fnpct-manual.pdf b/Master/texmf-dist/doc/latex/fnpct/fnpct-manual.pdf new file mode 100644 index 00000000000..dc85988bb4b Binary files /dev/null and b/Master/texmf-dist/doc/latex/fnpct/fnpct-manual.pdf differ diff --git a/Master/texmf-dist/doc/latex/fnpct/fnpct-manual.tex b/Master/texmf-dist/doc/latex/fnpct/fnpct-manual.tex new file mode 100644 index 00000000000..2dbc17dcdbd --- /dev/null +++ b/Master/texmf-dist/doc/latex/fnpct/fnpct-manual.tex @@ -0,0 +1,615 @@ +% arara: pdflatex: { shell: on , interaction: nonstopmode } +% !arara: biber +% !arara: pdflatex +% !arara: pdflatex +% -------------------------------------------------------------------------- +% the FNPCT package +% +% footnote kerning +% +% -------------------------------------------------------------------------- +% Clemens Niederberger +% Web: https://github.com/cgnieder/fnpct/ +% E-Mail: contact@mychemistry.eu +% -------------------------------------------------------------------------- +% Copyright 2012--2021 Clemens Niederberger +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2008/05/04 or later. +% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is Clemens Niederberger. +% -------------------------------------------------------------------------- +\documentclass{fnpct-manual} + +\setfnpct{ + add-trailing-token = [0pt]:[-.05em]{colon} , + after-comma-space = -0.1em , + after-dot-space = -0.1em , + before-comma-space = -0.05em , + before-dot-space = -0.05em , + before-footnote-space = 0.05em +} + +\addbibresource{cnltx.bib} +\addbibresource{\jobname.bib} +\addbibresource{biblatex-examples.bib} +\begin{filecontents*}{\jobname.bib} +@book{bringhurst04, + title = {The Elements of Typographic Style}, + author = {Robert Bringhurst}, + year = {2004}, + version = {3.2}, + isbn = {978-0-88179-205-5}, + publisher = {Hartley \&\ Marks, Canada} +} +\end{filecontents*} + +\AdaptNote\footcite{m}{#NOTE{#1}} + +\newname\bringhurst{Robert Bringhurst} +\newname\lefloch{Bruno Le Floch} + +\setlength\parfillskip{0pt plus .8\textwidth} + +\begin{document} + +\section{Preface for those upgrading from version 0.x} + +\begin{bewareofthedog} + For those upgrading from versions~0 to version~1: a number of options have + been dropped or renamed. Please have a close look at your log file for + warnings. Also, the way commands are adapted and hence the syntax of + \cs{AdaptNote} has changed completely. In many if not all cases leaving them + as they were will lead to errors. \par + The \cs*{mult...} variants are not defined by default anymore. They can be + retained through the load-time option \option{multiple} if needed. Letting + the note commands behave as their \cs*{mult...} variants is not supported + any more. \par + \cs{innernote} is not provided anymore. Depending on user feedback I might + try to add it again to \fnpct. \par + Please read this manual carefully so you detect all changes. \par + \emph{I am sorry for the inconvenience but I am convinced that the new + syntax is more powerful and more flexible in the long run.} +\end{bewareofthedog} + +\section{License} +\license + +\section{What's it all about?} +\subsection{Introduction} +The purpose of this package is to offer kerning for footnote marks, \ie\ the +superscripts. This is not appropriate for all superscripts. Symbols must be +handled differently than numbers. And of course the amount depends on the +chosen font. \bringhurst\ says in \citetitle{bringhurst04}: + +\begin{cnltxquote}[\emph{\citetitle{bringhurst04}} \cite{bringhurst04}] + Superscripts frequently come at the ends of phrases or sentences. If they + are high above the line, they can be kerned over a comma or period, but this + may endanger readability, especially if the text is set in a modest size. +\end{cnltxquote} + +\fnpct\ can not make these decisions for you. It sets some initial values for +the comma and the full stop which looked good to me with the tested fonts. +Additionally it kerns the superscripts away from words when it follows +directly. The amounts of the kerning can be changed using options. + +\fnpct\ also switches the order of the superscript and the following comma or +full stop. Additional punctuation marks can be added to the switching +behavior and the amount of kerning can be set for each punctuation mark +individually. This behavior can also be turned off. + +\subsection{Basics} +The \fnpct\ package basically does two things to footnotes: +\begin{itemize} + \item if footnote marks are followed by a comma or a full stop\footnote{More + punctuation marks can be added through a package option.} the order of + footnote and punctuation mark is reversed +\item and the kerning gets adjusted. +\end{itemize} +As a side effect a new method of creating multiple +footnotes\multfootnote{like;this} is provided. + +In what way is the kerning adjusted? After being placed behind the +punctuation mark the footnote mark is moved a little bit back, namely by the +amount specified with the option \option{after-punct-space}. If the footnote +mark follows a word \emph{without} being followed by a +punctuation\footnote{Well, it does not necessarily have to follow a + \emph{word}. The important point is \emph{not being followed} by a + punctuation mark.}, there (obviously) is no order switching and a little +space is inserted before the footnote mark, namely the amount specified by the +option \option{before-footnote-space}. + +Now, let's see some action: +\begin{example} + 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{example} + +To ensure that the kerning is set the right way the footnote \emph{must} be +placed \emph{before} the full stop or the comma. \emph{The command can look + ahead but not look back}. This means if you place the \cs{footnote} command +after a full stop or a comma it is treated as if following a word, \ie\ a thin +space is inserted: effectively the opposite of the desired behavior. The +effects are demonstrated in figure~\vref{fig:effects}. + +The order-switching can be prevented using the option \option{reverse} since +not all countries and languages have the same typographic conventions. In +this case the full stop and the comma are moved a bit back, namely by the +amount specified with the option \option{before-punct-space}. + +\begin{figure} + \centering + \begin{tabular}{>{\setfnpct{dont-mess-around}}ll} + \toprule + without \fnpct & + with \fnpct \\ + \midrule + \strut\quad text.\footnotemark[1] & + \strut\quad text\footnotemark[1]. \\ + \strut\quad text\footnotemark[1]. & + \setfnpct{reverse}\strut\quad text\footnotemark[1]. \\ + \strut\quad text\footnotemark[1] & + \strut\quad text\footnotemark[1] \\ + \bottomrule + \end{tabular} + \caption{The effect of \fnpct.}\label{fig:effects} +\end{figure} + +\subsection{Temporarily disable (or enable) switching -- new syntax of the + \cs*{footnote} command} +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 \sarg\ argument +to \cs{footnote} and \cs{footnotemark}. The complete new syntax now is as +follows: +\begin{commands} + \command{footnote}[\sarg\oarg{num>}\marg{footnote text}\meta{tpunct}] + new \sarg\ argument added. \meta{tpunct} is the optional trailing + punctuation mark. + \command{footnotemark}[\sarg\oarg{num>}\meta{tpunct}] + new \sarg\ argument added. \meta{tpunct} is the optional trailing + punctuation mark. +\end{commands} +The \sarg\ argument temporarily turns off the punctuation/footnote switching. +In case you set \keyis{reverse}{true} the \sarg\ argument temporarily +\emph{enables} the switching. + +\begin{example} + \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{reverse} + \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{example} + +\section{Options}\label{sec:options} +\begin{commands} + \command{setfnpct}[\marg{options}] + All available options are listed below. They are set with \cs{setfnpct}. + \default{Underlined} values are set if the option is used without value. +\end{commands} +\begin{options} + \keybool{dont-mess-around}\Default{false} + Switches of \fnpct's mechanism. + \keybool{reverse}\Default{false} + This option reverses the behavior of starred and un-starred footnotes. + \keybool{ranges}\Default{false} + Activates ranges for multiple footnotes. This is not compatible with + \pkg{hyperref} and does not work for the marks of some packages. + \keylit{add-trailing-token}{\oarg{before}\meta{token}\oarg{after}\marg{name}} + Adds \meta{token} to \fnpct's mechanism and activates it. \meta{before} + sets the default value for the newly created option + \option{before-\meta{name}-space}. \meta{after} sets the default value for + the newly created option \option{after-\meta{name}-space}. + Instead of the option you can also use the command \cs*{AddPunctuation}, + see section~\ref{sec:adapt}. + \keyval{activate-trailing-tokens}{tokenlist}\Default{.,} + Activates tokens that have been added with \option{add-trailing-token}. + \keyval{deactivate-trailing-tokens}{tokenlist} + Deactivates tokens that have been added with \option{add-trailing-token}. + \keyval{before-footnote-space}{dimension}\Default{.06em} + Sets the space that is inserted before a footnote that \emph{does not + follow a punctuation or other note} to \meta{dimension}. + \keyval{before-dot-space}{dimension}\Default{-.16em} + Sets the space that is inserted before a dot if the dot follows a footnote + mark to \meta{dimension}. + \keyval{before-comma-space}{dimension}\Default{-.16em} + Sets the space that is inserted before a comma if the dot follows a footnote + mark to \meta{dimension}. + \keyval{before-punct-space}{dimension} + Sets the space that is inserted before any punctuation mark known to + \fnpct\ if the punctuation mark follows a footnote mark to + \meta{dimension}. + \keyval{after-dot-space}{dimension}\Default{-.06em} + Sets the space that is inserted after a dot if the dot precedes a footnote + mark to \meta{dimension}. + \keyval{after-comma-space}{dimension}\Default{-.06em} + Sets the space that is inserted after a comma if the dot precedes a + footnote mark to \meta{dimension}. + \keyval{after-punct-space}{dimension} + Sets the space that is inserted after any punctuation mark known to + \fnpct\ if the punctuation mark precedes a footnote mark to + \meta{dimension}. + \keyval{mult-fn-delim}{code}\Default{\code{;}} + Sets the symbol that divides the seperate notes in the \cs*{mult...} + variants. + \keyval{separation-symbol}{value}\default{\code{,}} + Redefines \cs{multfootsep} to \meta{value}. This symbol separates + multiple footnotes if \keyis{ranges}{false}. + \keyval{range-symbol}{value}\Default{\code{--}} + Redefines \cs{multfootrange} to \meta{value}. This symbol separates + multiple footnotes if \keyis{ranges}{true}. + \keyval{print-separation}{code}\Default{\cs*{textsuperscript}\Marg{\cs*{multfootsep}}} + The actual code placed between multiple footnotes if \keyis{ranges}{false}. + \keyval{print-range}{code}\Default{\cs*{textsuperscript}\Marg{\cs*{multfootrange}}} + The actual code placed between multiple footnotes if \keyis{ranges}{true}. +\end{options} + +% \subsection{Language Specific Settings} +% Package \pkg{babel}'s~\cite{pkg:babel} French settings redefine +% \cs*{@footnotemark}. \fnpct\ resets this redefinition but sets the +% \option{before-footnote-space} equal to a thin space (\code{.16667em}). + +% In case the automatic kerning doesn't work for whatever reason the spaces are +% available as user commands as well: +% \begin{commands} +% \command{kfp} +% Insert \option{after-dot-space} or (if \keyis{punct-after}{true}) +% \option{before-dot-space}. +% \command{kfc} +% Insert \option{after-comma-space} or (if \keyis{punct-after}{true}) +% \option{before-comma-space}. +% \end{commands} + +\section{Multiple footnotes}\label{sec:multiple} +\subsection{Basics} +Since multiple footnotes have to be treated differently\footnote{see these + footnotes}\footnote{for an example}, \fnpct\ recognizes if \cs*{footnote} is +used multiple times in a row: + +\begin{example} + 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}\footnote{or something else}. +\end{example} + +\subsection{Ranges} +Starting with a minimum number of three footnotes in a row \fnpct\ can also +display the footnote marks as a range. +\begin{example} + \setfnpct{ ranges = true } + 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}% + \footnote{or something else}\footnote{what do I know}. +\end{example} +It is important to note that this has limits: ranges do not work well with +\pkg{hyperref}. For that reason \fnpct' disables ranges if it detects that +\pkg{hyperref} has been loaded. If you insist on using ranges together with +\pkg{hyperref} use +\begin{options} + \keybool{keep-ranges}\Default{false} + to enable them again. +\end{options} + +\subsection{The delimiter and separator} +Some packages or classes like the \KOMAScript\ classes define +\cs{multfootsep}. If it is not predefined it is defined by \fnpct: +\begin{commands} + \command{multfootsep}\Default{,} + In its default definition this command simply expands to a comma. + \command{multfootrange}\Default{--} + In its default definition this command simply expands to an endash. +\end{commands} +This commands can be redefined to adapt to your needs. You can do this with +\cs*{renewcommand} or by using these options: +\begin{options} + \keyval{separation-symbol}{value}\default{\code{,}} + Redefines \cs{multfootsep} to \meta{value}. This symbol separates + multiple footnotes if \keyis{ranges}{false}. + \keyval{range-symbol}{value}\Default{\code{--}} + Redefines \cs{multfootrange} to \meta{value}. This symbol separates + multiple footnotes if \keyis{ranges}{true}. +\end{options} +Both symbols are placed inside \cs*{textsuperscript}. This can also be +redefined if necessary: +\begin{options} + \keyval{print-separation}{code}\Default{\cs*{textsuperscript}\Marg{\cs*{multfootsep}}} + The actual code placed between multiple footnotes if \keyis{ranges}{false}. + \keyval{print-range}{code}\Default{\cs*{textsuperscript}\Marg{\cs*{multfootrange}}} + The actual code placed between multiple footnotes if \keyis{ranges}{true}. +\end{options} + +\subsection{\cs*{mult...} variants} + +\begin{bewareofthedog} + The commands presented in this section are defined to keep some backwards + compatibility to versions of \fnpct\ prior to v1.0. In order to use them + you have to call the package with + \cs*{usepackage}\Oarg{multiple}\Marg{fnpct}. +\end{bewareofthedog} +In earlier versions of \fnpct\ detecting following footnotes was not as +reliable as it is now. For that reason it defined the following command: +\begin{commands} + \command{multfootnote}[\sarg\Marg{\meta{list};\meta{of};\meta{footnotes}}\meta{tpunct}] + Different footnotes are separated with a semicolon. The \sarg\ turns the + footnote/punctuation switching temporarily off. +\end{commands} +\begin{example} + 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\multfootnote{probably fired clay bricks;or something else}. +\end{example} +This command splits its content at every occurrence of \code{;} and creates a +footnote for each. This delimiter can be changed: +\begin{options} + \keyval{mult-fn-delim}{code}\Default{;} + Sets the symbol that divides the seperate notes in the \cs*{mult...} + variants. +\end{options} + +Since the semicolon might be part of the footnote text you might have some +trouble. Enclosing it in braces should work: +\begin{example} + 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\multfootnote{probably fired clay bricks{;} or something else;what + do I know}. +\end{example} + +\section{Extend \fnpct} +\subsection{Additional punctuation marks} +So if you want to extend the punctuation switching and kerning to other punctuation +marks you can do something like this: +\begin{sourcecode} + \setfnpct{ add-trailing-token = !{bang} } +\end{sourcecode} +\setfnpct{ add-trailing-token = !{bang} } +After that the bang is recognized and footnotes switch position: +\begin{example} + 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{example} + +New options have also been defined: +\begin{example} + \setfnpct{ after-bang-space = .03em } + 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{example} + +And option \option{after-punct-space} is obeyed: +\begin{example} + \setfnpct{ after-punct-space = 2pt } + 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{example} + +\begin{bewareofthedog} + Please note that you should not use \option{add-trailing-token} inside a + group. Ideally it is used in the document preamble only. Using it inside of + a group can lead to unwanted side effects and should not be attempted. +\end{bewareofthedog} + +\setfnpct{ deactivate-trailing-tokens = ! } + +\subsection{Make note commands known to \fnpct}\label{sec:adapt} +If a package is not natively supported you can try and adapt commands +yourself. Before you do so please check section~\vref{sec:other:packages}. +\begin{commands} + % \AdaptNote + \command{AdaptNote}[\Marg{\cs*{cs}}\marg{arguments}\oarg{counter name}\marg{code}] + This redefines \cs*{cs}. How the redefinition works is best demonstrated + with an example. See below for an example. The arguments \meta{arguments} + are defined with the same syntax as \pkg{xparse}'s + \cs*{NewDocumentCommand}. See the \pkg{xparse} manual~\cite{pkg:xparse} + for a complete description. Within \meta{code} \code{\#NOTE} is replaced + with the original command. If the optional argument is not used the + counter name \code{cs} for a note command \cs*{cs} is assumed. + + In addition to the arguments specified in \meta{arguments} an optional + star as first argument is defined which reverses \fnpct's behavior. + \meta{code} is also placed inside a group. + % \AdaptNoteName + \command{AdaptNoteName}[\marg{csname}\marg{arguments}\oarg{counter name}\marg{code}] + Like \cs{AdaptNote} but the first argument expects a csname instead of a + command sequence token. + % \MultVariant + \command{MultVariant}[\Marg{\cs*{cs}}] + Defines a command \cs*{multcs} which splits is argument at each occurence + of the token set by the option \option{mult-fn-delim} and turns it into a + series of calls of \cs*{cs}. \cs*{multcs} also has a starred variant in + order to create a series of starred calls of \cs*{cs}. + % \MultVariantName + \command{MultVariantName}[\marg{csname}] + Like \cs{MultVariant} but the argument expects a csname instead of a + command sequence token. + % \AddPunctuation + \command*{AddPunctuation}[\oarg{before}\meta{token}\oarg{after}\marg{name}] + Adds \meta{token} to \fnpct's mechanism and activates it. \meta{before} + sets the default value for the newly created option + \option{before-\meta{name}-space}. \meta{after} sets the default value for + the newly created option \option{after-\meta{name}-space}. This is the + same as using option \option{add-trailing-token}. +\end{commands} + +\fnpct\ adapts \LaTeX's standard footnote commands the following +way\footnote{Using \cs*{@mpfn} as counter name is essential to make ranges + work in minipages.}: +\begin{sourcecode} + \AdaptNote\footnote{o+m}[\@mpfn]{\IfNoValueTF{#1}{#NOTE{#2}}{#NOTE[#1]{#2}}} + \AdaptNote\footnotemark{o}{\IfNoValueTF{#1}{#NOTE}{#NOTE[#1]}} + \MultVariant\footnote + % KOMA-Script's or memoir's \footref: + \AdaptNote\footref{m}{#NOTE{#1}} +\end{sourcecode} +You essentially have to rebuild the syntax of the original command and place +\code{\#NOTE} in the code where it should be called. This may seem cumbersome +at first but allows to adapt commands with a more or less arbitrary kind of +syntax. + +The command \cs{AdaptNote} can be used multiple times on the same command in +order to change a previous redefinition. + +\section{Other packages}\label{sec:other:packages} +\fnpct\ tries its best to support other footnote and related +packages\footnote{If you find some package missing please let me know.}. Each +of the following subsections is dedicated to one of these packages and if and +how they work together with \fnpct. Fortunately most of them do quite well. + +Most notably the \option{ranges} option cannot deal with some packages, often +due to the lack of a suiting \cs*{...text} + +\subsection{bigfoot}\label{sec:bigfoot} +The package \pkg{bigfoot}~\cite{pkg:bigfoot} is supported. + +You need to be a bit cautious, though: \emph{verbatim material won't work + inside footnotes anymore}. You might use \lefloch's \pkg{cprotect} +package~\cite{pkg:cprotect} if you really need verbatim material in footnotes +\emph{and} want to use \fnpct. Since \fnpct\ does not redefine any +\cs{footnotetext} like command it will still work inside one of them. + +\subsection{endnotes}\label{sec:endnotes} +The package \pkg{endnotes}~\cite{pkg:endnotes} is supported. + +\subsection{enotez}\label{sec:enotez} +The package \pkg{enotez}~\cite{pkg:enotez} is supported. + +\subsection{fixfoot}\label{sec:fixfoot} +The \pkg{fixfoot}~\cite{pkg:fixfoot} package provides a possibility to create +repeating footnotes. \fnpct\ supports this package provided you take care of +the following: + +\emph{Use \cs{DeclareFixedFootnote} only in the preamble but \emph{after} + loading \fnpct.} + +\cs*{DeclareFixedFootnote}\Marg{\cs*{cs}}\marg{footnote text} is used to store +the \meta{footnote text} in \cs*{cs} which in turn creates a footnote mark for +it but doesn't repeat the footnote text on the same page in the bottom. The +document needs several runs to get all the numbers and footnotes right. + +Every fixed footnote declared with \cs{DeclareFixedFootnote} gets an optional +\sarg\ to prevent the punctuation switching. + +\noranges{fixfoot} + +\subsection{footmisc}\label{sec:footmisc} +The \pkg{footmisc} package~\cite{pkg:footmisc} provides a range of options to +customize footnotes, for example output them as margin notes or count +footnotes per page. + +Testing showed no incompatibilities with \pkg{footmisc}. The only thing is +that you won't have to (and shouldn't) use its \option{multiple} option. + +\subsection{footnote}\label{sec:footnote} + +Testing showed no incompatibilities with \pkg{footnote}. It cannot adapt its +environment \env*{footnote}, though. + +\subsection{manyfoot}\label{sec:manyfoot} +The package \pkg{manyfoot}~\cite{pkg:manyfoot} is supported. + +\subsection{pagenote}\label{sec:pagenote} +The package \pkg{pagenote}~\cite{pkg:pagenote} is supported. + +\noranges{pagenote} + +\subsection{parnotes}\label{sec:parnotes} +The package \pkg{parnotes}~\cite{pkg:parnotes} is supported. + +\noranges{parnotes} + +\subsection{sepfootnotes}\label{sec:sepfootnotes} +The package \pkg{sepfootnotes}~\cite{pkg:sepfootnotes} is supported. Define +new footnote types \emph{after} \fnpct\ has been loaded. + +\subsection{sidenotes}\label{sec:sidenotes} +\begin{bewareofthedog} + The package \pkg{sidenotes}~\cite{pkg:sidenotes} is \emph{not} supported! +\end{bewareofthedog} +\fnpct\ is not able to adapt \pkg{sidenotes}' commands due to the current +implementation of \pkg{sidenotes}. + +\subsection{snotez}\label{sec:snotez} +The package \pkg{snotes}~\cite{pkg:snotez} is supported. + +\subsection{tablefootnote}\label{sec:tablefootnote} +The package \pkg{tablefootnote}~\cite{pkg:tablefootnote} is supported. + +\noranges{tablefootnote} + +\subsection{tufte-latex's \cs*{sidenote}}\label{sec:tufte} +The \cs*{sidenote} command from the \pkg*{tufte-latex} classes +\cls{tufte-book} and \cls{tufte-handout} is supported. + +\noranges*{tufte-latex} + +More precisely: the \cs*{sidenote} command from \pkg*{tufte-latex} does not +work with \option{ranges}. But since \cs*{sidenote} is only a synonym for +\cs*{footnote} for \pkg*{tufte-latex} you can use the latter. + +\subsection{biblatex's \cs*{footcite}}\label{sec:biblatex} +If you're willing to sacrifice \cs*{footcite}'s \sarg\ argument (which it has +in some styles) you can adapt the commands provided by +\pkg{biblatex}~\cite{pkg:biblatex} as well: +\begin{sourcecode} + \AdaptNote\footcite{oo+m}[footnote]{% + \setfnpct{dont-mess-around}% + \IfNoValueTF{#1} + {#NOTE{#3}} + {\IfNoValueTF{#2}{#NOTE[#1]{#3}}{#NOTE[#1][#2]{#3}}}% + } +\end{sourcecode} +You could use another token for the star, though, if needed: +\begin{sourcecode} + \AdaptNote\footcite{t+oo+m}[footnote]{% + \setfnpct{dont-mess-around}% + \IfBooleanTF{#1}{% + \IfNoValueTF{#2} + {#NOTE{#4}} + {\IfNoValueTF{#3}{#NOTE[#2]{#4}}{#NOTE[#2][#3]{#4}}}% + }{% + \IfNoValueTF{#2} + {#NOTE*{#4}} + {\IfNoValueTF{#3}{#NOTE*[#2]{#4}}{#NOTE*[#2][#3]{#4}}}% + } +\end{sourcecode} +Testing showed no problems whatsoever but \fnpct\ does not adapt the command +itself. + +\begin{bewareofthedog} + Turning \fnpct\ off inside of \cs*{footcite} is advised as shown in above + examples. \cs*{footcite} calls \cs*{footnote} internally which else might + lead to inconsistent and unwanted spaces. +\end{bewareofthedog} + + +\appendix + +\printbibliography + +\end{document} +TODO: +- memoir, \mutfootsep +- \thanks +- French +- nested notes and \AdaptText\footnotetext{om}{\IfNoValueTF{#1}{#NOTE{#2}}{#NOTE[#1]{#2}}} diff --git a/Master/texmf-dist/doc/latex/fnpct/fnpct_en.pdf b/Master/texmf-dist/doc/latex/fnpct/fnpct_en.pdf deleted file mode 100644 index 7ce6a35d4ab..00000000000 Binary files a/Master/texmf-dist/doc/latex/fnpct/fnpct_en.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/fnpct/fnpct_en.tex b/Master/texmf-dist/doc/latex/fnpct/fnpct_en.tex deleted file mode 100644 index e84a68f15e5..00000000000 --- a/Master/texmf-dist/doc/latex/fnpct/fnpct_en.tex +++ /dev/null @@ -1,1044 +0,0 @@ -% arara: pdflatex: { shell: on , interaction: nonstopmode } -% !arara: biber -% !arara: pdflatex -% !arara: pdflatex -% -------------------------------------------------------------------------- -% the FNPCT package -% -% footnote kerning -% -% -------------------------------------------------------------------------- -% Clemens Niederberger -% Web: https://bitbucket.org/cgnieder/fnpct/ -% E-Mail: contact@mychemistry.eu -% -------------------------------------------------------------------------- -% Copyright 2012--2019 Clemens Niederberger -% -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. -% -% This work has the LPPL maintenance status `maintained'. -% -% The Current Maintainer of this work is Clemens Niederberger. -% -------------------------------------------------------------------------- -% If you have any ideas, questions, suggestions or bugs to report, please -% feel free to contact me. -% -------------------------------------------------------------------------- -% the package is inspired by the following question on TeX.SE: -% http://tex.stackexchange.com/q/56094/5049 -% -------------------------------------------------------------------------- -\documentclass[load-preamble+]{cnltx-doc} -\usepackage{sepfootnotes,fnpct} -\setcnltx{ - package = fnpct , - authors = Clemens Niederberger , - email = contact@mychemistry.eu , - url = https://bitbucket.org/cgnieder/fnpct/ , - abstract = { - The \fnpct\ package basically does two things to footnotes: if footnote - marks are followed by a punctuation mark the order of footnote and - punctuation mark is reversed and the kerning gets adjusted. As a side - effect a new method of creating multiple footnotes and some other - features are provided.% - }, - add-cmds = { - AdaptNote, - AdaptNoteMark, - innernote, - kfc, - kfp, - multfootnote, - setfnpct, - writeinnernotes - } , - add-silent-cmds = { - anote, - anotecontent, - arabic, - DeclareNewFootnote, - endnote, - footnoteB, - multendnote, - multfootcite, - multparnote, - multsidenote, - myfn, - newfootnotes, - parnote, - parnotes, - sidenote, - theendnotes, - thempfootnote, - }, - makeindex-setup = {options={-s cnltx.ist},columns=3,columnsep=1em} , - index-setup = {othercode=\footnotesize,level=\addsec} -} - -\defbibheading{bibliography}[\bibname]{\addsec{#1}} - -\usepackage{array,booktabs} - -\setfnpct{multiple,add-punct-marks=:[0pt][-.05em]} - -\usepackage{endnotes} -\usepackage{parnotes} - -\newfootnotes{a} - -\renewcommand\thempfootnote{\arabic{mpfootnote}} - -\addbibresource{\jobname.bib} -\addbibresource{biblatex-examples.bib} -\usepackage{filecontents} -\begin{filecontents*}{\jobname.bib} -@book{bringhurst04, - title = {The Elements of Typographic Style}, - author = {Robert Bringhurst}, - year = {2004}, - version = {3.2}, - isbn = {978-0-88179-205-5}, - publisher = {Hartley \&\ Marks, Canada} -} -\end{filecontents*} - -\AdaptNoteOpt\footcite\multfootcite - -\newname\bringhurst{Robert Bringhurst} -\newname\lefloch{Bruno Le Floch} - -\begin{document} - -\section{License and Requirements} -\license\ - -\fnpct\ depends on the packages \bnd{l3kernel}~\cite{bnd:l3kernel}, -\pkg{xparse} and \pkg{l3keys2e} from the \bnd{l3packages} -bundle~\cite{bnd:l3packages}, \pkg{scrlfile} from the \KOMAScript\ -bundle~\cite{bnd:koma-script}, and \pkg{translations}~\cite{pkg:translations}. - -\section{What's it all about?} -\subsection{Introduction} -The purpose of this package is to offer kerning for footnote marks, \ie\ the -superscripts. This is not appropriate for all superscripts. Symbols must be -handled differently than numbers. And of course the amount depends on the -chosen font. \bringhurst\ says in \citetitle{bringhurst04}: - -\begin{cnltxquote}[\emph{\citetitle{bringhurst04}} \cite{bringhurst04}] - Superscripts frequently come at the ends of phrases or sentences. If they - are high above the line, they can be kerned over a comma or period, but this - may endanger readability, especially if the text is set in a modest size. -\end{cnltxquote} - -\fnpct\ can not make these decisions for you. It sets some initial values for -the comma and the full stop which looked good to me with the tested fonts. -Additionally it kerns the superscripts away from words when it follows -directly. The amounts of the kerning can be changed using an option. - -As a side effect \fnpct\ switches the order of the superscript and the -following comma or full stop. Additional punctuation marks can be added to -the switching behaviour and the amount of kerning can be set for each -punctuation mark individually. - -\subsection{Basics} -The \fnpct\ package basically does two things to footnotes: if footnote marks -are followed by a comma or a full stop\footnote{More punctuation marks can be - added through a package option.} the order of footnote and punctuation mark -is reversed and the kerning gets adjusted. As a side effect a new method of -creating multiple footnotes\footnote{like;this} is provided, see -section~\ref{sec:multiple} for details. - -In what way is the kerning adjusted? After being placed behind the -punctuation mark the footnote mark is moved a little bit back, namely by the -amount specified with the option \option{after-punct-space} (see -section~\ref{sec:options}). If the footnote mark follows a word -\emph{without} being followed by a punctuation\footnote{Well, it does not - necessarily have to follow a \emph{word}. The important point is \emph{not - being followed} by a punctuation mark.}, there (obviously) is no order -switching and a little space is inserted before the footnote mark, namely the -amount specified by the option \option{before-footnote-space} (see -section~\ref{sec:options}). - -\begin{sourcecode} - \renewcommand\thempfootnote{\arabic{mpfootnote}} -\end{sourcecode} - -Now, let's see some action: -\begin{example} - \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{example} - -To ensure that the kerning is set the right way the footnote \emph{must} be -placed \emph{before} the full stop or the comma. \emph{The command can look - ahead but not look back}. This means if you place the \cs{footnote} command -after a full stop or a comma it is treated as if following a word, \ie\ a thin -space is inserted: effectively the opposite of the desired behaviour. - -The order-switching can be prevented using a package option since not all -countries and languages have the same typographic conventions. In this case -the full stop and the comma are moved a bit back. - -\begin{figure}[ht] - \centering - \begin{tabular}{>{\setfnpct{dont-mess-around}}ll} - \toprule - without \fnpct & - with \fnpct \\ - \midrule - \strut\quad text.\footnotemark[1] & - \strut\quad text\footnotemark[1]. \\ - \strut\quad text\footnotemark[1]. & - \setfnpct{punct-after}\strut\quad text\footnotemark[1]. \\ - \strut\quad text\footnotemark[1] & - \strut\quad text\footnotemark[1] \\ - \bottomrule - \end{tabular} - \caption{The effect of \fnpct.} -\end{figure} - -\begin{options} - \keybool{punct-after}\Default{false} - When \code{true} the punctuation sign will be placed \emph{after} the - footnote. -\end{options} -Like all options it can also be set using the setup command. -\begin{commands} - \command{setfnpct}[\marg{options}] - Set up options. Can be used anywhere in the document. Some options can - only be set in the preamble, though. -\end{commands} -\begin{example} - \setfnpct{punct-after} - \begin{minipage}{\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{example} - -\subsection{Temporarily disable or enable 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 \sarg\ argument -to \cs{footnote} and \cs{footnotemark}. The complete new syntax now is as -follows: -\begin{commands} - \command{footnote}[\sarg\oarg{num>}\marg{footnote text}\meta{tpunct}] - new \sarg\ argument added. \meta{tpunct} is the optional trailing - punctuation mark. - \command{footnotemark}[\sarg\oarg{num>}\meta{tpunct}] - new \sarg\ argument added. \meta{tpunct} is the optional trailing - punctuation mark. -\end{commands} -The \sarg\ argument temporarily turns off the punctuation/footnote switching. -In case you set \keyis{punct-after}{true} the \sarg\ argument temporarily -\emph{enables} the switching. -\begin{example} - \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{example} - -\subsection{Language Specific Settings} -Package \pkg{babel}'s~\cite{pkg:babel} French settings redefine -\cs*{@footnotemark}. \fnpct\ resets this redefinition but sets the -\option{before-footnote-space} equal to a thin space (\code{.16667em}). - -\subsection{Changes in v0.5}\label{ssec:news} - -\begin{itemize} - \item the option \option{bigfoot-default-top} has been removed - \item the \pkg{manyfoot} package is now supported -\end{itemize} - -\section{Options}\label{sec:options} -Most package options are listed below. They all can be set as a package -option or with the \cs{setfnpct} command. Most of them are for adjusting the -kerning. - -\default{Underlined} values are set if the option is used without value. -\begin{options} - \keychoice{add-punct-marks}{\meta{mark}\oarg{space after}\oarg{space before}} - Add another punctuation mark for the position switching and spacify - kerning if necessary. An existing entry will be overwritten. This option - accepts a list of marks. - % - \keyval{remove-punct-marks}{mark} - Remove punctuation mark from the kerning/position switching behaviour. - This option accepts a list of marks. - % - \keyval{after-dot-space}{dim}\Default{-.06em} - 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. - % - \keyval{after-comma-space}{dim}\Default{-.06em} - 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. - % - \keyval{after-punct-space}{dim} - Set \emph{all} spaces, \ie\ also the ones for marks you've added with - \option{add-punct-marks}. - % - \keybool{punct-after}\Default{false} - When \code{true} the punctuation sign will be placed \emph{after} the - footnote. - % - \keyval{before-dot-space}{dim}\Default{-.16em} - Space to be inserted after a footnote mark and before the full stop - (``footnote \emph{before} dot''), \ie\ with \keyis{punct-after}{true}. - % - \keyval{before-comma-space}{dim}\Default{-.16em} - space to be inserted after a footnote mark and before the comma - (``footnote \emph{before} comma''), \ie\ with \keyis{punct-after}{true}. - % - \keyval{before-punct-space}{dim} - Set \emph{all} spaces, \ie\ also the ones for marks you've added with - \option{add-punct-marks}. - % - \keyval{before-footnote-space}{dim}\Default{.06em} - Space to be inserted between a word and the following footnote mark. - % - \keybool{dont-mess-around}\Default{false} - Sets all mentioned lengths to \code{0pt} and \keyis{punct-after}{true}. - Basically this should look like as if you hadn't loaded \fnpct\ except the - multiple footnote commands and \cs{innernote} are still available, see - sections~\ref{sec:multiple} and~\ref{sec:nested}, respectively. - % - \keybool{multiple}\Default{false} - Lets \cs{footnote} be equal to \cs{multfootnote}. - % - \keyval{mult-fn-delim}{delimiter}\Default{;} - Sets the delimiter for the \cs{multfootnote} command. - % - \keyval{mult-fn-sep}{separator}\Default{,} - Sets the separator between multiple footnote marks. - % - \keybool{normal-marks}\Default{false}\label{opt:normal-marks} - Sets the footnote marks in the foot not as superscripts but as normal - font. If you're not using a \KOMAScript\ class this option will load - the package \pkg{scrextend}. See section~\ref{sec:normal} for more - information. \emph{This option can only be set in the preamble}. -\end{options} - -So if you want to extend the punctuation switching and kerning to other punctuation -marks you can do something like this: -\begin{example} - \setfnpct{add-punct-marks=!?} - \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{example} - -Or with some additional spacing: -\begin{example} - \setfnpct{add-punct-marks=![.03em]?[.03em]} - \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{example} - -Let's take a look at an example with some ridiculous settings: -\begin{example} - % some ridiculous settings: - \setfnpct{after-punct-space=2pt,before-footnote-space=2pt} - \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{example} - -And now the same with switched order: -\begin{example} - % some ridiculous settings: - \setfnpct{punct-after,before-punct-space=2pt,before-footnote-space=2pt} - \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{example} - -In case the automatic kerning doesn't work for whatever reason the spaces are -available as user commands as well: -\begin{commands} - \command{kfp} - Insert \option{after-dot-space} or (if \keyis{punct-after}{true}) - \option{before-dot-space}. - \command{kfc} - Insert \option{after-comma-space} or (if \keyis{punct-after}{true}) - \option{before-comma-space}. -\end{commands} - -Some of the options are explained in a bit more detail in the next sections. - -\section{Multiple footnotes}\label{sec:multiple} -\subsection{Basics} -Since multiple footnotes have to be treated differently\footnote{see these - footnotes;for an example}, \fnpct\ provides an extra command for that: -\begin{commands} - \command{multfootnote}[\sarg\Marg{\meta{list};\meta{of};\meta{footnotes}}\meta{tpunct}] - Different footnotes are separated with a semicolon. The \sarg\ turns the - footnote/punctuation switching temporarily off. -\end{commands} -\begin{example} - \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\multfootnote{probably fired clay bricks;or - something else}. - \end{minipage} -\end{example} - -Every of the items of the list has an optional argument equivalent to the -optional argument of \cs{footnotetext}: -\begin{commands} - \command{multfootnote}[\Marg{\sarg\oarg{mark}\meta{footnote text};\ldots}] - The syntax of \cs{multfootnote}'s footnote text argument. -\end{commands} -\begin{example} - \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\multfootnote{probably fired clay bricks;[5]or - something else}. - \end{minipage} -\end{example} - -Additionally every item has an optional \sarg\ which only invokes -\cs{footnotetext}. This enables for example to set nested footnotes without -disrupting the multiple setting. The following example is shown in -figure~\ref{fig:nested:mult}: -\begin{example}[compile,float,caption={Nested footnotes.\label{fig:nested:mult}}] - \documentclass{article} - \usepackage[ - paperwidth=.5\textwidth, - paperheight=12\baselineskip, - margin=5pt, - bottom=1.5cm]{geometry} - - \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 bricks\multfootnote{probably fired clay bricks% - \footnotemark;*or something else;what do I know}. - \end{document} -\end{example} - -\subsection{The delimiter and separator} -Since the semicolon might be part of the footnote text you might have some -trouble. But there are ways around. Maybe try enclosing it in braces: -\begin{example} - \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\multfootnote{probably fired clay bricks{;} - or something else;what do I know}. - \end{minipage} -\end{example} - -There also are options which lets you choose the (input) delimiter and the (output) -separator: -\begin{options} - \keyval{mult-fn-delim}{delimiter}\Default{;} - Choose delimiter for the \cs{multfootnote}. - \keyval{mult-fn-sep}{separator}\Default{,} - Choose the separator that is put between footnote marks. -\end{options} -\begin{example} - \setfnpct{mult-fn-delim=//,mult-fn-sep=;} - \begin{minipage}[t]{.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\multfootnote{probably fired clay bricks; - or something else//what do I know}. - \end{minipage}\hfil - \setfnpct{mult-fn-delim=;,mult-fn-sep=} - \renewcommand*\thempfootnote{\fnsymbol{mpfootnote}} - \begin{minipage}[t]{.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\multfootnote{probably fired clay bricks; - or something else}. - \end{minipage} -\end{example} - -\subsection{Automagic} -If you want you can turn all footnotes into \cs{multfootnote}s. -\begin{options} - \keybool{multiple}\Default{false} - Let \cs{footnote} behave like \cs{multfootnote}. \emph{This option can - only be set in the preamble}. -\end{options} -\begin{example} - % in preamble: \setfnpct{multiple} - % or \usepackage[multiple]{fnpct} - \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;or - something else}. - \end{minipage} -\end{example} - -\section{Nested Footnotes}\label{sec:nested} -\fnpct\ provides preliminary support for nested footnotes. There are some -restrictions, though. The command below can be used inside \cs{footnote} and -\cs{multfootnote}, but not inside another \cs{innernote}. \cs{innernote} -really is a ``inner footnote'', it doesn't work with endnotes, for example. -\begin{commands} - \command{innernote}[\sarg\oarg{mark}\marg{text}\meta{tpunct}] - A nested footnote. -\end{commands} -The inner node uses a \cs{footnotemark} internally and the mark will be set -with the definition it has at begin document. - -The output of the following code can be seen in figure~\ref{fig:nested:a}. -\begin{example}[compile,float,caption={\cs*{innernote} example (a)\label{fig:nested:a}}] - \documentclass{article} - \usepackage[ - paperwidth=.5\textwidth, - paperheight=12\baselineskip, - margin=5pt, - bottom=1.5cm]{geometry} - - \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 bricks\footnote{probably fired clay bricks% - \innernote{or not}}. - \end{document} -\end{example} - -This is especially useful if you have more than one additional footnote inside -a footnote, a case that can't be solved in a satisfying (\ie\ automatic) way -with the method mentioned in section~\ref{sec:multiple}. See -figure~\ref{fig:nested:b} for the output of this code: -\begin{example}[compile,float,caption={\cs*{innernote} example (b)\label{fig:nested:b}}] - \documentclass{article} - \usepackage[ - paperwidth=.5\textwidth, - paperheight=12\baselineskip, - margin=5pt, - bottom=1.5cm]{geometry} - - \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 bricks\footnote{probably\innernote{just guessing} - fired clay bricks\innernote{or not}}. - \end{document} -\end{example} - -\cs{innernote} can also be used to escape minipages. In this case use -\cs{innernote} as a replacement for \cs{footnote} and call this command later: -\begin{commands} - \command{writeinnernotes} - Writes all \cs{footnotetext}s to the inner footnotes when invoked. This - is usually done automatically by the \cs{footnote} command but there are - possible needs for it. -\end{commands} -See figure~\ref{fig:nested:c} for the output of the following code: -\begin{example}[compile,float,caption={\cs*{innernote} example (c)\label{fig:nested:c}}] - \documentclass{article} - \usepackage[ - paperwidth=.5\textwidth, - paperheight=12\baselineskip, - margin=5pt, - bottom=1.5cm]{geometry} - - \usepackage{fnpct} - - \begin{document} - \noindent\fbox{% - \begin{minipage}{.9\linewidth} - The three little pigs built their houses - out of straw\innernote{not to be confused with hay}, - sticks\innernote{or lumber according to some sources} - and bricks\innernote{probably}. - \end{minipage}}\writeinnernotes - \end{document} -\end{example} - -\section{Normal notes}\label{sec:normal} -The package option \option{normal-marks} (see p.\,\pageref{opt:normal-marks}) -changes the layout of the footnote marks in the foot by using \KOMAScript's -\cs{deffootnote} command: -\begin{commands} - \command{deffootnote}[\oarg{mark indent}\marg{indent}\marg{par - indent}\marg{format code}] - \KOMAScript's command to define the output of the footnote text in the - foot. -\end{commands} - -The following code is shown in figure~\ref{fig:normal}. -\begin{example}[compile,float,caption={Demonstration of the - \option*{normal-marks} option.\label{fig:normal}}] - \documentclass{article} - \usepackage[ - paperwidth=.5\textwidth, - paperheight=12\baselineskip, - margin=5pt, - bottom=1.5cm]{geometry} - - \usepackage[normal-marks]{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 bricks\footnote{probably fired clay bricks}. - - \end{document} -\end{example} - -The three indent values used by \fnpct\ can be changed with the following -options: -\begin{options} - \keyval{normal-mark-width}{dim}\Default{1em} - The width of the box within which the marks are set. - \keyval{normal-indent}{dim}\Default{1.5em} - The indent of each footnote line \emph{except} the first. - \keyval{normal-par-indent}{dim}\Default{1em} - Additional indent of a new paragraph inside the footnote text. -\end{options} - -\section{Other packages}\label{sec:other:packages} -\fnpct\ tries its best to support other footnote and related -packages\footnote{If you find some package missing please let me know.}. Each -of the following subsections is dedicated to one of these packages and if and -how they work together with \fnpct. Fortunately most of them do quite well. - -\subsection{bigfoot and manyfoot}\label{ssec:bigfoot} -The \pkg{bigfoot}~\cite{pkg:bigfoot} package extends the possibilities of the -\pkg{manyfoot} package~\cite{pkg:manyfoot} (see section~\ref{ssec:manyfoot}). -The main visible feature is to use different classes of footnotes which are -typeset in different apparatus on the bottom of the page. - -\fnpct\ is compatible with \pkg{bigfoot}. - -You need to be a bit cautious, though: \emph{verbatim material won't work - inside footnotes anymore}. You can of course use \lefloch's -\pkg{cprotect}~\cite{pkg:cprotect} if you really need verbatim material in -footnotes \emph{and} want to use \fnpct. Since \fnpct\ does not redefine any -\cs{footnotetext} like command it will still work inside one of them. - -For every footnote class defined with \cs*{DeclareNewFootnote} the commands -\cs*{footnote\meta{class}} and \cs*{footnotemark\meta{class}} are redefined -with the starred variant and a \cs*{multfootnote\meta{class}} is defined. The -\option{multiple} option will turn all \cs*{footnote\meta{class}} commands -into the corresponding \cs*{multfootnote\meta{class}}. - -Since this document cannot easily combine \emph{every} footnote package at the -same time for demonstration purposes the following code is shown in -figure~\ref{fig:bigfoot}: -\begin{example}[compile,float,caption={\pkg*{bigfoot} example\label{fig:bigfoot}}] - \documentclass{article} - \usepackage[ - paperwidth=.5\textwidth, - paperheight=12\baselineskip, - margin=5pt, - bottom=1.5cm]{geometry} - - \usepackage{bigfoot} - \usepackage{fnpct} - \setfnpct{multiple} - \DeclareNewFootnote{default} - \DeclareNewFootnote[para]{B}[alph] - - \begin{document} - - \noindent The three little pigs built their houses - out of straw\footnote*{not to be confused with hay% - \footnoteB{let alone grass}}, sticks\footnote{or - lumber according to some sources} and bricks% - \footnote{probably fired clay bricks;or something}. - - \end{document} -\end{example} - -\subsection{endnotes} -The \pkg{endnotes}~\cite{pkg:endnotes} package povides the commands -\cs{endnote} and \cs{endnotemark} which can be used to output all notes at the -end of a chapter, say. - -If the package is loaded both commands are adapted\footnote*{see - section~\ref{sec:adapt} on manual adaption}: -\begin{sourcecode} - % `fnpct' does this for you: - \AdaptNote\endnote\multendnote - \AdaptNoteMark\endnotemark -\end{sourcecode} - -Everything else stays the same: -\begin{example} - \begin{minipage}[t]{.4\linewidth} - \noindent The three little pigs built their houses - out of straw\endnote{not to be confused with hay}, - sticks\endnote{or lumber according to some sources} - and bricks\endnote{probably fired clay bricks}. - - \theendnotes - \end{minipage}\hfil - \begin{minipage}[t]{.4\linewidth} - \noindent The three little pigs built their houses - out of straw\endnote*{not to be confused with hay}, - sticks\endnote{or lumber according to some sources} - and bricks\multendnote{probably fired clay bricks;or - something else}. - - \theendnotes - \end{minipage} -\end{example} - -\subsection{enotez} -The \pkg{enotez}~\cite{pkg:enotez} package povides the command \cs{endnote} -which can be used to output all notes at the end of a chapter, say. - -If the package is loaded the command is adapted\footnote*{see - section~\ref{sec:adapt} on manual adaption}: -\begin{sourcecode} - % `fnpct' does this for you: - \AdaptNote\endnote\multendnote -\end{sourcecode} - -\subsection{fixfoot} -The \pkg{fixfoot}~\cite{pkg:fixfoot} package provides a possibility to create -repeating footnotes. \fnpct\ supports this package provided you take care of -the following: - -\emph{Use \cs{DeclareFixedFootnote} only in the preamble but \emph{after} - loading \fnpct.} - -\cs*{DeclareFixedFootnote}\Marg{\cs*{cs}}\marg{footnote text} is used to store -the \meta{footnote text} in \cs*{cs} which in turn creates a footnote mark for -it but doesn't repeat the footnote text on the same page in the bottom. The -document needs several runs to get all the numbers and footnotes right. - -Every fixed footnote declared with \cs{DeclareFixedFootnote} gets an optional -\sarg\ to prevent the punctuation switching. \emph{There is \emph{no} - mult-variant of the fixed notes!} - -Since this document cannot easily combine \emph{every} footnote package at the -same time for demonstration purposes the following code is shown in -figure~\ref{fig:fixfoot}: -\begin{example}[compile,float,caption={\pkg*{fixfoot} - example\label{fig:fixfoot}}] - \documentclass{article} - \usepackage[ - paperwidth=.55\textwidth, - paperheight=12\baselineskip, - margin=5pt, - bottom=1.5cm]{geometry} - - \usepackage{fixfoot} - \usepackage{fnpct} - - \DeclareFixedFootnote{\myfn}{I'm confused: what do I want to say?} - - \begin{document} - - \noindent The three little pigs\myfn\ built their houses - out of straw\myfn*, sticks\footnote{or lumber according - to some sources} and bricks\footnote{probably fired clay - bricks}. - - \end{document} -\end{example} - -\subsection{footmisc}\label{ssec:footmisc} -The \pkg{footmisc} package~\cite{pkg:footmisc} provides a range of options to -customize footnotes, for example output them as margin notes or count -footnotes per page. - -Testing showed no incompatibilities with \pkg{footmisc}. The only thing is -that you won't have to (and shouldn't) use its \option{multiple} option. - -\subsection{footnote}\label{ssec:footnote} -Unfortunately \fnpct\ is not compatible with the \pkg{footnote} -package~\cite{pkg:footnote}. Or more precisely it is not compatible if the -command pair \cs*{savenotes}/\cs*{spewnotes} is invoked. This disables -\pkg{footnote}'s environments as well as its environment escaping mechanism -through \cs{makesavenoteenv}. - -\subsection{manyfoot}\label{ssec:manyfoot} -The package \pkg{manyfoot}~\cite{pkg:manyfoot} is supported. See -section~\ref{ssec:bigfoot} for more details. - -\subsection{pagenote}\label{ssec:pagenote} -The package \pkg{pagenote}~\cite{pkg:pagenote} is supported and its -\cs*{pagenote} command is treated the same way as all other note commands: it -got an optional \sarg\ argument and an additional \cs*{multpagenote} is -defined. - -\subsection{parnotes}\label{ssec:parnotes} -The function of the package \pkg{parnotes}~\cite{pkg:parnotes} is similar to the -\pkg{endnotes} package. basically it allows to output the footnote text after -a paragraph, either by using a special environment or by invoking -\cs*{parnotes}. - -If \pkg{parnotes} is loaded \fnpct\ extends its functionality analogous to the -one of \pkg{endnotes}. - -Again the \option{multiple} option turns all \cs*{parnote}s into -\cs*{multparnote}s. -\begin{example} - \begin{minipage}[t]{.4\linewidth} - \noindent The three little pigs built their houses - out of straw\parnote{not to be confused with hay}, - sticks\parnote{or lumber according to some sources} - and bricks\parnote{probably fired clay bricks}. - - \parnotes - \end{minipage}\hfil - \begin{minipage}[t]{.4\linewidth} - \noindent The three little pigs built their houses - out of straw\parnote*{not to be confused with hay}, - sticks\parnote{or lumber according to some sources} - and bricks\multparnote{probably fired clay bricks;or - something else}. - - \parnotes - \end{minipage} -\end{example} - -\subsection{sepfootnotes}\label{ssec:sepfootnotes} -\fnpct\ supports the \pkg{sepfootnotes} package~\cite{pkg:sepfootnotes}. Each -note type you have created with with one of the commands -\begin{description} - \item \cs*{newfootnotes}\marg{prefix}, - \item \cs*{newendnotes}\marg{prefix} or - \item \cs*{newsymbolfootnotes}\marg{prefix} -\end{description} -gets the additional optional \sarg\ to prevent punctuation switching. Also -the corresponding mult-variant \cs*{\meta{prefix}multnote} is defined. The -option \option{multiple} again turns all note commands into their -mult-variant. - -You have to use the \cs*{newfootnotes} commands in the document preamble after -loading \fnpct. - -\begin{example} - % preamble \newfootnotes{a} - \anotecontent{first}{not to be confused with hay} - \anotecontent{second}{or lumber according to some sources} - \anotecontent{third}{probably fired clay bricks} - \begin{minipage}{.4\linewidth} - \noindent The three little pigs built their houses - out of straw\anote{first}, sticks\anote{second} and - bricks\anote{third}. - \end{minipage} -\end{example} - -\subsection{sidenotes}\label{ssec:sidenotes} -The package \pkg{sidenotes}~\cite{pkg:sidenotes} is \emph{not} supported. -For the time being users can use the following code\footnote{Since the code - depends on the implementation of \pkg{sidenotes} this may break with each - update of \pkg{sidenotes}.;Thanks to Marijn van Vliet for - providing it!}: -\begin{sourcecode} - \ExplSyntaxOn - \makeatletter - \NewDocumentCommand \origsidenotemark {o} - { - \@sidenotes@multichecker - \IfNoValueOrEmptyTF {#1} - { \@sidenotes@thesidenotemark { \thesidenote } } - { \@sidenotes@thesidenotemark {#1} } - \@sidenotes@multimarker - } - - \NewDocumentCommand \origsidenote {oo+m} - { - \origsidenotemark [#1] - \sidenotetext [#1] [#2] {#3} - \@sidenotes@multimarker - } - - \fnpct_create_mult_variant:NN \multsidenote \origsidenote - - \RenewDocumentCommand \sidenote {soo+m} - { \fnpct_handle_note:Nnnnn \origsidenote {#2} {#3} {#4} {#1} } - - \RenewDocumentCommand \sidenotemark {so} - { \fnpct_handle_note:Nnnnn \origsidenotemark {#2} { \q_no_value } { } {#1} } - \makeatother - \ExplSyntaxOff -\end{sourcecode} - -\subsection{snotez}\label{ssec:snotez} -The package \pkg{snotez}~\cite{pkg:snotez} is supported and its commands -\cs*{sidenote} and \cs*{sidenotemark} are treated the same way as footnotes: -they got an optional \sarg\ argument and the additional \cs*{multsidenote} is -created. The option \option{multiple} turns all note commands into their -mult-variant. - -\subsection{tablefootnote}\label{ssec:tablefootnote} -The package \pkg{tablefootnote}~\cite{pkg:tablefootnote} is supported and its -\cs*{tablefootnote} command is treated the same way as all other note -commands: it got an optional \sarg\ argument and an additional -\cs*{multtablefootnote} is defined. The option \option{multiple} turns all -note commands into their mult-variant. - -\subsection{yafoot}\label{ssec:yafoot} -Currently no issues are known when using \fnpct\ with one or all of the -packages of the \bnd{yafoot}~\cite{bnd:yafoot} bundle. Just for reference: -these packages are \pkg*{pfnote}, \pkg*{fnpos} and \pkg*{dblfnote}. - -\section{Adapting note commands}\label{sec:adapt} -If a package is not natively supported you can try and adapt commands yourself. -You'll need to use one of the following commands. Please be aware that if the -adapted command does not match the required syntax it will get the required syntax -afterwards. This can result in dummy arguments or an overwritten \code{*} argument. - -\begin{commands} - % \AdaptNote - \command{AdaptNote}[\Marg{\cs*{cs}}\Marg{\cs*{multcs}}] - This lets \cs*{cs} adapt to the kerning behaviour and adds an optional - \sarg. It also creates a corresponding mult-variant. The package option - \option{multiple} will now turn \cs*{cs} into its mult-variant. Required - syntax: \cs*{cs}\oarg{oarg}\marg{marg} - % \AdaptNoteNoMult - \command{AdaptNoteNoMult}[\Marg{\cs*{cs}}] - Like \cs{AdaptNote} but doesn't create a mult-variant and thus there is no - change in behaviour when the option \option{multiple} is used. Required - syntax: \cs*{cs}\oarg{oarg}\marg{marg} - % \AdaptNoteOpt - \command{AdaptNoteOpt}[\Marg{\cs*{cs}}\Marg{\cs*{multcs}}] - This lets \cs*{cs} adapt to the kerning behaviour and adds an optional - \sarg. It also creates a corresponding mult-variant. The package option - \option{multiple} will now turn \cs*{cs} into its mult-variant. Required - syntax: \cs*{cs}\oarg{oarg}\oarg{oarg}\marg{marg} - % \AdaptNoteOptNoMult - \command{AdaptNoteOptNoMult}[\Marg{\cs*{cs}}] - Like \cs{AdaptNoteOpt} but doesn't create a mult-variant and thus there is - no change in behaviour when the option \option{multiple} is used. - Required syntax: \cs*{cs}\oarg{oarg}\oarg{oarg}\marg{marg} - % \AdaptNoteNoOpt - \command{AdaptNoteNoOpt}[\Marg{\cs*{cs}}\Marg{\cs*{multcs}}] - \sinceversion{0.3}Like \cs{AdaptNote} but requires \cs*{cs} not to have an - optional argument. If it had one it wouldn't have it any more after the - adaption. The package option \option{multiple} will now turn \cs*{cs} - into its mult-variant. Required syntax: \cs*{cs}\marg{marg} - % \AdaptNoteNoOptNoMult - \command{AdaptNoteNoOptNoMult}[\Marg{\cs*{cs}}] - \sinceversion{0.3}Like \cs{AdaptNoteNoOpt} but doesn't create a - mult-variant. Required syntax: \cs*{cs}\Marg{marg} - % \AdaptNoteMark - \command{AdaptNoteMark}[\Marg{\cs*{cs}}] - This lets \cs*{cs} adapt to the kerning behaviour and adds an optional - \sarg. Required syntax: \cs*{cs}\oarg{oarg} - % strict -\end{commands} -\begin{options} - \keybool{strict}\Default{false} When \code{true} - \cs{AdaptNote} (and the others) will issue errors if the note command in - question has already been adapted. -\end{options} - -\subsection{tufte-latex's side notes} -For example using the \cs{sidenote} command from the \cls*{tufte-handout} -class is easily possible, see also figure~\ref{fig:tufte}: -\begin{example}[compile,float,caption={Adapt - \bnd*{tufte-latex}.\label{fig:tufte}},graphics={trim=2.5cm 24.5cm 2cm - 1cm,scale=.65}] - \documentclass{tufte-handout} - \usepackage[multiple]{fnpct} - \AdaptNote\sidenote\multsidenote - \begin{document} - Some text in the document body\sidenote{Some - text in a sidenote.;A second sidenote.}. - \end{document} -\end{example} - -\subsection{Adapting \cs*{footcite} and siblings}\label{ssec:adapt:footcite} -If you're willing to sacrifice \cs*{footcite}'s \sarg\ argument (which it has -in some styles) you can adapt the commands provided by -\pkg{biblatex}~\cite{pkg:biblatex} as well: - -\begin{example} - % used in preamble: \AdaptNoteOpt\footcite\multfootcite - \begin{minipage}{.5\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}. The - companion has nothing on this topic\multfootcite{[see] - [but there's nothing there]companion;[or see][but there's - also nothing]knuth:ct:a}. - \end{minipage} -\end{example} - -The option \option{multiple} turns all \cs*{footcite}s into -\cs*{multfootcite}s now. Remember that the optional arguments then are inside -the braces! - -\begin{example} - % used in preamble: \AdaptNoteOpt\footcite\multfootcite - % with option `multiple': - \begin{minipage}{.5\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}. The - companion has nothing on this topic\footcite{[see][but - there's nothing there]companion;[or see][but there's also - nothing]knuth:ct:a}. - \end{minipage} -\end{example} - - -\appendix - -\end{document} - -% TODO: update documentation and explain what happens when babel's french is -% used -- cgit v1.2.3