summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/generic/expkv-cs/README.md2
-rw-r--r--macros/generic/expkv-cs/expkv-cs.dtx290
-rw-r--r--macros/generic/expkv-cs/expkv-cs.pdfbin346046 -> 363784 bytes
-rw-r--r--macros/generic/expkv-def/README.md2
-rw-r--r--macros/generic/expkv-def/expkv-def.dtx149
-rw-r--r--macros/generic/expkv-def/expkv-def.pdfbin390122 -> 406256 bytes
-rw-r--r--macros/generic/expkv/README.md2
-rw-r--r--macros/generic/expkv/expkv.dtx559
-rw-r--r--macros/generic/expkv/expkv.pdfbin444584 -> 481077 bytes
-rw-r--r--macros/latex/contrib/huawei/README.md9
-rw-r--r--macros/latex/contrib/huawei/huawei.cls12
-rw-r--r--macros/latex/contrib/huawei/huawei.pdfbin362961 -> 363871 bytes
-rw-r--r--macros/latex/contrib/huawei/huawei.tex34
-rw-r--r--macros/latex/contrib/huawei/images/huawei-cover.pdfbin0 -> 253724 bytes
-rw-r--r--macros/latex/contrib/huawei/samples/huawei-cfp.tex53
-rw-r--r--macros/latex/contrib/huawei/samples/huawei-charter.tex67
-rw-r--r--macros/latex/contrib/lwarp/README.txt2
-rw-r--r--macros/latex/contrib/lwarp/lwarp.dtx990
-rw-r--r--macros/latex/contrib/lwarp/lwarp.ins6
-rw-r--r--macros/latex/contrib/lwarp/lwarp.pdfbin3184136 -> 3202256 bytes
-rwxr-xr-xmacros/latex/contrib/lwarp/lwarpmk.lua2
-rw-r--r--macros/latex/contrib/ninecolors/ninecolors.pdfbin32345 -> 32344 bytes
-rw-r--r--macros/latex/contrib/ninecolors/ninecolors.sty3
-rw-r--r--macros/latex/contrib/ninecolors/ninecolors.tex2
-rw-r--r--macros/latex/contrib/pbalance/pbalance.dtx10
-rw-r--r--macros/latex/contrib/pbalance/pbalance.pdfbin242707 -> 242951 bytes
-rw-r--r--macros/latex/contrib/siunitx/CHANGELOG.md15
-rw-r--r--macros/latex/contrib/siunitx/siunitx-code.pdfbin1441845 -> 1443594 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx-compound.dtx67
-rw-r--r--macros/latex/contrib/siunitx/siunitx-emulation.dtx3
-rw-r--r--macros/latex/contrib/siunitx/siunitx-number.dtx6
-rw-r--r--macros/latex/contrib/siunitx/siunitx-print.dtx75
-rw-r--r--macros/latex/contrib/siunitx/siunitx-table.dtx4
-rw-r--r--macros/latex/contrib/siunitx/siunitx.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.pdfbin605308 -> 598400 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx.tex2
-rw-r--r--macros/latex/contrib/springer/sr-vorl/README2
-rw-r--r--macros/latex/contrib/springer/sr-vorl/sr-vorl.dtx538
-rw-r--r--macros/latex/contrib/springer/sr-vorl/sr-vorl.pdfbin446965 -> 451934 bytes
-rw-r--r--macros/latex/contrib/suftesi/suftesi.dtx2868
-rw-r--r--macros/latex/contrib/suftesi/suftesi.pdfbin841881 -> 837570 bytes
41 files changed, 3666 insertions, 2110 deletions
diff --git a/macros/generic/expkv-cs/README.md b/macros/generic/expkv-cs/README.md
index 5b56601a5d..a9df8b801f 100644
--- a/macros/generic/expkv-cs/README.md
+++ b/macros/generic/expkv-cs/README.md
@@ -1,7 +1,7 @@
-------------------------------------------------------------------------------
# expkv-cs -- define expandable key=val macros using expkv
-Version 2021-04-12 v0.8
+Version 2021-05-24 v0.9
Released under the LaTeX Project Public License v1.3c or later
See http://www.latex-project.org/lppl.txt
diff --git a/macros/generic/expkv-cs/expkv-cs.dtx b/macros/generic/expkv-cs/expkv-cs.dtx
index 5847a4980b..38a70349d7 100644
--- a/macros/generic/expkv-cs/expkv-cs.dtx
+++ b/macros/generic/expkv-cs/expkv-cs.dtx
@@ -64,6 +64,19 @@ and the derived files expkv-cs.pdf
\RequirePackage[oldstylenums,nott]{kpfonts}
\input{glyphtounicode}
\pdfgentounicode=1
+\RequirePackage{tcolorbox}
+\newtcolorbox{exresult}[2][]
+ {colback=expkvgrey!10!white,colframe=expkvgrey,fontupper=\small,width={#2},#1}
+\newtcbox\exres[1][]
+ {
+ colback=expkvgrey!10!white
+ ,colframe=expkvgrey
+ ,size=small
+ ,nobeforeafter
+ ,tcbox raise base
+ ,fontupper=\small
+ ,#1
+ }
\RequirePackage{listings}
\RequirePackage{booktabs}
\RequirePackage{array}
@@ -73,26 +86,127 @@ and the derived files expkv-cs.pdf
\RequirePackage{caption}
\RequirePackage{microtype}
\RequirePackage{accsupp}
+\lstdefinelanguage{expkvd}[primitive]{TeX}
+ {
+ ,moretexcs=[4]^^A e-TeX
+ {
+ expanded,
+ numexpr,
+ protected,
+ }
+ ,moretexcs=[5]^^A plain/LaTeX
+ {
+ approx,
+ begin,
+ empty,
+ item,
+ LaTeX,
+ makeatletter,makeatother,multicolumn,
+ newcommand,newdimen,
+ RequirePackage,
+ rule,
+ TeX,
+ textit,texttt,
+ usepackage,
+ }
+ ,moretexcs=[6]^^A used packages
+ {
+ ^^A xfp
+ fpeval,
+ ^^A keyval
+ setkeys,
+ ^^A yax
+ defactiveparameter,storevalue,setparameterlist
+ }
+ ,moretexcs=[2]^^A expkv-cs macros
+ {
+ ekvcSplit,ekvcSplitAndForward,ekvcSplitAndUse,
+ ekvcHash,ekvcHashAndForward,ekvcHashAndUse,
+ ekvcValue,ekvcValueFast,ekvcValueSplit,ekvcValueSplitFast,
+ ekvcSecondaryKeys,
+ ekvcFlagNew,
+ ekvcFlagHeight,
+ ekvcFlagRaise,
+ ekvcFlagSetTrue,ekvcFlagSetFalse,
+ ekvcFlagIf,ekvcFlagIfRaised,
+ ekvcFlagReset,
+ ekvcFlagGetHeight,ekvcFlagGetHeights
+ }
+ ,moretexcs=[3]^^A expkv-pkg macros
+ {
+ ^^A expkv
+ ekvdef,ekvdefNoVal,^^A
+ ekvlet,ekvletNoVal,ekvletkv,ekvletkvNoVal,^^A
+ ekvdefunknown,ekvdefunknownNoVal,^^A
+ ekvredirectunknown,ekvredirectunknownNoVal,^^A
+ ekvset,ekvsetSneaked,^^A
+ ekvsetdef,ekvsetSneakeddef,ekvsetdefSneaked,^^A
+ ekvparse,^^A
+ ekvVersion,ekvDate,^^A
+ ekvifdefined,ekvifdefinedNoVal,ekvifdefinedset,^^A
+ ekvbreak,ekvbreakPreSneak,ekvbreakPostSneak,^^A
+ ekvsneak,ekvsneakPre,^^A
+ ekvchangeset,^^A
+ ekvoptarg,ekvoptargTF,^^A
+ ekverr,
+ ^^A expkv-def
+ ekvdefinekeys
+ }
+ }
+\colorlet{codeparam}{cyan!65!black}
+\def\mylstwd{.55em}
\lstset
{
+ ,language=expkvd
,flexiblecolumns=false
- ,basewidth=.53em
+ ,basewidth=\mylstwd
,gobble=2
,basicstyle=\fontfamily{jkp}\itshape
- ,morekeywords=^^A
- {^^A
- \ekvcSplit,\ekvcSplitAndForward,\ekvcSplitAndUse
- \ekvcHash,\ekvcHashAndForward,\ekvcHashAndUse
- \ekvcValue,\ekvcValueFast,
- \ekvcSecondaryKeys
- }
- ,morecomment=[l]\%
+ ,texcsstyle=*[1]{\bfseries\color{expkvgrey}} ^^A primitives
+ ,texcsstyle=*[2]{\bfseries\color{expkvred}} ^^A expkv
+ ,texcsstyle=*[3]{\color{expkvred}} ^^A expkv-pkg
+ ,texcsstyle=*[4]{\bfseries\color{expkvgrey}} ^^A e-TeX
+ ,texcsstyle=*[5]{\bfseries\color{expkvgrey}} ^^A plain/LaTeX macros
+ ,texcsstyle=*[6]{} ^^A macros of other packages
,commentstyle=\color[gray]{0.4}
- ,literate={\{}{{\CodeSymbol\{}}{1}
- {\}}{{\CodeSymbol\}}}{1}
+ ,literate=
+ {\{} {{\CodeUpBf\{}}{1}
+ {\}} {{\CodeUpBf\}}}{1}
+ {$} {{\CodeUpBf\$}}{1}
+ {[} {{\CodeUp[}}{1}
+ {]} {{\CodeUp]}}{1}
+ {(} {{\CodeUp(}}{1}
+ {)} {{\CodeUp)}}{1}
+ {*} {{$*$}}{1}
+ {1} {{\CodeUp{1}}}{1}
+ {2} {{\CodeUp{2}}}{1}
+ {3} {{\CodeUp{3}}}{1}
+ {4} {{\CodeUp{4}}}{1}
+ {5} {{\CodeUp{5}}}{1}
+ {6} {{\CodeUp{6}}}{1}
+ {7} {{\CodeUp{7}}}{1}
+ {8} {{\CodeUp{8}}}{1}
+ {9} {{\CodeUp{9}}}{1}
+ {0} {{\CodeUp{0}}}{1}
+ {##} {{\CodeColored{codeparam}{1}{\#}}}{1}
+ {##1}{{\CodeColored{codeparam}{2}{\#1}}}{2}
+ {##2}{{\CodeColored{codeparam}{2}{\#2}}}{2}
+ {##3}{{\CodeColored{codeparam}{2}{\#3}}}{2}
+ {##4}{{\CodeColored{codeparam}{2}{\#4}}}{2}
+ {##5}{{\CodeColored{codeparam}{2}{\#5}}}{2}
+ {##6}{{\CodeColored{codeparam}{2}{\#6}}}{2}
+ {##7}{{\CodeColored{codeparam}{2}{\#7}}}{2}
+ {##8}{{\CodeColored{codeparam}{2}{\#8}}}{2}
+ {##9}{{\CodeColored{codeparam}{2}{\#9}}}{2}
+ {<key>}{{$\langle$}key{$\rangle$}}{5}
+ {<set>}{{$\langle$}set{$\rangle$}}{5}
+ {<set1>}{{$\langle$}set1{$\rangle$}}{6}
+ {<set2>}{{$\langle$}set2{$\rangle$}}{6}
^^A,literate=*{<key>}{\key}{4}{<set>}{\set}{4}
}
-\newcommand*\CodeSymbol[1]{\kern-1pt\textbf{#1}\kern1pt}
+\newcommand*\CodeColored[3]{\textcolor{#1}{\makebox[\dimexpr\mylstwd*#2]{#3}}}
+\newcommand*\CodeUpBf[1]{\makebox[\mylstwd]{\textup{\textbf{#1}}}}
+\newcommand*\CodeUp[1]{\makebox[\mylstwd]{\textup{#1}}}
\RequirePackage{randtext}
\let\metaORIG\meta
\protected\def\meta #1{\texttt{\metaORIG{#1}}}
@@ -705,7 +819,7 @@ and the derived files expkv-cs.pdf
% alias pos = possessive,
% nmeta me =
% {
-% name=Jonathan P. Spratte,
+% name=Jonathan,
% age=a young,
% nationality=Germany,
% hobby=\TeX\ coding,
@@ -738,15 +852,54 @@ and the derived files expkv-cs.pdf
% As one might see, the |lady| key could actually have been an |nmeta| key as
% well, as all that is done with the argument is using it as a \kv\ list.
%
-% Using \pkg{xparse} and forwarding arguments one can easily define \kv\ macros
-% with actual optional and mandatory arguments as well. A small nonsense example
-% (which should perhaps use |\ekvcSplitAndForward| instead of
-% |\ekvcHashAndForward| since it only uses four keys and one other argument --
-% and isn't expandable since it uses a \env{tabular} environment):
+% The result of all the first two usages would be:
+% \begin{exresult}{\linewidth}
+% \ekvcSplit\character
+% {
+% name=John Doe,
+% age=any,
+% nationality=the Universe,
+% hobby=to exist,
+% type=Mister,
+% pronoun=He,
+% possessive=his,
+% }
+% {#1 is a #5 from #3. #6 is of #2 age and #7 hobby is #4.\par}
+% \ekvcSecondaryKeys\character
+% {
+% alias pro = pronoun,
+% alias pos = possessive,
+% nmeta me =
+% {
+% name=Jonathan,
+% age=a young,
+% nationality=Germany,
+% hobby=\TeX\ coding,
+% },
+% meta lady =
+% {type=Lady, pronoun=She, possessive=her, name=Jane Doe, #1},
+% nmeta paulo =
+% {
+% name=Paulo,
+% type=duck,
+% age=a young,
+% nationality=Brazil,
+% hobby=to quack,
+% }
+% }
+% \character{}
+% \character{me}
+% \end{exresult}
+%
+% Using \pkg{xparse} or \expkv's \cs{ekvoptarg} or \cs{ekvoptargTF} and
+% forwarding arguments one can easily define \kv\ macros with actual optional
+% and mandatory arguments as well. A small nonsense example (which should
+% perhaps use |\ekvcSplitAndForward| instead of |\ekvcHashAndForward| since it
+% only uses four keys and one other argument -- and isn't expandable since it
+% uses a \env{tabular} environment):
% \begin{lstlisting}
-% \usepackage{xparse}
% \makeatletter
-% \NewExpandableDocumentCommand\nonsense{O{} m}{\nonsense@a{#1}{#2}}
+% \newcommand*\nonsense{\ekvoptarg\nonsense@a{}}
% \ekvcHashAndForward\nonsense@a\nonsense@b
% {
% keyA = A,
@@ -762,17 +915,44 @@ and the derived files expkv-cs.pdf
% & C & \ekvcValue{keyC}{#1} \\
% & D & \ekvcValue{keyD}{#1} \\
% \multicolumn{2}{l}{mandatory} & #2 \\
-% \end{tabular}\par
+% \end{tabular}%
% }
% \makeatother
% \end{lstlisting}
-% And then we would be able to do some nonsense:
+% And then we would be able to do some nonsense
% \begin{lstlisting}
% \nonsense{}
% \nonsense[keyA=hihi]{haha}
% \nonsense[keyA=hihi, keyB=A]{hehe}
% \nonsense[keyC=huhu, keyA=hihi, keyB=A]{haha}
% \end{lstlisting}
+% resulting in
+% \begin{exresult}{\linewidth}
+% \makeatletter
+% \newcommand*\nonsense{\ekvoptarg\nonsense@a{}}
+% \ekvcHashAndForward\nonsense@a\nonsense@b
+% {
+% keyA = A,
+% keyB = B,
+% keyC = c,
+% keyD = d,
+% }
+% \newcommand*\nonsense@b[2]
+% {%
+% \begin{tabular}{lll}
+% key & A & \ekvcValue{keyA}{#1} \\
+% & B & \ekvcValue{keyB}{#1} \\
+% & C & \ekvcValue{keyC}{#1} \\
+% & D & \ekvcValue{keyD}{#1} \\
+% \multicolumn{2}{l}{mandatory} & #2 \\
+% \end{tabular}%
+% }
+% \makeatother
+% \nonsense{}
+% \nonsense[keyA=hihi]{haha}
+% \nonsense[keyA=hihi, keyB=A]{hehe}
+% \nonsense[keyC=huhu, keyA=hihi, keyB=A]{haha}
+% \end{exresult}
%
%
% \subsection{Speed Considerations}\label{sec:speed}
@@ -945,8 +1125,8 @@ and the derived files expkv-cs.pdf
% \begin{macro}{\ekvcVersion,\ekvcDate}
% We're on our first input, so lets store the version and date in a macro.
% \begin{macrocode}
-\def\ekvcVersion{0.8}
-\def\ekvcDate{2021-04-12}
+\def\ekvcVersion{0.9}
+\def\ekvcDate{2021-05-24}
% \end{macrocode}
% \end{macro}
%
@@ -993,8 +1173,26 @@ and the derived files expkv-cs.pdf
% Some macros will have to be defined long. These two will be let to |\long|
% when this should be the case.
% \begin{macrocode}
-\def\ekvc@long{}
-\def\ekvc@any@long{}
+\let\ekvc@long\ekv@empty
+\let\ekvc@any@long\ekv@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[internal]{\ekvc@ifdefined}
+% We want to test whether a macro is already defined. This test checks for a
+% defined macro that isn't |\relax|.
+% \begin{macrocode}
+\long\def\ekvc@ifdefined#1%
+ {%
+ \ifdefined#1%
+ \ifx\relax#1%
+ \ekv@fi@gobble
+ \fi
+ \@firstofone
+ \ekv@fi@firstoftwo
+ \fi
+ \@secondoftwo
+ }
% \end{macrocode}
% \end{macro}
%
@@ -1009,7 +1207,8 @@ and the derived files expkv-cs.pdf
% a little magic trick to get the macro parameter |#1| for the macro
% definition this is used in, even though we're calling |\unexpanded|. We do
% that by splitting the expanded |\ekvset| at some marks and place |##1| in
-% between.
+% between. At this spot we also add |\ekv@alignsafe| and |\ekv@endalignsafe|
+% to ensure that macros created with \expkvc\ are alignment safe.
% \begin{macrocode}
\def\ekvc@ekvset@pre@expander#1%
{%
@@ -1021,7 +1220,9 @@ and the derived files expkv-cs.pdf
}
\def\ekvc@ekvset@pre@expander@b#1\ekvc@stop#2\ekvc@stop
{%
+ \unexpanded\expandafter{\ekv@alignsafe}%
\unexpanded{#1}##1\unexpanded{#2}%
+ \unexpanded\expandafter{\ekv@endalignsafe}%
}
% \end{macrocode}
% \end{macro}
@@ -1035,7 +1236,7 @@ and the derived files expkv-cs.pdf
\protected\long\def\ekvcSplitAndUse#1#2%
{%
\let\ekvc@helpers@needed\@firstoftwo
- \ekv@ifdefined{\expandafter\@gobble\string#1}%
+ \ekvc@ifdefined#1%
{\ekvc@err@already@defined#1}%
{\ekvcSplitAndUse@#1{}{#2}}%
}
@@ -1083,7 +1284,7 @@ and the derived files expkv-cs.pdf
\protected\long\def\ekvcSplitAndForward#1#2#3%
{%
\let\ekvc@helpers@needed\@firstoftwo
- \ekv@ifdefined{\expandafter\@gobble\string#1}%
+ \ekvc@ifdefined#1%
{\ekvc@err@already@defined#1}%
{\ekvcSplitAndUse@#1{{#2}}{#3}}%
}
@@ -1098,7 +1299,7 @@ and the derived files expkv-cs.pdf
\protected\long\def\ekvcSplit#1#2#3%
{%
\let\ekvc@helpers@needed\@secondoftwo
- \ekv@ifdefined{\expandafter\@gobble\string#1}%
+ \ekvc@ifdefined#1%
{\ekvc@err@already@defined#1}%
{%
\expandafter
@@ -1154,8 +1355,8 @@ and the derived files expkv-cs.pdf
\protected\long\def\ekvc@SetupSplitKeys
{%
\ekvc@keycount=0
- \def\ekvc@any@long{}%
- \def\ekvc@initials{}%
+ \let\ekvc@any@long\ekv@empty
+ \let\ekvc@initials\ekv@empty
\ekvparse\ekvc@err@value@required\ekvc@SetupSplitKeys@a
}
% \end{macrocode}
@@ -1165,7 +1366,7 @@ and the derived files expkv-cs.pdf
\protected\def\ekvc@SetupSplitKeys@a#1%
{%
\advance\ekvc@keycount1
- \def\ekvc@long{}%
+ \let\ekvc@long\ekv@empty
\ekvc@ifspace{#1}%
{\ekvc@SetupSplitKeys@b#1\ekvc@stop}%
{\ekvc@SetupSplitKeys@c{#1}}%
@@ -1355,7 +1556,7 @@ and the derived files expkv-cs.pdf
\protected\long\def\ekvcHashAndUse#1#2%
{%
\let\ekvc@helpers@needed\@firstoftwo
- \ekv@ifdefined{\expandafter\@gobble\string#1}%
+ \ekvc@ifdefined#1%
{\ekvc@err@already@defined#1}%
{\ekvcHashAndUse@#1{}{#2}}%
}
@@ -1398,7 +1599,7 @@ and the derived files expkv-cs.pdf
\protected\long\def\ekvcHashAndForward#1#2#3%
{%
\let\ekvc@helpers@needed\@firstoftwo
- \ekv@ifdefined{\expandafter\@gobble\string#1}%
+ \ekvc@ifdefined#1%
{\ekvc@err@already@defined#1}%
{\ekvcHashAndUse@#1{{#2}}{#3}}%
}
@@ -1413,7 +1614,7 @@ and the derived files expkv-cs.pdf
\protected\long\def\ekvcHash#1#2#3%
{%
\let\ekvc@helpers@needed\@secondoftwo
- \ekv@ifdefined{\expandafter\@gobble\string#1}%
+ \ekvc@ifdefined#1%
{\ekvc@err@already@defined#1}%
{%
\expandafter
@@ -1441,13 +1642,13 @@ and the derived files expkv-cs.pdf
% \begin{macrocode}
\protected\long\def\ekvc@SetupHashKeys#1%
{%
- \def\ekvc@any@long{}%
- \def\ekvc@initials{}%
+ \let\ekvc@any@long\ekv@empty
+ \let\ekvc@initials\ekv@empty
\ekvparse\ekvc@err@value@required\ekvc@SetupHashKeys@a{#1}%
}
\protected\def\ekvc@SetupHashKeys@a#1%
{%
- \def\ekvc@long{}%
+ \let\ekvc@long\ekv@empty
\ekvc@ifspace{#1}%
{\ekvc@SetupHashKeys@b#1\ekvc@stop}%
{\ekvc@SetupHashKeys@c{#1}}%
@@ -1687,7 +1888,7 @@ and the derived files expkv-cs.pdf
}
\protected\def\ekvcSecondaryKeys@a#1%
{%
- \def\ekvc@long{}%
+ \let\ekvc@long\ekv@empty
\ekvc@ifspace{#1}%
{\ekvcSecondaryKeys@b#1\ekvc@stop}%
{\ekvc@err@missing@type{#1}\@gobble}%
@@ -2137,15 +2338,10 @@ and the derived files expkv-cs.pdf
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\ekvc@err,\ekvc@err@}
+% \begin{macro}[internal]{\ekvc@err}
% We need a way to throw error messages expandably in some contexts.
% \begin{macrocode}
-\def\ekvc@err#1%
- {%
- \long\def\ekvc@err##1{\expandafter\ekv@err@\@firstofone{#1##1.}\ekv@stop}%
- }
-\begingroup\expandafter\endgroup
-\expandafter\ekvc@err\csname ! expkv-cs Error:\endcsname
+\ekv@exparg{\long\def\ekvc@err#1}{\ekverr{expkv-cs}{#1}}
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/generic/expkv-cs/expkv-cs.pdf b/macros/generic/expkv-cs/expkv-cs.pdf
index f498bcb298..50dd5124bf 100644
--- a/macros/generic/expkv-cs/expkv-cs.pdf
+++ b/macros/generic/expkv-cs/expkv-cs.pdf
Binary files differ
diff --git a/macros/generic/expkv-def/README.md b/macros/generic/expkv-def/README.md
index f2c9e9cfac..34a6e05db4 100644
--- a/macros/generic/expkv-def/README.md
+++ b/macros/generic/expkv-def/README.md
@@ -1,7 +1,7 @@
-------------------------------------------------------------------------------
# expkv-def -- a key-defining frontend for expkv
-Version 2021-04-10 v0.8
+Version 2021-05-24 v0.8a
Released under the LaTeX Project Public License v1.3c or later
See http://www.latex-project.org/lppl.txt
diff --git a/macros/generic/expkv-def/expkv-def.dtx b/macros/generic/expkv-def/expkv-def.dtx
index eaec17b22c..b69c591a00 100644
--- a/macros/generic/expkv-def/expkv-def.dtx
+++ b/macros/generic/expkv-def/expkv-def.dtx
@@ -64,6 +64,19 @@ and the derived files expkv-def.pdf
\RequirePackage[oldstylenums,nott]{kpfonts}
\input{glyphtounicode}
\pdfgentounicode=1
+\RequirePackage{tcolorbox}
+\newtcolorbox{exresult}[2][]
+ {colback=expkvgrey!10!white,colframe=expkvgrey,fontupper=\small,width={#2},#1}
+\newtcbox\exres[1][]
+ {
+ colback=expkvgrey!10!white
+ ,colframe=expkvgrey
+ ,size=small
+ ,nobeforeafter
+ ,tcbox raise base
+ ,fontupper=\small
+ ,#1
+ }
\RequirePackage{listings}
\RequirePackage{booktabs}
\RequirePackage{array}
@@ -73,23 +86,117 @@ and the derived files expkv-def.pdf
\RequirePackage{caption}
\RequirePackage{microtype}
\RequirePackage{accsupp}
+\lstdefinelanguage{expkvd}[primitive]{TeX}
+ {
+ ,moretexcs=[4]^^A e-TeX
+ {
+ expanded,
+ numexpr,
+ protected,
+ }
+ ,moretexcs=[5]^^A plain/LaTeX
+ {
+ approx,
+ begin,
+ empty,
+ item,
+ LaTeX,
+ makeatletter,makeatother,
+ newcommand,newdimen,
+ RequirePackage,
+ rule,
+ TeX,
+ textit,texttt,
+ usepackage,
+ }
+ ,moretexcs=[6]^^A used packages
+ {
+ ^^A xfp
+ fpeval,
+ ^^A keyval
+ setkeys,
+ ^^A yax
+ defactiveparameter,storevalue,setparameterlist
+ }
+ ,moretexcs=[2]^^A expkv-def macros
+ {
+ ekvdefinekeys
+ }
+ ,moretexcs=[3]^^A expkv-pkg macros
+ {
+ ^^A expkv
+ ekvdef,ekvdefNoVal,^^A
+ ekvlet,ekvletNoVal,ekvletkv,ekvletkvNoVal,^^A
+ ekvdefunknown,ekvdefunknownNoVal,^^A
+ ekvredirectunknown,ekvredirectunknownNoVal,^^A
+ ekvset,ekvsetSneaked,^^A
+ ekvsetdef,ekvsetSneakeddef,ekvsetdefSneaked,^^A
+ ekvparse,^^A
+ ekvVersion,ekvDate,^^A
+ ekvifdefined,ekvifdefinedNoVal,ekvifdefinedset,^^A
+ ekvbreak,ekvbreakPreSneak,ekvbreakPostSneak,^^A
+ ekvsneak,ekvsneakPre,^^A
+ ekvchangeset,^^A
+ ekvoptarg,ekvoptargTF,^^A
+ ekverr,
+ ^^A expkv-cs
+ ekvcSecondaryKeys,ekvcSplitAndForward,
+ }
+ }
+\colorlet{codeparam}{cyan!65!black}
+\def\mylstwd{.55em}
\lstset
{
+ ,language=expkvd
,flexiblecolumns=false
- ,basewidth=.53em
+ ,basewidth=\mylstwd
,gobble=2
,basicstyle=\fontfamily{jkp}\itshape
- ,morekeywords=^^A
- {^^A
- \ekvdefinekeys
- }
- ,morecomment=[l]\%
+ ,texcsstyle=*[1]{\bfseries\color{expkvgrey}} ^^A primitives
+ ,texcsstyle=*[2]{\bfseries\color{expkvred}} ^^A expkv
+ ,texcsstyle=*[3]{\color{expkvred}} ^^A expkv-pkg
+ ,texcsstyle=*[4]{\bfseries\color{expkvgrey}} ^^A e-TeX
+ ,texcsstyle=*[5]{\bfseries\color{expkvgrey}} ^^A plain/LaTeX macros
+ ,texcsstyle=*[6]{} ^^A macros of other packages
,commentstyle=\color[gray]{0.4}
- ,literate={\{}{{\CodeSymbol\{}}{1}
- {\}}{{\CodeSymbol\}}}{1}
+ ,literate=
+ {\{} {{\CodeUpBf\{}}{1}
+ {\}} {{\CodeUpBf\}}}{1}
+ {$} {{\CodeUpBf\$}}{1}
+ {[} {{\CodeUp[}}{1}
+ {]} {{\CodeUp]}}{1}
+ {(} {{\CodeUp(}}{1}
+ {)} {{\CodeUp)}}{1}
+ {*} {{$*$}}{1}
+ {1} {{\CodeUp{1}}}{1}
+ {2} {{\CodeUp{2}}}{1}
+ {3} {{\CodeUp{3}}}{1}
+ {4} {{\CodeUp{4}}}{1}
+ {5} {{\CodeUp{5}}}{1}
+ {6} {{\CodeUp{6}}}{1}
+ {7} {{\CodeUp{7}}}{1}
+ {8} {{\CodeUp{8}}}{1}
+ {9} {{\CodeUp{9}}}{1}
+ {0} {{\CodeUp{0}}}{1}
+ {##} {{\CodeColored{codeparam}{1}{\#}}}{1}
+ {##1}{{\CodeColored{codeparam}{2}{\#1}}}{2}
+ {##2}{{\CodeColored{codeparam}{2}{\#2}}}{2}
+ {##3}{{\CodeColored{codeparam}{2}{\#3}}}{2}
+ {##4}{{\CodeColored{codeparam}{2}{\#4}}}{2}
+ {##5}{{\CodeColored{codeparam}{2}{\#5}}}{2}
+ {##6}{{\CodeColored{codeparam}{2}{\#6}}}{2}
+ {##7}{{\CodeColored{codeparam}{2}{\#7}}}{2}
+ {##8}{{\CodeColored{codeparam}{2}{\#8}}}{2}
+ {##9}{{\CodeColored{codeparam}{2}{\#9}}}{2}
+ {<key>}{{$\langle$}key{$\rangle$}}{5}
+ {<set>}{{$\langle$}set{$\rangle$}}{5}
+ {<set1>}{{$\langle$}set1{$\rangle$}}{6}
+ {<set2>}{{$\langle$}set2{$\rangle$}}{6}
^^A,literate=*{<key>}{\key}{4}{<set>}{\set}{4}
}
-\newcommand*\CodeSymbol[1]{\textbf{#1}}
+\newcommand*\CodeColored[3]{\textcolor{#1}{\makebox[\dimexpr\mylstwd*#2]{#3}}}
+\newcommand*\CodeUpBf[1]{\makebox[\mylstwd]{\textup{\textbf{#1}}}}
+\newcommand*\CodeUp[1]{\makebox[\mylstwd]{\textup{#1}}}
\RequirePackage{randtext}
\let\metaORIG\meta
\protected\def\meta #1{\texttt{\metaORIG{#1}}}
@@ -511,7 +618,7 @@ and the derived files expkv-def.pdf
% \begin{syntax}
% toks \key\ = \meta{cs} \prefixes2212
% \end{syntax}
-% The \meta{cs} should be a single control sequence, such as |\foo|.
+% The \meta{cs} should be a single control sequence, such as |\foo|.
% Store \val\ inside of a toks-register. The |g| variants use |\global|, the
% |app| variants append \val\ to the contents of that register. If \meta{cs}
% is not yet defined it will be initialised with |\newtoks|.
@@ -730,7 +837,7 @@ and the derived files expkv-def.pdf
% in Italics. If a person has no hobbies the description item will be silently
% left out. The result of the above code looks like this:
%
-% \begingroup
+% \begin{exresult}{\linewidth}
% \ekvdefinekeys{ex}
% {
% data name = \Pname
@@ -751,7 +858,7 @@ and the derived files expkv-def.pdf
% \Person{name=Jonathan P. Spratte, age=young, hobby=\TeX\ coding}
% \Person{name=Some User, age=unknown, hobby=Reading Documentation}
% \Person{name=Anybody, age=any}
-% \endgroup
+% \end{exresult}
%
% \subsection{License}
%
@@ -824,8 +931,8 @@ and the derived files expkv-def.pdf
% \begin{macro}{\ekvdVersion,\ekvdDate}
% We're on our first input, so lets store the version and date in a macro.
% \begin{macrocode}
-\def\ekvdVersion{0.8}
-\def\ekvdDate{2021-04-10}
+\def\ekvdVersion{0.8a}
+\def\ekvdDate{2021-05-24}
% \end{macrocode}
% \end{macro}
%
@@ -2075,7 +2182,7 @@ and the derived files expkv-def.pdf
}%
}
\protected\def\ekvd@err@not@new
- {\ekvd@errm{The key for `\ekvd@cur' is already defined}}
+ {\ekvd@errm{The key for `\ekvd@cur' is already defined}}
\protected\long\def\ekvd@err@misused@unknown
{\ekvd@errm{Misuse of the unknown type found while processing `\ekvd@cur'}}
% \end{macrocode}
@@ -2111,7 +2218,7 @@ and the derived files expkv-def.pdf
{%
\ekv@ifdefined{\ekvd@unknown@choice@name{#1}{#2}}%
{\csname\ekvd@unknown@choice@name{#1}{#2}\endcsname{#3}}%
- {\ekvd@err{invalid choice `#3' (`#2', set `#1')}}%
+ {\ekvd@err{invalid choice `#3' for `#2' in set `#1'}}%
}
}
% \end{macrocode}
@@ -2119,15 +2226,9 @@ and the derived files expkv-def.pdf
%
% \begin{macro}[internal]{\ekvd@err}
% The expandable error messages use |\ekvd@err|, which is just like |\ekv@err|
-% from \expkv\ or the way \pkg{expl3} throws expandable error messages. It uses
-% an undefined control sequence to start the error message.
+% from \expkv. It uses a runaway argument to start the error message.
% \begin{macrocode}
-\def\ekvd@err#1%
- {%
- \long\def\ekvd@err##1{\expandafter\ekv@err@\@firstofone{#1##1.}\ekv@stop}%
- }
-\begingroup\expandafter\endgroup
-\expandafter\ekvd@err\csname ! expkv-def Error:\endcsname
+\ekv@exparg{\long\def\ekvd@err#1}{\ekverr{expkv-def}{#1}}
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/generic/expkv-def/expkv-def.pdf b/macros/generic/expkv-def/expkv-def.pdf
index b483ade6c1..8acb39cdb7 100644
--- a/macros/generic/expkv-def/expkv-def.pdf
+++ b/macros/generic/expkv-def/expkv-def.pdf
Binary files differ
diff --git a/macros/generic/expkv/README.md b/macros/generic/expkv/README.md
index 512cd829ca..adc545fd80 100644
--- a/macros/generic/expkv/README.md
+++ b/macros/generic/expkv/README.md
@@ -1,7 +1,7 @@
-------------------------------------------------------------------------------
# expkv -- an expandable key=val implementation
-Version 2021-04-11 v1.7a
+Version 2021-05-24 v1.8
Released under the LaTeX Project Public License v1.3c or later
See http://www.latex-project.org/lppl.txt
diff --git a/macros/generic/expkv/expkv.dtx b/macros/generic/expkv/expkv.dtx
index 553065f32b..37a67fc781 100644
--- a/macros/generic/expkv/expkv.dtx
+++ b/macros/generic/expkv/expkv.dtx
@@ -76,34 +76,130 @@ and the derived files expkv.pdf
\RequirePackage{microtype}
\RequirePackage{accsupp}
\RequirePackage{enumitem}
+\RequirePackage{tcolorbox}
+\newtcolorbox{exresult}[2][]
+ {colback=expkvgrey!10!white,colframe=expkvgrey,fontupper=\small,width={#2},#1}
+\newtcbox\exres[1][]
+ {
+ colback=expkvgrey!10!white
+ ,colframe=expkvgrey
+ ,size=small
+ ,nobeforeafter
+ ,tcbox raise base
+ ,fontupper=\small
+ ,#1
+ }
+\def\mylstwd{.55em}
+\lstdefinelanguage{expkv}[primitive]{TeX}
+ {
+ ,moretexcs=[4]^^A e-TeX
+ {
+ expanded,
+ numexpr,
+ protected,
+ }
+ ,moretexcs=[5]^^A plain/LaTeX
+ {
+ approx,
+ begin,
+ empty,
+ item,
+ LaTeX,
+ makeatletter,makeatother,
+ newcommand,newdimen,
+ RequirePackage,
+ rule,
+ TeX,
+ textit,texttt,
+ usepackage,
+ }
+ ,moretexcs=[6]^^A used packages
+ {
+ ^^A xfp
+ fpeval,
+ ^^A keyval
+ setkeys,
+ ^^A yax
+ defactiveparameter,storevalue,setparameterlist
+ }
+ ,moretexcs=[2]^^A expkv macros
+ {
+ ekvdef,ekvdefNoVal,^^A
+ ekvlet,ekvletNoVal,ekvletkv,ekvletkvNoVal,^^A
+ ekvdefunknown,ekvdefunknownNoVal,^^A
+ ekvredirectunknown,ekvredirectunknownNoVal,^^A
+ ekvset,ekvsetSneaked,^^A
+ ekvsetdef,ekvsetSneakeddef,ekvsetdefSneaked,^^A
+ ekvparse,^^A
+ ekvVersion,ekvDate,^^A
+ ekvifdefined,ekvifdefinedNoVal,ekvifdefinedset,^^A
+ ekvbreak,ekvbreakPreSneak,ekvbreakPostSneak,^^A
+ ekvsneak,ekvsneakPre,^^A
+ ekvchangeset,^^A
+ ekvoptarg,ekvoptargTF,^^A
+ ekverr
+ }
+ ,moretexcs=[3]^^A expkv-pkg macros
+ {
+ ^^A expkv-cs
+ ekvcSecondaryKeys,ekvcSplitAndForward,
+ ^^A expkv-def
+ ekvdefinekeys
+ }
+ }
+\colorlet{codeparam}{cyan!65!black}
\lstset
{
+ ,language=expkv
,flexiblecolumns=false
- ,basewidth=.53em
+ ,basewidth=\mylstwd
,gobble=2
,basicstyle=\fontfamily{jkp}\itshape
- ,morekeywords=^^A
- {^^A
- \ekvdef,\ekvdefNoVal,^^A
- \ekvlet,\ekvletNoVal,\ekvletkv,\ekvletkvNoVal,^^A
- \ekvdefunknown,\ekvdefunknownNoVal,^^A
- \ekvredirectunknown,\ekvredirectunknownNoVal,^^A
- \ekvset,\ekvsetSneaked,^^A
- \ekvsetdef,\ekvsetSneakeddef,\ekvsetdefSneaked,^^A
- \ekvparse,^^A
- \ekvVersion,\ekvDate,^^A
- \ekvifdefined,\ekvifdefinedNoVal,\ekvifdefinedset,^^A
- \ekvbreak,\ekvbreakPreSneak,\ekvbreakPostSneak,^^A
- \ekvsneak,\ekvsneakPre,^^A
- \ekvchangeset
- }
- ,morecomment=[l]\%
+ ,texcsstyle=*[1]{\bfseries\color{expkvgrey}} ^^A primitives
+ ,texcsstyle=*[2]{\bfseries\color{expkvred}} ^^A expkv
+ ,texcsstyle=*[3]{\color{expkvred}} ^^A expkv-pkg
+ ,texcsstyle=*[4]{\bfseries\color{expkvgrey}} ^^A e-TeX
+ ,texcsstyle=*[5]{\bfseries\color{expkvgrey}} ^^A plain/LaTeX macros
+ ,texcsstyle=*[6]{} ^^A macros of other packages
,commentstyle=\color[gray]{0.4}
- ,literate={\{}{{\CodeSymbol\{}}{1}
- {\}}{{\CodeSymbol\}}}{1}
+ ,literate=
+ {\{} {{\CodeUpBf\{}}{1}
+ {\}} {{\CodeUpBf\}}}{1}
+ {$} {{\CodeUpBf\$}}{1}
+ {[} {{\CodeUp[}}{1}
+ {]} {{\CodeUp]}}{1}
+ {(} {{\CodeUp(}}{1}
+ {)} {{\CodeUp)}}{1}
+ {*} {{$*$}}{1}
+ {1} {{\CodeUp{1}}}{1}
+ {2} {{\CodeUp{2}}}{1}
+ {3} {{\CodeUp{3}}}{1}
+ {4} {{\CodeUp{4}}}{1}
+ {5} {{\CodeUp{5}}}{1}
+ {6} {{\CodeUp{6}}}{1}
+ {7} {{\CodeUp{7}}}{1}
+ {8} {{\CodeUp{8}}}{1}
+ {9} {{\CodeUp{9}}}{1}
+ {0} {{\CodeUp{0}}}{1}
+ {##} {{\CodeColored{codeparam}{1}{\#}}}{1}
+ {##1}{{\CodeColored{codeparam}{2}{\#1}}}{2}
+ {##2}{{\CodeColored{codeparam}{2}{\#2}}}{2}
+ {##3}{{\CodeColored{codeparam}{2}{\#3}}}{2}
+ {##4}{{\CodeColored{codeparam}{2}{\#4}}}{2}
+ {##5}{{\CodeColored{codeparam}{2}{\#5}}}{2}
+ {##6}{{\CodeColored{codeparam}{2}{\#6}}}{2}
+ {##7}{{\CodeColored{codeparam}{2}{\#7}}}{2}
+ {##8}{{\CodeColored{codeparam}{2}{\#8}}}{2}
+ {##9}{{\CodeColored{codeparam}{2}{\#9}}}{2}
+ {<key>}{{$\langle$}key{$\rangle$}}{5}
+ {<set>}{{$\langle$}set{$\rangle$}}{5}
+ {<set1>}{{$\langle$}set1{$\rangle$}}{6}
+ {<set2>}{{$\langle$}set2{$\rangle$}}{6}
^^A,literate=*{<key>}{\key}{4}{<set>}{\set}{4}
}
-\newcommand*\CodeSymbol[1]{\textbf{#1}}
+\newcommand*\CodeColored[3]{\textcolor{#1}{\makebox[\dimexpr\mylstwd*#2]{#3}}}
+\newcommand*\CodeUpBf[1]{\makebox[\mylstwd]{\textup{\textbf{#1}}}}
+\newcommand*\CodeUp[1]{\makebox[\mylstwd]{\textup{#1}}}
\RequirePackage{randtext}
\let\metaORIG\meta
\protected\def\meta #1{\texttt{\metaORIG{#1}}}
@@ -474,7 +570,13 @@ and the derived files expkv.pdf
% executed. If \kv\ contains more than a single unhidden equal sign, it will
% be split at the first one and the others are considered part of the value.
% |\ekvset| should be nestable.
+%
+% |\ekvset| is currently \emph{not} alignment safe.\footnotemark\ As a result,
+% key names and values that contain an |&| must be wrapped in braces when
+% |\ekvset| is used inside an alignment (like \LaTeXe's |tabular| environment)
+% or you have to create a wrapper that ensures an alignment safe context.
% \end{function}
+% \footnotetext{This might change in the future, I've not decided yet.}
% \example Parse |key=arg, key| in the set |foo|:
% \begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
% \ekvset{foo}{key=arg, key}
@@ -564,11 +666,15 @@ and the derived files expkv.pdf
% only keys as an argument to \meta{code1}, and those which are a \kv\ pair
% to \meta{code2} as two arguments. It is fully expandable as well and returns
% each element of the parsed list in |\unexpanded|, which has no effect
-% outside of an |\expanded| or |\edef| context\footnotemark.
-% If you need control over the necessary steps of expansion you
-% can use |\expanded| around it. You can use multiple tokens in \meta{code1}
-% and \meta{code2} or just a single control sequence name. In both cases the
-% found \key\ and \val\ are provided as a brace group following them.
+% outside of an |\expanded| or |\edef| context.
+% Also |\ekvparse| expands in exactly two steps of expansion.
+% You can use multiple tokens in \meta{code1} and \meta{code2} or just a
+% single control sequence name. In both cases the found \key\ and \val\ are
+% provided as a brace group following them.
+%
+% |\ekvparse| is alignment safe, meaning that you don't have to take any
+% precautions if it is used inside an alignment context (like \LaTeXe's
+% |tabular| environment) and any key or value can contain an |&|.
%
% |\ekvbreak|, |\ekvsneak|, and |\ekvchangeset| and their relatives don't work
% in |\ekvparse|. It is analogue to \pkg{expl3}'s |\keyval_parse:NNn|, but
@@ -576,14 +682,6 @@ and the derived files expkv.pdf
% multiple equal signs per \kv\ pair and on empty \key\ names in a \kv\ pair,
% both of which |\ekvparse| doesn't deal with.
% \end{function}
-% \footnotetext
-% {^^A
-% This is a change in behaviour, previously (v0.3 and before) \cs{ekvparse}
-% would expand in exactly two steps. This isn't always necessary, but makes
-% the parsing considerably slower. If this is necessary for your application
-% you can put an \cs[no-index]{expanded} around it and will still be faster
-% since you need only a single \cs[no-index]{expandafter} this way.^^A
-% }
% \example
% \begin{lstlisting}
% \ekvparse{\handlekey{S}}{\handlekeyval{S}}{foo = bar, key, baz={zzz}}
@@ -599,11 +697,11 @@ and the derived files expkv.pdf
% another macro, you should use |\expanded| as only then the input stream will
% contain the output above:
% \begin{lstlisting}
-% \expandafter\handle\expanded{\ekvparse\k\kv{foo = bar, key, baz={zzz}}}
+% \expandafter\parse\expanded{\ekvparse\k\kv{foo = bar, key, baz={zzz}}}
% \end{lstlisting}
% would expand to
% \begin{lstlisting}
-% \handle\kv{foo}{bar}\k{key}\kv{baz}{zzz}
+% \parse\kv{foo}{bar}\k{key}\kv{baz}{zzz}
% \end{lstlisting}
%
% \subsection{Other Macros}
@@ -673,7 +771,7 @@ and the derived files expkv.pdf
% list everything that has been |\ekvsneak|ed will be left in the input
% stream. A small usage example is shown in \autoref{sec:sneakex}.
% \end{function}
-% \example Define a key |secret| in the set |foo| that will sneak out a macro
+% \example Define a key |secret| in the set |foo| that will sneak out
% |\foo@secretly@sneaked|:
% \begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
% \ekvdefNoVal{foo}{secret}{\ekvsneak{\foo@secretly@sneaked}}
@@ -696,6 +794,124 @@ and the derived files expkv.pdf
% {\ekvifdefinedset{#1}{\ekvchangeset{#1}}{\ekvbreak{\foo@cd@error}}}
% \end{lstlisting}
%
+% \begin{function}{\ekvoptarg}
+% \begin{syntax}
+% \cs{ekvoptarg}\marg{next}\marg{default}
+% \end{syntax}
+% This macro will check for a following optional argument in brackets (|[]|)
+% expandably. After the optional argument there has to be a mandatory one. The
+% code in \meta{next} should expect two arguments (the processed optional
+% argument and the mandatory one). If there was an optional argument the
+% result will be \meta{next}\marg{optional}\meta{mandatory} (so the optional
+% argument will be wrapped in braces, the mandatory argument will be
+% untouched). If there was no optional argument the result will be
+% \meta{next}\marg{default}\marg{mandatory} (so the default will be used and
+% the mandatory argument will be wrapped in braces).
+% \end{function}
+% |\ekvoptarg| expands in exactly two steps and is alignment safe. It has its
+% limitations however. It can't tell the difference between |[| and |{[}|, so it
+% doesn't work if the mandatory argument is a single bracket. Also if the
+% optional argument should contain a nested closing bracket, the optional
+% argument has to use nested braces like so: |[{arg]ument}]|.
+% \example Say we have a macro that should take an optional argument defaulting
+% to 1:
+% \begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
+% \newcommand\foo{\ekvoptarg\@foo{1}}
+% \newcommand\@foo[2]{Mandatory: #2\par Optional: #1}
+% \end{lstlisting}
+%
+% \begin{function}{\ekvoptargTF}
+% \begin{syntax}
+% \cs{ekvoptargTF}\marg{true}\marg{false}
+% \end{syntax}
+% This macro is similar to |\ekvoptarg|, but will result in
+% \meta{true}\marg{optional}\meta{mandatory} or \meta{false}\marg{mandatory}
+% instead of placing a default value.
+% \end{function}
+% |\ekvoptargTF| expands in exactly two steps and is alignment safe. It has the
+% same limitations as |\ekvoptarg|.
+% \example Say we have a macro that should behave differently depending on
+% whether there was an optional argument or not. This could be done with:
+% \begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
+% \newcommand\foo{\ekvoptargTF\foo@a\foo@b}
+% \newcommand\foo@a[2]{Mandatory: #2\par Optional: #1}
+% \newcommand\foo@b[1]{Mandatory: #1\par No optional.}
+% \end{lstlisting}
+%
+% \begin{function}{\ekverr}
+% \begin{syntax}
+% \cs{ekverr}\marg{package}\marg{message}
+% \end{syntax}
+% This macro will throw an error fully expandably.\footnotemark\ The error
+% length is limited to a total length of 69~characters, and since ten
+% characters will be added for the formatting (\verb*|! | and
+% \verb*| Error: |) that leaves us with a total length for \meta{package} plus
+% \meta{message} of 59~characters. If the message gets longer \TeX\ will only
+% display the first 69~characters and append |\ETC.| to the end.
+%
+% Neither \meta{package} nor \meta{message} expand any further. Also
+% \meta{package} must not contain an explicit |\par| token or the token
+% |\thanks@jfbu|. No such restriction applies to \meta{message}.
+%
+% If |^^J| is set up as the |\newlinechar| (which is the case in \LaTeXe\ but
+% not in plain \TeX\ by default) you can use that to introduce line breaks in
+% your error message. However that doesn't change the message length limit.
+% \end{function}
+% \footnotetext{The used mechanism was to the best of my knowledge first
+% implemented by Jean-François Burnol.}
+% After your own error message some further text will be placed. The
+% formatting of that text will look good if |^^J| is the |\newlinechar|, else
+% not so much. That text will read:
+% \begin{verbatim}
+% ! Paragraph ended before \<an-expandable-macro>
+% completed due to above exception. If the error
+% summary is not comprehensible see the package
+% documentation.
+% I will try to recover now. If you're in inter-
+% active mode hit <return> at the ? prompt and I
+% continue hoping recovery was complete.
+% \end{verbatim}
+% Any clean up has to be done by you, |\ekverr| will expand to nothing after
+% throwing the error message.
+% \example Say we set up a small calculation which works with user input. In our
+% calculation we need a division, so have to watch out for division by zero. If
+% we detect such a case we throw an error and do the recovery by using the
+% biggest integer allowed in \TeX\ as the result.
+% \begin{lstlisting}
+% \newcommand*\mydivision[2]
+% {%
+% \number\numexpr
+% \ifnum\numexpr#2=0 % space here on purpose
+% \ekverr{my}{division by 0. Setting result to 2147483647.}%
+% 2147483647%
+% \else
+% (#1)/(#2)%
+% \fi
+% \relax
+% }
+% $(10+5)/(3-3)\approx\mydivision{10+5}{3-3}$
+% \end{lstlisting}
+% If that code gets executed the following will be the terminal output
+% \begin{verbatim}
+% Runaway argument?
+% ! my Error: division by 0. Setting result to 2147483647.
+% ! Paragraph ended before \<an-expandable-macro>
+% completed due to above exception. If the error
+% summary is not comprehensible see the package
+% documentation.
+% I will try to recover now. If you're in inter-
+% active mode hit <return> at the ? prompt and I
+% continue hoping recovery was complete.
+% <to be read again>
+% \par
+% l.15 $(10+5)/(3-3)\approx\mydivision{10+5}{3-3}
+% $
+% ?
+% \end{verbatim}
+% and the output would contain
+% \exres{$(10+5)/(3-3)\approx2147483647$}
+% if we continued the \TeX\ run at the prompt.
+%
% \bigskip
%
% \begin{function}{\ekv@name,\ekv@name@set,\ekv@name@key}
@@ -744,17 +960,18 @@ and the derived files expkv.pdf
% \end{lstlisting}
% Now we set up our macro to use this \kv\ interface
% \begin{lstlisting}
-% \protected\def\ourmacro#1{\begingroup\ekvset{our}{#1}\the\ourdim\endgroup}
+% \protected\def\ourmacro#1%
+% {\begingroup\ekvset{our}{#1}\the\ourdim\endgroup}
% \end{lstlisting}
% Finally we can use our macro like in the following\\
-% \begin{minipage}{6cm}
+% \begin{minipage}{.5\linewidth}
% \begin{lstlisting}
% \ourmacro{}\par
% \ourmacro{width}\par
% \ourmacro{width=5pt}\par
% \end{lstlisting}
% \end{minipage}^^A
-% \begin{minipage}{\dimexpr\linewidth-6cm\relax}
+% \begin{exresult}[nobeforeafter,box align=center]{.5\linewidth}
% \newdimen\ourdim\ourdim=150pt
% \protected\ekvdef{our}{width}{\ourdim=#1\relax}^^A
% \protected\ekvdefNoVal{our}{width}{\ourdim=.9\hsize}^^A
@@ -763,7 +980,7 @@ and the derived files expkv.pdf
% \ourmacro{}\par
% \ourmacro{width}\par
% \ourmacro{width=5pt}\par
-% \end{minipage}
+% \end{exresult}
%
% \paragraph{The same keys using \protect\expkvd}
% Using \expkvd\ we can set up the equivalent key using a \kv\ interface, after
@@ -785,7 +1002,7 @@ and the derived files expkv.pdf
%
% Another small example could be a \kv\ driven |\rule| alternative, because I
% keep forgetting the correct order of its arguments. First we define the keys
-% (and initialize the used macros to store the keys):
+% (and initialize the macros used to store the keys):
% \begin{lstlisting}
% \makeatletter
% \newcommand*\myrule@ht{1ex}
@@ -794,12 +1011,14 @@ and the derived files expkv.pdf
% \protected\ekvdef{myrule}{ht}{\def\myrule@ht{#1}}
% \protected\ekvdef{myrule}{wd}{\def\myrule@wd{#1}}
% \protected\ekvdef{myrule}{raise}{\def\myrule@raise{#1}}
+% \protected\ekvdef{myrule}{lower}{\def\myrule@raise{-#1}}
% \end{lstlisting}
% Then we define a macro to change the defaults outside of |\myrule| and
% |\myrule| itself:
% \begin{lstlisting}
% \ekvsetdef\myruleset{myrule}
-% \newcommand*\myrule[1][]{\begingroup\myruleset{#1}\myrule@out\endgroup}
+% \newcommand*\myrule[1][]
+% {\begingroup\myruleset{#1}\myrule@out\endgroup}
% \end{lstlisting}
% And finally the output:
% \begin{lstlisting}
@@ -807,15 +1026,15 @@ and the derived files expkv.pdf
% \makeatother
% \end{lstlisting}
% And we can use it:\\
-% \begin{minipage}{7cm}
+% \begin{minipage}{.5\linewidth}
% \begin{lstlisting}
% a\myrule\par
-% a\myrule[ht=2ex,raise=-.5ex]\par
+% a\myrule[ht=2ex,lower=.5ex]\par
% \myruleset{wd=5pt}
% a\myrule
% \end{lstlisting}
% \end{minipage}^^A
-% \begin{minipage}{\dimexpr\linewidth-7cm\relax}
+% \begin{exresult}[nobeforeafter,box align=center]{.5\linewidth}
% \makeatletter
% \newcommand*\myrule@ht{1ex}
% \newcommand*\myrule@wd{0.1em}
@@ -823,16 +1042,17 @@ and the derived files expkv.pdf
% \protected\ekvdef{myrule}{ht}{\def\myrule@ht{#1}}
% \protected\ekvdef{myrule}{wd}{\def\myrule@wd{#1}}
% \protected\ekvdef{myrule}{raise}{\def\myrule@raise{#1}}
+% \protected\ekvdef{myrule}{lower}{\def\myrule@raise{-#1}}
% \ekvsetdef\myruleset{myrule}
% \newcommand*\myrule[1][]{\begingroup\myruleset{#1}\myrule@out\endgroup}
% \newcommand*\myrule@out{\rule[\myrule@raise]\myrule@wd\myrule@ht}
% \makeatother
% a\myrule\par
-% a\myrule[ht=2ex,raise=-.5ex]\par
+% a\myrule[ht=2ex,lower=.5ex]\par
% \myruleset{wd=5pt}
% a\myrule
-% \end{minipage}
-%
+% \end{exresult}
+%
%
% \subsubsection{An Expandable \kv\ Macro Using \cs[no-index]{ekvsneak}}
% \label{sec:sneakex}
@@ -877,7 +1097,10 @@ and the derived files expkv.pdf
% First we set up our keys according to our earlier considerations and set up
% the user facing macro |\sine|. The end marker of the parsing list will be a
% |\sine@stop| token, which we don't need to define and we put our defaults
-% right before it.
+% right before it. The user macro |\sine| uses |\ekvoptargTF| to check for the
+% optional argument short cutting to the final step if no optional argument was
+% found. This way we safe some time in this case, though we have to specify the
+% default values twice.
%
% \begin{lstlisting}
% \RequirePackage{xfp}
@@ -887,13 +1110,10 @@ and the derived files expkv.pdf
% \ekvdefNoVal{expex}{degree}{\ekvsneakPre{\deg{d}}}
% \ekvdefNoVal{expex}{radian}{\ekvsneakPre{\deg{}}}
% \ekvdefNoVal{expex}{internal}{\ekvsneakPre{\sine@rnd}}
-% \newcommand*\sine[2]
+% \newcommand*\sine{\ekvoptargTF\sine@args{\sine@final{sin}{d}{3}}}
+% \newcommand*\sine@args[2]
% {\ekvset{expex}{#1,internal}\rnd{3}\deg{d}\f{sin}\sine@stop{#2}}
% \end{lstlisting}
-% For the sake of simplicity we defined the macro |\sine| with two mandatory
-% arguments, the first being the \kv\ list, the second the argument to the
-% trigonometric function. We could've used \pkg{xparse}'s facilities here to
-% define an expandable macro which takes an optional argument instead.
%
% Now we need to define some internal macros to extract the value of each key's
% last usage (remember that this will be the group after the first special
@@ -922,33 +1142,34 @@ and the derived files expkv.pdf
% \makeatother
% \end{lstlisting}
% Let's test our macro:\\
-% \begin{minipage}{.7\linewidth}
+% \begin{minipage}{.75\linewidth}
% \begin{lstlisting}[gobble=4]
-% \sine{}{60}\par
-% \sine{round=10}{60}\par
-% \sine{f=cos,radian}{pi}\par
-% \edef\myval{\sine{f=tan}{1}}\texttt{\meaning\myval}
+% \sine{60}\par
+% \sine[round=10]{60}\par
+% \sine[f=cos,radian]{pi}\par
+% \edef\myval{\sine[f=tan]{1}}\texttt{\meaning\myval}
% \end{lstlisting}
-% \end{minipage}\hfill
-% \begin{minipage}{.2\linewidth}
+% \end{minipage}^^A
+% \begin{exresult}[nobeforeafter,box align=center]{.25\linewidth}
% \makeatletter
% \ekvdef{expex}{f}{\ekvsneakPre{\f{#1}}}^^A
% \ekvdef{expex}{round}{\ekvsneakPre{\rnd{#1}}}^^A
% \ekvdefNoVal{expex}{degree}{\ekvsneakPre{\deg{d}}}^^A
% \ekvdefNoVal{expex}{radian}{\ekvsneakPre{\deg{}}}^^A
% \ekvdefNoVal{expex}{internal}{\ekvsneakPre{\sine@rnd}}^^A
-% \newcommand*\sine[2]
-% {\ekvset{expex}{#1,internal}\rnd{3}\deg{d}\f{sin}\sine@stop{#2}}^^A
+% \newcommand*\sine{\ekvoptargTF\sine@args{\sine@final{sin}{d}{3}}}
+% \newcommand*\sine@args[2]
+% {\ekvset{expex}{#1,internal}\rnd{3}\deg{d}\f{sin}\sine@stop{#2}}
% \def\sine@rnd#1\rnd#2#3\sine@stop{\sine@deg#1#3\sine@stop{#2}}^^A
% \def\sine@deg#1\deg#2#3\sine@stop{\sine@f#1#3\sine@stop{#2}}^^A
% \def\sine@f#1\f#2#3\sine@stop{\sine@final{#2}}^^A
% \newcommand*\sine@final[4]{\fpeval{round(#1#2(#4),#3)}}^^A
% \makeatother
-% \sine{}{60}\par
-% \sine{round=10}{60}\par
-% \sine{f=cos,radian}{pi}\par
-% \edef\myval{\sine{f=tan}{1}}\texttt{\meaning\myval}
-% \end{minipage}
+% \sine{60}\par
+% \sine[round=10]{60}\par
+% \sine[f=cos,radian]{pi}\par
+% \edef\myval{\sine[f=tan]{1}}\texttt{\meaning\myval}
+% \end{exresult}
%
% \paragraph{The same macro using \protect\expkvc}
% Using \expkvc\ we can set up something equivalent with a bit less code. The
@@ -956,18 +1177,19 @@ and the derived files expkv.pdf
% way easier to code for the user.
% \begin{lstlisting}
% \makeatletter
-% \ekvcSplitAndForward\sine\sine@
+% \newcommand*\sine{\ekvoptargTF\sine@a{\sine@b{sin}{d}{3}}}
+% \ekvcSplitAndForward\sine@a\sine@b
% {
% f=sin,
% unit=d,
% round=3,
% }
-% \ekvcSecondaryKeys\sine
+% \ekvcSecondaryKeys\sine@a
% {
% nmeta degree={unit=d},
% nmeta radian={unit={}},
% }
-% \newcommand*\sine@[4]{\fpeval{round(#1#2(#4),#3)}}
+% \newcommand*\sine@b[4]{\fpeval{round(#1#2(#4),#3)}}
% \makeatother
% \end{lstlisting}
% The resulting macro will behave just like the one previously defined, but will
@@ -982,8 +1204,8 @@ and the derived files expkv.pdf
%
% \subsubsection{Load Time}
%
-% \file{expkv.tex} checks whether \eTeX\ is available. If it isn't, an error
-% will be thrown using |\errmessage|:
+% \file{expkv.tex} checks whether \eTeX\ and the |\expanded| primitive are
+% available. If it isn't, an error will be thrown using |\errmessage|:
% \begin{lstlisting}
% ! expkv Error: e-TeX required.
% \end{lstlisting}
@@ -1010,57 +1232,52 @@ and the derived files expkv.pdf
% \subsubsection{Using Keys}
%
% This subsubsection contains the errors thrown during |\ekvset|. The errors are
-% thrown in an expandable manner by providing an undefined macro. In the
-% following messages \lstinline|<key>| gets replaced with the problematic key's
-% name, and \lstinline|<set>| with the corresponding set. If any errors during
-% \kv\ handling are encountered, the entry in the comma separated list will be
+% thrown in an expandable manner using |\ekverr|. In the following messages
+% \lstinline|<key>| gets replaced with the problematic key's name, and
+% \lstinline|<set>| with the corresponding set. If any errors during \kv\
+% handling are encountered, the entry in the comma separated list will be
% omitted after the error is thrown and the next \kv\ pair will be parsed.
%
% If you're using an undefined key you'll get:
% \begin{lstlisting}
-% ! Undefined control sequence.
-% <argument> \! expkv Error:
-% unknown key (`<key>', set `<set>').
+% Runaway argument?
+% ! expkv Error: unknown key `<key>' in set `<set>'
% \end{lstlisting}
%
% If you're using a key for which only a normal version and no |NoVal| version
% is defined, but don't provide a value, you'll get:
% \begin{lstlisting}
-% ! Undefined control sequence.
-% <argument> \! expkv Error:
-% value required (`<key>', set `<set>').
+% Runaway argument?
+% ! expkv Error: missing value for `<key>' in set `<set>'
% \end{lstlisting}
%
% If you're using a key for which only a |NoVal| version and no normal version
% is defined, but provide a value, you'll get:
% \begin{lstlisting}
-% ! Undefined control sequence.
-% <argument> \! expkv Error:
-% value forbidden (`<key>', set `<set>').
+% Runaway argument?
+% ! expkv Error: unwanted value for `<key>' in set `<set>'
% \end{lstlisting}
%
% If you're using an undefined key in a set for which |\ekvredirectunknown| was
% used, and the key isn't found in any of the other sets as well, you'll get:
% \begin{lstlisting}
-% ! Undefined control sequence.
-% <argument> \! expkv Error:
-% no key `<key>' in sets {<set1>}{<set2>}...
+% Runaway argument?
+% ! expkv Error: no key `<key>' in sets {<set1>}{<set2>}...
% \end{lstlisting}
%
% If you're using an undefined |NoVal| key in a set for which
% |\ekvredirectunknownNoVal| was used, and the key isn't found in any of the
% other sets as well, you'll get:
% \begin{lstlisting}
-% ! Undefined control sequence.
-% <argument> \! expkv Error:
-% no NoVal key `<key>' in sets {<set1>}...
+% Runaway argument?
+% ! expkv Error: no NoVal key `<key>' in sets {<set1>}{<set2>}...
% \end{lstlisting}
%
% If you're using a set for which you never executed one of the defining macros
% from \autoref{sec:define} you'll get a low level \TeX\ error, as that isn't
% actively tested by the parser (and hence will lead to undefined behaviour and
% not be gracefully ignored). The error will look like
-% \begin{lstlisting}
+% \begin{lstlisting}[language={}]
% ! Missing \endcsname inserted.
% <to be read again>
% \! expkv Error: Set `<set>' undefined.
@@ -1197,8 +1414,8 @@ and the derived files expkv.pdf
% loading \yax\ broke \pkg{options} for me. The tested definition was:
% \begin{lstlisting}[belowskip=0pt]
% \usepackage{yax}
-% \defactiveparameter yax {\storevalue\myheight yax:height } % key setup
-% \setparameterlist{yax}{ height = 6 } % benchmarked
+% \defactiveparameter yax {\storevalue\myheight yax:height } % setup
+% \setparameterlist{yax}{ height = 6 } % benchmark
% \end{lstlisting}
%
% \begin{table}
@@ -1313,11 +1530,16 @@ and the derived files expkv.pdf
\fi
% \end{macrocode}
%
-% Check whether \eTeX\ is available -- \expkv\ requires \eTeX.
+% Check whether \eTeX\ and |\expanded| are available -- \expkv\ requires \eTeX.
% \begin{macrocode}
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname numexpr\endcsname\relax
- \errmessage{expkv requires e-TeX}
+\begingroup
+ \edef\ekvtmpa{\string\expanded}
+ \edef\ekvtmpb{\meaning\expanded}
+ \expandafter
+\endgroup
+\ifx\ekvtmpa\ekvtmpb
+\else
+ \errmessage{expkv Error: e-TeX and \noexpand\expanded required}
\expandafter\endinput
\fi
% \end{macrocode}
@@ -1325,8 +1547,8 @@ and the derived files expkv.pdf
% \begin{macro}{\ekvVersion,\ekvDate}
% We're on our first input, so lets store the version and date in a macro.
% \begin{macrocode}
-\def\ekvVersion{1.7a}
-\def\ekvDate{2021-04-11}
+\def\ekvVersion{1.8}
+\def\ekvDate{2021-05-24}
% \end{macrocode}
% \end{macro}
%
@@ -2092,9 +2314,12 @@ and the derived files expkv.pdf
% macro, that has the same scope as |\keyval_parse:NNn| from \pkg{expl3}.
% This is pretty analogue to the |\ekvset| implementation, we just put an
% |\unexpanded| here and there instead of other macros to stop the |\expanded|
-% on our output.
+% on our output. The |\unexpanded\expanded{{...}}| ensures that the material is
+% in an alignment safe group at all time, and that it doesn't expand any further
+% in an |\edef| or |\expanded| context.
% \begin{macrocode}
-\long\def\ekvparse##1##2##3{\ekv@parse{##1}{##2}\ekv@mark##3#1\ekv@stop#1}
+\long\def\ekvparse##1##2##3%
+ {\unexpanded\expanded{{\ekv@parse{##1}{##2}\ekv@mark##3#1\ekv@stop#1}}}
% \end{macrocode}
% \end{macro}
%
@@ -2440,18 +2665,124 @@ and the derived files expkv.pdf
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\ekv@err,\ekv@err@}
+% \begin{macro}[internal]{\ekv@alignsafe,\ekv@endalignsafe}
+% These macros protect the usage of ampersands inside of alignment contexts.
+% \begin{macrocode}
+\begingroup
+\catcode`\^^@=2
+\@firstofone{\endgroup
+ \def\ekv@alignsafe{\romannumeral\iffalse{\fi`^^@ }
+}
+\def\ekv@endalignsafe{\ifnum`{=\ekv@zero}\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ekvoptarg,\ekvoptargTF}
+% Provide macros to expandably collect an optional argument in brackets. The
+% macros here are pretty simple in nature compared to \pkg{xparse}'s
+% possibilities (they don't care for nested bracket levels).
+%
+% We start with a temporary definition to pre-expand |\ekv@alignsafe| (will be
+% |#1|) and |\ekv@endalignsafe| (will be |#2|).
+% \begin{macrocode}
+\begingroup
+\def\ekvoptarg#1#2{%
+\endgroup
+% \end{macrocode}
+% The real definition starts an expansion context after grabbing the arguments.
+% |#1| will be the next step, |#2| the default value, and |#3| might be an
+% opening bracket, or the mandatory argument. We check for the opening bracket,
+% if it is found grab the optional argument, else leave |#1{#2}| in the input
+% stream after ending the expansion context.
+% \begin{macrocode}
+\long\def\ekvoptarg##1##2##3%
+ {%
+ \romannumeral
+ #1%
+ \ekv@optarg@if\ekv@mark##3\ekv@mark\ekv@optarg\ekv@mark[\ekv@mark
+ #2%
+ \@firstofone{\ekv@zero##1}{##2}{##3}%
+ }
+% \end{macrocode}
+% The other variant of this will do roughly the same. Here, |#1| will be the
+% next step if an optional argument is found, |#2| the next step else, and |#3|
+% might be the opening bracket or mandatory argument.
+% \begin{macrocode}
+\long\def\ekvoptargTF##1##2##3%
+ {%
+ \romannumeral
+ #1%
+ \ekv@optarg@if\ekv@mark##3\ekv@mark\ekv@optargTF{##1}\ekv@mark[\ekv@mark
+ #2%
+ \@firstofone{\ekv@zero##2}{##3}%
+ }
+% \end{macrocode}
+% The two macros to grab the optional argument have to remove the remainder of
+% the test and the wrong next step as well as grabbing the argument.
+% \begin{macrocode}
+\long\def\ekv@optarg\ekv@mark[\ekv@mark\ifnum`##1\fi\@firstofone##2##3##4##5]%
+ {#2##2{##5}}
+\long\def\ekv@optargTF##1\ekv@mark[\ekv@mark\ifnum`##2\fi\@firstofone##3##4##5]%
+ {#2\ekv@zero##1{##5}}
+}
+% \end{macrocode}
+% Do the definitions and add the test macro.
+% \begin{macrocode}
+\ekv@exparg{\expandafter\ekvoptarg\expandafter{\ekv@alignsafe}}\ekv@endalignsafe
+\long\def\ekv@optarg@if#1\ekv@mark[\ekv@mark{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ekverr}
+% \begin{macro}[internal]{\ekv@err@collect,\ekv@err@cleanup}
% Since |\ekvset| is fully expandable as long as the code of the keys is (which
% is unlikely) we want to somehow throw expandable errors, in our case via
-% undefined control sequences.
-% \begin{macrocode}
-\def\ekv@err#1%
+% a runaway argument (to my knowledge the first version of this method was
+% implemented by Jean-François Burnol, many thanks to him). The first step is to
+% ensure that the second argument (which might contain user input) doesn't
+% contain tokens we use as delimiters (in this case |\par|), this will be done
+% by the front facing macro |\ekverr|. But first we set some other things up.
+%
+% We use a temporary definition for |\ekverr| to get multiple consecutive
+% spaces. Then we set up the macro that will collect the error and the macro
+% that will throw the error. The latter will have an unreasonable long name.
+% This way we can convey more information. Though the information in the macro
+% name is static and has to be somewhat general to fit every occurence. The
+% important bit is that the long named macro has a delimited argument and is
+% short which will throw the error at the |\par| at the end of
+% |\ekv@err@collect|. This macro has the drawback that it will only print nicely
+% if the |\newlinechar| is |^^J|.
+% \begin{macrocode}
+\def\ekv@err@cleanup\par{}
+\def\ekv@err@collect#1%
{%
- \long\def\ekv@err##1{\expandafter\ekv@err@\@firstofone{#1##1.}\ekv@stop}%
+ \def\ekv@err@collect##1\par##2%
+ {%
+ \expandafter
+ \ekv@err@cleanup
+ #1! ##2 Error: ##1\par
+ }%
+ \def#1##1\thanks@jfbu{}%
}
-\begingroup\expandafter\endgroup
-\expandafter\ekv@err\csname ! expkv Error:\endcsname
-\def\ekv@err@{\expandafter\ekv@gobbleto@stop}
+\def\ekverr{ }
+\expandafter\ekv@err@collect\csname <an-expandable-macro>^^J%
+ completed due to above exception. \ekverr If the error^^J%
+ summary is \ekverr not comprehensible \ekverr see the package^^J%
+ documentation.^^J%
+ I will try to recover now. \ekverr If you're in inter-^^J%
+ active mode hit <return> \ekverr at the ? prompt and I^^J%
+ continue hoping recovery\endcsname
+% \end{macrocode}
+% \begin{macrocode}
+\long\def\ekverr#1#2{\expandafter\ekv@err@collect\detokenize{#2}\par{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[internal]{\ekv@err}
+% We define a shorthand to throw errors in \expkv.
+% \begin{macrocode}
+\ekv@exparg{\long\def\ekv@err#1}{\ekverr{expkv}{#1}}
% \end{macrocode}
% \end{macro}
%
@@ -2465,10 +2796,10 @@ and the derived files expkv.pdf
% \begin{macrocode}
\long\def\ekv@err@common #1#2{\expandafter\ekv@err@common@\string#2{#1}}
\ekv@exparg{\long\def\ekv@err@common@#1`#2' #3.#4#5}%
- {\ekv@err{#4 (`#5', set `#2')}}
+ {\ekv@err{#4 `#5' in set `#2'}}
\ekv@exparg{\long\def\ekv@err@unknown#1}{\ekv@err@common{unknown key}{#1}}
-\ekv@exparg{\long\def\ekv@err@noarg #1}{\ekv@err@common{value forbidden}{#1}}
-\ekv@exparg{\long\def\ekv@err@reqval #1}{\ekv@err@common{value required}{#1}}
+\ekv@exparg{\long\def\ekv@err@noarg #1}{\ekv@err@common{unwanted value for}{#1}}
+\ekv@exparg{\long\def\ekv@err@reqval #1}{\ekv@err@common{missing value for}{#1}}
\ekv@exparg{\long\def\ekv@err@redirect@kv@notfound#1#2#3\ekv@stop}%
{\ekv@err{no key `#2' in sets #3}}
\ekv@exparg{\def\ekv@err@redirect@k@notfound#1#2\ekv@stop}%
diff --git a/macros/generic/expkv/expkv.pdf b/macros/generic/expkv/expkv.pdf
index 95b8d60b57..1f9248c9ec 100644
--- a/macros/generic/expkv/expkv.pdf
+++ b/macros/generic/expkv/expkv.pdf
Binary files differ
diff --git a/macros/latex/contrib/huawei/README.md b/macros/latex/contrib/huawei/README.md
index a6ae6ec72c..c3a9ad9132 100644
--- a/macros/latex/contrib/huawei/README.md
+++ b/macros/latex/contrib/huawei/README.md
@@ -11,17 +11,20 @@ and then use in the preamble:
```tex
\documentclass[landscape]{huawei}
-\author{Yegor Bugayenko}
-\title{An Interesting Document About Something}
+\renewcommand*\theauthor{Yegor Bugayenko}
+\renewcommand*\thetitle{An Interesting Document About Something}
\begin{document}
+\maketitle
Hello, world!
\end{document}
```
+Read the detailed documentation [in PDF](http://mirrors.ctan.org/macros/latex/contrib/huawei/huawei.pdf).
+
Find more examples in the [`samples/`](/samples) directory.
If you need more formatting options,
-[submit an issue](https://github.com/cqfn/huawei-latex/issues),
+[submit an issue](https://github.com/yegor256/huawei.cls/issues),
I'll implement them.
If you want to contribute yourself, make a fork, then create a branch,
diff --git a/macros/latex/contrib/huawei/huawei.cls b/macros/latex/contrib/huawei/huawei.cls
index 1a8c9c2ef3..ef8f26da25 100644
--- a/macros/latex/contrib/huawei/huawei.cls
+++ b/macros/latex/contrib/huawei/huawei.cls
@@ -21,13 +21,16 @@
% SOFTWARE.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{huawei}[13/05/2021 0.2.0 Template for Huawei documents]
+\ProvidesClass{huawei}[2021/05/24 0.3.0 Template for Huawei documents]
+
\newif\ifnosecurity
\DeclareOption{nosecurity}{\nosecuritytrue}
\newif\ifnobrand
\DeclareOption{nobrand}{\nobrandtrue}
\newif\ifnodate
\DeclareOption{nodate}{\nodatetrue}
+\newif\ifnocover
+\DeclareOption{nocover}{\nocovertrue}
\newif\ifnopaging
\DeclareOption{nopaging}{\nopagingtrue}
\newif\iflandscape
@@ -35,7 +38,9 @@
\newif\ifanonymous
\DeclareOption{anonymous}{\anonymoustrue}
\ProcessOptions\relax
+
\LoadClass[12pt]{article}
+
\RequirePackage{geometry}
\iflandscape
\geometry{paperwidth=16in, paperheight=9in, left=4in, right=2in, top=1.5in, bottom=1.5in}
@@ -269,6 +274,11 @@
\fi
\vspace*{0.5in}
\maketitle
+ \iflandscape\ifnocover\else
+ \begin{textblock}{14}[1,1](14,14)
+ \raggedleft\includegraphics[height=3.6in]{images/huawei-cover.pdf}
+ \end{textblock}
+ \fi\fi
}
\newcommand\PrintLastPage{
diff --git a/macros/latex/contrib/huawei/huawei.pdf b/macros/latex/contrib/huawei/huawei.pdf
index 0c4cfd48e1..a5a50cb96c 100644
--- a/macros/latex/contrib/huawei/huawei.pdf
+++ b/macros/latex/contrib/huawei/huawei.pdf
Binary files differ
diff --git a/macros/latex/contrib/huawei/huawei.tex b/macros/latex/contrib/huawei/huawei.tex
index dc2d76e5cf..dc9904a0d4 100644
--- a/macros/latex/contrib/huawei/huawei.tex
+++ b/macros/latex/contrib/huawei/huawei.tex
@@ -1,3 +1,25 @@
+% (The MIT License)
+%
+% Copyright (c) 2021 Yegor Bugayenko
+%
+% Permission is hereby granted, free of charge, to any person obtaining a copy
+% of this software and associated documentation files (the 'Software'), to deal
+% in the Software without restriction, including without limitation the rights
+% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+% copies of the Software, and to permit persons to whom the Software is
+% furnished to do so, subject to the following conditions:
+%
+% The above copyright notice and this permission notice shall be included in all
+% copies or substantial portions of the Software.
+%
+% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+% SOFTWARE.
+
\documentclass[nobrand,nosecurity]{./huawei}
\renewcommand*\thetitle{\LaTeX{} Class \ff{huawei}}
\renewcommand*\thesubtitle{User's Guide}
@@ -5,9 +27,9 @@
\begin{document}
\maketitle
-\ff{Version: 0.2.0}
+\ff{Version: 0.3.0}
\newline
-\ff{Date: 13/05/2021}
+\ff{Date: 2021/05/24}
\section{Overview}
@@ -74,6 +96,10 @@ the layout of your document:
\href{https://en.wikipedia.org/wiki/Paper_size}{A4}),
making it perfect for presentations.
+\ff{nocover}
+ avoid printing the cover images on the first page by the
+ \ff{\textbackslash{}PrintTitlePage} command.
+
\ff{anonymous}
removes the name of the author everywhere, including the bottom
of the page, where the author's name stays next to the name of the
@@ -199,7 +225,7 @@ Here goes the second column content.
\end{document}
\end{minted}
-A more complete example is in the\ff{samples/charter.tex}.
+A more complete example is in the \ff{samples/huawei-charter.tex}.
\subsection{Crumbs}
@@ -220,6 +246,6 @@ we recommend you to use ``crumbs'':
\end{document}
\end{minted}
-A more complete example is in the\ff{samples/charter.tex}.
+A more complete example is in the \ff{samples/huawei-charter.tex}.
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/huawei/images/huawei-cover.pdf b/macros/latex/contrib/huawei/images/huawei-cover.pdf
new file mode 100644
index 0000000000..6717a9ff35
--- /dev/null
+++ b/macros/latex/contrib/huawei/images/huawei-cover.pdf
Binary files differ
diff --git a/macros/latex/contrib/huawei/samples/huawei-cfp.tex b/macros/latex/contrib/huawei/samples/huawei-cfp.tex
new file mode 100644
index 0000000000..7668137254
--- /dev/null
+++ b/macros/latex/contrib/huawei/samples/huawei-cfp.tex
@@ -0,0 +1,53 @@
+% (The MIT License)
+%
+% Copyright (c) 2021 Yegor Bugayenko
+%
+% Permission is hereby granted, free of charge, to any person obtaining a copy
+% of this software and associated documentation files (the 'Software'), to deal
+% in the Software without restriction, including without limitation the rights
+% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+% copies of the Software, and to permit persons to whom the Software is
+% furnished to do so, subject to the following conditions:
+%
+% The above copyright notice and this permission notice shall be included in all
+% copies or substantial portions of the Software.
+%
+% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+% SOFTWARE.
+
+\documentclass[nobrand,nosecurity,anonymous,nopaging]{../huawei}
+\renewcommand*\thetitle{Test Call for Proposal}
+\renewcommand*\theauthor{Yegor Bugayenko}
+\addbibresource{main.bib}
+\begin{document}
+
+\maketitle
+
+In this document you don't see the logo, because we use \ff{nobrand}
+option of the class:
+
+\begin{minted}{text}
+\documentclass[nobrand]{huawei}
+\begin{document}
+The rest of the document...
+\end{document}
+\end{minted}
+
+By the way, we use \TeX{} created by~\citet{knuth1984texbook}
+and \LaTeX{} created by~\citet{lamport1994latex}. The citations
+provided at the bottom of the document are printed via
+\ff{\textbackslash{}PrintBibliography}.
+
+The text in small font at the bottom of the page is printed by
+the \ff{\textbackslash{}PrintDisclaimer} command.
+
+\PrintDisclaimer
+
+\PrintBibliography
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/huawei/samples/huawei-charter.tex b/macros/latex/contrib/huawei/samples/huawei-charter.tex
new file mode 100644
index 0000000000..0cbc02b9d2
--- /dev/null
+++ b/macros/latex/contrib/huawei/samples/huawei-charter.tex
@@ -0,0 +1,67 @@
+% (The MIT License)
+%
+% Copyright (c) 2021 Yegor Bugayenko
+%
+% Permission is hereby granted, free of charge, to any person obtaining a copy
+% of this software and associated documentation files (the 'Software'), to deal
+% in the Software without restriction, including without limitation the rights
+% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+% copies of the Software, and to permit persons to whom the Software is
+% furnished to do so, subject to the following conditions:
+%
+% The above copyright notice and this permission notice shall be included in all
+% copies or substantial portions of the Software.
+%
+% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+% SOFTWARE.
+
+\documentclass[landscape,nocover]{../huawei}
+\renewcommand*\thetitle{Test Charter}
+\renewcommand*\thesubtitle{Technology Project Charter}
+\renewcommand*\theauthor{Yegor Bugayenko}
+\begin{document}
+
+\PrintFirstPage{}
+
+\newpage
+\section*{Project Details}
+\begin{multicols}{2}
+\raggedright
+\crumb{Author and Project Manager}{\theauthor / \theid}
+
+\crumb{Project Name}{Making Compression 15\% Faster}
+
+\crumb{Technical Adviser}{Jeff Lebowski, 00112233}
+
+\crumb{Cooperation Manager}{Walter Sobchak, 00889977}
+
+\crumb{Budget}{\$99,999}
+
+\crumb{Duration}{8 months}
+
+\crumb{Export Control}{No}
+
+\crumb{AI Technology Involved}{No}
+
+\crumb{Hardware Supply}{No}
+
+\end{multicols}
+
+\newpage
+\begin{multicols}{2}
+\section*{Objectives}
+The main objective of the project is to win the war
+against poverty in the world.
+\columnbreak
+\section*{Novelty}
+The idea of this project is very new and breakthrough.
+\end{multicols}
+
+\PrintLastPage
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/lwarp/README.txt b/macros/latex/contrib/lwarp/README.txt
index bf13a2f01a..62aa9f2f2f 100644
--- a/macros/latex/contrib/lwarp/README.txt
+++ b/macros/latex/contrib/lwarp/README.txt
@@ -1,5 +1,5 @@
-LaTeX lwarp package v0.896 README.txt
+LaTeX lwarp package v0.897 README.txt
Files included are:
diff --git a/macros/latex/contrib/lwarp/lwarp.dtx b/macros/latex/contrib/lwarp/lwarp.dtx
index bcd587f552..b326554a47 100644
--- a/macros/latex/contrib/lwarp/lwarp.dtx
+++ b/macros/latex/contrib/lwarp/lwarp.dtx
@@ -16,7 +16,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{lwarp}
-%<package> [2021/04/08 v0.896 Allows LaTeX to directly produce HTML5 output.]
+%<package> [2021/05/24 v0.897 Allows LaTeX to directly produce HTML5 output.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -1696,7 +1696,29 @@ It is recommended to use \pkg{cleveref} instead of \pkg{ntheorem}'s
}
\newcommand{\limitsgraphics}{%
-\limitsincludegraphicsscale
+Per \cref{tab:includegraphicsfilenames},
+image filenames may be specified either with or without an extension.
+\trouble[case sensitive]{image>not displayed}
+\trouble{image>extension case}
+\trouble{filename>image extension}
+\gindex{image>file names}
+\gindex{graphics>file names}
+\gindex{includegraphics=\cs{includegraphics}>file names}
+\gindex{filename>graphics}
+\gindex{filename>images}
+If an extension is given it will be used as-is, for either print or \HTML\ output.
+If no extension is given, a list of possible extensions is tried, which depends
+on whether print or \HTML\ is being generated. This allows a \PDF\ file for
+print and a \SVG\ file for \HTML, for example.
+If no extension is given, the automatic search will only return lowercase extensions,
+even if the filename actually has an uppercase extension, and \pkg{lwarp} cannot
+get around this problem, so image file extensions must be lowercase
+to be seen by the \HTML\ browser with \pkg{lwarp}.
+For example, name the image file \filenm{image.pdf} instead of \filenm{image.PDF},
+but refer to it in the source as \filenm{image}, without an extension.
+For images which may be used as-is with either print or \HTML, such as \JPG\ or \PNG,
+you may use a capitalized extension if it is specified in the source, such as
+\filenm{image.JPG}.
For \cs{includegraphics} with \filenm{.pdf} or \filenm{.eps} files,
\gindex{graphics>file formats}
@@ -1805,6 +1827,8 @@ Likewise, the \cs{includegraphics} \optn{alt} key adds an \HTML\ \attribute{alt}
an image, and is ignored for print output. If not assigned, each
image is given an \attribute{alt} tag according to \cs{ImageAltText}.
+\limitsincludegraphicsscale
+
\cs{rotatebox} accepts the optional \optn{origin} key.
\margintag{\cs{rotatebox}}
@@ -2807,6 +2831,14 @@ a virtual 6-inch wide minipage, which then corrupts the \optn{lw} option.)
}
\newcommand{\limitssiunitx}{%
+\pkg{sunitx} v3 is not yet supported. For now, specify version 2:
+\trouble[v3 not yet!]{siunitx=\pkg{siunitx}>v3}
+\begin{sourcedisplay}
+\cs{usepackage}\{siunitx\}\textred{[=v2]}
+\end{sourcedisplay}
+This may be also be necessary before loading other packages which also use \pkg{siunitx},
+such as \pkg{chemmacros}.
+
Due to \prog{pdftotext} limitations, fraction output is replaced by symbol
\margintag{fractions}
output for \optn{per-mode} and \optn{quotient-mode}.
@@ -2969,6 +3001,11 @@ it will be necessary to move the todo outside of the caption.
External layouts (\cs{fxloadlayouts}) are not supported.
\trouble[external layouts]{fixme=\pkg{fixme}}
+Customized layouts are overwritten by \pkg{lwarp}'s versions \cs{AtBeginDocument}
+in order to provide the \HTML\ conversion. If creating a new layout, see
+\pkg{lwarp}'s changes to provide similar for the new layout,
+inside a \env{warpHTML} environment.
+
User control is provided for setting the \HTML\ styling of the ``faces''.
The defaults are as follows, and may be changed in the preamble after
\pkg{fixme} is loaded:
@@ -3061,7 +3098,7 @@ This boolean may be tested by the user for later use.
%<*package>
% \fi
%
-% \CheckSum{54091}
+% \CheckSum{54242}
%
% \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
@@ -3199,6 +3236,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.894}{2020/12/24}{\ 2020/12/24}
% \changes{v0.895}{2021/02/18}{\ 2021/02/18}
% \changes{v0.896}{2021/04/08}{\ 2021/04/08}
+% \changes{v0.897}{2021/05/24}{\ 2021/05/24}
@@ -3422,6 +3460,22 @@ This boolean may be tested by the user for later use.
%
% \begin{description}
% \needspace{2\baselineskip}
+% \item[v0.897:] \pkg{siunitx} rollback.
+% \begin{itemize}
+% \item Added a table of file extensions to use with \cs{includegraphics}.
+% See \cref{tab:includegraphicsfilenames}.
+% \margintag{docs}
+% \item Added tests for additional incompatible packages.
+% \margintag{core}
+% \item \pkg{siunitx}: Supports rollback to v2. Does not yet support v3.
+% \margintag{packages}
+% \item \pkg{fixme}: Improved to work if the user modifies layouts.
+% \item \pkg{float}: Improved integration with \pkg{newfloat}, \pkg{keyfloat}.
+% \item Added \pkg{centerlastline}, \pkg{decorule}, \pkg{fancypar},
+% \pkg{froufrou}, \pkg{pbalance}.
+% \item Verified works as-is with \pkg{fnpct}.
+% \end{itemize}
+% \needspace{2\baselineskip}
% \item[v0.896:] Back references, accessibility.
% \begin{itemize}
% \item \textred{Due to changes in cross referencing, \watchout
@@ -5579,9 +5633,10 @@ This boolean may be tested by the user for later use.
% \midrule
%
% Page layout: & \ipkg{2in1}, \ipkg{2up}, \ipkg{a4}, \ipkg{a4wide}, \ipkg{a5comb},
-% \ipkg{addlines}, \ipkg{anysize}, \mpkg{atbegshi},
-% \ipkg{blowup}, \ipkg{booklet}, \ipkg{bophook}, \ipkg{bounddvi}, \ipkg{bxpapersize},
-% \ipkg{canoniclayout}, \mpkg{changelayout},
+% \ipkg{addlines}, \ipkg{anysize}, \mpkg{atbegshi}, \ipkg{balance},
+% \ipkg{blowup}, \ipkg{booklet}, \ipkg{bophook}, \ipkg{bounddvi},
+% \ipkg{bxpapersize},
+% \ipkg{canoniclayout}, \ipkg{centerlastline}, \mpkg{changelayout},
% \epkg{changepage}, \ipkg{chngpage}, \ipkg{clrdblpg},
% \ipkg{continue}, \ipkg{draftcopy}, \ipkg{draftfigure}, \ipkg{draftwatermark},
% \ipkg{ebook}, \ipkg{everyshi},
@@ -5592,6 +5647,7 @@ This boolean may be tested by the user for later use.
% \ipkg{layaureo}, \ipkg{layout}, \ipkg{layouts}, \ipkg{leading}, \ipkg{lscape},
% \ipkg{ltxgrid}, \ipkg{nccfancyhdr}, \ipkg{notespages}, \ipkg{nowidow},
% \ipkg{pagegrid}, \ipkg{pagesel}, \epkg{parallel}, \epkg{parcolumns},
+% \ipkg{pbalance},
% \ipkg{pdfcolparallel}, \ipkg{pdfcolparcolumns}, \ipkg{pdfcrypt},
% \ipkg{pdflscape}, \ipkg{pdfprivacy},
% \ipkg{preview}, \epkg{ragged2e}, \ipkg{returntogrid}, \ipkg{rmpage},
@@ -5608,7 +5664,8 @@ This boolean may be tested by the user for later use.
% Sectioning: & Adds \progcode{FileDepth} for splitting the \HTML\ output.
% Files may be numbered sequentially or named according to section name.
% Common short words and punctuation are removed from the filenames.
-% \epkg{anonchap}, \ipkg{bsheaders}, \ipkg{fncychap}, \epkg{hypbmsec},
+% \epkg{anonchap}, \ipkg{bsheaders}, \mpkg{decorule}, \ipkg{fncychap},
+% \mpkg{froufrou}, \epkg{hypbmsec},
% \epkg{indentfirst}, \epkg{quotchap},
% \ipkg{section}, \mpkg{sectionbreak}, \spkg{secdot}, \ipkg{sectsty},
% \ipkg{titlesec}, \spkg{tocvsec2}.
@@ -5662,7 +5719,7 @@ This boolean may be tested by the user for later use.
% \brand{MathJax} emulation for \cs{footnote}, and also as marked in the following:
% \epkg{bigfoot}, \ipkg{dblfnote},
% \ipkg{endheads}, \mpkg{endnotes}\ejax, \mpkg{enotez}\ejax, \spkg{fixfoot},
-% \ipkg{fnbreak}, \ipkg{fnpara}, \ipkg{fnpos},
+% \ipkg{fnbreak}, \ipkg{fnpara}, \spkg{fnpct}, \ipkg{fnpos},
% \epkg{footmisc}, \mpkg{footnote}, \ipkg{footnotebackref},
% \mpkg{footnoterange}, \ipkg{footnpag}, \epkg{manyfoot},
% \epkg{marginnote}\ejax, \spkg{nccfoots}\ejax, \spkg{pagenote}\ejax,
@@ -5794,8 +5851,9 @@ This boolean may be tested by the user for later use.
%
% Environments: & Standard \LaTeX{} environments. \\
%
-% \env{minipage}, \cs{parbox}: & Some \HTMLfive-imposed limitations.
-% Nested minipages are supported. \mpkg{eqparbox}, \mpkg{minibox}, \epkg{pbox},
+% Paragraphs, \env{minipage}, \cs{parbox}: & Some \HTMLfive-imposed limitations.
+% Nested minipages are supported. \mpkg{eqparbox}, \mpkg{fancypar},
+% \mpkg{minibox}, \epkg{pbox},
% \ipkg{shapepar}. \\
%
% Quotations: & \epkg{copyrightbox}, \spkg{csquotes}, \epkg{epigraph},
@@ -10439,6 +10497,34 @@ This boolean may be tested by the user for later use.
%
% \DescribePackage{graphics}%
% \DescribePackage{graphicx}%
+%
+% \begin{table}
+% \caption{\cs{includegraphics} and file names}
+% \label{tab:includegraphicsfilenames}
+% \begin{center}
+% \begin{threeparttable}
+% \begin{tabular}{ccl}
+% \toprule
+% Print image file & \HTML\ image file & Command to use \\
+% \midrule
+% \filenm{image.pdf}\tnote{a} & \filenm{image.svg}\tnote{a} & |\includegraphics{image}| \\
+% \filenm{image.eps}\tnote{a} & \filenm{image.svg}\tnote{a} & |\includegraphics{image}| \\
+% \filenm{image.jpg} & ---\tnote{b} & |\includegraphics{image}| \\
+% \filenm{image.png} & ---\tnote{b} & |\includegraphics{image}| \\
+% \filenm{image.JPG} & ---\tnote{b} & |\includegraphics{image.JPG}|\tnote{c} \\
+% \filenm{image.PNG} & ---\tnote{b} & |\includegraphics{image.PNG}|\tnote{c} \\
+% \filenm{image.jpg} & \filenm{image.gif} & |\includegraphics{image}| \\
+% \bottomrule
+% \end{tabular}
+% \begin{tablenotes}
+% \item[a:] Must be a lowercase file extension.
+% \item[b:] The same file is used for print and \HTML.
+% \item[c:] The uppercase extension must be specified.
+% \end{tablenotes}
+% \end{threeparttable}
+% \end{center}
+% \end{table}
+%
% \limitsgraphics
%
%
@@ -12698,16 +12784,16 @@ This boolean may be tested by the user for later use.
% \begin{macro}{\LWR@checkloadbefore}
-% \marg{thispackagename} \marg{packagename}
+% \marg{packagename}
%
-% If package names match, error if it is loaded after \pkg{lwarp}.
+% Given \cs{LWR@tempone} is the package name to compare to,
+% if package names match, error if it is loaded after \pkg{lwarp}.
%
% \changes{v0.63}{2018/12/02}{Added.}
%
% \begin{macrocode}
-\newcommand*{\LWR@checkloadbefore}[2]{%
- \edef\LWR@tempone{#1}%
- \ifdefstring{\LWR@tempone}{#2}{%
+\newcommand*{\LWR@checkloadbefore}[1]{%
+ \ifdefstring{\LWR@tempone}{#1}{%
\LWR@loadbefore{#1}%
}{}%
}
@@ -12718,41 +12804,51 @@ This boolean may be tested by the user for later use.
% \begin{macro}{\LWR@loadnever} \marg{badpackagename} \marg{replacementpkgnames}
%
% The first packages is not supported, so tell the user to use the second instead.
+% Factored from \cs{LWR@checkloadnever} and \cs{LWR@earlyloadnever}.
%
% \changes{v0.25}{2017/03/16}{Added the ability to prevent conflicting packages.}
+% \changes{v0.897}{2021/05/08}{Replacements now optional.}
%
% \begin{macrocode}
\newcommand*{\LWR@loadnever}[2]{%
\PackageError{lwarp}
{%
- Package #1 is not supported\MessageBreak
- by lwarp's HTML conversion.\MessageBreak
- Package(s)\MessageBreak
- \space\space#2\MessageBreak
- may be useful instead%
+ Package #1 is not yet supported\MessageBreak
+ by lwarp's HTML conversion%
+ \ifblank{#2}{}{%
+ .\MessageBreak
+ Package(s)\MessageBreak
+ \space\space#2\MessageBreak
+ may be useful instead%
+ }%
}
{%
Package #1 might conflict with lwarp in some way,\MessageBreak
- or is superceded by another package.\MessageBreak
- For a possible alternative, see package(s) #2.
+ or is superceded by another package.%
+ \ifblank{#2}{}{%
+ \MessageBreak
+ For possible alternatives, see package(s) #2.%
+ }%
}
}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\LWR@checkloadnever}
-% \marg{thispackagename} \marg{badpackagename} \marg{replacementpkgnames}
%
-% If this package name is the bad packagename, suggest the replacements instead.
+% \begin{macro}{\LWR@afterloadnever}
+% \marg{badpackagename} \marg{replacementpkgnames}
+%
+% Given: \cs{LWR@tempone} is set to the package name being tested against,
+% if this package name is the bad packagename, suggest the replacements instead.
+% This is used when loading packages after \pkg{lwarp}.
%
-% \changes{v0.63}{2018/12/01}{Added.}
+% \changes{v0.897}{2021/05/08}{Refactored.}
%
% \begin{macrocode}
-\newcommand*{\LWR@checkloadnever}[3]{%
- \edef\LWR@tempone{#1}%
- \ifdefstring{\LWR@tempone}{#2}{%
- \LWR@loadnever{#2}{#3}%
+\newcommand*{\LWR@afterloadnever}[2]{%
+ \ifdefstring{\LWR@tempone}{#1}{%
+ \LWR@loadnever{#1}{#2}%
}{}%
}
% \end{macrocode}
@@ -12762,10 +12858,10 @@ This boolean may be tested by the user for later use.
% \begin{macro}{\LWR@earlyloadnever} \marg{badpackagename} \marg{replacementpkgname}
%
% The first package is not supported, so tell the user to use the second instead.
-% This version checks immediately for packages which may have been loaded before \pkg{lwarp}.
+% This version checks immediately for packages which
+% may have been loaded before \pkg{lwarp}.
%
-% \changes{v0.54}{2018/04/06}{Added.}
-% \changes{v0.79}{2020/01/09}{Factored.}
+% \changes{v0.897}{2021/05/08}{Refactored.}
%
% \begin{macrocode}
\newcommand*{\LWR@earlyloadnever}[2]{%
@@ -12783,6 +12879,7 @@ This boolean may be tested by the user for later use.
% This version checks immediately for classes which may have been loaded before \pkg{lwarp}.
%
% \changes{v0.63}{2018/11/25}{Added.}
+% \changes{v0.897}{2021/05/08}{Replacements now optional.}
%
% \begin{macrocode}
\newcommand*{\LWR@earlyclassloadnever}[2]{%
@@ -12790,13 +12887,19 @@ This boolean may be tested by the user for later use.
\PackageError{lwarp}
{%
Class #1 is not supported\MessageBreak
- by lwarp's HTML conversion.\MessageBreak
- Class(es) #2 may be useful instead
+ by lwarp's HTML conversion%
+ \ifblank{#2}{}{%
+ .\MessageBreak
+ Class(es) #2 may be useful instead%
+ }%
}
{%
Class #1 might conflict with lwarp in some way,\MessageBreak
- or is superceded by another class.\MessageBreak
- For a possible alternative, see class(es) #2.
+ or is superceded by another class.%
+ \ifblank{#2}{}{%
+ \MessageBreak
+ For a possible alternative, see class(es) #2.%
+ }%
}
}{\relax}%
}
@@ -12805,6 +12908,7 @@ This boolean may be tested by the user for later use.
%
%
% \subsection{Error for disallowed packages and classes loaded before lwarp}
+%
% \changes{v0.54}{2018/04/06}{Added early check for disallowed packages.}
% \changes{v0.54}{2018/09/26}{Never load \pkg{aecompl}.}
% \changes{v0.62}{2018/11/18}{Added early checks for \pkg{CJK}, \pkg{CJKutf8}.}
@@ -12820,60 +12924,188 @@ This boolean may be tested by the user for later use.
% \changes{v0.893}{2020/11/15}{Allowed \pkg{picinpar}.}
% \changes{v0.895}{2021/01/19}{Allowed \pkg{epsf}.}
%
+%
+% \begin{macro}{\LWR@checkloadnevers}
+% Checks against a list of incompatible packages.
+%
+% \changes{v0.897}{2021/05/08}{Refactored.}
+%
% ^^A *earlyloadnever *loadnever
% \begin{macrocode}
-\LWR@earlyclassloadnever{jarticle}{ujarticle}
-\LWR@earlyclassloadnever{jbook}{ujbook}
-\LWR@earlyclassloadnever{jreport}{ujreport}
-\LWR@earlyclassloadnever{tarticle}{utarticle}
-\LWR@earlyclassloadnever{tbook}{utbook}
-\LWR@earlyclassloadnever{treport}{utreport}
-\LWR@earlyloadnever{ae}{cm-super, lmodern}
-\LWR@earlyloadnever{aecompl}{cm-super, lmodern}
-\LWR@earlyloadnever{aecc}{cm-super, lmodern}
-\LWR@earlyloadnever{alg}{algorithm2e, algorithmicx}
-\LWR@earlyloadnever{algorithmic}{algorithm2e, algorithmicx}
-\LWR@earlyloadnever{bitfield}{bytefield}
-\LWR@earlyloadnever{caption2}{caption}
-% \LWR@earlyloadnever{ccaption}{caption}% might be preloaded by memoir
-\LWR@earlyloadnever{colortab}{colortbl}
-\LWR@earlyloadnever{csvtools}{datatool}
-\LWR@earlyloadnever{doublespace}{setspace}
-\LWR@earlyloadnever{fancyheadings}{fancyhdr}
-\LWR@earlyloadnever{fncylab}{cleveref}
-\LWR@earlyloadnever{formula}{siunitx}
-\LWR@earlyloadnever{glossary}{glossaries}
-\LWR@earlyloadnever{hyper}{hyperref}
-\LWR@earlyloadnever{libgreek}{libertinust1math, newtx}
-\LWR@earlyloadnever{newthm}{ntheorem}
-\LWR@earlyloadnever{pdfcprot}{microtype}
-\LWR@earlyloadnever{picins}{floatflt, wrapfig}
-\LWR@earlyloadnever{rplain}{fancyhdr}
-\LWR@earlyloadnever{si}{siunitx}
-\LWR@earlyloadnever{sistyle}{siunitx}
-\LWR@earlyloadnever{slashbox}{diagbox}
-\LWR@earlyloadnever{statex}{statex2}
-\LWR@earlyloadnever{t1enc}{fontenc, inputenc, inputenx}
-\LWR@earlyloadnever{ucs}{inputenc, inputencx}
-\LWR@earlyloadnever{wasysym}{textcomp, amssymb, amsfonts, mnsymbol, fdsymbol}
+\newcommand*{\LWR@checkloadnevers}{
+\LWR@checkloadnever{ae}{cm-super, lmodern}
+\LWR@checkloadnever{aecompl}{cm-super, lmodern}
+\LWR@checkloadnever{aecc}{cm-super, lmodern}
+\LWR@checkloadnever{alg}{algorithm2e, algorithmicx}
+\LWR@checkloadnever{algorithmic}{algorithm2e, algorithmicx}
+\LWR@checkloadnever{bitfield}{bytefield}
% \end{macrocode}
-% The older \pkg{CJK} and \pkg{CJKutf8} only work with \pkg{xeCJK}:
+% \pkg{bxcjkatype} is based on \pkg{CJK}:
% \begin{macrocode}
-\@ifpackageloaded{xeCJK}{}{
- \LWR@earlyloadnever{CJK}{ctex, xeCJK}
- \LWR@earlyloadnever{CJKutf8}{ctex, xeCJK}
-}
+\LWR@checkloadnever{bxcjkjatype}{upLaTeX, bxjsarticle, ujarticle, utarticle}
% \end{macrocode}
-% \pkg{bxcjkatype} is based on \pkg{CJK}:
% \begin{macrocode}
-\LWR@earlyloadnever{bxcjkjatype}{upLaTeX, bxjsarticle, ujarticle, utarticle}
+\LWR@checkloadnever{caption2}{caption}
+% \LWR@checkloadnever{ccaption}{caption}% might be preloaded by memoir
+\LWR@checkloadnever{colortab}{colortbl}
+\LWR@checkloadnever{csvtools}{datatool}
+\LWR@checkloadnever{doublespace}{setspace}
+\LWR@checkloadnever{fancyheadings}{fancyhdr}
+\LWR@checkloadnever{fncylab}{cleveref}
+\LWR@checkloadnever{formula}{siunitx}
+\LWR@checkloadnever{glossary}{glossaries}
% \end{macrocode}
% \pkg{hangul} is not in TeXLive, and is not tested:
% \begin{macrocode}
-\LWR@earlyloadnever{hangul}{kotex, xetexko, luatexko}
+\LWR@checkloadnever{hangul}{kotex, xetexko, luatexko}
+% \end{macrocode}
+% \begin{macrocode}
+\LWR@checkloadnever{hyper}{hyperref}
+\LWR@checkloadnever{libgreek}{libertinust1math, newtx}
+\LWR@checkloadnever{newthm}{ntheorem}
+\LWR@checkloadnever{pdfcprot}{microtype}
+\LWR@checkloadnever{picins}{floatflt, wrapfig}
+\LWR@checkloadnever{rplain}{fancyhdr}
+\LWR@checkloadnever{si}{siunitx}
+\LWR@checkloadnever{sistyle}{siunitx}
+\LWR@checkloadnever{slashbox}{diagbox}
+\LWR@checkloadnever{statex}{statex2}
+\LWR@checkloadnever{t1enc}{fontenc, inputenc, inputenx}
+\LWR@checkloadnever{ucs}{inputenc, inputencx}
+\LWR@checkloadnever{wasysym}{textcomp, amssymb, amsfonts, mnsymbol, fdsymbol}
+% \end{macrocode}
+%
+% The following may one day be supported by lwarp:
+%
+% ^^A *notyet
+% \begin{macrocode}
+% \LWR@checkloadnever{adjustbox}{}% req'd for menukeys
+\LWR@checkloadnever{animate}{}
+\LWR@checkloadnever{auto-pst-pdf}{}
+\LWR@checkloadnever{auto-pst-pdf-lua}{}
+\LWR@checkloadnever{algorithms}{}
+\LWR@checkloadnever{arraycols}{}
+\LWR@checkloadnever{beamer}{}
+\LWR@checkloadnever{bidi}{}
+\LWR@checkloadnever{cals}{}
+\LWR@checkloadnever{cellspace}{}
+\LWR@checkloadnever{cgloss4e}{}
+\LWR@checkloadnever{colophon}{}
+\LWR@checkloadnever{cooltooltips}{}
+\LWR@checkloadnever{covington}{}
+\LWR@checkloadnever{crbox}{}
+\LWR@checkloadnever{decision-table}{}
+\LWR@checkloadnever{dvgloss}{}
+\LWR@checkloadnever{ednotes}{}
+\LWR@checkloadnever{edfnotes}{}
+\LWR@checkloadnever{eledform}{}
+\LWR@checkloadnever{eledmac}{}
+\LWR@checkloadnever{embedfile}{}
+\LWR@checkloadnever{endnotes-hy}{endnotes}
+\LWR@checkloadnever{expex}{}
+\LWR@checkloadnever{fancytooltips}{}
+\LWR@checkloadnever{fixocgx}{}
+\LWR@checkloadnever{flowfram}{}
+\LWR@checkloadnever{gb4e}{}
+\LWR@checkloadnever{gmverse}{}
+\LWR@checkloadnever{graphbox}{}
+\LWR@checkloadnever{graphicxbox}{}
+\LWR@checkloadnever{hvfloat}{}
+\LWR@checkloadnever{inline-images}{}
+\LWR@checkloadnever{isorot}{rotating}
+\LWR@checkloadnever{ledmac}{}
+\LWR@checkloadnever{linguex}{}
+\LWR@checkloadnever{longdiv}{}
+\LWR@checkloadnever{longfigure}{}
+\LWR@checkloadnever{longtabu}{}
+\LWR@checkloadnever{mdwenv}{}
+\LWR@checkloadnever{mdwlist}{}
+\LWR@checkloadnever{mdwtab}{}
+\LWR@checkloadnever{navigator}{}
+\LWR@checkloadnever{nccpic}{}
+\LWR@checkloadnever{nccsect}{}
+\LWR@checkloadnever{newvbtm}{}
+\LWR@checkloadnever{ocg-p}{}
+\LWR@checkloadnever{ocgtools}{}
+\LWR@checkloadnever{ocgx}{}
+\LWR@checkloadnever{ocgx2}{}
+\LWR@checkloadnever{parrun}{}
+\LWR@checkloadnever{poemscol}{}
+\LWR@checkloadnever{poetry}{}
+\LWR@checkloadnever{program}{}
+\LWR@checkloadnever{proofread}{}
+\LWR@checkloadnever{pst-pdf}{}
+\LWR@checkloadnever{refstyle}{}
+\LWR@checkloadnever{robustindex}{}
+\LWR@checkloadnever{robustglossary}{}
+\LWR@checkloadnever{semioneside}{}
+\LWR@checkloadnever{slemph}{}
+\LWR@checkloadnever{snotez}{sidenotes}
+\LWR@checkloadnever{spacingtricks}{}
+\LWR@checkloadnever{sverb}{verbatim, fancyvrb}
+\LWR@checkloadnever{syntax}{}
+\LWR@checkloadnever{tablists}{}
+\LWR@checkloadnever{tabto}{}
+\LWR@checkloadnever{tabu}{}
+\LWR@checkloadnever{tabularht}{}
+\LWR@checkloadnever{tabularkv}{}
+\LWR@checkloadnever{thumby}{}
+\LWR@checkloadnever{titles}{}
+\LWR@checkloadnever{typehtml}{}
+\LWR@checkloadnever{unicode-bidi}{}
+\LWR@checkloadnever{vcell}{}
+\LWR@checkloadnever{xhfill}{}
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\LWR@checkloadnever} \marg{badpackagename} \marg{replacementpkgname}
+%
+% The first package is not supported, so tell the user to use the second instead.
+%
+% When \pkg{lwarp} is first loaded, this is set to \cs{LWR@earlyloadnever}
+% to check for incompatible packages which were loaded before \pkg{lwarp}.
+% After \pkg{lwarp} is loaded, this is changed to \cs{LWR@afterloadnever} to
+% check for incompatible packages during \cs{usepackage}.
+%
+% \changes{v0.897}{2021/05/08}{Refactored.}
+%
+% \begin{macrocode}
+\LetLtxMacro\LWR@checkloadnever\LWR@earlyloadnever
+% \end{macrocode}
+% \end{macro}
+%
+%
+% Now check for incompatible packages which have been loaded before \pkg{lwarp}:
+% \begin{macrocode}
+\LWR@checkloadnevers
+% \end{macrocode}
+%
+%
+% The older \pkg{CJK} and \pkg{CJKutf8} only work with \pkg{xeCJK}:
+% \begin{macrocode}
+\@ifpackageloaded{xeCJK}{}{
+ \LWR@checkloadnever{CJK}{ctex, xeCJK}
+ \LWR@checkloadnever{CJKutf8}{ctex, xeCJK}
+}
+% \end{macrocode}
+%
+%
+% Some classes do not work with \pkg{lwarp}:
+% \begin{macrocode}
+\LWR@earlyclassloadnever{jarticle}{ujarticle}
+\LWR@earlyclassloadnever{jbook}{ujbook}
+\LWR@earlyclassloadnever{jreport}{ujreport}
+\LWR@earlyclassloadnever{tarticle}{utarticle}
+\LWR@earlyclassloadnever{tbook}{utbook}
+\LWR@earlyclassloadnever{treport}{utreport}
+\LWR@earlyclassloadnever{novel}{}
+\LWR@earlyclassloadnever{powerdot}{}
% \end{macrocode}
%
%
+%
% \subsection{Enforcing package loading after \pkg{lwarp}}
%
% Packages which should only be loaded after \pkg{lwarp} are tested
@@ -12961,6 +13193,7 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{cases}
% catoptions is supported by the lwarp core
% \LWR@loadafter{ccaption}% may be preloaded by memoir
+\LWR@loadafter{centerlastline}
% \LWR@loadafter{centernot}% may be preloaded by newtx
\LWR@loadafter{changebar}
\LWR@loadafter{changelayout}
@@ -12995,6 +13228,7 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{dblfnote}
\LWR@notmemoirloadafter{dcolumn}
\LWR@loadafter{decimal}
+\LWR@loadafter{decorule}
\LWR@loadafter{diagbox}
\LWR@loadafter{dingbat}
\LWR@loadafter{DotArrow}
@@ -13036,6 +13270,7 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{extramarks}
\LWR@loadafter{fancybox}
\LWR@loadafter{fancyhdr}
+\LWR@loadafter{fancypar}
\LWR@loadafter{fancyref}
\LWR@loadafter{fancytabs}
\LWR@loadafter{fancyvrb}
@@ -13076,6 +13311,7 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{fouridx}
% fourier may be loaded before lwarp
\LWR@loadafter{framed}
+\LWR@loadafter{froufrou}
\LWR@loadafter{ftcap}
\LWR@loadafter{ftnright}
\LWR@loadafter{fullminipage}
@@ -13240,6 +13476,7 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{parcolumns}
\LWR@loadafter{parnotes}
\LWR@notmemoirloadafter{parskip}
+\LWR@loadafter{pbalance}
\LWR@loadafter{pbox}
\LWR@loadafter{pdfcol}
\LWR@loadafter{pdfcolfoot}
@@ -13330,6 +13567,7 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{simplebnf}
\LWR@loadafter{SIunits}
\LWR@loadafter{siunitx}
+\LWR@loadafter{siunitx-v2}
\LWR@loadafter{skmath}
\LWR@loadafter{slantsc}
\LWR@loadafter{slashed}
@@ -15514,6 +15752,10 @@ This boolean may be tested by the user for later use.
% \section{Loading packages}
%
%
+% \cs{RequirePackage} and \cs{usepackage} are modified to error-check
+% for certain packages, and for \HTML\ they load the \pkg{lwarp-} version if
+% it exists.
+%
% \codeall
% \begin{macrocode}
\begin{warpall}
@@ -15566,10 +15808,18 @@ This boolean may be tested by the user for later use.
}
% \end{macrocode}
% \end{macro}
-%
-
-
-
+%
+%
+% \begin{macro}{\LWR@checkloadnever} \marg{bad package name} \marg{replacement package names}
+%
+% From now on, check for incompatible packages loaded via \cs{usepackage},
+% instead of packages loaded before \pkg{lwarp}:
+% \begin{macrocode}
+\LetLtxMacro\LWR@checkloadnever\LWR@afterloadnever
+% \end{macrocode}
+% \end{macro}
+%
+%
% \begin{macro}{\LWR@checkloadfilename} \marg{filename}
% Checks if this filename should be loaded after \pkg{lwarp},
% or never at all.
@@ -15589,65 +15839,48 @@ This boolean may be tested by the user for later use.
% \changes{v0.893}{2020/11/15}{Allowed \pkg{picinpar}.}
% \changes{v0.895}{2021/01/19}{Allowed \pkg{epsf}.}
-% The following should never be loaded:
%
-% ^^A *checkload *loadnever
+% ^^A *checkload
% \begin{macrocode}
\newcommand*{\LWR@checkloadfilename}[1]{%
-\LWR@checkloadnever{#1}{ae}{cm-super, lmodern}
-\LWR@checkloadnever{#1}{aecc}{cm-super, lmodern}
-\LWR@checkloadnever{#1}{aecompl}{cm-super, lmodern}
-\LWR@checkloadnever{#1}{alg}{algorithm2e, algorithmicx}
-\LWR@checkloadnever{#1}{algorithmic}{algorithm2e, algorithmicx}
-\LWR@checkloadnever{#1}{bitfield}{bytefield}
-\LWR@checkloadnever{#1}{caption2}{caption}
-\LWR@checkloadnever{#1}{ccaption}{caption}% might be preloaded by memoir
-\LWR@checkloadnever{#1}{colortab}{colortbl}
-\LWR@checkloadnever{#1}{csvtools}{datatool}
-\LWR@checkloadnever{#1}{doublespace}{setspace}
-\LWR@checkloadnever{#1}{fancyheadings}{fancyhdr}
-\LWR@checkloadnever{#1}{fncylab}{cleveref}
-\LWR@checkloadnever{#1}{formula}{siunitx}
-\LWR@checkloadnever{#1}{glossary}{glossaries}
-\LWR@checkloadnever{#1}{hyper}{hyperref}
-\LWR@checkloadnever{#1}{libgreek}{libertinust1math, newtx}
-\LWR@checkloadnever{#1}{newthm}{ntheorem}
-\LWR@checkloadnever{#1}{pdfcprot}{microtype}
-\LWR@checkloadnever{#1}{picins}{floatflt, wrapfig}
-\LWR@checkloadnever{#1}{rplain}{fancyhdr}
-\LWR@checkloadnever{#1}{si}{siunitx}
-\LWR@checkloadnever{#1}{sistyle}{siunitx}
-\LWR@checkloadnever{#1}{slashbox}{diagbox}
-\LWR@checkloadnever{#1}{statex}{statex2}
-\LWR@checkloadnever{#1}{t1enc}{fontenc, inputenc, inputenx}
-\LWR@checkloadnever{#1}{ucs}{inputenc, inputencx}
-\LWR@checkloadnever{#1}{wasysym}{textcomp, amssymb, amsfonts, mnsymbol, fdsymbol}
-\LWR@checkloadnever{#1}{bxcjkjatype}{upLaTeX, bxjsarticle, ujarticle, utarticle}
-\LWR@checkloadnever{#1}{hangul}{kotex, xetexko, luatexko}
% \end{macrocode}
%
+% Remember the package name to compare with, to be used
+% by \cs{LWR@checkloadnever} and \cs{LWR@checkloadbefore}.
+% \begin{macrocode}
+ \edef\LWR@tempone{#1}%
+% \end{macrocode}
+%
+% Check against the list of packages which should never be loaded:
+%
+% \changes{v0.897}{2021/05/08}{Refactored.}
+% \begin{macrocode}
+ \LWR@checkloadnevers
+% \end{macrocode}
+%
+%
% ^^A *loadbefore
% The following should only be loaded before \pkg{lwarp}:
% \changes{v0.895}{2021/01/14}{\pkg{kpfonts} load before \pkg{lwarp}.}
% \begin{macrocode}
-\LWR@checkloadbefore{#1}{ctex}
-\LWR@checkloadbefore{#1}{fontspec}
-\LWR@checkloadbefore{#1}{inputenc}
-\LWR@checkloadbefore{#1}{inputenx}
-\LWR@checkloadbefore{#1}{nfssext-cfr}
-\LWR@checkloadbefore{#1}{fontaxes}
-\LWR@checkloadbefore{#1}{kotex}
-\LWR@checkloadbefore{#1}{kpfonts}% textcomp option clash
-\LWR@checkloadbefore{#1}{luatexja}
-\LWR@checkloadbefore{#1}{luatexja-fontspec}
-\LWR@checkloadbefore{#1}{luatexko}
-\LWR@checkloadbefore{#1}{morewrites}
-\LWR@checkloadbefore{#1}{newclude}
-\LWR@checkloadbefore{#1}{newunicodechar}
-\LWR@checkloadbefore{#1}{plext}
-\LWR@checkloadbefore{#1}{xeCJK}
-\LWR@checkloadbefore{#1}{xetexko}
-\LWR@checkloadbefore{#1}{zxjatype}
+ \LWR@checkloadbefore{ctex}
+ \LWR@checkloadbefore{fontspec}
+ \LWR@checkloadbefore{inputenc}
+ \LWR@checkloadbefore{inputenx}
+ \LWR@checkloadbefore{nfssext-cfr}
+ \LWR@checkloadbefore{fontaxes}
+ \LWR@checkloadbefore{kotex}
+ \LWR@checkloadbefore{kpfonts}% textcomp option clash
+ \LWR@checkloadbefore{luatexja}
+ \LWR@checkloadbefore{luatexja-fontspec}
+ \LWR@checkloadbefore{luatexko}
+ \LWR@checkloadbefore{morewrites}
+ \LWR@checkloadbefore{newclude}
+ \LWR@checkloadbefore{newunicodechar}
+ \LWR@checkloadbefore{plext}
+ \LWR@checkloadbefore{xeCJK}
+ \LWR@checkloadbefore{xetexko}
+ \LWR@checkloadbefore{zxjatype}
}
% \end{macrocode}
% \end{macro}
@@ -15772,16 +16005,17 @@ This boolean may be tested by the user for later use.
% Error if braces are used in optional argument.
% This can cause an error, so tell how to avoid.
% \changes{v0.896}{2021/03/14}{Warn if package option has braces.}
+% \changes{v0.897}{2021/05/08}{Fixed warning.}
% \begin{macrocode}
\IfSubStr{\detokenize\expandafter{#1}}{\LWRleftbrace}%
{%
\PackageError{lwarp}{%
You used:\MessageBreak
- \protect\requirepackage[#1]{#2}\MessageBreak
+ \protect\usepackage[#1]{#2}\MessageBreak
Braces in the package options will fail with Lwarp.\MessageBreak
Instead, use:\MessageBreak
\protect\PassOptionsToPackage{#1}{#2}\MessageBreak
- \protect\requirepackage{#2}\MessageBreak
+ \protect\usepackage{#2}\MessageBreak
near the line number given below.\MessageBreak
Enter 'h' for more info%
}%
@@ -20280,7 +20514,7 @@ MathJax = {
-- Copyright 2016-2021 Brian Dunn
-printversion = "v0.896"
+printversion = "v0.897"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -33774,7 +34008,7 @@ end -- not --version
-% \begin{macro}{\LWR@href} \oarg{options} \marg{URL}
+% \begin{macro}{\LWR@href} \oarg{options} \marg{URL} \marg{text}
%
% Create a link with accompanying text:
%
@@ -34741,19 +34975,22 @@ end -- not --version
% \end{macro}
-% \subsection{High-level \TOC\ commands}
+% \subsection{\TOC\ commands}
% \label{sec:listof}
-% \begin{macro}{\listof} \marg{type} \marg{title}
+% \begin{macro}{\LWR@listof} \marg{type} \marg{title}
%
-% Emulate the \cs{listof} command from the \pkg{float} package (\cref{sec:newfloat}).
+% Emulate the \cs{listof} command
+% from the \pkg{float} package (\cref{sec:float}).
% Used to create lists of custom float types. Also used to redefine
-% the standard \LaTeX{} \cs{listoffigures} and \cs{listoftables} commands.
+% the standard \LaTeX{} \cs{listoffigures} and \cs{listoftables} commands,
+% and in \pkg{tocloft} and \pkg{memoir}.
%
% \changes{v0.57}{2018/05/26}{Fix: Provide \cs{l@name} if not defined.}
% \changes{v0.61}{2018/09/26}{Fix: \pkg{newfloat} lists.}
+% \changes{v0.897}{2021/05/18}{Improved compatibility with \pkg{newfloat}, \pkg{keyfloat}.}
% \begin{macrocode}
-\NewDocumentCommand{\listof}{m +m}{%
+\NewDocumentCommand{\LWR@listof}{m +m}{%
\@ifundefined{l@#1}{%
\csdef{l@#1}##1##2{\hypertocfloat{1}{#1}{\@nameuse{ext@#1}}{##1}{##2}}%
}{}%
@@ -38876,6 +39113,7 @@ end -- not --version
% Options for siunitx:
% \changes{v0.50}{2018/02/24}{\pkg{siunitx}: Improved units.}
+% \changes{v0.897}{2021/05/23}{\pkg{siunitx}: Rollback for v2.}
% \begin{macrocode}
\newrobustcmd{\LWR@siunitx@textcelsius}{\HTMLentity{deg}C}
\newrobustcmd{\LWR@siunitx@textdegree}{\HTMLentity{deg}}
@@ -38898,7 +39136,7 @@ end -- not --version
text-degree = {\LWR@siunitx@textdegree},
text-arcminute = {\LWR@siunitx@textprime} ,
text-arcsecond = {\LWR@siunitx@textdblprime} ,
-}{siunitx}
+}{siunitx-v2}
% \end{macrocode}
% \begin{macrocode}
@@ -41819,7 +42057,7 @@ color:\LWR@origpound\LWR@tempcolor%
% \changes{v0.45}{2017/12/03}{\pkg{memoir}: Added.}
% \changes{v0.84}{2020/03/31}{\pkg{memoir}: Preloads \pkg{xcolor}.}
%
-% \codeall
+% \codeprint
% \begin{macrocode}
\begin{warpprint}
\@ifclassloaded{memoir}{\LWR@origRequirePackage{xcolor}}{}
@@ -47789,6 +48027,34 @@ s%
%
%
%
+% \iffalse
+%<*centerlastline>
+% \fi
+%
+% \part{lwarp-centerlastline.sty}
+%
+% \section{centerlastline}
+%
+% \DescribePackage{centerlastline}
+% \pkg{centerlastline} is ignored.
+%
+% \changes{v0.897}{2021/04/18}{\pkg{centerlastline}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{centerlastline}[2020/10/12]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\providecommand{\centerlastline}{}
+\def\endcenterlastline{\par}
+% \end{macrocode}
+%
+% \iffalse
+%</centerlastline>
+% \fi
+%
%
% \iffalse
%<*centernot>
@@ -51391,6 +51657,45 @@ name = \chemmacros_translate:n {scheme-name}
%
%
% \iffalse
+%<*decorule>
+% \fi
+%
+% \part{lwarp-decorule.sty}
+%
+% \section{decorule}
+%
+% \credits{Peter Flynn}
+%
+% \DescribePackage{decorule}
+% \pkg{decorule} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.897}{2021/05/02}{\pkg{decorule}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{decorule}[2020/04/01]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\xpretocmd{\decorule}
+ {\begin{lateximage}*[decorule]}
+ {}
+ {\LWR@patcherror{decorule}{decorule A}}
+
+\xapptocmd{\decorule}
+ {\end{lateximage}}
+ {}
+ {\LWR@patcherror{decorule}{decorule B}}
+% \end{macrocode}
+%
+% \iffalse
+%</decorule>
+% \fi
+%
+%
+%
+% \iffalse
%<*diagbox>
% \fi
%
@@ -54276,6 +54581,96 @@ name = \chemmacros_translate:n {scheme-name}
%
%
% \iffalse
+%<*fancypar>
+% \fi
+%
+% \part{lwarp-fancypar.sty}
+%
+% \section{fancypar}
+%
+% \credits{Gonzalo Medina}
+%
+% \DescribePackage{fancypar}
+% \pkg{fancypar} is used as-is for print output,
+% and emulated for \HTML.
+%
+% \cs{NotebookPar} and related are used as-is inside a \env{lateximage},
+% \trouble[\CSS\ classes]{fancypar=\pkg{fancypar}}
+% but for \HTML\ these are emulated as a \element{div} of
+% class \attribute{NotebookPar}, etc.
+% For \HTML, the package options and the macro optional arguments are ignored.
+% The user must provide custom \CSS\ for each if visual effects are required.
+% See \cref{sec:csscustomization}.
+%
+% If using a custom paragraph style,
+% \trouble[custom styles]{fancypar=\pkg{fancypar}}
+% such as \cs{MyStylePar} from the documentation,
+% use the following to generate an \HTML\ \element{div} of class \attribute{MyStylePar}:
+% \begin{sourceverb}
+% ... (existing definiton of \MyStylePar, print version) ...
+% \begin{warpHTML}
+% \AddFancyparClass{MyStyle}
+% \end{warpHTML}
+% \end{sourceverb}
+% \cs{MyStylePar} is then modified to emulate \HTML.
+% An optional argument is allowed, which is ignored.
+%
+% \changes{v0.897}{2021/05/02}{\pkg{fancypar}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{fancypar}[2019/01/18]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begin{warpHTML}
+\makeatletter
+
+\newcommand{\LWR@fancypar}[2]{%
+ \begin{BlockClass}{#1Par}
+ #2
+ \end{BlockClass}
+}
+
+\newcommand{\LWR@HTML@NotebookPar}[2][]{\LWR@fancypar{Notebook}{#2}}
+\LWR@formatted{NotebookPar}
+
+\newcommand{\LWR@HTML@ZebraPar}[2][]{\LWR@fancypar{Zebra}{#2}}
+\LWR@formatted{ZebraPar}
+
+\newcommand{\LWR@HTML@DashedPar}[2][]{\LWR@fancypar{Dashed}{#2}}
+\LWR@formatted{DashedPar}
+
+\newcommand{\LWR@HTML@MarkedPar}[2][]{\LWR@fancypar{Marked}{#2}}
+\LWR@formatted{MarkedPar}
+
+\newcommand{\LWR@HTML@UnderlinedPar}[2][]{\LWR@fancypar{Underlined}{#2}}
+\LWR@formatted{UnderlinedPar}
+
+
+\newcommand{\LWR@HTML@add@fancy@format}{}
+\LWR@formatted{add@fancy@format}
+
+
+\newcommand{\AddFancyparClass}[1]{%
+ \expandafter\newcommand\csname LWR@HTML@#1Par\endcsname[2][]{%
+ \LWR@fancypar{#1}{##2}%
+ }
+ \LWR@formatted{#1Par}
+}
+
+\makeatother
+\end{warpHTML}
+% \end{macrocode}
+%
+% \iffalse
+%</fancypar>
+% \fi
+%
+%
+%
+% \iffalse
%<*fancyref>
% \fi
%
@@ -55210,7 +55605,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \codehtml
%
% \begin{macrocode}
-\LWR@ProvidesPackagePass{fixme}[2017/03/05]
+\LWR@ProvidesPackagePass{fixme}[2019/01/03]
% \end{macrocode}
%
% Restore \pkg{lwarp}'s version of \cs{@wrindex},
@@ -55231,35 +55626,41 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
}
% \end{macrocode}
%
-% Other modifications:
+% Other modifications.
+% Done \cs{AtBeginDocument} to hopefully work if the user customizes the layouts.
+% \changes{v0.897}{2021/04/19}{\pkg{fixme}: Modified \cs{AtBeginDocument}.}
% \begin{macrocode}
+\AtBeginDocument{
+
\def\FXFaceInlineHTMLStyle{font-weight:bold}
-\renewcommand*\FXLayoutInline[3]{ %
-\InlineClass[\FXFaceInlineHTMLStyle]{fixmeinline}%
- {\@fxtextstd{#1}{#2}{#3}}%
+\renewcommand*\FXLayoutInline[3]{ % space
+ \InlineClass[\FXFaceInlineHTMLStyle]{fixmeinline}%
+ {\@fxtextstd{#1}{#2}{#3}}%
}
\def\FXFaceEnvHTMLStyle{font-weight:bold}
\renewcommand*\FXEnvLayoutPlainBegin[2]{%
-\BlockClass[\FXFaceEnvHTMLStyle]{fixmebold}
-\ignorespaces#2 \fxnotename{#1}: \ignorespaces}
+ \BlockClass[\FXFaceEnvHTMLStyle]{fixmebold}
+ \ignorespaces#2 \fxnotename{#1}: \ignorespaces%
+}
\renewcommand*\FXEnvLayoutPlainEnd[2]{\endBlockClass}
\renewcommand*\FXEnvLayoutSignatureBegin[2]{%
-\BlockClass[\FXFaceEnvHTMLStyle]{fixmebold}
-\fxnotename{#1}: \ignorespaces}
+ \BlockClass[\FXFaceEnvHTMLStyle]{fixmebold}
+ \fxnotename{#1}: \ignorespaces%
+}
\renewcommand*\FXEnvLayoutSignatureEnd[2]{\@fxsignature{#2}\endBlockClass}
\def\FXFaceSignatureHTMLStyle{font-style:italic}
\DeclareRobustCommand*\@fxsignature[1]{%
-\ifthenelse{\equal{#1}{}}%
- {}%
- { -- {\InlineClass[\FXFaceSignatureHTMLStyle]{fixmesignature}{#1}}}%
+ \ifthenelse{\equal{#1}{}}%
+ {}%
+ { -- {\InlineClass[\FXFaceSignatureHTMLStyle]{fixmesignature}{#1}}}%
}
@@ -55268,6 +55669,8 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\renewcommand\FXTargetLayoutPlain[2]{%
\InlineClass[\FXFaceTargetHTMLStyle]{fixmetarget}{#2}%
}
+
+}% \AtBeginDocument
% \end{macrocode}
% \iffalse
@@ -55410,6 +55813,10 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% |boxed|, or |ruled|, so \CSS\ may be used to format by float style as well.
% Default formatting by \CSS\ is provided for |ruled| and |boxed| styles.
%
+% Always declare a \cs{newfloat} before modifying it with \cs{floatname}, etc.
+% \trouble[not seem to be a floating environment]{float>not seem to be a floating environment}
+% \trouble{float=\pkg{float}}
+%
% \changes{v0.20}{2017/01/22}{\pkg{float}: Improved float caption type handling.}
%
% \codehtml
@@ -55417,8 +55824,9 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\LWR@ProvidesPackageDrop{float}[2001/11/08]
% \end{macrocode}
+
% \begin{macro}{\LWR@floatstyle}
-% The default float style:
+% The default float style.
% \begin{macrocode}
\newcommand*{\LWR@floatstyle}{plain}
% \end{macrocode}
@@ -55437,11 +55845,13 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
{\DeclareFloatingEnvironment[fileext=#3,within=#4]{#1}}%
{\DeclareFloatingEnvironment[fileext=#3]{#1}}%
% \end{macrocode}
+%
% Remember the float style:
% \changes{v0.57}{2018/05/14}{\pkg{float}: Added float styles.}
% \begin{macrocode}
\csedef{LWR@floatstyle@#1}{\LWR@floatstyle}%
% \end{macrocode}
+%
% \pkg{newfloat} package automatically creates the \cs{listof} command
% for new floats, but \pkg{float} does not,
% so remove \cs{listof} here in case it is manually created later.
@@ -55449,6 +55859,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\cslet{listof#1s}\relax%
\cslet{listof#1es}\relax%
% \end{macrocode}
+%
% Likesize, \pkg{newfloat} also creates \cs{l@<type>}, but \pkg{float} does not,
% so remove it here:
% \changes{v0.57}{2018/05/26}{\pkg{float}: Fix: Do not pre-define \cs{l@name}.}
@@ -55474,6 +55885,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \end{macrocode}
% \end{noindmacro}
+
% \begin{noindmacro}{\floatplacement} \marg{type} \marg{placement}
%
% Float placement is ignored.
@@ -55484,16 +55896,18 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \end{macrocode}
% \end{noindmacro}
+
% \begin{noindmacro}{\floatstyle} \marg{style}
%
% Remember the style for future floats:
% \begin{macrocode}
\newcommand{\floatstyle}[1]{%
\def\LWR@floatstyle{#1}%
-}
+}%
% \end{macrocode}
% \end{noindmacro}
+
% \begin{noindmacro}{\restylefloat} * \marg{type}
%
% Remember the style for this float:
@@ -55504,8 +55918,13 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \end{macrocode}
% \end{noindmacro}
+
% \begin{noindmacro}{\listof}
-% See \cref{sec:listof} for the \cs{listof} command in the \pkg{lwarp} core.
+% See \cref{sec:listof} for the \cs{LWR@listof} command in the \pkg{lwarp} core.
+% \changes{v0.897}{2021/05/18}{\pkg{float}: Improved compatibility with \pkg{newfloat}, \pkg{keyfloat}.}
+% \begin{macrocode}
+\newcommand{\listof}{\LWR@listof}
+% \end{macrocode}
% \end{noindmacro}
% \iffalse
@@ -57119,6 +57538,54 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
%
%
%
+% \iffalse
+%<*froufrou>
+% \fi
+%
+% \part{lwarp-froufrou.sty}
+%
+% \section{froufrou}
+%
+% \credits{Nelson Lago}
+%
+% \DescribePackage{froufrou}
+% \pkg{froufrou} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.897}{2021/05/02}{\pkg{froufrou}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{froufrou}[2020/12/22]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ExplSyntaxOn
+\xpretocmd{\setfroufrou}
+ {\edef\LWR@latestfroufrou{\detokenize{#1}}}
+ {}
+ {\LWR@patcherror{froufrou}{setfroufrou}}
+\ExplSyntaxOff
+
+\xpatchcmd{\@realfroufrou}
+ {\@froufrouOrnament}
+ {%
+ \begin{center}
+ \begin{lateximage}*[froufrou][\LWR@latestfroufrou]%
+ \@froufrouOrnament%
+ \end{lateximage}
+ \end{center}
+ }
+ {}
+ {\LWR@patcherror{froufrou}{@realfroufrou}}
+% \end{macrocode}
+%
+% \iffalse
+%</froufrou>
+% \fi
+%
+%
+%
%
% \iffalse
%<*ftcap>
@@ -58429,9 +58896,9 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \begin{noindmacro}{\LWR@includegraphicsb} * \oarg{2: options} \oarg{3: options} \marg{4: filename}
%
-% \pkg{graphics} syntax is \cs{includegraphics} * \oarg{llx,lly} \oarg{urx,ury} \marg{file}
+% \pkg{graphics} syntax is \cs{includegraphics} * \oarg{llx,lly} \oarg{urx,ury} \marg{filename}
%
-% \pkg{graphicx} syntax is \cs{includegraphics} \oarg{key values} \marg{file}
+% \pkg{graphicx} syntax is \cs{includegraphics} \oarg{key values} \marg{filename}
%
% If |#3| is empty, only one optional argument was given, thus \pkg{graphicx} syntax.
%
@@ -58507,6 +58974,10 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
%
% Fully expand and detokenize the filename,
% changing the file extension to \filenm{.svg} if necessary.
+%
+% Note that uppercase file extensions are detected and reported as lowercase,
+% so \pkg{lwarp} can only report to the browser lowercase extensions,
+% so all images must have lowercase file extensions.
% \changes{v0.59}{2018/08/28}{\pkg{graphics}: Fix: Expand filename.}
% \changes{v0.61}{2018/10/01}{\pkg{graphics}: Set keys before using filename, for \pkg{epsfig}.}
% \begin{macrocode}
@@ -71852,6 +72323,36 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
%
%
%
+% \iffalse
+%<*pbalance>
+% \fi
+%
+% \part{lwarp-pbalance.sty}
+%
+% \section{pbalance}
+%
+% \DescribePackage{pbalance}
+% \pkg{pbalance} is ignored.
+%
+% \changes{v0.897}{2021/04/18}{\pkg{pbalance}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\RequirePackage{balance}
+
+\LWR@ProvidesPackageDrop{pbalance}[2020/12/16]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\shrinkLastPage[1]{}
+% \end{macrocode}
+%
+% \iffalse
+%</pbalance>
+% \fi
+%
+%
%
%
% \iffalse
@@ -77113,7 +77614,64 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \credits{Joseph Wright}
%
% \DescribePackage{siunitx}
-% \pkg{siunitx} is patched for use by \pkg{lwarp},
+% \pkg{siunitx-v2} is patched for use by \pkg{lwarp},
+% and is emulated for \brand{MathJax}.
+% Use as:
+% \begin{sourceverb}
+% \usepackage{siunitx}[=v2]
+% \end{sourceverb}
+%
+% \pkg{siunitx} v3 is not yet supported.
+%
+% ^^A \limitssiunitx
+%
+% \changes{v0.897}{2021/05/23}{\pkg{siunitx}: Rollback for v2.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\providecommand\DeclareRelease[3]{}
+\providecommand\DeclareCurrentRelease[2]{}
+
+\DeclareRelease{2}{2010-05-23}{lwarp-siunitx-v2.sty}
+\DeclareRelease{v2}{2010-05-23}{lwarp-siunitx-v2.sty}
+\DeclareCurrentRelease{}{2021-05-17}
+
+\PackageWarningNoLine{lwarp}
+ {%
+ **************\MessageBreak
+ Siunitx version 3 is not yet supported by Lwarp.\MessageBreak
+ V2 emulation is used here.\MessageBreak
+ **************
+ }
+
+\RequirePackage{xcolor}% for \convertcolorspec
+
+% \LWR@ProvidesPackagePass{siunitx}[2021-05-21]
+
+\RequirePackage{siunitx-v2}
+% \end{macrocode}
+
+% \iffalse
+%</siunitx>
+% \fi
+%
+%
+%
+%
+%
+% \iffalse
+%<*siunitx-v2>
+% \fi
+%
+% \part{lwarp-siunitx-v2.sty}
+
+% \section{siunitx-v2}
+%
+% \credits{Joseph Wright}
+%
+% \DescribePackage{siunitx-v2}
+% \pkg{siunitx-v2} is patched for use by \pkg{lwarp},
% and is emulated for \brand{MathJax}.
%
% \limitssiunitx
@@ -77122,24 +77680,25 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \changes{v0.37}{2017/08/17}{\pkg{siunitx}: Improved symbol support.}
% \changes{v0.38}{2017/08/26}{\pkg{siunitx}: Removed from \pkg{lwarp} core.}
% \changes{v0.50}{2018/10/23}{\pkg{siunitx}: Fix: Loads \pkg{xcolor}.}
+% \changes{v0.897}{2021/05/23}{\pkg{siunitx-v2}: Rollback for v2.}
%
% \codehtml
%
% \begin{macrocode}
\RequirePackage{xcolor}% for \convertcolorspec
-\LWR@ProvidesPackagePass{siunitx}[2018/05/17]
+\LWR@ProvidesPackagePass{siunitx-v2}[2021-04-17]
% \end{macrocode}
% \changes{v0.50}{2018/02/24}{\pkg{siunitx}: Improved units.}
% \begin{macrocode}
\AtBeginDocument{% in case textcomp was not loaded
-\DeclareSIUnit\bohr{\textit{a}\textsubscript{0}}
-\DeclareSIUnit\clight{\textit{c}\textsubscript{0}}
-\DeclareSIUnit\elementarycharge{\textit{e}}
-\DeclareSIUnit\electronmass{\textit{m}\textsubscript{e}}
-\DeclareSIUnit\hartree{\textit{E}\textsubscript{h}}
-\DeclareSIUnit\planckbar{\LWR@siunitx@textplanckbar}
+ \DeclareSIUnit\bohr{\textit{a}\textsubscript{0}}
+ \DeclareSIUnit\clight{\textit{c}\textsubscript{0}}
+ \DeclareSIUnit\elementarycharge{\textit{e}}
+ \DeclareSIUnit\electronmass{\textit{m}\textsubscript{e}}
+ \DeclareSIUnit\hartree{\textit{E}\textsubscript{h}}
+ \DeclareSIUnit\planckbar{\LWR@siunitx@textplanckbar}
}% AtBeginDocument
% \end{macrocode}
%
@@ -77158,44 +77717,53 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% Modified to set set \HTML\ \cs{textcolor} if not black:
% \changes{v0.48}{2018/02/14}{\pkg{siunitx}: Improved color output.}
% \begin{macrocode}
-\cs_undefine:N \__siunitx_print_aux:
-\cs_new_protected:Npn \__siunitx_print_aux:
+\cs_set_protected:Npn \__siunitx_print_aux:
{
\text
{
\__siunitx_ensure_ltr:n
{
- \color@begingroup
+% \end{macrocode}
+% \cs{color@endgroup} was adding a paragraph break, so use a regular group instead.
+% \changes{v0.897}{2021/05/23}{\pkg{siunitx-v2}: Regular group instead of color group.}
+% \begin{macrocode}
+% \color@begingroup
+ \begingroup% lwarp
+%
\__siunitx_print_color:
\__siunitx_font_shape:
\__siunitx_font_weight:
\use:c
{
- @@_ \l__siunitx_print_type_tl _
+ __siunitx_ \l__siunitx_print_type_tl _
text \l__siunitx_font_family_tl :
}
- \bool_if:NTF \l__siunitx_font_math_mode_bool
- { \__siunitx_print_math: }
- {
- \LWR@findcurrenttextcolor% lwarp
- \ifdefstring{\LWR@tempcolor}{000000}% lwarp
- {\__siunitx_print_text:}% lwarp
- {% lwarp
- \LWR@textcurrentcolor{% lwarp
- \__siunitx_print_text:
- }% lwarp
- }% lwarp
- }
- \color@endgroup
+% \end{macrocode}
+% \changes{v0.897}{2021/05/23}{\pkg{siunitx-v2}: Do not use math mode.}
+% \begin{macrocode}
+% \bool_if:NTF \l__siunitx_font_math_mode_bool
+% {
+% \__siunitx_print_math:
+% }
+ {
+ \LWR@findcurrenttextcolor% lwarp
+ \ifdefstring{\LWR@tempcolor}{000000}% lwarp
+ {\__siunitx_print_text:}% lwarp
+ {% lwarp
+ \LWR@textcurrentcolor{% lwarp
+ \__siunitx_print_text:
+ }% lwarp
+ }% lwarp
+ }
+% \color@endgroup
+ \endgroup% lwarp
+%
}
}
}
-
-\cs_undefine:N \__siunitx_set_math_fam:n
-\cs_new_protected:Npn \__siunitx_set_math_fam:n #1 {
- \int_new:c { c__siunitx_math #1 _int }
- \group_begin:% lwarp
+\cs_set_protected:Npn \__siunitx_set_math_fam:n #1 {
+ \group_begin:
\LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp
\LetLtxMacro\mbox\LWR@print@mbox% lwarp
\hbox_set:Nn \l__siunitx_tmp_box
@@ -77204,15 +77772,15 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
{
\use:c { math #1 }
{
- \int_gset:cn { c__siunitx_math #1 _int } { \fam }
+ \int_const:cn { c__siunitx_math #1 _int } { \fam }
}
}
}
- \group_end:% lwarp
+ \group_end:
}
-\cs_undefine:N \__siunitx_combined_output:n
-\cs_new_protected:Npn \__siunitx_combined_output:n #1 {
+\cs_set_protected:Npn \__siunitx_combined_output:n #1 {
+%
\group_begin:% lwarp
\LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp
\LetLtxMacro\mbox\LWR@print@mbox% lwarp
@@ -77243,10 +77811,12 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\endgroup% lwarp
\__siunitx_unit_output_print:
}
- \group_end:% lwarp
+ \group_end:% lwarp
+%
}
% \end{macrocode}
%
+%
% For |parse-numbers=false|:
% \changes{v0.79}{2020/01/21}{\pkg{siunitx}: Improved \brand{MathJax}.}
% \begin{macrocode}
@@ -77269,7 +77839,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\LWR@subsingledollar{% lwarp
\textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp
}{siunitx}{%
- \__siunitx_print:nn { number } {
+ \__siunitx_print:nn { number } {%
\LWR@origensuredmath{#1}%
} % lwarp
}% lwarp
@@ -77294,7 +77864,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
}{siunitx}{%
\__siunitx_print:nn { number } {
\LWR@origensuredmath{#1}%
- } % lwarp
+ }% lwarp
}% lwarp
\endgroup% lwarp
\__siunitx_unit_output_print:
@@ -77302,11 +77872,11 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
}
%
% \end{macrocode}
+%
% For quotients, the fraction code is replaced by the symbol code:
% \changes{v0.48}{2018/02/14}{\pkg{siunitx}: Changes fraction to symbol.}
% \begin{macrocode}
-\cs_undefine:N \__siunitx_number_output_quotient_fraction:
-\cs_new_protected:Npn \__siunitx_number_output_quotient_fraction: {
+\cs_set_protected:Npn \__siunitx_number_output_quotient_fraction: {
\bool_set_true:N \l__siunitx_number_compound_bool
\__siunitx_number_output_quotient_aux_i:
\tl_set_eq:NN \l__siunitx_number_out_tl
@@ -77317,11 +77887,11 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\__siunitx_number_output_single_aux:
}
% \end{macrocode}
+%
% For units, the fraction code is replaced by the symbol code:
% \changes{v0.48}{2018/02/14}{\pkg{siunitx}: Changes fraction to symbol.}
% \begin{macrocode}
-\cs_undefine:N \__siunitx_unit_format_fraction_fraction:
-\cs_new_protected:Npn \__siunitx_unit_format_fraction_fraction: {
+\cs_set_protected:Npn \__siunitx_unit_format_fraction_fraction: {
\__siunitx_unit_format_fraction_symbol_aux:
\int_compare:nNnT { \l__siunitx_unit_denominator_int } > { 1 }
{
@@ -77336,10 +77906,10 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\tl_put_right:NV \l__siunitx_unit_tl \l__siunitx_unit_denominator_tl
}
% \end{macrocode}
+%
% \changes{v0.50}{2018/02/24}{\pkg{siunitx}: Improved units.}
% \begin{macrocode}
-\cs_undefine:N \__siunitx_angle_print_astronomy_aux:
-\cs_new_protected:Npn \__siunitx_angle_print_astronomy_aux: {
+\cs_set_protected:Npn \__siunitx_angle_print_astronomy_aux: {
\prop_get:NnNT \l__siunitx_number_out_prop { mantissa-integer }
\l__siunitx_tmpa_tl
{ \__siunitx_print:nV { number } \l__siunitx_tmpa_tl }
@@ -77378,8 +77948,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
% \changes{v0.79}{2020/01/20}{\pkg{siunitx}: Fix: \cs{square}, \cs{cubed}.}
% \begin{macrocode}
-\cs_undefine:N \__siunitx_textsuperscript:n
-\cs_new_protected:Npn \__siunitx_textsuperscript:n #1 {\textsuperscript{#1}}
+\cs_set_protected:Npn \__siunitx_textsuperscript:n #1 {\textsuperscript{#1}}
% \end{macrocode}
%
% \begin{noindmacro}{\num} \oarg{options} \marg{value}
@@ -77447,6 +78016,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \end{macrocode}
% \end{noindmacro}
%
+%
% \begin{noindmacro}{\SIrange} \oarg{options} \marg{value1} \marg{value2} \marg{unit}
% \begin{macrocode}
\RenewDocumentCommand{\SIrange}{o m m m}
@@ -77938,13 +78508,12 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \end{macrocode}
% \iffalse
-%</siunitx>
+%</siunitx-v2>
% \fi
%
%
%
%
-%
% \iffalse
%<*skmath>
% \fi
@@ -84384,7 +84953,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\@ifundefined{c@#3depth}{\newcounter{#3depth}}{}%
\setcounter{#3depth}{1}%
\@namedef{cftmark#3}{}%
- \@namedef{listof#2}{\listof{#2}{#4}}%
+ \@namedef{listof#2}{\LWR@listof{#2}{#4}}%
\@namedef{@cftmake#3title}{}%
\expandafter\newlength\csname cftbefore#3titleskip\endcsname%
\expandafter\newlength\csname cftafter#3titleskip\endcsname%
@@ -89871,7 +90440,7 @@ height:\LWR@printlength{\LWR@tempheight}%
\@ifundefined{c@#3depth}{\newcounter{#3depth}}{}%
\setcounter{#3depth}{1}%
\@namedef{#3mark}{}%
- \@namedef{#2}{\listof{#2}{#4}}%
+ \@namedef{#2}{\LWR@listof{#2}{#4}}%
\@namedef{@cftmake#3title}{}%
\@ifundefined{cftbefore#3titleskip}{%
\expandafter\newlength\csname cftbefore#3titleskip\endcsname%
@@ -90170,6 +90739,7 @@ height:\LWR@printlength{\LWR@tempheight}%
\renewcommand*{\epigraphpicture}{}
% \end{macrocode}
%
+%
% \subsection{Poetry}
%
% \begin{macrocode}
diff --git a/macros/latex/contrib/lwarp/lwarp.ins b/macros/latex/contrib/lwarp/lwarp.ins
index 0ce71e74ae..498f83ae47 100644
--- a/macros/latex/contrib/lwarp/lwarp.ins
+++ b/macros/latex/contrib/lwarp/lwarp.ins
@@ -103,6 +103,7 @@ version 2005/12/01 or later.
\file{lwarp-caption.sty}{\from{lwarp.dtx}{caption}}
\file{lwarp-caption3.sty}{\from{lwarp.dtx}{caption3}}
\file{lwarp-cases.sty}{\from{lwarp.dtx}{cases}}
+\file{lwarp-centerlastline.sty}{\from{lwarp.dtx}{centerlastline}}
\file{lwarp-centernot.sty}{\from{lwarp.dtx}{centernot}}
\file{lwarp-changebar.sty}{\from{lwarp.dtx}{changebar}}
\file{lwarp-changelayout.sty}{\from{lwarp.dtx}{changelayout}}
@@ -139,6 +140,7 @@ version 2005/12/01 or later.
\file{lwarp-dblfnote.sty}{\from{lwarp.dtx}{dblfnote}}
\file{lwarp-dcolumn.sty}{\from{lwarp.dtx}{dcolumn}}
\file{lwarp-decimal.sty}{\from{lwarp.dtx}{decimal}}
+\file{lwarp-decorule.sty}{\from{lwarp.dtx}{decorule}}
\file{lwarp-diagbox.sty}{\from{lwarp.dtx}{diagbox}}
\file{lwarp-dingbat.sty}{\from{lwarp.dtx}{dingbat}}
\file{lwarp-DotArrow.sty}{\from{lwarp.dtx}{DotArrow}}
@@ -180,6 +182,7 @@ version 2005/12/01 or later.
\file{lwarp-extramarks.sty}{\from{lwarp.dtx}{extramarks}}
\file{lwarp-fancybox.sty}{\from{lwarp.dtx}{fancybox}}
\file{lwarp-fancyhdr.sty}{\from{lwarp.dtx}{fancyhdr}}
+\file{lwarp-fancypar.sty}{\from{lwarp.dtx}{fancypar}}
\file{lwarp-fancyref.sty}{\from{lwarp.dtx}{fancyref}}
\file{lwarp-fancytabs.sty}{\from{lwarp.dtx}{fancytabs}}
\file{lwarp-fancyvrb.sty}{\from{lwarp.dtx}{fancyvrb}}
@@ -220,6 +223,7 @@ version 2005/12/01 or later.
\file{lwarp-fouridx.sty}{\from{lwarp.dtx}{fouridx}}
\file{lwarp-fourier.sty}{\from{lwarp.dtx}{fourier}}
\file{lwarp-framed.sty}{\from{lwarp.dtx}{framed}}
+\file{lwarp-froufrou.sty}{\from{lwarp.dtx}{froufrou}}
\file{lwarp-ftcap.sty}{\from{lwarp.dtx}{ftcap}}
\file{lwarp-ftnright.sty}{\from{lwarp.dtx}{ftnright}}
\file{lwarp-fullminipage.sty}{\from{lwarp.dtx}{fullminipage}}
@@ -381,6 +385,7 @@ version 2005/12/01 or later.
\file{lwarp-parcolumns.sty}{\from{lwarp.dtx}{parcolumns}}
\file{lwarp-parnotes.sty}{\from{lwarp.dtx}{parnotes}}
\file{lwarp-parskip.sty}{\from{lwarp.dtx}{parskip}}
+\file{lwarp-pbalance.sty}{\from{lwarp.dtx}{pbalance}}
\file{lwarp-pbox.sty}{\from{lwarp.dtx}{pbox}}
\file{lwarp-pdfcol.sty}{\from{lwarp.dtx}{pdfcol}}
\file{lwarp-pdfcolfoot.sty}{\from{lwarp.dtx}{pdfcolfoot}}
@@ -472,6 +477,7 @@ version 2005/12/01 or later.
\file{lwarp-simplebnf.sty}{\from{lwarp.dtx}{simplebnf}}
\file{lwarp-SIunits.sty}{\from{lwarp.dtx}{SIunits}}
\file{lwarp-siunitx.sty}{\from{lwarp.dtx}{siunitx}}
+\file{lwarp-siunitx-v2.sty}{\from{lwarp.dtx}{siunitx-v2}}
\file{lwarp-skmath.sty}{\from{lwarp.dtx}{skmath}}
\file{lwarp-slantsc.sty}{\from{lwarp.dtx}{slantsc}}
\file{lwarp-slashed.sty}{\from{lwarp.dtx}{slashed}}
diff --git a/macros/latex/contrib/lwarp/lwarp.pdf b/macros/latex/contrib/lwarp/lwarp.pdf
index d280510a29..03031ceb9c 100644
--- a/macros/latex/contrib/lwarp/lwarp.pdf
+++ b/macros/latex/contrib/lwarp/lwarp.pdf
Binary files differ
diff --git a/macros/latex/contrib/lwarp/lwarpmk.lua b/macros/latex/contrib/lwarp/lwarpmk.lua
index 7357f24b90..0b09a9acaf 100755
--- a/macros/latex/contrib/lwarp/lwarpmk.lua
+++ b/macros/latex/contrib/lwarp/lwarpmk.lua
@@ -2,7 +2,7 @@
-- Copyright 2016-2021 Brian Dunn
-printversion = "v0.896"
+printversion = "v0.897"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
diff --git a/macros/latex/contrib/ninecolors/ninecolors.pdf b/macros/latex/contrib/ninecolors/ninecolors.pdf
index 9ef44d1880..99648b72b1 100644
--- a/macros/latex/contrib/ninecolors/ninecolors.pdf
+++ b/macros/latex/contrib/ninecolors/ninecolors.pdf
Binary files differ
diff --git a/macros/latex/contrib/ninecolors/ninecolors.sty b/macros/latex/contrib/ninecolors/ninecolors.sty
index d6ba17f10c..012310dfe2 100644
--- a/macros/latex/contrib/ninecolors/ninecolors.sty
+++ b/macros/latex/contrib/ninecolors/ninecolors.sty
@@ -7,8 +7,9 @@
%%% ----------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{ninecolors}[2021/05/07 v2021B Select colors with proper color contrast]
+\ProvidesClass{ninecolors}[2021/05/24 v2021C Select colors with proper color contrast]
\RequirePackage{xcolor}
+\RequirePackage{xparse}
\ExplSyntaxOn
diff --git a/macros/latex/contrib/ninecolors/ninecolors.tex b/macros/latex/contrib/ninecolors/ninecolors.tex
index 812ea72a9b..675cb08beb 100644
--- a/macros/latex/contrib/ninecolors/ninecolors.tex
+++ b/macros/latex/contrib/ninecolors/ninecolors.tex
@@ -11,7 +11,7 @@
urlcolor=blue3,
}
-\newcommand*{\myversion}{2021B}
+\newcommand*{\myversion}{2021C}
\newcommand*{\mydate}{Version \myversion\ (\the\year-\mylpad\month-\mylpad\day)}
\newcommand*{\mylpad}[1]{\ifnum#1<10 0\the#1\else\the#1\fi}
diff --git a/macros/latex/contrib/pbalance/pbalance.dtx b/macros/latex/contrib/pbalance/pbalance.dtx
index ea00526085..9f984e0e11 100644
--- a/macros/latex/contrib/pbalance/pbalance.dtx
+++ b/macros/latex/contrib/pbalance/pbalance.dtx
@@ -15,7 +15,7 @@
% \iffalse
%
%<package>\NeedsTeXFormat{LaTeX2e}[2015/01/01]
-%<package>\ProvidesPackage{pbalance}[2021/04/26 v1.1.0 Poor man's balance]
+%<package>\ProvidesPackage{pbalance}[2021/05/24 v1.1.1 Poor man's balance]
%
%<*driver>
@@ -58,6 +58,8 @@
% \changes{v1.0}{2020/09/14}{Initial version}
% \changes{v1.0.1}{2020/12/16}{Improvements to documentation}
% \changes{v1.1.0}{2021/04/26}{Do not crash in one-column mode}
+% \changes{v1.1.1}{2021/05/24}{Do not use balance package if
+% there are dbltop floats}
%
% \GetFileInfo{pbalance.sty}
%
@@ -449,8 +451,7 @@
\newcommand\@PBifbotfloat[2]{\ifx\@botlist\empty #2\else #1\fi}
\newcommand\@PBiffootnote[2]{\ifvoid\footins #2\else #1\fi}
\newcommand\@PBiffloatcol[2]{\if@fcolmade #1\else #2\fi}
-% dbltop floats are apparently ok with the balance package
-%%%\newcommand\@PBifdbltopfloat[2]{\ifx\@dbltoplist\empty #2\else #1\fi}
+\newcommand\@PBifdbltopfloat[2]{\ifx\@dbltoplist\empty #2\else #1\fi}
% dblbotlist only exists with package stfloats
\newcommand\@PBifdblbotfloat[2]{%
\ifdefvoid{\@dblbotlist}
@@ -469,7 +470,8 @@
\ifboolexpr
{
test {\@PBifmidfloat} or test {\@PBiftopfloat} or
- test {\@PBifbotfloat} or test {\@PBifdblbotfloat}
+ test {\@PBifbotfloat} or test {\@PBifdblbotfloat} or
+ test {\@PBifdbltopfloat}
}
{\global\toggletrue{@PBtmpHasFloats}}
{}
diff --git a/macros/latex/contrib/pbalance/pbalance.pdf b/macros/latex/contrib/pbalance/pbalance.pdf
index 7b8f149a1a..43fc1c40f8 100644
--- a/macros/latex/contrib/pbalance/pbalance.pdf
+++ b/macros/latex/contrib/pbalance/pbalance.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md
index 093b87bada..a473e9cd49 100644
--- a/macros/latex/contrib/siunitx/CHANGELOG.md
+++ b/macros/latex/contrib/siunitx/CHANGELOG.md
@@ -7,6 +7,18 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## [Unreleased]
+## [v3.0.5]
+
+### Changed
+- Documentation improvements
+
+### Fixed
+- Bracket separate uncertainties in compound quantities
+ (issue #441)
+- Color negative values in table cells correctly (issue #444)
+- Avoid consumption of any math alphabets (issue #445)
+- Mark `\bar` as removed (issue #448)
+
## [v3.0.4]
### Changed
@@ -1289,7 +1301,8 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
### Added
- First public testing release (as `si`)
-[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.4...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.5...HEAD
+[v3.0.5]: https://github.com/josephwright/siunitx/compare/v3.0.4...v3.0.5
[v3.0.4]: https://github.com/josephwright/siunitx/compare/v3.0.3...v3.0.4
[v3.0.3]: https://github.com/josephwright/siunitx/compare/v3.0.2...v3.0.3
[v3.0.2]: https://github.com/josephwright/siunitx/compare/v3.0.1...v3.0.2
diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf
index 718aeef446..d8f5d6536e 100644
--- a/macros/latex/contrib/siunitx/siunitx-code.pdf
+++ b/macros/latex/contrib/siunitx/siunitx-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx-compound.dtx b/macros/latex/contrib/siunitx/siunitx-compound.dtx
index 83da873e6c..a164d883b7 100644
--- a/macros/latex/contrib/siunitx/siunitx-compound.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-compound.dtx
@@ -310,8 +310,9 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\l_@@_unit_tl}
+% \begin{variable}{\l_@@_unit_bool, \l_@@_unit_tl}
% \begin{macrocode}
+\bool_new:N \l_@@_unit_bool
\tl_new:N \l_@@_unit_tl
% \end{macrocode}
% \end{variable}
@@ -412,6 +413,7 @@
%
% \begin{macro}{\siunitx_compound_number:n}
% \begin{macro}{\@@_format:n}
+% \begin{macro}{\@@_format:nn}
% \begin{macro}{\@@_format:nnn}
% Printing a generic set starts with the question of whether we want to
% extract exponents. If we do, then there is the work to do with extraction.
@@ -421,6 +423,7 @@
\cs_new_protected:Npn \siunitx_compound_number:n #1
{
\group_begin:
+ \bool_set_false:N \l_@@_unit_bool
\@@_format:nn {#1} { }
\@@_print:N \siunitx_print_number:x
\group_end:
@@ -445,16 +448,25 @@
\cs_new_protected:Npn \@@_format:nnn #1#2#3
{
\siunitx_number_parse:nN {#1} \l_@@_tmp_tl
- \tl_if_blank:nTF {#3}
- { \siunitx_number_process:NN \l_@@_tmp_tl \l_@@_first_tl }
+ \bool_if:NTF \l_@@_unit_bool
{ \@@_format_units:nn {#2} {#3} }
+ { \siunitx_number_process:NN \l_@@_tmp_tl \l_@@_first_tl }
\bool_lazy_and:nnTF
{ \l_@@_exp_combine_bool }
{ \int_compare_p:nNn { \tl_count:n {#2} } > 0 }
{ \@@_extract_exponents: }
{
- \tl_set:Nx \l_@@_tmp_tl
- { \siunitx_number_output:N \l_@@_first_tl }
+ \bool_if:NTF \l_@@_unit_bool
+ {
+ \tl_set:Nx \l_@@_tmp_tl
+ { \siunitx_number_output:NN \l_@@_first_tl \q_nil }
+ \tl_set:Nx \l_@@_tmp_tl
+ { \@@_uncert_bracket:N \l_@@_tmp_tl }
+ }
+ {
+ \tl_set:Nx \l_@@_tmp_tl
+ { \siunitx_number_output:N \l_@@_first_tl }
+ }
\seq_put_right:NV \l_@@_tmp_seq \l_@@_tmp_tl
}
\tl_map_function:nN {#2} \@@_parsed:n
@@ -464,7 +476,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@@_extract_exponents:N}
+% \begin{macro}{\@@_extract_exponents:}
% \begin{macro}{\@@_extract_exponents_auxi:w}
% \begin{macro}{\@@_extract_exponents_auxii:nw}
% \begin{macro}{\@@_extract_exponents_auxiii:nnnnnnn}
@@ -508,13 +520,23 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@@_parsed:n, \@@_unparsed:n}
% The simple cases for parsing (or not) all entries.
% \begin{macrocode}
\cs_new_protected:Npn \@@_parsed:n #1
{
- \siunitx_number_format:nN {#1} \l_@@_tmp_tl
+ \bool_if:NTF \l_@@_unit_bool
+ {
+ \siunitx_number_parse:nN {#1} \l_@@_tmp_tl
+ \siunitx_number_process:NN \l_@@_tmp_tl \l_@@_tmp_tl
+ \tl_set:Nx \l_@@_tmp_tl
+ { \siunitx_number_output:NN \l_@@_tmp_tl \q_nil }
+ \tl_set:Nx \l_@@_tmp_tl
+ { \@@_uncert_bracket:N \l_@@_tmp_tl }
+ }
+ { \siunitx_number_format:nN {#1} \l_@@_tmp_tl }
\seq_put_right:NV \l_@@_tmp_seq \l_@@_tmp_tl
}
\cs_new_protected:Npn \@@_unparsed:n #1
@@ -642,6 +664,7 @@
{ \l_@@_unit_bracket_bool }
{ ! \l_@@_unit_repeat_bool }
{ \bool_set_false:N \l_siunitx_number_bracket_ambiguous_bool }
+ \bool_set_true:N \l_@@_unit_bool
\@@_format:nn {#1} {#2}
\str_if_eq:VnT \l_siunitx_quantity_prefix_mode_tl { combine-exponent }
{ \tl_clear:N \l_@@_exp_tl }
@@ -785,6 +808,36 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}[EXP]{\@@_uncert_bracket:N}
+% \begin{macro}[EXP]{\@@_uncert_bracket:w}
+% \begin{macro}[EXP]{\@@_uncert_bracket:nnw}
+% Check for the case where there is a separate uncertainty but not exponent,
+% when we are handling units.
+% \begin{macrocode}
+\cs_new:Npn \@@_uncert_bracket:N #1
+ { \exp_after:wN \@@_uncert_bracket:w #1 \q_stop }
+\cs_new:Npn \@@_uncert_bracket:w
+ #1 \q_nil #2 \q_nil #3 \q_nil #4 \q_nil #5 \q_nil #6 \q_nil #7 \q_nil
+ #8 \q_nil #9 \q_stop
+ { \@@_uncert_bracket:nnw {#1#2#3#4#5#6} {#7#8} #9 \q_stop }
+\cs_new:Npn \@@_uncert_bracket:nnw #1#2 #3 \q_nil #4 \q_nil #5 \q_stop
+ {
+ \bool_lazy_or:nnTF
+ { \tl_if_blank_p:n {#2#3} }
+ { ! \tl_if_blank_p:n {#5} }
+ { \exp_not:n {#1#2#3#4#5} }
+ {
+ \exp_not:V \l_@@_bracket_open_tl
+ \exp_not:n {#1#2#3}
+ \exp_not:V \l_@@_bracket_close_tl
+ \exp_not:n {#4#5}
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Lists}
%
% Identify the internal prefix (\LaTeX3 \pkg{DocStrip} convention): only
diff --git a/macros/latex/contrib/siunitx/siunitx-emulation.dtx b/macros/latex/contrib/siunitx/siunitx-emulation.dtx
index 4ae6cd1590..48648e3c13 100644
--- a/macros/latex/contrib/siunitx/siunitx-emulation.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-emulation.dtx
@@ -1002,12 +1002,13 @@
{
\angstrom ,
\atomicmassunit ,
+ \bar ,
\bohr ,
\clight ,
\electronmass ,
\elementarycharge ,
\hartree ,
- \plackbar
+ \planckbar
}
{
\siunitx_declare_unit:Nx #1
diff --git a/macros/latex/contrib/siunitx/siunitx-number.dtx b/macros/latex/contrib/siunitx/siunitx-number.dtx
index dec433df02..67c9580ca6 100644
--- a/macros/latex/contrib/siunitx/siunitx-number.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-number.dtx
@@ -472,12 +472,6 @@
% \end{syntax}
% \end{function}
%
-% \begin{function}{separate-uncertainty}
-% \begin{syntax}
-% |separate-uncertainty| = |true|\verb"|"|false|
-% \end{syntax}
-% \end{function}
-%
% \begin{function}{tight-spacing}
% \begin{syntax}
% |tight-spacing| = |true|\verb"|"|false|
diff --git a/macros/latex/contrib/siunitx/siunitx-print.dtx b/macros/latex/contrib/siunitx/siunitx-print.dtx
index 8cdc068b91..cc26177ef1 100644
--- a/macros/latex/contrib/siunitx/siunitx-print.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-print.dtx
@@ -82,6 +82,9 @@
% in text mode
% \item \pkg{amstext}: the \cs{text} command for printing in text mode
% \end{itemize}
+% For detection of math mode fonts, as well as \cs{mathrm}, the existence of
+% \cs{symoperators} is assumed; other math font commands are not
+% \emph{required} to exist.
%
% \begin{function}
% {
@@ -317,52 +320,13 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{variable}{\l_@@_tmp_box, \l_@@_tmp_tl}
+% \begin{variable}{\l_@@_tmp_tl}
% Scratch space.
% \begin{macrocode}
-\box_new:N \l_@@_tmp_box
\tl_new:N \l_@@_tmp_tl
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\document}
-% \begin{macro}{\@@_store_fam:n}
-% \begin{variable}{\c_@@_mathrm_int, \c_@@_mathsf_int, \c_@@_mathtt_int}
-% In order to test math fonts, we need information about the \cs{fam} used
-% by the various options. As we are doing typesetting (if only in a box), we
-% need to be right at the start of the document: this also avoids any issue
-% with \pkg{fontspec}. With a sufficiently recent \LaTeXe{} this is easy;
-% for older kernels, we have to do things manually.
-% \begin{macrocode}
-\IfFormatAtLeastTF { 2020-10-01 }
- { \hook_gput_code:nnn { begindocument/end } { siunitx } }
- { \tl_put_right:Nn \document }
- {
- \@@_store_fam:n { rm }
- \@@_store_fam:n { sf }
- \@@_store_fam:n { tt }
- }
-\IfFormatAtLeastTF { 2020-10-01 }
- { }
- { \tl_put_right:Nn \document { \ignorespaces } }
-\cs_new_protected:Npn \@@_store_fam:n #1
- {
- \group_begin:
- \hbox_set:Nn \l_@@_tmp_box
- {
- \ensuremath
- {
- \use:c { math #1 }
- { \int_const:cn { c_@@_math #1 _int } { \fam } }
- }
- }
- \group_end:
- }
-% \end{macrocode}
-% \end{variable}
-% \end{macro}
-% \end{macro}
-%
% \subsection{Printing routines}
%
% \begin{variable}
@@ -559,6 +523,8 @@
% \@@_math_auxiv:n,
% \@@_math_auxv:n
% }
+% \begin{macro}{\@@_math_aux:N}
+% \begin{macro}{\@@_math_aux:w}
% \begin{macro}{\@@_math_aux:Nn, \@@_math_aux:cn}
% \begin{macro}{\@@_math_sub:n, \@@_math_super:n, \@@_math_script:n}
% \begin{macro}{\@@_math_text:n}
@@ -656,20 +622,12 @@
% cases. First, we are retaining the current math font, and the active one is
% \cs{mathsf} or \cs{mathtt}: that needs to be applied to the argument.
% Alternatively, if the current font is not retained, ensure that
-% normal math mode rules are active. The parts here are split up to allow
-% reuse when picking up the text family.
+% normal math mode rules are active.
% \begin{macrocode}
\cs_new_protected:Npn \@@_math_auxiv:n #1
{
\bool_if:NTF \l_@@_math_font_bool
- {
- \int_case:nnF \fam
- {
- \c_@@_mathsf_int { \@@_math_aux:Nn \mathsf }
- \c_@@_mathtt_int { \@@_math_aux:Nn \mathtt }
- }
- { \use:n }
- }
+ { \@@_math_aux:N \mathsf \mathtt \q_recursion_tail \q_recursion_stop }
{ \@@_math_auxv:n }
{#1}
}
@@ -677,11 +635,24 @@
{
\bool_lazy_or:nnTF
{ \int_compare_p:nNn \fam = { -1 } }
- { \int_compare_p:nNn \fam = \c_@@_mathrm_int }
+ { \int_compare_p:nNn \fam = \symoperators }
{ \use:n }
{ \mathrm }
{#1}
}
+\cs_new_protected:Npn \@@_math_aux:N #1
+ {
+ \quark_if_recursion_tail_stop_do:Nn #1 { \use:n }
+ \exp_after:wN \exp_after:wN \exp_after:wN \@@_math_aux:w
+ \cs:w \cs_to_str:N #1 \c_space_tl \cs_end:
+ \use@mathgroup ? { -2 } \q_stop #1
+ }
+\cs_new_protected:Npn \@@_math_aux:w #1 \use@mathgroup #2#3 #4 \q_stop #5
+ {
+ \int_compare:nNnTF \fam = {#3}
+ { \use_i_delimit_by_q_recursion_stop:nw { \@@_math_aux:Nn #5 } }
+ { \@@_math_aux:N }
+ }
% \end{macrocode}
% Search-and-replace fun: deal with any font commands in the argument and
% also inside sub/superscripts.
@@ -744,6 +715,8 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\siunitx_print_text:n}
% \begin{macro}{\@@_text_replace:n}
diff --git a/macros/latex/contrib/siunitx/siunitx-table.dtx b/macros/latex/contrib/siunitx/siunitx-table.dtx
index 3f8673c2fc..c033090022 100644
--- a/macros/latex/contrib/siunitx/siunitx-table.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-table.dtx
@@ -1196,7 +1196,6 @@
\exp_not:N \q_mark
\siunitx_number_output:NN \l_@@_tmp_tl \q_nil
}
- \@@_color_check:N \l_@@_tmp_tl
\exp_after:wN \@@_print_format_auxi:w
\l_@@_tmp_tl \q_stop
\hbox_set:Nn \l_@@_tmp_box { \l_@@_after_model_tl }
@@ -1213,7 +1212,7 @@
\box_use_drop:N \l_@@_before_box
\box_use_drop:N \l_@@_integer_box
\box_use_drop:N \l_@@_decimal_box
- \box_use_drop:N \l_@@_after_box
+ \box_use_drop:N \l_@@_after_box
}
}
\cs_new:Npn \@@_print_format:nnnnnn #1#2#3#4#5#6#7
@@ -1226,6 +1225,7 @@
\cs_new_protected:Npn \@@_print_format_auxi:w
#1 \q_nil #2 \q_mark #3 \q_nil #4 \q_stop
{
+ \@@_color_check:w #3 \q_nil \q_stop
\@@_print_format_box:Nn \l_@@_tmp_box {#1}
\bool_if:NTF \l_@@_align_before_bool
{
diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx
index 40ba293d81..7c75d7a983 100644
--- a/macros/latex/contrib/siunitx/siunitx.dtx
+++ b/macros/latex/contrib/siunitx/siunitx.dtx
@@ -121,7 +121,7 @@
%
% Identify the package and give the over all version information.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2021-05-21} {3.0.4}
+\ProvidesExplPackage {siunitx} {2021-05-24} {3.0.5}
{A comprehensive (SI) units package}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf
index 3a8e7d0277..3632749811 100644
--- a/macros/latex/contrib/siunitx/siunitx.pdf
+++ b/macros/latex/contrib/siunitx/siunitx.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx.tex b/macros/latex/contrib/siunitx/siunitx.tex
index 857a1569a6..8af64c2708 100644
--- a/macros/latex/contrib/siunitx/siunitx.tex
+++ b/macros/latex/contrib/siunitx/siunitx.tex
@@ -451,7 +451,7 @@ The \meta{number} and \meta{unit} arguments work exactly like those for the
It is possible to set up the unit macros to be available outside of the
\cs{qty} and \cs{unit} functions. This is not the standard behaviour as there
-is the risk of name clashes (for example, \cs{bar} is used by other packages,
+is the risk of name clashes (for example, \cs{day} is a \TeX{} primitive
and several packages define \cs{degree}). Full details of using \enquote{stand
alone} units are found in \ref{sec:units:creating}.
diff --git a/macros/latex/contrib/springer/sr-vorl/README b/macros/latex/contrib/springer/sr-vorl/README
index e8223c04d3..9bad61cb26 100644
--- a/macros/latex/contrib/springer/sr-vorl/README
+++ b/macros/latex/contrib/springer/sr-vorl/README
@@ -2,4 +2,4 @@ This LaTeX class provides a template for books to be published at Springer Gable
You find the class documentation in file sr-vorl.pdf. The source code can be found in sr-vorl.dtx and sr-vorl.ins. By compiling sr-vorl.dtx with pdflatex, you get the documentation, while compiling sr-vorl.ins gives you the cls-file and the template files frontmatter_sr-vorl.tex, mainmatter_sr-vorl.tex, backmatter_sr-vorl.tex and hauptdatei_sr-vorl.tex.
-All of this ma­te­rial is sub­ject to the LaTeX Project Public Li­cense.
+All of this ma­te­rial is sub­ject to the LaTeX Project Public Li­cense version 1.3c (or at your option later versions).
diff --git a/macros/latex/contrib/springer/sr-vorl/sr-vorl.dtx b/macros/latex/contrib/springer/sr-vorl/sr-vorl.dtx
index c1520cceda..d021a05d33 100644
--- a/macros/latex/contrib/springer/sr-vorl/sr-vorl.dtx
+++ b/macros/latex/contrib/springer/sr-vorl/sr-vorl.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright 2013-2016 by Jonas L. Dabelow
+% Copyright 2013-2021 by Jonas L. Dabelow
%
% Dieses Werk darf nach den Bedingungen der LaTeX Project Public License,
% entweder Version 1.3c oder (nach Ihrer Wahl) jeder spaeteren Version,
@@ -11,8 +11,8 @@
%
% Dieses Werk hat den LPPL-Betreuungs-Status "author-maintained" (vom Autor betreut).
%
-% Dieses Werk besteht aus den Dateien sr-vorl.dtx and sr-vorl.ins
-% and the derived files sr-vorl.cls, frontmatter_sr-vorl.tex,
+% Dieses Werk besteht aus den Dateien sr-vorl.dtx und sr-vorl.ins
+% und den daraus abgeleiteten Dateien sr-vorl.cls, frontmatter_sr-vorl.tex,
% mainmatter_sr-vorl.tex, backmatter_sr-vorl.tex und hauptdatei_sr-vorl.tex.
%
%
@@ -37,7 +37,7 @@
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesClass{sr-vorl}
%<*class>
- [2016/01/30 v1.1 Vorlage fuer Autoren bei Springer Research]
+ [2021/05/24 v1.2 Vorlage fuer Autoren bei Springer Research]
%</class>
%
%<*driver>
@@ -62,7 +62,7 @@
\usepackage{scrextend}
\usepackage{doc}
\usepackage{hyperref}
-\usepackage[german]{cleveref}
+\usepackage[german,nameinlink]{cleveref}
\hypersetup{%
@@ -151,12 +151,12 @@
{\href{#1}{\texttt{#2}}}%
}
-% #1: Versionsnummer
-% #2: was wurde geaendert?
-% #3: Kommentar
-\newcommand{\aenderung}[3]{% Aenderung fuer Liste der Aenderungen
- \item[#2~(Version #1)]~\\
- #3%
+
+% #1: was wurde geaendert?
+% #2: Kommentar
+\newcommand{\aenderung}[2]{% Aenderung fuer Liste der Aenderungen
+ \item[#1]~\\
+ #2%
}
\setlength{\parindent}{1em}
@@ -186,28 +186,25 @@
@online{l2tabu,
author = {M. Ensenbach and M. Trettin},
title = {Das \LaTeX2$_\varepsilon$-Sündenregister},
- year = {2011},
- url = {http://ftp.fernuni-hagen.de/ftp-dir/pub/mirrors/www.ctan.org/info/l2tabu/german/l2tabu.pdf},
- urldate = {2016-01-30},
+ year = {2016},
+ url = {http://tug.ctan.org/info/l2tabu/german/l2tabu.pdf},
+ urldate = {2021-05-24},
}
@online{l2kurz,
author = {M. Daniel and P. Gundlach and W. Schmidt and J. Knappen and H. Partl and I. Hyna},
title = {\LaTeX2$_\varepsilon$-Kurzbeschreibung},
- year = {2013},
+ year = {2018},
url = {ftp://ftp.rrzn.uni-hannover.de/pub/mirror/tex-archive/info/lshort/german/l2kurz.pdf},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@Book{koma,
author = {M. Kohm},
title = {\textsf{KOMA}-Script},
- publisher = {Lehmanns Media},
- year = {2014},
- edition = {5.~Auf"|lage},
- address = {Berlin},
+ year = {2021},
url = {ftp://ftp.tu-chemnitz.de/pub/tex/macros/latex/contrib/koma-script/doc/scrguide.pdf},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@online{ctan,
@@ -215,48 +212,54 @@
title = {Comprehensive \TeX\ Archive Network},
year = {1993},
url = {http://www.ctan.org/},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@online{caption,
author = {A. Sommerfeldt},
title = {Anpassen der Abbildungs- und Tabellenbeschriftungen},
- year = {2011},
+ year = {2020},
url = {ftp://ftp.fu-berlin.de/tex/CTAN/macros/latex/contrib/caption/caption-deu.pdf},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@online{geometry,
author = {H. Umeki},
- translator = {H.-M. Haase},
- title = {Das \paket{geometry} Paket},
- year = {2010},
- url = {http://ftp.fernuni-hagen.de/ftp-dir/pub/mirrors/www.ctan.org/macros/latex/contrib/geometry-de/geometry-de.pdf},
- urldate = {2016-01-30},
+ title = {The \paket{geometry} package},
+ year = {2020},
+ url = {ftp://ftp.rrzn.uni-hannover.de/pub/mirror/tex-archive/macros/latex/contrib/geometry/geometry.pdf},
+ urldate = {2021-05-24},
+ }
+
+ @online{mathptmx,
+ author = {Walter Schmidt},
+ title = {Using common PostScript fonts with \LaTeX},
+ year = {2020},
+ url = {ftp://ftp.mpi-sb.mpg.de/pub/tex/mirror/ftp.dante.de/pub/tex/macros/latex/required/psnfss/psnfss2e.pdf},
+ urldate = {2021-05-24},
}
@online{enumitem,
author = {J. Bezos},
- translator = {M. Ludwig and C. Römer},
- title = {Anpassen von Listen mit dem Paket \paket{enumitem}},
- year = {2011},
- url = {ftp://ftp.mpi-sb.mpg.de/pub/tex/mirror/ftp.dante.de/pub/tex/info/translations/enumitem/de/enumitem-de.pdf},
- urldate = {2016-01-30},
+ title = {Customizing lists with the \paket{enumitem} package},
+ year = {2019},
+ url = {https://ftp.rrze.uni-erlangen.de/ctan/macros/latex/contrib/enumitem/enumitem.pdf},
+ urldate = {2021-05-24},
}
@online{amsldoc,
author = {American Mathematical Society},
title = {User's Guide for the \paket{amsmath} Package},
- year = {2002},
- url = {ftp://ftp.mpi-sb.mpg.de/pub/tex/mirror/ftp.dante.de/pub/tex/macros/latex/required/amslatex/math/amsldoc.pdf},
- urldate = {2016-01-30},
+ year = {2020},
+ url = {https://ctan.mc1.root.project-creative.net/macros/latex/required/amsmath/amsldoc.pdf},
+ urldate = {2021-05-24},
}
@online{wikibooks-floats,
author = {Wikibooks},
title = {\LaTeX/Floats, Figures and Captions},
url = {http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@online{float,
@@ -264,7 +267,7 @@
title = {An Improved Environment for Floats},
year = {2001},
url = {http://ftp.fau.de/ctan/macros/latex/contrib/float/float.pdf},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@Book{texbook,
@@ -278,9 +281,9 @@
@online{rotating,
author = {R. Fairbairns and S. Rahtz and L. Barroca},
title = {A package for rotated objects in \LaTeX},
- year = {2010},
- url = {ftp://ftp.rrzn.uni-hannover.de/pub/mirror/tex-archive/macros/latex/contrib/rotating/rotating.pdf},
- urldate = {2016-01-30},
+ year = {2020},
+ url = {ftp://ftp.mpi-sb.mpg.de/pub/tex/mirror/ftp.dante.de/pub/tex/macros/latex/required/graphics/rotating.pdf},
+ urldate = {2021-05-24},
}
@Book{voss-mathe,
@@ -292,108 +295,98 @@
edition = {1.~Auf"|lage},
}
- @online{voss-mathe-online,
- author = {H. Voß},
- title = {Math Mode},
- year = {2014},
- url = {http://sunsite.informatik.rwth-aachen.de/ftp/pub/mirror/ctan/info/math/voss/mathmode/Mathmode.pdf},
- urldate = {2016-01-30},
- }
-
@online{microtype,
author = {R. Schlicht},
- title = {Das \paket{microtype} Paket},
- url = {http://ftp.gwdg.de/pub/ctan/info/translations/microtype/de/microtype-DE.pdf},
- urldate = {2016-01-30},
+ title = {The \paket{microtype} package},
+ year = {2021},
+ url = {https://mirror.clientvps.com/CTAN/macros/latex/contrib/microtype/microtype.pdf},
+ urldate = {2021-05-24},
}
@online{babel,
author = {J. Braams and J. Bezos},
title = {Babel},
- year = {2016},
+ year = {2021},
url = {ftp://ftp.fu-berlin.de/tex/CTAN/macros/latex/required/babel/base/babel.pdf},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@online{onlyamsmath,
author = {H. Harders},
title = {The \paket{onlyamsmath} package},
- year = {2012},
+ year = {2017},
url = {http://ftp.fau.de/ctan/macros/latex/contrib/onlyamsmath/onlyamsmath.pdf},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@online{wikibooks-silbentrennung,
author = {Wikibooks},
title = {\LaTeX-Wörterbuch: Silbentrennung},
url = {http://de.wikibooks.org/wiki/LaTeX-Wörterbuch:_Silbentrennung},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@online{wikibooks-latex,
author = {Wikibooks},
title = {\LaTeX},
url = {http://en.wikibooks.org/wiki/LaTeX},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@online{booktabs,
author = {S. Fear},
- translator = {T. Manderla and C. Römer},
- title = {Anfertigen von hochwertigen Tabellen mit \LaTeX},
- year = {2011},
- url = {ftp://ftp.rrzn.uni-hannover.de/pub/mirror/tex-archive/macros/latex/contrib/booktabs-de/booktabs-de.pdf},
- urldate = {2016-01-30},
+ title = {Publication quality tables in \LaTeX},
+ year = {2020},
+ url = {https://ctan.mc1.root.project-creative.net/macros/latex/contrib/booktabs/booktabs.pdf},
+ urldate = {2021-05-24},
}
@online{csquotes,
- author = {P. Lehman},
- translator = {T. Conrad and P. Faßbender and C. Römer},
- title = {Das \paket{csquotes}-Paket},
- year = {2011},
- url = {ftp://ftp.rrzn.uni-hannover.de/pub/mirror/tex-archive/info/translations/csquotes/de/csquotes-DE.pdf},
- urldate = {2016-01-30},
+ author = {P. Lehman and J. Wright},
+ title = {The \paket{csquotes} Package},
+ year = {2018},
+ url = {ftp://ftp.fu-berlin.de/tex/CTAN/macros/latex/contrib/csquotes/csquotes.pdf},
+ urldate = {2018-09-27},
}
@online{cleveref,
author = {T. Cubitt},
title = {The \paket{cleveref} package},
- year = {2013},
+ year = {2018},
url = {http://ftp.uni-erlangen.de/ctan/macros/latex/contrib/cleveref/cleveref.pdf},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@online{varioref,
author = {F. Mittelbach},
title = {The \paket{varioref} package},
- year = {2015},
+ year = {2020},
url = {http://sunsite.informatik.rwth-aachen.de/ftp/pub/mirror/ctan/macros/latex/required/tools/varioref.pdf},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@online{siunitx,
author = {J. Wright},
title = {\paket{siunitx} --~A comprehensive (SI) units package},
- year = {2016},
+ year = {2021},
url = {ftp://ftp.rrzn.uni-hannover.de/pub/mirror/tex-archive/macros/latex/contrib/siunitx/siunitx.pdf},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@online{etoolbox,
- author = {P. Lehman},
- translator = {T. Enderling},
- title = {Das Paket \paket{etoolbox}},
- year = {2011},
- url = {ftp://ftp.fu-berlin.de/tex/CTAN/info/translations/etoolbox/de/etoolbox-DE.pdf},
- urldate = {2016-01-30},
+ author = {P. Lehman and J. Wright},
+ title = {The \paket{etoolbox} Package},
+ year = {2020},
+ url = {ftp://ftp.rrzn.uni-hannover.de/pub/mirror/tex-archive/macros/latex/contrib/etoolbox/etoolbox.pdf},
+ urldate = {2021-05-24},
}
@online{ragged2e,
author = {M. Schröder},
title = {The \paket{ragged2e}-package},
- year = {2009},
- url = {http://ftp.fernuni-hagen.de/ftp-dir/pub/mirrors/www.ctan.org/macros/latex/contrib/ms/ragged2e.pdf},
- urldate = {2016-01-30},
+ year = {2021},
+ url = {https://ctan.kako-dev.de/macros/latex/contrib/ragged2e/ragged2e.pdf},
+ urldate = {2021-05-24},
}
@online{juergens1,
@@ -401,7 +394,7 @@
title = {\LaTeX\ --~eine Einführung und ein bisschen mehr\dots},
year = {2000},
url = {http://www.wiwiss.fu-berlin.de/fachbereich/vwl/iso/links/latex_einfuehrung_manuela_juergens.pdf},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@online{juergens2,
@@ -409,7 +402,7 @@
title = {\LaTeX\ --~Fortgeschrittene Anwendungen},
year = {1995},
url = {ftp://ftp.fernuni-hagen.de/pub/pdf/urz-broschueren/broschueren/a0279510.pdf},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@online{buxbaum-presentation,
@@ -417,7 +410,7 @@
title = {The \LaTeX\ document preparation system},
year = {2008},
url = {ftp://ftp.rrzn.uni-hannover.de/pub/mirror/tex-archive/info/latex-course/LaTeX-Course.pdf},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@online{simplified-introduction,
@@ -425,7 +418,7 @@
title = {A Simplified Introduction to \LaTeX},
year = {2010},
url = {http://sunsite.informatik.rwth-aachen.de/ftp/pub/mirror/ctan/info/simplified-latex/simplified-intro.pdf},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@online{beginners-introduction,
@@ -433,7 +426,7 @@
title = {A beginner's introduction to typesetting with \LaTeX},
year = {2005},
url = {http://sunsite.informatik.rwth-aachen.de/ftp/pub/mirror/ctan/info/beginlatex/beginlatex-3.6.pdf},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@Book{more-math,
@@ -444,23 +437,23 @@
address = {New York},
edition = {4.~Auf"|lage},
url = {http://ctan.space-pro.be/tex-archive/info/Math_into_LaTeX-4/Short_Course.pdf},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@online{xkeyval,
author = {H. Adriaens},
title = {The \paket{xkeyval} package},
- year = {2014},
+ year = {2020},
url = {http://ftp.gwdg.de/pub/ctan/macros/latex/contrib/xkeyval/xkeyval.pdf},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@online{xstring,
author = {C. Tellechea},
title = {\paket{xstring}},
- year = {2013},
- url = {http://sunsite.informatik.rwth-aachen.de/ftp/pub/mirror/ctan/macros/generic/xstring/xstring_doc_en.pdf},
- urldate = {2016-01-30},
+ year = {2019},
+ url = {https://ftp.mpi-inf.mpg.de/pub/tex/mirror/ftp.dante.de/pub/tex/macros/generic/xstring/xstring-en.pdf},
+ urldate = {2021-05-24},
}
@online{varwidth,
@@ -468,15 +461,15 @@
title = {The \paket{varwidth} package},
year = {2011},
url = {ftp://ftp.mpi-sb.mpg.de/pub/tex/mirror/ftp.dante.de/pub/tex/macros/latex/contrib/varwidth/varwidth-doc.pdf},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
@online{chngcntr,
author = {P. Wilson},
title = {The \paket{chngcntr} package},
- year = {2009},
+ year = {2018},
url = {http://ctan.space-pro.be/tex-archive/macros/latex/contrib/chngcntr/chngcntr.pdf},
- urldate = {2016-01-30},
+ urldate = {2021-05-24},
}
\end{filecontents}
@@ -496,8 +489,8 @@
\title{sr-vorl.cls\\[1ex]\normalsize Eine \LaTeX-Klasse für Bücher bei Springer Research (Springer Gabler Research, Springer Vieweg Research, Springer Spektrum Research) und Springer VS (Springer VS Research, Springer VS Forschung)
}
-\author{Copyright 2013--2016 by Jonas~L.~Dabelow\footnote{\href{mailto:J.L.Dabelow@gmx.net}{\texttt{J.L.Dabelow@gmx.net}}}}
-\date{Version~1.1 (31.\,Januar~2016)}
+\author{Copyright 2013--2021 by Jonas~L.~Dabelow\footnote{\href{mailto:J.L.Dabelow@gmx.net}{\texttt{J.L.Dabelow@gmx.net}}}}
+\date{Version~1.2 (24.\,Mai~2021)}
\maketitle
@@ -516,7 +509,7 @@
%
%
% \section{Einleitung}
-% Diese \LaTeX-Klasse wurde erstellt, um Bücher zu setzen, die bei Springer Research (\textbf{Springer Gabler Research}, \textbf{Springer Vieweg Research}, \textbf{Springer Spektrum Research}) oder Springer~VS (\textbf{Springer VS Research}, \textbf{Springer VS Forschung}) veröffentlicht werden sollen (Beachte hierzu auch die Klassenoption \optref{format}!).
+% Diese \LaTeX-Klasse wurde erstellt, um Bücher zu setzen, die bei Springer Research (\textbf{Springer Gabler Research}, \textbf{Springer Vieweg Research}, \textbf{Springer Spektrum Research}) oder Springer~VS (\textbf{Springer VS Research}, \textbf{Springer VS Forschung}) veröffentlicht werden sollen (beachte hierzu auch die Klassenoption \optref{format}).
% Mit dieser Klasse werden viele Gestaltungsvorgaben des Verlags bereits umgesetzt.
% Der Autor der Klasse gibt jedoch keine Garantie, dass damit alle Vorgaben bereits umgesetzt sind.
% Dies ist in einigen Fällen auch nicht möglich, da die Autoren eines Buches einige Dinge \enquote{von Hand} umsetzen müssen, da \LaTeX\ hierfür keine vollständige Automatisierung ermöglicht (z.\,B. Silbentrennung, Platzierung von Gleitobjekten\dots).
@@ -532,6 +525,7 @@
%
%
% \subsection{Nutzung der Klasse}
+% \label{sec:nutzung}%
% Sie können diese Klasse wie jede andere \LaTeX-Klasse auch nutzen.
% Binden Sie sie einfach mit dem Befehl \fmacro{documentclass}\oarg{Optionen}\sarg{sr-vorl} ein.
% Dazu muss die Datei \datei{sr-vorl.cls} in einem Ordner liegen, der von \LaTeX\ durchsucht wird (z.\,B. der Ordner, in dem sich Ihre Hauptdatei befindet).\par
@@ -544,7 +538,7 @@
% Die Nutzung mit anderen Treibern wie \programm{xetex}, \programm{luatex} oder \programm{context} ist nicht getestet!
%
% \subsection{Erzeugung der Klassendatei und Hilfsdateien sowie der Dokumentation (falls notwendig)}
-% \label{sec:erzeugung}
+% \label{sec:erzeugung}%
% Die vorliegende Klasse inklusive aller zugehörigen Dateien kann --~wie üblicherweise jede \LaTeX-Klasse~-- aus einer \datei{.dtx}- und einer \datei{.ins}-Datei erzeugt werden.\par
% Sofern Sie keinen Zugriff auf die Klassendatei \datei{sr-vorl.cls}, aber auf die Dateien \datei{sr-vorl.dtx} und \datei{sr-vorl.ins} haben, können Sie die Klassendatei erzeugen, indem Sie \datei{sr-vorl.ins} mit \programm{tex}, \programm{latex} oder \programm{pdflatex} kompilieren:\\
% \texttt{tex sr-vorl.ins}\\
@@ -576,7 +570,7 @@
% Sie wird rechtsbündig, in kursiver Schrift auf eine rechte Seite gesetzt.
% Vertikal ist sie so ausgerichtet, dass das Verhältnis von oberem und unterem Abstand den Goldenen Schnitt bildet.\par
% Als optionales Argument kann eine Überschrift angegeben werden (die ebenfalls rechtsbündig gesetzt wird).
-% Wir kein optionales Argument angegeben, so erhält die Widmung keine Überschrift.\macropar
+% Wird kein optionales Argument angegeben, so erhält die Widmung keine Überschrift.\macropar
%
% \pagebreak
% \macrodescription{geleitwort}%
@@ -604,13 +598,25 @@
%
% \subsection{Der Hauptteil}
% \label{sec:hauptteil}
-% \noindent\macrodescription{kapitel}\oarg{Titel im Inhaltsverzeichnis}\marg{Titel}\marg{Autor(en)}\descriptionpar
+% \noindent\macrodescription{kapitel}\oarg{Kurztitel}\marg{Titel}\marg{Autor(en)}\descriptionpar
% Dieser Befehl ist für die Verwendung in Mehrautorenbüchern (siehe Klassenoption \optref{format}).
% Er ist dort statt des Standard-\LaTeX-Befehls \fmacro{chapter} zu nutzen!
% Die ersten beiden Argumente funktionieren wie die von \fmacro{chapter}.
+% Der Kurztitel aus dem ersten Argument taucht sowohl im Inhaltsverzeichnis als auch in der Kopfzeile auf.
% Im dritten Argument wird der Autor bzw. die Autoren des Kapitels angegeben.
% Es erscheint unterhalb der Kapitelüberschrift.\macropar
%
+% \noindent\macrodescription{kapitelmituntertitel}\oarg{Kurztitel}\marg{Titel}\marg{Untertitel}\marg{Autor(en)}\descriptionpar
+% Dieser Befehl ist für die Verwendung in Mehrautorenbüchern (siehe Klassenoption \optref{format}).
+% Er entspricht dem Befehl \macroref{kapitel}, hat aber noch ein zusätzliches Argument für einen Untertitel.
+% Dieser wird zwischen dem Titel und der Autorenangabe des Kapitels gesetzt.
+% Er erscheint weder in der Kopfzeile noch im Inhaltsverzeichnis.\\
+% Der etwas sperrige Befehlsname ist so gewählt, damit der Befehl \macroref{kapitel} weiter genauso funktioniert wie in den vohergehenden Versionen dieser Klasse.\macropar
+%
+% \noindent\macrodescription{chaptermituntertitel}\oarg{Kurztitel}\marg{Titel}\marg{Untertitel}\descriptionpar
+% Dieser Befehl stellt eine Version des Befehls \fmacro{chapter} mit Untertitel dar.
+% Er funktioniert genauso, wie der Befehl \macroref{kapitelmituntertitel}, ist aber für die Verwendung in Nicht-Mehrautorenbüchern (siehe Klassenoption \optref{format}) gedacht, hat also kein Argument für die Angabe von Kapitelautoren.\macropar
+%
% \section{Klassenoptionen}
% \label{sec:optionen}
% Die vorliegende \LaTeX-Klasse ist für deutsch- und englischsprachige Dokumente entwickelt worden.
@@ -631,8 +637,8 @@
% \optdescription[format]{format=\farg{Buchart}}
% Mit der vorliegenden Klasse können sowohl Monografien in verschiedenen Formaten als auch Mehrautorenbücher gesetzt werden.
% Damit alle Formatierungen entsprechend angepasst werden, muss die Art des Buches mit Hilfe der \option{format}-Option angegeben werden.\par
-% Folgende Angaben sind möglich: \option{a5-monografie}, \option{handbuch-monografie} und \option{a5-mehrautorenbuch} für Bücher bei \textbf{Springer Gabler Research}, \textbf{Springer Vieweg Research} und \textbf{Springer Spektrum Research} sowie \option{vs} für Bücher bei \textbf{Springer VS Research} und \textbf{Springer VS Forschung}.\par
-% Für die Einstellung \option{a5-mehrautorenbuch} wird zusätzlich der Befehl \fmacro{kapitel} bereitgestellt (siehe \cref{sec:vorspann}).\par
+% Folgende Angaben sind möglich: \option{a5-monografie}, \option{handbuch-monografie} und \option{a5-mehrautorenbuch} für Bücher bei \textbf{Springer Gabler Research}, \textbf{Springer Vieweg Research} und \textbf{Springer Spektrum Research}, \option{vs} für Bücher bei \textbf{Springer VS Research} und \textbf{Springer VS Forschung} sowie \option{autouni} für Bücher aus der AutoUni-Schriftenreihe von Springer.\par
+% Für die Einstellung \option{a5-mehrautorenbuch} werden zusätzlich die Befehle \fmacro{kapitel} und \fmacro{kapitelmituntertitel} bereitgestellt (siehe \cref{sec:hauptteil}).\par
% Wird kein Format angegeben, so wird automatisch \option{a5-monografie} eingestellt.\descriptionpar
%
% \optdescription{no-shorthands}
@@ -655,13 +661,18 @@
%
% \optdescription{test}
% Diese Option ist dazu da, den Satz eines Dokuments zu überprüfen.
-% Sie schaltet einen Rahmen um den Satzspiegel ein, so dass Abweichungen davon leichter überprüft werden können.
-% Zudem werden \emph{overfull boxes} (z.\,B. überlange Zeilen) \cite{texbook,latex-begleiter} durch schwarze Kästchen markiert.\descriptionpar
+% Sie schaltet einen Rahmen um den Satzspiegel ein, so dass Abweichungen davon leichter überprüft werden können.\descriptionpar
%
-% \optdescription{schriftgroesse=\farg{Wert}}
+% \optdescription[schriftgroesse]{schriftgroesse=\farg{Wert}}
% Mit dieser Option kann die (Standard-)Schriftgröße Ihres Dokuments eingestellt werden.
% Die Angabe \farg{Wert} gibt die Schriftgröße in pt an.
-% Diese sollte nicht kleiner als 10\,pt sein, voreingestellt sind 11\,pt.\descriptionpar
+% Diese sollte nicht kleiner als 10\,pt sein, voreingestellt sind 10\,pt für die Buchart \option{autouni} und 11\,pt für alle anderen (betrachte dazu die Option \optref{format}).\descriptionpar
+%
+% \optdescription{autor-in-toc}
+% Diese Option lässt die Kapitelautoren in Mehrautorenbüchern im Inhaltsverzeichnis erscheinen.
+% Die Formatierung kann geändert werden, indem der Befehl \fmacro{AutorinTOCFormatierung} umdefiniert wird.
+% Die voreingestellte Formatierung ist \fmacro{itshape}\fmacro{mdseries}\fmacro{rmfamily} (kursive, nicht-fette Serifenschrift).\par
+% Diese funktioniert nur für Mehrautorenbüchern, bei anderen Bucharten hat sie keine Funktion (siehe dazu die Option \optref{format}).
%
% \section{Gestaltungshinweise}
% \label{sec:hinweise}
@@ -781,7 +792,7 @@
% Für einfache abgesetzte Formeln sind dies im Wesentlichen die \env{equation}-Umgebung (für einzelne Formeln) und die \env{align}-Umgebung (für mehrere Formeln) bzw. deren Sternversionen \env{equation*} und \env{align*} für nicht nummerierte Formeln.\par
% In dieser Klasse wird das Paket \paket{onlyamsmath} verwendet, das einen Fehler ausgibt, wenn Matheumgebungen genutzt werden, die nicht von der AMS stammen \cite{onlyamsmath}.
% Möchten Sie dieses Verhalten vermeiden, so nutzen Sie die Klassenoption \optref{non-ams}.\par
-% Nützliche Hinweise zum Mathematiksatz in \LaTeX\ finden Sie in \cite{amsldoc,voss-mathe,voss-mathe-online,latex-begleiter,more-math}.
+% Nützliche Hinweise zum Mathematiksatz in \LaTeX\ finden Sie in \cite{amsldoc,voss-mathe,latex-begleiter,more-math}.
%
%
% \section{Weiterführendes}
@@ -814,18 +825,24 @@
% Das Wissen, welche Pakete geladen werden, kann wichtig sein, wenn der Nutzer der Klasse andere Pakete laden möchte, die mit den von der Klasse geladenen in Konflikt stehen könnten.\par
% Die Optionen, mit denen diese Pakete geladen werden, sind teilweise von den verwendeten Klassenoptionen abhängig (besonders von \optref{format}) und deshalb hier nicht aufgeführt.
% Sie sind bei Bedarf der Quelltextdatei \datei{sr-vorl.dtx} zu entnehmen.
-% \begin{labeling}{\paket{onlyamsmath}\cite{onlyamsmath}}
+% \begin{labeling}{\paket{scrlayer-scrpage} \cite{koma}}
% \item[\paket{scrbook} \cite{koma}]
% Dies ist die verwendete Dokumentenklasse aus dem \textsf{KOMA}-Script-Bündel.
% \item[\paket{xkeyval} \cite{xkeyval}]
% Notwendig zum Erstellen einiger Klassenoptionen.
% \item[\paket{etoolbox} \cite{etoolbox}]
% Stellt verschiedene if-Abfragen und Hooks zur Verfügung.
+% \item[\paket{xstring} \cite{xstring}]
+% Das Paket bietet viele Befehle zur String-Verarbeitung und "~auswertung.
+% Es wird zur unter anderem Auswertung der Klassenoptionen verwendet.
+% \item[\paket{mathptmx} \cite{mathptmx}]
+% Paket zur Verwendung von Times als Schriftart.
+% Dieses Paket wird nur für Bücher aus der AutoUni-Schriftenreihe verwendet (beachte die Option \optref{format}).
% \item[\paket{babel} \cite{babel}]
% Lädt die Sprachen.
% \item[\paket{geometry} \cite{geometry}]
% Wird zur Einstellung des Satzspiegels genutzt.
-% \item[\paket{scrpage2} \cite{koma}]
+% \item[\paket{scrlayer-scrpage} \cite{koma}]
% Für die Definition der Kopf- und Fußzeilen.
% Der definierte Standard-Seitenstil heißt \option{sr-standard}.
% \item[\paket{caption} \cite{caption}]
@@ -834,18 +851,17 @@
% Verbesserter Flattersatz.
% \item[\paket{enumitem} \cite{enumitem}]
% Einstellungen für Listen.
-% \item[\paket{xstring} \cite{xstring}]
-% Das Paket bietet viele Befehle zur String-Verarbeitung und "~auswertung.
-% Es wird zur unter anderem Auswertung der Klassenoptionen verwendet.
% \item[\paket{chngcntr} \cite{chngcntr}]
% Das Paket dient der Modifikation von Zählern.
% Es wird zur Anpassung der Kapitel-, Abbildungs- und anderer Zähler bei Mehrautorenbüchern verwendet.
-% \item[\paket{varwidth}] \cite{varwidth}
+% \item[\paket{varwidth} \cite{varwidth}]
% Stellt die \env{varwidth}-Umgebung als Erweiterung der \env{minipage}-Umgebung bereit.
% \item[\paket{onlyamsmath} \cite{onlyamsmath}]
-% Verhindert die Nutzung von Mathe-Umgebungen, die nicht von der AMS stammen (siehe auch die Option \optref{non-ams} in \cref{sec:optionen}).
+% Verhindert die Nutzung von Mathe-Umgebungen, die nicht von der AMS stammen.
+% % Das Laden dieses Pakets kann mit der Option \optref{non-ams} verhindert werden.
% \item[\paket{microtype} \cite{microtype}]
-% Verbesserte Mikrotypographie (siehe auch die Option \optref{no-microtype} in \cref{sec:optionen}).
+% Verbesserte Mikrotypographie.
+% Das Laden dieses Pakets kann mit der Option \optref{no-microtype} verhindert werden.
% \end{labeling}
%
% \subsection{Literaturtipps}
@@ -856,7 +872,7 @@
% Gerade bei Werken älteren Datums muss man vor veralteten Befehlen auf der Hut sein.
% Eine Hilfe hierzu bietet \cite{l2tabu}.
% Dort sind einige veraltete Befehle und Pakete sowie sonstige Fehlerquellen benannt.\par
-% Für den Mathematiksatz sei auf die bereits in \cref{sec:mathesatz} erwähnten Werke \cite{amsldoc,voss-mathe,voss-mathe-online,latex-begleiter,more-math} verwiesen.\par
+% Für den Mathematiksatz sei auf die bereits in \cref{sec:mathesatz} erwähnten Werke \cite{amsldoc,voss-mathe,latex-begleiter,more-math} verwiesen.\par
% Weitere Orientierung bieten \cite{latex-begleiter,texbook,wikibooks-latex}.
% Nahezu alle Pakete inklusive ihrer Beschreibungen sowie weitere nützliche Dokumente finden Sie im \emph{Comprehensive \TeX\ Archive Network} \cite{ctan}.
% Viele dieser Dokumente und Beschreibungen finden Sie auch in Ihrem \LaTeX-System auf Ihrem Rechner, indem Sie in der Konsole (Terminal, Bash, Eingabeaufforderung) folgendes eingeben: \texttt{texdoc \meta{Paketname}}\par
@@ -887,10 +903,25 @@
% \addcontentsline{toc}{section}{Liste der Änderungen}
% Hier finden Sie eine Übersicht über die Änderungen, die an dieser Klasse im Verlauf ihrer Versionen vorgenommen wurden.
%
+% \subsection*{Änderungen in Version 1.1}
+% \addcontentsline{toc}{subsection}{Änderungen in Version 1.1}
+% \begin{description}
+% \aenderung{Option \optref{format}}{Neue Einstellungsmöglichkeit \option{vs} für Bücher bei Springer~VS.}
+% \aenderung{Befehl \macroref{verfasser}}{Neuer Befehl zum Satz von Autor und Ort des Geleitwortes.}
+% \aenderung{Umstellung auf \programm{biber}}{Die Bibliografie dieser Dokumentation wird nun mit \programm{biber} erzeugt.}
+% \end{description}
+%
+% \subsection*{Änderungen in Version 1.2}
+% \addcontentsline{toc}{subsection}{Änderungen in Version 1.2}
% \begin{description}
-% \aenderung{1.1}{Option \optref{format}}{Neue Einstellungsmöglichkeit \option{vs} für Bücher bei Springer VS.}
-% \aenderung{1.1}{Befehl \macroref{verfasser}}{Neuer Befehl zum Satz von Autor und Ort des Geleitwortes.}
-% \aenderung{1.1}{Umstellung auf \programm{biber}}{Die Bibliografie dieser Dokumentation wird nun mit \programm{biber} erzeugt.}
+% \aenderung{Option \optref{format}}{Neue Einstellungsmöglichkeit \option{autouni} für Bücher aus der AutoUni-Schriftenreihe.}
+% \aenderung{Befehl \macroref{kapitelmituntertitel}}{Neuer Befehl für den Beginn eines Kapitels, dessen Titel einen Untertitel haben soll (für Mehrautorenbücher).}
+% \aenderung{Befehl \macroref{chaptermituntertitel}}{Neuer Befehl für den Beginn eines Kapitels, dessen Titel einen Untertitel haben soll (für Nicht-Mehrautorenbücher).}
+% \aenderung{Option \optref{autor-in-toc}}{Neue Option, die es bei Mehrautorenbüchern (siehe auch die Option \optref{format}) ermöglicht, die jeweiligen Kapitelautoren im Inhaltsverzeichnis anzuzeigen.}
+% \aenderung{Änderung der Kopfzeile}{Vor Beginn des ersten Unterkapitels eines Kapitels erscheint auf rechten Seiten in der Kopfzeile nun der Kapiteltitel (bisher stand dort nichts). Nach Beginn des ersten Unterkapitels steht dort der Titel des Unterkapitels. Dies gilt nicht für Mehrautorenbücher (bei denen dort die Namen der Kapitelautoren stehen).}
+% \aenderung{Kopfzeile im Vorspann}{Im Vorspann (siehe auch \fmacro{frontmatter} in \cref{sec:nutzung}) wird in der Kopfzeile nun auf beiden Seiten der Kapiteltitel (z.\,B.~\enquote{Inhaltsverzeichnis}) angezeigt.}
+% \aenderung{Abstand bei Überschriften bei Springer~VS}{Anpassung eines fehlerhaften Abstands bei Überschriften für Bücher bei Springer~VS (siehe auch die Option \optref{format}).}
+% \aenderung{Paketänderung für Kopf- und Fußzeilen}{Für die Erzeugung der Kopf- und Fußzeilen wird nun nicht mehr das (obsolete) Paket \paket{scrpage2} verwendet, sondern das Paket \paket{scrlayer-scrpage}.}
% \end{description}
%
%\StopEventually{}
@@ -934,7 +965,7 @@
\DeclareOptionX[sr]{englisch}{%
\PassOptionsToPackage{ngerman,british}{babel}%
\ifGermanshorthands%
- \AfterPackage+{babel}{%
+ \AfterAtEndOfPackage*{babel}{%
\useshorthands{"}%
\addto\extrasbritish{\languageshorthands{ngerman}}%
}%
@@ -951,8 +982,10 @@
\global\AMSfalse%
}
+\DeclareOptionX[sr]{autor-in-toc}{%
+ \global\autorintoctrue%
+}
-\gdef\sr@schriftgroesse{11}% Standard-Schriftgroesse
\gdef\sr@format{a5-monografie}% Standard-Format
\newif\ifMicrotype% soll microtype eingebunden werden
@@ -961,6 +994,9 @@
\newif\ifAMS% soll onlyamsmath eingebunden werden
\AMStrue
+\newif\ifautorintoc% soll onlyamsmath eingebunden werden
+\autorintocfalse
+
\newif\ifGermanshorthands% sollen die deutschen shorthands auch im Englischen nutzbar sein
\Germanshorthandstrue
@@ -968,19 +1004,20 @@
\DeclareOptionX[sr]{format}[a5-monografie]{\gdef\sr@format{#1}}
+
\ProcessOptions\relax
\ProcessOptionsX[sr]\relax
+\RequirePackage{xstring}
-
+\IfStrEq{\sr@format}{autouni}{\RequirePackage{mathptmx}}{}% Times-Paket laden, falls format=autouni
\RequirePackage{babel}
\RequirePackage{geometry}
-\RequirePackage{scrpage2}
+\RequirePackage{scrlayer-scrpage}
\RequirePackage{caption}
\RequirePackage{ragged2e}
\RequirePackage{enumitem}
-\RequirePackage{xstring}
\RequirePackage{chngcntr}
\RequirePackage{varwidth}
\ifAMS
@@ -1025,9 +1062,23 @@
(0pt,0pt)%
}%
+\defpagestyle{sr-frontmatter}% Frontmatter-pagestyle
+ {%
+ (0pt,0pt)%
+ {\pagemark\hfill\headmark}%
+ {\headmark\hfill\pagemark}%
+ {}%
+ (\textwidth,0.5pt)%
+ }%
+ {%
+ (0pt,0pt)%
+ {}%
+ {}%
+ {}%
+ (0pt,0pt)%
+ }%
\KOMAoptions{% Einstellungen der KOMA-Klasse
- fontsize=\sr@schriftgroesse pt,%
open=right,%
captions=signature,%
captions=abovetable,%
@@ -1037,6 +1088,11 @@
\gdef\frontmatter{%
\pagenumbering{Roman}%
\setcounter{page}{5}%
+ \pagestyle{sr-frontmatter}
+}
+
+\gappto\mainmatter{%
+ \pagestyle{sr-standard}%
}
@@ -1055,12 +1111,25 @@
\raggedbottom% vertikalen Seitenausgleich abschalten
}
+\let\old@chapterheadstartvskip\chapterheadstartvskip% Sicherung des alten Abstandes vor Kapitelanfaengen
+\let\old@chapterheadendvskip\chapterheadendvskip% Sicherung des alten Abstandes nach Kapitelanfaengen
+\newcommand{\sr@chapterheadstartvskip}{% Definition eines neuen Abstands vor Kapitelanfaengen fuer angepasste Kapitelbefehle
+ \vspace*{1.8\baselineskip}%
+}%
+\newcommand{\sr@chapterheadendvskip}{% Definition eines neuen Abstands nach Kapitelanfaengen fuer angepasste Kapitelbefehle
+ \vspace{.5\baselineskip plus 0.1\baselineskip minus .05\baselineskip}%
+}%
+
% Einstellungen fuer die verschiedenen Formate
\IfStrEqCase{\sr@format}{%
{a5-monografie}%
{%
+ \ifundef{\sr@schriftgroesse}%
+ {\gdef\sr@schriftgroesse{11}}%
+ {}%
\KOMAoptions{%
+ fontsize=\sr@schriftgroesse pt,%
paper=a4,%
twoside,%
pagesize=auto,%
@@ -1071,7 +1140,9 @@
textwidth=11.5cm,%
height=18cm,%
}%
- \automark[section]{chapter}
+ \automark[section]{chapter}%
+ \csgpreto{chapter}{\automark[chapter]{chapter}}% Abfangen, falls keine Section im Chapter vorhanden (oder erst spaeter vorhanden)
+ \csgpreto{section}{\automark[section]{chapter}}% Aufheben des Abfangens (s. o.)
\defpagestyle{sr-standard}% Standard pagestyle
{%
(0pt,0pt)%
@@ -1090,7 +1161,11 @@
}%
{handbuch-monografie}%
{%
+ \ifundef{\sr@schriftgroesse}%
+ {\gdef\sr@schriftgroesse{11}}%
+ {}%
\KOMAoptions{%
+ fontsize=\sr@schriftgroesse pt,%
paper=16.8cm:24cm,%
twoside,%
pagesize=auto,%
@@ -1101,7 +1176,9 @@
textwidth=12.5cm,%
height=20cm,%
}%
- \automark[section]{chapter}
+ \automark[section]{chapter}%
+ \csgpreto{chapter}{\automark[chapter]{chapter}}% Abfangen, falls keine Section im Chapter vorhanden (oder erst spaeter vorhanden)
+ \csgpreto{section}{\automark[section]{chapter}}% Aufheben des Abfangens (s. o.)
\defpagestyle{sr-standard}% Standard pagestyle
{%
(0pt,0pt)%
@@ -1120,7 +1197,11 @@
}%
{a5-mehrautorenbuch}% Einstellungen fuer Mehrautorenbuecher
{%
+ \ifundef{\sr@schriftgroesse}%
+ {\gdef\sr@schriftgroesse{11}}%
+ {}%
\KOMAoptions{%
+ fontsize=\sr@schriftgroesse pt,%
paper=a4,%
twoside,%
pagesize=auto,%
@@ -1148,14 +1229,6 @@
(0pt,0pt)%
}%
\gdef\KapitelAutor{}%
- \newcommand{\sr@chapterheadstartvskip}{% Definition eines neuen Abstands vor Kapitelanfaengen
- \vspace*{1.8\baselineskip}%
- }%
- \newcommand{\sr@chapterheadendvskip}{% Definition eines neuen Abstands nach Kapitelanfaengen
- \vspace{.5\baselineskip plus 0.1\baselineskip minus .05\baselineskip}%
- }%
- \let\old@chapterheadstartvskip\chapterheadstartvskip% Sicherung des alten Abstandes vor Kapitelanfaengen
- \let\old@chapterheadendvskip\chapterheadendvskip% Sicherung des alten Abstandes nach Kapitelanfaengen
\counterwithout{section}{chapter}%
\counterwithout{figure}{chapter}%
\counterwithout{table}{chapter}%
@@ -1168,7 +1241,11 @@
}%
{vs}% Einstellungen fuer Buch bei Springer VS
{%
+ \ifundef{\sr@schriftgroesse}%
+ {\gdef\sr@schriftgroesse{11}}%
+ {}%
\KOMAoptions{%
+ fontsize=\sr@schriftgroesse pt,%
paper=a4,%
twoside,%
pagesize=auto,%
@@ -1179,7 +1256,9 @@
textwidth=11.5cm,%
height=18cm,%
}%
- \automark[section]{chapter}
+ \automark[section]{chapter}%
+ \csgpreto{chapter}{\automark[chapter]{chapter}}% Abfangen, falls keine Section im Chapter vorhanden (oder erst spaeter vorhanden)
+ \csgpreto{section}{\automark[section]{chapter}}% Aufheben des Abfangens (s. o.)
\defpagestyle{sr-standard}% Standard pagestyle
{%
(0pt,0pt)%
@@ -1198,16 +1277,59 @@
\gdef\frontmatter{%
\pagenumbering{arabic}%
\setcounter{page}{5}%
+ \pagestyle{sr-frontmatter}%
}%
- \let\old@chapterheadstartvskip\chapterheadstartvskip%
- \let\old@chapterheadendvskip\chapterheadendvskip%
- \renewcommand*{\chapterheadstartvskip}{\vspace*{-\topskip}}%
- \renewcommand*{\chapterheadendvskip}{\vspace{72pt}}%
+% \renewcommand*{\chapterheadstartvskip}{\vspace*{-\topskip}}% auskommentiert in Version 1.2 (Grund fuer vorherige Verwendung unklar)
+% \renewcommand*{\chapterheadendvskip}{\vspace{72pt}}% auskommentiert in Version 1.2 (Grund fuer vorherige Verwendung unklar)
\deffootnote%
{1em}%
{1em}%
{\thefootnotemark\ }%
}%
+ {autouni}% Einstellungen fuer die AutoUni-Schriftenreihe
+ {%
+ \ifundef{\sr@schriftgroesse}%
+ {\gdef\sr@schriftgroesse{10}}%
+ {}%
+ \KOMAoptions{%
+ fontsize=\sr@schriftgroesse pt,%
+ paper=a4,%
+ twoside,%
+ pagesize=auto,%
+ }%
+ \recalctypearea
+ \geometry{% Einstellungen fuer Satzspiegel (mittels geometry-Paket)
+ includehead,%
+ textwidth=11.5cm,%
+ height=18cm,%
+ }%
+ \setkomafont{disposition}{\normalfont\bfseries}%
+ \setkomafont{chapter}{\normalfont\bfseries\fontsize{18}{22}\selectfont}%
+ \setkomafont{section}{\normalfont\bfseries\fontsize{14}{17}\selectfont}%
+ \setkomafont{subsection}{\normalfont\bfseries}%
+ \setkomafont{subsubsection}{\normalfont\bfseries}%
+ \setkomafont{paragraph}{\normalfont\bfseries}%
+ \setkomafont{subparagraph}{\normalfont\bfseries}%
+
+ \automark[section]{chapter}%
+ \csgpreto{chapter}{\automark[chapter]{chapter}}% Abfangen, falls keine Section im Chapter vorhanden (oder erst spaeter vorhanden)
+ \csgpreto{section}{\automark[section]{chapter}}% Aufheben des Abfangens (s. o.)
+ \defpagestyle{sr-standard}% Standard pagestyle
+ {%
+ (0pt,0pt)%
+ {\pagemark\hfill\headmark}%
+ {\headmark\hfill\pagemark}%
+ {}%
+ (\textwidth,0.5pt)%
+ }%
+ {%
+ (0pt,0pt)%
+ {}%
+ {}%
+ {}%
+ (0pt,0pt)%
+ }%
+ }%
}
@@ -1216,6 +1338,26 @@
\newlength{\sr@verfasserbreite@ort}% Breite des Ortes im Befehl \verfasser
\newlength{\sr@verfasserbreite@name}% Breite des Namens im Befehl \verfasser
+% Das folgende Macro ist noch in der Entwicklung!
+% \begin{macro}{\schriftgrad}
+% Einstellung der Schriftgröße.
+% \begin{macrocode}
+%\newcommand{\schriftgrad}[2][]{%
+% \ifblank{#1}
+% {%
+% \pgfmathparse{1.2*#2}%
+% \fontsize{#2}{\pgfmathresult}%
+% \selectfont%
+% }%
+% {%
+% \fontsize{#2}{#1}%
+% \selectfont%
+% }%
+%}
+% \end{macrocode}
+% \end{macro}
+
+
% \begin{environment}{widmung}
% Widmung
@@ -1265,11 +1407,12 @@
% \begin{macrocode}
\newcommand{\geleitwort}{%
\addchap*{\GeleitwortTitel}%
- \markboth{\GeleitwortTitel}{\GeleitwortTitel}
+ \markboth{\GeleitwortTitel}{\GeleitwortTitel}%
}
% \end{macrocode}
% \end{macro}
+
% \begin{macro}{\verfasser}
% Geleitwort-Kapitel
% \begin{macrocode}
@@ -1304,17 +1447,34 @@
% \end{macro}
+\gdef\sr@AutorinTOCFormatierung{\itshape\mdseries\rmfamily}% Interner Befehl fuer die Formatierung der Autoren im Inhaltsverzeichnis bei Mehrautorenbuechern
+
+\gdef\AutorinTOCFormatierung{\sr@AutorinTOCFormatierung}% Aenderbarer Befehl fuer die Formatierung der Autoren im Inhaltsverzeichnis bei Mehrautorenbuechern
+
+
% \begin{macro}{\kapitel}
% Kapitel-Befehl fuer Mehrautorenbuecher
% \begin{macrocode}
\newcommand{\kapitel}[3][]{%
+ \ifblank{#1}%
+ {%
+ \gdef\KapitelKurztitel{#2}%
+ }%
+ {%
+ \gdef\KapitelKurztitel{#1}%
+ }%
+ \gdef\KapitelTitel{#2}%
\gdef\KapitelAutor{#3}%
+ \ifautorintoc% pruefen, ob KapitelAutor ins TOC soll
+ \gdef\KapitelimTOC{\KapitelKurztitel\newline\AutorinTOCFormatierung\KapitelAutor}%
+ \else%
+ \gdef\KapitelimTOC{\KapitelKurztitel}%
+ \fi%
\stepcounter{chapter}
\let\chapterheadstartvskip\sr@chapterheadstartvskip%
\let\chapterheadendvskip\sr@chapterheadendvskip%
- \ifblank{#1}%
- {\addchap{#2}}%
- {\addchap[#1]{#2}}%
+ \addchap[\KapitelimTOC]{\KapitelTitel}% Setzen des Kapiteltitels
+ \markboth{\KapitelKurztitel}{\KapitelAutor}%
\let\chapterheadstartvskip\old@chapterheadstartvskip%
\let\chapterheadendvskip\old@chapterheadendvskip%
{\usekomafont{section}\itshape#3}\par%
@@ -1324,6 +1484,86 @@
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\kapitelmituntertitel}
+% Kapitel-Befehl mit Untertitel fuer Mehrautorenbuecher
+% \begin{macrocode}
+\newcommand{\kapitelmituntertitel}[4][]{%
+ \ifblank{#1}%
+ {%
+ \gdef\KapitelKurztitel{#2}%
+ }%
+ {%
+ \gdef\KapitelKurztitel{#1}%
+ }%
+ \gdef\KapitelTitel{#2}%
+ \gdef\KapitelUntertitel{#3}%
+ \gdef\KapitelAutor{#4}%
+ \ifautorintoc% pruefen, ob KapitelAutor ins TOC soll
+ \gdef\KapitelimTOC{\KapitelKurztitel\newline\AutorinTOCFormatierung\KapitelAutor}%
+ \else%
+ \gdef\KapitelimTOC{\KapitelKurztitel}%
+ \fi%
+ \stepcounter{chapter}
+ \let\chapterheadstartvskip\sr@chapterheadstartvskip%
+ \let\chapterheadendvskip\sr@chapterheadendvskip%
+ \addchap[\KapitelimTOC]{\KapitelTitel}% Setzen des Kapiteltitels
+ {\usekomafont{section}\raggedright\KapitelUntertitel\\[.5\baselineskip plus 0.1\baselineskip minus .05\baselineskip]}% Setzen des Untertitels
+ \markboth{\KapitelKurztitel}{\KapitelAutor}%
+ \let\chapterheadstartvskip\old@chapterheadstartvskip%
+ \let\chapterheadendvskip\old@chapterheadendvskip%
+ {\noindent\usekomafont{section}\itshape\KapitelAutor}\par%
+ \vspace*{1.35\baselineskip plus 0.09\baselineskip minus .15\baselineskip}%
+ \noindent%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\chaptermituntertitel}
+% Kapitel-Befehl mit Untertitel fuer Nicht-Mehrautorenbuecher
+% \begin{macrocode}
+\newcommand{\chaptermituntertitel}[3][]{%
+ \let\chapterheadendvskip\sr@chapterheadendvskip%
+ \ifblank{#1}%
+ {%
+ \chapter{#2}%
+ {\usekomafont{section}\raggedright#3\\[.5\baselineskip plus 0.1\baselineskip minus .05\baselineskip]}%
+ }%
+ {%
+ \chapter[#1]{#2}%
+ {\usekomafont{section}\raggedright#3\\[.5\baselineskip plus 0.1\baselineskip minus .05\baselineskip]}%
+ }%
+ \let\chapterheadendvskip\old@chapterheadendvskip%
+ \noindent%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{environment}{zusammenfassung}
+% Kapitelzusammenfassung
+% \begin{macrocode}
+\newenvironment{zusammenfassung}[1][]
+ {%
+ \ifblank{#1}%
+ {%
+ \vspace*{-\sr@widmungstretch@oben}%
+ \begin{flushright}%
+ }%
+ {%
+ \let\raggedsection\raggedleft%
+ \setlength{\sr@widmungstretch@oben}{-\baselineskip}%
+ \addtolength{\sr@widmungstretch@oben}{\stretch{1}}%
+ \def\chapterheadstartvskip{\vspace*{\sr@widmungstretch@oben}}%
+ \chapter*{\raggedleft #1}%
+ \begin{flushright}%
+ }%
+ \itshape%
+ }%
+ {%
+ \end{flushright}%
+ \vspace*{\stretch{1.618}}%
+ }%
+% \end{macrocode}
+% \end{environment}
% Einstellungen fuer Gleitobjekte
\setcounter{topnumber}{3}
diff --git a/macros/latex/contrib/springer/sr-vorl/sr-vorl.pdf b/macros/latex/contrib/springer/sr-vorl/sr-vorl.pdf
index 73da9de1ed..dcca4c1f51 100644
--- a/macros/latex/contrib/springer/sr-vorl/sr-vorl.pdf
+++ b/macros/latex/contrib/springer/sr-vorl/sr-vorl.pdf
Binary files differ
diff --git a/macros/latex/contrib/suftesi/suftesi.dtx b/macros/latex/contrib/suftesi/suftesi.dtx
index 7c63defed8..9a8820cb6e 100644
--- a/macros/latex/contrib/suftesi/suftesi.dtx
+++ b/macros/latex/contrib/suftesi/suftesi.dtx
@@ -56,7 +56,7 @@ This work has the LPPL maintenance status "author-maintained".
%<class>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
%<class>\ProvidesClass{suftesi}
%<*class>
- [2021/05/20 v3.1.0 A class for typesetting theses, books and articles]
+ [2021/05/23 v3.1.1 A class for typesetting theses, books and articles]
%</class>
%<*driver>
\documentclass[12pt]{ltxdoc}
@@ -109,7 +109,6 @@ This work has the LPPL maintenance status "author-maintained".
% LAYOUT
%--------------------------------------------------------
\usepackage[skip=1.5ex]{parskip}
-\setcounter{tocdepth}{3}
\usepackage{geometry}
\geometry{
a4paper,
@@ -127,8 +126,8 @@ This work has the LPPL maintenance status "author-maintained".
\addbibresource{suftesi.bib}
\DeclareBibliographyCategory{pkgs-loaded}
\addtocategory{pkgs-loaded}{appendix,caption,color,crop,enumitem,emptypage,
-fancyhdr,fixltxhyph,fontenc,fontsize,mathalpha,libertinust1math,newtx,geometry,
-iftex,microtype,multicol,titlesec,titletoc,xkeyval,cclicenses,fontenc,
+fancyhdr,fixltxhyph,fontsize,mathalpha,libertinust1math,newtx,geometry,
+iftex,microtype,multicol,titlesec,titletoc,xkeyval,cclicenses,
substitutefont,luatex85,lm,textcomp,newpx,biolinum,inconsolata,libertine,
cochineal,mathpazo,bera,amsthm}
\usepackage{array}
@@ -254,7 +253,7 @@ cochineal,mathpazo,bera,amsthm}
% --------------------------------------------------------
% OTHER THUMBNAILS
% --------------------------------------------------------
-\def\shortlipsum{Sed feugiat. Cum sociis natoque penatibus et magnis dis parturient.}
+\def\shortlipsum{The phenomena should only be used as a canon for our understanding. }
\newcommand{\fakechapter}[1]{%
\noindent
\begin{minipage}{.31\textwidth}
@@ -274,7 +273,7 @@ cochineal,mathpazo,bera,amsthm}
\begin{tikzpicture}
\draw[pframe] (0,0) rectangle (\textwidth,4.9);
\node[pnode] at (0.5,4.6)
- {\shortlipsum\shortlipsum\shortlipsum\shortlipsum
+ {\shortlipsum\shortlipsum\shortlipsum\shortlipsum%
\footnote{\scriptsize\shortlipsum\shortlipsum\par}};
\end{tikzpicture}%
\end{minipage}
@@ -286,11 +285,11 @@ cochineal,mathpazo,bera,amsthm}
\begin{tikzpicture}
\draw[pframe] (0,0) rectangle (\textwidth,3.3);
\node[pnode] at (0.3,3.2)
- {\shortlipsum%
+ {\shortlipsum:%
\begin{list}{\color{gray}\textbullet}{\leftmargin=#1\itemsep=0pt}
- \item first item
- \item second item
- \item third item
+ \item immagination
+ \item experience
+ \item emotions
\end{list}};
\end{tikzpicture}%
\end{minipage}
@@ -298,14 +297,14 @@ cochineal,mathpazo,bera,amsthm}
\newcommand{\fakequotation}[1]{%
\noindent
\begin{minipage}{.31\textwidth}
- \footnotesize%
+ \fontsize{9}{10.5}\selectfont%
\begin{tikzpicture}
\draw[pframe] (0,0) rectangle (\textwidth,7);
\node[pnode] at (0.25,6.8)
- {\hskip1em\shortlipsum\shortlipsum
+ {\hskip1em\shortlipsum\shortlipsum\smallskip
\begin{list}{}{#1}
- \item \tiny\shortlipsum\shortlipsum\shortlipsum\shortlipsum
- \end{list}
+ \item \fontsize{7}{8.5}\selectfont\shortlipsum\shortlipsum\shortlipsum\shortlipsum
+ \end{list}\smallskip
\hskip1em\shortlipsum\shortlipsum};
\end{tikzpicture}%
\end{minipage}
@@ -339,7 +338,7 @@ cochineal,mathpazo,bera,amsthm}
%</driver>
% \fi
%
-% \CheckSum{5722}
+% \CheckSum{5685}
%
% \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
@@ -357,6 +356,7 @@ cochineal,mathpazo,bera,amsthm}
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
+% \changes{v3.1.1}{2021/05/23}{Redefined some boolean options. Renamed some private commands. Corrected a bug in headers numbering (\cmd{protect} removed). Disabled automatic partial ToC functionality. Improved \opt{fewfootnotes} option via \sty{zref}. Updated documentation.}
% \changes{v3.1.0}{2021/05/20}{Replaced \cmd{val}\cmd{nr} with \cmd{suftesi@val}\cmd{suftesi@nr}. Corrected a bug with \cmd{maketitle} in \opt{collection} structure. New options \opt{partialtoc} and \opt{maketitlestyle}. New commands for customizing the partial ToC. New value \opt{justify} for \opt{quotestyle} option. Improved \opt{quotesize} option. Renamed the \opt{revauthortitle} option to \opt{reverseauthortitle}. The options \opt{titlefont}, \opt{authorfont}, \opt{reverseauthortitle} now work for every structure. Renewed documentation}
% \changes{v3.0.2}{2021/02/06}{Improved \opt{subsecstyle} and \opt{subsubsecstyle} options.}
% \changes{v3.0.1}{2021/01/27}{Maintenance release.}
@@ -456,7 +456,7 @@ cochineal,mathpazo,bera,amsthm}
% \DoNotIndex{\titlepage,\vss,\vtop,\xdef,\@gobbletwo,\color,\dimexpr}
% \DoNotIndex{\huge,\large,\makebox,\ProcessOptions,\renewcommand}
%
-%\nocite{appendix,caption,color,crop,enumitem,emptypage,fancyhdr,fixltxhyph,fontenc,fontsize,mathalpha,libertinust1math,newtx,geometry,iftex,microtype,multicol,titlesec,titletoc,xkeyval,cclicenses,fontenc,substitutefont,luatex85,lm,textcomp,newpx,biolinum,inconsolata,libertine,cochineal,mathpazo,bera,amsthm}
+%\nocite{appendix,caption,color,crop,enumitem,emptypage,fancyhdr,fixltxhyph,fontsize,mathalpha,libertinust1math,newtx,geometry,iftex,microtype,multicol,titlesec,titletoc,xkeyval,cclicenses,substitutefont,luatex85,lm,textcomp,newpx,biolinum,inconsolata,libertine,cochineal,mathpazo,bera,amsthm,zref}
%
% \thispagestyle{empty}
%
@@ -607,17 +607,30 @@ cochineal,mathpazo,bera,amsthm}
% \centering
% \begin{tabular}{>{\sffamily}r@{}>{\sffamily}l>{\raggedright\arraybackslash}>{\sffamily}p{9.6cm}}
% \toprule
-% & \textrm{Global} & appendix, caption, color, crop, enumitem, emptypage,
-% fancyhdr, fixltxhyph, fontenc, fontsize, geometry, iftex,
-% microtype, multicol, titlesec, titletoc, xkeyval, (cclicenses) \\\midrule
-% & \textrm{\hologo{pdfLaTeX} only} & fontenc, substitutefont \\\midrule
-% & \textrm{\hologo{LuaLaTeX} only} & luatex85 \\\midrule
-% defaultfont~= & ~standard & lmodern \\
-% & ~palatino & textcomp, newpxtext, biolinum, inconsolata, newpxmath \\
-% & ~libertine & textcomp, libertine, biolinum, inconsolata, newtxmath, libertinust1math \\
-% & ~cochineal & textcomp, cochineal, biolinum, inconsolata, newtxmath \\
-% & ~compatibility & mathpazo, beramono \\\midrule
-% mathfont~= & ~extended & amsthm, mathalpha \\\bottomrule
+% \multicolumn{2}{c}{\textbf{Context}} & \multicolumn{1}{c}{\textbf{Packages}} \\
+% \midrule
+% & \textrm{Global} & appendix, caption, color, crop, enumitem, emptypage,
+% fancyhdr, fixltxhyph, fontenc, fontsize, geometry, iftex,
+% microtype, multicol, titlesec, titletoc,
+% xkeyval, cclicenses*, zref** \\
+% \midrule
+% & \textrm{\hologo{pdfLaTeX} only} & fontenc, substitutefont \\
+% \midrule
+% & \textrm{\hologo{LuaLaTeX} only} & luatex85 \\
+% \midrule
+% defaultfont~= & ~standard
+% & lmodern \\
+% & ~palatino & textcomp, newpxtext, biolinum, inconsolata, newpxmath \\
+% & ~libertine & textcomp, libertine, biolinum, inconsolata, newtxmath,
+% libertinust1math \\
+% & ~cochineal & textcomp, cochineal, biolinum, inconsolata, newtxmath \\
+% & ~compatibility & mathpazo, beramono \\
+% \midrule
+% mathfont~= & ~extended & amsthm, mathalpha \\
+% \bottomrule\\[-1.5ex]
+% && \parbox{9.6cm}{\footnotesize
+% * only with \opt{FSPL} styles.\quad ** only with \opt{fewfootnotes} option.
+% }
% \end{tabular}
% \caption{Packages loaded by \sty{suftesi}}\label{tab:pkgloaded}
% \end{table}
@@ -648,9 +661,9 @@ cochineal,mathpazo,bera,amsthm}
% templates are also available online on the CTAN’s website at
% \textcolor{magenta}{\url{http://www.ctan.org/pkg/suftesi}}.
%
-% The class loads the packages listed in table \ref{tab:pkgloaded} and
+% \alert The class loads the packages listed in table \ref{tab:pkgloaded} and
% since version 2.9.5 relies on \sty{appendix} package to manage
-% the appendices \parencite[see][]{appendix}. To get the correct label
+% the appendices \parencite{appendix}. To get the correct label
% in titles, headings and table of
% contents, you should use the \env{appendices} environment.
%
@@ -685,7 +698,7 @@ cochineal,mathpazo,bera,amsthm}
% ^^A
% ^^A ----------------------------------------------------------------
%
-% The class provides eleven page layouts (table \ref{fig:layouts} and figure
+% The class provides eleven page layouts (figure \ref{fig:layouts} and table
% \ref{tab:layouts}). The \opt{standard}
% layout (default) or \opt{standardaureo} layout are aimed to typeset
% A4 documents, while the other nine layouts are particularly suitable
@@ -785,6 +798,42 @@ cochineal,mathpazo,bera,amsthm}
% $\SI{90}{cm} \times \SI{150}{cm}$.
% \end{valuelist}
%
+% You can define your own layouts through the \cmd{geometry} command
+% of the \sty{geometry} package
+% \parencite{geometry} and you can change the value of \cmd{baselineskip}
+% too, possibly through \sty{fontsize} \parencite{fontsize}.
+%
+% \alert If you change the line spacing with
+% the \cmd{linespread} command, you need to add \cmd{normalsize}.
+%
+% ^^A\begin{minipage}{.4\textwidth}
+%\begin{latexcode}
+%\begin{verbatim}
+%\linespread{0.956}\normalsize
+%\geometry{...}
+%\end{verbatim}
+% \end{latexcode}
+% ^^A \geometry{
+% ^^A ignoreall,
+% ^^A paperwidth = 140mm,
+% ^^A paperheight = 210mm,
+% ^^A textheight = 165mm,
+% ^^A textwidth = 100mm,
+% ^^A marginratio = 1:1,
+% ^^A top = 2.07cm,
+% ^^A headsep = 5.5mm,
+% ^^A heightrounded}
+% ^^A\end{minipage}
+% ^^A\hfill
+% ^^A\begin{minipage}{.555\textwidth}
+% ^^A\begin{tikzpicture}[scale=2.81]
+% ^^A\draw (0,0) rectangle (1.40cm,2.10cm);
+% ^^A\draw[xshift=2mm,yshift=2.25mm,fill=gray!20,draw=none] (0,0) rectangle (1.00cm,1.65cm);
+% ^^A\draw[xshift=1.6cm,yshift=2.25mm,fill=gray!20,draw=none] (0,0) rectangle (1.00cm,1.65cm);
+% ^^A\draw[xshift=1.40cm] (0,0) rectangle (1.40cm,2.10cm);
+% ^^A\end{tikzpicture}
+% ^^A\end{minipage}
+%
%\begin{figure}
% \vspace*{-1cm}
%\def\sufsetlengths{\sufsetlengthsA}
@@ -828,66 +877,27 @@ cochineal,mathpazo,bera,amsthm}
% \item[final] Prints the output on a A4 paper, hiding the crop marks.
% Useless with \opt{standard} and \opt{standardaureo} layouts.
% \end{valuelist}
+%
+% \begin{footnotesize}
+%
% Sometimes it is not desirable to have the crop marks on every page.
% In such a case you can use the \cmd{crop}|[off]| command
% after the first page of the document.
%
+% \end{footnotesize}
+%
% \optitem[\cmd{baselineskip}]{parindent}{\meta{dimen}}
% \changes{v0.9b}{2012/09/23}{New option \opt{parindent}}
%
% Sets the indentation of the first line of each paragraph except those following a section title. You can use any unit recognized by \TeX{} (for example: \opt{1em}\OR\opt{1cm}\OR\opt{17pt}, \ldots).
%
%\begin{footnotesize}
-%Note that some packages may set the value of \cmd{parindent} inside the \cmd{AtBeginDocument} hook. In these cases the \opt{parindent} option is ineffective and if you want to change the indentation you have to call \cmd{parindent=}\meta{dimen} after |\begin{document}|.\par
+%
+%Note that some packages may set the value of \cmd{parindent} inside the \cmd{AtBeginDocument} hook. In these cases the \opt{parindent} option is ineffective and if you want to change the indentation you have to call \cmd{parindent=}\meta{dimen} after |\begin{document}|.
+%
%\end{footnotesize}
% \end{optionlist*}
%
-% \subsubsection{Layout customizations}
-%
-% You can define your own layouts through the \cmd{geometry} command
-% and you can change the value of \cmd{baselineskip} too. For example
-% you can resize the typeblock of the \texttt{supercompactaureo} layout
-% to fit particular needs, or simply because the font used requires
-% a smaller line width. As you can see
-% in the following example, you can change many aspects of the layout,
-% using the parameters available for the \cmd{geometry} command.
-% Here we have
-% modified also the margin ratio, the value of the upper margin and the
-% distance between the head and the beginning of the text. For the other parameters
-% sees the documentation of the \sty{geometry} package \parencite{geometry}.
-%
-% \alert Remember that if you change the line spacing with
-% the \cmd{linespread} command, you need to add \cmd{normalsize}.
-%
-% ^^A\begin{minipage}{.4\textwidth}
-%\begin{latexcode}
-%\begin{verbatim}
-%\linespread{0.956}
-%\normalsize
-%\geometry{...}
-%\end{verbatim}
-% \end{latexcode}
-% ^^A \geometry{
-% ^^A ignoreall,
-% ^^A paperwidth = 140mm,
-% ^^A paperheight = 210mm,
-% ^^A textheight = 165mm,
-% ^^A textwidth = 100mm,
-% ^^A marginratio = 1:1,
-% ^^A top = 2.07cm,
-% ^^A headsep = 5.5mm,
-% ^^A heightrounded}
-% ^^A\end{minipage}
-% ^^A\hfill
-% ^^A\begin{minipage}{.555\textwidth}
-% ^^A\begin{tikzpicture}[scale=2.81]
-% ^^A\draw (0,0) rectangle (1.40cm,2.10cm);
-% ^^A\draw[xshift=2mm,yshift=2.25mm,fill=gray!20,draw=none] (0,0) rectangle (1.00cm,1.65cm);
-% ^^A\draw[xshift=1.6cm,yshift=2.25mm,fill=gray!20,draw=none] (0,0) rectangle (1.00cm,1.65cm);
-% ^^A\draw[xshift=1.40cm] (0,0) rectangle (1.40cm,2.10cm);
-% ^^A\end{tikzpicture}
-% ^^A\end{minipage}
-%
% ^^A ----------------------------------------------------------------
% ^^A
% \subsection{Font}\label{sec:fonts}
@@ -926,7 +936,7 @@ cochineal,mathpazo,bera,amsthm}
%
% ^^A ----------------------------------------------------------------
% ^^A
-% \subsubsection{General settings}\label{sec:fonts:options:general}
+% \subsubsection{General options}\label{sec:fonts:options:general}
% ^^A
% ^^A ----------------------------------------------------------------
%
@@ -947,12 +957,11 @@ cochineal,mathpazo,bera,amsthm}
% \item[upper] Prints spaced \textsc{\lsstyle Small Capitals} with uppercase initials.
% \end{valuelist}
%
-% \optitem[cochineal]{defaultfont}{\opt{none}\OR\opt{cochineal}
-% \OR\opt{libertine}\OR\opt{palatino}\OR\opt{standard}}
+% \optitem[cochineal]{defaultfont}{\opt{none}\OR\opt{cochineal}\OR\opt{libertine}\OR\opt{palatino}\OR\opt{standard}}
% \begin{valuelist}
-% \item[none] Does not load any font. Use this option
-% if you want full control over the font selection. This is the default with
-% \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
+% \item[none] Does not load any font (default with
+% \hologo{XeLaTeX} or \hologo{LuaLaTeX}). Use this option
+% if you want full control over the font selection
% \item[cochineal] Loads the Cochineal serif, the Linux Biolinum sans serif and the Inconsolata typewriter.
% \item[libertine] Loads the Linux Libertine serif, the Linux Biolinum sans serif and the Inconsolata typewriter.
% \item[palatino] Loads the New PX serif, the Linux Biolinum sans serif and the Inconsolata typewriter. Note that the New PX font does not provide support for Greek. The \opt{greekfont=artemisia} option offers a very good solution.
@@ -985,9 +994,11 @@ cochineal,mathpazo,bera,amsthm}
%
% Effective only with Cochineal, Libertine and New PX fonts.
% \begin{valuelist}
-% \item[none] Do not load any mathematical support. Use this option if you need some packages that have to be loaded before \sty{newtxmath} and \sty{newpxmath}. This is the default with
-% \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
-% \item[minimal] Loads \sty{newtxmath} (for Cochineal and Linux Libertine) or \sty{newpxmath} (for PX Fonts).
+% \item[none] Do not load any mathematical support (default with
+% \hologo{XeLaTeX} or \hologo{LuaLaTeX}). Use this option if you need
+% some packages that have to be loaded before \sty{newtxmath} and \sty{newpxmath}.
+% \item[minimal] Loads \sty{newtxmath} (for Cochineal and Linux Libertine)
+% or \sty{newpxmath} (for PX Fonts).
% \item[extended] Loads the previous option plus the \sty{amsthm} and \sty{mathalpha} packages.
% \end{valuelist}
% \end{optionlist*}
@@ -1064,8 +1075,8 @@ cochineal,mathpazo,bera,amsthm}
% Actually useless with \opt{defaultfont=none} and not available with \opt{defaultfont=standard} options.
% \changes{v0.9b}{2012/09/23}{New option \opt{greekfont}}
% \begin{valuelist}
-% \item[none] Does not load any Greek font. This is the default with
-% \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
+% \item[none] Does not load any Greek font (default with
+% \hologo{XeLaTeX} or \hologo{LuaLaTeX}).
% \item[artemisia] Loads the Artemisia font by the Greek Font Society.
% \item[porson] Loads the Porson font by the Greek Font Society.
% \item[bodoni] Loads the Bodoni font by the Greek Font Society.
@@ -1117,10 +1128,10 @@ cochineal,mathpazo,bera,amsthm}
% ^^A
% ^^A ----------------------------------------------------------------
%
-% Figure \ref{fig:fakechapter} shows some combinations of the following options.
+% In the following option \meta{level} can be \opt{part}, \opt{chap}, \opt{sec},
+% \opt{subsec}, \opt{subsubsec}, \opt{par}, \opt{subpar}. You can see some
+% combinations of these options in figure \ref{fig:fakechapter}.
%
-% In the following option \meta{level} can be \opt{part}, \opt{chap}, \opt{sec},
-% \opt{subsec}, \opt{subsubsec}, \opt{par}, \opt{subpar}.
% \begin{optionlist*}
% \optitem[roman]{\meta{level}font}{\opt{roman}\OR\opt{italic}\OR
% \opt{smallcaps}}
@@ -1130,10 +1141,7 @@ cochineal,mathpazo,bera,amsthm}
% \item[smallcaps] Prints the \meta{level} title
% in \textsc{\lsstyle spaced small caps}
% \end{valuelist}
-% \end{optionlist*}
-% In the following options \meta{level} can be \opt{part}, \opt{chap}, \opt{sec},
-% \opt{subsec}, \opt{subsubsec}, \opt{par}, \opt{subpar}.
-% \begin{optionlist*}
+%
% \optitem[left]{\meta{level}style}{\opt{left}\OR\opt{center}\OR
% \opt{right}\OR\opt{parleft}\OR\opt{parcenter}\OR
% \opt{parright}}
@@ -1145,7 +1153,7 @@ cochineal,mathpazo,bera,amsthm}
% \item[parcenter] As \opt{center} but with the title below the number.
% \item[parright] As \opt{right} but with the title below the number.
% \end{valuelist}
-% \optitem[Roman/arabic/arabic]{\meta{level}numstyle}{\opt{arabic}\OR
+% \optitem[arabic/Roman {\rmfamily(part)}]{\meta{level}numstyle}{\opt{arabic}\OR
% \opt{roman}\OR\opt{Roman}\OR\opt{dotarabic}\OR\opt{dotroman}\OR
% \opt{dotRoman}}
% \begin{valuelist}
@@ -1228,23 +1236,17 @@ cochineal,mathpazo,bera,amsthm}
%
% \begin{ltxsyntax}
% \cmditem{breakintoc}
-%
-% A manual break which is active for the table of contents but not in the text or in the headers.
-%
-% \begin{latexcode}
-%\begin{verbatim}
-%\section{This title will be break here \breakintoc inside the contents}
-%\end{verbatim}
-% \end{latexcode}
% \cmditem{breakinbody}
% \cmditem{breakinbodyleft}
%
-% Manual breaks which are active in the body text but not in the headers
-% and in the table of contents. The difference between the two
-% commands is that the former executes |\\| while the latter uses \cmd{newline}. The second one should be used with the \opt{\meta{level}style=left} options to avoid bad line alignments.
+% Manual breaks which are active in the the table of contents
+% and in the body text respectivley.
+% The last one replaces \cmd{breakinbody} to avoid bad line alignments
+% when the \opt{\meta{level}style=left} options are used.
%
% \begin{latexcode}
%\begin{verbatim}
+%\section{This title will be break here \breakintoc inside the contents}
%\section{This title will be break here \breakinbody inside the body text}
%\section{This title will be break here \breakinbodyleft inside the body text}
%\end{verbatim}
@@ -1323,12 +1325,15 @@ cochineal,mathpazo,bera,amsthm}
% and the list of tables in two columns.
% \item[all] Prints all the contents lists in two columns.
% \end{valuelist}
+%
% \optitem[false]{partialtoc}{\opt{true}\OR\opt{false}}
-% This option is effective only with the \opt{structure=book} option.
% \begin{valuelist}
-% \item[true] Prints a partial ToC at the beginning of every chapter.
-% \item[false] Does not print any partial ToC.
+% \item[true] Enable the \cmd{printpartialtoc} command to get a
+% partial ToC after the title of chapters
+% (\opt{book} structure) or sections (\opt{article} structure).
+% \item[false] Disables \cmd{printpartialtoc} command.
% \end{valuelist}
+%
% \end{optionlist*}
%
% ^^A ----------------------------------------------------------------
@@ -1337,6 +1342,12 @@ cochineal,mathpazo,bera,amsthm}
% ^^A
% ^^A ----------------------------------------------------------------
%
+% ^^A ----------------------------------------------------------------
+% ^^A
+% \paragraph{General commands}\label{sec:toc:commands:general}
+% ^^A
+% ^^A ----------------------------------------------------------------
+%
% \begin{ltxsyntax}
% \cmditem*{toc\meta{level}font}{definition}
%
@@ -1372,9 +1383,22 @@ cochineal,mathpazo,bera,amsthm}
% \end{latexcode}
% Note that in both cases the definition must be enclosed in a group
% to prevent it from changing what follows (i.e. the part number and the part title).
+% \end{ltxsyntax}
%
-% The following commands allow you to modify some features of the partial ToC
-% printed at the beginning of each chapter when the \opt{partialtoc} option is used.
+%
+% ^^A ----------------------------------------------------------------
+% ^^A
+% \paragraph{Partial ToCs}\label{sec:toc:partialtoc}
+% ^^A
+% ^^A ----------------------------------------------------------------
+%
+% To use the command in this seciton load the \opt{partialtoc} option.
+%
+% \begin{ltxsyntax}
+% \cmditem{printpartialtoc}
+%
+% A command to print a partial ToC to be used after the \cmd{chapter}
+% and \cmd{section} commands, respectively in \opt{book} and \opt{article} structures.
%
% \cmditem*{partialtoc\meta{level}font}{definition}
% \cmditem*{partialtoc\meta{level}labelfont}{definition}
@@ -1411,27 +1435,35 @@ cochineal,mathpazo,bera,amsthm}
%\partialtocsecfont{\bfseries\itshape}
%\partialtocsubsecfont{\itshape}
%\partialtocseclabel{\bfseries}
-%\partialtocbeforecode{\textbf{Contents of this chapter}\smallskip}
+%\partialtocbeforecode{\hrule\smallskip\textbf{Contents}\smallskip}
+%\partialtocaftercode{\smallskip\hrule}
%\end{verbatim}
% \end{latexcode}
% which gives this very questionable result:
%
% \begin{mdframed}[backgroundcolor=philA!10,linecolor=white]
% \footnotesize
-% \textbf{Contents of this chapter}\vskip-.5ex
+% \null\medskip
+%
+% \hrule
+%
+% \textbf{Contents}\vskip-.5ex
%
-% \textbf{\itshape 1.1 Lorem ipsum dolor sit amet, consectetuer adipiscing elit}, 1.
+% \textbf{1.1 \itshape Lorem ipsum dolor sit amet, consectetuer adipiscing elit}, 1.
% 1.1.1 \textit{Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis}, 15.
% 1.1.1.1 Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna, 17.
% 1.1.1.2 Donec vehicula augue eu neque, 21.
% 1.1.2 \textit{Cras viverra metus rhoncus sem}, 26.
% 1.1.2.1 Nulla et lectus vestibulum urna fringilla ultrices, 29.
% 1.1.2.2 Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas, 34.
-% \textbf{\itshape 1.2 Nulla et lectus vestibulum urna fringilla ultrices}, 35.
+% \textbf{1.2 \itshape Nulla et lectus vestibulum urna fringilla ultrices}, 35.
% 1.2.1 \textit{Cras viverra metus rhoncus sem}, 39.
% 1.2.1.1 Donec vehicula augue eu neque, 40.
% 1.2.1.2 Phasellus eu tellus sit amet tortor gravida placerat, 45.
% 1.2.2 \textit{Mauris ut leo}, 49.
+% \smallskip
+%
+% \hrule
% \end{mdframed}
%
% For more radical changes you can of course define your own partial ToC with your
@@ -1480,30 +1512,6 @@ cochineal,mathpazo,bera,amsthm}
% -- 1.3.3 Nonummy eget, consectetuer id, 63.
% \end{mdframed}
%
-% The last four commands described at the beginning of this section
-% can also be used inside a group to
-% adjust the vertical spacing only for specific chapters. This is useful, for example,
-% for those chapters starting with special quotations or \textit{epigraphs}:
-% \begin{latexcode}
-%\begin{verbatim}
-%\begingroup
-%
-%\partialtocbeforespace{6cm}
-%\setlength{\beforeepigraphskip}{-5cm}
-%\setlength{\afterepigraphskip}{4cm}
-%
-%\chapter{The things in themselves are what first give rise to
-% reason, as is proven in the ontological}
-%
-%\epigraph{As is proven in the ontological manuals,
-% it is obvious that the transcendental unity
-% of apperception proves the
-% validity of the Antinomies}{G.W.F. Hegel}
-%
-%\endgroup
-%\end{verbatim}
-% \end{latexcode}
-%
% ^^A ----------------------------------------------------------------
% ^^A
% \subsection{Headers and footers}
@@ -1686,7 +1694,7 @@ cochineal,mathpazo,bera,amsthm}
% Does not indents the block quotations.
% \end{valuelist}
% \optitem[footnotesize]{quotesize}{\opt{small}, \dots, \opt{footnotesize}, \dots, \opt{scriptsize}, \dots}
-% You can use all the sizes made available by the \sty{fontsize} package.
+% You can use all the sizes made available by the \sty{fontsize} package \parencite{fontsize}.
% \changes{v0.9b}{2012/09/23}{New option \opt{quotationfont}}
%
% \end{optionlist*}
@@ -1904,28 +1912,11 @@ cochineal,mathpazo,bera,amsthm}
% cover page (figure \ref{fig:cover}), inspired by the Italian designer
% Bruno \textcite[85-89]{munari:arte-come-mestiere}. The color used for
% the text and the circle as well as other graphical elements are partially
-% customizable. The cover shown
-% in figure \ref{fig:cover} is obtained with the following code:
-% \begin{latexcode}
-%\begin{verbatim}
-%\Cauthor{Bruce Lee}
-%\Ctitle{The Art of Kicking}
-%\Csubtitle{How to survive in the modern societies}
-%\Ceditor{edited by\\ Walker Texas Ranger}
-%\Cfoot{Punch Press\\ \fbox{\bfseries P\&P}}
-%\Cpagecolor{white!90!black}
-%\Ctextcolor{white}
-%\Cfootcolor{black}
-% \makecover[ball color=DarkBlue,draw=none]
-%\end{verbatim}
-% \end{latexcode}
-%
-% To produce a complete book cover, with spine and dust jacket, you should
+% customizable. Anyway,
+% to produce a complete book cover, with spine and dust jacket, you should
% take a look at the \sty{bookcover} class by Tibor \textcite{bookcover}.
%
-%
% \begin{ltxsyntax}
-% \cmditem{makecover}
% \cmditem{makecover}[tikz options]
%
% Prints the cover page (figure \ref{fig:cover}). This command requires \sty{tikz}
@@ -1968,58 +1959,34 @@ cochineal,mathpazo,bera,amsthm}
%
% \end{ltxsyntax}
%
-% ^^A ----------------------------------------------------------------
-% ^^A
-% \subsubsection*{Some examples of cover pages}
-% ^^A
-% ^^A ----------------------------------------------------------------
-%
-% First you have to declare the informations you want to put in the cover page. It is better to give these informations in the preamble:
-%
+% You can customize the circle using the optional arguments of the
+% \cmd{makecover} command. Some of these \meta{tikz options} require
+% special \sty{tikz} libraries. For example, you can add a shadow to
+% the circle loading the \texttt{shadows} library and using the
+% \texttt{circular drop shadow} otpion.
+% The cover shown
+% in figure \ref{fig:cover} is obtained with the following code:
% \begin{latexcode}
%\begin{verbatim}
+%\documentclass{suftesi}
+%\usepackage[svgnames]{xcolor}
%\usepackage{tikz}
+% \usetikzlibrary{shadows}
%
%\Cauthor{Bruce Lee}
%\Ctitle{The Art of Kicking}
%\Csubtitle{How to survive in the modern societies}
%\Ceditor{edited by\\ Walker Texas Ranger}
-%\Cfoot{Punch Press\\ \includegraphics[width=1cm]{logo}}
-%\end{verbatim}
-% \end{latexcode}
-%
-% Then you can print the cover page with:
-% \begin{ttquote}
-% \cmd{makecover}
-% \end{ttquote}
-%
-% You can customize the circle using the optional arguments of the \cmd{makecover} command. Some of these \meta{tikz options} require special \sty{tikz} libraries. For example, you can add a shadow to the circle loading the \texttt{shadows} library and using the \texttt{circular drop shadow} otpion:
-%
-% \begin{latexcode}
-%\begin{verbatim}
-%\usepackage{tikz}
-%\usetikzlibrary{shadows}
-%...
-%\begin{document}
-% \makecover[circular drop shadow]
-%\end{document}
-%\end{verbatim}
-% \end{latexcode}
-%
-% There are thousands of possibilities. Here is another (not necessarily good) example:
-% \begin{latexcode}
-%\begin{verbatim}
-%\usepackage{tikz}
-%
-%\Cpagecolor{gray!30}
-%\Ctextcolor{blue!50}
+%\Cfoot{Punch Press\\ \fbox{\bfseries P\&P}}
+%\Cpagecolor{white!90!black}
+%\Ctextcolor{white}
%\Cfootcolor{black}
%
%\begin{document}
-% \makecover[fill=blue!30!black,draw=teal,line width=2mm,dashed]
+% \makecover[ball color=DarkBlue,draw=none,circular drop shadow]
%\end{document}
%\end{verbatim}
-% \end{latexcode}
+% \end{latexcode}
%
%\begin{figure}
%\begin{minipage}{.5\textwidth}
@@ -2067,7 +2034,7 @@ cochineal,mathpazo,bera,amsthm}
%\begin{tikzpicture}[scale=0.4]%
%\draw[draw=gray,fill=gray!5,drop shadow] (-\textwidth,0) rectangle (\textwidth,.9\textheight);
% \node at (0,.65\textheight) (c) {};
-% \draw[ball color=DarkBlue,draw=none] (c) circle (4.5cm);
+% \draw[ball color=DarkBlue,draw=none,circular drop shadow] (c) circle (4.5cm);
% \node[scale=0.4,anchor=center,text=white] at (c) {\parbox{6cm}{%
% \centering
% {\scriptsize\scshape Bruce Lee\\}
@@ -2216,13 +2183,11 @@ cochineal,mathpazo,bera,amsthm}
%\begin{article}
%\author{Author}
%\title{Title of the paper}
-% % The abstract is optional.
-% % \begin{abstract}
-% % The abstract
-% % \end{abstract}
-%
+% % The abstract is optional.
+% % \begin{abstract}
+% % The abstract
+% % \end{abstract}
%\maketitle
-%
% Text of the paper
%\end{article}
%\end{verbatim}
@@ -2374,13 +2339,12 @@ cochineal,mathpazo,bera,amsthm}
% \begin{macrocode}
\RequirePackage{xkeyval}
\newif\ifsuftesi@article
-\newif\ifsuftesi@authortitle
\newif\ifsuftesi@collection
-\newif\ifsuftesi@standard
+\newif\ifsuftesi@lmodern
\newif\ifsuftesi@cochineal
\newif\ifsuftesi@libertine
\newif\ifsuftesi@palatino
-\newif\ifsuftesi@compatibility
+\newif\ifsuftesi@mathpazo
\newif\ifsuftesi@nofont
\newif\ifsuftesi@greekfont
\newif\ifsuftesi@porson
@@ -2399,9 +2363,10 @@ cochineal,mathpazo,bera,amsthm}
\newif\ifsuftesi@pocketb
\newif\ifsuftesi@pocketc
\newif\ifsuftesi@screen
+\newif\ifsuftesi@sufplain
\newif\ifsuftesi@screencentered
\newif\ifsuftesi@centerheader
-\newif\ifsuftesi@sufplain
+\newif\ifsuftesi@authortitle
\newif\ifsuftesi@numparpart
\newif\ifsuftesi@numparchap
\newif\ifsuftesi@numparsec
@@ -2413,15 +2378,11 @@ cochineal,mathpazo,bera,amsthm}
\newif\ifsuftesi@twocolumntoc
\newif\ifsuftesi@twocolumnlof
\newif\ifsuftesi@twocolumnlot
-\newif\ifsuftesi@partialtoc
-\newif\ifsuftesi@toccompactsec
-\newif\ifsuftesi@toccompactsubsec
-\newif\ifsuftesi@toccompactsubsubsec
-\newif\ifsuftesi@toccompactpar
-\newif\ifsuftesi@toccompactsubpar
-\newif\ifsuftesi@draftdate
-\newif\ifsuftesi@fewfootnotes
-\newif\ifsuftesi@partpage
+\newif\ifsuftesi@ctocsec
+\newif\ifsuftesi@ctocsubsec
+\newif\ifsuftesi@ctocsubsubsec
+\newif\ifsuftesi@ctocpar
+\newif\ifsuftesi@ctocsubpar
\newif\ifsuftesi@FSPL
% \end{macrocode}
% The class is based on the standard \sty{book} class but the following options are disabled as they contrast with the layouts provided by the class. Specifically, the first five options are actually ineffective, while the \opt{landscape} option rotates the page correctly, but sets the text width according to the class options, effectively making it unusable.
@@ -2460,26 +2421,36 @@ cochineal,mathpazo,bera,amsthm}
\def\SUF@chapswitch{\thechapter.}
\or
\suftesi@articletrue
- \@titlepagefalse
+ \SUF@titlepagefalse
\def\SUF@chapswitch{}
\or
\suftesi@collectiontrue
\setkeys{}{headerstyle=authortitleinner}
\def\SUF@chapswitch{}
\fi}
-\define@choicekey{}{documentstructure}[\suftesi@val\suftesi@nr]
- {book,article,collection}[book]{%
-\ClassWarningNoLine{suftesi}{%
- 'documentstructure' option is deprecated.\MessageBreak
- Use 'structure' option instead}
+% \end{macrocode}
+% \paragraph{View mode}
+% \begin{macrocode}
+\define@choicekey{}{version}[\suftesi@val\suftesi@nr]
+ {screen,cscreen,draft,final}[draft]{%
\ifcase\suftesi@nr\relax
- \setkeys{}{structure=book}
+ \suftesi@screentrue
\or
- \setkeys{}{structure=article}
+ \suftesi@screentrue
+ \suftesi@screencenteredtrue
\or
- \setkeys{}{structure=collection}
+ \relax
+\or
+ \AtBeginDocument{\crop[off]}
\fi}
% \end{macrocode}
+% \paragraph{Other options}
+% \begin{macrocode}
+\define@boolkey[SUF]{}{marginpar}[true]{}
+\define@boolkey[SUF]{}{partpage}[true]{}
+\define@boolkey[SUF]{}{draftdate}[true]{}
+\define@boolkey[SUF]{}{titlepage}[true]{}
+% \end{macrocode}
% \subsubsection{Fonts}
% \paragraph{Roman fonts}
% \begin{macrocode}
@@ -2494,9 +2465,9 @@ cochineal,mathpazo,bera,amsthm}
\or
\suftesi@palatinotrue
\or
- \suftesi@standardtrue
+ \suftesi@lmoderntrue
\or
- \suftesi@compatibilitytrue
+ \suftesi@mathpazotrue
\fi}
\define@choicekey{}{mathfont}[\suftesi@val\suftesi@nr]
{none,minimal,extended}[minimal]{%
@@ -2525,6 +2496,18 @@ cochineal,mathpazo,bera,amsthm}
\suftesi@greekfonttrue\suftesi@cbgreektrue
\fi}
% \end{macrocode}
+% \paragraph{Small capitals style}
+% \begin{macrocode}
+\define@choicekey{}{smallcapsstyle}[\suftesi@val\suftesi@nr]
+ {low,upper}[low]{%
+\ifcase\suftesi@nr\relax
+ \def\SUF@MakeLowercase{\MakeLowercase}
+ \def\SUF@TOCMakeLowercase{\lowercase}
+\or
+ \def\SUF@MakeLowercase{\relax}
+ \def\SUF@TOCMakeLowercase{\relax}
+\fi}
+% \end{macrocode}
% \subsubsection{Layouts}
% \begin{macrocode}
\RequirePackage{geometry}
@@ -2682,7 +2665,7 @@ cochineal,mathpazo,bera,amsthm}
marginparwidth= 12mm,
marginparsep= 7pt}
\or
-\suftesi@pocketBtrue
+\suftesi@pocketbtrue
\DeclareRobustCommand{\SUF@partsize}{\large}
\DeclareRobustCommand{\SUF@chaptersize}{\large}
\DeclareRobustCommand{\SUF@sectionsize}{\normalsize}
@@ -2700,7 +2683,7 @@ cochineal,mathpazo,bera,amsthm}
marginparwidth= 15mm,
marginparsep= 7pt}
\or
-\suftesi@pocketCtrue
+\suftesi@pocketctrue
\DeclareRobustCommand{\SUF@partsize}{\large}
\DeclareRobustCommand{\SUF@chaptersize}{\large}
\DeclareRobustCommand{\SUF@sectionsize}{\normalsize}
@@ -2724,91 +2707,91 @@ cochineal,mathpazo,bera,amsthm}
\define@choicekey{}{partstyle}[\suftesi@val\suftesi@nr]
{left,center,right,parleft,parcenter,parright}[left]{%
\ifcase\suftesi@nr\relax
- \def\SUF@lr@PARTSwitch{\filright}
+ \def\SUF@PART@align{\filright}
\or
- \def\SUF@lr@PARTSwitch{\filcenter}
+ \def\SUF@PART@align{\filcenter}
\or
- \def\SUF@lr@PARTSwitch{\filleft}
+ \def\SUF@PART@align{\filleft}
\or
- \def\SUF@lr@PARTSwitch{\filright}
+ \def\SUF@PART@align{\filright}
\suftesi@numparparttrue
\or
- \def\SUF@lr@PARTSwitch{\filcenter}
+ \def\SUF@PART@align{\filcenter}
\suftesi@numparparttrue
\or
- \def\SUF@lr@PARTSwitch{\filleft}
+ \def\SUF@PART@align{\filleft}
\suftesi@numparparttrue
\fi}
\define@choicekey{}{chapstyle}[\suftesi@val\suftesi@nr]
{left,center,right,parleft,parcenter,parright}[left]{%
\ifcase\suftesi@nr\relax
- \def\SUF@lr@CHAPSwitch{\filright}
+ \def\SUF@CHAP@align{\filright}
\or
- \def\SUF@lr@CHAPSwitch{\filcenter}
+ \def\SUF@CHAP@align{\filcenter}
\or
- \def\SUF@lr@CHAPSwitch{\filleft}
+ \def\SUF@CHAP@align{\filleft}
\or
- \def\SUF@lr@CHAPSwitch{\filright}
+ \def\SUF@CHAP@align{\filright}
\suftesi@numparchaptrue
\or
- \def\SUF@lr@CHAPSwitch{\filcenter}
+ \def\SUF@CHAP@align{\filcenter}
\suftesi@numparchaptrue
\or
- \def\SUF@lr@CHAPSwitch{\filleft}
+ \def\SUF@CHAP@align{\filleft}
\suftesi@numparchaptrue
\fi}
\define@choicekey{}{secstyle}[\suftesi@val\suftesi@nr]
{left,center,right,parleft,parcenter,parright}[left]{%
\ifcase\suftesi@nr\relax
- \def\SUF@lr@SECSwitch{\filright}
+ \def\SUF@SEC@align{\filright}
\or
- \def\SUF@lr@SECSwitch{\filcenter}
+ \def\SUF@SEC@align{\filcenter}
\or
- \def\SUF@lr@SECSwitch{\filleft}
+ \def\SUF@SEC@align{\filleft}
\or
- \def\SUF@lr@SECSwitch{\filright}
+ \def\SUF@SEC@align{\filright}
\suftesi@numparsectrue
\or
- \def\SUF@lr@SECSwitch{\filcenter}
+ \def\SUF@SEC@align{\filcenter}
\suftesi@numparsectrue
\or
- \def\SUF@lr@SECSwitch{\filleft}
+ \def\SUF@SEC@align{\filleft}
\suftesi@numparsectrue
\fi}
\define@choicekey{}{subsecstyle}[\suftesi@val\suftesi@nr]
{left,center,right,parleft,parcenter,parright}[left]{%
\ifcase\suftesi@nr\relax
- \def\SUF@lr@SUBSECSwitch{\filright}
+ \def\SUF@SUBSEC@align{\filright}
\or
- \def\SUF@lr@SUBSECSwitch{\filcenter}
+ \def\SUF@SUBSEC@align{\filcenter}
\or
- \def\SUF@lr@SUBSECSwitch{\filleft}
+ \def\SUF@SUBSEC@align{\filleft}
\or
- \def\SUF@lr@SUBSECSwitch{\filright}
+ \def\SUF@SUBSEC@align{\filright}
\suftesi@numparsubsectrue
\or
- \def\SUF@lr@SUBSECSwitch{\filcenter}
+ \def\SUF@SUBSEC@align{\filcenter}
\suftesi@numparsubsectrue
\or
- \def\SUF@lr@SUBSECSwitch{\filleft}
+ \def\SUF@SUBSEC@align{\filleft}
\suftesi@numparsubsectrue
\fi}
\define@choicekey{}{subsubsecstyle}[\suftesi@val\suftesi@nr]
{left,center,right,parleft,parcenter,parright}[left]{%
\ifcase\suftesi@nr\relax
- \def\SUF@lr@SUBSUBSECSwitch{\filright}
+ \def\SUF@SUBSUBSEC@align{\filright}
\or
- \def\SUF@lr@SUBSUBSECSwitch{\filcenter}
+ \def\SUF@SUBSUBSEC@align{\filcenter}
\or
- \def\SUF@lr@SUBSUBSECSwitch{\filleft}
+ \def\SUF@SUBSUBSEC@align{\filleft}
\or
- \def\SUF@lr@SUBSUBSECSwitch{\filright}
+ \def\SUF@SUBSUBSEC@align{\filright}
\suftesi@numparsubsubsectrue
\or
- \def\SUF@lr@SUBSUBSECSwitch{\filcenter}
+ \def\SUF@SUBSUBSEC@align{\filcenter}
\suftesi@numparsubsubsectrue
\or
- \def\SUF@lr@SUBSUBSECSwitch{\filleft}
+ \def\SUF@SUBSUBSEC@align{\filleft}
\suftesi@numparsubsubsectrue
\fi}
% \end{macrocode}
@@ -2817,77 +2800,65 @@ cochineal,mathpazo,bera,amsthm}
\define@choicekey{}{partfont}[\suftesi@val\suftesi@nr]
{roman,italic,smallcaps}[roman]{%
\ifcase\suftesi@nr\relax
- \def\SUF@PART@StyleSwitch{\relax}
+ \def\SUF@PART@font{\relax}
\or
- \def\SUF@PART@StyleSwitch{\itshape}
+ \def\SUF@PART@font{\itshape}
\or
- \def\SUF@PART@StyleSwitch{\expandafter\SUF@titlesmallcaps}
+ \def\SUF@PART@font{\expandafter\SUF@titlesmallcaps}
\fi}
\define@choicekey{}{chapfont}[\suftesi@val\suftesi@nr]
{roman,italic,smallcaps}[roman]{%
\ifcase\suftesi@nr\relax
- \def\SUF@CHAP@StyleSwitch{\relax}
+ \def\SUF@CHAP@font{\relax}
\or
- \def\SUF@CHAP@StyleSwitch{\itshape}
+ \def\SUF@CHAP@font{\itshape}
\or
- \def\SUF@CHAP@StyleSwitch{\expandafter\SUF@titlesmallcaps}
+ \def\SUF@CHAP@font{\expandafter\SUF@titlesmallcaps}
\fi}
\define@choicekey{}{secfont}[\suftesi@val\suftesi@nr]
{roman,italic,smallcaps}[italic]{%
\ifcase\suftesi@nr\relax
- \def\SUF@SEC@StyleSwitch{\relax}
+ \def\SUF@SEC@font{\relax}
\or
- \def\SUF@SEC@StyleSwitch{\itshape}
+ \def\SUF@SEC@font{\itshape}
\or
- \def\SUF@SEC@StyleSwitch{\expandafter\SUF@titlesmallcaps}
+ \def\SUF@SEC@font{\expandafter\SUF@titlesmallcaps}
\fi}
\define@choicekey{}{subsecfont}[\suftesi@val\suftesi@nr]
{roman,italic,smallcaps}[roman]{%
\ifcase\suftesi@nr\relax
- \def\SUF@SUBSEC@StyleSwitch{\relax}
+ \def\SUF@SUBSEC@font{\relax}
\or
- \def\SUF@SUBSEC@StyleSwitch{\itshape}
+ \def\SUF@SUBSEC@font{\itshape}
\or
- \def\SUF@SUBSEC@StyleSwitch{\expandafter\SUF@titlesmallcaps}
+ \def\SUF@SUBSEC@font{\expandafter\SUF@titlesmallcaps}
\fi}
\define@choicekey{}{subsubsecfont}[\suftesi@val\suftesi@nr]
{roman,italic,smallcaps}[roman]{%
\ifcase\suftesi@nr\relax
- \def\SUF@SUBSUBSEC@StyleSwitch{\relax}
+ \def\SUF@SUBSUBSEC@font{\relax}
\or
- \def\SUF@SUBSUBSEC@StyleSwitch{\itshape}
+ \def\SUF@SUBSUBSEC@font{\itshape}
\or
- \def\SUF@SUBSUBSEC@StyleSwitch{\expandafter\SUF@titlesmallcaps}
+ \def\SUF@SUBSUBSEC@font{\expandafter\SUF@titlesmallcaps}
\fi}
\define@choicekey{}{parfont}[\suftesi@val\suftesi@nr]
{roman,italic,smallcaps}[roman]{%
\ifcase\suftesi@nr\relax
- \def\SUF@PAR@StyleSwitch{\relax}
+ \def\SUF@PAR@font{\relax}
\or
- \def\SUF@PAR@StyleSwitch{\itshape}
+ \def\SUF@PAR@font{\itshape}
\or
- \def\SUF@PAR@StyleSwitch{\expandafter\SUF@titlesmallcaps}
+ \def\SUF@PAR@font{\expandafter\SUF@titlesmallcaps}
\fi}
\define@choicekey{}{subparfont}[\suftesi@val\suftesi@nr]
{roman,italic,smallcaps}[roman]{%
\ifcase\suftesi@nr\relax
- \def\SUF@SUBPAR@StyleSwitch{\relax}
-\or
- \def\SUF@SUBPAR@StyleSwitch{\itshape}
+ \def\SUF@SUBPAR@font{\relax}
\or
- \def\SUF@SUBPAR@StyleSwitch{\expandafter\SUF@titlesmallcaps}
-\fi}
-% \end{macrocode}
-% \paragraph{Small capitals style}
-% \begin{macrocode}
-\define@choicekey{}{smallcapsstyle}[\suftesi@val\suftesi@nr]
- {low,upper}[low]{%
-\ifcase\suftesi@nr\relax
- \def\suftesi@MakeTextLowercase{\MakeLowercase}
- \def\suftesi@MakeTextTOCLowercase{\lowercase}
+ \def\SUF@SUBPAR@font{\itshape}
\or
- \def\suftesi@MakeTextLowercase{\relax}
- \def\suftesi@MakeTextTOCLowercase{\relax}
+ \def\SUF@SUBPAR@font{\expandafter\SUF@titlesmallcaps}
\fi}
% \end{macrocode}
% \subsubsection{Sections number}
@@ -2923,32 +2894,32 @@ cochineal,mathpazo,bera,amsthm}
\def\SUF@thechapter{\arabic{chapter}}
\def\SUF@HEAD@thechapter{\arabic{chapter}}
\def\SUF@dotchap{}
- \def\SUF@CHAP@thecontentslabel{\thecontentslabel}
+ \def\SUF@CHAP@contentslabel{\thecontentslabel}
\or
\def\SUF@thechapter{\textsc{\roman{chapter}}}
\def\SUF@HEAD@thechapter{\textsc{\roman{chapter}}}
\def\SUF@dotchap{}
- \def\SUF@CHAP@thecontentslabel{\textsc{\@roman{\thecontentslabel}}}
+ \def\SUF@CHAP@contentslabel{\textsc{\@roman{\thecontentslabel}}}
\or
\def\SUF@thechapter{\Roman{chapter}}
\def\SUF@HEAD@thechapter{\Roman{chapter}}
\def\SUF@dotchap{}
- \def\SUF@CHAP@thecontentslabel{\@Roman{\thecontentslabel}}
+ \def\SUF@CHAP@contentslabel{\@Roman{\thecontentslabel}}
\or
\def\SUF@thechapter{\arabic{chapter}}
\def\SUF@HEAD@thechapter{\arabic{chapter}}
\def\SUF@dotchap{.}
- \def\SUF@CHAP@thecontentslabel{\thecontentslabel}
+ \def\SUF@CHAP@contentslabel{\thecontentslabel}
\or
\def\SUF@thechapter{\textsc{\roman{chapter}}}
\def\SUF@HEAD@thechapter{\textsc{\roman{chapter}}}
\def\SUF@dotchap{.}
- \def\SUF@CHAP@thecontentslabel{\textsc{\@roman{\thecontentslabel}}}
+ \def\SUF@CHAP@contentslabel{\textsc{\@roman{\thecontentslabel}}}
\or
\def\SUF@thechapter{\Roman{chapter}}
\def\SUF@HEAD@thechapter{\Roman{chapter}}
\def\SUF@dotchap{.}
- \def\SUF@CHAP@thecontentslabel{\@Roman{\thecontentslabel}}
+ \def\SUF@CHAP@contentslabel{\@Roman{\thecontentslabel}}
\fi}
% \end{macrocode}
% \paragraph{Section number style}
@@ -2959,32 +2930,32 @@ cochineal,mathpazo,bera,amsthm}
\def\SUF@thesection{\SUF@chapswitch\arabic{section}}
\def\SUF@HEAD@thesection{\arabic{section}}
\def\SUF@dotsec{}
- \def\SUF@SEC@thecontentslabel{\thecontentslabel}
+ \def\SUF@SEC@contentslabel{\thecontentslabel}
\or
\def\SUF@thesection{\textsc{\SUF@chapswitch\roman{section}}}
\def\SUF@HEAD@thesection{\textsc{\roman{section}}}
\def\SUF@dotsec{}
- \def\SUF@SEC@thecontentslabel{\textsc{\@roman{\thecontentslabel}}}
+ \def\SUF@SEC@contentslabel{\textsc{\@roman{\thecontentslabel}}}
\or
\def\SUF@thesection{\SUF@chapswitch\Roman{section}}
\def\SUF@HEAD@thesection{\Roman{section}}
\def\SUF@dotsec{}
- \def\SUF@SEC@thecontentslabel{\@Roman{\thecontentslabel}}
+ \def\SUF@SEC@contentslabel{\@Roman{\thecontentslabel}}
\or
\def\SUF@thesection{\SUF@chapswitch\arabic{section}}
\def\SUF@HEAD@thesection{\arabic{section}}
\def\SUF@dotsec{.}
- \def\SUF@SEC@thecontentslabel{\thecontentslabel}
+ \def\SUF@SEC@contentslabel{\thecontentslabel}
\or
\def\SUF@thesection{\SUF@chapswitch\textsc{\roman{section}}}
\def\SUF@HEAD@thesection{\textsc{\roman{section}}}
\def\SUF@dotsec{.}
- \def\SUF@SEC@thecontentslabel{\textsc{\@roman{\thecontentslabel}}}
+ \def\SUF@SEC@contentslabel{\textsc{\@roman{\thecontentslabel}}}
\or
\def\SUF@thesection{\SUF@chapswitch\Roman{section}}
\def\SUF@HEAD@thesection{\Roman{section}}
\def\SUF@dotsec{.}
- \def\SUF@SEC@thecontentslabel{\@Roman{\thecontentslabel}}
+ \def\SUF@SEC@contentslabel{\@Roman{\thecontentslabel}}
\fi}
% \end{macrocode}
% \paragraph{Subsection number style}
@@ -2994,27 +2965,27 @@ cochineal,mathpazo,bera,amsthm}
\ifcase\suftesi@nr\relax
\def\SUF@thesubsection{\SUF@thesection.\arabic{subsection}}
\def\SUF@dotsubsec{}
- \def\SUF@SUBSEC@thecontentslabel{\thecontentslabel}
+ \def\SUF@SUBSEC@contentslabel{\thecontentslabel}
\or
\def\SUF@thesubsection{\SUF@thesection.\textsc{\roman{subsection}}}
\def\SUF@dotsubsec{}
- \def\SUF@SUBSEC@thecontentslabel{\textsc{\@roman{\thecontentslabel}}}
+ \def\SUF@SUBSEC@contentslabel{\textsc{\@roman{\thecontentslabel}}}
\or
\def\SUF@thesubsection{\SUF@thesection.\Roman{subsection}}
\def\SUF@dotsubsec{}
- \def\SUF@SUBSEC@thecontentslabel{\@Roman{\thecontentslabel}}
+ \def\SUF@SUBSEC@contentslabel{\@Roman{\thecontentslabel}}
\or
\def\SUF@thesubsection{\SUF@thesection.\arabic{subsection}}
\def\SUF@dotsubsec{.}
- \def\SUF@SUBSEC@thecontentslabel{\thecontentslabel}
+ \def\SUF@SUBSEC@contentslabel{\thecontentslabel}
\or
\def\SUF@thesubsection{\SUF@thesection.\textsc{\roman{subsection}}}
\def\SUF@dotsubsec{.}
- \def\SUF@SUBSEC@thecontentslabel{\textsc{\@roman{\thecontentslabel}}}
+ \def\SUF@SUBSEC@contentslabel{\textsc{\@roman{\thecontentslabel}}}
\or
\def\SUF@thesubsection{\SUF@thesection.\Roman{subsection}}
\def\SUF@dotsubsec{.}
- \def\SUF@SUBSEC@thecontentslabel{\@Roman{\thecontentslabel}}
+ \def\SUF@SUBSEC@contentslabel{\@Roman{\thecontentslabel}}
\fi}
% \end{macrocode}
% \paragraph{Sub-subsection number style}
@@ -3024,27 +2995,27 @@ cochineal,mathpazo,bera,amsthm}
\ifcase\suftesi@nr\relax
\def\SUF@thesubsubsection{\SUF@thesubsection.\arabic{subsubsection}}
\def\SUF@dotsubsubsec{}
- \def\SUF@SUBSUBSEC@thecontentslabel{\thecontentslabel}
+ \def\SUF@SUBSUBSEC@contentslabel{\thecontentslabel}
\or
\def\SUF@thesubsubsection{\SUF@thesubsection.\textsc{\roman{subsubsection}}}
\def\SUF@dotsubsubsec{}
- \def\SUF@SUBSUBSEC@thecontentslabel{\textsc{\@roman{\thecontentslabel}}}
+ \def\SUF@SUBSUBSEC@contentslabel{\textsc{\@roman{\thecontentslabel}}}
\or
\def\SUF@thesubsubsection{\SUF@thesubsection.\Roman{subsubsection}}
\def\SUF@dotsubsubsec{}
- \def\SUF@SUBSUBSEC@thecontentslabel{\@Roman{\thecontentslabel}}
+ \def\SUF@SUBSUBSEC@contentslabel{\@Roman{\thecontentslabel}}
\or
\def\SUF@thesubsubsection{\SUF@thesubsection.\arabic{subsubsection}}
\def\SUF@dotsubsubsec{.}
- \def\SUF@SUBSUBSEC@thecontentslabel{\thecontentslabel}
+ \def\SUF@SUBSUBSEC@contentslabel{\thecontentslabel}
\or
\def\SUF@thesubsubsection{\SUF@thesubsection.\textsc{\roman{subsubsection}}}
\def\SUF@dotsubsubsec{.}
- \def\SUF@SUBSUBSEC@thecontentslabel{\textsc{\@roman{\thecontentslabel}}}
+ \def\SUF@SUBSUBSEC@contentslabel{\textsc{\@roman{\thecontentslabel}}}
\or
\def\SUF@thesubsubsection{\SUF@thesubsection.\Roman{subsubsection}}
\def\SUF@dotsubsubsec{.}
- \def\SUF@SUBSUBSEC@thecontentslabel{\@Roman{\thecontentslabel}}
+ \def\SUF@SUBSUBSEC@contentslabel{\@Roman{\thecontentslabel}}
\fi}
% \end{macrocode}
% \subsubsection{Table of contents}
@@ -3069,41 +3040,41 @@ cochineal,mathpazo,bera,amsthm}
\define@choicekey{}{compacttoc}[\suftesi@val\suftesi@nr]
{sec,subsec,subsubsec,par,subpar}[sec]{%
\ifcase\suftesi@nr\relax
- \suftesi@toccompactsectrue
- \suftesi@toccompactsubsectrue
- \suftesi@toccompactsubsubsectrue
- \suftesi@toccompactpartrue
- \suftesi@toccompactsubpartrue
+ \suftesi@ctocsectrue
+ \suftesi@ctocsubsectrue
+ \suftesi@ctocsubsubsectrue
+ \suftesi@ctocpartrue
+ \suftesi@ctocsubpartrue
\def\SUF@sscorrect{\hskip.5em}
\def\SUF@ssscorrect{\hskip.5em}
\def\SUF@pcorrect{\hskip.5em}
\def\SUF@pcorrect{\hskip.5em}
\or
- \suftesi@toccompactsubsectrue
- \suftesi@toccompactsubsubsectrue
- \suftesi@toccompactpartrue
- \suftesi@toccompactsubpartrue
+ \suftesi@ctocsubsectrue
+ \suftesi@ctocsubsubsectrue
+ \suftesi@ctocpartrue
+ \suftesi@ctocsubpartrue
\def\SUF@sscorrect{\relax}
\def\SUF@ssscorrect{\hskip.5em}
\def\SUF@pcorrect{\hskip.5em}
\def\SUF@pcorrect{\hskip.5em}
\or
- \suftesi@toccompactsubsubsectrue
- \suftesi@toccompactpartrue
- \suftesi@toccompactsubpartrue
+ \suftesi@ctocsubsubsectrue
+ \suftesi@ctocpartrue
+ \suftesi@ctocsubpartrue
\def\SUF@sscorrect{\relax}
\def\SUF@ssscorrect{\relax}
\def\SUF@pcorrect{\hskip.5em}
\def\SUF@pcorrect{\hskip.5em}
\or
- \suftesi@toccompactpartrue
- \suftesi@toccompactsubpartrue
+ \suftesi@ctocpartrue
+ \suftesi@ctocsubpartrue
\def\SUF@sscorrect{\relax}
\def\SUF@ssscorrect{\relax}
\def\SUF@pcorrect{\relax}
\def\SUF@pcorrect{\hskip.5em}
\or
- \suftesi@toccompactsubpartrue
+ \suftesi@ctocsubpartrue
\def\SUF@sscorrect{\relax}
\def\SUF@ssscorrect{\relax}
\def\SUF@pcorrect{\relax}
@@ -3138,13 +3109,7 @@ cochineal,mathpazo,bera,amsthm}
\suftesi@twocolumnlottrue
\setkeys{}{tocstyle=ragged}
\fi}
-\define@choicekey{}{partialtoc}[\suftesi@val\suftesi@nr]
-{true,false}[true]{%
- \ifcase\suftesi@nr\relax
- \suftesi@partialtoctrue
- \or
- \suftesi@partialtocfalse
- \fi}
+\define@boolkey[SUF]{}{partialtoc}[true]{}
% \end{macrocode}
% \paragraph{Table of contents font}
% \begin{macrocode}
@@ -3250,9 +3215,9 @@ cochineal,mathpazo,bera,amsthm}
\def\SUF@Lheadstyle{\itshape}
\def\SUF@thepage{\thepage}
\or
- \def\SUF@Rheadstyle{\SUF@headingsmallcaps}
- \def\SUF@Lheadstyle{\SUF@headingsmallcaps}
- \def\SUF@thepage{\SUF@headingsmallcaps{\thepage}}
+ \def\SUF@Rheadstyle{\SUF@headersmallcaps}
+ \def\SUF@Lheadstyle{\SUF@headersmallcaps}
+ \def\SUF@thepage{\SUF@headersmallcaps{\thepage}}
\fi}
% \end{macrocode}
% \subsubsection{Text elements}
@@ -3319,13 +3284,7 @@ cochineal,mathpazo,bera,amsthm}
\renewcommand\@makefntext{%
\textsuperscript{\@thefnmark}\hskip.3em}
\fi}
-\define@choicekey{}{fewfootnotes}[\suftesi@val\suftesi@nr]
- {true,false}[true]{%
-\ifcase\suftesi@nr\relax
- \suftesi@fewfootnotestrue
-\or
- \relax
-\fi}
+\define@boolkey[SUF]{}{fewfootnotes}[true]{}
% \end{macrocode}
% \paragraph{Captions}
% \begin{macrocode}
@@ -3342,71 +3301,6 @@ cochineal,mathpazo,bera,amsthm}
\captionsetup{labelfont=sc}
\fi}
% \end{macrocode}
-% \paragraph{Marginal notes}
-% \begin{macrocode}
-\define@choicekey{}{marginpar}[\suftesi@val\suftesi@nr]
- {true,false}[true]{%
-\ifcase\suftesi@nr\relax
-\or
- \renewcommand\marginpar[2][]{}
-\fi}
-% \end{macrocode}
-% \subsubsection{Other options}
-% \paragraph{Part page}
-% \begin{macrocode}
-\define@choicekey{}{partpage}[\suftesi@val\suftesi@nr]
- {true,false}[true]{%
-\ifcase\suftesi@nr\relax
- \suftesi@partpagetrue
-\or
- \relax
-\fi}
-% \end{macrocode}
-% \paragraph{Draftdate}
-% \begin{macrocode}
-\define@choicekey{}{draftdate}[\suftesi@val\suftesi@nr]
- {true,false}[true]{%
-\ifcase\suftesi@nr\relax
- \suftesi@draftdatetrue
-\or
- \relax
-\fi}
-% \end{macrocode}
-% \paragraph{View mode}
-% \begin{macrocode}
-\define@choicekey{}{version}[\suftesi@val\suftesi@nr]
- {screen,cscreen,draft,final}[draft]{%
-\ifcase\suftesi@nr\relax
- \suftesi@screentrue
-\or
- \suftesi@screentrue
- \suftesi@screencenteredtrue
-\or
- \relax
-\or
- \AtBeginDocument{\crop[off]}
-\fi}
-\define@choicekey{}{crop}[\suftesi@val\suftesi@nr]
- {true,false}[true]{%
- \ClassWarningNoLine{suftesi}{%
- 'crop' option is deprecated.\MessageBreak
- Use 'version' option instead}
-\ifcase\suftesi@nr\relax
- \setkeys{}{version=draft}
-\or
- \setkeys{}{version=screen}
-\fi}
-% \end{macrocode}
-% \paragraph{Titlepage}
-% \begin{macrocode}
-\define@choicekey{}{titlepage}[\suftesi@val\suftesi@nr]
- {true,false}[true]{%
-\ifcase\suftesi@nr\relax
- \@titlepagetrue
-\or
- \@titlepagefalse
-\fi}
-% \end{macrocode}
% \paragraph{Pre-defined styles}
% \begin{macrocode}
\define@choicekey{}{style}[\suftesi@val\suftesi@nr]
@@ -3591,7 +3485,7 @@ cochineal,mathpazo,bera,amsthm}
\setkeys{}{
chapstyle=parright,
chapfont=smallcaps,
- tocchapfont=smallcaps,file:///tmp/mozilla_ivan0/luatex85.pdf
+ tocchapfont=smallcaps,
secfont=smallcaps,
headerfont=smallcaps}
\or
@@ -3658,75 +3552,50 @@ cochineal,mathpazo,bera,amsthm}
\define@choicekey{}{authortitlealign}[\suftesi@val\suftesi@nr]
{left,center,right}[left]{%
\ifcase\suftesi@nr\relax
- \def\SUF@lr@coll@titleSwitch{\filright}
-\or
- \def\SUF@lr@coll@titleSwitch{\filcenter}
-\or
- \def\SUF@lr@coll@titleSwitch{\filleft}
-\fi}
-\define@choicekey{}{papertitlestyle}[\suftesi@val\suftesi@nr]
- {left,center,right}[left]{%
-\ClassWarningNoLine{suftesi}{%
- 'papertitlestyle' option is deprecated.\MessageBreak
- Use 'authortitlealign' option instead}
-\ifcase\suftesi@nr\relax
- \def\SUF@lr@coll@titleSwitch{\filright}
+ \def\SUF@authortitle@align{\filright}
\or
- \def\SUF@lr@coll@titleSwitch{\filcenter}
+ \def\SUF@authortitle@align{\filcenter}
\or
- \def\SUF@lr@coll@titleSwitch{\filleft}
+ \def\SUF@authortitle@align{\filleft}
\fi}
\define@choicekey{}{reverseauthortitle}[\suftesi@val\suftesi@nr]
- {true,false}[false]{%
-\ifcase\suftesi@nr\relax
- \def\SUF@first{\SUF@Afont@style\SUF@Afont@shape\@author}
- \def\SUF@second{\SUF@Tfont@style\SUF@Tfont@shape\@title}
-\or
- \def\SUF@first{\SUF@Tfont@style\SUF@Tfont@shape\@title}
- \def\SUF@second{\SUF@Afont@style\SUF@Afont@shape\@author}
- \relax
-\fi}
-\define@choicekey{}{revauthortitle}[\suftesi@val\suftesi@nr]
- {true,false}[false]{%
-\ClassWarningNoLine{suftesi}{%
- 'revauthortitle' option is deprecated.\MessageBreak
- Use 'reverseauthortitle' option instead}
+ {true,false}[true]{%
\ifcase\suftesi@nr\relax
- \def\SUF@first{\SUF@Afont@style\SUF@Afont@shape\@author}
- \def\SUF@second{\SUF@Tfont@style\SUF@Tfont@shape\@title}
+ \def\SUF@first{\SUF@authorstyle\SUF@authorfont\@author}
+ \def\SUF@second{\SUF@titlestyle\SUF@titlefont\@title}
\or
- \def\SUF@first{\SUF@Tfont@style\SUF@Tfont@shape\@title}
- \def\SUF@second{\SUF@Afont@style\SUF@Afont@shape\@author}
+ \def\SUF@first{\SUF@titlestyle\SUF@titlefont\@title}
+ \def\SUF@second{\SUF@authorstyle\SUF@authorfont\@author}
\relax
\fi}
\define@choicekey{}{maketitlestyle}[\suftesi@val\suftesi@nr]
{suftesi,standard}[suftesi]{%
\ifcase\suftesi@nr\relax
- \def\SUF@Tfont@style{\SUF@chaptersize\color{sufred}\sffamily}
- \def\SUF@Afont@style{\small}
+ \def\SUF@titlestyle{\SUF@chaptersize\color{sufred}\sffamily}
+ \def\SUF@authorstyle{\small}
\def\SUF@datefont{\small}
\or
- \def\SUF@Tfont@style{\LARGE}
- \def\SUF@Afont@style{\large}
+ \def\SUF@titlestyle{\LARGE}
+ \def\SUF@authorstyle{\large}
\def\SUF@datefont{\small}
\fi}
\define@choicekey{}{titlefont}[\suftesi@val\suftesi@nr]
{roman,italic,smallcaps}[suftesi]{%
\ifcase\suftesi@nr\relax
- \def\SUF@Tfont@shape{\relax}
+ \def\SUF@titlefont{\relax}
\or
- \def\SUF@Tfont@shape{\itshape}
+ \def\SUF@titlefont{\itshape}
\or
- \def\SUF@Tfont@shape{\expandafter\SUF@titlesmallcaps}
+ \def\SUF@titlefont{\expandafter\SUF@titlesmallcaps}
\fi}
\define@choicekey{}{authorfont}[\suftesi@val\suftesi@nr]
{roman,italic,smallcaps}[suftesi]{%
\ifcase\suftesi@nr\relax
- \def\SUF@Afont@shape{\relax}
+ \def\SUF@authorfont{\relax}
\or
- \def\SUF@Afont@shape{\itshape}
+ \def\SUF@authorfont{\itshape}
\or
- \def\SUF@Afont@shape{\expandafter\SUF@titlesmallcaps}
+ \def\SUF@authorfont{\expandafter\SUF@titlesmallcaps}
\fi}
\define@choicekey{}{datefont}[\suftesi@val\suftesi@nr]
{roman,italic,smallcaps}[roman]{%
@@ -3756,8 +3625,59 @@ cochineal,mathpazo,bera,amsthm}
\def\SUF@tocAUT@font{\expandafter\SUF@TOCtitlesmallcaps}
\fi}
% \end{macrocode}
-% \subsubsection{Execute options}
+% \subsubsection{Deprecated options}
% \begin{macrocode}
+\define@choicekey{}{documentstructure}[\suftesi@val\suftesi@nr]
+ {book,article,collection}[book]{%
+\ClassWarningNoLine{suftesi}{%
+ 'documentstructure' option is deprecated.\MessageBreak
+ Use 'structure' option instead}
+\ifcase\suftesi@nr\relax
+ \setkeys{}{structure=book}
+\or
+ \setkeys{}{structure=article}
+\or
+ \setkeys{}{structure=collection}
+\fi}
+\define@choicekey{}{crop}[\suftesi@val\suftesi@nr]
+ {true,false}[true]{%
+ \ClassWarningNoLine{suftesi}{%
+ 'crop' option is deprecated.\MessageBreak
+ Use 'version' option instead}
+\ifcase\suftesi@nr\relax
+ \setkeys{}{version=draft}
+\or
+ \setkeys{}{version=screen}
+\fi}
+\define@choicekey{}{papertitlestyle}[\suftesi@val\suftesi@nr]
+ {left,center,right}[left]{%
+\ClassWarningNoLine{suftesi}{%
+ 'papertitlestyle' option is deprecated.\MessageBreak
+ Use 'authortitlealign' option instead}
+\ifcase\suftesi@nr\relax
+ \def\SUF@authortitle@align{\filright}
+\or
+ \def\SUF@authortitle@align{\filcenter}
+\or
+ \def\SUF@authortitle@align{\filleft}
+\fi}
+\define@choicekey{}{revauthortitle}[\suftesi@val\suftesi@nr]
+ {true,false}[true]{%
+\ClassWarningNoLine{suftesi}{%
+ 'revauthortitle' option is deprecated.\MessageBreak
+ Use 'reverseauthortitle' option instead}
+\ifcase\suftesi@nr\relax
+ \def\SUF@first{\SUF@authorstyle\SUF@authorfont\@author}
+ \def\SUF@second{\SUF@titlestyle\SUF@titlefont\@title}
+\or
+ \def\SUF@first{\SUF@titlestyle\SUF@titlefont\@title}
+ \def\SUF@second{\SUF@authorstyle\SUF@authorfont\@author}
+ \relax
+\fi}
+% \end{macrocode}
+% \subsubsection{Options processing}
+% \begin{macrocode}
+\ProcessOptionsX[SUF]<>\relax
\ExecuteOptionsX<>{
structure=book,
pagelayout=standard,
@@ -3772,7 +3692,6 @@ cochineal,mathpazo,bera,amsthm}
quotesize=footnotesize,
quotestyle=center,
captionstyle=standard,
- marginpar=true,
tocstyle=standard,
partstyle=left,
chapstyle=left,
@@ -3806,40 +3725,41 @@ cochineal,mathpazo,bera,amsthm}
tocauthorfont=roman,
reverseauthortitle=false,
authortitlealign=left}
-\ProcessOptionsX<>\relax
-% \end{macrocode}
-% The use of the \cmd{XKV@useoption} command, provided by
-% the \sty{xkeyval}, is a trick to delete the option given as
-% its argument from the list stored in \cmd{@unusedoptionlist}
-% so that the option will not produce the ``Unused global options''
-% message:
-% \begin{macrocode}
-\XKV@useoption{a4paper}
-\XKV@useoption{10pt}
-\XKV@useoption{11pt}
-\XKV@useoption{12pt}
-\XKV@useoption{oneside}
-\XKV@useoption{twoside}
-\XKV@useoption{onecolumn}
-\XKV@useoption{twocolumn}
-\XKV@useoption{titlepage}
-\XKV@useoption{notitlepage}
-\XKV@useoption{openright}
-\XKV@useoption{openany}
-\XKV@useoption{leqno}
-\XKV@useoption{fleqn}
-\XKV@useoption{a5paper}
-\XKV@useoption{b5paper}
-\XKV@useoption{legalpaper}
-\XKV@useoption{executivepaper}
-\XKV@useoption{landscape}
% \end{macrocode}
% A trick to delete the class options from \cmd{XKV@classoptionslist},
% in order to avoid incompatibility with packages using options
-% defined by \sty{suftesi} too. Thanks to Enrico Gregorio!
+% defined by \sty{suftesi} too. Thanks to Enrico Gregorio! (In previous versions
+% this command was placed after the option processing. Move it back if needed.)
% \begin{macrocode}
\def\XKV@classoptionslist{}
+\ProcessOptionsX<>\relax
% \end{macrocode}
+% ^^A The use of the \cmd{XKV@useoption} command, provided by
+% ^^A the \sty{xkeyval}, is a trick to delete the option given as
+% ^^A its argument from the list stored in \cmd{@unusedoptionlist}
+% ^^A so that the option will not produce the ``Unused global options''
+% ^^A message:
+% ^^A \begin{macrocode}
+% ^^A\XKV@useoption{a4paper}
+% ^^A\XKV@useoption{10pt}
+% ^^A\XKV@useoption{11pt}
+% ^^A\XKV@useoption{12pt}
+% ^^A\XKV@useoption{oneside}
+% ^^A\XKV@useoption{twoside}
+% ^^A\XKV@useoption{onecolumn}
+% ^^A\XKV@useoption{twocolumn}
+% ^^A\XKV@useoption{titlepage}
+% ^^A\XKV@useoption{notitlepage}
+% ^^A\XKV@useoption{openright}
+% ^^A\XKV@useoption{openany}
+% ^^A\XKV@useoption{leqno}
+% ^^A\XKV@useoption{fleqn}
+% ^^A\XKV@useoption{a5paper}
+% ^^A\XKV@useoption{b5paper}
+% ^^A\XKV@useoption{legalpaper}
+% ^^A\XKV@useoption{executivepaper}
+% ^^A\XKV@useoption{landscape}
+% ^^A \end{macrocode}
% \subsection{Basic packages}
% \begin{macrocode}
\RequirePackage{multicol}
@@ -3851,14 +3771,12 @@ cochineal,mathpazo,bera,amsthm}
\RequirePackage{iftex}
\ifLuaTeX
\RequirePackage{luatex85}
- \else
\fi
% \end{macrocode}
% The FSPL style requires a verbose colophon which uses specific icons:
% \begin{macrocode}
\ifsuftesi@FSPL
\RequirePackage{cclicenses}
- \else
\fi
% \end{macrocode}
% If \opt{version=screen} or \opt{version=cscreen} the \sty{crop} package is not loaded. This can create problems if the \cmd{crop} command has been used in the document, for example to remove the crop marks from a certain page onwards (with \cmd{crop}|[off]|). For this reason, the \cmd{crop} command is defined (in practice it is rendered ineffective) so as not to produce errors if it had been used within the document.
@@ -3911,7 +3829,7 @@ cochineal,mathpazo,bera,amsthm}
\suftesi@greekfontfalse
\else\suftesi@greekfontfalse\fi
\else
-\ifsuftesi@standard
+\ifsuftesi@lmodern
\RequirePackage{lmodern}
\ifsuftesi@greekfont
\ClassWarningNoLine{suftesi}{%
@@ -3925,7 +3843,7 @@ cochineal,mathpazo,bera,amsthm}
% Now this combination is provided only
% for backward compatibility.
% \begin{macrocode}
- \ifsuftesi@compatibility
+ \ifsuftesi@mathpazo
\RequirePackage[osf,sc]{mathpazo}
\RequirePackage[scaled=0.8]{beramono}
\renewcommand{\sfdefault}{iwona}
@@ -4151,88 +4069,86 @@ cochineal,mathpazo,bera,amsthm}
\setlength{\sectionsep}{\dimexpr(\baselineskip) plus 1pt minus 1pt}
\unless\ifPDFTeX
\DeclareRobustCommand{\SUF@TOCtitlesmallcaps}[1]{%
- \addfontfeature{LetterSpace=10}\scshape\suftesi@MakeTextTOCLowercase{#1}}
+ \addfontfeature{LetterSpace=10}\scshape\SUF@TOCMakeLowercase{#1}}
\DeclareRobustCommand{\SUF@titlesmallcaps}[1]{%
- \addfontfeature{LetterSpace=10}\scshape\suftesi@MakeTextLowercase{#1}}
- \DeclareRobustCommand{\SUF@headingsmallcaps}[1]{%
- \addfontfeature{LetterSpace=10}\scshape\suftesi@MakeTextLowercase{#1}}
+ \addfontfeature{LetterSpace=10}\scshape\SUF@MakeLowercase{#1}}
+ \DeclareRobustCommand{\SUF@headersmallcaps}[1]{%
+ \addfontfeature{LetterSpace=10}\scshape\SUF@MakeLowercase{#1}}
\else
\DeclareRobustCommand{\SUF@TOCtitlesmallcaps}[1]{%
- \scshape\suftesi@MakeTextTOCLowercase{\textls*{#1}}}%
+ \scshape\SUF@TOCMakeLowercase{\textls*{#1}}}%
\DeclareRobustCommand{\SUF@titlesmallcaps}[1]{%
- \scshape\suftesi@MakeTextLowercase{\textls*{#1}}}%
- \DeclareRobustCommand{\SUF@headingsmallcaps}[1]{%
- \scshape\suftesi@MakeTextLowercase{\textls*{#1}}}%
+ \scshape\SUF@MakeLowercase{\textls*{#1}}}%
+ \DeclareRobustCommand{\SUF@headersmallcaps}[1]{%
+ \scshape\SUF@MakeLowercase{\textls*{#1}}}%
\fi
% \end{macrocode}
% \subsubsection{Default styles}
% \begin{macrocode}
-\newlength\SUF@ADJnumparchap
+\newlength\SUF@chapbeforesep
\def\SUF@default@CHAPTER{
\ifsuftesi@numparchap
\titleformat{\chapter}[display]
- {\startpartialtoc\SUF@chaptersize\SUF@lr@CHAPSwitch}
+ {\startchappartialtoc\SUF@chaptersize\SUF@CHAP@align}
{\SUF@thechapter\SUF@dotchap}
{2ex}
- {\SUF@CHAP@StyleSwitch}
- [\printpartialtoc]
+ {\SUF@CHAP@font}
\else
\titleformat{\chapter}[hang]
- {\startpartialtoc\SUF@chaptersize\SUF@lr@CHAPSwitch}
+ {\startchappartialtoc\SUF@chaptersize\SUF@CHAP@align}
{\SUF@thechapter\SUF@dotchap}
{3em}
- {\SUF@CHAP@StyleSwitch}
- [\printpartialtoc]
+ {\SUF@CHAP@font}
\fi
\ifsuftesi@numparchap
- \setlength{\SUF@ADJnumparchap}{-6ex}
+ \setlength{\SUF@chapbeforesep}{-6ex}
\else
- \setlength{\SUF@ADJnumparchap}{0pt}
+ \setlength{\SUF@chapbeforesep}{0pt}
\fi}
\def\SUF@default@SECTIONS{
\ifsuftesi@numparsec
\titleformat{\section}[display]
- {\SUF@sectionsize\SUF@lr@SECSwitch}
+ {\startsecpartialtoc\SUF@sectionsize\SUF@SEC@align}
{\SUF@thesection\SUF@dotsec}
{0ex}
- {\SUF@SEC@StyleSwitch}
+ {\SUF@SEC@font}
\titlespacing*{\section}{0em}{\sectionsep}{\sectionsep}[0em]
\else
\titleformat{\section}[hang]
- {\SUF@sectionsize\SUF@lr@SECSwitch}
+ {\startsecpartialtoc\SUF@sectionsize\SUF@SEC@align}
{\SUF@thesection\SUF@dotsec}
{1em}
- {\SUF@SEC@StyleSwitch}
+ {\SUF@SEC@font}
\titlespacing*{\section}{0ex}{\sectionsep}{\sectionsep}[0ex]
\fi
\ifsuftesi@numparsubsec
\titleformat{\subsection}[display]
- {\SUF@subsectionsize\SUF@lr@SUBSECSwitch}
+ {\SUF@subsectionsize\SUF@SUBSEC@align}
{\textnormal\SUF@thesubsection\SUF@dotsubsec}
{0ex}
- {\SUF@SUBSEC@StyleSwitch}
+ {\SUF@SUBSEC@font}
\titlespacing*{\subsection}{0em}{\sectionsep}{\sectionsep}[0em]
\else
\titleformat{\subsection}[hang]
- {\SUF@subsectionsize\SUF@lr@SUBSECSwitch}
+ {\SUF@subsectionsize\SUF@SUBSEC@align}
{\textnormal\SUF@thesubsection\SUF@dotsubsec}
{1em}
- {\SUF@SUBSEC@StyleSwitch}
+ {\SUF@SUBSEC@font}
\titlespacing*{\subsection}{\parindent}{\sectionsep}{\sectionsep}[0ex]
\fi
\ifsuftesi@numparsubsubsec
\titleformat{\subsubsection}[display]
- {\SUF@subsectionsize\SUF@lr@SUBSUBSECSwitch}
+ {\SUF@subsectionsize\SUF@SUBSUBSEC@align}
{\textnormal\SUF@thesubsubsection\SUF@dotsubsubsec}
{0ex}
- {\SUF@SUBSUBSEC@StyleSwitch}
+ {\SUF@SUBSUBSEC@font}
\titlespacing*{\subsubsection}{0em}{\sectionsep}{\sectionsep}[0em]
\else
\titleformat{\subsubsection}[hang]
- {\SUF@subsectionsize\SUF@lr@SUBSUBSECSwitch}
+ {\SUF@subsectionsize\SUF@SUBSUBSEC@align}
{\textnormal\SUF@thesubsubsection\SUF@dotsubsubsec}
{1em}
- {\SUF@SUBSUBSEC@StyleSwitch}
+ {\SUF@SUBSUBSEC@font}
\titlespacing*{\subsubsection}{\parindent}{\sectionsep}{\sectionsep}[0ex]
\fi}
\SUF@default@CHAPTER
@@ -4241,43 +4157,43 @@ cochineal,mathpazo,bera,amsthm}
% \subsubsection{Sections spacing}
% \begin{macrocode}
\ifsuftesi@periodical
- \titlespacing*{\chapter}{0em}{\SUF@ADJnumparchap}{18ex}
+ \titlespacing*{\chapter}{0em}{\SUF@chapbeforesep}{18ex}
\titlespacing*{name=\chapter,numberless}{0em}{0pt}{18ex}
\else
\ifsuftesi@periodicalaureo
- \titlespacing*{\chapter}{0em}{\SUF@ADJnumparchap}{18ex}
+ \titlespacing*{\chapter}{0em}{\SUF@chapbeforesep}{18ex}
\titlespacing*{name=\chapter,numberless}{0em}{0pt}{18ex}
\else
\ifsuftesi@compact
- \titlespacing*{\chapter}{0em}{\SUF@ADJnumparchap}{18ex}
+ \titlespacing*{\chapter}{0em}{\SUF@chapbeforesep}{18ex}
\titlespacing*{name=\chapter,numberless}{0em}{0pt}{18ex}
\else
\ifsuftesi@compactaureo
- \titlespacing*{\chapter}{0em}{\SUF@ADJnumparchap}{18ex}
+ \titlespacing*{\chapter}{0em}{\SUF@chapbeforesep}{18ex}
\titlespacing*{name=\chapter,numberless}{0em}{0pt}{18ex}
\else
\ifsuftesi@supercompact
- \titlespacing*{\chapter}{0em}{\SUF@ADJnumparchap}{18ex}
+ \titlespacing*{\chapter}{0em}{\SUF@chapbeforesep}{18ex}
\titlespacing*{name=\chapter,numberless}{0em}{0pt}{18ex}
\else
\ifsuftesi@supercompactaureo
- \titlespacing*{\chapter}{0em}{\SUF@ADJnumparchap}{18ex}
+ \titlespacing*{\chapter}{0em}{\SUF@chapbeforesep}{18ex}
\titlespacing*{name=\chapter,numberless}{0em}{0pt}{18ex}
\else
\ifsuftesi@pocketa
- \titlespacing*{\chapter}{0em}{\SUF@ADJnumparchap}{18ex}
+ \titlespacing*{\chapter}{0em}{\SUF@chapbeforesep}{18ex}
\titlespacing*{name=\chapter,numberless}{0em}{0pt}{18ex}
\else
\ifsuftesi@pocketb
- \titlespacing*{\chapter}{0em}{\SUF@ADJnumparchap}{18ex}
+ \titlespacing*{\chapter}{0em}{\SUF@chapbeforesep}{18ex}
\titlespacing*{name=\chapter,numberless}{0em}{0pt}{18ex}
\else
\ifsuftesi@pocketc
- \titlespacing*{\chapter}{0em}{\SUF@ADJnumparchap}{18ex}
+ \titlespacing*{\chapter}{0em}{\SUF@chapbeforesep}{18ex}
\titlespacing*{name=\chapter,numberless}{0em}{0pt}{18ex}
\else
\titlespacing*{\chapter}{0em}{%
- \dimexpr(6ex+\SUF@ADJnumparchap)}{18ex}
+ \dimexpr(6ex+\SUF@chapbeforesep)}{18ex}
\titlespacing*{name=\chapter,numberless}{0em}{6ex}{18ex}
\fi
\fi
@@ -4313,7 +4229,7 @@ cochineal,mathpazo,bera,amsthm}
% \subsection*{The \cmd{part} command}
% \begin{macrocode}
\renewcommand\part{%
- \ifsuftesi@partpage
+ \ifSUF@partpage
\if@openright
\cleardoublepage
\else
@@ -4327,7 +4243,7 @@ cochineal,mathpazo,bera,amsthm}
\else
\@tempswafalse
\fi
- \ifsuftesi@partpage
+ \ifSUF@partpage
\null\vfil
\fi
\secdef\@part\@spart}
@@ -4343,7 +4259,7 @@ cochineal,mathpazo,bera,amsthm}
\SUF@tocPART@font#1}%
\fi
\markboth{}{}%
- {\SUF@lr@PARTSwitch\SUF@partsize
+ {\SUF@PART@align\SUF@partsize
\interlinepenalty \@M
\ifnum \c@secnumdepth >-2\relax
\addvspace{4ex}
@@ -4354,17 +4270,17 @@ cochineal,mathpazo,bera,amsthm}
\else
\hspace{1em}
\fi
- \noindent\SUF@PART@StyleSwitch#2\par}%
+ \noindent\SUF@PART@font#2\par}%
\@endpart}
\def\@spart#1{%
- {\SUF@lr@PARTSwitch\SUF@partsize
+ {\SUF@PART@align\SUF@partsize
\interlinepenalty \@M
\addvspace{4ex}
- \noindent\SUF@PART@StyleSwitch#1\par}%
+ \noindent\SUF@PART@font#1\par}%
\@endpart}
\ifsuftesi@article
\def\@endpart{%
- \ifsuftesi@partpage
+ \ifSUF@partpage
\vfil\newpage
\if@twoside
\if@openright
@@ -4397,14 +4313,14 @@ cochineal,mathpazo,bera,amsthm}
{}
{\theparagraph}
{.5em}
- {\SUF@PAR@StyleSwitch}
+ {\SUF@PAR@font}
[{.}\hspace*{1em}]
\titlespacing*{\paragraph}{\parindent}{.5\sectionsep}{.5\sectionsep}
\titleformat{\subparagraph}[runin]
{}
{\thesubparagraph}
{.5em}
- {\SUF@SUBPAR@StyleSwitch}
+ {\SUF@SUBPAR@font}
[{.}\hspace*{1em}]
\titlespacing*{\subparagraph}{\parindent}{.5\sectionsep}{.5\sectionsep}
% \end{macrocode}
@@ -4475,487 +4391,88 @@ cochineal,mathpazo,bera,amsthm}
{\relax}}
\fi
% \end{macrocode}
-% \subsection{Cover page}
+% \subsubsection{Commands for sections font}
% \begin{macrocode}
-\newcommand{\Ctitle}[1]{\def\@Ctitle{#1}}
-\newcommand{\Csubtitle}[1]{\def\@Csubtitle{#1}}
-\newcommand{\Cauthor}[1]{\def\@Cauthor{#1}}
-\newcommand{\Ceditor}[1]{\def\@Ceditor{#1}}
-\newcommand{\Cfoot}[1]{\def\@Cfoot{#1}}
-\newcommand{\Cpagecolor}[1]{\def\@Cpagecolor{#1}}
-\newcommand{\Ccirclecolor}[1]{\def\@Ccirclecolor{#1}}
-\newcommand{\Ctextcolor}[1]{\def\@Ctextcolor{#1}}
-\newcommand{\Cfootcolor}[1]{\def\@Cfootcolor{#1}}
-\Cauthor{}
-\Ctitle{}
-\Csubtitle{}
-\Ceditor{}
-\Cfoot{}
-\Cpagecolor{gray!30}
-\Ctextcolor{white}
-\Cfootcolor{black}
-\AtBeginDocument{
-\@ifpackageloaded{tikz}{%
-\newcommand\makecover[1][]{%
-\begin{titlepage}
-\begin{tikzpicture}[overlay,remember picture]
- \draw[draw=none,fill=\@Cpagecolor]
- (current page.north west) rectangle (current page.south east);
- \node[anchor=center,yshift=.22\paperwidth] at (current page.center) (c) {};
- \draw[draw=none,fill=gray,#1]
- (c) circle (.38\paperwidth) ;
- \node[anchor=center] at (c) (author) {%
-\parbox{.7\paperwidth}{%
- \centering
- \ifx\@Cauthor\@empty
- \else
- {\scshape\color{\@Ctextcolor}\@Cauthor\\}
- \vspace*{\baselineskip}
- \fi
-
- \ifx\@Ctitle\@empty
- \else
- {\Huge\bfseries\color{\@Ctextcolor}\@Ctitle\\[1ex]}
- \fi
-
- \ifx\@Csubtitle\@empty
- \else
- {\smallskip\Large\color{\@Ctextcolor}\@Csubtitle\\}
- \fi
-
- \ifx\@Ceditor\@empty
- \else
- {\vspace*{2\baselineskip}\color{\@Ctextcolor}\@Ceditor\\}
- \fi}
-};
-\ifx\@Cfoot\@empty\else
- \node[xshift=.5\paperwidth,yshift=1cm,
- align=center,text=\@Cfootcolor,anchor=south]
- at (current page.south west) {\@Cfoot};
-\fi
-\end{tikzpicture}
-\end{titlepage}
-}
-}
-{\def\makecover{\ClassError{suftesi}{\MessageBreak%
- ***********************************\MessageBreak
- * To use the \noexpand\makecover command\MessageBreak
- * load the 'tikz' package.\MessageBreak
- ************************************}{\MessageBreak%
- ***********************************\MessageBreak
- * To use the \noexpand\makecover command\MessageBreak
- * load the 'tikz' package.\MessageBreak
- ************************************}}}
-}
+\newcommand{\partfont}[1]{\def\SUF@PART@font{#1}}
+\newcommand{\chapfont}[1]{\def\SUF@CHAP@font{#1}}
+\newcommand{\secfont}[1]{\def\SUF@SEC@font{#1}}
+\newcommand{\subsecfont}[1]{\def\SUF@SUBSEC@font{#1}}
+\newcommand{\subsubsecfont}[1]{\def\SUF@SUBSUBSEC@font{#1}}
+\newcommand{\partnumfont}[1]{\def\SUF@PART@font{#1}}\partnumfont{}
+\newcommand{\chapnumfont}[1]{\def\SUF@thechapter{#1}}
+\newcommand{\secnumfont}[1]{\def\SUF@thesection{#1}}
+\newcommand{\subsecnumfont}[1]{\def\SUF@thesubsection{#1}}
+\newcommand{\subsubsecnumfont}[1]{\def\SUF@thesubsubsection{#1}}
+\newcommand{\titlefont}[1]{\def\SUF@titlestyle{#1}\let\SUF@titlefont\relax}
+\newcommand{\authorfont}[1]{\def\SUF@authorstyle{#1}\let\SUF@authorfont\relax}
+\newcommand{\datefont}[1]{\def\SUF@datefont{#1}}
% \end{macrocode}
-% \subsection{Title page}
-% The new \cmd{title} command has an optional argument
-% which can be used in the headers.
+% \subsubsection{Commands for breaking titles}
+% Two commands for manual breaks active, respectively, only in the table of contents and in the body text. The solution was initially made available by Enrico Gregorio many years ago in one of the first versions of the class (at that time the commands were called \cmd{headbreak} and \cmd{xheadbreak}). Later, while I was working on version 3.0, I noticed an alignment problem in the chapter titles when using the \opt{chapstyle=left} option. So I added the \cmd{breakinbodyleft} command and updated the command names to make them more recognizable. Old names are in any case available for backwards compatibility.
% \begin{macrocode}
-\def\isbn#1{\gdef\@isbn{#1}}
-\def\@issn{\@latex@warning@no@line{%
- No \noexpand\isbn given}}
-\def\doi#1{\gdef\@doi{#1}}
-\def\@doi{\@latex@warning@no@line{%
- No \noexpand\doi given}}
-\def\isbn#1{\gdef\@issn{#1}}
-\def\@issn{\@latex@warning@no@line{%
- No \noexpand\isbn given}}
-\renewcommand*{\title}[2][]{\gdef\@headtitle{#1}\gdef\@title{#2}}
-\edef\title{\noexpand\@dblarg
- \expandafter\noexpand\csname\string\title\endcsname}
-\def\@headtitle{--missing title--%
- \protect\ClassWarningNoLine{suftesi}{%
- No \string\title\space given \MessageBreak%
- See the class documentation for explanation}}
-\def\@title{--missing title--%
- \protect\ClassWarningNoLine{suftesi}{%
- No \string\title\space given\MessageBreak%
- See the class documentation for explanation}}
-\def\@author{--missing author--%
- \protect\ClassWarningNoLine{suftesi}{%
- No \string\author\space given\MessageBreak%
- See the class documentation for explanation}}
-\if@titlepage
- \renewcommand\maketitle{%
- \begin{titlepage}
- \let\footnotesize\small
- \let\footnoterule\relax
- \let \footnote \thanks
- \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
- \null\vfil
- \vskip 60\p@
- \begin{center}%
- {\SUF@first\par}%
- \vskip 3em%
- {\lineskip .75em%
- \begin{tabular}[t]{c}%
- \SUF@second
- \end{tabular}\par}%
- \vskip 1.5em%
- {\SUF@datefont\@date\par}%
- \end{center}\par
- \@thanks
- \vfil\null
- \end{titlepage}%
- \setcounter{footnote}{0}%
- \global\let\thanks\relax
- \global\let\maketitle\relax
- \global\let\@thanks\@empty
- \global\let\@date\@empty
- \global\let\date\relax
- \global\let\and\relax}
-\else
-\renewcommand\maketitle{\par
- \begingroup
- \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
- \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
- \long\def\@makefntext##1{\parindent 1em\noindent
- \hb@xt@1.8em{%
- \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
- \if@twocolumn
- \ifnum \col@number=\@ne
- \@maketitle
- \else
- \twocolumn[\@maketitle]%
- \fi
- \else
- \newpage
- \global\@topnum\z@% Prevents figures from going at top of page.
- \@maketitle
- \fi
- \thispagestyle{plain}\@thanks
- \endgroup
- \setcounter{footnote}{0}%
- \global\let\thanks\relax
- \global\let\maketitle\relax
- \global\let\@maketitle\relax
- \global\let\@thanks\@empty
- \global\let\@date\@empty
- \global\let\date\relax
- \global\let\and\relax}
-\def\@maketitle{%
- \newpage
- \null
- \vskip 2em%
- \begin{center}%
- \let \footnote \thanks
- {\SUF@first\par}%
- \vskip 1.5em%
- {\lineskip .5em%
- \begin{tabular}[t]{c}%
- \SUF@second\par
- \end{tabular}\par}%
- \vskip 1em%
- {\SUF@datefont\@date\par}%
- \end{center}%
- \par
- \vskip 1.5em}
-\fi
+\newif\ifbreakintoc\breakintocfalse
+\newif\ifbreakinbody\breakinbodytrue
+\DeclareRobustCommand{\breakintoc}
+ {\ifbreakintoc\\\else\fi}
+\DeclareRobustCommand{\breakinbody}
+ {\ifbreakinbody\\\else\fi}
+\DeclareRobustCommand{\breakinbodyleft}
+ {\ifbreakinbody\newline\else\fi}
+\let\origtableofcontents\tableofcontents
+\renewcommand{\tableofcontents}{%
+ \begingroup
+ \breakintoctrue\breakinbodyfalse%
+ \origtableofcontents
+ \endgroup}
+\DeclareRobustCommand{\headbreak}
+ {\ifbreakintoc\\\else\fi}
+\DeclareRobustCommand{\xheadbreak}
+ {\ifbreakinbody\\\else\fi}
+\DeclareRobustCommand{\yheadbreak}
+ {\ifbreakinbody\newline\else\fi}
% \end{macrocode}
-% \subsection{The \opt{collection} structure}
+% \subsubsection{Abstract}
% \begin{macrocode}
\ifsuftesi@collection
-\newcounter{journalnumber}
-\newcounter{journalvolume}
-\newcounter{issue}
-\newcounter{title}
-\setcounter{title}{1}
-\newcounter{article}
-\setcounter{article}{0}
-\setcounter{journalnumber}{0}
-\setcounter{tocdepth}{0}
-\def\journalname#1{\gdef\@journalname{#1}}
- \def\@journalname{\@latex@warning@no@line{%
- No \noexpand\journalname given}}
-\def\journalvolume#1{\gdef\@journalvolume{#1}}
- \def\@journalvolume{\@latex@warning@no@line{%
- No \noexpand\journalvolume given}}
-\def\journalnumber#1{\gdef\@journalnumber{#1}}
- \def\@journalnumber{\@latex@warning@no@line{%
- No \noexpand\journalnumber given}}
-\def\issue#1{\gdef\@issue{#1}}
- \def\@issue{\@latex@warning@no@line{%
- No \noexpand\issue given}}
-\def\journalyear#1{\gdef\@journalyear{#1}}
- \def\@journalyear{\@latex@warning@no@line{%
- No \noexpand\journalyear given}}
-\def\journalwebsite#1{\gdef\@journalwebsite{\url{#1}}}
- \def\@journalwebsite{\@latex@warning@no@line{%
- No \noexpand\journalwebsite given}}
-\def\thanks#1{\footnotemark\ \protected@xdef\@thanks{%
- \@thanks\protect\footnotetext[\the\c@footnote]{#1}}}
-\def\fulljournal{\emph{\@journalname} \@journalnumber, %
- \@issue{} \@journalyear}
-\def\issuename#1{\gdef\@issuename{#1}}
-\def\collectiontitle#1{\gdef\@collectiontitle{#1}}
- \def\@collectiontitle{\@latex@warning@no@line{%
- No \noexpand\collectiontitle given}}
-\def\collectioneditor#1{\gdef\@collectioneditor{#1}}
- \def\@collectioneditor{\@latex@warning@no@line{%
- No \noexpand\collectioneditor given}}
-\renewcommand*{\title}[2][]{%
- \gdef\@headtitle{#1}\gdef\@title{#2}\markright{#1}}
- \edef\title{\noexpand\@dblarg
- \expandafter\noexpand\csname\string\title\endcsname}
- \def\@headtitle{--missing title--%
- \protect\ClassWarningNoLine{suftesi}{%
- No \string\title\space given \MessageBreak%
- See the class documentation for explanation}}
- \def\@title{--missing title--%
- \protect\ClassWarningNoLine{suftesi}{%
- No \string\title\space given\MessageBreak%
- See the class documentation for explanation}}
- \def\@author{--missing author--%
- \protect\ClassWarningNoLine{suftesi}{%
- No \string\author\space given\MessageBreak%
- See the class documentation for explanation}}
-\newcommand*\l@title[2]{%
- \ifnum \c@tocdepth >\m@ne
- \addpenalty{-\@highpenalty}%
- \vskip 1.0ex \@plus\p@
- \begingroup
- \parindent \z@ \rightskip \@pnumwidth
- \parfillskip -\@pnumwidth
- \advance\leftskip1em
- \hskip -\leftskip
- #1\nobreak%
- \ifsuftesi@dottedtoc\dotfill%
- \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
- \else
- \ifsuftesi@raggedtoc%
- \nobreak\hskip1em #2 \hfill\null\par
- \else
- \ifsuftesi@pagelefttoc
- \ClassError{suftesi}
- {\MessageBreak
- You can not use tocstyle=leftpage\MessageBreak
- with structure=collection}
- {You can not use tocstyle=leftpage\MessageBreak
- with structure=collection}
- \else
- \nobreak\hfill #2\par
- \fi
- \fi
- \fi
- \penalty\@highpenalty
- \endgroup
- \fi}
-\renewcommand\maketitle{\par
- \begingroup
- \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
- \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
- \long\def\@makefntext##1{\parindent 1em\noindent
- \hb@xt@1.8em{%
- \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
- \if@twocolumn
- \ifnum \col@number=\@ne
- \@maketitle
+ \newenvironment{abstract}{%
+ \if@twocolumn
+ \section*{\abstractname}%
\else
- \twocolumn[\@maketitle]%
- \fi
- \else
- \newpage
- \global\@topnum\z@ % Prevents figures from going at top of page.
- \@maketitle
- \fi
- \thispagestyle{plain}\@thanks%
- \endgroup
- \setcounter{section}{0}%
-% \setcounter{footnote}{0}%
-% \global\let\thanks\relax
-% \global\let\maketitle\relax
-% \global\let\@maketitle\relax
-% \global\let\@thanks\@empty
-% \global\let\@author\@empty
-% \global\let\@date\@empty
-% \global\let\@title\@empty
-% \global\let\title\relax
-% \global\let\author\relax
-% \global\let\date\relax
- \global\let\and\relax
- \let\thanks\@gobble}
-\AtBeginDocument{\def\@maketitle{%
- \refstepcounter{article}
- \SUF@chaptersize
- \SUF@lr@coll@titleSwitch
- \let\footnote\thanks
- \parindent=0pt
- {\SUF@second}%
- \label{begin:\thearticle}
-% \end{macrocode}
-% Check if you don't use \sty{hyperrref} provided by Enrico Gregorio
-% (\url{https://tex.stackexchange.com/a/427203/231952}):
-% \begin{macrocode}
- \@ifundefined{Hy@raisedlink}{\let\texorpdfstring\@firstoftwo}{%
- \xdef\@currentHref{title.\thearticle}%
- \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
- }%
-% \end{macrocode}
-% \begin{macrocode}
- \csname toc@entry@\endcsname
- \begingroup%
- \let\thanks\@gobble
- \addcontentsline{toc}{title}{%
- {\SUF@tocAUT@font{\@author}}\texorpdfstring{\newline}{, }%
- {\SUF@tocTIT@font{\@headtitle}}}
- \endgroup%
- \par\nobreak\vspace{2ex}
- {\SUF@first%
- \vskip1.5cm}}%
- }
-% \newenvironment{article}
-% {\begingroup
-% \global\let\@thanks\@empty
-% \setcounter{footnote}{0}
-% \refstepcounter{article}
-% \label{begin:\thearticle}
-%}
-% {\label{end:\thearticle}\endgroup
-% }
-\newenvironment{article}
- {\begingroup
- \setcounter{section}{0}
- \setcounter{footnote}{0}
- \setcounter{figure}{0}
- \setcounter{table}{0}}
- {\label{end:\thearticle}
- \cleardoublepage
- \global\let\@thanks\@empty
- \endgroup}
-\newcommand{\collectiontitlepage}{%
- \thispagestyle{empty}%
- \begingroup
- \centering
- \vspace*{\stretch{1}}
-
- {\SUF@chaptersize\@collectiontitle\par}
- \vskip5ex
-
- \@collectioneditor
- \vspace*{\stretch{3}}
-
- \endgroup
- \clearpage}
-\def\frontispiece{\collectiontitlepage}
-% \end{macrocode}
-% In the collection document structure the articles are treated as
-% chapters but you would not need to print in
-% the table of contents all the sections of every article. So first of
-% all we include in the table of contents only the author and the
-% title of each paper. Anyway the sections inside each paper are
-% numbered as in standard articles:
-% \begin{macrocode}
- \setcounter{tocdepth}{0}
- \renewcommand\thesection{%
- \@arabic\c@section}
- \renewcommand\thesubsection{%
- \thesection.\@arabic\c@subsection}
- \renewcommand\thesubsubsection{%
- \thesubsection.\@arabic\c@subsubsection}
- \renewcommand\theparagraph{%
- \thesubsubsection.\@arabic\c@paragraph}
- \renewcommand\thesubparagraph{%
- \theparagraph.\@arabic\c@subparagraph}
- \else
+ \small
+ \begin{center}%
+ {\abstractname\vspace{-.5em}\vspace{\z@}}%
+ \end{center}%
+ \quotation
+ \fi}
+ {\if@twocolumn\else\endquotation\fi\vspace{6ex}}
+\else
+\ifSUF@titlepage
+ \newenvironment{abstract}{%
+ \titlepage
+ \null\vfil
+ \@beginparpenalty\@lowpenalty
+ \begin{center}%
+ \abstractname
+ \@endparpenalty\@M
+ \end{center}}%
+ {\par\vfil\null\endtitlepage}
+\else
+ \newenvironment{abstract}{%
+ \if@twocolumn
+ \section*{\abstractname}%
+ \else
+ \small
+ \begin{center}%
+ {\abstractname\vspace{-.5em}\vspace{\z@}}%
+ \end{center}%
+ \quotation
+ \fi}
+ {\if@twocolumn\else\endquotation\fi}
+ \fi
\fi
+\newcommand\abstractname{Abstract}
% \end{macrocode}
-% \subsection{Frontispiece}
-% \begin{macrocode}
-\AtBeginDocument{%
-\@ifpackagewith{frontespizio}{suftesi}{%
-\ifsuftesi@periodical
- \Margini {5.5cm}{7cm}{4.5cm}{0cm}
- \else
-\ifsuftesi@periodicalaureo
- \Margini {5.5cm}{7cm}{4.5cm}{0cm}
- \else
-\ifsuftesi@compact
- \Margini {4.5cm}{7cm}{4.5cm}{0cm}
- \else
-\ifsuftesi@compactaureo
- \Margini {4.5cm}{7cm}{4.5cm}{0cm}
- \else
-\ifsuftesi@supercompact
- \Margini {4.5cm}{10cm}{6cm}{1cm}
- \else
-\ifsuftesi@supercompactaureo
- \Margini {4.5cm}{10cm}{6cm}{1cm}
- \else
-\ifsuftesi@pocketa
- \Margini {4.5cm}{10cm}{6cm}{1cm}
- \else
-\ifsuftesi@pocketb
- \Margini {4.5cm}{10cm}{6cm}{1cm}
- \else
-\ifsuftesi@pocketc
- \Margini {4.5cm}{10cm}{6cm}{1cm}
- \else
-\fi\fi\fi\fi\fi\fi\fi\fi\fi}
-{\@ifpackageloaded{frontespizio}{%
-\ifsuftesi@periodical
- \Margini {1cm}{7cm}{5cm}{1cm}
- \Rientro{1cm}
- \else
-\ifsuftesi@periodicalaureo
- \Margini {1cm}{7cm}{5cm}{1cm}
- \Rientro{1cm}
- \else
-\ifsuftesi@compact
- \Margini {1cm}{7cm}{6cm}{1cm}
- \Rientro{1cm}
- \else
-\ifsuftesi@compactaureo
- \Margini {1cm}{7cm}{6cm}{1cm}
- \Rientro{1cm}
- \else
-\ifsuftesi@supercompact
- \Margini {1cm}{10cm}{8cm}{1cm}
- \Rientro{1cm}
- \else
-\ifsuftesi@supercompactaureo
- \Margini {1cm}{10cm}{8cm}{1cm}
- \Rientro{1cm}
- \else
-\ifsuftesi@pocketa
- \Margini {1cm}{10cm}{8cm}{1cm}
- \Rientro{1cm}
- \else
-\ifsuftesi@pocketb
- \Margini {1cm}{10cm}{8cm}{1cm}
- \Rientro{1cm}
- \else
-\ifsuftesi@pocketc
- \Margini {1cm}{10cm}{8cm}{1cm}
- \Rientro{1cm}
- \else
-\fi\fi\fi\fi\fi\fi\fi\fi\fi}
-{\relax}}}
-% \end{macrocode}
-% \subsection{Index}
-% \begin{macrocode}
-\renewenvironment{theindex}
- {\if@twocolumn
- \@restonecolfalse
- \else
- \@restonecoltrue
- \fi
- \ifsuftesi@article
- \twocolumn[\section*{\indexname}]%
- \else
- \twocolumn[\@makeschapterhead{\indexname}]%
- \fi
- \@mkboth{\indexname}{\indexname}%
- \thispagestyle{plain}%
- \raggedright%
- \parindent\z@
- \parskip\z@ \@plus .3\p@\relax
- \columnseprule \z@
- \columnsep 35\p@
- \let\item\@idxitem}
- {\if@restonecol\onecolumn\else\clearpage\fi}
-% \end{macrocode}
-% \subsection{Appendices}
+% \subsubsection{Appendices}
% \begin{macrocode}
\RequirePackage{appendix}
\noappendicestocpagenum
@@ -4981,7 +4498,7 @@ cochineal,mathpazo,bera,amsthm}
\interlinepenalty \@M
\normalfont
\SUF@chaptersize
- \SUF@CHAP@StyleSwitch\expandafter\appendixpagename\par}%
+ \SUF@CHAP@font\expandafter\appendixpagename\par}%
\if@dotoc@pp
\addappheadtotoc
\fi
@@ -5004,7 +4521,7 @@ cochineal,mathpazo,bera,amsthm}
\interlinepenalty \@M
\normalfont
\SUF@chaptersize
- \SUF@CHAP@StyleSwitch\expandafter\appendixpagename%
+ \SUF@CHAP@font\expandafter\appendixpagename%
\markboth{}{}\par}%
\if@dotoc@pp
\addappheadtotoc
@@ -5018,7 +4535,7 @@ cochineal,mathpazo,bera,amsthm}
% this label is passed as an argument to \cmd{@Roman} or \cmd{@roman},
% which however accepts only integers. For this reason we must redefine
% all the occurrences of \cmd{titlecontents} in order to have \cmd{thecontentslabel}
-% in place of \cmd{SUF@CHAP@thecontentslabel} or \cmd{SUF@SEC@thecontentslabel}.
+% in place of \cmd{SUF@CHAP@contentslabel} or \cmd{SUF@SEC@contentslabel}.
% \begin{macrocode}
\def\suf@appendixtoc{%
\ifsuftesi@pagelefttoc
@@ -5036,7 +4553,7 @@ cochineal,mathpazo,bera,amsthm}
\hskip\SUF@addto@tochang@chap\SUF@tocCHAP@font}
{}
[\addvspace{1ex}]
- \ifsuftesi@toccompactsec
+ \ifsuftesi@ctocsec
\titlecontents*{section}[\SUF@tochang@chap]{}{%
\thecontentslabel\adjtoclabelsep\SUF@tocSEC@font}{\SUF@tocSEC@font}{,
\thecontentspage.}[][\adjtocpagesep][]
@@ -5068,7 +4585,7 @@ cochineal,mathpazo,bera,amsthm}
\SUF@tocCHAP@font}
{\SUF@chaptitlerule\contentspage}
[\addvspace{1ex}]
- \ifsuftesi@toccompactsec
+ \ifsuftesi@ctocsec
\titlecontents*{section}[\SUF@tocindent@chap]{}{%
\thecontentslabel\adjtoclabelsep\SUF@tocSEC@font}{\SUF@tocSEC@font}{,
\thecontentspage.}[][\adjtocpagesep][]
@@ -5106,289 +4623,28 @@ cochineal,mathpazo,bera,amsthm}
\renewcommand{\thechapter}{\@Alph\c@chapter}}
\fi
% \end{macrocode}
-% \subsection{Headings}
-% \begin{macrocode}
-\RequirePackage{fancyhdr}
-\newcommand{\versionstring}[1]{\def\version@string{#1}}
- \versionstring{Version of}
-\AtBeginDocument{%
- \pagestyle{fancy}
- \renewcommand{\headrulewidth}{0pt}
- \renewcommand{\footnoterule}{}
-\def\SUF@versionstring{\texttt{\version@string{} \today}}
-% \end{macrocode}
-% \paragraph{The \opt{default} headers}
-% \begin{macrocode}
-\renewcommand{\chaptermark}[1]{%
- \markboth{\chaptertitlename\ \protect\SUF@HEAD@thechapter}{#1}}
- \ifsuftesi@article
- \renewcommand{\sectionmark}[1]{\markright{\protect\SUF@HEAD@thesection.\ #1}}
- \else
- \renewcommand{\sectionmark}[1]{}
- \fi
-% \end{macrocode}
-% \paragraph{The \opt{plain} style}
-% \begin{macrocode}
-\fancypagestyle{plain}{\fancyhf{}}
-% \end{macrocode}
-% \paragraph{The \opt{sufplain} style}
-% \begin{macrocode}
-\fancypagestyle{sufplain}{%
- \fancyhf{}%
- \fancyfoot[RE,LO]{%
- \ifsuftesi@draftdate\footnotesize\SUF@versionstring\else\fi}
- \fancyfoot[C]{\footnotesize\SUF@thepage}}
-% \end{macrocode}
-% \paragraph{The \opt{centerheader} style}
-% \begin{macrocode}
-\fancypagestyle{centerheader}{%
- \fancyhf{}%
- \fancyfoot[RE,LO]{%
- \ifsuftesi@draftdate\footnotesize\SUF@versionstring\else\fi}
- \fancyhead[CO]{\footnotesize\breakinbodyfalse\SUF@rightmark}
- \fancyhead[CE]{\footnotesize\breakinbodyfalse%
- \SUF@LR@MarkSwitch}
- \fancyfoot[C]{\footnotesize\SUF@thepage}}
-% \end{macrocode}
-% \paragraph{The \opt{sufdefault} style}
-% \begin{macrocode}
-\fancypagestyle{sufdefault}{%
- \fancyhf{}%
- \fancyfoot[RE,LO]{%
- \ifsuftesi@draftdate\footnotesize\SUF@versionstring\else\fi}
- \fancyhead[LE,RO]{\footnotesize\SUF@thepage}
- \fancyhead[LO]{\footnotesize\breakinbodyfalse\SUF@rightmark}
- \fancyhead[RE]{\footnotesize\breakinbodyfalse%
- \SUF@LR@MarkSwitch}}
-\ifsuftesi@article
- \ifsuftesi@authortitle
- \def\SUF@LR@MarkSwitch{\SUF@leftmark}
- \else
- \def\SUF@LR@MarkSwitch{\SUF@rightmark}
- \fi
-\else
- \def\SUF@LR@MarkSwitch{\SUF@leftmark}
-\fi
-\def\SUF@leftrightmark{%
- \if@mainmatter\leftmark\else\rightmark\fi}
-\pagestyle{sufdefault}
- \ifsuftesi@centerheader\pagestyle{centerheader}\else\fi
- \ifsuftesi@sufplain\pagestyle{sufplain}\else\fi}
-% \end{macrocode}
-% \subsection{Text elements}
-% \paragraph{Block Quotations}
-% New environments for block quotations according to a popular Italian style.
-% The font size is the same of the footnotes and the margins are set to \cmd{parindent}.
-% \begin{macrocode}
-\renewenvironment{quotation}
- {\list{}{\listparindent\parindent%
- \itemindent \listparindent
- \SUF@quote@style
- \parsep \z@ \@plus\p@}%
- \item\relax%
- \SUF@quotation@size%
- \noindent\ignorespaces}
- {\endlist}
-\renewenvironment{quote}
- {\list{}{%
- \SUF@quote@style}%
- \item\relax%
- \SUF@quotation@size}% \ignorespaces?
- {\endlist}
-\renewenvironment{verse}
- {\let\\\@centercr
- \list{}{\itemsep \z@
- \itemindent -1.5em%
- \listparindent\itemindent
- \rightmargin \leftmargin
- \advance\leftmargin 1.5em}%
- \item\relax
- \SUF@quotation@size}
- {\endlist}
-% \end{macrocode}
-% \paragraph{The \opt{fewfootnotes} option}
-% Enable only with three footnotes per page maximum.
-% \begin{macrocode}
-\ifsuftesi@fewfootnotes
-\AtBeginDocument{%
-\def\@fnsymbol#1{\ensuremath{\ifcase#1\or*\or{*}{*}\or{*}{*}{*}\or%
- \ClassError{suftesi}%
- {Too many footnotes\MessageBreak
- Remove the class option 'fewfootnote'}
- {Too many footnotes\MessageBreak
- Remove the class option 'fewfootnote'}
- \else\@ctrerr\fi}}}
-\def\thefootnote{\@fnsymbol\c@footnote}%
-\else\fi
-% \end{macrocode}
-% \paragraph{The \cmd{xfootnote} command} Prints a footnote with discretionary
-% symbol give in the first argument.
-% \begin{macrocode}
-\newcommand*\xfootnote[1][*]{%
- \xdef\@thefnmark{#1}%
- \@footnotemark\@footnotetext}
-% \end{macrocode}
-% \paragraph{Marginal notes}
-% The |\marginpar| command is redefined according to the look
-% of \emph{Classic Thesis} by
-% André \textcite{Miede:2011}\index{Miede, André}.
-% \begin{macrocode}
-\def\SUF@mpsetup{%
- \itshape
- \footnotesize%
- \parindent=0pt \lineskip=0pt \lineskiplimit=0pt%
- \tolerance=2000 \hyphenpenalty=300 \exhyphenpenalty=300%
- \doublehyphendemerits=100000%
- \finalhyphendemerits=\doublehyphendemerits}
- \let\oldmarginpar\marginpar
- \renewcommand{\marginpar}[1]{\oldmarginpar%
- [\SUF@mpsetup\raggedleft\hspace{0pt}{#1}]%
- {\SUF@mpsetup\raggedright\hspace{0pt}{#1}}}
-% \end{macrocode}
-% Redefine an internal command of the \sty{todonotes} package in
-% order to use the class-specific marginal notes when this
-% package is loaded. This redefinition simply substitute
-% \cmd{oldmarginpar} to \cmd{marginpar}:
-% \begin{macrocode}
-\AtBeginDocument{%
-\@ifpackageloaded{todonotes}{%
- \renewcommand{\@todonotes@drawMarginNoteWithLine}{%
- \begin{tikzpicture}[remember picture, overlay, baseline=-0.75ex]%
- \node [coordinate] (inText) {};%
- \end{tikzpicture}%
- \oldmarginpar[{% Draw note in left margin
- \@todonotes@drawMarginNote%
- \@todonotes@drawLineToLeftMargin%
- }]{% Draw note in right margin
- \@todonotes@drawMarginNote%
- \@todonotes@drawLineToRightMargin%
- }
- }
- }
-{\relax}}
-% \end{macrocode}
-% \paragraph{Abstract}
-% \begin{macrocode}
-\ifsuftesi@collection
- \newenvironment{abstract}{%
- \if@twocolumn
- \section*{\abstractname}%
- \else
- \small
- \begin{center}%
- {\abstractname\vspace{-.5em}\vspace{\z@}}%
- \end{center}%
- \quotation
- \fi}
- {\if@twocolumn\else\endquotation\fi\vspace{6ex}}
-\else
-\if@titlepage
- \newenvironment{abstract}{%
- \titlepage
- \null\vfil
- \@beginparpenalty\@lowpenalty
- \begin{center}%
- \abstractname
- \@endparpenalty\@M
- \end{center}}%
- {\par\vfil\null\endtitlepage}
-\else
- \newenvironment{abstract}{%
- \if@twocolumn
- \section*{\abstractname}%
- \else
- \small
- \begin{center}%
- {\abstractname\vspace{-.5em}\vspace{\z@}}%
- \end{center}%
- \quotation
- \fi}
- {\if@twocolumn\else\endquotation\fi}
- \fi
-\fi
-\newcommand\abstractname{Abstract}
-% \end{macrocode}
-% \paragraph{Colophon or copyright notice}
-% \begin{macrocode}
-\newcommand{\colophon}[3][]{%
- \thispagestyle{empty}
- \null
- \vfill
- \def\next{#2}
- \ifx\next\@empty\else
- \noindent Copyright \copyright{} \the\year~#2\\[1ex]
- Tutti i diritti riservati
- \fi
- \vfill
- {\small\noindent Questo lavoro \`e stato composto con \LaTeX{}%
- \def\next{#1}
- \ifx\next\@empty\else su #1
- \fi usando la classe \textsf{suftesi} di
- Ivan Valbusa\index{Valbusa, Ivan}. #3\par}
- \cleardoublepage}
-\newcommand{\bookcolophon}[2]{%
- \thispagestyle{empty}
- \null
- \vfill
- \noindent #1
- \vfill
- {\small\noindent #2\par}
- \cleardoublepage}
-\newcommand{\artcolophon}[1]{%
-\thispagestyle{empty}
- \null
- \vfill
- {\small\noindent #1\par}}
-\newcommand{\finalcolophon}[1]{%
-\thispagestyle{empty}
- \null\vspace*{\stretch{1}}
- \begin{center}
- \begin{minipage}{.5\textwidth}
- \centering\small #1
- \end{minipage}
- \end{center}
- \vspace*{\stretch{6}}}
-% \end{macrocode}
-% \paragraph{The \cmd{FSPL} colophon}
-% This command is defined only for the \opt{style=FSPL*} options.
+% \subsubsection{Index}
% \begin{macrocode}
-\ifsuftesi@FSPL
-\newcommand{\FSPLcolophon}[1][\the\year]{%
-\begingroup
-\thispagestyle{empty}
-\null\vspace{\stretch{1}}
-\noindent \hskip-.5em\cc #1 \@author%
-\vskip1ex
-
-\small\noindent This work is licensed under the Creative Commons
-Attribution-NonCommercial-NoDerivs 3.0 Unported License.
-To view a copy of this license,
-visit http://creativecom mons.org/licenses/by-nc-nd/3.0/.
-
-\endgroup
-
-\begingroup
-\footnotesize
-
-\null\vspace{\stretch{1}}
-
-\noindent Typeset with \LaTeX{} in collaboration with the Joint Project
-\emph{Formal Style for PhD Theses with \LaTeX} (University of Verona,
-Italy) using the \textsf{suftesi} class by Ivan Valbusa. The text face
-is Palatino, designed by Hermann Zapf. The sans serif font is Iwona by
-Janusz M.~Nowacki.
-
-\endgroup
-
-\clearpage}
-\else
-\def\FSPLcolophon{%
- \ClassError{suftesi}
- {\noexpand\FSPLcolophon is defined\MessageBreak
- only for the FSPL styles}
- {\noexpand\FSPLcolophon is defined\MessageBreak
- only for the FSPL styles}}
-\fi
+\renewenvironment{theindex}
+ {\if@twocolumn
+ \@restonecolfalse
+ \else
+ \@restonecoltrue
+ \fi
+ \ifsuftesi@article
+ \twocolumn[\section*{\indexname}]%
+ \else
+ \twocolumn[\@makeschapterhead{\indexname}]%
+ \fi
+ \@mkboth{\indexname}{\indexname}%
+ \thispagestyle{plain}%
+ \raggedright%
+ \parindent\z@
+ \parskip\z@ \@plus .3\p@\relax
+ \columnseprule \z@
+ \columnsep 35\p@
+ \let\item\@idxitem}
+ {\if@restonecol\onecolumn\else\clearpage\fi}
% \end{macrocode}
% \subsection{Contents lists}
% \begin{macrocode}
@@ -5465,7 +4721,7 @@ Janusz M.~Nowacki.
% [0em]
% {\addvspace{3ex}}
% {\partname\hspace*{.5em}\makebox[\SUF@label@part][l]{%
-% \SUF@PART@thecontentslabel}\hspace*{1em}\SUF@tocPART@font}
+% \SUF@PART@contentslabel}\hspace*{1em}\SUF@tocPART@font}
% {\SUF@tocPART@font}
% {}
% [\addvspace{1ex}]
@@ -5534,16 +4790,16 @@ Janusz M.~Nowacki.
\makebox[1em][l]{\thecontentspage}%
\hskip\SUF@addto@tochang@chap%
\makebox[\SUF@label@chap][l]{%
- \SUF@CHAP@thecontentslabel}\hspace*{1em}%
+ \SUF@CHAP@contentslabel}\hspace*{1em}%
\SUF@tocCHAP@font}
{\hskip-\SUF@tochang@chap%
\makebox[1em][l]{\thecontentspage}%
\hskip\SUF@addto@tochang@chap\SUF@tocCHAP@font}
{}
[\addvspace{1ex}]
-\ifsuftesi@toccompactsec
+\ifsuftesi@ctocsec
\titlecontents*{section}[\SUF@tochang@chap]{}{%
- \SUF@SEC@thecontentslabel\adjtoclabelsep\SUF@tocSEC@font}{\SUF@tocSEC@font}{,
+ \SUF@SEC@contentslabel\adjtoclabelsep\SUF@tocSEC@font}{\SUF@tocSEC@font}{,
\thecontentspage.}[][\adjtocpagesep][]
\else
\titlecontents{section}
@@ -5554,16 +4810,16 @@ Janusz M.~Nowacki.
% \makebox[\SUF@label@sec][l]{%
% \ifsuftesi@article\SUF@toclabelnum%
% \else\fi\thecontentslabel}\hspace*{1em}%
- \makebox[\SUF@label@sec][l]{\SUF@SEC@thecontentslabel}\hspace*{1em}%
+ \makebox[\SUF@label@sec][l]{\SUF@SEC@contentslabel}\hspace*{1em}%
\SUF@tocSEC@font}
{\hskip-\SUF@tochang@sec%
\makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@sec%
\SUF@tocSEC@font}
{}
\fi
-\ifsuftesi@toccompactsubsec
+\ifsuftesi@ctocsubsec
\titlecontents*{subsection}[\SUF@tochang@sec]{\SUF@sscorrect}{%
- \SUF@SUBSEC@thecontentslabel\adjtoclabelsep\SUF@tocSUBSEC@font}{\SUF@tocSUBSEC@font}{,
+ \SUF@SUBSEC@contentslabel\adjtoclabelsep\SUF@tocSUBSEC@font}{\SUF@tocSUBSEC@font}{,
\thecontentspage.}[][\adjtocpagesep][]
\else
\titlecontents{subsection}
@@ -5571,16 +4827,16 @@ Janusz M.~Nowacki.
{}
{\hskip-\SUF@tochang@subsec%
\makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@subsec%
- \makebox[\SUF@label@subsec][l]{\SUF@SUBSEC@thecontentslabel}\hspace*{1em}%
+ \makebox[\SUF@label@subsec][l]{\SUF@SUBSEC@contentslabel}\hspace*{1em}%
\SUF@tocSUBSEC@font}
{\hskip-\SUF@tochang@subsec%
\makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@subsec%
\SUF@tocSUBSEC@font}
{}
\fi
-\ifsuftesi@toccompactsubsubsec
+\ifsuftesi@ctocsubsubsec
\titlecontents*{subsubsection}[\SUF@tochang@subsec]{\SUF@ssscorrect}{%
- \SUF@SUBSUBSEC@thecontentslabel\adjtoclabelsep%
+ \SUF@SUBSUBSEC@contentslabel\adjtoclabelsep%
\SUF@tocSUBSUBSEC@font}{\SUF@tocSUBSUBSEC@font}{,
\thecontentspage.}[][\adjtocpagesep][]
\else
@@ -5589,16 +4845,16 @@ Janusz M.~Nowacki.
{}
{\hskip-\SUF@tochang@subsubsec%
\makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@subsubsec%
- \makebox[\SUF@label@subsubsec][l]{\SUF@SUBSUBSEC@thecontentslabel}\hspace*{1em}%
+ \makebox[\SUF@label@subsubsec][l]{\SUF@SUBSUBSEC@contentslabel}\hspace*{1em}%
\SUF@tocSUBSUBSEC@font}
{\hskip-\SUF@tochang@subsubsec%
\makebox[1em][l]{\thecontentspage}\hskip\SUF@addto@tochang@subsubsec%
\SUF@tocSUBSUBSEC@font}
{}
\fi
-\ifsuftesi@toccompactpar
+\ifsuftesi@ctocpar
\titlecontents*{paragraph}[\SUF@tochang@subsubsec]{\SUF@pcorrect}{%
- \SUF@PAR@thecontentslabel\adjtoclabelsep%
+ \SUF@PAR@contentslabel\adjtoclabelsep%
\SUF@tocPAR@font}{\SUF@tocPAR@font}{,
\thecontentspage.}[][\adjtocpagesep][]
\else
@@ -5614,9 +4870,9 @@ Janusz M.~Nowacki.
\SUF@tocPAR@font}
{}
\fi
-\ifsuftesi@toccompactsubpar
+\ifsuftesi@ctocsubpar
\titlecontents*{subparagraph}[\SUF@tochang@par]{\SUF@pcorrect}{%
- \SUF@SUBPAR@thecontentslabel\adjtoclabelsep%
+ \SUF@SUBPAR@contentslabel\adjtoclabelsep%
\SUF@tocSUBPAR@font}{\SUF@tocSUBPAR@font}{,
\thecontentspage.}[][\adjtocpagesep][]
\else
@@ -5701,16 +4957,16 @@ Janusz M.~Nowacki.
[\SUF@tocindent@chap]
{\addvspace{2ex}}
{\hskip-\SUF@tocindent@chap%
- \makebox[\SUF@label@chap][l]{\SUF@CHAP@thecontentslabel}%
+ \makebox[\SUF@label@chap][l]{\SUF@CHAP@contentslabel}%
\hspace*{1em}%
\SUF@tocCHAP@font}
{\hskip-\SUF@tocindent@chap%
\SUF@tocCHAP@font}
{\SUF@chaptitlerule\contentspage}
[\addvspace{1ex}]
-\ifsuftesi@toccompactsec
+\ifsuftesi@ctocsec
\titlecontents*{section}[\SUF@tocindent@chap]{}{%
- \SUF@SEC@thecontentslabel\adjtoclabelsep\SUF@tocSEC@font}
+ \SUF@SEC@contentslabel\adjtoclabelsep\SUF@tocSEC@font}
{\SUF@tocSEC@font}{, \thecontentspage.}[][\adjtocpagesep][]
\else
\titlecontents{section}
@@ -5720,31 +4976,31 @@ Janusz M.~Nowacki.
% \makebox[\SUF@label@sec][l]{%
% \ifsuftesi@article\SUF@toclabelnum%
% \else\fi\thecontentslabel}\hspace*{1em}%
- \makebox[\SUF@label@sec][l]{\SUF@SEC@thecontentslabel}\hspace*{1em}%
+ \makebox[\SUF@label@sec][l]{\SUF@SEC@contentslabel}\hspace*{1em}%
\SUF@tocSEC@font}
{\hskip-\dimexpr(\SUF@label@sec+1em)%
\SUF@tocSEC@font}
{\ifsuftesi@article\SUF@chaptitlerule%
\else\SUF@titlerule\fi\contentspage}
\fi
-\ifsuftesi@toccompactsubsec
+\ifsuftesi@ctocsubsec
\titlecontents*{subsection}[\SUF@tocindent@sec]{\SUF@sscorrect}{%
- \SUF@SUBSEC@thecontentslabel\adjtoclabelsep\SUF@tocSUBSEC@font}
+ \SUF@SUBSEC@contentslabel\adjtoclabelsep\SUF@tocSUBSEC@font}
{\SUF@tocSUBSEC@font}{, \thecontentspage.}[][\adjtocpagesep][]
\else
\titlecontents{subsection}
[\SUF@tocindent@subsec]
{}
{\hskip-\dimexpr(\SUF@label@subsec+1em)%
- \makebox[\SUF@label@subsec][l]{\SUF@SUBSEC@thecontentslabel}\hspace*{1em}%
+ \makebox[\SUF@label@subsec][l]{\SUF@SUBSEC@contentslabel}\hspace*{1em}%
\SUF@tocSUBSEC@font}
{\hskip-\dimexpr(\SUF@label@subsec+1em)%
\SUF@tocSUBSEC@font}
{\SUF@titlerule\contentspage}
\fi
-\ifsuftesi@toccompactsubsubsec
+\ifsuftesi@ctocsubsubsec
\titlecontents*{subsubsection}[\SUF@tocindent@subsec]{\SUF@ssscorrect}{%
- \SUF@SUBSUBSEC@thecontentslabel\adjtoclabelsep%
+ \SUF@SUBSUBSEC@contentslabel\adjtoclabelsep%
\SUF@tocSUBSUBSEC@font}{\SUF@tocSUBSUBSEC@font}{,
\thecontentspage.}[][\adjtocpagesep][]
\else
@@ -5752,15 +5008,15 @@ Janusz M.~Nowacki.
[\SUF@tocindent@subsubsec]
{}
{\hskip-\dimexpr(\SUF@label@subsubsec+1em)%
- \makebox[\SUF@label@subsubsec][l]{\SUF@SUBSUBSEC@thecontentslabel}\hspace*{1em}%
+ \makebox[\SUF@label@subsubsec][l]{\SUF@SUBSUBSEC@contentslabel}\hspace*{1em}%
\SUF@tocSUBSUBSEC@font}
{\hskip-\dimexpr(\SUF@label@subsubsec+1em)%
\SUF@tocSUBSUBSEC@font}
{\SUF@titlerule\contentspage}
\fi
-\ifsuftesi@toccompactpar
+\ifsuftesi@ctocpar
\titlecontents*{paragraph}[\SUF@tocindent@subsubsec]{\SUF@pcorrect}{%
- \SUF@PAR@thecontentslabel\adjtoclabelsep%
+ \SUF@PAR@contentslabel\adjtoclabelsep%
\SUF@tocPAR@font}{\SUF@tocPAR@font}{,
\thecontentspage.}[][\adjtocpagesep][]
\else
@@ -5774,9 +5030,9 @@ Janusz M.~Nowacki.
\SUF@tocPAR@font}
{\SUF@titlerule\contentspage}
\fi
-\ifsuftesi@toccompactsubpar
+\ifsuftesi@ctocsubpar
\titlecontents*{subparagraph}[\SUF@tocindent@par]{\SUF@pcorrect}{%
- \SUF@SUBPAR@thecontentslabel\adjtoclabelsep%
+ \SUF@SUBPAR@contentslabel\adjtoclabelsep%
\SUF@tocSUBPAR@font}{\SUF@tocSUBPAR@font}{,
\thecontentspage.}[][\adjtocpagesep][]
\else
@@ -5808,34 +5064,57 @@ Janusz M.~Nowacki.
% \end{macrocode}
% \subparagraph{partial ToC}
% \begin{macrocode}
-\titlecontents*{partialtocsection}[0cm]{}{%
- \@partialtocseclabel\adjtoclabelsep\@partialtocsecfont}
- {\@partialtocsecfont}{, \thecontentspage.}[][\adjtocpagesep][]
-\titlecontents*{partialtocsubsection}[0cm]{\hskip.5em}{%
- \@partialtocsubseclabel\adjtoclabelsep\@partialtocsubsecfont}
- {\@partialtocsubsecfont}{, \thecontentspage.}[][\adjtocpagesep][]
-\titlecontents*{partialtocsubsubsection}[0cm]{\hskip.5em}{%
- \@partialtocsubsubseclabel\adjtoclabelsep\@partialtocsubsubsecfont}
- {\@partialtocsubsubsecfont}{, \thecontentspage.}[][\adjtocpagesep][]
-\titlecontents*{partialtocparagraph}[0cm]{\hskip.5em}{%
- \@partialtocparlabelfont\adjtoclabelsep\@partialtocparfont}
- {\@partialtocparfont}{, \thecontentspage.}[][\adjtocpagesep][]
-\titlecontents*{partialtocsubparagraph}[0cm]{\hskip.5em}{%
- \@partialtocsubparlabelfont\adjtoclabelsep\@partialtocsubparfont}
- {\@partialtocsubparfont}{, \thecontentspage.}[][\adjtocpagesep][]
-\newcommand{\startpartialtoc}{%
- \ifsuftesi@partialtoc\startcontents\fi}
-\newcommand{\printpartialtoc}{%
- \ifsuftesi@partialtoc
- \setcounter{tocdepth}{5}
- \contentsmargin{0cm}
- \@partialtocsize
- \@partialtocbeforespace
- \@partialtocbeforecode\par
- \printcontents{partialtoc}{1}{}
- \par\@partialtocaftercode
- \@partialtocafterspace
- \fi}
+\ifSUF@partialtoc
+ \titlecontents*{partialtocsection}[0cm]{}{%
+ \@partialtocseclabel\adjtoclabelsep\@partialtocsecfont}
+ {\@partialtocsecfont}{, \thecontentspage.}[][\adjtocpagesep][]
+ \ifsuftesi@article
+ \titlecontents*{partialtocsubsection}[0cm]{}{%
+ \@partialtocsubseclabel\adjtoclabelsep\@partialtocsubsecfont}
+ {\@partialtocsubsecfont}{, \thecontentspage.}[][\adjtocpagesep][]
+ \else
+ \titlecontents*{partialtocsubsection}[0cm]{\hskip.5em}{%
+ \@partialtocsubseclabel\adjtoclabelsep\@partialtocsubsecfont}
+ {\@partialtocsubsecfont}{, \thecontentspage.}[][\adjtocpagesep][]
+ \fi
+ \titlecontents*{partialtocsubsubsection}[0cm]{\hskip.5em}{%
+ \@partialtocsubsubseclabel\adjtoclabelsep\@partialtocsubsubsecfont}
+ {\@partialtocsubsubsecfont}{, \thecontentspage.}[][\adjtocpagesep][]
+ \titlecontents*{partialtocparagraph}[0cm]{\hskip.5em}{%
+ \@partialtocparlabelfont\adjtoclabelsep\@partialtocparfont}
+ {\@partialtocparfont}{, \thecontentspage.}[][\adjtocpagesep][]
+ \titlecontents*{partialtocsubparagraph}[0cm]{\hskip.5em}{%
+ \@partialtocsubparlabelfont\adjtoclabelsep\@partialtocsubparfont}
+ {\@partialtocsubparfont}{, \thecontentspage.}[][\adjtocpagesep][]
+ \ifsuftesi@article
+ \let\startsecpartialtoc\startcontents
+ \let\startchappartialtoc\relax
+ \else
+ \let\startchappartialtoc\startcontents
+ \let\startsecpartialtoc\relax
+ \fi
+ \newcommand{\printpartialtoc}{%
+ \setcounter{tocdepth}{5}
+ \contentsmargin{0cm}
+ \@partialtocsize
+ \@partialtocbeforespace
+ \@partialtocbeforecode\par
+ \ifsuftesi@article
+ \printcontents{partialtoc}{2}{}
+ \else
+ \printcontents{partialtoc}{1}{}
+ \fi
+ \par\@partialtocaftercode
+ \@partialtocafterspace
+ }
+\else
+ \let\startchappartialtoc\relax
+ \let\startsecpartialtoc\relax
+ \def\printpartialtoc{%
+ \ClassWarningNoLine{suftesi}%
+ {To activate \string\printpartialtoc\MessageBreak
+ load the 'partialtoc' option}}
+\fi
% \end{macrocode}
% \subparagraph{The ToC, LoF and LoT in the \opt{article} structure}
% \begin{macrocode}
@@ -5947,27 +5226,10 @@ Janusz M.~Nowacki.
}
\fi
% \end{macrocode}
-% \subsection{Customizations}
-% \subsubsection{Sections font}
+% \subsubsection{Commands for sections font in ToC}
% \begin{macrocode}
\newcommand{\tocpartname}[1]{\def\SUF@tocpartname{#1}}
\tocpartname{\partname}
-\newcommand{\partfont}[1]{\def\SUF@PART@StyleSwitch{#1}}
-\newcommand{\chapfont}[1]{\def\SUF@CHAP@StyleSwitch{#1}}
-\newcommand{\secfont}[1]{\def\SUF@SEC@StyleSwitch{#1}}
-\newcommand{\subsecfont}[1]{\def\SUF@SUBSEC@StyleSwitch{#1}}
-\newcommand{\subsubsecfont}[1]{\def\SUF@SUBSUBSEC@StyleSwitch{#1}}
-\newcommand{\partnumfont}[1]{\def\SUF@PART@font{#1}}\partnumfont{}
-\newcommand{\chapnumfont}[1]{\def\SUF@thechapter{#1}}
-\newcommand{\secnumfont}[1]{\def\SUF@thesection{#1}}
-\newcommand{\subsecnumfont}[1]{\def\SUF@thesubsection{#1}}
-\newcommand{\subsubsecnumfont}[1]{\def\SUF@thesubsubsection{#1}}
-\newcommand{\titlefont}[1]{\def\SUF@Tfont@style{#1}\let\SUF@Tfont@shape\relax}
-\newcommand{\authorfont}[1]{\def\SUF@Afont@style{#1}\let\SUF@Afont@shape\relax}
-\newcommand{\datefont}[1]{\def\SUF@datefont{#1}}
-% \end{macrocode}
-% \subsubsection{Sections font in ToC}
-% \begin{macrocode}
\newcommand{\tocpartfont}[1]{\def\SUF@tocPART@font{#1}}
\newcommand{\tocchapfont}[1]{\def\SUF@tocCHAP@font{#1}}
\newcommand{\tocsecfont}[1]{\def\SUF@tocSEC@font{#1}}
@@ -5977,17 +5239,17 @@ Janusz M.~Nowacki.
\newcommand{\tocsubparfont}[1]{\def\SUF@tocSUBPAR@font{#1}}
\newcommand{\tocpartnumfont}[1]{\def\SUF@tocPARTnum@font{#1}}\tocpartnumfont{}
\newcommand{\tocchapnumfont}[1]{%
- \def\SUF@CHAP@thecontentslabel{\begingroup#1\thecontentslabel\endgroup}}
+ \def\SUF@CHAP@contentslabel{\begingroup#1\thecontentslabel\endgroup}}
\newcommand{\tocsecnumfont}[1]{%
- \def\SUF@SEC@thecontentslabel{\begingroup#1\thecontentslabel\endgroup}}
+ \def\SUF@SEC@contentslabel{\begingroup#1\thecontentslabel\endgroup}}
\newcommand{\tocsubsecnumfont}[1]{%
- \def\SUF@SUBSEC@thecontentslabel{\begingroup#1\thecontentslabel\endgroup}}
+ \def\SUF@SUBSEC@contentslabel{\begingroup#1\thecontentslabel\endgroup}}
\newcommand{\tocsubsubsecnumfont}[1]{%
- \def\SUF@SUBSUBSEC@thecontentslabel{\begingroup#1\thecontentslabel\endgroup}}
+ \def\SUF@SUBSUBSEC@contentslabel{\begingroup#1\thecontentslabel\endgroup}}
\newcommand{\tocparnumfont}[1]{%
- \def\SUF@PAR@thecontentslabel{\begingroup#1\thecontentslabel\endgroup}}
+ \def\SUF@PAR@contentslabel{\begingroup#1\thecontentslabel\endgroup}}
\newcommand{\tocsubparnumfont}[1]{%
- \def\SUF@SUBPAR@thecontentslabel{\begingroup#1\thecontentslabel\endgroup}}
+ \def\SUF@SUBPAR@contentslabel{\begingroup#1\thecontentslabel\endgroup}}
\tocparnumfont{}
\tocsubparnumfont{}
% \end{macrocode}
@@ -6006,15 +5268,15 @@ Janusz M.~Nowacki.
\newcommand{\partialtocsubparfont}[1]{%
\def\@partialtocsubparfont{#1}}
\newcommand{\partialtocseclabel}[1]{%
- \def\@partialtocseclabel{\begingroup#1\thecontentslabel\endgroup}}
+ \def\@partialtocseclabel{\begingroup#1\thecontentslabel~\endgroup}}
\newcommand{\partialtocsubseclabel}[1]{%
- \def\@partialtocsubseclabel{\begingroup#1\thecontentslabel\endgroup}}
+ \def\@partialtocsubseclabel{\begingroup#1\thecontentslabel~\endgroup}}
\newcommand{\partialtocsubsubseclabel}[1]{%
- \def\@partialtocsubsubseclabel{\begingroup#1\thecontentslabel\endgroup}}
+ \def\@partialtocsubsubseclabel{\begingroup#1\thecontentslabel~\endgroup}}
\newcommand{\partialtocparlabelfont}[1]{%
- \def\@partialtocparlabelfont{\begingroup#1\thecontentslabel\endgroup}}
+ \def\@partialtocparlabelfont{\begingroup#1\thecontentslabel~\endgroup}}
\newcommand{\partialtocsubparlabelfont}[1]{%
- \def\@partialtocsubparlabelfont{\begingroup#1\thecontentslabel\endgroup}}
+ \def\@partialtocsubparlabelfont{\begingroup#1\thecontentslabel~\endgroup}}
\newcommand{\partialtocbeforespace}[1]{%
\def\@partialtocbeforespace{\vspace*{#1}}}
\newcommand{\partialtocafterspace}[1]{%
@@ -6029,58 +5291,720 @@ Janusz M.~Nowacki.
\partialtocsubsubsecfont{}
\partialtocparfont{}
\partialtocsubparfont{}
-\partialtocseclabel{\itshape}
+\partialtocseclabel{}
\partialtocsubseclabel{}
\partialtocsubsubseclabel{}
\partialtocparlabelfont{}
\partialtocsubparlabelfont{}
-\partialtocbeforespace{18ex}
-\partialtocafterspace{-18ex}
+\partialtocbeforespace{0pt}
+\partialtocafterspace{0pt}
\partialtocbeforecode{}
\partialtocaftercode{}
% \end{macrocode}
-% \subsection{New commands}
-% A command to print an unnumbered introduction at the beginning of the chapter. The \cmd{chapterintroname} defaults to ``Introduzione'' because the class was initially designed primarily for Italian-speaking users.
+% \subsection{Headers and footers}
+% \begin{macrocode}
+\RequirePackage{fancyhdr}
+\newcommand{\versionstring}[1]{\def\version@string{#1}}
+ \versionstring{Version of}
+\ifSUF@draftdate
+ \def\SUF@versionof{\footnotesize\texttt{\version@string{} \today}}
+\else
+ \let\SUF@versionof\relax
+\fi
+\AtBeginDocument{%
+ \pagestyle{fancy}
+ \renewcommand{\headrulewidth}{0pt}
+ \renewcommand{\footnoterule}{}}
+% \end{macrocode}
+% \paragraph{The \opt{default} headers}
+% In previous versions \cmd{SUF@HEAD@thechapter} and
+% \cmd{SUF@HEAD@thesection} were preceded by \cmd{protect}.
+% This caused an error in the headers. Removing \cmd{protect}
+% may cause other bugs. To be tested.
+% \begin{macrocode}
+\renewcommand{\chaptermark}[1]{%
+ \markboth{\chaptertitlename\ \SUF@HEAD@thechapter}{#1}}
+ \ifsuftesi@article
+ \renewcommand{\sectionmark}[1]{\markright{\SUF@HEAD@thesection.\ #1}}
+ \else
+ \renewcommand{\sectionmark}[1]{}
+ \fi
+% \end{macrocode}
+% \paragraph{Page styles}
% \begin{macrocode}
+\fancypagestyle{plain}{\fancyhf{}\fancyfoot[RE,LO]{\SUF@versionof}}
+\fancypagestyle{empty}{\fancyhf{}\fancyfoot[RE,LO]{\SUF@versionof}}
+\fancypagestyle{sufplain}{%
+ \fancyhf{}%
+ \fancyfoot[RE,LO]{\SUF@versionof}
+ \fancyfoot[C]{\footnotesize\SUF@thepage}}
+\fancypagestyle{centerheader}{%
+ \fancyhf{}%
+ \fancyfoot[RE,LO]{\SUF@versionof}
+ \fancyhead[CO]{\footnotesize\breakinbodyfalse\SUF@rightmark}
+ \fancyhead[CE]{\footnotesize\breakinbodyfalse\SUF@mark}
+ \fancyfoot[C]{\footnotesize\SUF@thepage}}
+\fancypagestyle{sufdefault}{%
+ \fancyhf{}%
+ \fancyfoot[RE,LO]{\SUF@versionof}
+ \fancyhead[LE,RO]{\footnotesize\SUF@thepage}
+ \fancyhead[LO]{\footnotesize\breakinbodyfalse\SUF@rightmark}
+ \fancyhead[RE]{\footnotesize\breakinbodyfalse\SUF@mark}}
\ifsuftesi@article
-\def\chapterintro{%
-\ClassError{suftesi}
- {Command \noexpand\chapterintro is undefined\MessageBreak
- using 'structure=article'}
- {Command \noexpand\chapterintro is undefined\MessageBreak
- using 'structure=article'}}
+ \ifsuftesi@authortitle
+ \def\SUF@mark{\SUF@leftmark}
+ \else
+ \def\SUF@mark{\SUF@rightmark}
+ \fi
\else
-\def\chapterintro{\@ifstar{%
- \@tempswafalse\@chapterintro}{\@tempswatrue\@chapterintro}}
-\def\@chapterintro{\phantomsection
- \if@tempswa\section*{\SUF@fchapterintroname}\fi
- \addcontentsline{toc}{section}{\SUF@fchapterintroname}}
-\newcommand{\chapterintroname}[1]{\def\SUF@fchapterintroname{#1}}
-\chapterintroname{Introduzione}
+ \def\SUF@mark{\SUF@leftmark}
\fi
+\def\SUF@leftrightmark{%
+ \if@mainmatter\leftmark\else\rightmark\fi}
+\pagestyle{sufdefault}
+ \ifsuftesi@centerheader\pagestyle{centerheader}\else\fi
+ \ifsuftesi@sufplain\pagestyle{sufplain}\else\fi
% \end{macrocode}
-% Two commands for manual breaks active, respectively, only in the table of contents and in the body text. The solution was initially made available by Enrico Gregorio many years ago in one of the first versions of the class (at that time the commands were called \cmd{headbreak} and \cmd{xheadbreak}). Later, while I was working on version 3.0, I noticed an alignment problem in the chapter titles when using the \opt{chapstyle=left} option. So I added the \cmd{breakinbodyleft} command and updated the command names to make them more recognizable. Old names are in any case available for backwards compatibility.
+% \subsection{Notes and quotations}
+% \paragraph{Block Quotations}
+% New environments for block quotations according to a popular Italian style.
+% The font size is the same of the footnotes and the margins are set to \cmd{parindent}.
% \begin{macrocode}
-\newif\ifbreakintoc\breakintocfalse
-\newif\ifbreakinbody\breakinbodytrue
-\DeclareRobustCommand{\breakintoc}
- {\ifbreakintoc\\\else\fi}
-\DeclareRobustCommand{\breakinbody}
- {\ifbreakinbody\\\else\fi}
-\DeclareRobustCommand{\breakinbodyleft}
- {\ifbreakinbody\newline\else\fi}
-\let\origtableofcontents\tableofcontents
-\renewcommand{\tableofcontents}{%
- \begingroup\suftesi@partialtocfalse
- \breakintoctrue\breakinbodyfalse%
- \origtableofcontents
- \endgroup}
-\DeclareRobustCommand{\headbreak}
- {\ifbreakintoc\\\else\fi}
-\DeclareRobustCommand{\xheadbreak}
- {\ifbreakinbody\\\else\fi}
-\DeclareRobustCommand{\yheadbreak}
- {\ifbreakinbody\newline\else\fi}
+\renewenvironment{quotation}
+ {\list{}{\listparindent\parindent%
+ \itemindent \listparindent
+ \SUF@quote@style
+ \parsep \z@ \@plus\p@}%
+ \item\relax%
+ \SUF@quotation@size%
+ \noindent\ignorespaces}
+ {\endlist}
+\renewenvironment{quote}
+ {\list{}{%
+ \SUF@quote@style}%
+ \item\relax%
+ \SUF@quotation@size}% \ignorespaces?
+ {\endlist}
+\renewenvironment{verse}
+ {\let\\\@centercr
+ \list{}{\itemsep \z@
+ \itemindent -1.5em%
+ \listparindent\itemindent
+ \rightmargin \leftmargin
+ \advance\leftmargin 1.5em}%
+ \item\relax
+ \SUF@quotation@size}
+ {\endlist}
+% \end{macrocode}
+% \paragraph{The \opt{fewfootnotes} option}
+% Enable only with three footnotes per page maximum.
+% \begin{macrocode}
+\ifSUF@fewfootnotes
+\RequirePackage[perpage]{zref}
+ \zmakeperpage{footnote}
+\AtBeginDocument{%
+\def\@fnsymbol#1{%
+ \ifcase#1\or \TextOrMath\textasteriskcentered *\or
+ \TextOrMath {\textasteriskcentered\textasteriskcentered}{**}\or
+ \TextOrMath {\textasteriskcentered%
+ \textasteriskcentered\textasteriskcentered}{***}\or
+ \protect\ClassWarningNoLine{suftesi}%
+ {Too many footnotes per page. Compile again or\MessageBreak
+ remove the class option 'fewfootnote'}
+ \fi
+}%
+}
+\def\thefootnote{\@fnsymbol\c@footnote}%
+\fi
+% \end{macrocode}
+% \paragraph{The \cmd{xfootnote} command} Prints a footnote with discretionary
+% symbol give in the first argument.
+% \begin{macrocode}
+\newcommand*\xfootnote[1][*]{%
+ \xdef\@thefnmark{#1}%
+ \@footnotemark\@footnotetext}
+% \end{macrocode}
+% \paragraph{Marginal notes}
+% The |\marginpar| command is redefined according to the look
+% of \emph{Classic Thesis} by
+% André \textcite{Miede:2011}\index{Miede, André}.
+% \begin{macrocode}
+\let\oldmarginpar\marginpar
+\ifSUF@marginpar
+ \def\SUF@mpsetup{%
+ \itshape
+ \footnotesize%
+ \parindent=0pt \lineskip=0pt \lineskiplimit=0pt%
+ \tolerance=2000 \hyphenpenalty=300 \exhyphenpenalty=300%
+ \doublehyphendemerits=100000%
+ \finalhyphendemerits=\doublehyphendemerits}
+ \renewcommand{\marginpar}[1]{\oldmarginpar%
+ [\SUF@mpsetup\raggedleft\hspace{0pt}{#1}]%
+ {\SUF@mpsetup\raggedright\hspace{0pt}{#1}}}
+\else
+ \renewcommand\marginpar[2][]{}
+\fi
+% \end{macrocode}
+% Redefine an internal command of the \sty{todonotes} package in
+% order to use the class-specific marginal notes when this
+% package is loaded. This redefinition simply substitute
+% \cmd{oldmarginpar} to \cmd{marginpar}:
+% \begin{macrocode}
+\AtBeginDocument{%
+\@ifpackageloaded{todonotes}{%
+ \renewcommand{\@todonotes@drawMarginNoteWithLine}{%
+ \begin{tikzpicture}[remember picture, overlay, baseline=-0.75ex]%
+ \node [coordinate] (inText) {};%
+ \end{tikzpicture}%
+ \oldmarginpar[{% Draw note in left margin
+ \@todonotes@drawMarginNote%
+ \@todonotes@drawLineToLeftMargin%
+ }]{% Draw note in right margin
+ \@todonotes@drawMarginNote%
+ \@todonotes@drawLineToRightMargin%
+ }
+ }
+ }
+{\relax}}
+% \end{macrocode}
+% \subsection{The \opt{collection} structure}
+% \begin{macrocode}
+\ifsuftesi@collection
+\newcounter{journalnumber}
+\newcounter{journalvolume}
+\newcounter{issue}
+\newcounter{title}
+\setcounter{title}{1}
+\newcounter{article}
+\setcounter{article}{0}
+\setcounter{journalnumber}{0}
+\setcounter{tocdepth}{0}
+\def\journalname#1{\gdef\@journalname{#1}}
+ \def\@journalname{\@latex@warning@no@line{%
+ No \noexpand\journalname given}}
+\def\journalvolume#1{\gdef\@journalvolume{#1}}
+ \def\@journalvolume{\@latex@warning@no@line{%
+ No \noexpand\journalvolume given}}
+\def\journalnumber#1{\gdef\@journalnumber{#1}}
+ \def\@journalnumber{\@latex@warning@no@line{%
+ No \noexpand\journalnumber given}}
+\def\issue#1{\gdef\@issue{#1}}
+ \def\@issue{\@latex@warning@no@line{%
+ No \noexpand\issue given}}
+\def\journalyear#1{\gdef\@journalyear{#1}}
+ \def\@journalyear{\@latex@warning@no@line{%
+ No \noexpand\journalyear given}}
+\def\journalwebsite#1{\gdef\@journalwebsite{\url{#1}}}
+ \def\@journalwebsite{\@latex@warning@no@line{%
+ No \noexpand\journalwebsite given}}
+\def\thanks#1{\footnotemark\ \protected@xdef\@thanks{%
+ \@thanks\protect\footnotetext[\the\c@footnote]{#1}}}
+\def\fulljournal{\emph{\@journalname} \@journalnumber, %
+ \@issue{} \@journalyear}
+\def\issuename#1{\gdef\@issuename{#1}}
+\def\collectiontitle#1{\gdef\@collectiontitle{#1}}
+ \def\@collectiontitle{\@latex@warning@no@line{%
+ No \noexpand\collectiontitle given}}
+\def\collectioneditor#1{\gdef\@collectioneditor{#1}}
+ \def\@collectioneditor{\@latex@warning@no@line{%
+ No \noexpand\collectioneditor given}}
+\renewcommand*{\title}[2][]{%
+ \gdef\@headtitle{#1}\gdef\@title{#2}\markright{#1}}
+ \edef\title{\noexpand\@dblarg
+ \expandafter\noexpand\csname\string\title\endcsname}
+ \def\@headtitle{--missing title--%
+ \protect\ClassWarningNoLine{suftesi}{%
+ No \string\title\space given \MessageBreak%
+ See the class documentation for explanation}}
+ \def\@title{--missing title--%
+ \protect\ClassWarningNoLine{suftesi}{%
+ No \string\title\space given\MessageBreak%
+ See the class documentation for explanation}}
+ \def\@author{--missing author--%
+ \protect\ClassWarningNoLine{suftesi}{%
+ No \string\author\space given\MessageBreak%
+ See the class documentation for explanation}}
+\newcommand*\l@title[2]{%
+ \ifnum \c@tocdepth >\m@ne
+ \addpenalty{-\@highpenalty}%
+ \vskip 1.0ex \@plus\p@
+ \begingroup
+ \parindent \z@ \rightskip \@pnumwidth
+ \parfillskip -\@pnumwidth
+ \advance\leftskip1em
+ \hskip -\leftskip
+ #1\nobreak%
+ \ifsuftesi@dottedtoc\dotfill%
+ \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
+ \else
+ \ifsuftesi@raggedtoc%
+ \nobreak\hskip1em #2 \hfill\null\par
+ \else
+ \ifsuftesi@pagelefttoc
+ \ClassError{suftesi}
+ {\MessageBreak
+ You can not use tocstyle=leftpage\MessageBreak
+ with structure=collection}
+ {You can not use tocstyle=leftpage\MessageBreak
+ with structure=collection}
+ \else
+ \nobreak\hfill #2\par
+ \fi
+ \fi
+ \fi
+ \penalty\@highpenalty
+ \endgroup
+ \fi}
+\renewcommand\maketitle{\par
+ \begingroup
+ \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
+ \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
+ \long\def\@makefntext##1{\parindent 1em\noindent
+ \hb@xt@1.8em{%
+ \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
+ \if@twocolumn
+ \ifnum \col@number=\@ne
+ \@maketitle
+ \else
+ \twocolumn[\@maketitle]%
+ \fi
+ \else
+ \newpage
+ \global\@topnum\z@ % Prevents figures from going at top of page.
+ \@maketitle
+ \fi
+ \thispagestyle{plain}\@thanks%
+ \endgroup
+ \setcounter{section}{0}%
+% \setcounter{footnote}{0}%
+% \global\let\thanks\relax
+% \global\let\maketitle\relax
+% \global\let\@maketitle\relax
+% \global\let\@thanks\@empty
+% \global\let\@author\@empty
+% \global\let\@date\@empty
+% \global\let\@title\@empty
+% \global\let\title\relax
+% \global\let\author\relax
+% \global\let\date\relax
+ \global\let\and\relax
+ \let\thanks\@gobble}
+\AtBeginDocument{\def\@maketitle{%
+ \refstepcounter{article}
+ \SUF@chaptersize
+ \SUF@authortitle@align
+ \let\footnote\thanks
+ \parindent=0pt
+ {\SUF@second}%
+ \label{begin:\thearticle}
+% \end{macrocode}
+% Check if you don't use \sty{hyperrref} provided by Enrico Gregorio
+% (\url{https://tex.stackexchange.com/a/427203/231952}):
+% \begin{macrocode}
+ \@ifundefined{Hy@raisedlink}{\let\texorpdfstring\@firstoftwo}{%
+ \xdef\@currentHref{title.\thearticle}%
+ \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
+ }%
+% \end{macrocode}
+% \begin{macrocode}
+ \csname toc@entry@\endcsname
+ \begingroup%
+ \let\thanks\@gobble
+ \addcontentsline{toc}{title}{%
+ {\SUF@tocAUT@font{\@author}}\texorpdfstring{\newline}{, }%
+ {\SUF@tocTIT@font{\@headtitle}}}
+ \endgroup%
+ \par\nobreak\vspace{2ex}
+ {\SUF@first%
+ \vskip1.5cm}}%
+ }
+% \newenvironment{article}
+% {\begingroup
+% \global\let\@thanks\@empty
+% \setcounter{footnote}{0}
+% \refstepcounter{article}
+% \label{begin:\thearticle}
+%}
+% {\label{end:\thearticle}\endgroup
+% }
+\newenvironment{article}
+ {\begingroup
+ \setcounter{section}{0}
+ \setcounter{footnote}{0}
+ \setcounter{figure}{0}
+ \setcounter{table}{0}}
+ {\label{end:\thearticle}
+ \cleardoublepage
+ \global\let\@thanks\@empty
+ \endgroup}
+\newcommand{\collectiontitlepage}{%
+ \thispagestyle{empty}%
+ \begingroup
+ \centering
+ \vspace*{\stretch{1}}
+
+ {\SUF@chaptersize\@collectiontitle\par}
+ \vskip5ex
+
+ \@collectioneditor
+ \vspace*{\stretch{3}}
+
+ \endgroup
+ \clearpage}
+\def\frontispiece{\collectiontitlepage}
+% \end{macrocode}
+% In the collection document structure the articles are treated as
+% chapters but you would not need to print in
+% the table of contents all the sections of every article. So first of
+% all we include in the table of contents only the author and the
+% title of each paper. Anyway the sections inside each paper are
+% numbered as in standard articles:
+% \begin{macrocode}
+ \setcounter{tocdepth}{0}
+ \renewcommand\thesection{%
+ \@arabic\c@section}
+ \renewcommand\thesubsection{%
+ \thesection.\@arabic\c@subsection}
+ \renewcommand\thesubsubsection{%
+ \thesubsection.\@arabic\c@subsubsection}
+ \renewcommand\theparagraph{%
+ \thesubsubsection.\@arabic\c@paragraph}
+ \renewcommand\thesubparagraph{%
+ \theparagraph.\@arabic\c@subparagraph}
+ \else
+\fi
+% \end{macrocode}
+% \subsection{Title page}
+% The new \cmd{title} command has an optional argument
+% which can be used in the headers.
+% \begin{macrocode}
+\def\isbn#1{\gdef\@isbn{#1}}
+\def\@issn{\@latex@warning@no@line{%
+ No \noexpand\isbn given}}
+\def\doi#1{\gdef\@doi{#1}}
+\def\@doi{\@latex@warning@no@line{%
+ No \noexpand\doi given}}
+\def\isbn#1{\gdef\@issn{#1}}
+\def\@issn{\@latex@warning@no@line{%
+ No \noexpand\isbn given}}
+\renewcommand*{\title}[2][]{\gdef\@headtitle{#1}\gdef\@title{#2}}
+\edef\title{\noexpand\@dblarg
+ \expandafter\noexpand\csname\string\title\endcsname}
+\def\@headtitle{--missing title--%
+ \protect\ClassWarningNoLine{suftesi}{%
+ No \string\title\space given \MessageBreak%
+ See the class documentation for explanation}}
+\def\@title{--missing title--%
+ \protect\ClassWarningNoLine{suftesi}{%
+ No \string\title\space given\MessageBreak%
+ See the class documentation for explanation}}
+\def\@author{--missing author--%
+ \protect\ClassWarningNoLine{suftesi}{%
+ No \string\author\space given\MessageBreak%
+ See the class documentation for explanation}}
+\ifSUF@titlepage
+ \renewcommand\maketitle{%
+ \begin{titlepage}
+ \let\footnotesize\small
+ \let\footnoterule\relax
+ \let \footnote \thanks
+ \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
+ \null\vfil
+ \vskip 60\p@
+ \begin{center}%
+ {\SUF@first\par}%
+ \vskip 3em%
+ {\lineskip .75em%
+ \begin{tabular}[t]{c}%
+ \SUF@second
+ \end{tabular}\par}%
+ \vskip 1.5em%
+ {\SUF@datefont\@date\par}%
+ \end{center}\par
+ \@thanks
+ \vfil\null
+ \end{titlepage}%
+ \setcounter{footnote}{0}%
+ \global\let\thanks\relax
+ \global\let\maketitle\relax
+ \global\let\@thanks\@empty
+ \global\let\@date\@empty
+ \global\let\date\relax
+ \global\let\and\relax}
+\else
+\renewcommand\maketitle{\par
+ \begingroup
+ \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
+ \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
+ \long\def\@makefntext##1{\parindent 1em\noindent
+ \hb@xt@1.8em{%
+ \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
+ \if@twocolumn
+ \ifnum \col@number=\@ne
+ \@maketitle
+ \else
+ \twocolumn[\@maketitle]%
+ \fi
+ \else
+ \newpage
+ \global\@topnum\z@% Prevents figures from going at top of page.
+ \@maketitle
+ \fi
+ \thispagestyle{plain}\@thanks
+ \endgroup
+ \setcounter{footnote}{0}%
+ \global\let\thanks\relax
+ \global\let\maketitle\relax
+ \global\let\@maketitle\relax
+ \global\let\@thanks\@empty
+ \global\let\@date\@empty
+ \global\let\date\relax
+ \global\let\and\relax}
+\def\@maketitle{%
+ \newpage
+ \null
+ \vskip 2em%
+ \begin{center}%
+ \let \footnote \thanks
+ {\SUF@first\par}%
+ \vskip 1.5em%
+ {\lineskip .5em%
+ \begin{tabular}[t]{c}%
+ \SUF@second\par
+ \end{tabular}\par}%
+ \vskip 1em%
+ {\SUF@datefont\@date\par}%
+ \end{center}%
+ \par
+ \vskip 1.5em}
+\fi
+% \end{macrocode}
+% \subsection{Cover page}
+% \begin{macrocode}
+\newcommand{\Ctitle}[1]{\def\@Ctitle{#1}}
+\newcommand{\Csubtitle}[1]{\def\@Csubtitle{#1}}
+\newcommand{\Cauthor}[1]{\def\@Cauthor{#1}}
+\newcommand{\Ceditor}[1]{\def\@Ceditor{#1}}
+\newcommand{\Cfoot}[1]{\def\@Cfoot{#1}}
+\newcommand{\Cpagecolor}[1]{\def\@Cpagecolor{#1}}
+\newcommand{\Ccirclecolor}[1]{\def\@Ccirclecolor{#1}}
+\newcommand{\Ctextcolor}[1]{\def\@Ctextcolor{#1}}
+\newcommand{\Cfootcolor}[1]{\def\@Cfootcolor{#1}}
+\Cauthor{}
+\Ctitle{}
+\Csubtitle{}
+\Ceditor{}
+\Cfoot{}
+\Cpagecolor{gray!30}
+\Ctextcolor{white}
+\Cfootcolor{black}
+\AtBeginDocument{
+\@ifpackageloaded{tikz}{%
+\newcommand\makecover[1][]{%
+\begin{titlepage}
+\begin{tikzpicture}[overlay,remember picture]
+ \draw[draw=none,fill=\@Cpagecolor]
+ (current page.north west) rectangle (current page.south east);
+ \node[anchor=center,yshift=.22\paperwidth] at (current page.center) (c) {};
+ \draw[draw=none,fill=gray,#1]
+ (c) circle (.38\paperwidth) ;
+ \node[anchor=center] at (c) (author) {%
+\parbox{.7\paperwidth}{%
+ \centering
+ \ifx\@Cauthor\@empty
+ \else
+ {\scshape\color{\@Ctextcolor}\@Cauthor\\}
+ \vspace*{\baselineskip}
+ \fi
+
+ \ifx\@Ctitle\@empty
+ \else
+ {\Huge\bfseries\color{\@Ctextcolor}\@Ctitle\\[1ex]}
+ \fi
+
+ \ifx\@Csubtitle\@empty
+ \else
+ {\smallskip\Large\color{\@Ctextcolor}\@Csubtitle\\}
+ \fi
+
+ \ifx\@Ceditor\@empty
+ \else
+ {\vspace*{2\baselineskip}\color{\@Ctextcolor}\@Ceditor\\}
+ \fi}
+};
+\ifx\@Cfoot\@empty\else
+ \node[xshift=.5\paperwidth,yshift=1cm,
+ align=center,text=\@Cfootcolor,anchor=south]
+ at (current page.south west) {\@Cfoot};
+\fi
+\end{tikzpicture}
+\end{titlepage}
+}
+}
+{\def\makecover{\ClassError{suftesi}{\MessageBreak%
+ ***********************************\MessageBreak
+ * To use the \noexpand\makecover command\MessageBreak
+ * load the 'tikz' package.\MessageBreak
+ ************************************}{\MessageBreak%
+ ***********************************\MessageBreak
+ * To use the \noexpand\makecover command\MessageBreak
+ * load the 'tikz' package.\MessageBreak
+ ************************************}}}
+}
+% \end{macrocode}
+% \subsection{Frontispiece}
+% \begin{macrocode}
+\AtBeginDocument{%
+\@ifpackagewith{frontespizio}{suftesi}{%
+\ifsuftesi@periodical
+ \Margini {5.5cm}{7cm}{4.5cm}{0cm}
+ \else
+\ifsuftesi@periodicalaureo
+ \Margini {5.5cm}{7cm}{4.5cm}{0cm}
+ \else
+\ifsuftesi@compact
+ \Margini {4.5cm}{7cm}{4.5cm}{0cm}
+ \else
+\ifsuftesi@compactaureo
+ \Margini {4.5cm}{7cm}{4.5cm}{0cm}
+ \else
+\ifsuftesi@supercompact
+ \Margini {4.5cm}{10cm}{6cm}{1cm}
+ \else
+\ifsuftesi@supercompactaureo
+ \Margini {4.5cm}{10cm}{6cm}{1cm}
+ \else
+\ifsuftesi@pocketa
+ \Margini {4.5cm}{10cm}{6cm}{1cm}
+ \else
+\ifsuftesi@pocketb
+ \Margini {4.5cm}{10cm}{6cm}{1cm}
+ \else
+\ifsuftesi@pocketc
+ \Margini {4.5cm}{10cm}{6cm}{1cm}
+ \else
+\fi\fi\fi\fi\fi\fi\fi\fi\fi}
+{\@ifpackageloaded{frontespizio}{%
+\ifsuftesi@periodical
+ \Margini {1cm}{7cm}{5cm}{1cm}
+ \Rientro{1cm}
+ \else
+\ifsuftesi@periodicalaureo
+ \Margini {1cm}{7cm}{5cm}{1cm}
+ \Rientro{1cm}
+ \else
+\ifsuftesi@compact
+ \Margini {1cm}{7cm}{6cm}{1cm}
+ \Rientro{1cm}
+ \else
+\ifsuftesi@compactaureo
+ \Margini {1cm}{7cm}{6cm}{1cm}
+ \Rientro{1cm}
+ \else
+\ifsuftesi@supercompact
+ \Margini {1cm}{10cm}{8cm}{1cm}
+ \Rientro{1cm}
+ \else
+\ifsuftesi@supercompactaureo
+ \Margini {1cm}{10cm}{8cm}{1cm}
+ \Rientro{1cm}
+ \else
+\ifsuftesi@pocketa
+ \Margini {1cm}{10cm}{8cm}{1cm}
+ \Rientro{1cm}
+ \else
+\ifsuftesi@pocketb
+ \Margini {1cm}{10cm}{8cm}{1cm}
+ \Rientro{1cm}
+ \else
+\ifsuftesi@pocketc
+ \Margini {1cm}{10cm}{8cm}{1cm}
+ \Rientro{1cm}
+ \else
+\fi\fi\fi\fi\fi\fi\fi\fi\fi}
+{\relax}}}
+% \end{macrocode}
+% \paragraph{Colophon or copyright notice}
+% \begin{macrocode}
+\newcommand{\colophon}[3][]{%
+ \thispagestyle{empty}
+ \null
+ \vfill
+ \def\next{#2}
+ \ifx\next\@empty\else
+ \noindent Copyright \copyright{} \the\year~#2\\[1ex]
+ Tutti i diritti riservati
+ \fi
+ \vfill
+ {\small\noindent Questo lavoro \`e stato composto con \LaTeX{}%
+ \def\next{#1}
+ \ifx\next\@empty\else su #1
+ \fi usando la classe \textsf{suftesi} di
+ Ivan Valbusa\index{Valbusa, Ivan}. #3\par}
+ \cleardoublepage}
+\newcommand{\bookcolophon}[2]{%
+ \thispagestyle{empty}
+ \null
+ \vfill
+ \noindent #1
+ \vfill
+ {\small\noindent #2\par}
+ \cleardoublepage}
+\newcommand{\artcolophon}[1]{%
+\thispagestyle{empty}
+ \null
+ \vfill
+ {\small\noindent #1\par}}
+\newcommand{\finalcolophon}[1]{%
+\thispagestyle{empty}
+ \null\vspace*{\stretch{1}}
+ \begin{center}
+ \begin{minipage}{.5\textwidth}
+ \centering\small #1
+ \end{minipage}
+ \end{center}
+ \vspace*{\stretch{6}}}
+% \end{macrocode}
+% \paragraph{The \cmd{FSPL} colophon}
+% This command is defined only for the \opt{style=FSPL*} options.
+% \begin{macrocode}
+\ifsuftesi@FSPL
+\newcommand{\FSPLcolophon}[1][\the\year]{%
+\begingroup
+\thispagestyle{empty}
+\null\vspace{\stretch{1}}
+\noindent \hskip-.5em\cc #1 \@author%
+\vskip1ex
+
+\small\noindent This work is licensed under the Creative Commons
+Attribution-NonCommercial-NoDerivs 3.0 Unported License.
+To view a copy of this license,
+visit http://creativecom mons.org/licenses/by-nc-nd/3.0/.
+
+\endgroup
+
+\begingroup
+\footnotesize
+
+\null\vspace{\stretch{1}}
+
+\noindent Typeset with \LaTeX{} in collaboration with the Joint Project
+\emph{Formal Style for PhD Theses with \LaTeX} (University of Verona,
+Italy) using the \textsf{suftesi} class by Ivan Valbusa. The text face
+is Palatino, designed by Hermann Zapf. The sans serif font is Iwona by
+Janusz M.~Nowacki.
+
+\endgroup
+
+\clearpage}
+\else
+\def\FSPLcolophon{%
+ \ClassError{suftesi}
+ {\noexpand\FSPLcolophon is defined\MessageBreak
+ only for the FSPL styles}
+ {\noexpand\FSPLcolophon is defined\MessageBreak
+ only for the FSPL styles}}
+\fi
% \end{macrocode}
% \subsection{Backward compatibility}
% Two environments to manually typeset the bibliography and the list of shorthands.
@@ -6114,6 +6038,27 @@ Janusz M.~Nowacki.
\let\makelabel\itlabel}}
{\endlist}
% \end{macrocode}
+% A command to print an unnumbered introduction at the beginning of the chapter.
+% The \cmd{chapterintroname} defaults to ``Introduzione'' because the class was
+% initially designed primarily for Italian-speaking users.
+% \begin{macrocode}
+\ifsuftesi@article
+\def\chapterintro{%
+\ClassError{suftesi}
+ {Command \noexpand\chapterintro is undefined\MessageBreak
+ using 'structure=article'}
+ {Command \noexpand\chapterintro is undefined\MessageBreak
+ using 'structure=article'}}
+\else
+\def\chapterintro{\@ifstar{%
+ \@tempswafalse\@chapterintro}{\@tempswatrue\@chapterintro}}
+\def\@chapterintro{\phantomsection
+ \if@tempswa\section*{\SUF@fchapterintroname}\fi
+ \addcontentsline{toc}{section}{\SUF@fchapterintroname}}
+\newcommand{\chapterintroname}[1]{\def\SUF@fchapterintroname{#1}}
+\chapterintroname{Introduzione}
+\fi
+% \end{macrocode}
% \subsection{Final settings}
% \begin{macrocode}
\ifsuftesi@article
@@ -6160,8 +6105,6 @@ Janusz M.~Nowacki.
% \begin{macrocode}
\unless\ifPDFTeX% if xetex or luatex
\let\@afterindenttrue\@afterindentfalse
- \else
- \relax
\fi
% \end{macrocode}
% Now we switch off extra space after punctuation, in accordance with the habits
@@ -6244,48 +6187,12 @@ Janusz M.~Nowacki.
und der Typographie},
Year = {1975}}
-@online{Lehman:2010,
- Author = {Philipp Lehman},
- Note = {Versione 0.9a},
- Title = {The \textsf{biblatex} package},
- Url = {http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/biblatex.pdf},
- Year = {2010}}
-
@online{Miede:2011,
Author = {André Miede},
Title = {A Classic Thesis style},
Url = {http://mirrors.ctan.org/macros/latex/contrib/classicthesis/ClassicThesis.pdf},
Date = {2011}}
-@book{Pantieri:2011,
- Author = {Lorenzo Pantieri and Tommaso Gordini},
- Booktitle = {L'arte di scrivere con \LaTeX},
- Date = {2012},
- Edition = {new edition},
- Foreword = {Enrico Gregorio},
- Hyphenation = {italian},
- Subtitle = {Un'introduzione a \LaTeXe},
- Title = {L'arte di scrivere con \LaTeX},
- Url = {http://www.lorenzopantieri.net/LaTeX_files/ArteLaTeX.pdf},
- Annote = {Questa guida è diventata il punto di riferimento degli utenti
- italiani di \LaTeX\ ed è apprezzata per la chiarezza espositiva e la
- completezza dei contenuti}}
-
-@article{Pantieri:2009,
- Author = {Lorenzo Pantieri},
- Title = {L'arte di gestire la bibliografia con \pack{biblatex}},
- Url = {http://www.lorenzopantieri.net/LaTeX_files/Bibliografia.pdf},
- Year = {2009}}
-
-@article{Mori:2008,
- Author = {Lapo F. Mori},
- Journal = {ArsTeXnica},
- Month = {10},
- Pages = {37-51},
- Title = {Gestire la bibliografia con {\LaTeX}},
- Volume = {6},
- Year = {2008}}
-
@article{valbusa:20122,
Author = {Ivan Valbusa},
Date = {2012},
@@ -6361,7 +6268,7 @@ Janusz M.~Nowacki.
author = {Pignalberi, Gianluca},
url = {http://www.ctan.org/pkg/cclicenses},
urldate = {2020-05-24},
- date = {2005/05/20},
+ date = {2005-05-20},
version = {v0.4}
}
@@ -6371,7 +6278,7 @@ Janusz M.~Nowacki.
author = {Sharpe, Michael},
url = {http://www.ctan.org/pkg/cochineal},
urldate = {2020-05-24},
- date = {2016-2020},
+ date = {2020},
version = {1.061}
}
@@ -6401,7 +6308,7 @@ Janusz M.~Nowacki.
author = {Wette, Karl},
url = {http://www.ctan.org/pkg/emptypage},
urldate = {2020-05-24},
- date = {2009-2010},
+ date = {2010},
version = {1.2}
}
@@ -6501,7 +6408,7 @@ Janusz M.~Nowacki.
author = {B. Jackowski and J.M. Nowacki},
url = {http://www.ctan.org/pkg/lmodern},
urldate = {2020-05-24},
- date = {2003-2009},
+ date = {2009},
version = {2.004}
}
@@ -6636,15 +6543,24 @@ Janusz M.~Nowacki.
version = {v2.3}
}
-@manual{afterpage,
- title = {The \textsf{afterpage} package},
- subtitle = { Execute command after the next page break},
- author = {David Carlisle},
- url = {http://www.ctan.org/pkg/bookcover},
- urldate = {2020-06-29},
- date = {2014-10-28},
- version = {v1.08}
+@manual{zref,
+ title = {The \sty{zref} package},
+ author = {Heiko Oberdiek},
+ url = {http://www.ctan.org/pkg/zref},
+ urldate = {2021-05-23},
+ date = {2020-07-03},
+ version = {v2.32}
}
+
+@manual{epigraph,
+ title = {The \sty{epigraph} package},
+ author = {Peter R. Wilson and Will Robertson},
+ url = {http://www.ctan.org/pkg/epigraph},
+ urldate = {2021-05-23},
+ date = {2020-01-02},
+ version = {v1.5e}
+}
+
%</bib>
% \fi
% \Finale
diff --git a/macros/latex/contrib/suftesi/suftesi.pdf b/macros/latex/contrib/suftesi/suftesi.pdf
index e68f47ca08..2e8c75f472 100644
--- a/macros/latex/contrib/suftesi/suftesi.pdf
+++ b/macros/latex/contrib/suftesi/suftesi.pdf
Binary files differ