summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-02-11 03:01:50 +0000
committerNorbert Preining <norbert@preining.info>2022-02-11 03:01:50 +0000
commit4eb178c7cffedf8da4dc598b6d187a142e5ad93d (patch)
tree120985ceadfbf44b7e5b4935706ae048b6730d08 /macros/latex/contrib
parent6ca8808eb5a413a8e33a0a5c32e2d0742d8af36b (diff)
CTAN sync 202202110301
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/censor/censor.pdfbin219513 -> 221880 bytes
-rw-r--r--macros/latex/contrib/censor/censor.sty119
-rw-r--r--macros/latex/contrib/censor/censor.tex18
-rw-r--r--macros/latex/contrib/crefthe/crefthe-doc.pdfbin110051 -> 111955 bytes
-rw-r--r--macros/latex/contrib/crefthe/crefthe-doc.tex34
-rw-r--r--macros/latex/contrib/crefthe/crefthe.sty475
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx10
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin576018 -> 576000 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex34
-rw-r--r--macros/latex/contrib/footmisc/Changes10
-rw-r--r--macros/latex/contrib/footmisc/README9
-rw-r--r--macros/latex/contrib/footmisc/README.md24
-rw-r--r--macros/latex/contrib/footmisc/announce.txt13
-rw-r--r--macros/latex/contrib/footmisc/changes.txt17
-rw-r--r--macros/latex/contrib/footmisc/footmisc-2011-06-06.sty949
-rw-r--r--macros/latex/contrib/footmisc/footmisc-code.pdfbin0 -> 361197 bytes
-rw-r--r--macros/latex/contrib/footmisc/footmisc-code.tex4
-rw-r--r--macros/latex/contrib/footmisc/footmisc-doc.pdfbin0 -> 246681 bytes
-rw-r--r--macros/latex/contrib/footmisc/footmisc-doc.tex6
-rw-r--r--macros/latex/contrib/footmisc/footmisc.dtx1599
-rw-r--r--macros/latex/contrib/footmisc/footmisc.ins95
-rw-r--r--macros/latex/contrib/footmisc/footmisc.pdfbin326569 -> 0 bytes
-rw-r--r--macros/latex/contrib/snotez/README8
-rw-r--r--macros/latex/contrib/snotez/snotez-manual.pdfbin0 -> 459024 bytes
-rw-r--r--macros/latex/contrib/snotez/snotez-manual.tex (renamed from macros/latex/contrib/snotez/snotez_en.tex)37
-rw-r--r--macros/latex/contrib/snotez/snotez.sty87
-rw-r--r--macros/latex/contrib/snotez/snotez_en.pdfbin446647 -> 0 bytes
-rw-r--r--macros/latex/contrib/upmethodology/src/UPMVERSION.def2
-rw-r--r--macros/latex/contrib/upmethodology/src/upmethodology-backpage.sty4
-rw-r--r--macros/latex/contrib/upmethodology/src/upmethodology-code.sty4
-rw-r--r--macros/latex/contrib/upmethodology/src/upmethodology-document.cls4
-rw-r--r--macros/latex/contrib/upmethodology/src/upmethodology-document.sty6
-rw-r--r--macros/latex/contrib/upmethodology/src/upmethodology-extension.sty4
-rw-r--r--macros/latex/contrib/upmethodology/src/upmethodology-fmt.sty11
-rw-r--r--macros/latex/contrib/upmethodology/src/upmethodology-frontpage.sty4
-rw-r--r--macros/latex/contrib/upmethodology/src/upmethodology-p-common.sty4
-rw-r--r--macros/latex/contrib/upmethodology/src/upmethodology-spec.sty4
-rw-r--r--macros/latex/contrib/upmethodology/src/upmethodology-task.sty4
-rw-r--r--macros/latex/contrib/upmethodology/src/upmethodology-version.sty4
-rw-r--r--macros/latex/contrib/verifiche/README.md2
-rw-r--r--macros/latex/contrib/verifiche/verifiche-example.pdfbin182373 -> 175815 bytes
-rw-r--r--macros/latex/contrib/verifiche/verifiche-example.tex10
-rw-r--r--macros/latex/contrib/verifiche/verifiche.dtx94
-rw-r--r--macros/latex/contrib/verifiche/verifiche.ins4
-rw-r--r--macros/latex/contrib/verifiche/verifiche.pdfbin519980 -> 523647 bytes
45 files changed, 2403 insertions, 1310 deletions
diff --git a/macros/latex/contrib/censor/censor.pdf b/macros/latex/contrib/censor/censor.pdf
index d5f14ea63d..16b5780ed8 100644
--- a/macros/latex/contrib/censor/censor.pdf
+++ b/macros/latex/contrib/censor/censor.pdf
Binary files differ
diff --git a/macros/latex/contrib/censor/censor.sty b/macros/latex/contrib/censor/censor.sty
index 6335b16ae3..df38f68150 100644
--- a/macros/latex/contrib/censor/censor.sty
+++ b/macros/latex/contrib/censor/censor.sty
@@ -1,7 +1,7 @@
% censor.sty
-\def\censorversionnumber{4.0}
+\def\censorversionnumber{4.1}
\ProvidesPackage{censor}
-[2021/12/23 \censorversionnumber
+[2022/02/09 \censorversionnumber\
Provides capability for redaction of sensitive information]
%
@@ -17,22 +17,6 @@
%
% The Current Maintainer of this work is Steven B. Segletes.
-% VERSION:
-% 1.00 - Initial release
-% 2.00 - Added \blackout
-% 2.10 - Allowed \blackout to cross paragraph boundaries with use of
-% \bpar. Stopped censoring periods, in order to preserve
-% end-of-sentence spacing, which differs from inter-word spacing.
-% 3.00 - \censorbox introduced to handle figures, tables, etc.
-% 3.10 - Made \blackout work with \par in argument. Introduced
-% \xblackout
-% 3.20 - Specify depth/height of censor rule. Introduced \def\censordot{}
-% 3.21 - Fixed bug regarding \xblackout rules remaining after a
-% \StopCensoring
-% 3.22 - changed `\if to \ifx in definition of \bl@t, to handle macros like \%
-% 4.0 - Recast \blackout and \xblackout in terms of tokcycle environments
-% - Introduced \blackoutenv...\endblackoutenv and
-% \xblackoutenv...\endxblackoutenv
\usepackage{pbox}
\newlength\censorruledepth
@@ -68,7 +52,8 @@
\usepackage{tokcycle}[2021/03/10]
-\def\@dump#1{\addcytoks[1]{\expandafter\censor\expandafter{#1}}\def#1{}}
+\def\@dump#1{\if\relax\detokenize\expandafter{#1}\relax\else
+ \addcytoks[1]{\expandafter\censor\expandafter{#1}}\fi\def#1{}}
\def\@append#1#2{\tc@defx#1{#1#2}}
\def\spacelap{0.6ex}
@@ -80,30 +65,78 @@
\newif\ifexpandarg
-\xtokcycleenvironment\xblackoutenv
+\xtokcycleenvironment\blackoutenv
{\ifx.##1\@dump\censored@word\addcytoks[1]{\censordot}\else
\@append\censored@word{##1}%
\tcpeek\@next\ifx\@next\@tcEscapeptr\@dump\censored@word\fi\fi}
- {\tctestifcon\ifexpandarg{\expandafter\processtoks\expandafter{\expanded{##1}}}%
- {\processtoks{##1}}\@dump\censored@word\expandargfalse}
- {\@dump\censored@word\tctestifx{~##1}{\@append\censored@word{##1}}%
- {\tctestifx{\expanded##1}{\expandargtrue}{\addcytoks{##1}}}}
- {\@dump\censored@word\addcytoks{\censpace}}
- {\def\censored@word{}}
+ {\tctestifcon\ifexpandarg{\expandafter\processtoks\expandafter
+ {\expanded{##1}}\@dump\censored@word}{\groupedcytoks{\processtoks{##1}%
+ \@dump\censored@word}}\expandargfalse}
+ {\tctestifx{~##1}{\@append\censored@word{##1}}%
+ {\tctestifx{\expanded##1}{\@dump\censored@word\expandargtrue}%
+ {\test@chars{##1}\ifchar\@append\censored@word{##1}\else
+ \test@accents{##1}\ifaccent\@append\censored@word{##1}\tcpop\tc@popped
+ \expandafter\@append\expandafter\censored@word\expandafter{\tc@popped}%
+ \else\@dump\censored@word\addcytoks{##1}\fi\fi}}}
+ {\@dump\censored@word\addcytoks{##1}}
+ {\stripgroupingtrue\def\censored@word{}}
{\@dump\censored@word}
-\xtokcycleenvironment\blackoutenv
+
+\xtokcycleenvironment\xblackoutenv
{\ifx.##1\@dump\censored@word\addcytoks[1]{\censordot}\else
\@append\censored@word{##1}%
\tcpeek\@next\ifx\@next\@tcEscapeptr\@dump\censored@word\fi\fi}
- {\tctestifcon\ifexpandarg{\expandafter\processtoks\expandafter{\expanded{##1}}}%
- {\processtoks{##1}}\@dump\censored@word\expandargfalse}
- {\@dump\censored@word\tctestifx{~##1}{\@append\censored@word{##1}}%
- {\tctestifx{\expanded##1}{\expandargtrue}{\addcytoks{##1}}}}
- {\@dump\censored@word\addcytoks{##1}}
- {\def\censored@word{}}
+ {\tctestifcon\ifexpandarg{\expandafter\processtoks\expandafter
+ {\expanded{##1}}\@dump\censored@word}{\groupedcytoks{\processtoks{##1}%
+ \@dump\censored@word}}\expandargfalse}
+ {\tctestifx{~##1}{\@append\censored@word{##1}}%
+ {\tctestifx{\expanded##1}{\@dump\censored@word\expandargtrue}%
+ {\test@chars{##1}\ifchar\@append\censored@word{##1}\else
+ \test@accents{##1}\ifaccent\@append\censored@word{##1}\tcpop\tc@popped
+ \expandafter\@append\expandafter\censored@word\expandafter{\tc@popped}%
+ \else\@dump\censored@word\addcytoks{##1}\fi\fi}}}
+ {\@dump\censored@word\addcytoks{\censpace}}
+ {\stripgroupingtrue\def\censored@word{}}
{\@dump\censored@word}
+\newif\ifchar
+\newcommand\test@chars[1]{\charfalse
+ \ifx\$#1\chartrue\else
+ \ifx\&#1\chartrue\else
+ \ifx\##1\chartrue\else
+ \ifx\%#1\chartrue\else
+ \ifx\_#1\chartrue\else
+ \ifx\o#1\chartrue\else
+ \ifx\O#1\chartrue\else
+ \ifx\oe#1\chartrue\else
+ \ifx\OE#1\chartrue\else
+ \ifx\aa#1\chartrue\else
+ \ifx\AA#1\chartrue\else
+ \ifx\ae#1\chartrue\else
+ \ifx\AE#1\chartrue\else
+ \ifx\l#1\chartrue\else
+ \ifx\L#1\chartrue
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+}
+\newif\ifaccent
+\newcommand\test@accents[1]{\accentfalse
+ \ifx\`#1\accenttrue\else
+ \ifx\=#1\accenttrue\else
+ \ifx\'#1\accenttrue\else
+ \ifx\.#1\accenttrue\else
+ \ifx\^#1\accenttrue\else
+ \ifx\"#1\accenttrue\else
+ \ifx\u#1\accenttrue\else
+ \ifx\d#1\accenttrue\else
+ \ifx\v#1\accenttrue\else
+ \ifx\b#1\accenttrue\else
+ \ifx\H#1\accenttrue\else
+ \ifx\t#1\accenttrue\else
+ \ifx\~#1\accenttrue\else
+ \ifx\c#1\accenttrue
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+}
%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -122,4 +155,24 @@
% NOTE: A \protect\censorbox{} MAY BE REQUIRED INSIDE SOME ENVIRONMENTS
\endinput
+VERSION:
+1.00 - Initial release
+2.00 - Added \blackout
+2.10 - Allowed \blackout to cross paragraph boundaries with use of
+ \bpar. Stopped censoring periods, in order to preserve
+ end-of-sentence spacing, which differs from inter-word spacing.
+3.00 - \censorbox introduced to handle figures, tables, etc.
+3.10 - Made \blackout work with \par in argument. Introduced
+ \xblackout
+3.20 - Specify depth/height of censor rule. Introduced \def\censordot{}
+3.21 - Fixed bug regarding \xblackout rules remaining after a
+ \StopCensoring
+3.22 - changed `\if to \ifx in definition of \bl@t, to handle macros like \%
+4.0 - Recast \blackout and \xblackout in terms of tokcycle environments
+ - Introduced \blackoutenv...\endblackoutenv and
+ \xblackoutenv...\endxblackoutenv
+4.1 - Added automatic support for censoring character macros such as \$,
+ etc. and character accents such as \', etc. See \test@chars and
+ \test@accents for details.
+ - Fixed bug in which \expanded arguments remained inside a TeX group
diff --git a/macros/latex/contrib/censor/censor.tex b/macros/latex/contrib/censor/censor.tex
index e9990244f2..ef64629f13 100644
--- a/macros/latex/contrib/censor/censor.tex
+++ b/macros/latex/contrib/censor/censor.tex
@@ -556,8 +556,20 @@ However, it is also clear that an extended text passage may contain
The \verb|\blackout| and \verb|\xblackout| macros can at least digest
control sequences in the input-text stream.
-How the sequences are handled will require some user intervention.
-By default, these macros will be echoed into the output stream in a literal
+How the sequences are handled may require some user intervention.
+
+Certain macro that are known to expand directly into typeset characters
+ are handled automatically.
+These include \verb|\$|, \verb|\&|, \verb|\#|, \verb|\%|, \verb|\_|,
+ \verb|\o|, \verb|\O|, \verb|\oe|, \verb|\OE|, \verb|\aa|, \verb|\AA|,
+ \verb|\ae|, \verb|\AE|, \verb|\l|, and \verb|\L|.
+Other macros, that are part of the \LaTeX{} accents, are likewise
+ handled seamlessly, including \verb|\`|, \verb|\=|, \verb|\'|,
+ \verb|\.|, \verb|\^|, \verb|\"|, \verb|\u|, \verb|\d|, \verb|\v|,
+ \verb|\b|, \verb|\H|, \verb|\t|, \verb|\~|, and \verb|\c|.
+
+For macros outside of these special cases, the default behavior is
+ to echo the macro into the output stream in a literal
(unexpanded) form.
Consider the following line of \LaTeX{} code:
@@ -574,7 +586,7 @@ The \verb|\textit| is still part of the blackout rendering, but the
of \verb|\textit|.
Some macros, however, expand to literal text.
-Because they are, by default, carried literally into the output, they
+Because macros are, by default, carried literally into the output, they
will only expand into text \textit{after} the censoring has been
applied.
Consider the following line of \LaTeX{} code:
diff --git a/macros/latex/contrib/crefthe/crefthe-doc.pdf b/macros/latex/contrib/crefthe/crefthe-doc.pdf
index 7175c64abc..5cf5715d5c 100644
--- a/macros/latex/contrib/crefthe/crefthe-doc.pdf
+++ b/macros/latex/contrib/crefthe/crefthe-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/crefthe/crefthe-doc.tex b/macros/latex/contrib/crefthe/crefthe-doc.tex
index 39d53e76b0..718672f896 100644
--- a/macros/latex/contrib/crefthe/crefthe-doc.tex
+++ b/macros/latex/contrib/crefthe/crefthe-doc.tex
@@ -64,10 +64,10 @@
fonttitle = \sffamily,
attach boxed title to top left = {yshift=-\tcboxedtitleheight/2, xshift=.5cm},
boxed title style = {boxrule=0pt, colframe=paper},
- before skip = 0.3cm,
- after skip = 0.3cm,
- top = 3mm,
- bottom = 3mm,
+ before skip = 3mm,
+ after skip = 3mm,
+ top = 2.5mm,
+ bottom = 1.5mm,
title={\scshape\sffamily #1}]%
}{\end{tcolorbox}\ResumeLineNumbers}
@@ -89,7 +89,7 @@
\title{\crefthepackage{} - cross referencing with proper definite articles}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\crefthepackage{} 2022/02/04}}
+\thanks{Corresponding to: \texttt{\crefthepackage{} 2022/02/10}}
\date{February 2022, in Paris}
\maketitle
@@ -156,9 +156,9 @@ Before everything, you need to define the names, which can be done with \lstinli
\crefthename{theorem}[le]{théorème}[les]{théorèmes}
\end{code}
-% \begin{tip}
-% The \lstinline|\crefthename|s should be placed in your preamble.
-% \end{tip}
+\begin{tip}
+ The \lstinline|\crefthename|s should be placed in your preamble, otherwise the \lstinline|\cref| formats will not be set. These names can, however, be reset within the document body.
+\end{tip}
Then you can use the command \lstinline|\crefthe| as follows:
\begin{itemize}
@@ -207,7 +207,7 @@ which would result in (provided that you have done \lstinline|\selectlanguage{fr
Voilà !
-\section{Regarding the cases}
+\section{Regarding the upper and lower cases}
The commands also have correspoding uppercased version: \lstinline|\Crefthename| and \lstinline|\Crefthe|, similar to \textsf{cleveref}'s \lstinline|\Crefname| and \lstinline|\Cref|, reserved for use at the beginning of a sentence. \lstinline|\Crefthe| can handle case changing automatically: for example, with \lstinline|\Crefthe[À]{thm1,thm2,prop3}|, you will get something like
@@ -222,22 +222,22 @@ Of course you will have to define the \lstinline|\Crefthename|s separately, for
\Crefthename{proposition}[La]{proposition}[Les]{propositions}
\end{code}
-\section{Relationship with \textsf{cleveref}}
+\section{For writing multi-language documents}
-\crefthepackage{} loads \textsf{cleveref} automatically and pass all the options to it. All its commands, used without optional arguments, degenerate to those in \textsf{cleveref}. For example, \lstinline|\crefthe{...}| is the same as \lstinline|\cref{...}|, and \lstinline|\crefthename| is the same as \lstinline|\crefname| if the definite articles are not specified. That said, you can safely use the command \lstinline|\crefthe| everywhere in your document without causing extra trouble.
+To place hyperlinks at the right place, \lstinline|\crefthename| touches the corresponding \lstinline|\crefformat| internally, which makes the format language-dependent. If you are writing multi-language documents, you may consider putting \lstinline|\crefthename| inside your language configuration so as to reset it each time you select a new language.
-With the option \texttt{overwrite}, user commands in \textsf{cleveref} will be replaced by those offered here, thus you can simply write \lstinline|\cref| for \lstinline|\crefthe| -- and similarly for \lstinline|\Cref|, \lstinline|\crefname| and \lstinline|\Crefname|.
-\section{For multi-language documents}
+\section{The relationship with \textsf{cleveref}}
+
+\crefthepackage{} loads \textsf{cleveref} automatically and pass all the options to it. All its commands, used without optional arguments, degenerate to those in \textsf{cleveref}. For example, \lstinline|\crefthe{...}| is the same as \lstinline|\cref{...}|, and \lstinline|\crefthename| is the same as \lstinline|\crefname| if the definite articles are not specified. That said, you can safely use the command \lstinline|\crefthe| everywhere in your document without causing extra trouble.
+
+With the option \texttt{overwrite}, user commands in \textsf{cleveref} will be replaced by those offered here, thus you can simply write \lstinline|\cref| for \lstinline|\crefthe| -- and similarly with \lstinline|\Cref|, \lstinline|\crefname| and \lstinline|\Crefname|.
-To place hyperlinks at the right place, \lstinline|\crefthename| touches the corresponding \lstinline|\crefformat| internally, which makes the format language-dependent. If you are writing multi-language documents, you may consider putting \lstinline|\crefthename| inside your language configuration so as to reset it each time you select a new language.
\section{Known issues}
\begin{itemize}
\item \crefthepackage{} currently works for French, Italian, Portuguese (European and Brazilian) and Spanish, certainly more would be added to this list.
- \item The current mechanism does not work for German. The author plans to adopt a more refined approach in later versions in order to support the various situations in German.
- \item For now, the automatic case changing mechanism only works properly under Unicode based engines. If you are using pdf\LaTeX{} or typing accented letters with text commands, \lstinline|\Crefthe| may not work as expected.
- % \item In case that the initial letter of \meta{prep} is capitalized, \crefthepackage{} cannot yet handle the case changes automatically. However, this should be a rare occurrence.
+ \item The current mechanism does not work for German. The author plans to adopt a more refined approach in later versions in order to support the various situations in German. Meanwhile, you may consider the package \textsf{zref-clever}, which has a much more powerful and sophisticated interface for configure cross referencing.
\item The names of theorem-like environments are not provided --- for the moment you need to define them all by yourself. However, users are encouraged to use the \ProjLib{} toolkit, which already handles everything for you.
\end{itemize}
diff --git a/macros/latex/contrib/crefthe/crefthe.sty b/macros/latex/contrib/crefthe/crefthe.sty
index 2da1714334..27fbe01122 100644
--- a/macros/latex/contrib/crefthe/crefthe.sty
+++ b/macros/latex/contrib/crefthe/crefthe.sty
@@ -1,6 +1,6 @@
%%
%% Copyright (C) 2021-2022 by Jinwen XU
-%% -------------------------------
+%% ------------------------------------
%%
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.3c of this license
@@ -13,323 +13,292 @@
\RequirePackage{l3keys2e}
\ProvidesExplPackage
{crefthe}
- {2022/02/04} {}
+ {2022/02/10} {}
{Cross referencing with proper definite articles}
-\keys_define:nn {crefthe}
+\keys_define:nn { crefthe }
{
, overwrite .bool_set:N = \l__crefthe_overwrite_bool
- , overwrite .initial:n = { false }
- , unknown .code:n =
- {
- \PassOptionsToPackage { \CurrentOption } {cleveref}
- }
+ , overwrite .initial:n = { false }
+ , unknown .code:n =
+ { \PassOptionsToPackage { \CurrentOption } { cleveref } }
}
-\ProcessKeysOptions{crefthe}
+\ProcessKeysOptions { crefthe }
-\RequirePackage{cleveref}
+\RequirePackage { cleveref }
-\cs_set_eq:cc {crefthe_cref_original:n} {cref}
-\cs_set_eq:cc {crefthe_Cref_original:n} {Cref}
-\cs_set_eq:cc {crefthe_crefname_original:n} {crefname}
-\cs_set_eq:cc {crefthe_Crefname_original:n} {Crefname}
+\NewCommandCopy \crefthe_cref_original:w \cref
+\NewCommandCopy \crefthe_Cref_original:w \Cref
+\NewCommandCopy \crefthe_crefname_original:w \crefname
+\NewCommandCopy \crefthe_Crefname_original:w \Crefname
-\bool_if:NT \l__crefthe_overwrite_bool
- {
- \hook_gput_next_code:nn {package/crefthe/after}
- {
- \cs_set_eq:cc {cref} {crefthe}
- \cs_set_eq:cc {Cref} {Crefthe}
- \cs_set_eq:cc {crefname} {crefthename}
- \cs_set_eq:cc {Crefname} {Crefthename}
- }
- }
-
-\tl_new:N \g__crefthe_prep_once_tl
-\tl_new:N \g__crefthe_prep_each_tl
+\str_new:N \l__crefthe_tmpa_str
-\tl_new:N \l__crefthe_prep_mode_tl
+% \l__crefthe_prep_once_tl is for the "-" mode,
+% that only passes the preposition to the first definite article;
+% \l__crefthe_prep_each_tl is for the "+" mode,
+% that passes the preposition to every definite article.
+\tl_new:N \l__crefthe_prep_once_tl
+\tl_new:N \l__crefthe_prep_each_tl
-\cs_new:Nn \crefthe_case:n { #1 }
-\cs_new:Nn \crefthe_nochange:n { #1 }
+\bool_new:N \l__crefthe_uppercase_bool
\NewDocumentCommand \crefthe { s t- t+ O{} m }
{
- \bool_if:nTF { #2 }
- {
- \tl_gset:Nn \g__crefthe_prep_once_tl { #4 }
- }
- {
- \bool_if:nTF { #3 }
- {
- \tl_gset:Nn \g__crefthe_prep_each_tl { #4 }
- }
- {
- \exp_args:Nx \str_case:nn \l__crefthe_prep_mode_tl
- {
- { - } { \tl_gset:Nn \g__crefthe_prep_once_tl { #4 } }
- { + } { \tl_gset:Nn \g__crefthe_prep_each_tl { #4 } }
- }
- }
- }
- \bool_if:nTF { #1 } { \crefthe_cref_original:n * { #5 } } { \crefthe_cref_original:n { #5 } }
- \tl_gset:Nn \g__crefthe_prep_each_tl {}
+ \bool_set_false:N \l__crefthe_uppercase_bool
+ \__crefthe_cref_general:NNNnnN #1 #2 #3 { #4 } { #5 } \crefthe_cref_original:w
}
-
\NewDocumentCommand \Crefthe { s t- t+ O{} m }
{
- \cs_gset:Npn \crefthe_case:n ##1 { \text_titlecase:n {##1} }
- \bool_if:nTF { #2 }
- {
- \tl_gset:Nn \g__crefthe_prep_once_tl { #4 }
- }
+ \bool_set_true:N \l__crefthe_uppercase_bool
+ \__crefthe_cref_general:NNNnnN #1 #2 #3 { #4 } { #5 } \crefthe_Cref_original:w
+ }
+\cs_new_protected:Npn \__crefthe_cref_general:NNNnnN #1 #2 #3 #4 #5 #6
+ {
+ \bool_if:NTF #2
+ { \tl_set:Nn \l__crefthe_prep_once_tl { #4 } }
{
- \bool_if:nTF { #3 }
- {
- \tl_gset:Nn \g__crefthe_prep_each_tl { #4 }
- }
+ \bool_if:NTF #3
+ { \tl_set:Nn \l__crefthe_prep_each_tl { #4 } }
{
- \exp_args:Nx \str_case:nn \l__crefthe_prep_mode_tl
+ % \str_set:Nx fully expands \__crefthe_prep_mode: into a string,
+ % then \str_case:Vn compares the value of the resulting string:
+ \str_set:Nx \l__crefthe_tmpa_str { \__crefthe_prep_mode: }
+ \str_case:Vn \l__crefthe_tmpa_str
{
- { - } { \tl_gset:Nn \g__crefthe_prep_once_tl { #4 } }
- { + } { \tl_gset:Nn \g__crefthe_prep_each_tl { #4 } }
+ { - } { \tl_set:Nn \l__crefthe_prep_once_tl { #4 } }
+ { + } { \tl_set:Nn \l__crefthe_prep_each_tl { #4 } }
}
}
}
- \bool_if:nTF { #1 } { \crefthe_Cref_original:n * { #5 } } { \crefthe_Cref_original:n { #5 } }
- \tl_gset:Nn \g__crefthe_prep_each_tl {}
+ \bool_if:NTF #1
+ { #6 * { #5 } } % here #6 is \crefthe_cref_original:w or \crefthe_Cref_original:w
+ { #6 { #5 } }
+ \tl_gclear:N \l__crefthe_prep_each_tl
}
-\NewDocumentCommand \crefthename { m O{} m O{} m }
+% \__crefthe_prep_mode: defines the default mode for supported languages
+\cs_new:Npn \__crefthe_prep_mode:
{
- \tl_if_blank:eTF { #2 }
- {
- \crefthe_crefname_original:n { #1 } { #3 } { #5 }
- \cs_set:cn { cref_#1_format:nnn } { ##2 #3 ~ ##1 ##3 }
- \cs_set:cn { cref_#1_format_first:nnn } { ##2 #5 ~ ##1 ##3 }
- }
+ \str_case:Vn \languagename
{
- \crefthe_crefname_original:n { #1 } { \crefthemark{ #2 } #3 } { \crefthemark{ #4 } #5 }
- \cs_set:cn { cref_#1_format:nnn } { \crefthemark { #2 } ##2 #3 ~ ##1 ##3 }
- \cs_set:cn { cref_#1_format_first:nnn } { \crefthemark { #4 } ##2 #5 ~ ##1 ##3 }
- }
- \hook_gput_next_code:nn { begindocument }
- {
- \cs_set_eq:cc { cref@ #1 @format } { cref_#1_format:nnn }
- \cs_set_eq:cc { cref@ #1 @format@first } { cref_#1_format_first:nnn }
+ {french} { + }
+ {italian} { + }
+ {spanish} { - }
+ {portuguese} { + }
+ {brazilian} { + }
}
}
+\NewDocumentCommand \crefthename { m O{} m O{} m }
+ {
+ \__crefthe_name_general:nnnnnNN { #1 } { #2 } { #3 } { #4 } { #5 }
+ c \crefthe_crefname_original:w
+ }
\NewDocumentCommand \Crefthename { m O{} m O{} m }
{
- \tl_if_blank:eTF { #2 }
+ \__crefthe_name_general:nnnnnNN { #1 } { #2 } { #3 } { #4 } { #5 }
+ C \crefthe_Crefname_original:w
+ }
+\cs_new_protected:Npn \__crefthe_name_general:nnnnnNN #1 #2 #3 #4 #5 #6 #7
+ {
+ % #6 is c or C
+ % #7 is \crefthe_crefname_original:w or \crefthe_Crefname_original:w
+ \tl_if_blank:nTF { #2 }
{
- \crefthe_Crefname_original:n { #1 } { #3 } { #5 }
- \cs_set:cn { Cref_#1_format:nnn } { ##2 #3 ~ ##1 ##3 }
- \cs_set:cn { Cref_#1_format_first:nnn } { ##2 #5 ~ ##1 ##3 }
+ #7 { #1 } { #3 } { #5 }
+ \cs_set:cn { #6ref_#1_format:nnn } { ##2 #3 ~ ##1 ##3 }
+ \cs_set:cn { #6ref_#1_format_first:nnn } { ##2 #5 ~ ##1 ##3 }
}
{
- \crefthe_Crefname_original:n { #1 } { \crefthemark{ #2 } #3 }{ \crefthemark{ #4 } #5 }
- \cs_set:cn { Cref_#1_format:nnn } { \crefthemark { #2 } ##2 #3 ~ ##1 ##3 }
- \cs_set:cn { Cref_#1_format_first:nnn } { \crefthemark { #4 } ##2 #5 ~ ##1 ##3 }
+ #7 { #1 } { \crefthemark { #2 } #3 } { \crefthemark { #4 } #5 }
+ \cs_set:cn { #6ref_#1_format:nnn } { \crefthemark { #2 } ##2 #3 ~ ##1 ##3 }
+ \cs_set:cn { #6ref_#1_format_first:nnn } { \crefthemark { #4 } ##2 #5 ~ ##1 ##3 }
}
- \hook_gput_next_code:nn { begindocument }
+ \hook_gput_code:nnn { begindocument } { crefthe }
{
- \cs_set_eq:cc { Cref@ #1 @format } { Cref_#1_format:nnn }
- \cs_set_eq:cc { Cref@ #1 @format@first } { Cref_#1_format_first:nnn }
+ \cs_set_eq:cc { #6ref@ #1 @format } { #6ref_#1_format:nnn }
+ \cs_set_eq:cc { #6ref@ #1 @format@first } { #6ref_#1_format_first:nnn }
}
}
+\cs_generate_variant:Nn \text_lowercase:n { V }
\NewDocumentCommand \crefthemark { m }
{
- \crefthe_contraction:nn { \crefthe_case:n \g__crefthe_prep_each_tl }
- {
- \crefthe_contraction:nn { \crefthe_case:n \g__crefthe_prep_once_tl } { #1 }
- }
- \tl_gset:Nn \g__crefthe_prep_once_tl {}
- \tl_gset:Nx \g__crefthe_prep_each_tl { \text_lowercase:n \g__crefthe_prep_each_tl }
+ \crefthe_contraction:Ve \l__crefthe_prep_each_tl
+ { \crefthe_contraction:Vn \l__crefthe_prep_once_tl { #1 } }
+ \tl_gclear:N \l__crefthe_prep_once_tl
+ \tl_set:Nx \l__crefthe_prep_each_tl
+ { \text_lowercase:V \l__crefthe_prep_each_tl }
\str_if_eq:eeF { \str_tail:n { #1 } } { ' } { ~ }
- \cs_gset:Npn \crefthe_case:n ##1 { \crefthe_nochange:n {##1} }
- % \cs_gset:Npn \crefthe_case:n ##1 { \text_lowercase:n {##1} }
+ \bool_set_false:N \l__crefthe_uppercase_bool
}
-\tl_set:Nn \l__crefthe_prep_mode_tl {
- \str_case_e:nn { \languagename }
- {
- {french} { + }
- {italian} { + }
- {spanish} { - }
- {portuguese} { + }
- {brazilian} { + }
- }
-}
-
+\prg_generate_conditional_variant:Nnn \str_case_e:nn { nv } { p, T, F, TF }
\cs_new:Npn \crefthe_contraction:nn #1#2
{
- \tl_if_blank:eTF { #1 }
- { #2 }
+ \exp_args:Ne \__crefthe_contraction:nnn
+ { \text_lowercase:n { #2 } } { #1 } { #2 }
+ }
+\cs_generate_variant:Nn \crefthe_contraction:nn { V, Ve }
+\cs_new:Npn \__crefthe_contraction:nnn #1 #2 #3
+ {
+ % #1 is \text_lowercase:n { #3 }
+ % #2 is the preposition
+ \tl_if_blank:nTF { #2 }
+ { #3 }
{
- \tl_if_exist:cTF { crefthe_contraction_rule_ \languagename _tl }
+ \tl_if_exist:cTF { c_crefthe_contraction_rule_ \languagename _tl }
{
- \exp_args:Nnx \str_case_e:nnF { #1~\text_lowercase:n{ #2 } }
+ \exp_args:Ne \__crefthe_conditional_uppercase:n
{
- \tl_use:c { crefthe_contraction_rule_ \languagename _tl }
+ \str_case_e:nvF { #2~#1 }
+ { c_crefthe_contraction_rule_ \languagename _tl }
+ { #2~#1 }
}
- { #1~\text_lowercase:n{ #2 } }
}
- { #1 ~ #2 }
+ { #2~#3 }
}
}
-
-\tl_gset:Nn \crefthe_contraction_rule_french_tl
+\cs_new:Npn \__crefthe_conditional_uppercase:n #1
{
- { à~le } { au }
- { à~les } { aux }
- { de~le } { du }
- { de~les } { des }
- { À~le } { Au }
- { À~les } { Aux }
- { De~le } { Du }
- { De~les } { Des }
+ \bool_if:NTF \l__crefthe_uppercase_bool
+ { \text_titlecase_first:n }
+ { \use:n }
+ { #1 }
}
-\tl_gset:Nn \crefthe_contraction_rule_italian_tl
+\hook_gput_code:nnn { begindocument/end } { crefthe }
{
- { a~il } { al }
- { a~lo } { allo }
- { a~l' } { all' }
- { a~la } { alla }
- { di~il } { del }
- { di~lo } { dello }
- { di~l' } { dell' }
- { di~la } { della }
- { da~il } { dal }
- { da~lo } { dallo }
- { da~l' } { dall' }
- { da~la } { dalla }
- { in~il } { nel }
- { in~lo } { nello }
- { in~l' } { nell' }
- { in~la } { nella }
- { su~il } { sul }
- { su~lo } { sullo }
- { su~l' } { sull' }
- { su~la } { sulla }
- { a~i } { ai }
- { a~gli } { agli }
- { a~le } { alle }
- { di~i } { dei }
- { di~gli } { degli }
- { di~le } { delle }
- { da~i } { dai }
- { da~gli } { dagli }
- { da~le } { dalle }
- { in~i } { nei }
- { in~gli } { negli }
- { in~le } { nelle }
- { su~i } { sui }
- { su~gli } { sugli }
- { su~le } { sulle }
- { A~il } { Al }
- { A~lo } { Allo }
- { A~l' } { All' }
- { A~la } { Alla }
- { Di~il } { Del }
- { Di~lo } { Dello }
- { Di~l' } { Dell' }
- { Di~la } { Della }
- { Da~il } { Dal }
- { Da~lo } { Dallo }
- { Da~l' } { Dall' }
- { Da~la } { Dalla }
- { In~il } { Nel }
- { In~lo } { Nello }
- { In~l' } { Nell' }
- { In~la } { Nella }
- { Su~il } { Sul }
- { Su~lo } { Sullo }
- { Su~l' } { Sull' }
- { Su~la } { Sulla }
- { A~i } { Ai }
- { A~gli } { Agli }
- { A~le } { Alle }
- { Di~i } { Dei }
- { Di~gli } { Degli }
- { Di~le } { Delle }
- { Da~i } { Dai }
- { Da~gli } { Dagli }
- { Da~le } { Dalle }
- { In~i } { Nei }
- { In~gli } { Negli }
- { In~le } { Nelle }
- { Su~i } { Sui }
- { Su~gli } { Sugli }
- { Su~le } { Sulle }
+ \bool_if:NT \l__crefthe_overwrite_bool
+ {
+ \RenewCommandCopy \cref \crefthe
+ \RenewCommandCopy \Cref \Crefthe
+ \RenewCommandCopy \crefname \crefthename
+ \RenewCommandCopy \Crefname \Crefthename
+ }
}
-\tl_gset:Nn \crefthe_contraction_rule_spanish_tl
+\tl_const:Nn \c_crefthe_contraction_rule_french_tl
{
- { a~el } { al }
- { de~el } { del }
- { A~el } { Al }
- { De~el } { Del }
+ { à~le } { au }
+ { à~les } { aux }
+ { de~le } { du }
+ { de~les } { des }
+ { À~le } { Au }
+ { À~les } { Aux }
+ { De~le } { Du }
+ { De~les } { Des }
}
-
-\tl_gset:Nn \crefthe_contraction_rule_portuguese_tl
+\tl_const:Nn \c_crefthe_contraction_rule_italian_tl
{
- { a~o } { ao }
- { a~a } { à }
- { a~os } { aos }
- { a~as } { às }
- { de~o } { do }
- { de~a } { da }
- { de~os } { dos }
- { de~as } { das }
- { em~o } { no }
- { em~a } { na }
- { em~os } { nos }
- { em~as } { nas }
- { A~o } { Ao }
- { A~a } { À }
- { A~os } { Aos }
- { A~as } { Às }
- { De~o } { Do }
- { De~a } { Da }
- { De~os } { Dos }
- { De~as } { Das }
- { Em~o } { No }
- { Em~a } { Na }
- { Em~os } { Nos }
- { Em~as } { Nas }
+ { a~il } { al }
+ { a~lo } { allo }
+ { a~l' } { all' }
+ { a~la } { alla }
+ { di~il } { del }
+ { di~lo } { dello }
+ { di~l' } { dell' }
+ { di~la } { della }
+ { da~il } { dal }
+ { da~lo } { dallo }
+ { da~l' } { dall' }
+ { da~la } { dalla }
+ { in~il } { nel }
+ { in~lo } { nello }
+ { in~l' } { nell' }
+ { in~la } { nella }
+ { su~il } { sul }
+ { su~lo } { sullo }
+ { su~l' } { sull' }
+ { su~la } { sulla }
+ { a~i } { ai }
+ { a~gli } { agli }
+ { a~le } { alle }
+ { di~i } { dei }
+ { di~gli } { degli }
+ { di~le } { delle }
+ { da~i } { dai }
+ { da~gli } { dagli }
+ { da~le } { dalle }
+ { in~i } { nei }
+ { in~gli } { negli }
+ { in~le } { nelle }
+ { su~i } { sui }
+ { su~gli } { sugli }
+ { su~le } { sulle }
+ { A~il } { Al }
+ { A~lo } { Allo }
+ { A~l' } { All' }
+ { A~la } { Alla }
+ { Di~il } { Del }
+ { Di~lo } { Dello }
+ { Di~l' } { Dell' }
+ { Di~la } { Della }
+ { Da~il } { Dal }
+ { Da~lo } { Dallo }
+ { Da~l' } { Dall' }
+ { Da~la } { Dalla }
+ { In~il } { Nel }
+ { In~lo } { Nello }
+ { In~l' } { Nell' }
+ { In~la } { Nella }
+ { Su~il } { Sul }
+ { Su~lo } { Sullo }
+ { Su~l' } { Sull' }
+ { Su~la } { Sulla }
+ { A~i } { Ai }
+ { A~gli } { Agli }
+ { A~le } { Alle }
+ { Di~i } { Dei }
+ { Di~gli } { Degli }
+ { Di~le } { Delle }
+ { Da~i } { Dai }
+ { Da~gli } { Dagli }
+ { Da~le } { Dalle }
+ { In~i } { Nei }
+ { In~gli } { Negli }
+ { In~le } { Nelle }
+ { Su~i } { Sui }
+ { Su~gli } { Sugli }
+ { Su~le } { Sulle }
}
-
-\tl_gset:Nn \crefthe_contraction_rule_brazilian_tl
+\tl_const:Nn \c_crefthe_contraction_rule_spanish_tl
+ {
+ { a~el } { al }
+ { de~el } { del }
+ { A~el } { Al }
+ { De~el } { Del }
+ }
+\tl_const:Nn \c_crefthe_contraction_rule_portuguese_tl
{
- { a~o } { ao }
- { a~a } { à }
- { a~os } { aos }
- { a~as } { às }
- { de~o } { do }
- { de~a } { da }
- { de~os } { dos }
- { de~as } { das }
- { em~o } { no }
- { em~a } { na }
- { em~os } { nos }
- { em~as } { nas }
- { A~o } { Ao }
- { A~a } { À }
- { A~os } { Aos }
- { A~as } { Às }
- { De~o } { Do }
- { De~a } { Da }
- { De~os } { Dos }
- { De~as } { Das }
- { Em~o } { No }
- { Em~a } { Na }
- { Em~os } { Nos }
- { Em~as } { Nas }
+ { a~o } { ao }
+ { a~a } { à }
+ { a~os } { aos }
+ { a~as } { às }
+ { de~o } { do }
+ { de~a } { da }
+ { de~os } { dos }
+ { de~as } { das }
+ { em~o } { no }
+ { em~a } { na }
+ { em~os } { nos }
+ { em~as } { nas }
+ { A~o } { Ao }
+ { A~a } { À }
+ { A~os } { Aos }
+ { A~as } { Às }
+ { De~o } { Do }
+ { De~a } { Da }
+ { De~os } { Dos }
+ { De~as } { Das }
+ { Em~o } { No }
+ { Em~a } { Na }
+ { Em~os } { Nos }
+ { Em~as } { Nas }
}
+\tl_const:Nx \c_crefthe_contraction_rule_brazilian_tl
+ { \exp_not:V \c_crefthe_contraction_rule_portuguese_tl }
\endinput
%%
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 42ad3ce7ee..7829fa7ea4 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2022/02/05}{1.621}
+\ProvidesExplClass{easybook}{2022/02/10}{1.622}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -305,7 +305,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2022/02/05}{1.621}
+\ProvidesExplPackage{easybase}{2022/02/10}{1.622}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1814,8 +1814,8 @@
\skip_set:Nn \textfloatsep { 12pt plus 2pt minus 4pt }
\skip_set:Nn \dbltextfloatsep { 12pt plus 2pt minus 4pt }
\skip_set:Nn \multicolsep { 12pt plus 4pt minus 3pt }
-\int_gset:Nn \vbadness { 10000 }
-\int_gset:Nn \hbadness { 10000 }
+%% \int_gset:Nn \vbadness { 10000 }
+%% \int_gset:Nn \hbadness { 10000 }
\setcounter{topnumber}{4}
\setcounter{bottomnumber}{4}
\setcounter{totalnumber}{8}
@@ -2332,7 +2332,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2022/02/05}{1.621}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2022/02/10}{1.622}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 074ba055fd..5f874f9cbe 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index ad25564b67..556c7aff7b 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -21,8 +21,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK 使用手册,
- version = v1.621,
- date = 2022/02/05,
+ version = v1.622,
+ date = 2022/02/10,
authors = 瞿毅,
info = 排版简体中文学位论文和书籍,
email = q1jx@foxmail.com,
@@ -240,29 +240,29 @@
\section{文档类选项}
\label{sec:document class options}
-文档类选项应当在使用 \cls*{easybook} 文档类或 \pkg*{easybase} 宏包(部分支持)时载入,可见\ref{subsec:basic usage} 的例子。选项前带有 \ding{73} 符号表示文档类与宏包都适用,否则只可用于文档类。除了下面列举的选项以外,还支持标准和 C\TeX 文档类的选项。
+文档类选项应当在使用 \cls*{easybook} 文档类或 \pkg*{easybase} 宏包(部分支持)时载入,可见\ref{subsec:basic usage} 的例子。选项前带有 \ding{73} 符号表示只可用于文档类,否则文档类与宏包都适用。除了下面列举的选项以外,还支持标准和 C\TeX 文档类的选项。
\begin{options}
- \opt{draft}\dtag
+ \opt{draft}
开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。不使用绘图宏包及依赖于 \pkg*{tcolorbox} 宏包的盒子环境也会增快编译速度,详情见\ref{subsec:box}。
- \opt{newline}
+ \opt{newline}\dtag
部分和章标题的样式为另起一行,符合一般英文书籍的习惯。
- \keychoice{scheme}{chinese,plain}\Default{chinese}
+ \keychoice{scheme}{chinese,plain}\dtag\Default{chinese}
文档主题方案选项 \option{scheme} 扩展了 C\TeX 文档类中同名选项原有的作用范围,选项值 \code{plain} 可使各类标题变为英文形式。包括章节标题、图表标题和定理名等。
- \opt{enmode}
+ \opt{enmode}\dtag
同时开启 \option{newline} 和 \keyis{scheme}{plain} 选项以符合英文原生风格。
- \keychoice{paper}{a4paper,b5paper,c5paper,letterpaper,other paper}\dtag\Default{a4paper}
+ \keychoice{paper}{a4paper,b5paper,c5paper,letterpaper,other paper}\Default{a4paper}
文档页面尺寸选项将参数交给 \pkg*{geometry} 宏包处理,可使用它支持的所有标准纸张规格。
- \keyval{config}{配置文件列表}
+ \keyval{config}{配置文件列表}\dtag
载入用户配置的文件名列表,文件列表以花括号包裹并以英文逗号分隔。文件名应包含如 \code{tex}、\code{def} 或 \code{cfg} 等扩展名。若配置文件不在当前文件夹则文件名需要包含路径。
- \keybool{floatpage}\dtag\Default{false}
+ \keybool{floatpage}\Default{false}
开启这个选项后浮动环境 \env*{table} 和 \env*{figure} 的比例参数会使用默认值。关闭它则尽可能避免出现浮动页,使图表环境与正文段落更加紧凑,减少多余的空白版面。
- \keybool{theorem}\dtag\Default{true}
+ \keybool{theorem}\Default{true}
是否提供定理功能支持。选项开启时定理样式模块生效,此时会载入 \pkg*{amsthm} 和 \pkg*{thmtools} 宏包。
\end{options}
\subsection{中文字体}
\begin{options}
- \keychoice{cjkfont}{adobe,fandol,founder,mac,macnew,macold,ubuntu,windows,none}
+ \keychoice{cjkfont}{adobe,fandol,founder,mac,macnew,macold,ubuntu,windows,none}\dtag
中文字体采用 C\TeX 宏集包含的字库并与其一致,具体配置方案可以查看 C\TeX 使用手册。它与 \option*{fontset} 选项是等效的,如果没有指定 \option{cjkfont} 的值,将会自动检测操作系统并选择相应的字体。
如果需要使用其它中文字体,可以在启用选项 \keyis{cjkfont}{none} 后,再使用 \pkg*{xeCJK} 宏包的相关命令设置字体以及声明字体族:
@@ -276,7 +276,7 @@
\subsection{英文字体}
\begin{options}
- \keychoice{font}{noto,times,times*,ebgaramond,libertine,palatino,auto}\Default{auto}
+ \keychoice{font}{noto,times,times*,ebgaramond,libertine,palatino,auto}\dtag\Default{auto}
预置的英文字体相关配置方案如下表所示。这些字体已经包含在了 \TeX Live 发行版中,所以通常不需要再专门安装。如果您想使用其它英文字体,可以使用 \pkg*{fontspec} 宏包的相关命令进行设置。
\insertblr
{
@@ -297,17 +297,17 @@
\subsection{数学字体}
\begin{options}
- \keychoice{mathfont}{times,noto,notosans,nc,stix2,charter,ebgaramond,libertine,none}\Default{times}
+ \keychoice{mathfont}{times,noto,notosans,nc,stix2,charter,ebgaramond,libertine,none}\dtag\Default{times}
选择合适的数学字体,将会加载 \pkg*{newtxmath} 和 \pkg*{bm} 宏包。使用选项 \code{none} 时可以使用 \pkg*{unicode-math} 等其它数学字体宏包定义字体。
\end{options}
\subsection{\textsf{article} 模式}
\begin{options}
- \keychoice{class}{book,article}\dtag\Default{book}
+ \keychoice{class}{book,article}\Default{book}
使用 \cls*{easybook} 文档类可以有两种模式,默认为 \cls*{book} 模式。选用 \code{article} 会变为 \code{oneside} 单面排版,同时使文档编号、结构等与标准 \cls*{article} 文档类的特性相似,可用于短篇幅的文章,不需要再使用 \cs*{chapter} 命令。此时\ref{sec:document command} 中目录命令的 \option{chapter} 选项会失效,将以 \code{section} 标题级别输出目录。如果使用 \cls*{ctexart} 配合 \pkg*{easybase} 宏包,则选项值 \code{book} 会失效。
- \opt{book}\dtag
+ \opt{book}
开启 \cls*{book} 书籍模式,与 \keyis*{class}{book} 等效。
- \opt{article}\dtag
+ \opt{article}
开启 \cls*{article} 文章模式,与 \keyis*{class}{article} 等效。
\end{options}
diff --git a/macros/latex/contrib/footmisc/Changes b/macros/latex/contrib/footmisc/Changes
deleted file mode 100644
index 5071c771d9..0000000000
--- a/macros/latex/contrib/footmisc/Changes
+++ /dev/null
@@ -1,10 +0,0 @@
------ pst-tree.tex
-1.11 2009-09-17 - fix bug with bounding box
-1.10 2009-01-25 - first version with pst-xkey and own
- documentation (hv)
-1.01 2007-01-03 - fix bug with \endpsTree (hv)
-
-
------ pst-tree.sty
- 2008-12-12 first version (hv)
-
diff --git a/macros/latex/contrib/footmisc/README b/macros/latex/contrib/footmisc/README
deleted file mode 100644
index f513bc4a72..0000000000
--- a/macros/latex/contrib/footmisc/README
+++ /dev/null
@@ -1,9 +0,0 @@
-This package is long-established and widely used. It derives from
-several pieces of work done in pre-LaTeX 2e days by other authors;
-over the years, there is none of that basis that I have not developed
-and/or improved.
-
-A .tds.zip file is available on CTAN.
-
-Robin Fairbairns
-rf10<snail-shape>cam.ac.uk
diff --git a/macros/latex/contrib/footmisc/README.md b/macros/latex/contrib/footmisc/README.md
new file mode 100644
index 0000000000..a2bc798009
--- /dev/null
+++ b/macros/latex/contrib/footmisc/README.md
@@ -0,0 +1,24 @@
+# footmisc package
+
+-----
+
+This is the footmisc package originally written by Robin Fairbairns,
+these days maintained and developed further by Frank Mittelbach.
+
+
+Package source can be found at:
+
+https://github.com/FrankMittelbach/fmitex-footmisc/
+
+and issues can be logged there
+
+The license is LPPL 1.3c.
+
+-----
+
+Copyright (C) 1995-2011 Robin Fairbairns<br />
+Copyright (C) 2018-2022 Frank Mittelbach<br />
+<https://latex-project.org/> <br />
+All rights reserved.
+
+
diff --git a/macros/latex/contrib/footmisc/announce.txt b/macros/latex/contrib/footmisc/announce.txt
new file mode 100644
index 0000000000..8e91587a5d
--- /dev/null
+++ b/macros/latex/contrib/footmisc/announce.txt
@@ -0,0 +1,13 @@
+ Previous version was 5.5b from 2011. This is now version 6. A few
+ bugs have been fixed and the following new options have been added:
+
+ - bottomfloats
+ - bottomfootnotes
+ - abovefloats
+ - belowfloats
+
+ For details see the package documentation.
+
+ There is a rollback possibility using either a date '[=YYYY-MM-DD]'
+ or the string '[=v5]' as the second optional argument to \usepackage,
+ e.g., \usepackage{footmisc}[=v5].
diff --git a/macros/latex/contrib/footmisc/changes.txt b/macros/latex/contrib/footmisc/changes.txt
new file mode 100644
index 0000000000..68c78d6187
--- /dev/null
+++ b/macros/latex/contrib/footmisc/changes.txt
@@ -0,0 +1,17 @@
+2022-02-05 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * footmisc.dtx:
+ Previous version was 5.5b from 2011. This is now version 6.
+ A few bugs have been fixed and the following new options have
+ been added:
+
+ - bottomfloats
+ - bottomfootnotes
+ - abovefloats
+ - belowfloats
+
+ For details see the package documentation.
+
+ There is a rollback possibility using either a date
+ '[=YYYY-MM-DD]' or the string '[=v5]' as the second optional
+ argument to \usepackage, e.g., \usepackage{footmisc}[=v5].
diff --git a/macros/latex/contrib/footmisc/footmisc-2011-06-06.sty b/macros/latex/contrib/footmisc/footmisc-2011-06-06.sty
new file mode 100644
index 0000000000..d44d8e2585
--- /dev/null
+++ b/macros/latex/contrib/footmisc/footmisc-2011-06-06.sty
@@ -0,0 +1,949 @@
+%%
+%% This is file `footmisc.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% footmisc.dtx (with options: `package')
+%% ----------------------------------------------------------------------
+%% The footmisc package -- variations of footnote typesetting
+%% Copyright (c) 2008 Robin Fairbairns
+%%
+%% 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 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `author-maintained'.
+%%
+%% This work consists of the files footmisc.dtx, footmisc.ins, and README
+%% and the derived files footmisc.sty and footmisc.pdf.
+%% -----------------------------------------------------------------------
+%%
+%% This is footmisc.dtx, and it's -*-LaTeX-*- text
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{footmisc}%
+ [2011/06/06 v5.5b
+ a miscellany of footnote facilities%
+ ]% $Id: footmisc.dtx,v 4.25 2011/06/06 14:25:44 rf10 Exp rf10 $
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\newtoks\FN@temptoken
+\providecommand\protected@writeaux{%
+ \protected@write\@auxout
+}% \end{macrocode}
+\def\l@advance@macro{\@@dvance@macro\edef}
+\def\@@dvance@macro#1#2#3{\expandafter\@tempcnta#2\relax
+ \advance\@tempcnta#3\relax
+ #1#2{\the\@tempcnta}%
+}
+\let\@advance@macro\l@advance@macro
+\newif\ifFN@etex
+\ifx\dimexpr\undefined
+ \FN@etexfalse
+\else
+ \FN@etextrue
+\fi
+\newdimen\footnotemargin
+\footnotemargin1.8em\relax
+\DeclareOption{symbol}{\renewcommand\thefootnote{\fnsymbol{footnote}}}
+\DeclareOption{symbol*}{%
+ \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
+ \AtEndOfPackage{\setfnsymbol{lamport*-robust}}%
+}
+\newif\ifFN@para \FN@parafalse
+\DeclareOption{para}{\ifFN@sidefn
+ \PackageError{footmisc}{Option "\CurrentOption" incompatible with
+ option "side"}%
+ {I shall ignore "\CurrentOption"}%
+ \else
+ \FN@paratrue
+ \fi
+}
+\newif\ifFN@sidefn \FN@sidefnfalse
+\DeclareOption{side}{\ifFN@para
+ \PackageError{footmisc}{Option "\CurrentOption" incompatible with
+ option "para"}%
+ {I shall ignore "\CurrentOption"}%
+ \else
+ \FN@sidefntrue
+ \fi
+}
+\let\footnotelayout\@empty
+\DeclareOption{ragged}{%
+ \@ifundefined{RaggedRight}%
+ {\renewcommand\footnotelayout{\linepenalty50 \raggedright}}%
+ {\renewcommand\footnotelayout{\linepenalty50 \RaggedRight}}%
+}
+\newif\ifFN@perpage
+\FN@perpagefalse
+\DeclareOption{perpage}{%
+ \FN@perpagetrue
+}
+\newif\ifFN@bottom \FN@bottomfalse
+\DeclareOption{bottom}{%
+ \FN@bottomtrue
+}
+\DeclareOption{marginal}{%
+ \footnotemargin-0.8em\relax
+}
+\DeclareOption{flushmargin}{%
+ \footnotemargin0pt\relax
+}
+\newif\ifFN@hangfoot \FN@hangfootfalse
+\DeclareOption{hang}{%
+ \FN@hangfoottrue
+}
+\newcommand*\hangfootparskip{0.5\baselineskip}
+\newcommand*\hangfootparindent{0em}%
+\DeclareOption{norule}{%
+ \renewcommand\footnoterule{}%
+ \advance\skip\footins 4\p@\@plus2\p@\relax
+}
+\DeclareOption{splitrule}{%
+ \gdef\split@prev{0}
+ \let\pagefootnoterule\footnoterule
+ \let\mpfootnoterule\footnoterule
+ \def\splitfootnoterule{\kern-3\p@ \hrule \kern2.6\p@}
+ \def\footnoterule{\relax
+ \ifx \@listdepth\@mplistdepth
+ \mpfootnoterule
+ \else
+ \ifnum\split@prev=\z@
+ \pagefootnoterule
+ \else
+ \splitfootnoterule
+ \fi
+ \xdef\split@prev{\the\insertpenalties}%
+ \fi
+ }%
+}
+\newif\ifFN@stablefootnote \FN@stablefootnotefalse
+\DeclareOption{stable}{\FN@stablefootnotetrue}
+\newif\ifFN@multiplefootnote \FN@multiplefootnotefalse
+\DeclareOption{multiple}{\FN@multiplefootnotetrue}
+\ProcessOptions
+\let \if@tempswa \ifFN@bottom
+\ifFN@para \@tempswatrue \fi
+\if@tempswa
+ \@ifl@t@r\fmtversion{2005/12/01}{%
+ \CheckCommand*\@makecol{\ifvoid \footins
+ \setbox\@outputbox \box\@cclv
+ \else
+ \setbox\@outputbox \vbox{%
+ \boxmaxdepth \@maxdepth
+ \unvbox\@cclv
+ \vskip \skip\footins
+ \color@begingroup
+ \normalcolor\footnoterule
+ \unvbox\footins
+ \color@endgroup
+ }%
+ \fi
+ \let \@elt \relax
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global\let\@midlist\@empty
+ \@combinefloats
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \setbox\@outputbox \vbox to\@colht{%
+ \@texttop \dimen@\dp\@outputbox
+ \unvbox\@outputbox
+ \vskip -\dimen@\@textbottom
+ }%
+ \fi
+ \global\maxdepth\@maxdepth
+ }
+ }{%
+ \@ifl@t@r\fmtversion{2003/12/01}{%
+ \CheckCommand*\@makecol{\ifvoid \footins
+ \setbox\@outputbox \box\@cclv
+ \else
+ \setbox\@outputbox \vbox{%
+ \boxmaxdepth\@maxdepth
+ \@tempdima\dp\@cclv
+ \unvbox\@cclv
+ \vskip \skip\footins
+ \color@begingroup
+ \normalcolor
+ \footnoterule
+ \unvbox\footins
+ \color@endgroup
+ }%
+ \fi
+ \let \@elt \relax
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global\let\@midlist\@empty
+ \@combinefloats
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \setbox\@outputbox \vbox to\@colht{%
+ \@texttop
+ \dimen@\dp\@outputbox
+ \unvbox\@outputbox
+ \vskip -\dimen@
+ \@textbottom
+ }%
+ \fi
+ \global\maxdepth\@maxdepth
+ }%
+ }{%
+ \@ifl@t@r\fmtversion{1999/12/01}{%
+ \CheckCommand*\@makecol{\ifvoid \footins
+ \setbox\@outputbox \box\@cclv
+ \else
+ \setbox\@outputbox \vbox{%
+ \boxmaxdepth\@maxdepth
+ \@tempdima\dp\@cclv
+ \unvbox\@cclv
+ \vskip \skip\footins
+ \color@begingroup
+ \normalcolor\footnoterule
+ \unvbox\footins
+ \color@endgroup
+ }%
+ \fi
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global\let\@midlist\@empty
+ \@combinefloats
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \setbox\@outputbox \vbox to\@colht{%
+ \@texttop \dimen@\dp\@outputbox
+ \unvbox\@outputbox
+ \vskip -\dimen@\@textbottom
+ }%
+ \fi
+ \global\maxdepth\@maxdepth
+ }%
+ }%
+ }{%
+ \CheckCommand*\@makecol{\ifvoid \footins
+ \setbox\@outputbox \box\@cclv
+ \else
+ \setbox\@outputbox \vbox{%
+ \boxmaxdepth\@maxdepth
+ \unvbox\@cclv
+ \vskip \skip\footins
+ \color@begingroup
+ \normalcolor\footnoterule
+ \unvbox\footins
+ \color@endgroup
+ }%
+ \fi
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global\let\@midlist\@empty
+ \@combinefloats
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \setbox\@outputbox \vbox to\@colht{%
+ \@texttop \dimen@\dp\@outputbox
+ \unvbox\@outputbox
+ \vskip -\dimen@\@textbottom
+ }%
+ \fi
+ \global\maxdepth\@maxdepth
+ }%
+ }%
+}
+ \ifFN@para
+ \FN@temptoken{%
+ \toks@\expandafter{\the\toks@
+ \vskip\skip\footins
+ \color@begingroup
+ \normalcolor\footnoterule
+ \global\setbox\FN@tempboxc\vbox{\makefootnoteparagraph}%
+ \unvbox\FN@tempboxc
+ \color@endgroup
+ }%
+ }%
+ \else
+ \FN@temptoken{%
+ \toks@\expandafter{\the\toks@
+ \vskip\skip\footins
+ \color@begingroup
+ \normalcolor\footnoterule
+ \unvbox\footins
+ \color@endgroup
+ }%
+ }%
+ \fi
+ \ifFN@bottom
+ \toks@{\setbox\@outputbox \box\@cclv
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global\let\@midlist\@empty
+ \@combinefloats
+ \ifvoid\footins
+ \else
+ \setbox\@outputbox \vbox\bgroup
+ \boxmaxdepth\@maxdepth
+ \unvbox\@outputbox
+ \vfill\relax
+ }
+ \the\FN@temptoken
+ \toks@\expandafter{\the\toks@\egroup\fi}
+ \else
+ \toks@{\ifvoid\footins
+ \setbox\@outputbox\box\@cclv
+ \else
+ \setbox\@outputbox \vbox\bgroup
+ \boxmaxdepth\@maxdepth
+ \unvbox\@cclv
+ }
+ \the\FN@temptoken
+ \toks@\expandafter{\the\toks@
+ \egroup
+ \fi
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global\let\@midlist\@empty
+ \@combinefloats
+ }%
+ \fi
+ \toks@\expandafter{\the\toks@
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \setbox\@outputbox \vbox to\@colht{%
+ \@texttop \dimen@\dp\@outputbox
+ \unvbox\@outputbox
+ \vskip -\dimen@\@textbottom
+ }%
+ \fi
+ \global\maxdepth\@maxdepth
+ }
+ \edef\@makecol{\the\toks@}
+\fi
+\newif\ifFN@setspace
+\@ifpackageloaded{setspace}{%
+ \FN@setspacetrue
+ \@ifclassloaded{memoir}{%
+ \let\FN@baselinestretch\m@m@singlespace
+ }{%
+ \let\FN@baselinestretch\setspace@singlespace
+ }%
+}{%
+ \FN@setspacefalse
+}
+\ifFN@para
+ \renewcommand\@footnotetext[1]{%
+ \insert\footins{%
+ \ifFN@setspace
+ \let\baselinestretch\FN@baselinestretch
+ \fi
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox
+ \floatingpenalty\@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \setbox\FN@tempboxa=\hbox{%
+ \@makefntext{\ignorespaces#1\strut
+ \penalty-10\relax
+ \hskip\footglue
+ }% end of \@makefntext parameter
+ }% end of \hbox
+ \dp\FN@tempboxa=0pt
+ \ifFN@etex
+ \ht\FN@tempboxa=\dimexpr\wd\FN@tempboxa *
+ \footnotebaselineskip / \columnwidth\relax
+ \else
+ \ht\FN@tempboxa=\fudgefactor\wd\FN@tempboxa
+ \fi
+ \box\FN@tempboxa
+ \color@endgroup
+ }%
+ \FN@mf@prepare
+ }
+\else
+ \ifFN@sidefn
+ \renewcommand\@footnotetext[1]{%
+ \marginpar{%
+ \ifFN@setspace
+ \let\baselinestretch\FN@baselinestretch
+ \fi
+ \reset@font\footnotesize
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \ignorespaces#1%
+ }%
+ \color@endgroup
+ }%
+ \FN@mf@prepare
+ }%
+ \else
+ \renewcommand\@footnotetext[1]{%
+ \insert\footins{%
+ \ifFN@setspace
+ \let\baselinestretch\FN@baselinestretch
+ \fi
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox
+ \floatingpenalty\@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep
+ \ignorespaces#1\@finalstrut\strutbox
+ }%
+ \color@endgroup
+ }%
+ \FN@mf@prepare
+ }%
+ \fi
+\fi
+\ifFN@para
+ \let\FN@tempboxa\@tempboxa
+ \newbox\FN@tempboxb
+ \newbox\FN@tempboxc
+ \newskip\footglue \footglue=1em plus.3em minus.3em
+ \long\def\@makefntext#1{\leavevmode
+ \@makefnmark\nobreak
+ \hskip.5em\relax#1%
+ }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \newdimen\footnotebaselineskip
+ {%
+ \footnotesize
+ \global
+ \footnotebaselineskip=\normalbaselineskip
+ }
+ \ifFN@etex
+ \else
+ \@tempdima=\footnotebaselineskip \multiply\@tempdima by 1024
+ \divide \@tempdima by \columnwidth \multiply\@tempdima by 64
+ \xdef\fudgefactor{\strip@pt\@tempdima }%
+ \fi
+ \long\def\makefootnoteparagraph{\unvbox\footins \makehboxofhboxes
+ \setbox\FN@tempboxa=\hbox{\unhbox\FN@tempboxa \removehboxes}
+ \hsize\columnwidth
+ \@parboxrestore
+ \baselineskip=\footnotebaselineskip
+ \noindent
+ \rule{\z@}{\footnotesep}%
+ \unhbox\FN@tempboxa\par
+ }
+ \def\makehboxofhboxes{\setbox\FN@tempboxa=\hbox{}%
+ \loop
+ \setbox\FN@tempboxb=\lastbox
+ \ifhbox\FN@tempboxb
+ \setbox\FN@tempboxa=\hbox{\box\FN@tempboxb\unhbox\FN@tempboxa}%
+ \repeat
+ }
+ \def\removehboxes{\setbox\FN@tempboxa=\lastbox
+ \ifhbox
+ \FN@tempboxa{\removehboxes}%
+ \unhbox\FN@tempboxa
+ \fi
+ }
+\fi
+\newif\ifFN@pp@footnotehint
+\newcounter{pp@next@reset}%
+\newif\ifFN@pp@towrite
+\FN@pp@towritefalse
+\ifFN@perpage
+ \CheckCommand*\footnote{\@ifnextchar [%]
+ \@xfootnote
+ {%
+ \stepcounter\@mpfn \protected@xdef\@thefnmark{\thempfn}%
+ \@footnotemark \@footnotetext
+ }%
+ }
+ \renewcommand*\footnote{\@ifnextchar [%]
+ \@xfootnote
+ {%
+ \stepcounter\@mpfn \protected@xdef\@thefnmark{\thempfn}%
+ \FN@pp@footnote\@footnotemark
+ \ifFN@pp@towrite
+ \FN@pp@writetemp
+ \FN@pp@towritefalse
+ \fi
+ \@footnotetext
+ }%
+ }
+ \CheckCommand*\footnotemark{%
+ \@ifnextchar [%]
+ \@xfootnotemark
+ {%
+ \stepcounter{footnote}%
+ \protected@xdef\@thefnmark{\thefootnote}%
+ \@footnotemark
+ }%
+ }
+ \renewcommand*\footnotemark{%
+ \@ifnextchar [%]
+ \@xfootnotemark
+ {%
+ \stepcounter{footnote}%
+ \protected@xdef\@thefnmark{\thefootnote}%
+ \FN@pp@footnote\@footnotemark
+ \ifFN@pp@towrite
+ \FN@pp@writetemp
+ \FN@pp@towritefalse
+ \fi
+ }%
+ }
+ \gdef\FN@pp@initial@stab{\@addtoreset{footnote}{page}}
+ \AtBeginDocument{\FN@pp@initial@stab}
+ \newcounter{@fnserial}
+ \def\FN@pp@cpage{0}
+ \FN@pp@footnotehinttrue
+ \newcommand{\footnotehint}{%
+ \setcounter{footnote}{0}%
+ \protected@writeaux\relax{\protect\FN@pp@footnotehinttrue}%
+ \@tempcnta\c@@fnserial
+ \advance\@tempcnta\@ne
+ \global\c@pp@next@reset\@tempcnta
+ }
+ \AtBeginDocument{\protected@writeaux\relax{%
+ \protect\providecommand{\protect\FN@pp@footnotehinttrue}{}%
+ }%
+ }
+\def\FN@pp@lastfoot{-1}
+ \newcommand{\FN@pp@footnote@aux}[2]{%
+ \ifnum\FN@pp@lastfoot<#1
+ \ifFN@pp@footnotehint
+ \FN@pp@resetfn{#1}{#2}%
+ \FN@pp@footnotehintfalse
+ \else
+ \gdef\@tempa{#2}%
+ \ifx\@tempa\FN@pp@cpage
+ \else
+ \FN@pp@resetfn{#1}{#2}%
+ \fi
+ \fi
+ \def\FN@pp@lastfoot{#1}%
+ \fi
+ \global\let\FN@pp@initial@stab\relax
+ }
+ \newcommand{\FN@pp@resetfn}[2]{%
+ \gdef\FN@pp@cpage{#2}%
+ \expandafter\gdef
+ \csname FN@pp@next-\FN@pp@prev@foot\endcsname{#1}%
+ \def\FN@pp@prev@foot{#1}%
+ \expandafter\xdef
+ \csname FN@pp@next-\FN@pp@prev@foot\endcsname{\the\@MM}%
+ }
+ \newcommand{\FN@pp@prev@foot}{root}
+ \AtBeginDocument{\protected@writeaux\relax{%
+ \protect\providecommand{\protect\FN@pp@footnote@aux}[2]{}}%
+ \c@pp@next@reset\@ne
+ }
+ \AtEndDocument{\let\FN@pp@footnote@aux\FN@pp@footnote@endaux
+ \def\FN@pp@lastfoot{-1}%
+ \FN@pp@footnotehintfalse
+ \renewcommand{\FN@pp@prev@foot}{root}
+ }
+ \newcommand{\FN@pp@footnote@endaux}[2]{%
+ \ifnum\FN@pp@lastfoot<#1
+ \ifFN@pp@footnotehint
+ \FN@pp@resetfn@end{#1}{#2}%
+ \FN@pp@footnotehintfalse
+ \else
+ \gdef\@tempa{#2}%
+ \ifx\@tempa\FN@pp@cpage
+ \else
+ \FN@pp@resetfn@end{#1}{#2}%
+ \fi
+ \fi
+ \def\FN@pp@lastfoot{#1}%
+ \fi
+ }
+ \newcommand{\FN@pp@resetfn@end}[2]{%
+ \def\@tempa{#1}%
+ \expandafter\ifx\csname FN@pp@next-\FN@pp@prev@foot\endcsname\@tempa%
+ \else
+ \@tempswatrue
+ \fi
+ \gdef\FN@pp@prev@foot{#1}%
+ \gdef\FN@pp@cpage{#2}%
+ }
+\let\FN@pp@@clearpage\clearpage
+\renewcommand{\clearpage}{\footnotehint\FN@pp@@clearpage}
+\def\FN@pp@footnote{%
+ \if@minipage\else
+ \global\advance\c@@fnserial\@ne
+ \if@filesw
+ \xdef\FN@pp@writetemp{%
+ \noexpand\protected@writeaux\relax{%
+ \string\FN@pp@footnote@aux
+ {\the\c@@fnserial}{\noexpand\thepage}%
+ }%
+ }%
+ \FN@pp@towritetrue
+ \fi
+ \ifnum\c@pp@next@reset>\c@@fnserial
+ \else
+ \global\expandafter\csname c@\@mpfn\endcsname\@ne
+ \protected@xdef\@thefnmark{\thempfn}%
+ \expandafter\let\expandafter\@tempa
+ \csname FN@pp@next-\number\c@pp@next@reset\endcsname
+ \ifx\@tempa\relax
+ \global\c@pp@next@reset\@MM
+ \else
+ \global\c@pp@next@reset\@tempa
+ \fi
+ \fi
+ \fi
+}
+\fi
+\ifFN@para
+\else
+ \long\def\@makefntext#1{%
+ \ifFN@hangfoot
+ \bgroup
+ \setbox\@tempboxa\hbox{%
+ \ifdim\footnotemargin>0pt
+ \hb@xt@\footnotemargin{\@makefnmark\hss}%
+ \else
+ \@makefnmark
+ \fi
+ }%
+ \leftmargin\wd\@tempboxa
+ \rightmargin\z@
+ \linewidth \columnwidth
+ \advance \linewidth -\leftmargin
+ \parshape \@ne \leftmargin \linewidth
+ \footnotesize
+ \@setpar{{\@@par}}%
+ \leavevmode
+ \llap{\box\@tempboxa}%
+ \parskip\hangfootparskip\relax
+ \parindent\hangfootparindent\relax
+ \else
+ \parindent1em
+ \noindent
+ \ifdim\footnotemargin>\z@
+ \hb@xt@ \footnotemargin{\hss\@makefnmark}%
+ \else
+ \ifdim\footnotemargin=\z@
+ \llap{\@makefnmark}%
+ \else
+ \llap{\hb@xt@ -\footnotemargin{\@makefnmark\hss}}%
+ \fi
+ \fi
+ \fi
+ \footnotelayout#1%
+ \ifFN@hangfoot
+ \par\egroup
+ \fi
+ }
+\fi
+\ifFN@multiplefootnote
+ \providecommand*{\multiplefootnotemarker}{3sp}
+ \providecommand*{\multfootsep}{,}
+ \CheckCommand*\@footnotemark{%
+ \leavevmode
+ \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
+ \@makefnmark
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax
+ }
+ \renewcommand*\@footnotemark{%
+ \leavevmode
+ \ifhmode
+ \edef\@x@sf{\the\spacefactor}%
+ \FN@mf@check
+ \nobreak
+ \fi
+ \@makefnmark
+ \ifFN@pp@towrite
+ \FN@pp@writetemp
+ \FN@pp@towritefalse
+ \fi
+ \FN@mf@prepare
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax
+ }
+ \def\FN@mf@prepare{%
+ \kern-\multiplefootnotemarker
+ \kern\multiplefootnotemarker\relax
+ }
+ \def\FN@mf@check{%
+ \ifdim\lastkern=\multiplefootnotemarker\relax
+ \edef\@x@sf{\the\spacefactor}%
+ \unkern
+ \textsuperscript{\multfootsep}%
+ \spacefactor\@x@sf\relax
+ \fi
+ }
+\else
+ \let\FN@mf@prepare\relax
+\fi
+\ifFN@stablefootnote
+\let\FN@sf@@footnote\footnote
+\def\footnote{\ifx\protect\@typeset@protect
+ \expandafter\FN@sf@@footnote
+ \else
+ \expandafter\FN@sf@gobble@opt
+ \fi
+}
+\edef\FN@sf@gobble@opt{\noexpand\protect
+ \expandafter\noexpand\csname FN@sf@gobble@opt \endcsname}
+\expandafter\def\csname FN@sf@gobble@opt \endcsname{%
+ \@ifnextchar[%]
+ \FN@sf@gobble@twobracket
+ \@gobble
+}
+\def\FN@sf@gobble@twobracket[#1]#2{}
+\let\FN@sf@@footnotemark\footnotemark
+\def\footnotemark{\ifx\protect\@typeset@protect
+ \expandafter\FN@sf@@footnotemark
+ \else
+ \expandafter\FN@sf@gobble@optonly
+ \fi
+}
+\edef\FN@sf@gobble@optonly{\noexpand\protect
+ \expandafter\noexpand\csname FN@sf@gobble@optonly \endcsname}
+\expandafter\def\csname FN@sf@gobble@optonly \endcsname{%
+ \@ifnextchar[%]
+ \FN@sf@gobble@bracket
+ {}%
+}
+\def\FN@sf@gobble@bracket[#1]{}
+\fi
+\newcommand\setfnsymbol[1]{%
+ \@bsphack
+ \@ifundefined{FN@fnsymbol@#1}%
+ {%
+ \PackageError{footmisc}{Symbol style "#1" not known}%
+ \@eha
+ }{%
+ \expandafter\let\expandafter\@fnsymbol\csname
+ FN@fnsymbol@#1\endcsname
+ }%
+ \@esphack
+}
+\let\FN@fnsymbol@lamport\@fnsymbol
+\newif\if@tempswb
+\newcommand{\DefineFNsymbols}{%
+ \@ifstar{\@tempswbtrue\@DefineFNsymbols}%
+ {\@tempswbfalse\@DefineFNsymbols}%
+}
+\newcommand{\@DefineFNsymbols}[1]{%
+ \@ifnextchar[% ]
+ {\@DefineFNsymbols@{#1}}{\@DefineFNsymbols@{#1}[text]}%
+}
+\def\@DefineFNsymbols@#1[#2]#3{%
+ \expandafter\ifx\csname FN@fnsymbol@#1\endcsname\relax
+ \PackageInfo{footmisc}{Declaring symbol style #1}%
+ \else
+ \PackageWarning{footmisc}{Redeclaring symbol style #1}%
+ \fi
+ \toks@{}%
+ \def\@tempb{\end}%
+ \FN@build@symboldef#3\end
+ \def\@tempc{math}%
+ \def\@tempd{#2}%
+ \expandafter\xdef\csname FN@fnsymbol@#1\endcsname##1{%
+ \ifx\@tempc\@tempd
+ \noexpand\ensuremath
+ \else
+ \noexpand\nfss@text
+ \fi
+ {%
+ \noexpand\ifcase##1%
+ \the\toks@
+ \noexpand\else
+ \if@tempswb
+ \noexpand\@ctrerr
+ \else
+ \noexpand\@arabic##1\noexpand\FN@orange##1%
+ \fi
+ \noexpand\fi
+ }%
+ }%
+}
+\def\FN@build@symboldef#1{%
+ \def\@tempa{#1}%
+ \ifx\@tempa\@tempb
+ \else
+ \toks@\expandafter{\the\toks@\or#1}%
+ \expandafter\FN@build@symboldef
+ \fi
+}
+\newcommand{\DefineFNsymbolsTM}{%
+ \@ifstar{\@tempswbtrue\@DefineFNsymbolsTM}%
+ {\@tempswbfalse\@DefineFNsymbolsTM}}%
+\newcommand{\@DefineFNsymbolsTM}[2]{%
+ \expandafter\ifx\csname FN@fnsymbol@#1\endcsname\relax
+ \PackageInfo{footmisc}{Declaring symbol style #1}%
+ \else
+ \PackageWarning{footmisc}{Redeclaring symbol style #1}%
+ \fi
+ \toks@{}%
+ \def\@tempb{\end}%
+ \FN@build@symboldefTM#2\end\@null
+ \expandafter\xdef\csname FN@fnsymbol@#1\endcsname##1{%
+ \noexpand\ifcase##1%
+ \the\toks@
+ \noexpand\else
+ \if@tempswb
+ \noexpand\@ctrerr
+ \else
+ \noexpand\@arabic##1\noexpand\FN@orange##1%
+ \fi
+ \noexpand\fi
+ }%
+}%
+\def\FN@build@symboldefTM#1#2{%
+ \def\@tempa{#1}%
+ \ifx\@tempa\@tempb
+ \else
+ \toks@\expandafter{\the\toks@\or\TextOrMath{#1}{#2}}%
+ \expandafter\FN@build@symboldefTM
+ \fi
+}
+\@ifundefined{TextOrMath}{%
+ \@ifundefined{eTeXversion}{%
+ \PackageError{footmisc}{Can't define commands for footnote symbol}%
+ {Use e-LaTeX, or load package fixltx2e before
+ footmisc}%
+ }{%
+ \protected\expandafter\def\csname TextOrMath\space\endcsname{%
+ \ifmmode \expandafter\@secondoftwo
+ \else \expandafter\@firstoftwo \fi
+ }
+ \edef\TextOrMath#1#2{%
+ \expandafter\noexpand\csname TextOrMath\space\endcsname
+{#1}{#2}%
+ }%
+ }%
+}{}
+\def\FN@orange#1{%
+ \@bsphack
+ \PackageInfo{footmisc}{Footnote number \number#1 out of range}%
+ \protect\@fnsymbol@orange
+ \@esphack
+}
+\global\let\@diagnose@fnsymbol@orange\relax
+\AtEndDocument{\@diagnose@fnsymbol@orange}
+\def\@fnsymbol@orange{%
+ \gdef\@diagnose@fnsymbol@orange{%
+ \PackageWarningNoLine{footmisc}{Some footnote number(s)
+ were out of range
+ \MessageBreak
+ see log for details%
+ }%
+ }%
+}
+\@ifundefined{textbardbl}{%
+ \DeclareTextSymbol{\textbardbl}{OMS}{107}%
+ \DeclareTextSymbolDefault{\textbardbl}{TS1}}{}%
+\DefineFNsymbolsTM*{bringhurst}{%
+ \textasteriskcentered *
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textbardbl \|%
+ \textparagraph \mathparagraph
+}%
+\DefineFNsymbolsTM*{chicago}{%
+ \textasteriskcentered *
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textbardbl \|%
+ \#\#%
+}%
+\DefineFNsymbolsTM*{wiley}{
+ \textasteriskcentered *
+ {\textasteriskcentered\textasteriskcentered}{**}%
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textparagraph \mathparagraph
+ \textbardbl \|%
+}%
+\DefineFNsymbolsTM{lamport-robust}{
+ \textasteriskcentered *
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textparagraph \mathparagraph
+ \textbardbl \|%
+ {\textasteriskcentered\textasteriskcentered}{**}%
+ {\textdagger\textdagger}{\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger}%
+}
+\DefineFNsymbolsTM*{lamport*}{%
+ \textasteriskcentered *
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textparagraph \mathparagraph
+ \textbardbl \|%
+ {\textasteriskcentered\textasteriskcentered}{**}%
+ {\textdagger\textdagger}{\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger}%
+ {\textsection\textsection}{\mathsection\mathsection}%
+ {\textparagraph\textparagraph}{\mathparagraph\mathparagraph}%
+ {\textasteriskcentered\textasteriskcentered\textasteriskcentered}{***}%
+ {\textdagger\textdagger\textdagger}{\dagger\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger\ddagger}%
+ {\textsection\textsection\textsection}%%
+ {\mathsection\mathsection\mathsection}%
+ {\textparagraph\textparagraph\textparagraph}%%
+ {\mathparagraph\mathparagraph\mathparagraph}%
+}
+\setfnsymbol{lamport*}
+\DefineFNsymbolsTM{lamport*-robust}{%
+ \textasteriskcentered *
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textparagraph \mathparagraph
+ \textbardbl \|%
+ {\textasteriskcentered\textasteriskcentered}{**}%
+ {\textdagger\textdagger}{\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger}%
+ {\textsection\textsection}{\mathsection\mathsection}%
+ {\textparagraph\textparagraph}{\mathparagraph\mathparagraph}%
+ {\textasteriskcentered\textasteriskcentered\textasteriskcentered}{***}%
+ {\textdagger\textdagger\textdagger}{\dagger\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger\ddagger}%
+ {\textsection\textsection\textsection}%%
+ {\mathsection\mathsection\mathsection}%
+ {\textparagraph\textparagraph\textparagraph}%%
+ {\mathparagraph\mathparagraph\mathparagraph}%
+}
+\providecommand*{\footref}[1]{%
+ \begingroup
+ \unrestored@protected@xdef\@thefnmark{\ref{#1}}%
+ \endgroup
+ \@footnotemark
+}
+\newcommand\mpfootnotemark{%
+ \@ifnextchar[%
+ \@xmpfootnotemark
+ {%
+ \stepcounter\@mpfn
+ \protected@xdef\@thefnmark{\thempfn}%
+ \@footnotemark
+ }%
+}
+\def\@xmpfootnotemark[#1]{%
+ \begingroup
+ \csname c@\@mpfn\endcsname #1\relax
+ \unrestored@protected@xdef\@thefnmark{\thempfn}%
+ \endgroup
+ \@footnotemark
+}
+\endinput
+%%
+%% End of file `footmisc.sty'.
diff --git a/macros/latex/contrib/footmisc/footmisc-code.pdf b/macros/latex/contrib/footmisc/footmisc-code.pdf
new file mode 100644
index 0000000000..51cecd5aa6
--- /dev/null
+++ b/macros/latex/contrib/footmisc/footmisc-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/footmisc/footmisc-code.tex b/macros/latex/contrib/footmisc/footmisc-code.tex
new file mode 100644
index 0000000000..9b0b43f7c8
--- /dev/null
+++ b/macros/latex/contrib/footmisc/footmisc-code.tex
@@ -0,0 +1,4 @@
+% this will typeset documentation + code
+
+\AtBeginDocument{\AlsoImplementation}
+\input{footmisc.dtx}
diff --git a/macros/latex/contrib/footmisc/footmisc-doc.pdf b/macros/latex/contrib/footmisc/footmisc-doc.pdf
new file mode 100644
index 0000000000..81007b198d
--- /dev/null
+++ b/macros/latex/contrib/footmisc/footmisc-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/footmisc/footmisc-doc.tex b/macros/latex/contrib/footmisc/footmisc-doc.tex
new file mode 100644
index 0000000000..24c9a9aaac
--- /dev/null
+++ b/macros/latex/contrib/footmisc/footmisc-doc.tex
@@ -0,0 +1,6 @@
+% this will typeset only documentation but not the code
+
+\AtBeginDocument{\OnlyDescription
+% \let\tableofcontents\relax
+ }
+\input{footmisc.dtx}
diff --git a/macros/latex/contrib/footmisc/footmisc.dtx b/macros/latex/contrib/footmisc/footmisc.dtx
index 0b9e77114f..096889ce60 100644
--- a/macros/latex/contrib/footmisc/footmisc.dtx
+++ b/macros/latex/contrib/footmisc/footmisc.dtx
@@ -1,5 +1,25 @@
-%\iffalse meta-comment, etc.
-%% This is footmisc.dtx, and it's -*-LaTeX-*- text
+% \iffalse meta-comment
+%
+%% File: footmisc.dtx (C) Copyright 1995-2011 Robin Fairbairns
+%% (C) Copyright 2018-2022 Frank Mittelbach
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% https://www.latex-project.org/lppl.txt
+%
+% This bundle has the status "maintained" and the current maintainer
+% is Frank Mittelbach.
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/FrankMittelbach/fmitex-footmisc/
+%
+% for those people who are interested or want to report an issue.
+%
+%
%
% We use the same body for the \cs{ProvidesFile} as for the
% \cs{ProvidesPackage} command.
@@ -11,16 +31,21 @@
%<*dtx>
\ProvidesFile{footmisc.dtx}%
%</dtx>
+%<+package>\providecommand\DeclareRelease[3]{}
+%<+package>\providecommand\DeclareCurrentRelease[2]{}
+%<+package>
+%<+package>\DeclareRelease{v5}{2011-06-06}{footmisc-2011-06-06.sty}
+%<+package>\DeclareCurrentRelease{}{2022-02-10}
%<package>\ProvidesPackage{footmisc}%
%<*!debugins>
- [2011/06/06 v5.5b
+ [2022/02/10 v6.0a
%</!debugins>
%<package> a miscellany of footnote facilities%
%<*dtx>
footmisc package source file%
%</dtx>
%<*!debugins>
- ]% $Id: footmisc.dtx,v 4.25 2011/06/06 14:25:44 rf10 Exp rf10 $
+ ]
%</!debugins>
% \end{macrocode}
%
@@ -30,9 +55,10 @@
%<*driver>
\setcounter{errorcontextlines}{999}
\documentclass{ltxdoc}
+\usepackage{hyperref}
% \end{macrocode}
%
-% we limit the things that we will index
+% We limit the things that we will index
% \begin{macrocode}
\DoNotIndex{\#,\@MM,\@cclv,\@gobble,\@ifnextchar,\@ifundefined}
\DoNotIndex{\|,\advance,\begingroup,\bgroup,\box,\csname}
@@ -51,7 +77,7 @@
\DoNotIndex{\wd,\xdef,\@}
\GetFileInfo{footmisc.dtx}
\EnableCrossrefs
-% to get documented source of the package, comment out the next line,
+% To get documented source of the package, comment out the next line,
% and uncomment the following one; otherwise, create yourself
% (somewhere on your LaTeX input path) a file ltxdoc.cfg that contains
% simply \AtBeginDocument{\AlsoImplementation}
@@ -63,37 +89,48 @@
\end{document}
%</driver>
% \end{macrocode}
+%
% \fi
%
-% \CheckSum{1711}
+%
%
% \title{\texttt{footmisc} ---\\
% a portmanteau package\\
-% for customising footnotes in \LaTeX\thanks{This file has
+% for customizing footnotes in \LaTeX\thanks{This file has
% version number \fileversion, last revised \filedate}}
-% \author{Robin Fairbairns\thanks{University of Cambridge Computer
-% Laboratory, William Gates Building, J.\,J. Thompson Avenue,
-% Cambridge, CB2 0FD, UK
-% (\texttt{rf10<snail-shape>cam.ac.uk})}}
+% \author{Robin Fairbairns\thanks{Formerly: University of Cambridge Computer
+% Laboratory, Cambridge, UK} \and
+% Frank Mittelbach\thanks{Responsible maintainer since 2018}}
% \maketitle
%
+%
+% \newcommand\fmi[1]{\begin{quote} TODO: \itshape #1\end{quote}}
+% \newcommand\NEW[1]{\marginpar{\mbox{}\hfill\fbox{New: #1}}}
+% \providecommand\pkg[1]{\texttt{#1}}
+%
+%
% \section*{Copyright statement}
%
% \noindent Program: \texttt{footmisc.dtx}\par
-% \noindent Copyright 1995 1996 1998 1999 2001--2003 2008 2009 Robin Fairbairns
+% \noindent Copyright 1995--2011 Robin Fairbairns\par
+% \noindent Copyright 2018--2022 Robin Fairbairns, Frank Mittelbach
%
% This program is offered under the terms
-% of the LaTeX Project Public License, version 1.3c of this license or
+% of the \LaTeX{} Project Public License, 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
-% 2005/12/01 or later.
+% license is in \texttt{https://www.latex-project.org/lppl.txt}, and version
+% 1.3c or later is part of all distributions of \LaTeX{} version
+% 2008 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+%
+% \tableofcontents
%
-% This work has the LPPL maintenance status `author-maintained'.
%
% \section*{History}
%
-% This package originated as support of a personal project, which I
+% This package originated as support of a personal project, which I (Robin)
% was switching to \LaTeX{} 2e over the Christmas holiday period of
% 1993, using the first \ensuremath{\beta} release.
%
@@ -102,10 +139,23 @@
% used by a package written by Mark Wooding. So the package is now
% known (as you can see) as ``footmisc''.
%
+% Frank took over maintenance in 2018 but due to other commitments never
+% got around finishing the changes he started to make in 2018.
+%
+% In 2022 a few new options (\texttt{abovefloats},
+% \texttt{belowfloats}, \texttt{bottomfloats}, and \texttt{bottomfootnotes})
+% got introduced and the package now works
+% with \textsf{hyperref} regardless of loading order. There arem
+% however, still a few restrictions when using both packages together,
+% in particular the \texttt{multiple} option does not fully work.
+%
+%
+%
+%
% \section{User interface~--- package options}
%
% The \textsf{footmisc} package provides several different
-% customisations of the way foonotes are represented in \LaTeXe{}
+% customizations of the way footnotes are represented in \LaTeXe{}
% documents (the sources of the code in this package are various, but
% all of it has been massaged by the author; where the code comes from
% elsewhere, there are attributions given below, somewhere or other).
@@ -130,7 +180,7 @@
% so an additional pass for this purpose shouldn't cause any
% additional problem. The option includes code to report that
% `\emph{Label(s) may have changed}', which will help the poor user to
-% realise that (yet) another run is in order.
+% realize that (yet) another run is in order.
%
% \subsection{Option \texttt{para}}
%
@@ -220,13 +270,16 @@
% confound automatic generation procedures. In the same situation,
% the \texttt{symbol*} option produces information messages and a
% warning message at end document, and the user may scan the log for
-% those messages \emph{after} processing has stabilised. The option
+% those messages \emph{after} processing has stabilized. The option
% produces numbers (17 and higher, in the case of the default symbol
% set) in place of symbols, when the footnote number is too large.
%
% \subsection{The \cs{setfnsymbol} and \cs{DefineFNsymbols} commands}
% \label{footnote-symbols}
%
+% \fmi{At some point in the past this interface got extended, but the
+% documentation lags behind so this needs updating.}
+%
% These commands permit the definition and use of alternative
% (ordered) sets of symbols for numbering footnotes. \LaTeX{} of
% course comes with such a set ready-defined, but the choice of
@@ -266,17 +319,86 @@
% This last set, known as \texttt{lamport*} is selected as the default
% symbol set by the package.
%
-% \subsection{Option \texttt{bottom}}
%
-% This option forces footnotes to the bottom of the page; this is only
-% noticeably useful in case that \cs{raggedbottom} is in effect, when
+% \subsection{Options altering the footnotes/floats relationship}
+%
+% In \LaTeX{} the default order on a page is ``page text'' followed by
+% ``footnotes'' (if any) followed by ``bottom floats'' (if any). The
+% spacing between the three components depends of whether pages are
+% always stretched to the same height (\cs{flushbottom} as used by the
+% book class) or if they
+% can run short (\cs{raggedbottom} as used by the article or report
+% class).
+% If \cs{raggedbottom} is in force, then
% \LaTeX{} would normally set the footnotes a mere
-% \cs{skip}\cs{footins} distant from the bottom of the text.
+% \cs{skip}\cs{footins} distant from the bottom of the text and bottom
+% floats follow separated by \cs{textfloatsep}. Both spaces might get
+% stretched if \cs{flushbottom} is in force.
+%
+% If\NEW{2022-02}
+% you want to diverge from this default placement, then there are
+% a number of alterations that can be made:
+% \begin{itemize}
+% \item the order of footnotes and floats can be swapped; and
+% \item both footnotes and floats can be forced to the bottom (i.e.,
+% \cs{raggedbottom} then only applies to pages with neither), or
+% \item only one of them is forced to the bottom, the other stays
+% close to the text.
+% \end{itemize}
+% These can be achieved by applying one or more of the options
+% discussed below.
+%^^A \texttt{abovefloats}, \texttt{belowfloats}, \texttt{bottom},
+%^^A \texttt{bottomfloats}, or \texttt{bottomfootnotes}.
+%
+%
+%
+% \subsubsection{Options \texttt{abovefloats} and \texttt{belowfloats}}
+%
+% These\NEW{2022-02}
+% two options describe the footnote placement with respect to
+% floats on the page. \LaTeX's default is \texttt{abovefloats}, but it
+% can still be useful to specify it because it fixes the bug discussed
+% in section~\ref{sec:spacebug}.
+%
+%
+% \subsubsection{Option \texttt{bottom}}
+%
+% This option forces footnotes \emph{and} floats to the bottom and
+% also implies \texttt{belowfloats}. If you want both at the bottom
+% but footnotes first, then add \texttt{abovefloats} in addition.
+%
+% \subsubsection{Options \texttt{bottomfloats} and
+% \texttt{bottomfootnotes}}
+%
+% If\NEW{2022-02}
+% you want force only floats or only footnotes to the bottom then
+% use one of these options. As they naturally define the order, i.e.,
+% in case of \texttt{bottomfloats} footnotes are obviously earlier, the
+% options \texttt{abovefloats} and \texttt{belowfloats} are
+% meaningless and are ignored if given.
+%
+%
+% \subsubsection{Fixing a strange behavior of \LaTeX}
+% \label{sec:spacebug}
+%
+% In\NEW{2022-02}
+% the default case (if \pkg{footmisc} is not loaded) \LaTeX{} shows
+% a somewhat strange discrepancy: on most pages the
+% footnotes are attached a distance of \cs{skip}\cs{footins} from the
+% main text, even if that page is run short (i.e., with
+% \cs{raggedbottom} in force). However, whenever the is some
+% infinite stretch at the end of the page, e.g., from using \cs{newpage} or
+% \cs{clearpage} the footnotes are pushed to the bottom (in particular
+% on the last page of a document or chapter).
+%
+% This is automatically corrected if \pkg{footmisc} is loaded with any
+% of the options that deal with footnote placement, i.e.,
+% \texttt{abovefloats}, \texttt{belowfloats}, \texttt{bottom},
+% \texttt{bottomfloats}, or \texttt{bottomfootnotes}. In particular,
+% if you want to have the standard \LaTeX{} placement (but with this
+% strange behavior fixed, apply \texttt{abovefloats} (which is the
+% normal order but with the bug fixed).
%
-% There's a further infelicity in \LaTeX{}'s placing of footnotes of
-% the bottom of pages: if a bottom float appears on a page, \LaTeX{}
-% places the footnote \emph{above} it. The \texttt{bottom} option
-% places the footnote at the foot of the page.
%
% \subsection{Option \texttt{marginal}}
%
@@ -405,7 +527,7 @@
% letters. However, the numbers used by \cs{footnotemark} make
% reference to the `main'
% footnote counter, and are set in whatever is the current style for
-% that: this behaviour often surprises, and there's no obvious way in
+% that: this behavior often surprises, and there's no obvious way in
% standard \LaTeX{} to ``get around'' it. The command
% \cs{mpfootnotemark} gets around this problem in a minipage, by
% generating footnote marks in the same way as those used by
@@ -418,7 +540,8 @@
% subsequent \cs{footnotemark} or \cs{mpfootnotemark}. This is a
% tedious way of going about things, and doesn't allow representation
% of all possible forms of footnote mark; \cs{footref} is a form of
-% reference command that sets the reference as if it were a footnote.
+% reference command that sets the reference as if it were
+% a footnote.\footnote{This command is already provided by the \LaTeX{} format.}
% The label should be set \emph{within} the argument of the footnote
% command that is being labelled:
% \begin{verbatim}
@@ -431,7 +554,7 @@
%
% The \textsf{footmisc} package modifies several parts of the \LaTeX{}
% kernel; what gets modified depends on the options you select. This
-% behaviour can cause problems with other packages, particularly those
+% behavior can cause problems with other packages, particularly those
% that also modify the kernel.
%
% Known interactions are:
@@ -444,6 +567,8 @@
% \item[\normalfont\textsf{memoir} class] The class emulates
% \textsf{setspace}, and we detect that emulation and deal with it
% in the same way as \textsf{setspace}.
+%
+% \iffalse FMi: this should now work!
% \item[\normalfont\textsf{hyperref}] The \textsf{hyperref} package
% has ambitions to make hyperlinks from footnote marks to the
% corresponding footnote body; naturally this causes grief to
@@ -453,6 +578,8 @@
% \quad\verb|\usepackage[hyperfootnotes=false,...]{hyperref}|\\
% Further work on the interaction between the two packages is
% proposed, but not yet scheduled.
+% \fi
+%
% \item[\normalfont\textsf{manyfoot}] The \textsf{manyfoot} package
% permits several independent sequences of footnotes. Some
% preliminary work towards interworking with \textsf{footmisc} has
@@ -470,9 +597,9 @@
%<*package>
% \end{macrocode}
%
-% Now declare what environment we need:
+% Now declare what environment we need: version 6 needs a fairly recent \LaTeX.
% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\NeedsTeXFormat{LaTeX2e}[2020/10/01]
% \end{macrocode}
%
% We need a token register in case we have to patch \cs{@makecol}:
@@ -487,13 +614,14 @@
% \begin{macrocode}
\providecommand\protected@writeaux{%
\protected@write\@auxout
-}% \end{macrocode}
+}
+% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\l@advance@macro}
-% \begin{macro}{@@dvance@macro}
+% \begin{macro}{\@@dvance@macro}
% \begin{macro}{\@advance@macro}
-% We make the following (\cs{@@dvance@macro}) generalisable as follows
+% We make the following (\cs{@@dvance@macro}) generalizable as follows
% (the global form isn't used in this package \dots\ yet):
%
% \begin{macrocode}
@@ -513,20 +641,9 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\ifFN@etex}
-% Check whether we're using etex
-% \begin{macrocode}
-\newif\ifFN@etex
-\ifx\dimexpr\undefined
- \FN@etexfalse
-\else
- \FN@etextrue
-\fi
-% \end{macrocode}
-% \end{macro}
% \begin{macro}{\footnotemargin}
% Finally, we define the length used by the \texttt{marginal} option,
-% and initialise it as if we've not had the option.
+% and initialize it as if we've not had the option.
% \begin{macrocode}
\newdimen\footnotemargin
\footnotemargin1.8em\relax
@@ -545,7 +662,7 @@
% This is a declaration that appears in the original \LaTeX{} book.
% Since it appeared in the old |pagefoots.sty| (presumably since it
% goes so naturally with the |perpage| option), I've added this
-% trivial piece of customisation to the package.
+% trivial piece of customization to the package.
%
% \begin{macrocode}
\DeclareOption{symbol}{\renewcommand\thefootnote{\fnsymbol{footnote}}}
@@ -558,8 +675,10 @@
% number. We use a robust version of the ``extended ordinary'' symbol set,
% described later (in section~\ref{footnote-symbols}).
% \begin{macrocode}
+\newif\ifFN@robust \FN@robustfalse
\DeclareOption{symbol*}{%
\renewcommand\thefootnote{\@fnsymbol\c@footnote}%
+ \FN@robusttrue
\AtEndOfPackage{\setfnsymbol{lamport*-robust}}%
}
% \end{macrocode}
@@ -600,7 +719,7 @@
% \subsection{The \texttt{side} option}
%
% \begin{macro}{\ifFN@sidefn}
-% Simply changes the behaviour of \cs{@footnotetext}; incompatible
+% Simply changes the behavior of \cs{@footnotetext}; incompatible
% with paragraph footnotes.
% \begin{macrocode}
\newif\ifFN@sidefn \FN@sidefnfalse
@@ -662,18 +781,99 @@
% \end{macrocode}
% \end{macro}
%
-% \subsection{The \texttt{bottom} option}
%
-% \begin{macro}{\ifFN@bottom}
-% All this needs to do is to set a flag to say that it should happen
+% \subsection{Fixing the \LaTeX{} misbehavior with respect to spacing}
+%
+%
+% \begin{macro}{\ifFN@fixskip}
+% We maintain a boolean to decide if we want to fix that, by
+% default we don't but if any placement option is given we apply the fix.
+% \begin{macrocode}
+\newif\ifFN@fixskip \FN@fixskipfalse
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The footnote/float placement options}
+%
+% We have up to three blocks on a page (four if you count
+% top-floats). If there is any excess space that needs to be added the
+% question is where that goes:
+% \begin{enumerate}
+% \item above footnotes and floats;
+% \item between footnotes and floats;
+% \item after footnotes and floats;
+% \item nowhere in particular (everything is equally spaced out).
+% \end{enumerate}
+% Technically, the last two cases can be combined in one:
+% \cs{raggedbottom} adds some ``fill'' space at the very bottom (which
+% covers case 3) and \cs{flushbottom} puts nothing in this place, so
+% covers case 4 if we do not add any \cs{vfill} elsewhere.
+%
+%
+% \begin{macro}{\FN@ORspacehandling}
+% We record in which case we want to be in
+% \cs{FN@ORspacehandling}. The default is case 3.
+% \begin{macrocode}
+\let\FN@ORspacehandling\thr@@
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsubsection{The \texttt{bottom} option}
+%
+% \begin{macro}{\ds@bottom}
+% The \texttt{bottom} option implements case 1 and puts the footnotes
+% by default below the floats.
% \begin{macrocode}
-\newif\ifFN@bottom \FN@bottomfalse
\DeclareOption{bottom}{%
- \FN@bottomtrue
+ \let\FN@ORspacehandling\@ne
+ \FN@abovefloatsfalse
+% \end{macrocode}
+% We also state that we want to fix \LaTeX{} space issue (as we do
+% in all other options.
+% \begin{macrocode}
+ \FN@fixskiptrue
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The \texttt{abovefloats}, \texttt{belowfloats} options}
+%
+% \begin{macro}{\ifFN@abovefloats}
+% All this needs to do is to set a flag to say that it should happen.
+% \begin{macrocode}
+\newif\ifFN@abovefloats \FN@abovefloatstrue
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{ds@abovefloats,ds@belowfloats}
+% These options change the order and that's it.
+% \begin{macrocode}
+\DeclareOption{abovefloats}{\FN@abovefloatstrue \FN@fixskiptrue}
+\DeclareOption{belowfloats}{\FN@abovefloatsfalse \FN@fixskiptrue}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The \texttt{bottomfloats}, \texttt{bottomfootnotes} options}
+%
+% \begin{macro}{ds@bottomfloats,ds@bottomfootnotes}
+% These options are for case 2. In addition they have to say what
+% comes first.
+% \begin{macrocode}
+\DeclareOption{bottomfloats}{%
+ \let\FN@ORspacehandling\tw@
+ \FN@abovefloatstrue \FN@fixskiptrue
+}
+\DeclareOption{bottomfootnotes}{%
+ \let\FN@ORspacehandling\tw@
+ \FN@abovefloatsfalse \FN@fixskiptrue
}
% \end{macrocode}
% \end{macro}
%
+%
% \subsection{The \texttt{marginal} option}
%
% Again, the processing of the option is pretty trivial:
@@ -824,268 +1024,469 @@
% hacked to achieve our effects, and we do all of this now, according
% to flags set in option processing.
%
-% \subsection{The output routine}
+% \subsection{The output routine part}
+%
+% We interface with \cs{@makecol} from the kernel. Eventually this
+% should move directly into the kernel.
%
-% Now; do we need to mess about with the output routine? If either
-% |para| or |bottom| has been invoked, we do.
+% In order for other packages to prepend or append code to
+% \cs{@makecol}, they can use the generic command hooks
+% \texttt{cmd/@makecol/before} and \texttt{cmd/@makecol/after}, so
+% there is nothing we need to do here.
+%
+%
+%
+% \begin{macro}{\@makecol}
+% \cs{@makecol} is shortened a lot, basically all the hardwired
+% code in the middle has moved into a configuration point.
+% \begin{macrocode}
+\def \@makecol {%
+ \@kernel@before@cclv
+ \setbox\@outputbox \box\@cclv
+% \end{macrocode}
+% The only real addition is the next command which either does
+% nothing or removes an infinite glue from the bottom of the
+% \cs{@outputbox}.
+% \begin{macrocode}
+ \@outputbox@removebskip
+% \end{macrocode}
+% Any ``here'' floats in the \cs{@outputbox} are now handled so we
+% recycle their registers and put them back to the \cs{@freelist}.
% \begin{macrocode}
-\let \if@tempswa \ifFN@bottom
-\ifFN@para \@tempswatrue \fi
-\if@tempswa
+ \let\@elt\relax
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global \let \@midlist \@empty
+% \end{macrocode}
+% Here we have the configurable part.
+% \fmi{Interface to configuration points will change in the future}
+% \begin{macrocode}
+ \@makecol@appendblocks
+% \end{macrocode}
+% The we deal with any \cs{enlargethispage} or run the normal code
+% to build a column.
+% \begin{macrocode}
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \@makenormalcolbox
+ \fi
+ \global \maxdepth \@maxdepth
+}
% \end{macrocode}
-% \dots{} so we've patching to do.
+% \end{macro}
%
-% First, we ensure that \cs{@makecol} is as expected from the time at
-% which these macros were written: since we're going to patch it, we
-% had better be sure that we're patching the right thing. (There was
-% a minuscule change to the definition 1999, but this doesn't as far
-% as I can tell make any difference to the semantics of the definition
-% we base our patch on.)
+%
+% \begin{macro}{\@outputbox@depth}
+% We need to know the depth of \cs{@outputbox} once in a
+% while. Rather than using a temp dimen (as it was done in the
+% past), we give it a proper register.
% \begin{macrocode}
- \@ifl@t@r\fmtversion{2005/12/01}{%
- \CheckCommand*\@makecol{\ifvoid \footins
- \setbox\@outputbox \box\@cclv
- \else
- \setbox\@outputbox \vbox{%
- \boxmaxdepth \@maxdepth
- \unvbox\@cclv
- \vskip \skip\footins
- \color@begingroup
- \normalcolor\footnoterule
- \unvbox\footins
- \color@endgroup
- }%
- \fi
- \let \@elt \relax
- \xdef\@freelist{\@freelist\@midlist}%
- \global\let\@midlist\@empty
- \@combinefloats
- \ifvbox\@kludgeins
- \@makespecialcolbox
- \else
- \setbox\@outputbox \vbox to\@colht{%
- \@texttop \dimen@\dp\@outputbox
- \unvbox\@outputbox
- \vskip -\dimen@\@textbottom
- }%
- \fi
- \global\maxdepth\@maxdepth
- }
- }{%
- \@ifl@t@r\fmtversion{2003/12/01}{%
- \CheckCommand*\@makecol{\ifvoid \footins
- \setbox\@outputbox \box\@cclv
- \else
- \setbox\@outputbox \vbox{%
- \boxmaxdepth\@maxdepth
- \@tempdima\dp\@cclv
- \unvbox\@cclv
- \vskip \skip\footins
- \color@begingroup
- \normalcolor
- \footnoterule
- \unvbox\footins
- \color@endgroup
- }%
- \fi
- \let \@elt \relax
- \xdef\@freelist{\@freelist\@midlist}%
- \global\let\@midlist\@empty
- \@combinefloats
- \ifvbox\@kludgeins
- \@makespecialcolbox
- \else
- \setbox\@outputbox \vbox to\@colht{%
- \@texttop
- \dimen@\dp\@outputbox
- \unvbox\@outputbox
- \vskip -\dimen@
- \@textbottom
- }%
- \fi
- \global\maxdepth\@maxdepth
- }%
- }{%
- \@ifl@t@r\fmtversion{1999/12/01}{%
- \CheckCommand*\@makecol{\ifvoid \footins
- \setbox\@outputbox \box\@cclv
- \else
- \setbox\@outputbox \vbox{%
- \boxmaxdepth\@maxdepth
- \@tempdima\dp\@cclv
- \unvbox\@cclv
- \vskip \skip\footins
- \color@begingroup
- \normalcolor\footnoterule
- \unvbox\footins
- \color@endgroup
- }%
- \fi
- \xdef\@freelist{\@freelist\@midlist}%
- \global\let\@midlist\@empty
- \@combinefloats
- \ifvbox\@kludgeins
- \@makespecialcolbox
+\newdimen\@outputbox@depth
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@makenormalcolbox}
+% Taken out of \cs{@makecol} for readability.
+% \begin{macrocode}
+\def \@makenormalcolbox {%
+ \setbox\@outputbox \vbox to\@colht {%
+ \@texttop
+ \@outputbox@depth \dp\@outputbox
+ \unvbox \@outputbox
+ \vskip -\@outputbox@depth
+ \@textbottom
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@makespecialcolbox}
+% Make the colbox when \cs{enlargethispage} was used.
+% \begin{macrocode}
+\def \@makespecialcolbox {%
+ \@outputbox@append {\vskip-\@outputbox@depth}%
+ \@tempdima \@colht
+ \ifdim \wd\@kludgeins>\z@
+ \advance \@tempdima -\ht\@outputbox
+ \advance \@tempdima \pageshrink
+ \setbox\@outputbox \vbox to \@colht {%
+ \unvbox\@outputbox
+ \vskip \@tempdima
+ \@textbottom
+ }%
+ \else
+ \advance \@tempdima -\ht\@kludgeins
+ \setbox \@outputbox \vbox to \@colht {%
+ \vbox to \@tempdima {%
+ \unvbox\@outputbox
+ \@textbottom}%
+ \vss}%
+ \fi
+ {\setbox \@tempboxa \box \@kludgeins}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@outputbox@removebskip}
+%
+% This is really a bug fix for the kernel, but perhaps one has to
+% make it optional because it is in there since day one). If
+% \cs{raggedbottom} is in force, footnotes get attached to the main
+% galley at a distance of \cs{footskip} on all pages except on
+% those that are ended by \cs{newpage} or \cs{clearpage} where the
+% \cs{vfil} from \cs{newpage} pushes the footnotes to the very bottom.
+%
+% This is kind of a weird difference to a page ending with
+% \cs{pagebreak}---in that case the page is also run
+% short, but the footnotes are not pushed to the bottom.
+%
+% This is fixed by \cs{@outputbox@removebskip} but only if the
+% switch \texttt{FN@fixskip} is set to true (which is done whenever
+% \pkg{footmisc} is called with with an option specifying the
+% footnote placement, i.e., not in the default case).
+% \begin{macrocode}
+\ifFN@fixskip
+ \def\@outputbox@removebskip{%
+% \end{macrocode}
+% We first test if we are in a \cs{raggedbottom} layout. If not we
+% do nothing, but we don't disable the code because
+% \cs{raggedbottom} may get used only for some parts of the
+% document.
+% \begin{macrocode}
+ \ifx\@textbottom\relax \else
+% \end{macrocode}
+% We then append some negative glue at the end of \cs{@outputbox}
+% provided it has a glue stretch order of 1 or more (i.e., contains
+% a \texttt{fil} or \texttt{fill} part).
+% \begin{macrocode}
+ \@outputbox@append{%
+ \@tempskipa\lastskip
+ \ifnum \gluestretchorder\@tempskipa>\z@
+ \vskip-\@tempskipa
+% \end{macrocode}
+% \begin{macro}{\@outputbox@reinsertbskip}
+% We also record the value so that it can be reinserted
+% elsewhere. As we have to do this globally, we also need to
+% explicitly reset it if we don't find any such glue.
+% \begin{macrocode}
+ \xdef\@outputbox@reinsertbskip
+ {\noexpand\@outputbox@append{\vskip\the\@tempskipa}}%
\else
- \setbox\@outputbox \vbox to\@colht{%
- \@texttop \dimen@\dp\@outputbox
- \unvbox\@outputbox
- \vskip -\dimen@\@textbottom
- }%
+ \global\let\@outputbox@reinsertbskip\relax
\fi
- \global\maxdepth\@maxdepth
}%
- }%
- }{%
- \CheckCommand*\@makecol{\ifvoid \footins
- \setbox\@outputbox \box\@cclv
- \else
- \setbox\@outputbox \vbox{%
- \boxmaxdepth\@maxdepth
- \unvbox\@cclv
- \vskip \skip\footins
- \color@begingroup
- \normalcolor\footnoterule
- \unvbox\footins
- \color@endgroup
- }%
- \fi
- \xdef\@freelist{\@freelist\@midlist}%
- \global\let\@midlist\@empty
- \@combinefloats
- \ifvbox\@kludgeins
- \@makespecialcolbox
- \else
- \setbox\@outputbox \vbox to\@colht{%
- \@texttop \dimen@\dp\@outputbox
- \unvbox\@outputbox
- \vskip -\dimen@\@textbottom
- }%
- \fi
- \global\maxdepth\@maxdepth
- }%
- }%
-}
+ \fi
+ }
% \end{macrocode}
+% We need a trivial top-level definition for
+% \cs{@outputbox@reinsertbskip} in case the first page has no
+% bottom glue and the command gets called.
+% \begin{macrocode}
+\let\@outputbox@reinsertbskip\relax
+% \end{macrocode}
+% If nothing should get fixed we set both commands to \cs{relax}.
+% \begin{macrocode}
+\else
+ \let\@outputbox@removebskip \relax
+ \let\@outputbox@reinsertbskip\relax
+\fi
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
-% If we're doing paragraph footnotes, the output routine needs
-% different code to place the actual text. We prepare this code here,
-% since it's potentially used in two different places.
%
-% We prepare the code in a token register to be used at the
-% appropriate place in the patching of \cs{@makecol}; thus it becomes
-% a token register containing code to place stuff in a token register
+% \begin{macro}{\@kernel@before@cclv}
+% \begin{macro}{\@kernel@before@footins}
+% These two commands are internal kernel hooks intended for tagging
+% support in case that is active. By default they do nothing (and
+% may have been defined already by \cs{DocumentMetadata}).
% \begin{macrocode}
- \ifFN@para
+\providecommand\@kernel@before@cclv{}
+\providecommand\@kernel@before@footins{}
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+% \subsection{The output routine configuration components}
+%
+% Here we provide the components that are used to define
+% \cs{@makecol@appendblocks}.
%
-% We make a box out of the paragraph of footnotes, and then stuff the
-% contents of the box into that which is going to be \cs{ship}ped
-% |out|.
+%
+% \begin{macro}{@outputbox@append}
+%
+% This general purpose command alters the \cs{@outputbox} box by
+% appending material to it. As this is a box typesetting operation
+% we make sure that the last line of the box reflects the true
+% depth of the last line (in case that is needed later). We also
+% expose the current depth of \cs{@outputbox} as
+% \cs{@outputbox@depth} before unboxing so that its value can be
+% used by \verb=#1= if wanted.
% \begin{macrocode}
- \FN@temptoken{%
- \toks@\expandafter{\the\toks@
- \vskip\skip\footins
- \color@begingroup
- \normalcolor\footnoterule
- \global\setbox\FN@tempboxc\vbox{\makefootnoteparagraph}%
- \unvbox\FN@tempboxc
- \color@endgroup
- }%
- }%
+\def\@outputbox@append #1{%
+% \if!\detokenize{#1}!\else
+ \setbox\@outputbox \vbox {%
+ \boxmaxdepth \@maxdepth
+ \@outputbox@depth\dp\@outputbox % if needed in #1
+ \unvbox \@outputbox
+ #1%
+ }%
+% \fi
+}
% \end{macrocode}
+% \end{macro}
%
-% If we're not doing paragraph footnotes, we insert the little bit of
-% code that would have been replaced by the stuff above:
+%
+%
+%
+% \begin{macro}{\@outputbox@appendfootnotes}
+%
+% This command appends the footnotes to the \cs{@outputbox} (if
+% there are any). If not then it does nothing.
% \begin{macrocode}
- \else
- \FN@temptoken{%
- \toks@\expandafter{\the\toks@
- \vskip\skip\footins
- \color@begingroup
- \normalcolor\footnoterule
- \unvbox\footins
- \color@endgroup
+\def\@outputbox@appendfootnotes {%
+ \ifvoid\footins \else
+% \end{macrocode}
+% First come two configuration points: what to do if we are in a split
+% footnote situation and a second one that does some manipulation
+% of the \cs{footins} box before it gets appended.
+% \fmi{this code will get revised as part of CP handling in the future}
+% \begin{macrocode}
+ \@makecol@handlesplitfootnotes
+ \@makecol@preparefootinshook
+% \end{macrocode}
+% Then the footnotes are appended:
+% \begin{macrocode}
+ \@outputbox@append{%
+ \vskip \skip\footins
+ \@kernel@before@footins
+ \color@begingroup
+ \normalcolor
+ \footnoterule
+% \end{macrocode}
+% Support for \pkg{pdfcolfoot}, eventually this can go once color
+% is properly supported.
+% \begin{macrocode}
+ \csname pdfcolfoot@current\endcsname
+ \unvbox \footins
+ \color@endgroup
}%
- }%
\fi
+}
% \end{macrocode}
+% \end{macro}
+%
+%
%
-% Now we start building up the revised version of \cs{@makecol}. The
-% definition starts out in \cs{toks@}; first the \textsf{bottom} version:
+% \begin{macro}{\@outputbox@attachfloats}
+% \begin{macro}{\@outputbox@attachtopfloats}
+% \begin{macro}{\@outputbox@attachbottomfloats}
+% Attaching top and bottom floats can usually be done in one go,
+% but for special layouts we might want more control so we provide
+% also separate commands.
% \begin{macrocode}
- \ifFN@bottom
- \toks@{\setbox\@outputbox \box\@cclv
- \xdef\@freelist{\@freelist\@midlist}%
- \global\let\@midlist\@empty
- \@combinefloats
- \ifvoid\footins
- \else
- \setbox\@outputbox \vbox\bgroup
- \boxmaxdepth\@maxdepth
- \unvbox\@outputbox
- \vfill\relax
+\let \@outputbox@attachfloats \@combinefloats
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def \@outputbox@attachtopfloats {%
+ \ifx \@toplist\@empty \else \@cflt \fi
+}
+\def \@outputbox@attachbottomfloats {%
+ \ifx \@botlist\@empty \else \@cflb \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\@makecol@handlesplitfootnotes}
+% \begin{macro}{\@makecol@splitfootnotemessagehook}
+% This is only an early draft and doesn't do much.
+% Contains incomplete preparation for tagging commented out.
+% \fmi{Interfaces and code will change in the future}
+% \begin{macrocode}
+\def\@makecol@handlesplitfootnotes {%
+% \ifx\splitfootnote@continuation\@empty \else
+% \setbox\footins\vbox{\splitfootnote@continuation\unvbox\footins}%
+% \global\let\splitfootnote@continuation\@empty
+% \fi
+ \ifnum\insertpenalties>\z@
+ \@makecol@splitfootnotemessagehook
+% \setbox\footins\vbox{\unvbox\footins --- END at split}%
+% \gdef\splitfootnote@continuation {--- START after split}%
+ \fi
+}
+%\def\splitfootnote@continuation{}
+% \end{macrocode}
+% This could issue warning if split footnotes are encountered.
+% \begin{macrocode}
+\let \@makecol@splitfootnotemessagehook \@empty
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@makecol@preparefootinshook}
+%
+% Configuration point to support manipulation of footins box
+% (result needs to be moved back in there). Used by the
+% \texttt{para} option.
+% \fmi{Interface will change in the future}
+% \begin{macrocode}
+\let \@makecol@preparefootinshook \@empty
+% \end{macrocode}
+%
+% Footnote box layout for para footnotes;
+% this would also be the hook to support dblfootnotes (from the
+% \texttt{dblfnote} package if we integrate that).
+% \begin{macrocode}
+\ifFN@para
+ \def\@makecol@preparefootinshook {%
+ \global\setbox\footins\vbox{\FN@makefootnoteparagraph}%
}
- \the\FN@temptoken
- \toks@\expandafter{\the\toks@\egroup\fi}
+\fi
% \end{macrocode}
+% \end{macro}
%
-% Not putting stuff at the bottom: footnotes are placed using the
-% kernel's algorithm.
+%
+%
+% \subsection{The \cs{@makecol} configuration based on options}
+%
+%
+% Placement of footnotes in relation to main galley and floats is
+% covered by the value of \cs{FN@ORspacehandling} (distribution of
+% space) and the status of the switch \texttt{@abovefloats}.
+%
+% \begin{macrocode}
+\ifcase \FN@ORspacehandling\relax
+%---------------------------------------------------------
+% 0 = undefined
+%---------------------------------------------------------
+\ERROR
+\or
+%---------------------------------------------------------
+% 1 = space above footnotes and floats
+%---------------------------------------------------------
+% \end{macrocode}
+% All excess space are above the footnote and bottom float
+% blocks. The order of the blocks depend on \texttt{@abovefloats}:
% \begin{macrocode}
+ \ifFN@abovefloats
+%---------------------------------------------------------
+% \end{macrocode}
+% Footnotes above floats both at bottom:
+% \begin{macrocode}
+ \def\@makecol@appendblocks {%
+ \@outputbox@append{\vfill}%
+ \@outputbox@appendfootnotes
+ \@outputbox@attachfloats
+ }
+%---------------------------------------------------------
\else
- \toks@{\ifvoid\footins
- \setbox\@outputbox\box\@cclv
- \else
- \setbox\@outputbox \vbox\bgroup
- \boxmaxdepth\@maxdepth
- \unvbox\@cclv
+% \end{macrocode}
+% Footnotes below floats:
+% \begin{macrocode}
+ \def\@makecol@appendblocks {%
+ \@outputbox@append{\vfill}%
+ \@outputbox@attachfloats
+ \@outputbox@appendfootnotes
}
- \the\FN@temptoken
+ \fi
+\or
+%---------------------------------------------------------
+% 2 = space between footnotes and floats (or floats and footnotes)
+%---------------------------------------------------------
+ \ifFN@abovefloats
+%---------------------------------------------------------
+% \end{macrocode}
+% Footnotes first then space then floats at bottom:
+% \begin{macrocode}
+ \def\@makecol@appendblocks {%
+ \@outputbox@appendfootnotes
+ \@outputbox@append{\vfill}%
+ \@outputbox@attachfloats
+ }
+%---------------------------------------------------------
+ \else
% \end{macrocode}
-%
-% Finally, close the \cs{setbox} and the \cs{ifvoid} and tag the parts
-% of the definition of \cs{@makecol} up to the end of the definition
-% of the \textsf{bottom} version on to \cs{toks@}.
+% Then the other way around:
% \begin{macrocode}
- \toks@\expandafter{\the\toks@
- \egroup
- \fi
- \xdef\@freelist{\@freelist\@midlist}%
- \global\let\@midlist\@empty
- \@combinefloats
- }%
+ \def\@makecol@appendblocks {%
+ \@outputbox@attachfloats
+ \@outputbox@append{\vfill}%
+ \@outputbox@appendfootnotes
+ }
+%---------------------------------------------------------
\fi
+\or
+%---------------------------------------------------------
+% 3 = space below footnotes and floats
+%---------------------------------------------------------
+% \end{macrocode}
+% If the excess spaces goes on the bottom we don't append
+% \cs{vfill} there. Instead we make use of the fact that
+% \cs{raggedbottom} already puts a stretchable space there, and if
+% we are in a \cs{flushbottom} scenario then any excess space is
+% supposed to be distributed across the whole page.
+% \begin{macrocode}
+ \ifFN@abovefloats
+%---------------------------------------------------------
+ \def\@makecol@appendblocks {%
+ \@outputbox@appendfootnotes
+ \@outputbox@attachfloats
+% \end{macrocode}
+% We do, however, reinsert the bottom skip from \cs{newpage} if it
+% was taken out earlier. This is, strictly speaking, not necessary
+% in most cases, but it is a \cs{vfil} while \cs{raggedbottom} is
+% only generating \verb=\vspace{0pt plus .0001fil}=, so if you have
+% several \cs{vfil} on the page before the \cs{newpage} you would
+% alter the space distribution if one is taken out.
+% \begin{macrocode}
+ \@outputbox@reinsertbskip
+ }
+ \else
+%---------------------------------------------------------
% \end{macrocode}
-%
-% Finally, create the new definition from the resulting object with
-% the remainder of the original \cs{@makecol} tagged on at the end.
+% Same thing but with blocks swapped.
% \begin{macrocode}
- \toks@\expandafter{\the\toks@
- \ifvbox\@kludgeins
- \@makespecialcolbox
- \else
- \setbox\@outputbox \vbox to\@colht{%
- \@texttop \dimen@\dp\@outputbox
- \unvbox\@outputbox
- \vskip -\dimen@\@textbottom
- }%
- \fi
- \global\maxdepth\@maxdepth
- }
- \edef\@makecol{\the\toks@}
+ \def\@makecol@appendblocks {%
+ \@outputbox@attachfloats
+ \@outputbox@appendfootnotes
+ \@outputbox@reinsertbskip
+}
+%---------------------------------------------------------
+ \fi
+\else
+%---------------------------------------------------------
+% 3 > undefined
+%---------------------------------------------------------
% \end{macrocode}
-%
-% All of the above occurred conditionally on the `or' of
-% \cs{ifFN@para} and \cs{ifFN@bottom}, so we now close the
-% conditional.
+% The \cs{ERROR} here and above should never execute, like ``This
+% can't happen'' in the \TeX{} program code. If they execute then code
+% is badly broken.
% \begin{macrocode}
+\ERROR
\fi
+
% \end{macrocode}
%
%
% \subsection{The requirements of \cs{@footnotetext}}
%
+% Instead of (re)defining \cs{@footnotetext} we define
+% \cs{FN@footnotetext} and at the end we check what we do with it,
+% depending on whether or not \texttt{hyperref} was loaded.
+%
% \begin{macro}{\ifFN@baselinestretch}
% \begin{macro}{\FN@singlespace}
% Whatever we do, we are going to patch \cs{@footnotetext}; so first
@@ -1119,7 +1520,7 @@
% footnotes:
% \begin{macrocode}
\ifFN@para
- \renewcommand\@footnotetext[1]{%
+ \long\def\FN@footnotetext#1{%
\insert\footins{%
% \end{macrocode}
% insert compatibility code with |setspace.sty| if necessary
@@ -1139,10 +1540,10 @@
% \end{macrocode}
%
% We set the paragraph in an \cs{hbox} and apply the fudge factor
-% here:
+% here (these days done with e\TeX{} methods):
%
% \begin{macrocode}
- \setbox\FN@tempboxa=\hbox{%
+ \setbox\FN@tempboxa\hbox{%
% \end{macrocode}
%
% This needs a parameter; the rule should be moved to the beginning of
@@ -1161,13 +1562,9 @@
\hskip\footglue
}% end of \@makefntext parameter
}% end of \hbox
- \dp\FN@tempboxa=0pt
- \ifFN@etex
- \ht\FN@tempboxa=\dimexpr\wd\FN@tempboxa *
- \footnotebaselineskip / \columnwidth\relax
- \else
- \ht\FN@tempboxa=\fudgefactor\wd\FN@tempboxa
- \fi
+ \dp\FN@tempboxa\z@
+ \ht\FN@tempboxa\dimexpr\wd\FN@tempboxa *%
+ \footnotebaselineskip / \columnwidth\relax
\box\FN@tempboxa
\color@endgroup
}%
@@ -1182,7 +1579,7 @@
% \begin{macrocode}
\else
\ifFN@sidefn
- \renewcommand\@footnotetext[1]{%
+ \long\def\FN@footnotetext#1{%
\marginpar{%
% \end{macrocode}
% insert compatibility code with |setspace.sty| if necessary
@@ -1203,7 +1600,7 @@
\FN@mf@prepare
}%
\else
- \renewcommand\@footnotetext[1]{%
+ \long\def\FN@footnotetext#1{%
\insert\footins{%
% \end{macrocode}
% insert compatibility code with \textsf{setspace} if necessary
@@ -1235,6 +1632,9 @@
% \end{macrocode}
%
%
+%
+%
+%
% \subsection{Support code for paragraph footnotes}
%
% This code used (most inefficiently) to be in the argument of the
@@ -1302,29 +1702,17 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\fudgefactor}
-% Now we derive a fudge factor from the baselineskip we've just
-% established (we use \cs{dimexpr} if we're in etex, so there's no need
-% for the fudge factor in that case).
-% \begin{macrocode}
- \ifFN@etex
- \else
- \@tempdima=\footnotebaselineskip \multiply\@tempdima by 1024
- \divide \@tempdima by \columnwidth \multiply\@tempdima by 64
- \xdef\fudgefactor{\strip@pt\@tempdima }%
- \fi
-% \end{macrocode}
-% \end{macro}
%
-% \begin{macro}{\makefootnoteparagraph}
+
+% \begin{macro}{\FN@makefootnoteparagraph}
% For use in the output routine
% \begin{macrocode}
- \long\def\makefootnoteparagraph{\unvbox\footins \makehboxofhboxes
- \setbox\FN@tempboxa=\hbox{\unhbox\FN@tempboxa \removehboxes}
+ \long\def\FN@makefootnoteparagraph{\unvbox\footins \FN@makehboxofhboxes
+ \setbox\FN@tempboxa=\hbox{\unhbox\FN@tempboxa \FN@removehboxes}%
% \end{macrocode}
% Now we are ready to set the paragraph:
% \begin{macrocode}
- \hsize\columnwidth
+ \FN@setfootnoteparawidth
\@parboxrestore
\baselineskip=\footnotebaselineskip
\noindent
@@ -1334,20 +1722,20 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\makehboxofhboxes}
-% \begin{macro}{\removehboxes}
-% Support code for \cs{makefootnoteparagraph}
+% \begin{macro}{\FN@makehboxofhboxes}
+% \begin{macro}{\FN@removehboxes}
+% Support code for \cs{FN@makefootnoteparagraph}
% \begin{macrocode}
- \def\makehboxofhboxes{\setbox\FN@tempboxa=\hbox{}%
+ \def\FN@makehboxofhboxes{\setbox\FN@tempboxa=\hbox{}%
\loop
\setbox\FN@tempboxb=\lastbox
\ifhbox\FN@tempboxb
\setbox\FN@tempboxa=\hbox{\box\FN@tempboxb\unhbox\FN@tempboxa}%
\repeat
}
- \def\removehboxes{\setbox\FN@tempboxa=\lastbox
+ \def\FN@removehboxes{\setbox\FN@tempboxa=\lastbox
\ifhbox
- \FN@tempboxa{\removehboxes}%
+ \FN@tempboxa{\FN@removehboxes}%
\unhbox\FN@tempboxa
\fi
}
@@ -1357,363 +1745,42 @@
% \end{macro}
%
%
-% \subsection{The other footnote commands}\label{sec:perpage-code}
-%
-% \begin{macro}{\ifFN@pp@footnotehint}
-% A conditional needed by the perpage code: must be defined outside
-% the \textsl{perpage} conditional
-% \begin{macrocode}
-\newif\ifFN@pp@footnotehint
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\c@pp@next@reset}
-% Counter used to store information about the next reset of the
-% footnote number, in perpage mode.
-% \begin{macrocode}
-\newcounter{pp@next@reset}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ifFN@pp@towrite}
-% A conditional that mediates the interaction between the
-% \texttt{perpage} option and the \texttt{multiple} option.
-% \begin{macrocode}
-\newif\ifFN@pp@towrite
-\FN@pp@towritefalse
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ifFN@pp@lastseq}
-% We prevent endless processions of diagnostics `footnote sequence
-% lost' by using this conditional (again, needs to be defined outside
-% the \textsl{perpage} conditional:
-% \begin{macrocode}
-%<*PPdebug>
-\newif\ifFN@pp@lastseq
-\global\FN@pp@lastseqfalse
-%</PPdebug>
-% \end{macrocode}
-% \end{macro}
-%
-% Now, do we need to patch \cs{footnote} for per-page footnotes?
-% \begin{macrocode}
-\ifFN@perpage
- \CheckCommand*\footnote{\@ifnextchar [%]
- \@xfootnote
- {%
- \stepcounter\@mpfn \protected@xdef\@thefnmark{\thempfn}%
- \@footnotemark \@footnotetext
- }%
- }
- \renewcommand*\footnote{\@ifnextchar [%]
- \@xfootnote
- {%
- \stepcounter\@mpfn \protected@xdef\@thefnmark{\thempfn}%
- \FN@pp@footnote\@footnotemark
-% \end{macrocode}
-%
-% In case that we're \emph{not} running \texttt{multiple} option,
-% \cs{@footnotemark} \emph{won't} have written details to the |.aux|
-% file, so do it now:
-% \begin{macrocode}
- \ifFN@pp@towrite
- \FN@pp@writetemp
- \FN@pp@towritefalse
- \fi
- \@footnotetext
- }%
- }
-% \end{macrocode}
-%
-% And the analagous change for \cs{footnotemark}
-% \begin{macrocode}
- \CheckCommand*\footnotemark{%
- \@ifnextchar [%]
- \@xfootnotemark
- {%
- \stepcounter{footnote}%
- \protected@xdef\@thefnmark{\thefootnote}%
- \@footnotemark
- }%
- }
- \renewcommand*\footnotemark{%
- \@ifnextchar [%]
- \@xfootnotemark
- {%
- \stepcounter{footnote}%
- \protected@xdef\@thefnmark{\thefootnote}%
- \FN@pp@footnote\@footnotemark
-% \end{macrocode}
-%
-% again, tidy up if we're not doing \texttt{multiple} option
-% \begin{macrocode}
- \ifFN@pp@towrite
- \FN@pp@writetemp
- \FN@pp@towritefalse
- \fi
- }%
- }
-% \end{macrocode}
-%
-% \begin{macro}{\FN@pp@initialstab}
-% Now the supporting commands\dots
-%
-% if we encounter no information in the |.aux| file, we make a first
-% stab resetting footnote on the page number counter
-% \begin{macrocode}
- \gdef\FN@pp@initial@stab{\@addtoreset{footnote}{page}}
- \AtBeginDocument{\FN@pp@initial@stab}
-% \end{macrocode}
-% \end{macro}
-%
-% We use a counter to keep pace with the footnotes: this counter is
-% used in the data that's written to the |.aux| file, and matched to
-% create the correct footnote numbers on the second and subsequent
-% passes.
-% \begin{macrocode}
- \newcounter{@fnserial}
-% \end{macrocode}
-%
-% \begin{macro}{\FN@pp@cpage}
-% The package requires a ``knowledge'' of the current page number.
-% It's kept in \cs{FN@pp@cpage}
-% \begin{macrocode}
- \def\FN@pp@cpage{0}
-% \end{macrocode}
-% \end{macro}
%
-% \begin{macro}{\footnotehint}
-% However, the progress of page numbers isn't predictable, so we have
-% a flag saying `reset footnote number'. The flag is for indirect use
-% by people who diddle with the page number, via the \cs{footnotehint}
-% command, as well as various places where we \emph{know} there could
-% be a discontinuity.
-% \begin{macrocode}
- \FN@pp@footnotehinttrue
- \newcommand{\footnotehint}{%
- \setcounter{footnote}{0}%
- \protected@writeaux\relax{\protect\FN@pp@footnotehinttrue}%
- \@tempcnta\c@@fnserial
- \advance\@tempcnta\@ne
- \global\c@pp@next@reset\@tempcnta
- }
- \AtBeginDocument{\protected@writeaux\relax{%
- \protect\providecommand{\protect\FN@pp@footnotehinttrue}{}%
- }%
- }
-% \end{macrocode}
-% \end{macro}
%
-% \begin{macro}{\FN@pp@lastfoot}
-% Dummy value for the number of the last footnote we came across.
-% \begin{macrocode}
-\def\FN@pp@lastfoot{-1}
-% \end{macrocode}
-% \end{macro}
%
-% \begin{macro}{\FN@pp@footnote@aux}
-% The command \cs{FN@pp@footnote@aux} is written to the |.aux| file
-% for every footnote counter allocated (other than in minipages):\\
-% |#1| is the footnote serial number\\
-% |#2| is the page the footnote was actually written on
-% \begin{macrocode}
- \newcommand{\FN@pp@footnote@aux}[2]{%
- \ifnum\FN@pp@lastfoot<#1
- \ifFN@pp@footnotehint
- \FN@pp@resetfn{#1}{#2}%
- \FN@pp@footnotehintfalse
- \else
- \gdef\@tempa{#2}%
- \ifx\@tempa\FN@pp@cpage
- \else
- \FN@pp@resetfn{#1}{#2}%
- \fi
- \fi
- \def\FN@pp@lastfoot{#1}%
-%<*PPdebug>
- \else
- \ifFN@pp@debug
- \typeout{not considering footnote serial number #1
- (last valid was \FN@pp@lastfoot)}%
- \fi
-%</PPdebug>
- \fi
-% \end{macrocode}
+% \begin{macro}{\FN@setfootnoteparawidth}
+% What we have to use as the width for the footnote paragraph
+% depends on whether or not we typeset in several columns. If single
+% column or normal two-column is used then the right value is
+% \cs{columnwidth}. However, inside a \texttt{multicols} environment
+% we need to use \cs{textwidth} as the footnotes there will span
+% across all columns.
%
-% Since we've now had at least one item of footnote information from
-% a |.aux| file, we can't allow footnote resetting per page.
+% To detect if we are inside such an environment we look at
+% \cs{doublecolnumber} which is only positive if inside such an
+% environment.
% \begin{macrocode}
- \global\let\FN@pp@initial@stab\relax
- }
+\@ifpackageloaded{multicol}
+ {\def\FN@setfootnoteparawidth
+ {\hsize\ifnum\doublecol@number>\@ne
+ \textwidth
+ \else \columnwidth \fi}}
+ {\def\FN@setfootnoteparawidth{\hsize\columnwidth}}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\FN@pp@resetfn}
-% Set the flag to reset the footnote number; this constructs a chain
-% through the footnote serial numbers at the start of each page
-% \begin{macrocode}
- \newcommand{\FN@pp@resetfn}[2]{%
- \gdef\FN@pp@cpage{#2}%
- \expandafter\gdef
- \csname FN@pp@next-\FN@pp@prev@foot\endcsname{#1}%
- \def\FN@pp@prev@foot{#1}%
- \expandafter\xdef
- \csname FN@pp@next-\FN@pp@prev@foot\endcsname{\the\@MM}%
- }
-% \end{macrocode}
-% \end{macro}
%
-% \begin{macro}{\FN@pp@prev@foot}
-% The base of the footnote serial number chain (this element is never
-% looked at: footnote serial 1 must always have number 1)
-% \begin{macrocode}
- \newcommand{\FN@pp@prev@foot}{root}
-% \end{macrocode}
-% \end{macro}
%
-% again, avoid confusion; also establish \cs{FN@pp@footnote@aux} in the
-% |.aux| file
-% \begin{macrocode}
- \AtBeginDocument{\protected@writeaux\relax{%
- \protect\providecommand{\protect\FN@pp@footnote@aux}[2]{}}%
- \c@pp@next@reset\@ne
- }
-% \end{macrocode}
%
-% At end document, establish a new \cs{FN@pp@footnote@aux} which
-% checks whether numbers have changed during the scan of the |.aux|
-% files for changed labels and the like
-% \begin{macrocode}
- \AtEndDocument{\let\FN@pp@footnote@aux\FN@pp@footnote@endaux
- \def\FN@pp@lastfoot{-1}%
- \FN@pp@footnotehintfalse
- \renewcommand{\FN@pp@prev@foot}{root}
- }
-% \end{macrocode}
%
-% \begin{macro}{\FN@pp@footnote@endaux}
-% The footnote analysis command for end document
-% \begin{macrocode}
- \newcommand{\FN@pp@footnote@endaux}[2]{%
- \ifnum\FN@pp@lastfoot<#1
- \ifFN@pp@footnotehint
- \FN@pp@resetfn@end{#1}{#2}%
- \FN@pp@footnotehintfalse
- \else
- \gdef\@tempa{#2}%
- \ifx\@tempa\FN@pp@cpage
- \else
- \FN@pp@resetfn@end{#1}{#2}%
- \fi
- \fi
- \def\FN@pp@lastfoot{#1}%
-%<*PPdebug>
- \else
- \ifFN@pp@debug
- \typeout{not considering footnote serial number #1
- (last valid was \FN@pp@lastfoot)}%
- \fi
-%</PPdebug>
- \fi
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\FN@pp@resetfn@end}
-% Deal with the \verb'.aux' file footnote details, at end document
-% \begin{macrocode}
- \newcommand{\FN@pp@resetfn@end}[2]{%
- \def\@tempa{#1}%
- \expandafter\ifx\csname FN@pp@next-\FN@pp@prev@foot\endcsname\@tempa%
- \else
- \@tempswatrue
-%<*PPdebug>
- \ifFN@pp@debug
- \expandafter\ifx\csname FN@pp@next-\FN@pp@prev@foot\endcsname\relax
- \ifFN@pp@lastseq\else
- \typeout{footnote sequence lost between pages
- \FN@pp@cpage\space and #2}%
- \global\FN@pp@lastseqtrue
- \fi
- \else
- \typeout{footnotes changed between pages \FN@pp@cpage\space and #2:
- next was \csname FN@pp@next-\FN@pp@prev@foot\endcsname, now #1}%
- \global\FN@pp@lastseqfalse
- \fi
- \fi
-%</PPdebug>
- \fi
- \gdef\FN@pp@prev@foot{#1}%
- \gdef\FN@pp@cpage{#2}%
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\clearpage}
-% \begin{macro}{\FN@pp@@clearpage}
-% Now, how do we cope with \cs{include}d documents? We can't insert
-% anything (the |includex| package offers \cs{AtBeginIncludedDocument}
-% but there's no corresponding command for files included by the
-% kernel \cs{include}. So we insert a footnote hint at every
-% \cs{clearpage}
-% \begin{macrocode}
-\let\FN@pp@@clearpage\clearpage
-\renewcommand{\clearpage}{\footnotehint\FN@pp@@clearpage}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\FN@pp@footnote}
-% The business end of the option: a macro to decide on footnote
-% numbers, called from \cs{footnote} and \cs{footnotemark} (see
-% above).
-% \begin{macrocode}
-\def\FN@pp@footnote{%
- \if@minipage\else
- \global\advance\c@@fnserial\@ne
- \if@filesw
-% \end{macrocode}
-%
-% In case we're also doing \texttt{multiple} option, we now save up
-% the command to write to the |.aux| file, and mark we've done so
-% \begin{macrocode}
- \xdef\FN@pp@writetemp{%
- \noexpand\protected@writeaux\relax{%
- \string\FN@pp@footnote@aux
- {\the\c@@fnserial}{\noexpand\thepage}%
- }%
- }%
- \FN@pp@towritetrue
- \fi
- \ifnum\c@pp@next@reset>\c@@fnserial
- \else
- \global\expandafter\csname c@\@mpfn\endcsname\@ne
- \protected@xdef\@thefnmark{\thempfn}%
-% \end{macrocode}
+% \subsection{The other footnote commands}\label{sec:perpage-code}
%
-% Now look at the next element in the chain:
-% \begin{macrocode}
- \expandafter\let\expandafter\@tempa
- \csname FN@pp@next-\number\c@pp@next@reset\endcsname
-% \end{macrocode}
%
-% If the chain is broken here, set the next reset point to something
-% (one hopes) infeasibly large\dots{} a weak point?
-% \begin{macrocode}
- \ifx\@tempa\relax
- \global\c@pp@next@reset\@MM
- \else
- \global\c@pp@next@reset\@tempa
- \fi
- \fi
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-% End of code loaded when \texttt{perpage} option is given
+% We delegate the perpage option to a different package \ldots
% \begin{macrocode}
+\ifFN@perpage
+ \RequirePackage{perpage}
+ \MakePerPage{footnote}
\fi
% \end{macrocode}
%
@@ -1808,13 +1875,13 @@
%
% \begin{macro}{\multiplefootnotemarker}
% \begin{macro}{\multfootsep}
-% \begin{macro}{\@footnotemark}
+% \begin{macro}{\FN@footnotemark}
% \begin{macro}{\FN@mf@prepare}
% \begin{macro}{\FN@mf@check}
% This (revised) code derives from a suggestion by Alexander Rozhenko
% (the author of the \textit{manyfoot} package): the intention is that
% \textit{footmisc} and \textit{manyfoot} should be able to
-% `interwork', in the sense that each would recognise the other's
+% `interwork', in the sense that each would recognize the other's
% footnote marks and behave appropriately. The trick is that
% both \cs{footnote} and \cs{footnotemark} insert a marker (a
% cancelling pair of kerns of \cs{multiplefootnotemarker} (of opposite
@@ -1826,14 +1893,17 @@
\ifFN@multiplefootnote
\providecommand*{\multiplefootnotemarker}{3sp}
\providecommand*{\multfootsep}{,}
- \CheckCommand*\@footnotemark{%
- \leavevmode
- \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
- \@makefnmark
- \ifhmode\spacefactor\@x@sf\fi
- \relax
- }
- \renewcommand*\@footnotemark{%
+%
+% FMi: not checking, more harm than gain
+% \CheckCommand*\@footnotemark{%
+% \leavevmode
+% \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
+% \@makefnmark
+% \ifhmode\spacefactor\@x@sf\fi
+% \relax
+% }
+%
+ \newcommand*\FN@footnotemark{%
\leavevmode
\ifhmode
\edef\@x@sf{\the\spacefactor}%
@@ -1841,16 +1911,6 @@
\nobreak
\fi
\@makefnmark
-% \end{macrocode}
-%
-% if we're also doing option \texttt{perpage}, write its stuff to the
-% |.aux| file for it, so the \emph{wotsit} node doesn't interfere with
-% our \cs{kern} detection.
-% \begin{macrocode}
- \ifFN@pp@towrite
- \FN@pp@writetemp
- \FN@pp@towritefalse
- \fi
\FN@mf@prepare
\ifhmode\spacefactor\@x@sf\fi
\relax
@@ -1873,6 +1933,10 @@
% \begin{macrocode}
\else
\let\FN@mf@prepare\relax
+% \end{macrocode}
+% Need to provide a definition for \cs{FN@footnotemark} in that case.
+% \begin{macrocode}
+ \let\FN@footnotemark\@footnotemark
\fi
% \end{macrocode}
% \end{macro}
@@ -1946,10 +2010,10 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\setfnsymbol}
-% \begin{macro}{\FN@fnsymbol@lamport}
% \section{Symbol option variants}
%
+% \begin{macro}{\setfnsymbol}
+% \begin{macro}{\FN@fnsymbol@lamport}
% Lamport's choice of symbols for \cs{fnsymbol} wasn't entirely
% ``traditional'', so we (now) provide alternatives. The
% \cs{setfnsymbol} command offers a small number of choices, and the
@@ -2021,26 +2085,18 @@
% Note that doubled-up (and worse\,---\,see below) symbols need braces
% around them.
% \begin{macrocode}
-\newcommand{\DefineFNsymbols}{%
- \@ifstar{\@tempswbtrue\@DefineFNsymbols}%
- {\@tempswbfalse\@DefineFNsymbols}%
-}
-\newcommand{\@DefineFNsymbols}[1]{%
- \@ifnextchar[% ]
- {\@DefineFNsymbols@{#1}}{\@DefineFNsymbols@{#1}[text]}%
-}
-\def\@DefineFNsymbols@#1[#2]#3{%
- \expandafter\ifx\csname FN@fnsymbol@#1\endcsname\relax
- \PackageInfo{footmisc}{Declaring symbol style #1}%
+\DeclareDocumentCommand\DefineFNsymbols {smO{text}m}{%
+ \expandafter\ifx\csname FN@fnsymbol@#2\endcsname\relax
+ \PackageInfo{footmisc}{Declaring symbol style #2}%
\else
- \PackageWarning{footmisc}{Redeclaring symbol style #1}%
+ \PackageWarning{footmisc}{Redeclaring symbol style #2}%
\fi
\toks@{}%
\def\@tempb{\end}%
- \FN@build@symboldef#3\end
+ \FN@build@symboldef#4\end
\def\@tempc{math}%
- \def\@tempd{#2}%
- \expandafter\xdef\csname FN@fnsymbol@#1\endcsname##1{%
+ \def\@tempd{#3}%
+ \expandafter\xdef\csname FN@fnsymbol@#2\endcsname##1{%
\ifx\@tempc\@tempd
\noexpand\ensuremath
\else
@@ -2050,15 +2106,15 @@
\noexpand\ifcase##1%
\the\toks@
\noexpand\else
- \if@tempswb
- \noexpand\@ctrerr
- \else
- \noexpand\@arabic##1\noexpand\FN@orange##1%
- \fi
+ \IfBooleanTF#1{\noexpand\@ctrerr}%
+ {\noexpand\FN@orange##1}%
\noexpand\fi
}%
}%
}
+% \end{macrocode}
+%
+% \begin{macrocode}
\def\FN@build@symboldef#1{%
\def\@tempa{#1}%
\ifx\@tempa\@tempb
@@ -2080,30 +2136,24 @@
% Now do the same job for the ``modern'' way of having both text and
% maths variants of everything.
% \begin{macrocode}
-\newcommand{\DefineFNsymbolsTM}{%
- \@ifstar{\@tempswbtrue\@DefineFNsymbolsTM}%
- {\@tempswbfalse\@DefineFNsymbolsTM}}%
-\newcommand{\@DefineFNsymbolsTM}[2]{%
- \expandafter\ifx\csname FN@fnsymbol@#1\endcsname\relax
- \PackageInfo{footmisc}{Declaring symbol style #1}%
+\DeclareDocumentCommand\DefineFNsymbolsTM {smm}{%
+ \expandafter\ifx\csname FN@fnsymbol@#2\endcsname\relax
+ \PackageInfo{footmisc}{Declaring symbol style #2}%
\else
- \PackageWarning{footmisc}{Redeclaring symbol style #1}%
+ \PackageWarning{footmisc}{Redeclaring symbol style #2}%
\fi
\toks@{}%
\def\@tempb{\end}%
- \FN@build@symboldefTM#2\end\@null
- \expandafter\xdef\csname FN@fnsymbol@#1\endcsname##1{%
+ \FN@build@symboldefTM#3\end\@null
+ \expandafter\xdef\csname FN@fnsymbol@#2\endcsname##1{%
\noexpand\ifcase##1%
\the\toks@
\noexpand\else
- \if@tempswb
- \noexpand\@ctrerr
- \else
- \noexpand\@arabic##1\noexpand\FN@orange##1%
- \fi
- \noexpand\fi
+ \IfBooleanTF#1{\noexpand\@ctrerr}%
+ {\noexpand\FN@orange##1}%
+ \noexpand\fi
}%
-}%
+}
% \end{macrocode}
% Note that this version has two variants of every definition, so
% needs two stopper codes above.
@@ -2121,29 +2171,6 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\TextOrMath}
-% This is a stripped down (e-\TeX{} only) version of what appears in
-% fixltx2e. If the command's already defined, we assume it's that
-% version.
-% \begin{macrocode}
-\@ifundefined{TextOrMath}{%
- \@ifundefined{eTeXversion}{%
- \PackageError{footmisc}{Can't define commands for footnote symbol}%
- {Use e-LaTeX, or load package fixltx2e before
- footmisc}%
- }{%
- \protected\expandafter\def\csname TextOrMath\space\endcsname{%
- \ifmmode \expandafter\@secondoftwo
- \else \expandafter\@firstoftwo \fi
- }
- \edef\TextOrMath#1#2{%
- \expandafter\noexpand\csname TextOrMath\space\endcsname
- {#1}{#2}%
- }%
- }%
-}{}
-% \end{macrocode}
-% \end{macro}
%
% \begin{macro}{\FN@orange}
% \begin{macro}{\@fnsymbol@orange}
@@ -2152,10 +2179,13 @@
% they're allowed to\,--\,e.g., in the \texttt{symbol*} option).
% \begin{macrocode}
\def\FN@orange#1{%
- \@bsphack
- \PackageInfo{footmisc}{Footnote number \number#1 out of range}%
- \protect\@fnsymbol@orange
- \@esphack
+ \ifFN@robust
+ \@arabic#1%
+ \@bsphack
+ \PackageInfo{footmisc}{Footnote number \number#1 out of range}%
+ \protect\@fnsymbol@orange
+ \@esphack
+ \else \@ctrerr \fi
}
\global\let\@diagnose@fnsymbol@orange\relax
\AtEndDocument{\@diagnose@fnsymbol@orange}
@@ -2173,18 +2203,6 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\textbardbl}
-% This is defined in recent \LaTeX{} releases, but not in (for
-% example) that distributed with the last release of te\TeX{}. Since
-% it's needed in some symbol set definitions (including Lamport's) we
-% define it here.
-% \begin{macrocode}
-\@ifundefined{textbardbl}{%
- \DeclareTextSymbol{\textbardbl}{OMS}{107}%
- \DeclareTextSymbolDefault{\textbardbl}{TS1}}{}%
-% \end{macrocode}
-% (This definition comes from the \LaTeX{} sources.)
-% \end{macro}
%
% \begin{macro}{\FN@fnsymbol@bringhurst}
% \begin{macro}{\FN@fnsymbol@chicago}
@@ -2195,24 +2213,24 @@
% footnote symbols, plus a robust version of the original Lamport set,
% and an extended version of Lamport's original
% \begin{macrocode}
-\DefineFNsymbolsTM*{bringhurst}{%
- \textasteriskcentered *
+\DefineFNsymbolsTM{bringhurst}{%
+ \textasteriskcentered *%
\textdagger \dagger
\textdaggerdbl \ddagger
\textsection \mathsection
\textbardbl \|%
\textparagraph \mathparagraph
}%
-\DefineFNsymbolsTM*{chicago}{%
- \textasteriskcentered *
+\DefineFNsymbolsTM{chicago}{%
+ \textasteriskcentered *%
\textdagger \dagger
\textdaggerdbl \ddagger
\textsection \mathsection
\textbardbl \|%
\#\#%
}%
-\DefineFNsymbolsTM*{wiley}{
- \textasteriskcentered *
+\DefineFNsymbolsTM{wiley}{%
+ \textasteriskcentered *%
{\textasteriskcentered\textasteriskcentered}{**}%
\textdagger \dagger
\textdaggerdbl \ddagger
@@ -2220,8 +2238,8 @@
\textparagraph \mathparagraph
\textbardbl \|%
}%
-\DefineFNsymbolsTM{lamport-robust}{
- \textasteriskcentered *
+\DefineFNsymbolsTM{lamport-robust}{%
+ \textasteriskcentered *%
\textdagger \dagger
\textdaggerdbl \ddagger
\textsection \mathsection
@@ -2232,7 +2250,7 @@
{\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger}%
}
\DefineFNsymbolsTM*{lamport*}{%
- \textasteriskcentered *
+ \textasteriskcentered *%
\textdagger \dagger
\textdaggerdbl \ddagger
\textsection \mathsection
@@ -2253,7 +2271,7 @@
}
\setfnsymbol{lamport*}
\DefineFNsymbolsTM{lamport*-robust}{%
- \textasteriskcentered *
+ \textasteriskcentered *%
\textdagger \dagger
\textdaggerdbl \ddagger
\textsection \mathsection
@@ -2281,29 +2299,6 @@
%
% \section{Other miscellaneous commands}
%
-% \subsection{Footnote references}
-%
-% \begin{macro}{\footref}
-% Syntax: \cs{footref}\marg{label-name}
-%
-% One often wishes to refer to a footnote; in some circumstances,
-% \cs{footnotemark} just isn't good enough (for example, inside a
-% |minipage|, when \cs{footnotemark} creates a reference to footnotes
-% outside the minipage).
-%
-% \cs{footref} addresses this problem by making a label reference that
-% actually looks like a \cs{footnotemark}. (The command is available
-% in the |memoir| class, and we therefore \cs{providecommand} it
-% rather than defining it ``outright''.)
-% \begin{macrocode}
-\providecommand*{\footref}[1]{%
- \begingroup
- \unrestored@protected@xdef\@thefnmark{\ref{#1}}%
- \endgroup
- \@footnotemark
-}
-% \end{macrocode}
-% \end{macro}
%
% \subsection{Minipage \cs{footnotemark}s}
%
@@ -2333,6 +2328,26 @@
% \end{macrocode}
% \end{macro}
%
+%
+% If \textsf{hyperref} was loaded first, it has saved
+% \cs{@footnotetext} and \cs{@footnotemark} away and then redefined
+% them. The saved versions are now wrong, so we reassign them.
+% \begin{macrocode}
+\@ifpackageloaded{hyperref}{%
+ \let\H@@footnotetext\FN@footnotetext
+ \let\H@@footnotemark\FN@footnotemark
+}{%
+% \end{macrocode}
+% If \textsf{hyperref} wasn't loaded we copy our new definitions to
+% \cs{@footnotetext} and \cs{@footnotemark} for actual use. If
+% \textsf{hyperref} is loaded later it will do its magic and save
+% our definitions.
+% \begin{macrocode}
+ \let \@footnotetext \FN@footnotetext
+ \let\@footnotemark \FN@footnotemark
+}
+% \end{macrocode}
+%
% \begin{macrocode}
\endinput
%</package>
@@ -2340,19 +2355,3 @@
%
% \Finale
%
-%
-%% \CharacterTable
-%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-%% Digits \0\1\2\3\4\5\6\7\8\9
-%% Exclamation \! Double quote \" Hash (number) \#
-%% Dollar \$ Percent \% Ampersand \&
-%% Acute accent \' Left paren \( Right paren \)
-%% Asterisk \* Plus \+ Comma \,
-%% Minus \- Point \. Solidus \/
-%% Colon \: Semicolon \; Less than \<
-%% Equals \= Greater than \> Question mark \?
-%% Commercial at \@ Left bracket \[ Backslash \\
-%% Right bracket \] Circumflex \^ Underscore \_
-%% Grave accent \` Left brace \{ Vertical bar \|
-%% Right brace \} Tilde \~}
diff --git a/macros/latex/contrib/footmisc/footmisc.ins b/macros/latex/contrib/footmisc/footmisc.ins
index aace7a9c56..a7318a8195 100644
--- a/macros/latex/contrib/footmisc/footmisc.ins
+++ b/macros/latex/contrib/footmisc/footmisc.ins
@@ -1,45 +1,70 @@
-\input docstrip.tex
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the dtx file(s) in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright (c) 1995-2011 Robin Fairbairns
+%% Copyright (c) 2018-2022 Robin Fairbairns, Frank Mittelbach
+%%
+%%
+%% This file is part of the footmisc Bundle for LaTeX.
+%% -------------------------------------------------------
+%%
+%% It 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
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2008 or later.
+%%
+%% In particular, NO PERMISSION is granted to modify the contents of this
+%% file since it contains the legal notices that are placed in the files
+%% it generates.
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+\input l3docstrip
+
+\keepsilent
+
+\usedir{tex/latex/contrib/footmisc}
\preamble
-----------------------------------------------------------------------
-The footmisc package -- variations of footnote typesetting
-Copyright (c) 2008 Robin Fairbairns
-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 2005/12/01 or later.
+This is a generated file.
+
+Copyright (c) 1995-2011 Robin Fairbairns
+Copyright (c) 2018-2022 Robin Fairbairns, Frank Mittelbach
+
+This file was generated from file(s) of the LaTeX `footmisc Bundle'.
+--------------------------------------------------------------------
+
+It 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
+ https://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of LaTeX
+version 2008 or later.
-This work has the LPPL maintenance status `author-maintained'.
+This work has the LPPL maintenance status 'maintained'.
-This work consists of the files footmisc.dtx, footmisc.ins, and README
-and the derived files footmisc.sty and footmisc.pdf.
------------------------------------------------------------------------
+This file may only be distributed together with a copy of the LaTeX
+`footmisc Bundle'. You may however distribute the `footmisc Bundle'
+without such generated files.
+
+The newest sources can be found below
+
+ https://github.com/FrankMittelbach/fmitex-footmisc/
+
+where one can also log issues in case there are any.
\endpreamble
-\def\batchfile{footmisc.ins}
-\keepsilent
-\Msg{*** Generating the footmisc package ***}
-\askforoverwritefalse
-\generate{%
- \file{footmisc.sty}{\from{footmisc.dtx}{package}}%
-}
-
-
-\ifToplevel{
-\Msg{***********************************************************}
-\Msg{*}
-\Msg{* To finish the installation you have to move the file}
-\Msg{* footmisc.sty into a directory searched by TeX}
-\Msg{*}
-\Msg{* Usual TDS location:}
-\Msg{* \space\space tex/latex/footmisc}
-\Msg{*}
-\Msg{* Happy TeXing}
-\Msg{*}
-\Msg{***********************************************************}
-}
+
+\generate{\file{footmisc.sty}{\from{footmisc.dtx}{package}}}
\endbatchfile
diff --git a/macros/latex/contrib/footmisc/footmisc.pdf b/macros/latex/contrib/footmisc/footmisc.pdf
deleted file mode 100644
index 8fb6ed64f4..0000000000
--- a/macros/latex/contrib/footmisc/footmisc.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/snotez/README b/macros/latex/contrib/snotez/README
index 75671c058b..8382efb026 100644
--- a/macros/latex/contrib/snotez/README
+++ b/macros/latex/contrib/snotez/README
@@ -1,14 +1,14 @@
--------------------------------------------------------------------------
-the SNOTEZ package v0.5a 2020/12/14
+the SNOTEZ package v0.6 2022/02/10
Sidenotes for LaTeX2e
--------------------------------------------------------------------------
Clemens Niederberger
-Web: https://bitbucket.org/cgnieder/snotez/
-E-Mail: contact@mychemistry.eu
+Web: https://github.com/cgnieder/snotez/
+E-Mail: clemens@cnltx.de
--------------------------------------------------------------------------
-Copyright 2012--2020 Clemens Niederberger
+Copyright 2012--2022 Clemens Niederberger
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
diff --git a/macros/latex/contrib/snotez/snotez-manual.pdf b/macros/latex/contrib/snotez/snotez-manual.pdf
new file mode 100644
index 0000000000..80470bfd00
--- /dev/null
+++ b/macros/latex/contrib/snotez/snotez-manual.pdf
Binary files differ
diff --git a/macros/latex/contrib/snotez/snotez_en.tex b/macros/latex/contrib/snotez/snotez-manual.tex
index c488fd49bb..1cc9061ab2 100644
--- a/macros/latex/contrib/snotez/snotez_en.tex
+++ b/macros/latex/contrib/snotez/snotez-manual.tex
@@ -5,10 +5,10 @@
%
% --------------------------------------------------------------------------
% Clemens Niederberger
-% Web: https://bitbucket.org/cgnieder/snotez/
-% E-Mail: contact@mychemistry.eu
+% Web: https://github.com/cgnieder/snotez/
+% E-Mail: clemens@cnltx.de
% --------------------------------------------------------------------------
-% Copyright 2012--2020 Clemens Niederberger
+% Copyright 2012--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -30,8 +30,8 @@
\setcnltx{
package = snotez ,
authors = Clemens Niederberger ,
- email = contact@mychemistry.eu ,
- url = https://bitbucket.org/cgnieder/snotez ,
+ email = clemens@cnltx.de ,
+ url = https://github.com/cgnieder/snotez ,
info = sidenote support for \LaTeXe ,
add-cmds = {
newsnotezfloat ,
@@ -116,12 +116,6 @@
\section{License and Requirements}\label{sec:license}
\license
-\snotez\ needs and loads the packages
-\pkg{etoolbox}\sidenote(*-2){\textcite{pkg:etoolbox}},
-\pkg{pgfopts}\sidenote(*-1){\textcite{pkg:pgfopts}},
-\pkg{marginnote}\sidenote{\textcite{pkg:marginnote}} and
-\pkg{perpage}\sidenote{\textcite{pkg:perpage}}.
-
\section{Motivation}\label{sec:motivation}
This has just been an exercise on a lazy
afternoon\sidenote{\url{https://www.youtube.com/watch?v=OU6EyXcFBxA}}. Well,
@@ -293,14 +287,13 @@ Available options are these:
sidenote's format.}.
\keybool{perpage}\Default{false}
\emph{This option can only be set in the preamble}. Make sidenotes
- counter per page. It uses package \pkg{perpage}'s~\cite{pkg:perpage}
- \cs*{MakeSortedPerPage} macro for the task. Otherwise the macro
- \cs*{MakeSorted} is used. In the default setting sidenotes are counted
- per chapter. If you want sidenotes counted document-wise together with a
- class that defines a counter \code{chapter} then use for example the
- package \pkg{chngcntr}~\cite{pkg:chngcntr} and issue
- \cs*{counterwithout}\Marg{sidenote}\Marg{chapter} after loading \snotez.
- This documentation is an example for the use of the option.
+ counter per page. It uses package \pkg{zref-perpage}'s~\cite{bnd:zref}
+ for the task. This documentation is an example for the use of the option.
+ \keybool{perchapter}\Default{false}
+ \emph{This option can only be set in the preamble}.\sinceversion{0.6} If
+ your document class has defined a counter \code{chapter} and if you set
+ this to \code{true} the \code{sidenote} counter will be added to the reset
+ list of the \code{chapter} counter.
\keyval{note-mark-sep}{code}\Default{\cs*{space}}
The separator between sidenote mark and sidenote text in the sidenote.
\keyval{note-mark-format}{code}\Default{\cs*{@textsuperscript}\Marg{\cs*{normalfont}\#1}}
@@ -337,12 +330,12 @@ As a short example this is how the sidenotes for this document are formatted:
\section{Implementation}
-In the following code the lines 1--30 have been omitted. They only repeat the
+In the following code the lines 1--24 have been omitted. They only repeat the
license statement which has already been mentioned in section~\ref{sec:license}.
\implementation[
- linerange={31-1000},
- firstnumber=31,
+ linerange={25-344},
+ firstnumber=25,
basicstyle=\ttfamily\footnotesize
]{snotez.sty}
diff --git a/macros/latex/contrib/snotez/snotez.sty b/macros/latex/contrib/snotez/snotez.sty
index 0891f93dfe..f6e9b7a746 100644
--- a/macros/latex/contrib/snotez/snotez.sty
+++ b/macros/latex/contrib/snotez/snotez.sty
@@ -5,10 +5,10 @@
%
% --------------------------------------------------------------------------
% Clemens Niederberger
-% Web: https://bitbucket.org/cgnieder/enotez/
-% E-Mail: contact@mychemistry.eu
+% Web: https://github.com/cgnieder/snotez/
+% E-Mail: clemens@cnltx.de
% --------------------------------------------------------------------------
-% Copyright 2012--2020 Clemens Niederberger
+% Copyright 2012--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -22,17 +22,14 @@
%
% The Current Maintainer of this work is Clemens Niederberger.
% --------------------------------------------------------------------------
-\def\snotez@date{2020/12/14}
-\def\snotez@version{v0.5a}
+\def\snotez@date{2022/02/10}
+\def\snotez@version{v0.6}
\def\snotez@description{sidenote support for LaTeX 2e (CN)}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{snotez}[\snotez@date\space \snotez@version\space \snotez@description]
\RequirePackage{etoolbox,pgfopts,marginnote}
-\@ifpackageloaded{zref-abspage}
- {\RequirePackage{perpage}}
- {\AtEndPreamble{\RequirePackage{perpage}}}
% --------------------------------------------------------------------------
% package options:
@@ -40,6 +37,7 @@
\newbool{snotez@perpage}
\newbool{snotez@footnote}
\newbool{snotez@dblarg}
+\newbool{snotez@perchapter}
\newcommand*\snotez@note@mark@sep{\space}
\newcommand*\snotez@note@mark@format[1]{\@textsuperscript{\normalfont#1}}
@@ -59,6 +57,8 @@
\expandafter{\snotez@format#1} ,
% make sidenotes counted per page:
perpage/.is if = snotez@perpage ,
+ % count sidenotes per chapter:
+ perchapter/.is if = snotez@perchapter ,
% formatting of the note mark:
note-mark-sep/.code = \renewcommand*\snotez@note@mark@sep{#1} ,
note-mark-format/.code = \renewcommand*\snotez@note@mark@format[1]{#1} ,
@@ -82,14 +82,10 @@
% --------------------------------------------------------------------------
% the \sidenote command
-\ifbool{snotez@dblarg}{
- \newrobustcmd*\sidenote{%
- \snotez@sidenote@dblarg
- }
-}{
- \newrobustcmd*\sidenote{%
- \snotez@sidenote@nodblarg
- }
+\AtBeginDocument{%
+ \ifbool{snotez@dblarg}
+ {\newrobustcmd*\sidenote{\snotez@sidenote@dblarg}}
+ {\newrobustcmd*\sidenote{\snotez@sidenote@nodblarg}}%
}
% syntax:
@@ -160,9 +156,12 @@
\hbox{\snotez@text@mark@format{\@the@snotez@mark}}}%
}
-\ifltxcounter{chapter}
- {\newcounter{sidenote}[chapter]}
- {\newcounter{sidenote}}
+\newcounter{sidenote}
+\AtBeginDocument{%
+ \ifltxcounter{chapter}{%
+ \ifbool{snotez@perchapter}{\counterwithin*{sidenote}{chapter}}{}%
+ }{}
+}
% --------------------------------------------------------------------------
% the \sidenotemark command
@@ -170,16 +169,12 @@
% --------------------------------------------------------------------------
% the \sidenotetext command
-\ifbool{snotez@dblarg}{
- \newrobustcmd*\sidenotetext{%
- \snotez@sidenotetext@dblarg
- }
-}{
- \newrobustcmd*\sidenotetext{%
- \snotez@sidenotetext@nodblarg
- }
+\AtBeginDocument{
+ \ifbool{snotez@dblarg}
+ {\newrobustcmd*\sidenotetext{\snotez@sidenotetext@dblarg}}
+ {\newrobustcmd*\sidenotetext{\snotez@sidenotetext@nodblarg}}
}
-
+
% syntax:
% - \sidenotetext{text}
% - \sidenotetext[mark]{text}
@@ -263,18 +258,16 @@
\newsavebox\snotez@sidefloat@box
\newcommand*\snotez@sidefloat@format{\raggedright}
-\newenvironment{snotez@sidefloat}[2]
- {%
- \def\@captype{#1}%
- \begin{lrbox}{\snotez@sidefloat@box}%
- \minipage{\marginparwidth}%
- \snotez@sidefloat@format#2%
- }
- {
- \endminipage
- \end{lrbox}%
- \marginpar{\unhbox\snotez@sidefloat@box}%
- }
+\newenvironment{snotez@sidefloat}[2]{%
+ \def\@captype{#1}%
+ \begin{lrbox}{\snotez@sidefloat@box}%
+ \minipage{\marginparwidth}%
+ \snotez@sidefloat@format#2%
+}{%
+ \endminipage
+ \end{lrbox}%
+ \marginpar{\unhbox\snotez@sidefloat@box}%
+}
\newrobustcmd*\snotez@new@sidefloat[2]{%
\newenvironment{side#1}
@@ -311,13 +304,15 @@
{}
}
-\AtEndPreamble{%
- % if option `perpage=true' count notes per page:
- \ifbool{snotez@perpage}
- {\MakeSortedPerPage{sidenote}}
- {\MakeSorted{sidenote}}%
+\AddToHook{begindocument/before}{%
+ \ifbool{snotez@perpage}{%
+ \RequirePackage{zref-perpage}%
+ \zmakeperpage{sidenote}%
+ \@ifpackageloaded{hyperref}{\def\theHsidenote{\theHsection.\thesidenote}}{}
+ }{}%
}
+
\endinput
% --------------------------------------------------------------------------
@@ -338,3 +333,5 @@
- use cnltx-base
2020/01/12 v0.5 - remove dependency on `cnltx-base'
2020/12/14 v0.5a - fix issue #1
+2022/02/10 v0.6 - fix issue #2
+ - add option `perchapter'
diff --git a/macros/latex/contrib/snotez/snotez_en.pdf b/macros/latex/contrib/snotez/snotez_en.pdf
deleted file mode 100644
index 54b0b73423..0000000000
--- a/macros/latex/contrib/snotez/snotez_en.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/upmethodology/src/UPMVERSION.def b/macros/latex/contrib/upmethodology/src/UPMVERSION.def
index acfca6c74f..c944b0c40f 100644
--- a/macros/latex/contrib/upmethodology/src/UPMVERSION.def
+++ b/macros/latex/contrib/upmethodology/src/UPMVERSION.def
@@ -1 +1 @@
-\def\UPMVERSION{20210708}
+\def\UPMVERSION{20220210}
diff --git a/macros/latex/contrib/upmethodology/src/upmethodology-backpage.sty b/macros/latex/contrib/upmethodology/src/upmethodology-backpage.sty
index daa22683fd..af03a8cd52 100644
--- a/macros/latex/contrib/upmethodology/src/upmethodology-backpage.sty
+++ b/macros/latex/contrib/upmethodology/src/upmethodology-backpage.sty
@@ -1,6 +1,6 @@
% Back page for Unified Process Methodology
%
-% Copyright (c) 2009-2021 Stephane GALLAND <galland@arakhne.org>
+% Copyright (c) 2009-2022 Stephane GALLAND <galland@arakhne.org>
%
% This program is free library; you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License as
@@ -17,7 +17,7 @@
% write to the Free Software Foundation, Inc., 59 Temple Place - Suite
% 330, Boston, MA 02111-1307, USA.
-\global\edef\upm@package@bp@ver{2021/07/08}
+\global\edef\upm@package@bp@ver{2022/02/10}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{upmethodology-backpage}[\upm@package@bp@ver]
diff --git a/macros/latex/contrib/upmethodology/src/upmethodology-code.sty b/macros/latex/contrib/upmethodology/src/upmethodology-code.sty
index 9dfe0c8e68..4ff7d9b0ac 100644
--- a/macros/latex/contrib/upmethodology/src/upmethodology-code.sty
+++ b/macros/latex/contrib/upmethodology/src/upmethodology-code.sty
@@ -1,6 +1,6 @@
% Source Code Description for Unified Process Methodology
%
-% Copyright (c) 2006-2021 Stephane GALLAND <galland@arakhne.org>
+% Copyright (c) 2006-2022 Stephane GALLAND <galland@arakhne.org>
%
% This program is free library; you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License as
@@ -22,7 +22,7 @@
% 2009-10-30 Clean code.
%
-\global\edef\upm@package@code@ver{2021/07/08}
+\global\edef\upm@package@code@ver{2022/02/10}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{upmethodology-code}[\upm@package@code@ver]
diff --git a/macros/latex/contrib/upmethodology/src/upmethodology-document.cls b/macros/latex/contrib/upmethodology/src/upmethodology-document.cls
index 4572a98341..0bca5c1b2b 100644
--- a/macros/latex/contrib/upmethodology/src/upmethodology-document.cls
+++ b/macros/latex/contrib/upmethodology/src/upmethodology-document.cls
@@ -1,6 +1,6 @@
% Document class for Unified Process Methodology
%
-% Copyright (c) 2014-21 Stephane GALLAND <galland@arakhne.org>
+% Copyright (c) 2014-22 Stephane GALLAND <galland@arakhne.org>
%
% This program is free library; you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License as
@@ -17,7 +17,7 @@
% write to the Free Software Foundation, Inc., 59 Temple Place - Suite
% 330, Boston, MA 02111-1307, USA.
-\global\edef\upm@package@docclazz@ver{2021/07/08}
+\global\edef\upm@package@docclazz@ver{2022/02/10}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{upmethodology-document}[\upm@package@docclazz@ver]
diff --git a/macros/latex/contrib/upmethodology/src/upmethodology-document.sty b/macros/latex/contrib/upmethodology/src/upmethodology-document.sty
index fcffc37a41..b51d4021c2 100644
--- a/macros/latex/contrib/upmethodology/src/upmethodology-document.sty
+++ b/macros/latex/contrib/upmethodology/src/upmethodology-document.sty
@@ -1,6 +1,6 @@
% Package for Unified Process Methodology's documents
%
-% Copyright (c) 2006-2021 Stephane GALLAND <galland@arakhne.org>
+% Copyright (c) 2006-2022 Stephane GALLAND <galland@arakhne.org>
%
% This program is free library; you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License as
@@ -17,7 +17,7 @@
% write to the Free Software Foundation, Inc., 59 Temple Place - Suite
% 330, Boston, MA 02111-1307, USA.
-\global\edef\upm@package@doc@ver{2021/07/08}
+\global\edef\upm@package@doc@ver{2022/02/10}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{upmethodology-document}[\upm@package@doc@ver]
@@ -57,7 +57,7 @@
\def\upm@document@lang@french{%
\gdef\upm@lang@@{\message{**** upmethodology-document is using French language ****}}%
\gdef\upmcurrentlang{french}%
- \gdef\upmcurrentlangforbabel{frenchb}%
+ \gdef\upmcurrentlangforbabel{main=french}%
\gdef\upm@lang@project{Projet}%
\gdef\upm@lang@document{Document}%
\gdef\upm@lang@docref{R\'ef\'erence}%
diff --git a/macros/latex/contrib/upmethodology/src/upmethodology-extension.sty b/macros/latex/contrib/upmethodology/src/upmethodology-extension.sty
index 2aa559ab7e..0ef86e696e 100644
--- a/macros/latex/contrib/upmethodology/src/upmethodology-extension.sty
+++ b/macros/latex/contrib/upmethodology/src/upmethodology-extension.sty
@@ -1,6 +1,6 @@
% Package for Unified Process Methodology's extensions
%
-% Copyright (c) 2006-2021 Stephane GALLAND <galland@arakhne.org>
+% Copyright (c) 2006-2022 Stephane GALLAND <galland@arakhne.org>
%
% This program is free library; you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License as
@@ -18,7 +18,7 @@
% 330, Boston, MA 02111-1307, USA.
%
-\global\edef\upm@package@ext@ver{2021/07/08}
+\global\edef\upm@package@ext@ver{2022/02/10}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{upmethodology-extension}[\upm@package@ext@ver]
diff --git a/macros/latex/contrib/upmethodology/src/upmethodology-fmt.sty b/macros/latex/contrib/upmethodology/src/upmethodology-fmt.sty
index bb28d2ce6c..5952c2b916 100644
--- a/macros/latex/contrib/upmethodology/src/upmethodology-fmt.sty
+++ b/macros/latex/contrib/upmethodology/src/upmethodology-fmt.sty
@@ -1,6 +1,6 @@
% Layout and Pagraph Format for Unified Process Methodology
%
-% Copyright (c) 2006-2009, 2012-2021 Stephane GALLAND <galland@arakhne.org>
+% Copyright (c) 2006-2009, 2012-2022 Stephane GALLAND <galland@arakhne.org>
%
% This program is free library; you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License as
@@ -17,7 +17,7 @@
% write to the Free Software Foundation, Inc., 59 Temple Place - Suite
% 330, Boston, MA 02111-1307, USA.
-\global\edef\upm@package@fmt@ver{2021/07/08}
+\global\edef\upm@package@fmt@ver{2022/02/10}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{upmethodology-fmt}[\upm@package@fmt@ver]
@@ -413,6 +413,9 @@
%title of a table
\def\upm@fmt@table@title#1{\color{fronttableheader} \cellcolor{backtableheader} {\bfseries #1}}
%title of columns
+\newcommand{\tabularheaderstyle}[1]{%
+ \mbox{}{\cellcolor{backtableheader} {\color{fronttableheader}\itshape\ignorespaces#1}}%
+}%
\def\upm@fmt@table@column@title#1{\hfil{\color{fronttableheader} \cellcolor{backtableheader} {\itshape#1}}\hfil}
% Utility functions for mtabular
@@ -447,7 +450,7 @@
\ifnum0<\value{upm@fmt@mtabular@columnnumber}%
\let\upm@fmt@mtabular@column@continue\upm@fmt@mtabular@column@next%
\else%
- \\ \hline \let\upm@fmt@mtabular@column@continue\relax%
+ \\ \hline \let\upm@fmt@mtabular@column@continue\ignorespaces%
\fi%
\upm@fmt@mtabular@column@continue%
}
@@ -457,7 +460,7 @@
\ifnum0<\value{upm@fmt@mtabular@columnnumber}%
\let\upm@fmt@mtabular@column@continue\upm@fmt@mtabular@column@next%
\else%
- \\ \hline \let\upm@fmt@mtabular@column@continue\relax%
+ \\ \hline \let\upm@fmt@mtabular@column@continue\ignorespaces%
\fi%
\upm@fmt@mtabular@column@continue%
}
diff --git a/macros/latex/contrib/upmethodology/src/upmethodology-frontpage.sty b/macros/latex/contrib/upmethodology/src/upmethodology-frontpage.sty
index d5175e1bc8..e30db5e2c3 100644
--- a/macros/latex/contrib/upmethodology/src/upmethodology-frontpage.sty
+++ b/macros/latex/contrib/upmethodology/src/upmethodology-frontpage.sty
@@ -1,6 +1,6 @@
% Front page for Unified Process Methodology
%
-% Copyright (c) 2006-2021 Stephane GALLAND <galland@arakhne.org>
+% Copyright (c) 2006-2022 Stephane GALLAND <galland@arakhne.org>
%
% This program is free library; you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License as
@@ -18,7 +18,7 @@
% 330, Boston, MA 02111-1307, USA.
%
-\global\edef\upm@package@fp@ver{2021/07/08}
+\global\edef\upm@package@fp@ver{2022/02/10}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{upmethodology-frontpage}[\upm@package@fp@ver]
diff --git a/macros/latex/contrib/upmethodology/src/upmethodology-p-common.sty b/macros/latex/contrib/upmethodology/src/upmethodology-p-common.sty
index 32d870d3c4..d452ccb8cd 100644
--- a/macros/latex/contrib/upmethodology/src/upmethodology-p-common.sty
+++ b/macros/latex/contrib/upmethodology/src/upmethodology-p-common.sty
@@ -1,4 +1,4 @@
-% Copyright (c) 2009-21 Stephane GALLAND <galland@arakhne.org>
+% Copyright (c) 2009-22 Stephane GALLAND <galland@arakhne.org>
%
% This program is free library; you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License as
@@ -16,7 +16,7 @@
% 330, Boston, MA 02111-1307, USA.
%
-\global\edef\upm@package@private@doctype@ver{2021/07/08}
+\global\edef\upm@package@private@doctype@ver{2022/02/10}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{upmethodology-p-common}[\upm@package@private@doctype@ver]
diff --git a/macros/latex/contrib/upmethodology/src/upmethodology-spec.sty b/macros/latex/contrib/upmethodology/src/upmethodology-spec.sty
index a0297667a5..4f5763101c 100644
--- a/macros/latex/contrib/upmethodology/src/upmethodology-spec.sty
+++ b/macros/latex/contrib/upmethodology/src/upmethodology-spec.sty
@@ -1,6 +1,6 @@
% Specification Description for Unified Process Methodology
%
-% Copyright (c) 2006-2021 Stephane GALLAND <galland@arakhne.org>
+% Copyright (c) 2006-2022 Stephane GALLAND <galland@arakhne.org>
%
% This program is free library; you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License as
@@ -23,7 +23,7 @@
% 2007-03-19 Add localization.
%
-\global\edef\upm@package@spec@ver{2021/07/08}
+\global\edef\upm@package@spec@ver{2022/02/10}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{upmethodology-spec}[\upm@package@spec@ver]
diff --git a/macros/latex/contrib/upmethodology/src/upmethodology-task.sty b/macros/latex/contrib/upmethodology/src/upmethodology-task.sty
index a7499fe8dc..c39e347dfb 100644
--- a/macros/latex/contrib/upmethodology/src/upmethodology-task.sty
+++ b/macros/latex/contrib/upmethodology/src/upmethodology-task.sty
@@ -1,6 +1,6 @@
% Task management for Unified Process Methodology
%
-% Copyright (c) 2006-2021 Stephane GALLAND <galland@arakhne.org>
+% Copyright (c) 2006-2022 Stephane GALLAND <galland@arakhne.org>
%
% This program is free library; you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License as
@@ -23,7 +23,7 @@
% 2007-03-19 Add localization.
%
-\global\edef\upm@package@task@ver{2021/07/08}
+\global\edef\upm@package@task@ver{2022/02/10}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{upmethodology-task}[\upm@package@task@ver]
diff --git a/macros/latex/contrib/upmethodology/src/upmethodology-version.sty b/macros/latex/contrib/upmethodology/src/upmethodology-version.sty
index 0b2c0b90c1..6032a8cbcc 100644
--- a/macros/latex/contrib/upmethodology/src/upmethodology-version.sty
+++ b/macros/latex/contrib/upmethodology/src/upmethodology-version.sty
@@ -1,7 +1,7 @@
% Version management for Unified Process Methodology
%
% Copyright (c) 2006-2007 Stephane GALLAND <galland@arakhne.org>
-% Copyright (c) 2013-2021 Stephane GALLAND <galland@arakhne.org>
+% Copyright (c) 2013-2022 Stephane GALLAND <galland@arakhne.org>
%
% This program is free library; you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License as
@@ -19,7 +19,7 @@
% 330, Boston, MA 02111-1307, USA.
%
-\global\edef\upm@package@version@ver{2021/07/08}
+\global\edef\upm@package@version@ver{2022/02/10}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{upmethodology-version}[\upm@package@version@ver]
diff --git a/macros/latex/contrib/verifiche/README.md b/macros/latex/contrib/verifiche/README.md
index 75f142ca02..1e2ef9317f 100644
--- a/macros/latex/contrib/verifiche/README.md
+++ b/macros/latex/contrib/verifiche/README.md
@@ -30,6 +30,6 @@ Run `pdflatex verifiche-example.tex` to see some examples.
### To do
-- swhich into english and if "babel" is implemented use the selected language.
+- swhich into english.
- remove the marginpar command and use only a box.
diff --git a/macros/latex/contrib/verifiche/verifiche-example.pdf b/macros/latex/contrib/verifiche/verifiche-example.pdf
index 82611e6104..8200bf65e7 100644
--- a/macros/latex/contrib/verifiche/verifiche-example.pdf
+++ b/macros/latex/contrib/verifiche/verifiche-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/verifiche/verifiche-example.tex b/macros/latex/contrib/verifiche/verifiche-example.tex
index ea2446ad97..95a86ed779 100644
--- a/macros/latex/contrib/verifiche/verifiche-example.tex
+++ b/macros/latex/contrib/verifiche/verifiche-example.tex
@@ -1,5 +1,6 @@
% compile 2 times
\documentclass[a4paper]{article}
+\usepackage[italian]{babel}
\usepackage[solutions%show/hide the solutions
]{verifiche}
\usepackage[margin=3cm]{geometry}
@@ -18,6 +19,8 @@
\pagestyle{verifiche}
+Nel presente documento è possibile vedere i risultati grafici delle varie tipologie di quesiti e gli altri strumenti forniti dal pacchetto \textsf{verifiche}.
+
\begin{esercizio}
Risolvere il seguente problema.
@@ -174,12 +177,13 @@ A differenza dei numeri assoluti, la differenza tra due \finderror{numeri razio
\end{esercizio}
-\vfill
\begin{center}
-\begin{tabular}{l|c|c|c}
+%\begin{tabular}{| l | c | c | c |}
+\begin{tabular}{ | l | >{\centering}p{2cm} | >{\centering}p{2cm} | >{\centering\arraybackslash}p{2cm} | }
+\hline
Esercizio & \ref{es:ferropiuma} & \ref{es:grav} & \ref{es:meccanica} \\\hline
Punteggio totale & \ref{ptes@2} & \ref{ptes@4} & \ref{ptes@7}\\\hline
-Punteggio & & & \\
+Punteggio & & & \\\hline
\end{tabular}
\end{center}
diff --git a/macros/latex/contrib/verifiche/verifiche.dtx b/macros/latex/contrib/verifiche/verifiche.dtx
index dc5a4a9e7e..a17c536143 100644
--- a/macros/latex/contrib/verifiche/verifiche.dtx
+++ b/macros/latex/contrib/verifiche/verifiche.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (LPPL) 2020 by Francesco Raccanello
+% Copyright (LPPL) 2020 - 2022 by Francesco Raccanello
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -16,7 +16,7 @@
%
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}
-%<package>\ProvidesPackage{verifiche} [2021/08/18 v4.2 .dtx verifiche file]
+%<package>\ProvidesPackage{verifiche} [2022/02/10 v4.3 .dtx verifiche file]
%<*driver>
\documentclass{ltxdoc}
\usepackage[utf8]{inputenc}
@@ -27,8 +27,8 @@
language=[LaTeX]TeX,
morekeywords={\setlength, \institute, \asyear, \testtype, \instruction, \duration, \printheading,
\institutefont, \asyearfont, \testtypefont, \instructiondelimiter, \headerfont, \instrunctionfont,
- \durationfont, \eserciziolabel, \solutionfont, \diffsymb, \closedquestionitem,
- \inlinesol, \completetext, \truefalse, \openquestion, \linedopenquestion, \squaredopenquestion, \headercandidatenamelabel, \checked, \finderror, \textandimage, \partialpt, \ptprefix, \ptlabel, \partialptlabel, \partialptdelimiters, \ptdelimiters},
+ \durationfont, \exerciselabel, \solutionfont, \solutionlabel, \diffsymb, \closedquestionitem,
+ \inlinesol, \completetext, \truefalse, \openquestion, \linedopenquestion, \squaredopenquestion, \headercandidatenamelabel, \checked, \finderror, \textandimage, \partialpt, \ptprefix, \ptlabel, \partialptlabel, \partialptdelimiters, \ptdelimiters, \partialptprefix},
keywordstyle=\color{blue},
escapeinside={*@}{@*},
inputencoding=utf8,
@@ -66,7 +66,7 @@
%</driver>
% \fi
%
-% \CheckSum{752}
+% \CheckSum{801}
% \changes{v1.0}{2020/06/14}{Initial version.}
% \changes{v2.0}{2020/06/26}{Better performance in exercise environment.}
% \changes{v2.1}{2020/06/30}{Introduced closedquestionitem to control |item| symbol.}
@@ -75,6 +75,7 @@
% \changes{v4.0}{2021/02/15}{Introduce comando to change the aspect of the exercise score.}
% \changes{v4.1}{2021/02/16}{Introduce ptrulerlength to change the aspect of the exercise score.}
% \changes{v4.2}{2021/08/18}{Solved truefalse issue in solutionsmode. Add noexercisept global option to hide the score of each exercise.}
+% \changes{v4.3}{2022/02/10}{Move |parindent{0pt}| inside the environment.}
% \GetFileInfo{verifiche.sty}
% \DoNotIndex{\newcommand,\newenvironment,\def,\begin,\end,\par}
% \DoNotIndex{\DeclareOption,\ExecuteOptions,\ProcessOptions,\RequirePackage}
@@ -707,7 +708,7 @@ dell'esercizio somministrato
%<*example>
% \fi
\example
-{\openquestion[type=squared]{
+{\openquestion[type=squares]{
Prova del testo della soluzione
della domanda aperta
}}
@@ -850,7 +851,7 @@ dell'esercizio somministrato
%</example>
%\fi
%
-%\DescribeMacro{\headercandidatenamelabel}Quando viene composta l'intestazione principale nella prima pagina, compare una riga in cui il candidato può scrivere il proprio nome e cognome. L'etichetta di questa parte controllata dal comando |\headercandidatenamelabel|, che può essere opportunamente cambiata tramite il comando:
+%\DescribeMacro{\headercandidatenamelabel}\DescribeMacro{\headerdatelabel}Quando viene composta l'intestazione principale nella prima pagina, compare una riga in cui il candidato può scrivere il proprio nome e cognome, la data e la classe. L'etichetta della prima voce è determinata dal comando |\headercandidatenamelabel|, che può essere opportunamente cambiata tramite il comando:
%\iffalse
%<*example>
%\fi
@@ -860,7 +861,7 @@ dell'esercizio somministrato
%\iffalse
%</example>
%\fi
-%Allo stesso modo è possibile modificare la descrizione della classe \DescribeMacro{\headerclasslabel} e della data\DescribeMacro{\headerdatelabel}.
+%Allo stesso modo è possibile modificare la descrizione della classe \DescribeMacro{\headerclasslabel}tramite la redefinizione del comando |\headerclasslabel| e della data\DescribeMacro{\headerdatelabel} tramite comando |\headerdatelabel|.
% Tutte queste tre voci prevedono, per ciascuna, una riga vuota ove scrivere l'informazione richiesta.\DescribeMacro{\candidatenamerulerlength}\DescribeMacro{\classrulerlength}\DescribeMacro{\daterulerlength} Le lunghezze delle tre righe possono essere modificate impostando le lunghezze desiderate
%\iffalse
%<*example>
@@ -874,12 +875,12 @@ dell'esercizio somministrato
%Attraverso questi comandi è possibile anche rimuovere una (o più) delle tre voci. Se ad esempio non si vuole visualizzare la classe d'appartenenza del candidato, sarà sufficiente ridefinire gli opportuni comandi nel seguente modo: |\renewcommand{\headerclasslabel}{}|, così da non visualizzare alcuna scritta, e |\setlength{\classrulerlength}{0pt}| per rimuovere la riga associata.
%
%\subsection*{Ambiente \texttt{esercizio}}
-%\DescribeMacro{\eserciziolabel}Gli esercizi vengono inseriti anteponendo al loro testo la dicitura ‘‘Quesito’’ seguito (eventualmente) da un numero. Per cambiare questa dicitura, a livello globale, ovvero per ogni esercizio, è sufficiente ridefinire il comando |\eserciziolabel|.
+%\DescribeMacro{\exerciselabel}Gli esercizi vengono inseriti anteponendo al loro testo la dicitura ‘‘Quesito’’ seguito (eventualmente) da un numero. Per cambiare questa dicitura, a livello globale, ovvero per ogni esercizio, è sufficiente ridefinire il comando |\exerciselabel|.
%\iffalse
%<*example>
%\fi
\begin{lstlisting}
-\renewcommand{\eserciziolabel}*@\marg{Preambolo dell'esercizio}@*
+\renewcommand{\exerciselabel}*@\marg{Preambolo dell'esercizio}@*
\end{lstlisting}
%\iffalse
%</example>
@@ -947,6 +948,18 @@ dell'esercizio somministrato
%</example>
%\fi
%
+%\subsection*{Ambiente \texttt{soluzione}}
+% Per quel che riguarda l'ambiente |soluzione| è possibile cambiare il nome dell'ambente ridefinendo il comando |\solutionlabel|\DescribeMacro{\solutionlabel}.
+%\iffalse
+%<*example>
+%\fi
+\begin{lstlisting}
+\renewcommand{\solutionlabel}*@\marg{Preambolo della soluzione}@*
+\end{lstlisting}
+%\iffalse
+%</example>
+%\fi
+%
%
% \StopEventually{\clearpage\PrintChanges \clearpage\PrintIndex}
% \section{Implementation}
@@ -984,10 +997,6 @@ dell'esercizio somministrato
separate-uncertainty
}
% \end{macrocode}
-%Finally the indentation is turned off.
-% \begin{macrocode}
-\setlength\parindent{0pt}
-% \end{macrocode}
%
%\subsection{newif}
%Some conditionals are defined and initiated:
@@ -1057,6 +1066,41 @@ dell'esercizio somministrato
\setlength{\ptrulerlength}{1cm}
% \end{macrocode}
%
+%\subsection{Labels}
+%Some labels are define as a variable in order to leave the user the possibility of customization the predefine texts.
+% \begin{macrocode}
+\newcommand{\@durationlabeldefault}{Time:}%
+\newcommand{\@asyearlabeldefault}{School year}%
+\newcommand{\headercandidatenamelabel}{Student name}%
+\newcommand{\headerclasslabel}{Class}%
+\newcommand{\headerdatelabel}{Date}%
+\newcommand{\exerciselabel}{Exercise}%
+\newcommand{\solutionlabel}{Solution}%
+% \end{macrocode}
+%If the package \textsf{babel} or \textsf{polyglossia} is loaded with the italian language specify, than the predefine labels are redefine:
+% \begin{macrocode}
+\@ifpackageloaded{babel}{%
+ \addto\captionsitalian{%
+ \renewcommand{\@durationlabeldefault}{Tempo della prova:}%
+ \renewcommand{\@asyearlabeldefault}{Anno scolastico}%
+ \renewcommand{\headercandidatenamelabel}{Nome e Cognome}%
+ \renewcommand{\headerclasslabel}{Classe}%
+ \renewcommand{\headerdatelabel}{Data}%
+ \renewcommand{\exerciselabel}{Quesito}%
+ \renewcommand{\solutionlabel}{Soluzione}%
+ }}{%
+\@ifpackageloaded{polyglossia}{%
+ \addto\captionsitalian{%
+ \renewcommand{\@durationlabeldefault}{Tempo della prova:}%
+ \renewcommand{\@asyearlabeldefault}{Anno scolastico}%
+ \renewcommand{\headercandidatenamelabel}{Nome e Cognome}%
+ \renewcommand{\headerclasslabel}{Classe}%
+ \renewcommand{\headerdatelabel}{Data}%
+ \renewcommand{\exerciselabel}{Quesito}%
+ \renewcommand{\solutionlabel}{Soluzione}%
+ }}{}
+ }%
+% \end{macrocode}
%\subsection{Macro and environment}
%\iffalse
%%macro and environment
@@ -1068,13 +1112,13 @@ dell'esercizio somministrato
% \begin{macrocode}
\newcommand{\institute}[1]{%
\gdef\@institute{#1}}
-\newcommand{\duration}[2][Tempo della prova:]{%
+\newcommand{\duration}[2][\@durationlabeldefault]{%
\gdef\@durationpreamble{#1}\gdef\@duration{#2}}
\newcommand{\testtype}[1]{%
\gdef\@testtype{#1}}
\newcommand{\instruction}[1]{%
\gdef\@instruction{#1}}
-\newcommand{\asyear}[2][Anno scolastico]{%
+\newcommand{\asyear}[2][\@asyearlabeldefault]{%
\gdef\@asyearpreamble{#1}\gdef\@asyear{#2}}
% \end{macrocode}
%
@@ -1112,10 +1156,7 @@ dell'esercizio somministrato
\hspace*{\fill}\@durationpreamble\space\bfseries #1\hspace*{\fill}}
% \end{macrocode}
% \begin{macrocode}
-\newcommand{\headercandidatenamelabel}{Nome e Cognome}
-\newcommand{\headerclasslabel}{Classe}
-\newcommand{\headerdatelabel}{Data}
-\newcommand{\@header@candidatename}{\headercandidatenamelabel\space\underline{\hspace{\candidatenamerulerlength}}}
+\newcommand{\@header@candidatename}{\noindent\headercandidatenamelabel\space\underline{\hspace{\candidatenamerulerlength}}}
\newcommand{\@header@class}{\headerclasslabel\space\underline{\hspace{\classrulerlength}}}
\newcommand{\@header@date}{\headerdatelabel\space\underline{\hspace{\daterulerlength}}}
\newcommand{\@header}{\@header@candidatename\hfill\@header@class\hfill\@header@date}
@@ -1258,7 +1299,7 @@ dell'esercizio somministrato
%%ambiente esercizio
%\fi
% \begin{macrocode}
-\define@key{esercizio}{label}[Quesito]{%
+\define@key{esercizio}{label}[\exerciselabel]{%
\def\tempeserciziolabel{#1}}%
\define@key{esercizio}{diff}[none]{
\def\diffstar{\hfill\foreach \i in {1,..., #1}{\diffsymb}}%
@@ -1282,7 +1323,7 @@ dell'esercizio somministrato
% \begin{macrocode}
\newcommand{\exercisetitle}{%
\ifdefined\tempeserciziolabel\tempeserciziolabel%
- \else \eserciziolabel\fi%
+ \else \exerciselabel\fi%
}
% \end{macrocode}
%
@@ -1326,7 +1367,8 @@ dell'esercizio somministrato
{\noindent\bfseries\exercisetitle\ifexercisesnumbered\space\theexercisenumber\fi}%
\ifshowmarginexercise\exercisemargin\fi%
\par% newline after label
- \nobreak\noindent\ignorespaces#2%body of the environment
+ \setlength\parindent{0pt}%no parindent
+ \nobreak\ignorespaces#2%body of the environment
}{%
\par%
\ignorespacesafterend%
@@ -1345,7 +1387,8 @@ dell'esercizio somministrato
\par\addvspace{\baselineskip}{\noindent\bfseries\exercisetitle}%
\ifshowmarginexercise\exercisemargin\fi%
\par% newline after label
- \nobreak\noindent\ignorespaces#2% body of the environment
+ \setlength\parindent{0pt}%no parindent
+ \nobreak\ignorespaces#2% body of the environment
}{%
\par%
\ignorespacesafterend
@@ -1371,8 +1414,9 @@ dell'esercizio somministrato
\NewDocumentEnvironment{soluzione}{+b}{%
\ifsol%
\par\addvspace{\baselineskip}%
- {\noindent\bfseries Soluzione}%
+ {\noindent\bfseries \solutionlabel}%
\par\nobreak\noindent\ignorespaces%
+ \setlength\parindent{0pt}%no parindent
\solutionfont #1%
\fi%
}{%
diff --git a/macros/latex/contrib/verifiche/verifiche.ins b/macros/latex/contrib/verifiche/verifiche.ins
index de63841f73..9d72f914f2 100644
--- a/macros/latex/contrib/verifiche/verifiche.ins
+++ b/macros/latex/contrib/verifiche/verifiche.ins
@@ -1,5 +1,5 @@
%%
-%% Copyright (C) 2020 i by Francesco Raccanello
+%% Copyright (C) 2020 - 2022 i by Francesco Raccanello
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -16,7 +16,7 @@
\usedir{tex/latex/verifiche}
\preamble
This is a generated file.
-Copyright (C) 2021 by Francesco Raccanello
+Copyright (C) 2020 - 2022 by Francesco Raccanello
This file 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
diff --git a/macros/latex/contrib/verifiche/verifiche.pdf b/macros/latex/contrib/verifiche/verifiche.pdf
index 0f399271db..78fa0d6757 100644
--- a/macros/latex/contrib/verifiche/verifiche.pdf
+++ b/macros/latex/contrib/verifiche/verifiche.pdf
Binary files differ