summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-07-16 03:01:07 +0000
committerNorbert Preining <norbert@preining.info>2021-07-16 03:01:07 +0000
commit01b14a20f8942ab0c52aeb8abffa85b811c7a95a (patch)
tree2db57d63324f0141577f40d9e8a8a035b131e176 /macros
parent55ae461252a599d6bc951065a37c16a8971fc560 (diff)
CTAN sync 202107160301
Diffstat (limited to 'macros')
-rw-r--r--macros/generic/expkv/README.md2
-rw-r--r--macros/generic/expkv/expkv.dtx169
-rw-r--r--macros/generic/expkv/expkv.pdfbin480586 -> 487605 bytes
-rw-r--r--macros/generic/texdimens/README.md177
-rw-r--r--macros/generic/texdimens/texdimens.sty2
-rw-r--r--macros/generic/texdimens/texdimens.tex238
-rw-r--r--macros/latex/contrib/colorist/colorart.cls5
-rw-r--r--macros/latex/contrib/colorist/colorbook.cls5
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.pdfbin82412 -> 93730 bytes
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.tex500
-rw-r--r--macros/latex/contrib/colorist/colorist.sty67
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx287
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin571934 -> 583966 bytes
-rw-r--r--macros/latex/contrib/huawei/huawei.cls3
-rw-r--r--macros/latex/contrib/huawei/huawei.pdfbin336670 -> 336192 bytes
-rw-r--r--macros/latex/contrib/huawei/huawei.tex14
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix-french.pdfbin463618 -> 463891 bytes
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix-french.tex86
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix.dtx345
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix.pdfbin1331253 -> 1339461 bytes
-rw-r--r--macros/latex/contrib/stackengine/stackengine.pdfbin349239 -> 385976 bytes
-rw-r--r--macros/latex/contrib/stackengine/stackengine.sty61
-rw-r--r--macros/latex/contrib/stackengine/stackengine.tex66
-rw-r--r--macros/latex/contrib/to-be-determined/DEPENDS.txt3
-rw-r--r--macros/latex/contrib/to-be-determined/README.md28
-rw-r--r--macros/latex/contrib/to-be-determined/to-be-determined.pdfbin0 -> 183512 bytes
-rw-r--r--macros/latex/contrib/to-be-determined/to-be-determined.sty47
-rw-r--r--macros/latex/contrib/to-be-determined/to-be-determined.tex73
-rw-r--r--macros/latex/contrib/tudscr/README.md11
-rw-r--r--macros/latex/contrib/tudscr/doc/LICENSE.md31
-rw-r--r--macros/latex/contrib/tudscr/doc/tudscr.pdfbin1149095 -> 1149093 bytes
-rw-r--r--macros/latex/contrib/tudscr/doc/tudscr_print.pdfbin1133762 -> 1133767 bytes
-rw-r--r--macros/latex/contrib/tudscr/doc/tudscrsource.pdfbin1074794 -> 1063109 bytes
-rw-r--r--macros/latex/contrib/tudscr/doc/tutorials/mathswap.pdfbin128941 -> 128951 bytes
-rw-r--r--macros/latex/contrib/tudscr/doc/tutorials/mathtype.pdfbin148136 -> 148136 bytes
-rw-r--r--macros/latex/contrib/tudscr/doc/tutorials/treatise.pdfbin896761 -> 896765 bytes
-rw-r--r--macros/latex/contrib/tudscr/source/doc/tudscr.tex26
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr-area.dtx23
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr-base.dtx23
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr-color.dtx23
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr-comp.dtx29
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr-doc.dtx23
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr-fields.dtx23
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr-fonts.dtx499
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr-frontmatter.dtx23
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr-layout.dtx23
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr-localization.dtx23
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr-manual.dtx23
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr-mathswap.dtx23
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr-misc.dtx21
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr-pagestyle.dtx21
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr-supervisor.dtx23
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr-texindy.dtx23
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr-title.dtx23
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr-twocolfix.dtx23
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr-version.dtx23
-rw-r--r--macros/latex/contrib/tudscr/source/tudscr.ins39
-rw-r--r--macros/luatex/latex/pyluatex/README.md4
-rw-r--r--macros/luatex/latex/pyluatex/pyluatex.lua32
-rw-r--r--macros/luatex/latex/pyluatex/pyluatex.pdfbin64343 -> 65417 bytes
-rw-r--r--macros/luatex/latex/pyluatex/pyluatex.sty5
-rw-r--r--macros/luatex/latex/pyluatex/pyluatex.tex11
-rw-r--r--macros/texinfo/latest/htmlxref.cnf651
-rw-r--r--macros/texinfo/latest/texi2pdf34
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.pdfbin308402 -> 321204 bytes
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.tex418
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-en.pdfbin193478 -> 195727 bytes
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-en.tex434
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.pdfbin0 -> 199632 bytes
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.tex523
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre.cls18
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdfbin285244 -> 292008 bytes
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex434
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-en.pdfbin171730 -> 159263 bytes
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-en.tex448
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdfbin0 -> 165305 bytes
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex616
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart.cls18
78 files changed, 4460 insertions, 2386 deletions
diff --git a/macros/generic/expkv/README.md b/macros/generic/expkv/README.md
index a402daa774..8c241c4217 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-06-03 v1.8a
+Version 2021-07-15 v1.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/expkv.dtx b/macros/generic/expkv/expkv.dtx
index 283cd0353d..da6fcf2542 100644
--- a/macros/generic/expkv/expkv.dtx
+++ b/macros/generic/expkv/expkv.dtx
@@ -421,7 +421,7 @@ and the derived files expkv.pdf
% \end{function}
% \example Define |text| in |foo| to store the value inside |\foo@text|:
% \begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
-% \protected\long\ekvdef{foo}{text}{\def\foo@width{#1}}
+% \protected\long\ekvdef{foo}{text}{\def\foo@text{#1}}
% \end{lstlisting}
%
% \begin{function}{\ekvdefNoVal}
@@ -440,7 +440,8 @@ and the derived files expkv.pdf
% \cs{ekvlet}\marg{set}\marg{key}\meta{cs}
% \end{syntax}
% Let the value taking \key\ in \set\ to \meta{cs}, there are no checks on
-% \meta{cs} enforced.
+% \meta{cs} enforced, but the code should expect the value as a single braced
+% argument directly following it.
% \end{function}
% \example Let |cmd| in |foo| do the same as |\foo@cmd|:
% \begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
@@ -811,7 +812,8 @@ and the derived files expkv.pdf
% 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).
+% the mandatory argument will be wrapped in braces after being read once -- if
+% it was already wrapped it is effectively unchanged).
% \end{function}
% |\ekvoptarg| expands in exactly two steps, grabs all the arguments only at the
% second expansion step, and is alignment safe. It has its limitations however.
@@ -845,6 +847,43 @@ and the derived files expkv.pdf
% \newcommand\foo@b[1]{Mandatory: #1\par No optional.}
% \end{lstlisting}
%
+% \begin{function}{\ekvcsvloop}
+% \begin{syntax}
+% \cs{ekvcsvloop}\marg{code}\marg{csv-list}
+% \end{syntax}
+% This loops over the comma separated items in \meta{csv-list} and, after
+% stripping spaces from either end of \meta{item} and removing at most one set
+% of outer braces, leaves
+% \texttt
+% {^^A
+% \cs[no-index]{unexpanded}\hskip0pt
+% \{\hskip0pt
+% \meta{code}\hskip0pt
+% \marg{item}\hskip0pt
+% \}^^A
+% }
+% for each list item in the input stream. Blank elements are ignored (if you
+% need a blank element it should be given as |{}|). It supports both active
+% commas and commas of category other. You could consider it as a watered down
+% version of |\ekvparse|. However it is not alignment safe, which you could
+% achieve by nesting it in |\expanded| (since the braces around the argument
+% of |\expanded| will hide |&|s from \TeX's alignment parsing).
+% \end{function}
+% \example The following splits a comma separated list and prints it in a
+% typewriter font with parentheses around each element.\\
+% \begin{minipage}{.75\linewidth}
+% \begin{lstlisting}
+% \newcommand*\myprocessor[1]{\texttt{(#1)}}
+% \ekvcsvloop\myprocessor{abc,def,ghi}\par
+% \ekvcsvloop\myprocessor{1,,2,,3,,4}\par
+% \end{lstlisting}
+% \end{minipage}^^A
+% \begin{exresult}[nobeforeafter,box align=center]{.25\linewidth}
+% \newcommand*\myprocessor[1]{\texttt{(#1)}}
+% \ekvcsvloop\myprocessor{abc,def,ghi}\par
+% \ekvcsvloop\myprocessor{1,,2,,3,,4}\par
+% \end{exresult}
+%
% \begin{function}{\ekverr}
% \begin{syntax}
% \cs{ekverr}\marg{package}\marg{message}
@@ -1554,8 +1593,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.8a}
-\def\ekvDate{2021-06-03}
+\def\ekvVersion{1.9}
+\def\ekvDate{2021-07-15}
% \end{macrocode}
% \end{macro}
%
@@ -1762,35 +1801,73 @@ and the derived files expkv.pdf
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\ekv@csv@loop,\ekv@csv@loop@do,\ekv@csv@loop@end}
-% This is just a very simple loop over a list of comma separated values,
-% leaving each element as the argument to a specified function inside of
-% |\unravel|. It should be used as
-% \texttt
-% {^^A
-% \cs[no-index]{ekv@csv@loop}\hskip0pt^^A
-% \marg{function}\hskip0pt^^A
-% \cs[no-index]{ekv@mark}\hskip0pt^^A
-% \meta{csv-list}\hskip0pt^^A
-% ,\cs[no-index]{ekv@stop},^^A
-% }.
-% We use some |\expandafter| chain to preexpand |\ekv@strip| here.
-% \begin{macrocode}
-\ekv@exparg{\long\def\ekv@csv@loop#1#2,}%
+% \begin{macro}{\ekvcsvloop}
+% \begin{macro}[internal]{\ekv@csv@loop@active,\ekv@csv@loop@active@end}
+% An |\ekvcsvloop| will just loop over a csv list in a simple manner. First we
+% split at active commas (gives better performance this way), next we have to
+% check whether we're at the end of the list (checking for |\ekv@stop|). If
+% not we go on splitting at commas of category other.
+% \begin{macrocode}
+\begingroup
+\def\ekvcsvloop#1{%
+\endgroup
+\long\def\ekvcsvloop##1##2%
+ {\ekv@csv@loop@active{##1}\ekv@mark##2#1\ekv@stop#1}
+% \end{macrocode}
+% This does the same as |\ekv@csv@loop| but for active commas.
+% \begin{macrocode}
+\long\def\ekv@csv@loop@active##1##2#1%
{%
- \expandafter
- \ekv@gobble@from@mark@to@stop
- \expandafter#\expandafter2\expandafter\ekv@csv@loop@end\expandafter
+ \ekv@gobble@from@mark@to@stop##2\ekv@csv@loop@active@end\ekv@stop
+ \ekv@csv@loop{##1}##2,\ekv@stop,%
+ }%
+\long\def\ekv@csv@loop@active@end
\ekv@stop
- \ekv@strip{#2}{\ekv@csv@loop@do{#1}}%
- \ekv@csv@loop{#1}\ekv@mark
+ \ekv@csv@loop##1\ekv@mark\ekv@stop,\ekv@stop,%
+ {}%
+}
+% \end{macrocode}
+% Do the definitions with the weird catcode.
+% \begin{macrocode}
+\catcode`\,=13
+\ekvcsvloop,
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[internal]{\ekv@csv@loop,\ekv@csv@loop@do,\ekv@csv@loop@end}
+% We use temporary macros and an |\expandafter| chain to preexpand
+% |\ekv@strip| here. After splitting at other commas we check again for end
+% the end of the sublist, check for blank elements which should be ignored,
+% and else strip spaces and execute the user code (protecting it from further
+% expanding with |\unexpanded|).
+% \begin{macrocode}
+\def\ekv@csv@loop#1%
+ {%
+ \long\def\ekv@csv@loop##1##2,%
+ {%
+ \ekv@gobble@from@mark@to@stop##2\ekv@csv@loop@end\ekv@stop
+ \ekv@ifblank@##2\ekv@nil\ekv@ifempty@B\ekv@csv@loop@blank
+ \ekv@ifempty@A\ekv@ifempty@B
+ #1\ekv@csv@loop@do{##1}%
+ }%
}
-\long\def\ekv@csv@loop@do#1#2{\unexpanded{#1{#2}}}
-\long\expandafter\def\expandafter\ekv@csv@loop@end
- \expandafter\ekv@stop
- \ekv@strip{#1}#2%
- \ekv@csv@loop#3\ekv@mark
- {}
+\expandafter\ekv@csv@loop\expandafter{\ekv@strip{#2}}
+\long\def\ekv@csv@loop@do#1#2{\unexpanded{#2{#1}}\ekv@csv@loop{#2}\ekv@mark}
+\def\ekv@csv@loop@end#1%
+ {%
+ \long\def\ekv@csv@loop@end
+ \ekv@stop
+ \ekv@ifblank@\ekv@mark\ekv@stop\ekv@nil\ekv@ifempty@B\ekv@csv@loop@blank
+ \ekv@ifempty@A\ekv@ifempty@B
+ #1\ekv@csv@loop@do##1%
+ {\ekv@csv@loop@active{##1}\ekv@mark}%
+ }
+\expandafter\ekv@csv@loop@end\expandafter{\ekv@strip{\ekv@mark\ekv@stop}}
+\long\expandafter\def\expandafter\ekv@csv@loop@blank
+ \expandafter\ekv@ifempty@A\expandafter\ekv@ifempty@B
+ \ekv@strip{\ekv@mark#1}\ekv@csv@loop@do#2%
+ {\ekv@csv@loop{#2}\ekv@mark}
% \end{macrocode}
% \end{macro}
%
@@ -1969,9 +2046,9 @@ and the derived files expkv.pdf
\begingroup
\edef\ekv@tmp
{%
- \ekv@csv@loop#1\ekv@mark#6,\ekv@stop,%
+ \ekvcsvloop#1{#6}%
\unexpanded{#2}%
- {\ekv@csv@loop{}\ekv@mark#5,#6,\ekv@stop,}%
+ {\ekvcsvloop{}{#5,#6}}%
}%
\ekv@expargtwice
{\endgroup#3{#5}}%
@@ -2690,7 +2767,10 @@ and the derived files expkv.pdf
% 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|).
+% |#1|) and |\ekv@endalignsafe| (will be |#2|). As |\ekv@alignsafe| starts with
+% a |\romannumeral| we use that to also control the number of steps needed
+% instead of adding another |\romannumeral|. For this we have to remove the
+% space token from the end of |\ekv@alignsafe|'s definition.
% \begin{macrocode}
\begingroup
\def\ekvoptarg#1#2{%
@@ -2702,24 +2782,24 @@ and the derived files expkv.pdf
% bracket, if it is found grab the optional argument, else leave |#1{#2}| in the
% input stream after ending the expansion context.
% \begin{macrocode}
-\def\ekvoptarg{\romannumeral#1\ekv@optarg@a}
+\def\ekvoptarg{#1\ekv@optarg@a}
\long\def\ekv@optarg@a##1##2##3%
{%
\ekv@optarg@if\ekv@mark##3\ekv@mark\ekv@optarg@b\ekv@mark[\ekv@mark
#2%
- \@firstofone{\ekv@zero##1}{##2}{##3}%
+ \@firstofone{ ##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}
-\def\ekvoptargTF{\romannumeral#1\ekv@optargTF@a}
+\def\ekvoptargTF{#1\ekv@optargTF@a}
\long\def\ekv@optargTF@a##1##2##3%
{%
\ekv@optarg@if\ekv@mark##3\ekv@mark\ekv@optargTF@b{##1}\ekv@mark[\ekv@mark
#2%
- \@firstofone{\ekv@zero##2}{##3}%
+ \@firstofone{ ##2}{##3}%
}
% \end{macrocode}
% The two macros to grab the optional argument have to remove the remainder of
@@ -2729,12 +2809,19 @@ and the derived files expkv.pdf
{#2##2{##5}}
\long\def\ekv@optargTF@b
##1\ekv@mark[\ekv@mark\ifnum`##2\fi\@firstofone##3##4##5]%
- {#2\ekv@zero##1{##5}}
+ {#2 ##1{##5}}
}
% \end{macrocode}
-% Do the definitions and add the test macro.
+% Do the definitions and add the test macro. We use |\ekv@strip| to remove the
+% trailing space from the definition of |\ekv@alignsafe|.
% \begin{macrocode}
-\ekv@exparg{\expandafter\ekvoptarg\expandafter{\ekv@alignsafe}}\ekv@endalignsafe
+\ekv@exparg
+ {%
+ \expandafter\ekv@strip\expandafter
+ {\expandafter\ekv@mark\ekv@alignsafe}%
+ \ekvoptarg
+ }%
+ \ekv@endalignsafe
\long\def\ekv@optarg@if#1\ekv@mark[\ekv@mark{}
% \end{macrocode}
% \end{macro}
diff --git a/macros/generic/expkv/expkv.pdf b/macros/generic/expkv/expkv.pdf
index c72c22153a..59012eccd1 100644
--- a/macros/generic/expkv/expkv.pdf
+++ b/macros/generic/expkv/expkv.pdf
Binary files differ
diff --git a/macros/generic/texdimens/README.md b/macros/generic/texdimens/README.md
index 401dea828f..4f028fe689 100644
--- a/macros/generic/texdimens/README.md
+++ b/macros/generic/texdimens/README.md
@@ -10,6 +10,8 @@ LPPL 1.3c. See file LICENSE.md.
Development: https://github.com/jfbu/texdimens
+Release: `0.9delta 2021/07/15`
+
## Aim of this package
Utilities and documentation related to TeX dimensional units, usable
@@ -170,33 +172,32 @@ the `pt`.
## Macros of this package
-All macros are expandable. At time of writing they may not be
-f-expandable, but (perhaps) in future final versions will expand fully
-in two steps. This refinement is anyhow not really important as TeX
-engines now support the `\expanded` primitive.
-
-Negative dimensions behave as if replaced by their absolute value, then
-at last step the sign (if result is not zero) is applied.
+The macros defined by the package are expandable, and will expand
+completely in an `\edef`, or in a `\dimexpr...\relax` construc.
+As they parse their inputs via `\dimexpr` they can be nested (with
+suitable postfix dimension unit added to inner macro).
-1. For input `X` equal to (or sufficiently close to)
-`\maxdimen` and those units `uu` for which `\maxdimen` is not exactly
-representable (i.e. all units except `pt`, `bp` and `nd`), the output `D`
-of the "up" macros `\texdimin<uu>up{X}`, if used as `Duu` in a dimension
-assignment or expression, will (naturally) trigger a "Dimension too large"
-error.
+Apart for the `\texdimin<uu>up` in case of a negative input, they will
+even expand completely under f-expansion.
+Negative dimensions behave as if replaced by their absolute value, then
+at last step the sign (if result is not zero) is applied (so "down" means
+"towards zero", and "up" means "away from zero").
+
+1. For input `X` equal to (or sufficiently close to) `\maxdimen` and
+ those units `uu` for which `\maxdimen` is not exactly representable
+ (i.e. all units except `pt`, `bp` and `nd`), the output `D` of the
+ "up" macros `\texdimin<uu>up{X}`, if used as `Duu` in a dimension
+ assignment or expression, will (naturally) trigger a "Dimension too
+ large" error.
2. For `dd`, `nc` and `in`, and input `X` equal to (or sufficiently
-close to) `\maxdimen` it turns out that `\texdimin<uu>{X}` produces an
-output `D` such that `Duu` is the first "virtually attainable" TeX
-dimension *beyond* `\maxdimen`. Hence `Duu` will trigger on use
-"Dimension too large error".
-
-3. For some units the "down" and "up" macros may trigger
-"Dimension too large" during their execution if used with an input too
-close to `\maxdimen`. "Safe" variants which are guaranteed never to
-trigger this error but have some extra overhead to filter out inputs too
-close to `\maxdimen` will *perhaps* be provided. But
-see 1. and 2. regarding the usability of the output anyhow.
+ close to) `\maxdimen` it turns out that `\texdimin<uu>{X}` produces
+ an output `D` such that `Duu` is the first "virtually attainable" TeX
+ dimension *beyond* `\maxdimen`. Hence `Duu` will trigger on use
+ "Dimension too large error".
+3. Again for the `dd`, `nc` and `in` units, both the "down" and "up" macros
+ will trigger "Dimension too large" during their execution if used
+ with an input equal to (or sufficiently close to `\maxdimen`.
`\texdiminpt{<dim. expr.>}`
@@ -204,8 +205,8 @@ see 1. and 2. regarding the usability of the output anyhow.
`\texdiminbp{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> bp` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D bp`
+> represents the dimension exactly if possible. If not possible it
> will differ by `1sp` from the original dimension, but it is not
> known in advance if it will be above or below.
@@ -213,20 +214,20 @@ see 1. and 2. regarding the usability of the output anyhow.
`\texdiminbpdown{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> bp` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D bp`
+> represents the dimension exactly if possible. If not possible it
> will be smaller by `1sp` from the original dimension.
`\texdiminbpup{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> bp` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D bp`
+> represents the dimension exactly if possible. If not possible it
> will be larger by `1sp` from the original dimension.
-`\texdiminndown{<dim. expr.>}`
+`\texdiminnd{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> nd` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D nd`
+> represents the dimension exactly if possible. If not possible it
> will differ by `1sp` from the original dimension, but it is not
> known in advance if it will be above or below.
@@ -234,20 +235,20 @@ see 1. and 2. regarding the usability of the output anyhow.
`\texdiminnddown{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> nd` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D nd`
+> represents the dimension exactly if possible. If not possible it
> will be smaller by `1sp` from the original dimension.
`\texdiminndup{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> nd` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D nd`
+> represents the dimension exactly if possible. If not possible it
> will be larger by `1sp` from the original dimension.
-`\texdiminddown{<dim. expr.>}`
+`\texdimindd{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> dd` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D dd`
+> represents the dimension exactly if possible. If not possible it
> will differ by `1sp` from the original dimension, but it is not
> known in advance if it will be above or below.
@@ -257,20 +258,20 @@ see 1. and 2. regarding the usability of the output anyhow.
`\texdimindddown{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> dd` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D dd`
+> represents the dimension exactly if possible. If not possible it
> will be smaller by `1sp` from the original dimension.
`\texdiminddup{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> dd` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D dd`
+> represents the dimension exactly if possible. If not possible it
> will be larger by `1sp` from the original dimension.
`\texdiminmm{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> mm` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D mm`
+> represents the dimension exactly if possible. If not possible it
> will either be the closest from below or from above, but it is not
> known in advance which one (and it is not known if the other choice
> would have been closer).
@@ -280,20 +281,20 @@ see 1. and 2. regarding the usability of the output anyhow.
`\texdiminmmdown{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> mm` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D mm`
+> represents the dimension exactly if possible. If not possible it
> will be largest representable dimension smaller than the original one.
`\texdiminmmup{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> mm` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D mm`
+> represents the dimension exactly if possible. If not possible it
> will be smallest representable dimension larger than the original one.
`\texdiminpc{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> pc` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D pc`
+> represents the dimension exactly if possible. If not possible it
> will be the closest representable one (in case of tie, the approximant
> from above is chosen).
@@ -302,20 +303,20 @@ see 1. and 2. regarding the usability of the output anyhow.
`\texdiminpcdown{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> pc` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D pc`
+> represents the dimension exactly if possible. If not possible it
> will be largest representable dimension smaller than the original one.
`\texdiminpcup{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> pc` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D pc`
+> represents the dimension exactly if possible. If not possible it
> will be smallest representable dimension larger than the original one.
`\texdiminnc{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> nc` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D nc`
+> represents the dimension exactly if possible. If not possible it
> will either be the closest from below or from above, but it is not
> known in advance which one (and it is not known if the other choice
> would have been closer).
@@ -326,20 +327,20 @@ see 1. and 2. regarding the usability of the output anyhow.
`\texdiminncdown{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> nc` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D nc`
+> represents the dimension exactly if possible. If not possible it
> will be largest representable dimension smaller than the original one.
`\texdiminncup{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> nc` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D nc`
+> represents the dimension exactly if possible. If not possible it
> will be smallest representable dimension larger than the original one.
`\texdimincc{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> cc` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D cc`
+> represents the dimension exactly if possible. If not possible it
> will either be the closest from below or from above, but it is not
> known in advance which one (and it is not known if the other choice
> would have been closer).
@@ -349,20 +350,20 @@ see 1. and 2. regarding the usability of the output anyhow.
`\texdiminccdown{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> cc` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D cc`
+> represents the dimension exactly if possible. If not possible it
> will be largest representable dimension smaller than the original one.
`\texdiminccup{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> cc` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D cc`
+> represents the dimension exactly if possible. If not possible it
> will be smallest representable dimension larger than the original one.
`\texdimincm{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> cm` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D cm`
+> represents the dimension exactly if possible. If not possible it
> will either be the closest from below or from above, but it is not
> known in advance which one (and it is not known if the other choice
> would have been closer).
@@ -372,20 +373,20 @@ see 1. and 2. regarding the usability of the output anyhow.
`\texdimincmdown{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> cm` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D cm`
+> represents the dimension exactly if possible. If not possible it
> will be largest representable dimension smaller than the original one.
`\texdimincmup{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> cm` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D cm`
+> represents the dimension exactly if possible. If not possible it
> will be smallest representable dimension larger than the original one.
`\texdiminin{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> in` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D in`
+> represents the dimension exactly if possible. If not possible it
> will either be the closest from below or from above, but it is not
> known in advance which one (and it is not known if the other choice
> would have been closer).
@@ -396,21 +397,31 @@ see 1. and 2. regarding the usability of the output anyhow.
`\texdiminindown{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> in` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D in`
+> represents the dimension exactly if possible. If not possible it
> will be largest representable dimension smaller than the original one.
`\texdimininup{<dim. expr.>}`
-> Produces a decimal (with up to five decimal places) `D` such that `D
-> in` represents the dimension exactly if possible. If not possible it
+> Produces a decimal (with up to five decimal places) `D` such that `D in`
+> represents the dimension exactly if possible. If not possible it
> will be smallest representable dimension larger than the original one.
-## TODO
+## Extras?
+
+As already stated the "up" and also the "down" macros for the `dd`, `nc`
+and `in` units will trigger "Dimension too large" if used with inputs
+equal to or very near `\maxdimen`. "Safe" variants which are guaranteed
+never to trigger this error but have some extra overhead to filter out
+inputs very close to `\maxdimen` will *perhaps* be provided if there is
+some demand for it.
-Currently (most) macros require exhaustive expansion.
+But of course anyhow the output from the "up" macros if used
+as input with the corresponding unit will be beyond `\maxdimen` if the
+latter is not atteignable, i.e. for all units except `bp`, and `nd`
+(and `pt` but there is no "up" macro for it).
-Provide a macro `\texdimnearest{in,cm}{<dim.expr.>}` which would output
+Provide a macro `\texdimforbothincm{<dim.expr.>}` which would output
the nearest dimension simultaneously representable both in `in` and in
`cm`?
diff --git a/macros/generic/texdimens/texdimens.sty b/macros/generic/texdimens/texdimens.sty
index 9aa422cb55..dbf39c72f8 100644
--- a/macros/generic/texdimens/texdimens.sty
+++ b/macros/generic/texdimens/texdimens.sty
@@ -1,5 +1,5 @@
% This is file texdimens.tex, part of texdimens package, which
% is distributed under the LPPL 1.3c. Copyright (c) 2021 Jean-François Burnol
-\ProvidesPackage{texdimens}[2021/07/14 v0.9gamma conversion of TeX dimensions to decimals (JFB)]
+\ProvidesPackage{texdimens}[2021/07/15 v0.9delta conversion of TeX dimensions to decimals (JFB)]
\@@input texdimens.tex\relax
\endinput \ No newline at end of file
diff --git a/macros/generic/texdimens/texdimens.tex b/macros/generic/texdimens/texdimens.tex
index 7068d57db9..189caca95d 100644
--- a/macros/generic/texdimens/texdimens.tex
+++ b/macros/generic/texdimens/texdimens.tex
@@ -1,9 +1,13 @@
% This is file texdimens.tex, part of texdimens package, which
% is distributed under the LPPL 1.3c. Copyright (c) 2021 Jean-François Burnol
-% 2021/07/14 v0.9gamma
+% 2021/07/15 v0.9delta
\edef\texdimensendinput{\endlinechar\the\endlinechar\catcode`\noexpand _=\the\catcode`\_\relax\noexpand\endinput}%
\endlinechar13\relax%
\catcode`\_=11
+%
+% Mathematics
+% ===========
+%
% Is T sp attainable from unit "uu"?. Here we suppose T>0.
% phi>1, psi=1/phi, psi<1
% U(N,phi)=trunc(N phi) is strictly increasing
@@ -119,211 +123,135 @@
% applies, i.e. the units uu > 2pt (phi>2, psi<1/2), i.e.
% all units except bp, nd and dd.
%
-\def\texdimfirstofone#1{#1}%
+% Implementation
+% ==============
+%
+\def\texdimenfirstofone#1{#1}%
+{\catcode`p 12\catcode`t 12
+ \csname expandafter\endcsname\gdef\csname texdimenstrippt\endcsname#1pt{#1}}%
+%
+% down macros:
+% for units with phi < 2:
+\def\texdimendown_A#1{\if-#1\texdimendown_neg\fi\texdimendown_B#1}%
+\def\texdimendown_B#1;#2;{\expandafter\texdimendown_c\the\numexpr(2*#1+1)#2;#1;}%
+% for units with phi > 2:
+\def\texdimendown_a#1{\if-#1\texdimendown_neg\fi\texdimendown_b#1}%
+\def\texdimendown_b#1;#2;{\expandafter\texdimendown_c\the\numexpr#1#2;#1;}%
+% shared macros:
+\def\texdimendown_c#1;{\expandafter\texdimendown_d\the\dimexpr#1sp;#1;}%
+{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdimendown_d#1PT};#2;#3;#4;%
+ {\ifdim#1#4>#3sp \texdimendown_e{#2}\fi\texdimenfirstofone{#1}}%
+}%
% this #2 will be \fi
-\def\texdiminuudown_e#1#2#3#4{#2\expandafter\texdiminpt_\the\dimexpr\numexpr(#1-1)sp\relax}%
-\def\texdiminuuup_e#1#2#3#4{#2\expandafter\texdiminpt_\the\dimexpr\numexpr(#1+1)sp\relax}%
-% this #1 will be \fi
-\def\texdiminuuup_neg#1#2-{#1-#2}%
+\def\texdimendown_e#1#2#3#4{#2\expandafter\texdimenstrippt\the\dimexpr\numexpr#1-1sp\relax}%
+% negative branch:
+% The problem here is that if input very small, output can be 0.0, and we
+% do not want -0.0 as output.
+% So let's do this somewhat brutally and non-efficiently.
+% Anyhow, negative inputs are not our priority.
+% #1 is \fi here and #2 is \texdimendown_b or _B:
+\def\texdimendown_neg#1#2-#3;#4;#5;{#1\expandafter\texdimenstrippt\the\dimexpr-#2#3;#4;#5;pt\relax}%
+%
+% up macros:
+\def\texdimenup_A#1{\if-#1\texdimenup_neg\fi\texdimenup_B#1}%
+\def\texdimenup_B#1;#2;{\expandafter\texdimenup_c\the\numexpr(2*#1+1)#2;#1;}%
+\def\texdimenup_a#1{\if-#1\texdimenup_neg\fi\texdimenup_b#1}%
+\def\texdimenup_b#1;#2;{\expandafter\texdimenup_c\the\numexpr#1#2;#1;}%
+\def\texdimenup_c#1;{\expandafter\texdimenup_d\the\dimexpr#1sp;#1;}%
+{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdimenup_d#1PT};#2;#3;#4;%
+ {\ifdim#1#4<#3sp \texdimenup_e{#2}\fi\texdimenfirstofone{#1}}%
+}%
+% this #2 will be \fi
+\def\texdimenup_e#1#2#3#4{#2\expandafter\texdimenstrippt\the\dimexpr\numexpr#1+1sp\relax}%
+% negative branch:
+% Here we can me more expeditive than for the "down" macros.
+% But this breaks f-expandability.
+% #1 will be \fi and #2 is \texdimenup_b or _B:
+\def\texdimenup_neg#1#2-{#1-#2}%
%
% pt
%
-\def\texdiminpt#1{\expandafter\texdiminpt_\the\dimexpr#1\relax}%
-{\catcode`p 12\catcode`t 12\csname expandafter\endcsname\gdef\csname texdiminpt_\endcsname#1pt{#1}}%
+\def\texdiminpt#1{\expandafter\texdimenstrippt\the\dimexpr#1\relax}%
%
% bp 7227/7200 = 803/800
%
\def\texdiminbp#1{\expandafter\texdiminbp_\the\numexpr\dimexpr#1;}%
-\def\texdiminbp_#1#2;{\texdiminpt{\numexpr(2*#1#2+\if-#1-\fi1)*400/803sp}}%
-% \texdiminbpdown: maximal dim exactly expressible in bp and at most equal to input
-\def\texdiminbpdown#1{\expandafter\texdiminbpdown_a\the\numexpr\dimexpr#1;}%
-\def\texdiminbpdown_a#1{\if-#1\texdiminbpdown_neg\fi\texdiminbpdown_b#1}%
-\def\texdiminbpdown_b#1;{\expandafter\texdiminbpdown_c\the\numexpr(2*#1+1)*400/803;#1;}%
-\def\texdiminbpdown_c#1;{\expandafter\texdiminbpdown_d\the\dimexpr#1sp;#1;}%
-{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdiminbpdown_d#1PT};#2;#3;%
- {\ifdim#1bp>#3sp \texdiminuudown_e{#2}\fi\texdimfirstofone{#1}}%
+\def\texdiminbp_#1#2;{%
+ \expandafter\texdimenstrippt\the\dimexpr\numexpr(2*#1#2+\if-#1-\fi1)*400/803sp\relax
}%
-% The problem here is that if close to 0sp, output can be 0.0, and we do not want
-% -0.0 as output. So let's do this somewhat brutally. Anyhow, negative inputs are
-% not our priority. #1 is \fi here:
-\def\texdiminbpdown_neg#1#2-#3;{#1\expandafter\texdiminpt_\the\dimexpr-\texdiminbpdown_b#3;pt\relax}%
+% \texdiminbpdown: maximal dim exactly expressible in bp and at most equal to input
+\def\texdiminbpdown#1{\expandafter\texdimendown_A\the\numexpr\dimexpr#1;*400/803;bp;}%
% \texdiminbpup: minimal dim exactly expressible in bp and at least equal to input
-\def\texdiminbpup#1{\expandafter\texdiminbpup_a\the\numexpr\dimexpr#1;}%
-\def\texdiminbpup_a#1{\if-#1\texdiminuuup_neg\fi\texdiminbpup_b#1}%
-\def\texdiminbpup_b#1;{\expandafter\texdiminbpup_c\the\numexpr(2*#1+1)*400/803;#1;}%
-\def\texdiminbpup_c#1;{\expandafter\texdiminbpup_d\the\dimexpr#1sp;#1;}%
-{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdiminbpup_d#1PT};#2;#3;%
- {\ifdim#1bp<#3sp \texdiminuuup_e{#2}\fi\texdimfirstofone{#1}}%
-}%
+\def\texdiminbpup#1{\expandafter\texdimenup_A\the\numexpr\dimexpr#1;*400/803;bp;}%
%
% nd 685/642
%
\def\texdiminnd#1{\expandafter\texdiminnd_\the\numexpr\dimexpr#1;}%
-\def\texdiminnd_#1#2;{\texdiminpt{\numexpr(2*#1#2+\if-#1-\fi1)*321/685sp}}%
-% \texdiminnddown: maximal dim exactly expressible in nd and at most equal to input
-\def\texdiminnddown#1{\expandafter\texdiminnddown_a\the\numexpr\dimexpr#1;}%
-\def\texdiminnddown_a#1{\if-#1\texdiminnddown_neg\fi\texdiminnddown_b#1}%
-\def\texdiminnddown_b#1;{\expandafter\texdiminnddown_c\the\numexpr(2*#1+1)*321/685;#1;}%
-\def\texdiminnddown_c#1;{\expandafter\texdiminnddown_d\the\dimexpr#1sp;#1;}%
-{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdiminnddown_d#1PT};#2;#3;%
- {\ifdim#1nd>#3sp \texdiminuudown_e{#2}\fi\texdimfirstofone{#1}}%
+\def\texdiminnd_#1#2;{%
+ \expandafter\texdimenstrippt\the\dimexpr\numexpr(2*#1#2+\if-#1-\fi1)*321/685sp\relax
}%
-\def\texdiminnddown_neg#1#2-#3;{#1\expandafter\texdiminpt_\the\dimexpr-\texdiminnddown_b#3;pt\relax}%
+% \texdiminnddown: maximal dim exactly expressible in nd and at most equal to input
+\def\texdiminnddown#1{\expandafter\texdimendown_A\the\numexpr\dimexpr#1;*321/685;nd;}%
% \texdiminndup: minimal dim exactly expressible in nd and at least equal to input
-\def\texdiminndup#1{\expandafter\texdiminndup_a\the\numexpr\dimexpr#1;}%
-\def\texdiminndup_a#1{\if-#1\texdiminuuup_neg\fi\texdiminndup_b#1}%
-\def\texdiminndup_b#1;{\expandafter\texdiminndup_c\the\numexpr(2*#1+1)*321/685;#1;}%
-\def\texdiminndup_c#1;{\expandafter\texdiminndup_d\the\dimexpr#1sp;#1;}%
-{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdiminndup_d#1PT};#2;#3;%
- {\ifdim#1nd<#3sp \texdiminuuup_e{#2}\fi\texdimfirstofone{#1}}%
-}%
+\def\texdiminndup#1{\expandafter\texdimenup_A\the\numexpr\dimexpr#1;*321/685;nd;}%
%
% dd 1238/1157
%
\def\texdimindd#1{\expandafter\texdimindd_\the\numexpr\dimexpr#1;}%
-\def\texdimindd_#1#2;{\texdiminpt{\numexpr(2*#1#2+\if-#1-\fi1)*1157/2476sp}}%
-% \texdimindddown: maximal dim exactly expressible in dd and at most equal to input
-\def\texdimindddown#1{\expandafter\texdimindddown_a\the\numexpr\dimexpr#1;}%
-\def\texdimindddown_a#1{\if-#1\texdimindddown_neg\fi\texdimindddown_b#1}%
-\def\texdimindddown_b#1;{\expandafter\texdimindddown_c\the\numexpr(2*#1+1)*1157/2476;#1;}%
-\def\texdimindddown_c#1;{\expandafter\texdimindddown_d\the\dimexpr#1sp;#1;}%
-{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdimindddown_d#1PT};#2;#3;%
- {\ifdim#1dd>#3sp \texdiminuudown_e{#2}\fi\texdimfirstofone{#1}}%
+\def\texdimindd_#1#2;{%
+ \expandafter\texdimenstrippt\the\dimexpr\numexpr(2*#1#2+\if-#1-\fi1)*1157/2476sp\relax
}%
-\def\texdimindddown_neg#1#2-#3;{#1\expandafter\texdiminpt_\the\dimexpr-\texdimindddown_b#3;pt\relax}%
+% \texdimindddown: maximal dim exactly expressible in dd and at most equal to input
+\def\texdimindddown#1{\expandafter\texdimendown_A\the\numexpr\dimexpr#1;*1157/2476;dd;}%
% \texdiminddup: minimal dim exactly expressible in dd and at least equal to input
-\def\texdiminddup#1{\expandafter\texdiminddup_a\the\numexpr\dimexpr#1;}%
-\def\texdiminddup_a#1{\if-#1\texdiminuuup_neg\fi\texdiminddup_b#1}%
-\def\texdiminddup_b#1;{\expandafter\texdiminddup_c\the\numexpr(2*#1+1)*1157/2476;#1;}%
-\def\texdiminddup_c#1;{\expandafter\texdiminddup_d\the\dimexpr#1sp;#1;}%
-{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdiminddup_d#1PT};#2;#3;%
- {\ifdim#1dd<#3sp \texdiminuuup_e{#2}\fi\texdimfirstofone{#1}}%
-}%
+\def\texdiminddup#1{\expandafter\texdimenup_A\the\numexpr\dimexpr#1;*1157/2476;dd;}%
%
% mm 7227/2540 phi now >2, use from here on the simpler approach
%
-\def\texdiminmm#1{\expandafter\texdiminpt_\the\dimexpr(#1)*2540/7227\relax}%
+\def\texdiminmm#1{\expandafter\texdimenstrippt\the\dimexpr(#1)*2540/7227\relax}%
% \texdiminmmdown: maximal dim exactly expressible in mm and at most equal to input
-\def\texdiminmmdown#1{\expandafter\texdiminmmdown_a\the\numexpr\dimexpr#1;}%
-\def\texdiminmmdown_a#1{\if-#1\texdiminmmdown_neg\fi\texdiminmmdown_b#1}%
-\def\texdiminmmdown_b#1;{\expandafter\texdiminmmdown_c\the\numexpr#1*2540/7227;#1;}%
-\def\texdiminmmdown_c#1;{\expandafter\texdiminmmdown_d\the\dimexpr#1sp;#1;}%
-{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdiminmmdown_d#1PT};#2;#3;%
- {\ifdim#1mm>#3sp \texdiminuudown_e{#2}\fi\texdimfirstofone{#1}}%
-}%
-\def\texdiminmmdown_neg#1#2-#3;{#1\expandafter\texdiminpt_\the\dimexpr-\texdiminmmdown_b#3;pt\relax}%
+\def\texdiminmmdown#1{\expandafter\texdimendown_a\the\numexpr\dimexpr#1;*2540/7227;mm;}%
% \texdiminmmup: minimal dim exactly expressible in mm and at least equal to input
-\def\texdiminmmup#1{\expandafter\texdiminmmup_a\the\numexpr\dimexpr#1;}%
-\def\texdiminmmup_a#1{\if-#1\texdiminuuup_neg\fi\texdiminmmup_b#1}%
-\def\texdiminmmup_b#1;{\expandafter\texdiminmmup_c\the\numexpr#1*2540/7227;#1;}%
-\def\texdiminmmup_c#1;{\expandafter\texdiminmmup_d\the\dimexpr#1sp;#1;}%
-{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdiminmmup_d#1PT};#2;#3;%
- {\ifdim#1mm<#3sp \texdiminuuup_e{#2}\fi\texdimfirstofone{#1}}%
-}%
+\def\texdiminmmup#1{\expandafter\texdimenup_a\the\numexpr\dimexpr#1;*2540/7227;mm;}%
%
% pc 12/1
%
-\def\texdiminpc#1{\expandafter\texdiminpt_\the\dimexpr(#1)/12\relax}%
+\def\texdiminpc#1{\expandafter\texdimenstrippt\the\dimexpr(#1)/12\relax}%
% \texdiminpcdown: maximal dim exactly expressible in pc and at most equal to input
-\def\texdiminpcdown#1{\expandafter\texdiminpcdown_a\the\numexpr\dimexpr#1;}%
-\def\texdiminpcdown_a#1{\if-#1\texdiminpcdown_neg\fi\texdiminpcdown_b#1}%
-\def\texdiminpcdown_b#1;{\expandafter\texdiminpcdown_c\the\numexpr#1/12;#1;}%
-\def\texdiminpcdown_c#1;{\expandafter\texdiminpcdown_d\the\dimexpr#1sp;#1;}%
-{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdiminpcdown_d#1PT};#2;#3;%
- {\ifdim#1pc>#3sp \texdiminuudown_e{#2}\fi\texdimfirstofone{#1}}%
-}%
-\def\texdiminpcdown_neg#1#2-#3;{#1\expandafter\texdiminpt_\the\dimexpr-\texdiminpcdown_b#3;pt\relax}%
+\def\texdiminpcdown#1{\expandafter\texdimendown_a\the\numexpr\dimexpr#1;/12;pc;}%
% \texdiminpcup: minimal dim exactly expressible in pc and at least equal to input
-\def\texdiminpcup#1{\expandafter\texdiminpcup_a\the\numexpr\dimexpr#1;}%
-\def\texdiminpcup_a#1{\if-#1\texdiminuuup_neg\fi\texdiminpcup_b#1}%
-\def\texdiminpcup_b#1;{\expandafter\texdiminpcup_c\the\numexpr#1/12;#1;}%
-\def\texdiminpcup_c#1;{\expandafter\texdiminpcup_d\the\dimexpr#1sp;#1;}%
-{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdiminpcup_d#1PT};#2;#3;%
- {\ifdim#1pc<#3sp \texdiminuuup_e{#2}\fi\texdimfirstofone{#1}}%
-}%
+\def\texdiminpcup#1{\expandafter\texdimenup_a\the\numexpr\dimexpr#1;/12;pc;}%
%
% nc 1370/107
%
-\def\texdiminnc#1{\expandafter\texdiminpt_\the\dimexpr(#1)*107/1370\relax}%
+\def\texdiminnc#1{\expandafter\texdimenstrippt\the\dimexpr(#1)*107/1370\relax}%
% \texdiminncdown: maximal dim exactly expressible in nc and at most equal to input
-\def\texdiminncdown#1{\expandafter\texdiminncdown_a\the\numexpr\dimexpr#1;}%
-\def\texdiminncdown_a#1{\if-#1\texdiminncdown_neg\fi\texdiminncdown_b#1}%
-\def\texdiminncdown_b#1;{\expandafter\texdiminncdown_c\the\numexpr#1*107/1370;#1;}%
-\def\texdiminncdown_c#1;{\expandafter\texdiminncdown_d\the\dimexpr#1sp;#1;}%
-{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdiminncdown_d#1PT};#2;#3;%
- {\ifdim#1nc>#3sp \texdiminuudown_e{#2}\fi\texdimfirstofone{#1}}%
-}%
-\def\texdiminncdown_neg#1#2-#3;{#1\expandafter\texdiminpt_\the\dimexpr-\texdiminncdown_b#3;pt\relax}%
+\def\texdiminncdown#1{\expandafter\texdimendown_a\the\numexpr\dimexpr#1;*107/1370;nc;}%
% \texdiminncup: minimal dim exactly expressible in nc and at least equal to input
-\def\texdiminncup#1{\expandafter\texdiminncup_a\the\numexpr\dimexpr#1;}%
-\def\texdiminncup_a#1{\if-#1\texdiminuuup_neg\fi\texdiminncup_b#1}%
-\def\texdiminncup_b#1;{\expandafter\texdiminncup_c\the\numexpr#1*107/1370;#1;}%
-\def\texdiminncup_c#1;{\expandafter\texdiminncup_d\the\dimexpr#1sp;#1;}%
-{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdiminncup_d#1PT};#2;#3;%
- {\ifdim#1nc<#3sp \texdiminuuup_e{#2}\fi\texdimfirstofone{#1}}%
-}%
+\def\texdiminncup#1{\expandafter\texdimenup_a\the\numexpr\dimexpr#1;*107/1370;nc;}%
%
% cc 14856/1157
%
-\def\texdimincc#1{\expandafter\texdiminpt_\the\dimexpr(#1)*1157/14856\relax}%
+\def\texdimincc#1{\expandafter\texdimenstrippt\the\dimexpr(#1)*1157/14856\relax}%
% \texdiminccdown: maximal dim exactly expressible in cc and at most equal to input
-\def\texdiminccdown#1{\expandafter\texdiminccdown_a\the\numexpr\dimexpr#1;}%
-\def\texdiminccdown_a#1{\if-#1\texdiminccdown_neg\fi\texdiminccdown_b#1}%
-\def\texdiminccdown_b#1;{\expandafter\texdiminccdown_c\the\numexpr#1*1157/14856;#1;}%
-\def\texdiminccdown_c#1;{\expandafter\texdiminccdown_d\the\dimexpr#1sp;#1;}%
-{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdiminccdown_d#1PT};#2;#3;%
- {\ifdim#1cc>#3sp \texdiminuudown_e{#2}\fi\texdimfirstofone{#1}}%
-}%
-\def\texdiminccdown_neg#1#2-#3;{#1\expandafter\texdiminpt_\the\dimexpr-\texdiminccdown_b#3;pt\relax}%
+\def\texdiminccdown#1{\expandafter\texdimendown_a\the\numexpr\dimexpr#1;*1157/14856;cc;}%
% \texdiminccup: minimal dim exactly expressible in cc and at least equal to input
-\def\texdiminccup#1{\expandafter\texdiminccup_a\the\numexpr\dimexpr#1;}%
-\def\texdiminccup_a#1{\if-#1\texdiminuuup_neg\fi\texdiminccup_b#1}%
-\def\texdiminccup_b#1;{\expandafter\texdiminccup_c\the\numexpr#1*1157/14856;#1;}%
-\def\texdiminccup_c#1;{\expandafter\texdiminccup_d\the\dimexpr#1sp;#1;}%
-{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdiminccup_d#1PT};#2;#3;%
- {\ifdim#1cc<#3sp \texdiminuuup_e{#2}\fi\texdimfirstofone{#1}}%
-}%
+\def\texdiminccup#1{\expandafter\texdimenup_a\the\numexpr\dimexpr#1;*1157/14856;cc;}%
%
% cm 7227/254
%
-\def\texdimincm#1{\expandafter\texdiminpt_\the\dimexpr(#1)*254/7227\relax}%
+\def\texdimincm#1{\expandafter\texdimenstrippt\the\dimexpr(#1)*254/7227\relax}%
% \texdimincmdown: maximal dim exactly expressible in cm and at most equal to input
-\def\texdimincmdown#1{\expandafter\texdimincmdown_a\the\numexpr\dimexpr#1;}%
-\def\texdimincmdown_a#1{\if-#1\texdimincmdown_neg\fi\texdimincmdown_b#1}%
-\def\texdimincmdown_b#1;{\expandafter\texdimincmdown_c\the\numexpr#1*254/7227;#1;}%
-\def\texdimincmdown_c#1;{\expandafter\texdimincmdown_d\the\dimexpr#1sp;#1;}%
-{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdimincmdown_d#1PT};#2;#3;%
- {\ifdim#1cm>#3sp \texdiminuudown_e{#2}\fi\texdimfirstofone{#1}}%
-}%
-\def\texdimincmdown_neg#1#2-#3;{#1\expandafter\texdiminpt_\the\dimexpr-\texdimincmdown_b#3;pt\relax}%
+\def\texdimincmdown#1{\expandafter\texdimendown_a\the\numexpr\dimexpr#1;*254/7227;cm;}%
% \texdimincmup: minimal dim exactly expressible in cm and at least equal to input
-\def\texdimincmup#1{\expandafter\texdimincmup_a\the\numexpr\dimexpr#1;}%
-\def\texdimincmup_a#1{\if-#1\texdiminuuup_neg\fi\texdimincmup_b#1}%
-\def\texdimincmup_b#1;{\expandafter\texdimincmup_c\the\numexpr#1*254/7227;#1;}%
-\def\texdimincmup_c#1;{\expandafter\texdimincmup_d\the\dimexpr#1sp;#1;}%
-{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdimincmup_d#1PT};#2;#3;%
- {\ifdim#1cm<#3sp \texdiminuuup_e{#2}\fi\texdimfirstofone{#1}}%
-}%
+\def\texdimincmup#1{\expandafter\texdimenup_a\the\numexpr\dimexpr#1;*254/7227;cm;}%
%
% in 7227/100
%
-\def\texdiminin#1{\expandafter\texdiminpt_\the\dimexpr(#1)*100/7227\relax}%
+\def\texdiminin#1{\expandafter\texdimenstrippt\the\dimexpr(#1)*100/7227\relax}%
% \texdiminindown: maximal dim exactly expressible in in and at most equal to input
-\def\texdiminindown#1{\expandafter\texdiminindown_a\the\numexpr\dimexpr#1;}%
-\def\texdiminindown_a#1{\if-#1\texdiminindown_neg\fi\texdiminindown_b#1}%
-\def\texdiminindown_b#1;{\expandafter\texdiminindown_c\the\numexpr#1*100/7227;#1;}%
-\def\texdiminindown_c#1;{\expandafter\texdiminindown_d\the\dimexpr#1sp;#1;}%
-{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdiminindown_d#1PT};#2;#3;%
- {\ifdim#1in>#3sp \texdiminuudown_e{#2}\fi\texdimfirstofone{#1}}%
-}%
-\def\texdiminindown_neg#1#2-#3;{#1\expandafter\texdiminpt_\the\dimexpr-\texdiminindown_b#3;pt\relax}%
+\def\texdiminindown#1{\expandafter\texdimendown_a\the\numexpr\dimexpr#1;*100/7227;in;}%
% \texdimininup: minimal dim exactly expressible in in and at least equal to input
-\def\texdimininup#1{\expandafter\texdimininup_a\the\numexpr\dimexpr#1;}%
-\def\texdimininup_a#1{\if-#1\texdiminuuup_neg\fi\texdimininup_b#1}%
-\def\texdimininup_b#1;{\expandafter\texdimininup_c\the\numexpr#1*100/7227;#1;}%
-\def\texdimininup_c#1;{\expandafter\texdimininup_d\the\dimexpr#1sp;#1;}%
-{\catcode`P 12\catcode`T 12\lowercase{\gdef\texdimininup_d#1PT};#2;#3;%
- {\ifdim#1in<#3sp \texdiminuuup_e{#2}\fi\texdimfirstofone{#1}}%
-}%
+\def\texdimininup#1{\expandafter\texdimenup_a\the\numexpr\dimexpr#1;*100/7227;in;}%
%
\texdimensendinput
diff --git a/macros/latex/contrib/colorist/colorart.cls b/macros/latex/contrib/colorist/colorart.cls
index 27ad53e79f..8db263ddca 100644
--- a/macros/latex/contrib/colorist/colorart.cls
+++ b/macros/latex/contrib/colorist/colorart.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{colorart}
- [2021/06/30 A colorful article style]
+ [2021/07/15 A colorful article style]
\def\colorclass@baseclass{article}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -42,6 +42,7 @@
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{\colorclass@baseclass}}
\ProcessKeyvalOptions*\relax
\LoadClass{\colorclass@baseclass}
+
\if@colorclass@draft
\@colorclass@fasttrue
\fi
@@ -97,6 +98,7 @@
\RequirePackage{draftwatermark}
\DraftwatermarkOptions{text={\normalfont DRAFT},color=paper!95!-paper}
\fi
+
\RequirePackage{colorist}
%%================================
@@ -172,7 +174,6 @@
\def\PJL@font@alreadyset{}
-%% Minor improvements
\PassOptionsToPackage{verbose=silent}{microtype}
\RequirePackage{microtype}
\PassOptionsToPackage{all}{nowidow}
diff --git a/macros/latex/contrib/colorist/colorbook.cls b/macros/latex/contrib/colorist/colorbook.cls
index 385484730b..632f996820 100644
--- a/macros/latex/contrib/colorist/colorbook.cls
+++ b/macros/latex/contrib/colorist/colorbook.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{colorbook}
- [2021/06/30 A colorful book style]
+ [2021/07/15 A colorful book style]
\def\colorclass@baseclass{book}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -42,6 +42,7 @@
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{\colorclass@baseclass}}
\ProcessKeyvalOptions*\relax
\LoadClass{\colorclass@baseclass}
+
\if@colorclass@draft
\@colorclass@fasttrue
\fi
@@ -97,6 +98,7 @@
\RequirePackage{draftwatermark}
\DraftwatermarkOptions{text={\normalfont DRAFT},color=paper!95!-paper}
\fi
+
\RequirePackage{colorist}
%%================================
@@ -172,7 +174,6 @@
\def\PJL@font@alreadyset{}
-%% Minor improvements
\PassOptionsToPackage{verbose=silent}{microtype}
\RequirePackage{microtype}
\PassOptionsToPackage{all}{nowidow}
diff --git a/macros/latex/contrib/colorist/colorist-doc.pdf b/macros/latex/contrib/colorist/colorist-doc.pdf
index 9619e3b98d..2a7069b9ac 100644
--- a/macros/latex/contrib/colorist/colorist-doc.pdf
+++ b/macros/latex/contrib/colorist/colorist-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/colorist/colorist-doc.tex b/macros/latex/contrib/colorist/colorist-doc.tex
index 1f0bc2bb9e..303196f7d5 100644
--- a/macros/latex/contrib/colorist/colorist-doc.tex
+++ b/macros/latex/contrib/colorist/colorist-doc.tex
@@ -1,12 +1,11 @@
-%! TEX program = xelatex
-\documentclass[English,French,allowbf,puretext]{colorart}
+\documentclass[English,Chinese,French,allowbf,puretext]{colorart}
\theoremstyle{basic}
\CreateTheorem{definition}<highest>
-\CreateTheorem{theorem}<highest>
-\CreateTheorem{conjecture}<highest>
+\CreateTheorem{theorem}[definition]
+\CreateTheorem{conjecture}[definition]
\CreateTheorem*{example*}
-\CreateTheorem{problem}<highest>
+\CreateTheorem{problem}[definition]
\theoremstyle{emphasis}
\CreateTheorem{remark}<highest>
@@ -19,9 +18,14 @@
\usepackage{ProjLib}
\usepackage{longtable} % breakable tables
\usepackage{hologo} % more TeX logo
+\usetikzlibrary{calc}
+
+\usepackage{blindtext}
+
+\UseLanguage{English}
%%================================
-%% For typestting code
+%% For typesetting code
%%================================
\usepackage{listings}
\definecolor{maintheme}{RGB}{70,130,180}
@@ -40,20 +44,27 @@
escapeinside={(*}{*)},
% numbers=left,
numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- firstnumber=last,
-}
+ % firstnumber=last,
+}
\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{moretexcs=%
- {linenumbers,nolinenumbers,subsection,subsubsection,href,
- color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib
+ {part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
+ color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
}
}
-\lstnewenvironment{code}%
-{\setkeys{lst}{columns=fullflexible,keepspaces=true}}{}
+\lstnewenvironment{code}%
+{\setstretch{1.07}%
+\setkeys{lst}{columns=fullflexible,keepspaces=true}%
+}{}
+\lstnewenvironment{code*}%
+{\setstretch{1.07}%
+\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
+}{}
%%================================
%% tip
%%================================
+\usepackage[many]{tcolorbox}
\newenvironment{tip}[1][Tip]{%
\begin{tcolorbox}[breakable,
enhanced,
@@ -74,78 +85,312 @@
%%================================
%% Names
%%================================
-\providecommand{\colorist}{{\normalfont\textsf{colorist}}}
-\providecommand{\colorart}{{\normalfont\textsf{colorart}}}
-\providecommand{\colorbook}{{\normalfont\textsf{colorbook}}}
-\providecommand{\lebhart}{{\normalfont\textsf{lebhart}}}
-\providecommand{\beaulivre}{{\normalfont\textsf{beaulivre}}}
+\providecommand{\colorist}{\textsf{colorist}}
+\providecommand{\colorart}{\textsf{colorart}}
+\providecommand{\colorbook}{\textsf{colorbook}}
+\providecommand{\lebhart}{\textsf{lebhart}}
+\providecommand{\beaulivre}{\textsf{beaulivre}}
+%%================================
+%% Titles
+%%================================
+\let\LevelOneTitle\section
+\let\LevelTwoTitle\subsection
+\let\LevelThreeTitle\subsubsection
%%================================
%% Main text
%%================================
\begin{document}
-\title{{\normalfont\textbf{\textsf{colorist}}}, write your articles or books in a colorful way}
+\title{\colorist{}, write your articles or books in a colorful way}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\colorist{} 2021/06/30}}
-\date{June 2021, Beijing}
+\thanks{Corresponding to: \texttt{\colorist{} 2021/07/15}}
+\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
+\date{July 2021, Beijing}
\maketitle
\begin{abstract}
- \colorist{} is a series of styles and classes for you to typeset your articles or books in a colorful manner. My original intention in designing this series is to write drafts and notes that look colorful yet not dazzling.
+ \colorist{} is a series of styles and classes for you to typeset your articles or books in a colorful manner. The original intention in designing this series was to write drafts and notes that look colorful yet not dazzling. With the help of the \ProjLib{} toolkit, also developed by the author, the classes provided here have multi-language support, preset theorem-like environments with clever reference support, and many other functionalities. Notably, using these classes, one can organize the author information in the \AmS{} fashion, makes it easy to switch to journal classes later for publication.
- The entire collection includes \verb|colorist.sty|, which is the main style shared by all of the following classes; \verb|colorart.cls| for typesetting articles and \verb|colorbook.cls| for typesetting books. They compile with any major \TeX{} engine, with native support to English, French, German, Italian, Portuguese (European and Brazilian) and Spanish typesetting via \lstinline|\UseLanguage| (see the instruction below for detail).
-
- You can also found \lebhart{} and \beaulivre{} on CTAN. They are the enhanced version of \colorart{} and \colorbook{} with unicode support. With this, they can access to more beautiful fonts, and also have native support for Chinese, Japanese and Russian typesetting. On the other hand, they need to be compiled with \hologo{XeLaTeX} or \hologo{LuaLaTeX} (not pdf\LaTeX).
-
- This documentation is typeset using \colorart{} (with the option \texttt{allowbf}). You can think of it as a short introduction and demonstration.
+ Finally, this documentation is typeset using the \colorart{} class (with the option \texttt{allowbf}). You can think of it as a short introduction and demonstration.
\end{abstract}
+
+\setcounter{tocdepth}{2}
\tableofcontents
-\vspace{2.5\baselineskip}
-\begin{tip}
- Multi-language support, theorem-like environments, draft marks and some other features are provided by the \ProjLib{} toolkit. Here we only briefly discuss how to use it with this document class. For more detailed information, you can refer to the documentation of \ProjLib{}.
-\end{tip}
-\clearpage
-\section{Initialization}
+\medskip
+\LevelOneTitle*{Before you start}
+\addcontentsline{toc}{section}{Before you start}
+In order to use the package or classes described here, you need to:
+\begin{itemize}
+ \item install TeX Live or MikTeX of the latest possible version, and make sure that \texttt{colorist} and \texttt{projlib} are correctly installed in your \TeX{} system.
+ \item be familiar with the basic usage of \LaTeX{}, and knows how to compile your document with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
+\end{itemize}
+
+\LevelOneTitle{Introduction}
+
+\colorist{} is a series of styles and classes for you to typeset your articles or books in a colorful manner. The original intention in designing this series was to write drafts and notes that look colorful yet not dazzling.
-\subsection{How to load it}
+The entire collection includes \verb|colorist.sty|, which is the main style shared by all of the following classes; \verb|colorart.cls| for typesetting articles and \verb|colorbook.cls| for typesetting books. They compile with any major \TeX{} engine, with native support to English, French, German, Italian, Portuguese (European and Brazilian) and Spanish typesetting via \lstinline|\UseLanguage| (see the instruction below for detail).
+
+You can also found \lebhart{} and \beaulivre{} on CTAN. They are the enhanced version of \colorart{} and \colorbook{} with unicode support. With this, they can access to more beautiful fonts, and additionally have native support for Chinese, Japanese and Russian typesetting. On the other hand, they need to be compiled with \hologo{XeLaTeX} or \hologo{LuaLaTeX} (not \hologo{pdfLaTeX}).
+
+With the help of the \ProjLib{} toolkit, also developed by the author, the classes provided here have multi-language support, preset theorem-like environments with clever reference support, and many other functionalities such as draft marks, enhanced author information block, mathematical symbols and shortcuts, etc. Notably, using these classes, one can organize the author information in the \AmS{} fashion, makes it easy to switch to journal classes later for publication. For more detailed information, you can refer to the documentation of \ProjLib{} by running \lstinline|texdoc projlib| in the command line.
+
+\LevelOneTitle{Usage and examples}
+
+\LevelTwoTitle{How to load it}
You can directly use \colorart{} or \colorbook{} as your document class. In this way, you can directly begin writing your document, without having to worry about the configurations.
\begin{code}
\documentclass{colorart} (*{\normalfont or}*) \documentclass{colorbook}
\end{code}
-And of course, you can also use the default classes \textsf{article} or \textsf{book}, and load the \colorist{} package. This way, only the basic styles are set, and you can thus use your preferred fonts and page layout. All the features mentioned in this article are provided.
+\begin{tip}
+ You may wish to use \lebhart{} or \beaulivre{} instead, which should produce better result. All the examples later using \colorart{} or \colorbook{} can be adopted to \lebhart{} and \beaulivre{} respectively, without further modification.
+\end{tip}
+
+You can also use the default classes \textsf{article} or \textsf{book}, and load the \colorist{} package. This way, only the basic styles are set, and you can thus use your preferred fonts and page layout. All the features mentioned in this article are provided.
+
\begin{code}
+ \documentclass{article} (*{\normalfont or}*) \documentclass{book}
\usepackage{colorist}
\end{code}
-\subsection{Options}
+\LevelTwoTitle{Example - \colorart}
+
+Let's first look at a complete example of \colorart{} (the same works for \lebhart{}).
+
+\begin{code*}
+\documentclass{colorart}
+\usepackage{ProjLib}
+
+\UseLanguage{French}
+
+\begin{document}
+
+\title{(*\meta{title}*)}
+\author{(*\meta{author}*)}
+\date{\PLdate{2022-04-01}}
+
+\maketitle
+
+\begin{abstract}
+ Ceci est un résumé. \dnf<Plus de contenu est nécessaire.>
+\end{abstract}
+\begin{keyword}
+ AAA, BBB, CCC, DDD, EEE
+\end{keyword}
+
+\section{Un théorème}
+
+\begin{theorem}\label{thm:abc}
+ Ceci est un théorème.
+\end{theorem}
+Référence du théorème: \cref{thm:abc}
+
+\end{document}
+\end{code*}
+
+
+If you find this example a little complicated, don't worry. Let's now look at this example piece by piece.
+
+\LevelThreeTitle{Initialization}
+
+\medskip
+\begin{code}
+\documentclass{colorart}
+\usepackage{ProjLib}
+\end{code}
+
+Initialization is straightforward. The first line loads the document class \colorart{}, and the second line loads the \ProjLib{} toolkit to obtain some additional functionalities.
+
+\LevelThreeTitle{Set the language}
+
+\medskip
+\begin{code}
+\UseLanguage{French}
+\end{code}
+
+This line indicates that French will be used in the document (by the way, if only English appears in your article, then there is no need to set the language). You can also switch the language in the same way later in the middle of the text. Supported languages include Simplified Chinese, Traditional Chinese, Japanese, English, French, German, Spanish, Portuguese, Brazilian Portuguese and Russian%
+\footnote{The language Simplified Chinese, Traditional Chinese, Japanese and Russian requires Unicode support, thus the classes \lebhart{} or \beaulivre{}.}%
+.%
+
+For detailed description of this command and more related commands, please refer to the section on the multi-language support.
+
+\LevelThreeTitle{Title, author information, abstract and keywords}
+
+\medskip
+\begin{code}
+\title{(*\meta{title}*)}
+\author{(*\meta{author}*)}
+\date{\PLdate{2022-04-01}}
+\maketitle
+
+\begin{abstract}
+ (*\meta{abstract}*)
+\end{abstract}
+\begin{keyword}
+ (*\meta{keywords}*)
+\end{keyword}
+\end{code}
+
+This part begins with the title and author information block. The example shows the basic usage, but in fact, you can also write:
+
+\begin{code}
+\author{(*\meta{author 1}*)}
+\address{(*\meta{address 1}*)}
+\email{(*\meta{email 1}*)}
+\author{(*\meta{author 2}*)}
+\address{(*\meta{address 2}*)}
+\email{(*\meta{email 2}*)}
+...
+\end{code}
+
+In addition, you may also write in the \AmS{} fashion, i.e.:
+
+\begin{code}
+\title{(*\meta{title}*)}
+\author{(*\meta{author 1}*)}
+\address{(*\meta{address 1}*)}
+\email{(*\meta{email 1}*)}
+\author{(*\meta{author 2}*)}
+\address{(*\meta{address 2}*)}
+\email{(*\meta{email 2}*)}
+\date{\PLdate{2022-04-01}}
+\subjclass{*****}
+\keywords{(*\meta{keywords}*)}
+
+\begin{abstract}
+ (*\meta{abstract}*)
+\end{abstract}
+
+\maketitle
+\end{code}
+
+\LevelThreeTitle{Draft marks}
+
+\medskip
+\begin{code}
+\dnf<(*\meta{some hint}*)>
+\end{code}
+
+When you have some places that have not yet been finished yet, you can mark them with this command, which is especially useful during the draft stage.
+
+\LevelThreeTitle{Theorem-like environments}
+
+\medskip
+\begin{code}
+\begin{theorem}\label{thm:abc}
+ Ceci est un théorème.
+\end{theorem}
+Référence du théorème: \cref{thm:abc}
+\end{code}
+
+Commonly used theorem-like environments have been pre-defined. Also, when referencing a theorem-like environment, it is recommended to use \lstinline|\cref{|\meta{label}\texttt{\}} --- in this way, there is no need to explicitly write down the name of the corresponding environment every time.
+
+\begin{tip}
+If you wish to switch to the standard class later, just replace the first two lines with:
+
+\begin{code}
+\documentclass{article}
+\usepackage[a4paper,margin=1in]{geometry}
+\usepackage[hidelinks]{hyperref}
+\usepackage[palatino,amsfashion]{ProjLib}
+\end{code}
+
+or to use the \AmS{} class:
+
+\begin{code}
+\documentclass{amsart}
+\usepackage[a4paper,margin=1in]{geometry}
+\usepackage[hidelinks]{hyperref}
+\usepackage[palatino]{ProjLib}
+\end{code}
-\colorist{} offers the following options:
+\end{tip}
+
+\begin{tip}
+If you like the current document class, but want a more ``plain'' style, then you can use the option \texttt{classical}, like this:
+
+\begin{code}
+\documentclass[classical]{colorart}
+\end{code}
+\end{tip}
+
+\LevelTwoTitle{Example - \colorbook}
+
+Now let's look at an example of \colorbook{} (the same works for \beaulivre{}).
+
+\begin{code*}
+\documentclass{colorbook}
+\usepackage{ProjLib}
+
+\UseLanguage{French}
+
+\begin{document}
+
+\frontmatter
+
+\begin{titlepage}
+ (*\meta{code for titlepage}*)
+\end{titlepage}
+
+\tableofcontents
+
+\mainmatter
+
+\part{(*\meta{part title}*)}
+\parttext{(*\meta{text after part title}*)}
+
+\chapter{(*\meta{chapter title}*)}
+
+\section{(*\meta{section title}*)}
+
+...
+
+\backmatter
+
+...
+
+\end{document}
+\end{code*}
+
+There is no much differences with \colorart{}, only that the title and author information should be typeset within the \texttt{titlepage} environment. Currently no default titlepage style is given, since the design of the title page is a highly personalized thing, and it is difficult to achieve a result that satisfies everyone.
+
+\bigskip
+In the next section, we will go through the options available.
+
+
+\LevelOneTitle{The options}
+
+\colorist{} offers the following options:
\begin{itemize}
\item The language options \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French}, etc.
\begin{itemize}
\item For the option names of a specific language, please refer to \meta{language name} in the next section. The first specified language will be used as the default language.
+ \item The language options are optional, mainly for increasing the compilation speed. Without them the result would be the same, only slower.
\end{itemize}
\item \texttt{draft} or \texttt{fast}
\begin{itemize}
\item The option \verb|fast| enables a faster but slightly rougher style, main differences are:
\begin{itemize}
- \item Use simpler math font configuration;
- \item Do not use \textsf{hyperref};
+ \item Use simpler math font configuration;
+ \item Do not use \textsf{hyperref};
\item Enable the fast mode of \ProjLib{} toolkit.
\end{itemize}
\end{itemize}
+ \begin{tip}
+ During the draft stage, it is recommended to use the \verb|fast| option to speed up compilation. When in \verb|fast| mode, there will be a watermark ``DRAFT'' to indicate that you are currently in the draft mode.
+ \end{tip}
\item \texttt{allowbf}
\begin{itemize}
- \item Allow boldface. When this option is enabled, the title, titles of all levels and names of theorem-like environments will be bolded.
+ \item Allow boldface. When this option is enabled, the main title, the titles of all levels and the names of theorem-like environments will be bolded.
\end{itemize}
\item \texttt{runin}
\begin{itemize}
@@ -161,14 +406,7 @@ And of course, you can also use the default classes \textsf{article} or \textsf{
\end{itemize}
\end{itemize}
-\begin{tip}
- \begin{itemize}
- \item During the draft stage, it is recommended to use the \verb|fast| option to speed up compilation. When in \verb|fast| mode, there will be a watermark "DRAFT" to indicate that you are currently in the draft mode.
- \end{itemize}
-\end{tip}
-
-\bigskip
-Additionally, \colorart{} and \colorbook{} offers the following options:
+Additionally, \colorart{} and \colorbook{} offers the following options:
\begin{itemize}
\item \texttt{a4paper} or \texttt{b5paper}
\begin{itemize}
@@ -176,19 +414,17 @@ Additionally, \colorart{} and \colorbook{} offers the following options:
\end{itemize}
\item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{biolinum} ~$|$~ \texttt{useosf}
\begin{itemize}
- \item Font options. As the name suggest, font with corresponding name will be loaded.
+ \item Font options. As the name suggest, font with corresponding name will be loaded.
\item The \texttt{useosf} option is used to enable the old-style figures.
\end{itemize}
\end{itemize}
+\clearpage
+\LevelOneTitle{Instructions by topic}
-\section{Some instructions}
-
-Many of the features described next are provided by the \ProjLib{} toolkit. Only the basic usage is mentioned here. For more details, please refer to its user documentation.
-
-\subsection{Language configuration}
+\LevelTwoTitle{Language configuration}
-\colorist{} has multi-language support, including English, French, German, Italian, Portuguese (European and Brazilian) and Spanish. The language can be selected by the following macros:
+\colorart{} has multi-language support, including English, French, German, Italian, Portuguese (European and Brazilian) and Spanish. The language can be selected by the following macros:
\begin{itemize}
\item \lstinline|\UseLanguage{|\meta{language name}\lstinline|}| is used to specify the language. The corresponding setting of the language will be applied after it. It can be used either in the preamble or in the main body. When no language is specified, ``English'' is selected by default.
@@ -224,15 +460,13 @@ In addition, you can also add new settings to selected language:
\end{itemize}
For example, \lstinline|\AddLanguageSetting(German){\color{orange}}| can make all German text displayed in orange (of course, one then need to add \lstinline|\AddLanguageSetting{\color{black}}| in order to correct the color of the text in other languages).
+\LevelTwoTitle{Theorems and how to reference them}
-\subsection{Theorems and how to reference them}
+Environments such as \texttt{definition} and \texttt{theorem} have been preset and can be used directly.
-Environments such as \texttt{definition} and \texttt{theorem} have been pre-defined and can be used directly.
-
-More specifically, preset environments include:
+More specifically, preset environments include:
\texttt{assumption}, \texttt{axiom}, \texttt{conjecture}, \texttt{convention}, \texttt{corollary}, \texttt{definition}, \texttt{definition-proposition}, \texttt{definition-theorem}, \texttt{example}, \texttt{exercise}, \texttt{fact}, \texttt{hypothesis}, \texttt{lemma}, \texttt{notation}, \texttt{observation}, \texttt{problem}, \texttt{property}, \texttt{proposition}, \texttt{question}, \texttt{remark}, \texttt{theorem}, and the corresponding unnumbered version with an asterisk \lstinline|*| in the name. The titles will change with the current language. For example, \texttt{theorem} will be displayed as ``Theorem" in English mode and ``Théorème" in French mode.
-\medskip
When referencing a theorem-like environment, it is recommended to use \lstinline|\cref{|\meta{label}\texttt{\}}. In this way, there is no need to explicitly write down the name of the corresponding environment every time.
\begin{tip}[Example]
@@ -242,12 +476,11 @@ When referencing a theorem-like environment, it is recommended to use \lstinline
will produce
\begin{definition}[Strange things]\label{def: strange}
- This is the definition of some strange objects.
+ This is the definition of some strange objects. There is approximately an one-line space before and after the theorem environment, and there will be a symbol to mark the end of the environment.
\end{definition}
\lstinline|\cref{def: strange}| will be displayed as: \cref{def: strange}.
-\medskip
After using \lstinline|\UseLanguage{French}|, a theorem will be displayed as:
\UseLanguage{French}
@@ -258,6 +491,7 @@ After using \lstinline|\UseLanguage{French}|, a theorem will be displayed as:
By default, when referenced, the name of the theorem always matches the language of the context in which the theorem is located. For example, the definition above is still displayed in English in the current French mode: \cref{def: strange} and \cref{thm}. If you want the name of the theorem to match the current context when referencing, you can add \texttt{regionalref} to the global options.
\end{tip}
+\UseLanguage{English}
\bigskip
The following are the main styles of theorem-like environments:
@@ -295,10 +529,7 @@ For aesthetics, adjacent definitions will be connected together automatically:
Second definition.
\end{definition}
-\UseLanguage{English}
-
-% \clearpage
-\subsection{Define a new theorem-like environment}
+\LevelTwoTitle{Define a new theorem-like environment}
If you need to define a new theorem-like environment, you must first define the name of the environment in the language to use:
\begin{itemize}
@@ -323,7 +554,7 @@ And then define this environment in one of following five ways:
\end{itemize}
\item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
\begin{itemize}
- \item Define a numbered environment \meta{name of environment}, numbered within the \\counter \meta{numbered within}
+ \item Define a numbered environment \meta{name of environment}, numbered within the counter \meta{numbered within}
\end{itemize}
\item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
\lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
@@ -331,54 +562,55 @@ And then define this environment in one of following five ways:
\item Identify \meta{name of environment} with \meta{existed environment} or \meta{existed environment}\lstinline|*|.
\item This method is usually useful in the following two situations:
\begin{enumerate}
- \item To use a more concise name. For example, with \lstinline|\CreateTheorem{thm}|\\\lstinline|(theorem)|, one can then use the name \texttt{thm} to write theorem.
- \item To remove the numbering. For example, one can remove the numbering of the \texttt{remark} environment with \lstinline|\CreateTheorem{remark}(remark*)|.
+ \item To use a more concise name. For example, with \lstinline|\CreateTheorem{thm}(theorem)|, one can then use the name \texttt{thm} to write theorem.
+ \item To remove the numbering of some environments. For example, one can remove the numbering of the \texttt{remark} environment with \lstinline|\CreateTheorem{remark}(remark*)|.
\end{enumerate}
\end{itemize}
\end{itemize}
-% \medskip
\begin{tip}
This macro utilizes the feature of \textsf{amsthm} internally, so the traditional \texttt{theoremstyle} is also applicable to it. One only needs declare the style before the relevant definitions.
\end{tip}
-% \def\proofideanameEN{Idea}
\NameTheorem[EN]{proofidea}{Idea}
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<subsection>
-\medskip
+\bigskip
Here is an example. The following code:
+
\begin{code}
\NameTheorem[EN]{proofidea}{Idea}
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<subsection>
\end{code}
-defines an unnumbered environment \lstinline|proofidea*| and a numbered environment \lstinline|proofidea| (numbered within subsection) respectively. They can be used in English context. The effect is as follows:
+defines an unnumbered environment \lstinline|proofidea*| and a numbered environment \lstinline|proofidea| (numbered within subsection) respectively. They can be used in English context.
+The effect is as follows:
+\vspace{-0.3\baselineskip}
\begin{proofidea*}
The \lstinline|proofidea*| environment.
\end{proofidea*}
+\vspace{-\baselineskip}
\begin{proofidea}
The \lstinline|proofidea| environment.
\end{proofidea}
-\smallskip
-\subsection{Draft mark}
+\LevelTwoTitle{Draft mark}
You can use \lstinline|\dnf| to mark the unfinished part. For example:
\begin{itemize}
\item \lstinline|\dnf| or \lstinline|\dnf<...>|. The effect is: \dnf~ or \dnf<...>. \\The prompt text changes according to the current language. For example, it will be displayed as \UseOtherLanguage{French}{\dnf} in French mode.
\end{itemize}
-Similarly, there is \lstinline|\needgraph| :
+Similarly, there is \lstinline|\needgraph| :
\begin{itemize}
- \item \lstinline|\needgraph| or \lstinline|\needgraph<...>|. The effect is: \vspace{-.3\baselineskip}\needgraph \vspace{-.5\baselineskip} or \vspace{-.5\baselineskip} \needgraph<...>The prompt text changes according to the current language. For example, in French mode, it will be displayed as \UseOtherLanguage{French}{\needgraph}
+ \item \lstinline|\needgraph| or \lstinline|\needgraph<...>|. The effect is: \needgraph or \needgraph<...>The prompt text changes according to the current language. For example, in French mode, it will be displayed as \UseOtherLanguage{French}{\needgraph}
\end{itemize}
-% \clearpage
-\subsection{On the title, abstract and keywords}
+\clearpage
+\LevelTwoTitle{Title, abstract and keywords}
\colorart{} has both the features of standard classes and that of the \AmS{} classes.
@@ -414,7 +646,6 @@ or written in the way of \AmS{} classes:
\maketitle
\end{code}
-\medskip
The author information can contain multiple groups, written as:
\begin{code}
@@ -429,118 +660,17 @@ The author information can contain multiple groups, written as:
Among them, the mutual order of \lstinline|\address|, \lstinline|\curraddr|, \lstinline|\email| is not important.
-
-\section{Known issues}
+\LevelOneTitle{Known issues}
\begin{itemize}[itemsep=.6em]
\item The font settings are still not perfect.
- \item Since many features are based on the \ProjLib{} toolkit, \colorist{} inherits all its problems. For details, please refer to the ``Known Issues'' section of the \ProjLib{} documentation.
+ \item Since many features are based on the \ProjLib{} toolkit, \colorist{} (and hence \colorart{}, \lebhart{} and \colorbook{}, \beaulivre{}) inherits all its problems. For details, please refer to the ``Known Issues'' section of the \ProjLib{} documentation.
\item The error handling mechanism is incomplete: there is no corresponding error prompt when some problems occur.
\item There are still many things that can be optimized in the code.
\end{itemize}
-% \clearpage
-\medskip
-\section{Document templates}
-
-\subsection{The standard way}
-
-If you want to write in the standard way, you can refer to the following example:
-
-\begin{code}
-\documentclass{colorart}
-\usepackage{ProjLib} % Load ProjLib toolkit
-
-\UseLanguage{French} % Use French from here
-
-\begin{document}
-
-\title{Le Titre}
-\author{Auteur}
-\date{\PLdate{2022-04-01}}
-
-\maketitle
-
-\begin{abstract}
- Ceci est un résumé. \dnf<Plus de contenu est nécessaire.>
-\end{abstract}
-\begin{keyword}
- AAA, BBB, CCC, DDD, EEE
-\end{keyword}
-
-\section{Un théorème}
-
-%% Theorem-like environments can be used directly
-\begin{theorem}\label{thm:abc}
- Ceci est un théorème.
-\end{theorem}
-
-Référence du théorème: \cref{thm:abc}
- % It is recommended to use clever reference
-
-\end{document}
-\end{code}
-
-If you wish to switch to the standard class later, just replace the first two lines with:
-
-\begin{code}
-\documentclass{article}
-\usepackage[a4paper,margin=1in]{geometry}
-\usepackage[hidelinks]{hyperref}
-\usepackage[palatino]{ProjLib} % Load ProjLib toolkit
-\end{code}
-
-
-\clearpage
-\subsection{The \texorpdfstring{\AmS{}}{AMS} way}
-
-If you intend to switch to the journal template in the future and thus want to use the writing style as in the \AmS{} classes, you can refer to the following example:
-
-\begin{code}
-\documentclass{colorart}
-\usepackage{ProjLib} % Load ProjLib toolkit
-
-\UseLanguage{French} % Use French from here
-
-\begin{document}
-
-\title{Le Titre}
-\author{Auteur 1}
-\address{Adresse 1}
-\email{\href{Courriel 1}{Courriel 1}}
-\author{Auteur 1}
-\address{Adresse 1}
-\email{\href{Courriel 2}{Courriel 2}}
-\date{\PLdate{2022-04-01}}
-\subjclass{*****}
-\keywords{...}
-
-\begin{abstract}
- Ceci est un résumé. \dnf<Plus de contenu est nécessaire.>
-\end{abstract}
-
-\maketitle
-
-\section{Première section}
-
-%% Theorem-like environments can be used directly
-\begin{theorem}\label{thm:abc}
- Ceci est un théorème.
-\end{theorem}
-
-Référence du théorème: \cref{thm:abc}
- % It is recommended to use clever reference
-
-\end{document}
-\end{code}
-
-In this way, if you wish to switch to \AmS{} class later, just replace the first two lines with:
-
-\begin{code}
-\documentclass{amsart}
-\usepackage[a4paper,margin=1in]{geometry}
-\usepackage[hidelinks]{hyperref}
-\usepackage[palatino]{ProjLib} % Load ProjLib toolkit
-\end{code}
\end{document}
+\endinput
+%%
+%% End of file `colorist/colorist-doc.tex'.
diff --git a/macros/latex/contrib/colorist/colorist.sty b/macros/latex/contrib/colorist/colorist.sty
index eb00dcd464..3a610e4943 100644
--- a/macros/latex/contrib/colorist/colorist.sty
+++ b/macros/latex/contrib/colorist/colorist.sty
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesPackage{colorist}
- [2021/06/30 A colorful style for articles and books]
+ [2021/07/15 A colorful style for articles and books]
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
\SetupKeyvalOptions{%
@@ -56,6 +56,7 @@
%% Title fonts
%%================================
\RequirePackage{anyfontsize}
+
\newcommand{\partfont}{\conditionalbfseries\colorist@sffamily}
\newcommand{\chapfont}{\conditionalbfseries\colorist@sffamily}
\newcommand{\secfont}{\conditionalbfseries\colorist@sffamily}
@@ -80,7 +81,9 @@
\RequirePackage{geometry}
\RequirePackage{fancyhdr}
\RequirePackage{extramarks}
+
\AtEndPreamble{\fancyhfoffset{0pt}}
+
\fancypagestyle{fancy}{
\fancyhf{}
\if@twoside
@@ -96,6 +99,7 @@
\renewcommand{\headrulewidth}{0pt}
}
\pagestyle{fancy}
+
\fancypagestyle{plain}{
\fancyhf{}
\if@twoside
@@ -109,6 +113,7 @@
\fi
\renewcommand{\headrulewidth}{0pt}
}
+
\ifbool{IsBook}{
\if@twoside
\renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{}}
@@ -125,7 +130,7 @@
\fi
}
%%================================
-%% Line spacing
+%% Languages and line spacing
%%================================
\RequirePackage{PJLlang}
\PJLsetlinespacing{\setstretch{1.07}}
@@ -310,7 +315,7 @@
\titlecontents{part}
[0em]
{\addvspace{1.5pc}\filcenter\colorist@sffamily}
- {\thecontentslabel\\\uppercase}
+ {\thecontentslabel\nopagebreak\\\nopagebreak\uppercase}
{}
{} % without page number
[\addvspace{.5pc}]
@@ -364,11 +369,21 @@
%% Lists
%%================================
\RequirePackage{enumitem}
-\setlist{noitemsep,leftmargin=2em}
-\gappto{\PJLlang@langconfig@common}{\renewcommand\labelitemi{\textcolor{maintext!25}{$\bullet$}}}
-\gappto{\PJLlang@langconfig@french}{\renewcommand\labelitemi{\textcolor{maintext!50}{---}}}
-\renewcommand\labelitemii{\textcolor{maintext!27}{--}}
-\renewcommand\labelitemiii{\textcolor{maintext!27}{\texttt{*}}}
+\setlist{noitemsep}
+\setlist[enumerate]{labelsep=*, leftmargin=*}
+\setlist[enumerate,1]{label = \arabic*.,
+ ref = \arabic*}
+\setlist[enumerate,2]{label = \emph{\alph*}),
+ ref = \theenumi.\emph{\alph*}}
+\setlist[enumerate,3]{label = (\roman*),
+ ref = \theenumii.\roman*}
+\setlist[description]{font=\normalfont\conditionalbfseries}
+
+\setlist[itemize]{leftmargin=*}
+\gappto{\PJLlang@langconfig@common}{\setlist[itemize,1]{label=\textcolor{maintext!25}{$\bullet$}}}
+\gappto{\PJLlang@langconfig@french}{\setlist[itemize,1]{label=\textcolor{maintext!50}{---}}}
+\setlist[itemize,2]{label=\textcolor{maintext!27}{--}}
+\setlist[itemize,3]{label=\textcolor{maintext!27}{\texttt{*}}}
%%================================
%% Blank page
@@ -440,8 +455,9 @@
\color{maintext!50!paper}\thmnote{\ensuremath{(\text{#3})}~~}%
\pushQED{\qed}%
}
-\def\@endtheorem{\popQED\endtrivlist\@endpefalse
-\global\let\qedsymbol\qedsymbolOriginal}
+\def\@endtheorem{\global\let\qedsymbol\simpleqedsymbol%
+ \popQED\endtrivlist\@endpefalse
+ \global\let\qedsymbol\qedsymbolOriginal}
\renewcommand{\qedsymbol}{%
\makebox[1em]{\color{maintext!27!paper}\rule[-0.1em]{.95em}{.95em}}}
@@ -470,7 +486,6 @@
\PassOptionsToPackage{nothms}{PJLthm}
\RequirePackage{PJLthm}
-%% Adjust English theorems names
\pretocmd{\theoremnameEN}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
\pretocmd{\lemmanameEN}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
\pretocmd{\propositionnameEN}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
@@ -493,7 +508,6 @@
\expandafter\def\csname definition-propositionnameEN\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definition}-\propositionnameEN}
\expandafter\def\csname definition-theoremnameEN\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definition}-\theoremnameEN}
-%% Adjust French theorems names
\pretocmd{\theoremnameFR}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
\pretocmd{\lemmanameFR}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
\pretocmd{\propositionnameFR}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
@@ -516,7 +530,6 @@
\expandafter\def\csname definition-propositionnameFR\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Définition}-\propositionnameFR}
\expandafter\def\csname definition-theoremnameFR\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Définition}-\theoremnameFR}
-%% Adjust German theorems names
\pretocmd{\theoremnameDE}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
\pretocmd{\lemmanameDE}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
\pretocmd{\propositionnameDE}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
@@ -539,7 +552,6 @@
\expandafter\def\csname definition-propositionnameDE\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definition}-\propositionnameDE}
\expandafter\def\csname definition-theoremnameDE\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definition}-\theoremnameDE}
-%% Adjust Italian theorems names
\pretocmd{\theoremnameIT}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
\pretocmd{\lemmanameIT}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
\pretocmd{\propositionnameIT}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
@@ -562,7 +574,6 @@
\expandafter\def\csname definition-propositionnameIT\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definizione}-\propositionnameIT}
\expandafter\def\csname definition-theoremnameIT\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definizione}-\theoremnameIT}
-%% Adjust Portuguese theorems names
\pretocmd{\theoremnamePT}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
\pretocmd{\lemmanamePT}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
\pretocmd{\propositionnamePT}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
@@ -585,7 +596,6 @@
\expandafter\def\csname definition-propositionnamePT\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definição}-\propositionnamePT}
\expandafter\def\csname definition-theoremnamePT\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definição}-\theoremnamePT}
-%% Adjust Brazilian theorems names
\pretocmd{\theoremnameBR}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
\pretocmd{\lemmanameBR}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
\pretocmd{\propositionnameBR}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
@@ -608,7 +618,6 @@
\expandafter\def\csname definition-propositionnameBR\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definição}-\propositionnameBR}
\expandafter\def\csname definition-theoremnameBR\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definição}-\theoremnameBR}
-%% Adjust Spanish theorems names
\pretocmd{\theoremnameES}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
\pretocmd{\lemmanameES}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
\pretocmd{\propositionnameES}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc}{}{\FAIL}
@@ -631,7 +640,6 @@
\expandafter\def\csname definition-propositionnameES\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definição}-\propositionnameES}
\expandafter\def\csname definition-theoremnameES\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries\colorist@textsc{Definição}-\theoremnameES}
-%% Adjust Chinese theorems names
\pretocmd{\theoremnameCN}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
\pretocmd{\lemmanameCN}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
\pretocmd{\propositionnameCN}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
@@ -676,7 +684,6 @@
\expandafter\def\csname definition-propositionnameTC\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{定義}-\propositionnameTC}
\expandafter\def\csname definition-theoremnameTC\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{定義}-\theoremnameTC}
-%% Adjust Japanese theorems names
\pretocmd{\theoremnameJP}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
\pretocmd{\lemmanameJP}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
\pretocmd{\propositionnameJP}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
@@ -699,7 +706,6 @@
\expandafter\def\csname definition-propositionnameJP\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{定義}-\propositionnameJP}
\expandafter\def\csname definition-theoremnameJP\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{定義}-\theoremnameJP}
-%% Adjust Russian theorems names
\pretocmd{\theoremnameRU}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
\pretocmd{\lemmanameRU}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
\pretocmd{\propositionnameRU}{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries}{}{\FAIL}
@@ -722,7 +728,6 @@
\expandafter\def\csname definition-propositionnameRU\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{Определение}-\propositionnameRU}
\expandafter\def\csname definition-theoremnameRU\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{Определение}-\theoremnameRU}
-%% Theorem environments
\theoremstyle{basic}
\ifbool{IsBook}{
\newaliascnt{highest}{chapter}
@@ -808,7 +813,6 @@
\numberwithin{equation}{highest}
-%% Cref label format
\creflabelformat{PJLtheorem}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
\creflabelformat{PJLlemma}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
\creflabelformat{PJLproposition}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
@@ -1049,7 +1053,6 @@
\creflabelformat{definition-theoremRU}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
\creflabelformat{definition-propositionRU}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
-%% Icons on the margin
\RequirePackage{marginnote}
\RequirePackage{ifoddpage}
\newcommand{\mparadjust}[1]{\renewcommand*{\marginnotevadjust}{#1}}
@@ -1282,12 +1285,30 @@
{enhanced jigsaw,pad at break*=1mm,breakable,colback=yellow!25!paper,
boxrule=0pt,frame hidden,arc=.7mm}
+\tcolorboxenvironment{question}
+ {enhanced jigsaw,pad at break*=1mm,breakable,oversize,
+ opacityframe=0,opacityback=0,lines before break=3}
+\tcolorboxenvironment{question*}
+ {enhanced jigsaw,pad at break*=1mm,breakable,oversize,
+ opacityframe=0,opacityback=0,lines before break=3}
+\tcolorboxenvironment{exercise}
+ {enhanced jigsaw,pad at break*=1mm,breakable,oversize,
+ opacityframe=0,opacityback=0,lines before break=3}
+\tcolorboxenvironment{exercise*}
+ {enhanced jigsaw,pad at break*=1mm,breakable,oversize,
+ opacityframe=0,opacityback=0,lines before break=3}
\tcolorboxenvironment{remark}
{enhanced jigsaw,pad at break*=1mm,breakable,oversize,
opacityframe=0,opacityback=0,lines before break=3}
\tcolorboxenvironment{remark*}
{enhanced jigsaw,pad at break*=1mm,breakable,oversize,
opacityframe=0,opacityback=0,lines before break=3}
+\tcolorboxenvironment{observation}
+ {enhanced jigsaw,pad at break*=1mm,breakable,oversize,
+ opacityframe=0,opacityback=0,lines before break=3}
+\tcolorboxenvironment{observation*}
+ {enhanced jigsaw,pad at break*=1mm,breakable,oversize,
+ opacityframe=0,opacityback=0,lines before break=3}
\ExplSyntaxOn
\NewDocumentCommand \AfterEnvEnd { +m }
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index f7c4e25dfe..0a212bbb5b 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -28,7 +28,7 @@
%
% \title{\sffamily easybook 文档类手册}
% \author{瞿毅}
-% \date{2021/07/14\hskip\ccwd\relax v1.27e\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/07/15\hskip\ccwd\relax v1.27f\thanks{\url{https://gitee.com/texl3/easybook}}}
%
% \maketitle
% \begin{abstract}
@@ -42,7 +42,7 @@
% \begin{itemize}
% \item 使用 \hologo{XeLaTeX}(推荐)或 \hologo{LuaLaTeX} 两种编译方式。
% \item 由于用到了一些 \LaTeX 和宏包较新的功能,建议安装最新的 \TeX 发行版,例如 \TeX~Live 2021 或 \hologo{MiKTeX} 21.2 之后的版本。
-% \item 虽然手册对基本用法做了介绍,但这并不是入门教程,您应当具有一定的 \LaTeX 使用基础。
+% \item 虽然手册对基本用法做了介绍,但这并不是入门教程,所涉及到宏包的用法与命令也需要有了解。您应当具有一定的 \LaTeX 使用基础,可以在 \TeX 综合网站 \href{https://www.ctan.org/}{CTAN} 查看相关资源。
% \end{itemize}
%
% \subsection{基本用法}
@@ -148,7 +148,7 @@
% cjkfont = <adobe|fandol|founder|mac|macnew|macold|ubuntu|windows|none>
% \end{syntax}
% 中文字体采用 \CTeX 宏集包含的字库并与其一致,具体配置方案可以查看 \CTeX 使用手册。它与 \opt{fontset} 选项是等效的,如果没有指定 \opt{cjkfont} 的值,将会自动检测用户的操作系统并选择相应的字体。
-% \changes{v1.27e}{2021/07/12}{新增 \opt{cjkfont} 选项设置中文字体,原 \opt{font} 选项设置英文字体,中文字体使用 \CTeX 的字库。}
+% \changes{v1.27f}{2021/07/12}{新增 \opt{cjkfont} 选项设置中文字体,原 \opt{font} 选项设置英文字体,中文字体使用 \CTeX 的字库。}
% \end{function}
%
% 如果需要使用其它中文字体,可以在启用选项 \opt{cjkfont = none} 后,再使用 \pkg{xeCJK} 宏包的相关命令设置字体以及声明字体族:
@@ -247,7 +247,6 @@
% \end{function}
%
% 它们的星号变体命令使文中标题不编号,但是仍然加入双语目录,若英文标题参数空置那么仅加入中文目录而不加入英文目录,这一特点与 \tn{chapter*} 等命令的行为不太一样,在一些情况下会用到。可选参数是目录中的中文标题,默认与中文标题一致,正文标题过长时可用它设置在目录中显示的标题。双语目录的格式默认是一致的,共享使用 \tn{tocset} 的设置,英文目录的章级别标题名及编号的修改方式如下:
-%
% \begin{function}{chapter/biname,chapter/binmuber}
% \begin{syntax}
% biname = \{<英文目录前名字|(Chapter\tn{space})>,<英文目录后名字>\}
@@ -288,7 +287,7 @@
% \begin{syntax}
% \tn{ctexset}\marg{键值列表}
% \end{syntax}
-% \cls{easybook} 扩展了 \CTeX 宏集 \LaTeX 3风格键值的通用控制命令 \tn{ctexset},接口选项同样可用它设置, 原有的 \meta{键值列表} 仍然可用。本文档类目前有九个模块用于实现常规的排版功能,如下表所示,它们既是统一接口 \tn{ctexset} 的路径,也是相关模块的接口命令名:
+% \cls{easybook} 扩展了 \CTeX 宏集 \hologo{LaTeX3} 风格键值的通用控制命令 \tn{ctexset},接口选项同样可用它设置, 原有的 \meta{键值列表} 仍然可用。本文档类目前有九个模块用于实现常规的排版功能,如下表所示,它们既是统一接口 \tn{ctexset} 的路径,也是相关模块的接口命令名:
% \begin{center}
% \begin{tabular}{*{5}{c}}
% \toprule
@@ -406,8 +405,8 @@
% line = <数值|(1.3)>
% table = <数值|(1.05)>
% math = <数值|(1.05)>
-% caption = <数值|(1)>
-% footnote = <数值|(1)>
+% caption = <数值|(1.1)>
+% footnote = <数值|(1.1)>
% spread-all = <数值|(empty)>
% \end{syntax}
% \ding{229} 以上选项路径为 \opt{spread/...} \\
@@ -421,7 +420,11 @@
% \item[table] 表格行距,对传统表格环境 \env{tabular}、\env{tabularx} 以及 \pkg{tabularray} 宏包的 \env{tblr} 环境生效,同时 \env{tblr} 也自带有 \opt{stretch} 选项设置行距。
% \item[math] 数学环境行距,包括 \pkg{amsmath} 和 \pkg{mathtools} 宏包附带的环境,但并未加载 \pkg{mathtools} 宏包。
% \item[caption] 图表代码标题行距。
-% \item[footnote] 脚注行距。
+% \item[footnote] 脚注整体内容的行距,可以使用 \opt{fntext-form} 的代码覆盖每个脚注单独的行距,从而与不同脚注的段落间距不同。
+% \begin{ctexexam}
+% \spread{footnote = 1.3}
+% \hdrset{fntext-form = \linespread{1.2}\selectfont}
+% \end{ctexexam}
% \item[spread-all] 统一设置上述各种行距。
% \end{optdesc}
%
@@ -470,10 +473,11 @@
% \begin{optdesc}
% \item[backend] 参考文献处理后端,默认用传统的 \hologo{BibTeX} 处理参考文献。
% \item[bib-style] 参考文献格式为中国的参考文献推荐标准 GB/T 7714-2015,有顺序编码制和著者-出版年制两种风格,理工科类一般使用顺序编码制,文科类一般使用著者-出版年制。若使用其它格式,使用 \hologo{BibTeX} 处理时需确保正确的 \opt{bst} 文件,使用 \hologo{biber} 处理可使用 \pkg{biblatex} 宏包支持的参考文献风格名称。
-% \item[cite-style] 标注参考文献的风格,\opt{backend = bibtex} 选项下可使用 \opt{super}(数字上标标注,默认)或 \opt{numbers}(数字标注)等 \pkg{natbib} 宏包带有的标注风格,\opt{backend = biblatex} 选项下可使用 \pkg{biblatex} 宏包支持的标注风格名称。
+% \item[cite-style] 标注参考文献的风格,选项 \opt{backend = bibtex} 下可使用 \opt{super}(数字上标标注,默认)或 \opt{numbers}(数字标注)等 \pkg{natbib} 宏包带有的标注风格,选项 \opt{backend = biblatex} 下可使用 \pkg{biblatex} 宏包支持的标注风格名称。
% \item[datafile] 参考文献数据库的文件名,可以是单个文件也可以是以括号包裹并以英文逗号分隔的文件列表,使用 \hologo{biber} 处理时要带有 \opt{bib} 后缀,若不在当前文件夹名称需要包含路径。只有设置数据库的文件名才会载入 \pkg{natbib} 或 \pkg{biblatex} 宏包,之后才可使用相关配置命令,否则需要手动载入相关宏包配置参考文献。
% \end{optdesc}
%
+% \subsubsection{配置参考文献}
% \begin{function}[added = 2021-01-11,updated = 2021-04-09]{\printbibliography,\BibtexPreSet,\BibtexPostSet,\BiblatexPreSet,\BiblatexPostSet}
% \begin{syntax}
% \tn{printbibliography}\oarg{键值列表}
@@ -496,6 +500,20 @@
% \item[\tn{BiblatexPostSet}] 这是 \pkg{biblatex} 宏包的后配置命令,需要与 \pkg{biblatex} 配合并放在载入其之后使用,默认保存了参考文献标题的设置。
% \end{optdesc}
%
+% 可能一些情况下您希望更加灵活地设置参考文献或由更多需求,下面举一个在导言区手动载入 \pkg{biblatex} 宏包的例子:
+% \begin{ctexexam}
+% \bibset
+% {
+% bib-style = alphabetic,
+% cite-style = numeric-comp
+% }
+% \BiblatexPreSet % 传递 biblatex 宏包的选项
+% \usepackage{biblatex}
+% \addbibresource{myrefs.bib}
+% \defbibheading{bibliography}[参考文献] % 定义参考文献标题
+% {\chapter*{#1}\markboth{#1}{#1}}
+% \end{ctexexam}
+%
% \subsection{定理样式}
% \label{subsec:theorem of style}
% \begin{function}[EXP,added = 2021-01-12,updated = 2021-07-01]{thmbox,within,headpunct,bodyfont,notefont,headfont,headindent,spaceabove,spacebelow,spacepost,headformat,brackets}
@@ -526,9 +544,9 @@
% \item[notefont] 定理题注部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
% \item[headfont] 定理标题部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
% \item[headindent] 定理标题的缩进,默认无缩进,可用 \tn{parindent} 命令设置为段落缩进。
-% \item[spaceabove] 定理环境前的间距。
-% \item[spacebelow] 定理环境后的间距。
-% \item[spacepost] 定理标题后与第一段内容的间隔。
+% \item[spaceabove] 定理环境前的间距,使用 \pkg{tcolorbox} 的环境包装后被覆盖。
+% \item[spacebelow] 定理环境后的间距,使用 \pkg{tcolorbox} 的环境包装后被覆盖。
+% \item[spacepost] 定理标题后与第一段内容的间距。
% \item[headformat] 定理开头部分各组成元素的排列和格式,这个选项一般不需要使用,其中 \tn{NAME}、\tn{NUMBER} 和 \tn{NOTE} 分别代表标题、编号和题注。
% \item[brackets] 设置行间公式编号标签的括号,以英文逗号分隔,分别为左右括号。
% \end{optdesc}
@@ -680,11 +698,11 @@
% \end{syntax}
% \ding{229} 以上选项路径为 \opt{hdrset/...} \\
% \changes{v1.25}{2021/05/12}{增加脚注样式设置选项。}
-% \changes{v1.27e}{2021/07/14}{增加脚注内容格式选项 \opt{fntext-form} 和脚注类型选项 \opt{footnotetype}。}
+% \changes{v1.27f}{2021/07/14}{增加脚注内容格式选项 \opt{fntext-form} 和脚注类型选项 \opt{footnotetype}。}
% \end{function}
%
% \begin{optdesc}
-% \item[fnmargin] 脚注首段缩进距离,等于长度 \tn{footnotemargin} 的值。
+% \item[fnmargin] 脚注首段缩进距离,等于长度 \tn{footnoteindent} 的值。
% \item[fnparskip] 脚注段落间距,等于长度 \tn{footparskip} 的值。
% \item[fnparindent] 脚注段落缩进,等于长度 \tn{footparindent} 的值。
% \item[footnotetype] 脚注的类型,悬挂缩进 \opt{hang} 是默认值,\opt{default} 是原始的类型,在一些浮动体排版的情况下,脚注可能位于页面中间,\opt{bottom} 使脚注始终位于页面底端。这是个复合选项,\opt{bottom} 可以与前两种类型重复或复合使用:
@@ -727,7 +745,6 @@
% \end{function}
%
% \tn{CTEXnumberline} 命令用于在 \CTeX 文档类的 \opt{tocline} 选项中设置目录标签的编号,它已经被重新定义,使得目录编号后间距选项 \opt{numsep} 仍然有效。\meta{编号级别} 为 \opt{chapter} 和 \opt{section} 等,也可用参数 \#1 代替当前级别类型,标题名用参数 \#2 代替一般不变。
-%
% \begin{ctexexam}
% \tocset
% {
@@ -789,7 +806,7 @@
% \ <行间公式>
% \tn{end}\marg{环境名}
% \end{syntax}
-% \pkg{amsmath} 宏包提供了一系列数学环境,它们可以排布各种对齐或不对齐的公式组。\env{multline} 环境用于一行无法放下的长公式,\env{gather} 环境用于每行居中的公式组,\env{align} 环境用于多列对齐的公式组。
+% \pkg{amsmath} 宏包提供了一系列行间数学环境,它们可以排布各种对齐或不对齐的公式组。\env{multline} 环境用于一行无法放下的长公式,\env{gather} 环境用于每行居中的公式组,\env{align} 环境用于多列对齐的公式组。
% \end{function}
%
% \subsection{表格}
@@ -799,10 +816,28 @@
% \ <表格内容>
% \tn{end}\marg{环境名}
% \end{syntax}
-% \pkg{tabularray} 是一个较新的宏包,不仅提供了 \pkg{tabularx}、\pkg{multirow}、和 \pkg{booktabs} 宏包的功能,并且不依赖其它宏包与它们同时使用不会产生冲突,还实现了用简便的键值列表方式设置表格样式。目前除了表头斜线以及跨页功能存在不足,其它方面已满足对表格绝大多数格式的需求,具体用法可见宏包的说明文档。
+% \pkg{tabularray} 是一个较新的宏包,不仅提供了 \pkg{tabularx}、\pkg{multirow}、和 \pkg{booktabs} 宏包的功能,并且不依赖其它宏包与它们同时使用不会产生冲突,还实现了用简便的键值列表方式设置表格样式。具体用法可见宏包的说明文档。下面演示一个 \env{tblr} 表格的用法:
% \changes{v1.25}{2021/05/17}{使用功能更便捷齐全的 \pkg{tabularray} 宏包设置表格样式。}
% \end{function}
%
+% \begin{ctexexam}
+% \begin{tblr}
+% {
+% colspec = {X[2,l]XX[LimeGreen]X},
+% rowspec = {Q[t]Q[m]Q[b,Magenta]Q[t]Q[m]Q[b]},
+% hline{1,6} = {1pt,solid},
+% hline{3-5} = {LightBlue,dashed},
+% vline{1,5} = {3-4}{dotted},
+% rows = {1cm,abovesep = 2pt}
+% }
+% Alpha & Beta & Gamma & Delta \\
+% Epsilon & Zeta & Eta & Theta \\
+% Iota & Kappa & \SetCell[r=2]{h,c,Cyan}Lambda & Mu \\
+% Nu & Xi & Omicron & Pi \\
+% Rho & Sigma & Tau & Upsilon
+% \end{tblr}
+% \end{ctexexam}
+%
% \subsection{列表}
% \begin{function}[added = 2021-01-05,updated = 2021-04-08]{enumerate,enumerate*,itemize,itemize*,description,description*}
% \begin{syntax}
@@ -831,7 +866,7 @@
% \ <定理内容>
% \tn{end}\marg{环境名}
% \end{syntax}
-% 这些是已预置的定理环境,它们的盒子边框可使用 \opt{thmset/thmbox = false} 关闭,其中注与证明环境不编号,证明末尾会自动添加证明结束符,声明新的定理环境见小节 \ref{subsec:theorem of style}。环境名对应的定理标题名如下:
+% 这些是预置的定理环境,可使用选项 \opt{thmset/thmbox} 为它们添加盒子边框,其中注与证明环境不编号,证明末尾会自动添加证明结束符,声明新的定理环境或更改边框样式见小节 \ref{subsec:theorem of style}。环境名对应的定理标题名如下:
% \begin{center}
% \begin{tabular}{*{8}{c}}
% \toprule
@@ -851,7 +886,7 @@
% \tn{end}\{hangparas\}
% \end{syntax}
% \tn{hangpara} 命令使其后的一个段落保持悬挂缩进,\env{hangparas} 环境使其中的段落均保持悬挂缩进。缩进将以 \meta{缩进长度} 从每个段落的 \meta{缩进开始行数} 开始。
-% \changes{v1.27e}{2021/07/11}{增加悬挂缩进段落命令 \tn{hangpara} 和环境 \env{hangparas}。}
+% \changes{v1.27f}{2021/07/11}{增加悬挂缩进段落命令 \tn{hangpara} 和环境 \env{hangparas}。}
% \end{function}
%
% \subsection{代码}
@@ -873,7 +908,7 @@
% \ \tn{item} <习题内容>
% \tn{end}\{exercise\}
% \end{syntax}
-% 习题环境 \env{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号参数时不进行编号,使用 + 号参数独立编号并启用 \pkg{tcolorbox} 支持生成标题,并使 \opt{color} 生效,此时计数器使用的值为 \tn{thetcbcounter}。第三个 \meta{键值列表} 的选项与小节 \ref{subsec:sort list} 排序列表相同,\opt{number} 的编号格式也是如此。第一个 \meta{键值列表} 中包含的选项如下:
+% 习题环境 \env{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号参数时不进行编号,使用 + 号参数独立编号并启用 \pkg{tcolorbox} 支持生成标题,并使 \opt{color} 生效,此时计数器使用的值为 \tn{thetcbcounter}。第三个 \meta{键值列表} 的选项与 \pkg{enumitem} 的排序列表相同,第一个 \meta{键值列表} 中包含的选项如下:
% \changes{v1.23}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
% \end{function}
%
@@ -885,20 +920,20 @@
% numsep = <编号与标题的间距|(0.5\tn{ccwd})>
% label = <标签内容>
% \end{syntax}
-% 第二个 \meta{键值列表} 在是否使用 + 号参数时用法不同,使用 + 号参数时为 \pkg{tcolorbox} 的盒子选项,例如 \opt{boxrule} 和 \opt{fontupper}。不使用 + 号参数时相当于设置 \tn{ctexset}\{section = {\#1}\} 键值选项列表,例如 \opt{format} 和 \opt{beforeskip}。\opt{label} 选项用于设置习题环境的引用标签,它与标签格式命令 \tn{labelformat} 对应的计数器是 eb@exercise。
+% 第二个 \meta{键值列表} 在是否使用 + 号参数时用法不同,使用 + 号参数时为 \pkg{tcolorbox} 的盒子选项,例如 \opt{boxrule} 和 \opt{fontupper}。不使用 + 号参数时相当于设置 \tn{ctexset}\{section = {\#1}\} 键值选项列表,例如 \opt{format} 和 \opt{beforeskip}。\opt{number} 为短编号形式,应当包含 A、a、I、i、或 1 其中一个符号。\opt{label} 选项用于设置习题环境的引用标签,它与标签格式命令 \tn{labelformat} 对应的计数器是 eb@exercise。
% \end{function}
%
-% \begin{function}{\setexercise,\exerprologue,\tcphanifname}
+% \begin{function}{\setexercise,\exerprologue,\tcphantomifname}
% \begin{syntax}
% \tn{setexercise}\marg{键值列表}
% \tn{exerprologue}\marg{序言内容}
-% \tn{tcphanifname}\marg{编号代码}\marg{不编号代码}
+% \tn{tcphantomifname}\marg{编号代码}\marg{不编号代码}
% \end{syntax}
-% 可以通过 \tn{setexercise} 命令使用键值列表设置上述习题选项的默认值。\tn{exerprologue} 命令在习题环境开始前插入一段内容,可以是文本或者代码,需要在每一个习题环境前使用。\tn{tcphanifname} 命令根据使用 \pkg{tcolorbox} 生成的习题标题是否编号,在超链接锚点的位置加入代码。
+% 可以通过 \tn{setexercise} 命令使用键值列表设置上述习题选项的默认值。\tn{exerprologue} 命令在习题环境开始前插入一段内容,可以是文本或者代码,需要在每一个习题环境前使用。\tn{tcphantomifname} 命令根据使用 \pkg{tcolorbox} 生成的习题标题是否编号,在超链接锚点的位置加入代码,比如使用 \tn{addcontentsline} 命令将习题标题加入目录。
% \end{function}
%
% \begin{ctexexam}
-% \tcphanifname{\markright{\UseCounter{tcbcounter}{\quad 习题}}}{}
+% \tcphantomifname{\markright{\UseCounter{tcbcounter}{\quad 习题}}}{}
% \exerprologue{习题前的一段文本}
% \begin{exercise}+[color = LightSkyBlue](after skip = 3.75ex)[itemsep = 1ex]
% \item 第一题
@@ -1016,12 +1051,13 @@
% \end{function}
%
% \subsection{引用}
-% \begin{function}[added = 2021-01-05,updated = 2021-04-11]{\ref,\labelformat}
+% \begin{function}[added = 2021-01-05,updated = 2021-07-15]{\ref,\footref,\labelformat}
% \begin{syntax}
% \tn{ref}\marg{标签}
+% \tn{footref}\marg{脚注标签}
% \tn{labelformat}\marg{计数器}\marg{标签引用格式}
% \end{syntax}
-% 使用 \tn{ref} 命令引用 \tn{label} 设置的标签,将会检测临近计数器并添加相应的前缀,比如图表、章节标题和定理等。\tn{labelformat} 可以设置标签引用格式,第二个参数中 \#1 代表 \tn{the}\meta{计数器},可以设置引用序号的前缀和后缀。
+% 使用 \tn{ref} 命令引用 \tn{label} 设置的标签,将会检测临近计数器并添加相应的前缀,比如图表、章节标题和定理等。\tn{footref} 对自动编号的脚注进行引用,为上标形式与脚注标记一致。\tn{labelformat} 可以设置标签引用格式,第二个参数中 \#1 代表 \tn{the}\meta{计数器},可以设置引用序号的前缀和后缀。
% \changes{v1.24}{2021/04/11}{取消载入 \pkg{cleveref} 宏包来交叉引用。}
% \end{function}
%
@@ -1096,8 +1132,8 @@
% \pkg{ulem} 宏包提供了多种下划线命令,下划线的粗细由命令 \tn{ULthickness} 控制,重新定义它需要使用 \tn{renewcommand} 命令。下划线的深度由 \tn{ULdepth} 控制,默认值 \tn{maxdimen} 是一个允许深度根据当前字体变化的特殊标志,当然也可以使用 \tn{setlength} 设定特定深度。
% \end{function}
%
-% \section{载入的宏包}
-% 以下为 \cls{easybook} 直接调用的关键宏包,带有 \ding{75} 符号的宏包并未载入它们,仅做了预配置和兼容性处理,可根据需要在导言区手动载入以实现相关的功能。
+% \section{依赖的宏包}
+% 以下为 \pkg{easybase} 直接调用的关键宏包,带有 \ding{75} 符号的宏包并未载入它们,仅做了预配置和兼容性处理,可根据需要在导言区手动载入以实现相关的功能。
% \begin{description}[font = \normalfont\sffamily]
% \item[ctex] 提供中文排版的通用框架。
% \item[xcolor] 提供任意颜色的设定与混合,已载入了 \opt{svgnames} 颜色库。
@@ -1140,20 +1176,26 @@
%
% \bibitem{fduthesis}
% 曾祥东.
-% \newblock \textit{\pkg{fduthesis}:复旦大学论文模板} [EB/OL].
+% \newblock \textit{\pkg{fduthesis}: 复旦大学论文模板} [EB/OL].
% \newblock version 0.7e,
% \newblock (2020-08-30)
% \urlprefix\url{https://github.com/stone-zeng/fduthesis}
%
% \bibitem{source3}
-% \textsc{The \LaTeX3 Project}.
-% \newblock \textit{The \LaTeX3 Interfaces} [CP/OL].
+% \textsc{The \LaTeX~Project Team}.
+% \newblock \textit{The \hologo{LaTeX3} Interfaces} [CP/OL].
% \newblock (2020-10-27)
% \urlprefix\url{https://ctan.org/pkg/l3kernel}
%
+% \bibitem{source2e}
+% \textsc{The \LaTeX~Project Team}.
+% \newblock \textit{The \hologo{LaTeX2e} Sources} [CP/OL].
+% \newblock (2020-10-01)
+% \urlprefix\url{https://www.ctan.org/pkg/source2e}
+%
% \bibitem{胡伟2017latex2e}
% 胡伟.
-% \newblock \textit{\LaTeXe 文类和宏包学习手册} [M].
+% \newblock \textit{\hologo{LaTeX2e} 文类和宏包学习手册} [M].
% \newblock 北京: 清华大学出版社, 2017
%
% \bibitem{刘海洋2013latex入门}
@@ -1161,16 +1203,58 @@
% \newblock \textit{\LaTeX 入门} [M].
% \newblock 北京: 电子工业出版社, 2013
%
+% \bibitem{footmisc}
+% Robin Fairbairns.
+% \newblock \textit{The \pkg{footmisc} package} [EB/OL].
+% \newblock version 5.5b,
+% \newblock (2011-06-06)
+% \urlprefix\url{https://www.ctan.org/pkg/footmisc}
+%
+% \bibitem{thmtools}
+% Dr. Ulrich M. Schwarz, Yukai Chou.
+% \newblock \textit{The \pkg{thmtools} package} [EB/OL].
+% \newblock version 0.72,
+% \newblock (2020-08-01)
+% \urlprefix\url{https://www.ctan.org/pkg/thmtools}
+%
+% \bibitem{fancyhdr}
+% Pieter van Oostrum.
+% \newblock \textit{The \pkg{fancyhdr} package} [EB/OL].
+% \newblock version 4.0.1,
+% \newblock (2020-01-28)
+% \urlprefix\url{https://www.ctan.org/pkg/fancyhdr}
+%
+% \bibitem{caption}
+% Axel Sommerfeldt.
+% \newblock \textit{The \pkg{caption} package} [EB/OL].
+% \newblock version 3.5,
+% \newblock (2020-08-30)
+% \urlprefix\url{https://www.ctan.org/pkg/caption}
+%
+% \bibitem{titletoc}
+% Javier Bezos.
+% \newblock \textit{The \pkg{titletoc} package} [EB/OL].
+% \newblock version 2.13,
+% \newblock (2019-10-16)
+% \urlprefix\url{https://www.ctan.org/pkg/titletoc}
+%
+% \bibitem{tcolorbox}
+% Thomas F. Sturm.
+% \newblock \textit{The \pkg{tcolorbox} package} [EB/OL].
+% \newblock version 4.51,
+% \newblock (2021-06-14)
+% \urlprefix\url{https://www.ctan.org/pkg/tcolorbox}
+%
% \bibitem{xmuthesis}
% Camuse Cao.
-% \newblock \textit{\pkg{xmuthesis}:厦门大学论文模板} [EB/OL].
+% \newblock \textit{\pkg{xmuthesis}: 厦门大学论文模板} [EB/OL].
% \newblock version 0.4.1,
% \newblock (2020-10-09)
% \urlprefix\url{https://github.com/CamuseCao/XMU-thesis}
%
% \bibitem{whuthesis}
% WHUTUG.
-% \newblock \textit{\pkg{whuthesis}:武汉大学论文模板} [EB/OL].
+% \newblock \textit{\pkg{whuthesis}: 武汉大学论文模板} [EB/OL].
% \newblock version 0.6d,
% \newblock (2021-05-20)
% \urlprefix\url{https://github.com/whutug/whu-thesis}
@@ -1180,12 +1264,11 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/07/14}{1.27e}
+\ProvidesExplClass{easybook}{2021/07/15}{1.27f}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
\bool_set_false:N \l__eb_title_newline_bool
-\bool_set_false:N \l__eb_font_noto_bool
\bool_set_true:N \l__eb_page_twoside_bool
\bool_set_true:N \l__eb_class_book_bool
\tl_new:N \g__eb_config_tl
@@ -1235,10 +1318,10 @@
book .meta:n = { class = book },
article .meta:n = { class = article },
- config .tl_set:N = \g__eb_config_tl,
- floatpage .bool_set:N = \l__eb_float_page_bool,
- floatpage .default:n = true,
- unknown .code:n =
+ config .tl_set:N = \g__eb_config_tl,
+ floatpage .bool_set:N = \l__eb_float_page_bool,
+ floatpage .default:n = true,
+ unknown .code:n =
{ \clist_gput_right:NV \g__eb_options_clist \CurrentOption }
}
@@ -1475,7 +1558,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/07/14}{1.27e}
+\ProvidesExplPackage{easybase}{2021/07/15}{1.27f}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -1501,15 +1584,20 @@
\seq_set_from_clist:Nn \l_tmpb_seq {#1}
\seq_map_function:NN \l_tmpb_seq #2
}
-\cs_new_protected:Npn \eb_patch_cmd:Nnn #1#2#3
+\cs_new_protected:Npn \eb_char_patch_cmd:nnn #1#2#3
{
- \ctex_patch_cmd_once:NnnnTF #1 { } {#2} {#3}
- { } { \ctex_patch_failure:N #1 }
+ \ExplSyntaxOn\makeatletter
+ \eb_clist_map_inline:nn {#1}
+ {
+ \ctex_patch_cmd_once:NnnnTF ##1 { } {#2} {#3}
+ { } { \ctex_patch_failure:N ##1 }
+ }
+ \ExplSyntaxOff\makeatother
}
-\cs_new_protected:Npn \eb_patch_cmd:nnn #1#2#3
+\cs_new_protected:Npn \eb_at_end_patch_cmd:nnn #1#2#3
{
- \eb_clist_map_inline:nn {#1}
- { \eb_patch_cmd:Nnn ##1 {#2} {#3} }
+ \eb_at_end_preamble:n
+ { \eb_char_patch_cmd:nnn {#1} {#2} {#3} }
}
\cs_new_protected:Npn \eb_preto_cmd:Nn #1#2
{
@@ -1626,6 +1714,20 @@
\keys_define:nn { } { ctex/link .inherit:n = ctex/refset }
\ctex_define:n { link .meta:nn = { ctex/link } {#1} }
\cs_set_eq:NN \link \refset
+\eb_clist_map_inline:nn
+ { style,subfont,spread,bibset,thmset,hdrset,tocset }
+ {
+ \msg_new:nnn { easybase } { ignore-#1 }
+ {
+ ##1~is~an~unknown~option~of~#1. \\
+ Please~check~the~user~manual~for~the~supported~options.
+ }
+ }
+\cs_new:Npn \eb_msg_unknown_option:n #1
+ {
+ \msg_warning:nnx
+ { easybase } { ignore-#1 } { \l_keys_key_str }
+ }
\cs_if_exist:NF \chapter
{
\newcounter{chapter}
@@ -1881,7 +1983,7 @@
}
\ctex_define:nn { hdrset }
{
- fnmargin .dim_set:N = \footnotemargin,
+ fnmargin .dim_set:N = \footnoteindent,
fnmargin .initial:n = 0.75\ccwd,
fnparskip .skip_set:N = \footparskip,
fnparskip .initial:n = 0ex,
@@ -1911,16 +2013,7 @@
{ \tl_set:Nn \l__eb_fnmark_number_choice_tl {#1} },
fnmark-num .value_required:n = true,
- unknown .code:n =
- {
- \msg_warning:nnx
- { easybase } { ignore-hdrset } { \l_keys_key_str }
- }
- }
-\msg_new:nnn { easybase } { ignore-hdrset }
- {
- #1~is~an~unknown~hdrset~option. \\
- Please~check~the~user~manual~for~the~supported~options.
+ unknown .code:n = \eb_msg_unknown_option:n { hdrset }
}
\eb_at_end_preamble:n
@@ -1985,8 +2078,8 @@
{
\hbox_set:Nn \l_tmpa_box
{
- \dim_compare:nNnTF { \footnotemargin } > { 0pt }
- { \hbox_to_wd:nn { \footnotemargin } { \eb@makefnmark\hss } }
+ \dim_compare:nNnTF { \footnoteindent } > { 0pt }
+ { \hbox_to_wd:nn { \footnoteindent } { \eb@makefnmark\hss } }
{ \eb@makefnmark }
}
\dim_set:Nn \leftmargin { \box_wd:N \l_tmpa_box }
@@ -2000,16 +2093,16 @@
}
{
\noindent
- \dim_compare:nNnTF { \footnotemargin } > { 0pt }
- { \hbox_to_wd:nn { \footnotemargin } { \hss\eb@makefnmark } }
+ \dim_compare:nNnTF { \footnoteindent } > { 0pt }
+ { \hbox_to_wd:nn { \footnoteindent } { \hss\eb@makefnmark } }
{
- \dim_compare:nNnTF { \footnotemargin } = { 0pt }
+ \dim_compare:nNnTF { \footnoteindent } = { 0pt }
{ \hbox_overlap_left:n { \eb@makefnmark } }
{
\hbox_overlap_left:n
{
\hbox_to_wd:nn
- { -\footnotemargin }
+ { -\footnoteindent }
{ \eb@makefnmark\hss }
}
}
@@ -2021,7 +2114,10 @@
\tl_if_eq:NnT \l__eb_footnotetype_choice_tl { hang } { \par }
\group_end:
}
-\eb_patch_cmd:nnn { \@footnotetext,\@mpfootnotetext }
+\cs_set_eq:NN \eb@makefntext \@makefntext
+\ctex_at_end_package:nn { footmisc }
+ { \cs_set_eq:NN \@makefntext \eb@makefntext }
+\eb_at_end_patch_cmd:nnn { \@footnotetext,\@mpfootnotetext }
{ \reset@font }
{
\linespread{\fp_use:N \l__eb_spread_footnote_fp}
@@ -2030,6 +2126,13 @@
}
\ProvideDocumentCommand{\super}{mo}{\textsuperscript{#1}}
\providecommand{\spb@textsuperscript@save}{\textsuperscript}
+\providecommand{\footref}[1]
+ {
+ \group_begin:
+ \unrestored@protected@xdef\@thefnmark{\ref{#1}}
+ \group_end:
+ \@footnotemark
+ }
\cs_set:Npn \@makefnmark
{
\hbox:n
@@ -2062,6 +2165,9 @@
\group_end:
}
}
+\cs_new:Npn \Footnote #1 { \Footnotemark{#1}\@footnotetext }
+\cs_new:Npn \Footnotemark #1 { \eb@@makefnmark{#1}\@footnotemark }
+\cs_new:Npn \Footnotetext #1 { \eb@@makefnmark{#1}\@footnotetext }
\cs_new:Npn \eb_fnmark_counter_pifont:N #1
{ \ding{\int_eval:n { 171 + #1 }} }
\cs_new:Npn \eb_fnmark_counter_pifont_neg:N #1
@@ -2082,9 +2188,6 @@
}
{ \int_use:N #1 }
}
-\cs_new:Npn \Footnote #1 { \Footnotemark{#1}\@footnotetext }
-\cs_new:Npn \Footnotemark #1 { \eb@@makefnmark{#1}\@footnotemark }
-\cs_new:Npn \Footnotetext #1 { \eb@@makefnmark{#1}\@footnotetext }
\cs_new:Npn \eb_alph:n #1 { \int_to_alph:v { c@#1 } }
\cs_set:Npn \thefootnote { \eb_footnote_counter:N \c@footnote }
\cs_set:Npn \thempfootnote { \eb_alph:n { mpfootnote } }
@@ -2108,7 +2211,8 @@
{ \tl_put_right:cn { l__eb_toc_#1_format_tl } {##1} },
#1/indent .dim_set:c = l__eb_toc_#1_indent_dim,
#1/rule .tl_set:c = l__eb_toc_#1_rule_tl,
- #1/numsep .dim_set:c = eb@toc@#1@numsep
+ #1/numsep .dim_set:c = eb@toc@#1@numsep,
+ #1/unknown .code:n = \eb_msg_unknown_option:n { tocset }
}
\seq_if_in:NnF \c__ctex_headings_seq { subparagraph }
{
@@ -2150,6 +2254,7 @@
}
}
+\cs_set_eq:NN \ctexnumberline \CTEXnumberline
\cs_set:Npn \CTEXnumberline #1
{
\CTEXifname
@@ -2409,16 +2514,7 @@
equation-con = #1
},
number-con .initial:n = { . },
- unknown .code:n =
- {
- \msg_warning:nnx
- { easybase } { ignore-style } { \l_keys_key_str }
- }
- }
-\msg_new:nnn { easybase } { ignore-style }
- {
- #1~is~an~unknown~style~option. \\
- Please~check~the~user~manual~for~the~supported~options.
+ unknown .code:n = \eb_msg_unknown_option:n { style }
}
\eb_clist_map_inline:nn
{ figure,table,lstlisting,equation }
@@ -2600,8 +2696,7 @@
\ctex_assign_heading_name:nn { biappendix } {#1}
\int_compare:nNnTF { \c@chapter } > { 0 }
{
- \ExplSyntaxOn\char_set_catcode_letter:N \@
- \eb_patch_cmd:Nnn \CTEX@addbitocline
+ \eb_char_patch_cmd:nnn \CTEX@addbitocline
{
\def\CTEX@prechapter{\CTEX@prebichapter}
\def\CTEX@thechapter{\CTEX@bichapter@number}
@@ -2612,7 +2707,6 @@
\def\CTEX@thechapter{#2}
\def\CTEX@postchapter{\CTEX@postbiappendix}
}
- \ExplSyntaxOff\char_set_catcode_other:N \@
\gdef\thechapter{\@Alph\c@chapter}
\gdef\thebichapter{\@Alph\c@bichapter}
\gdef\CTEX@prechapter{\CTEX@preappendix}
@@ -2658,7 +2752,8 @@
}
{ \tl_set:Nn \l__eb_subfont_math_choice_tl {#1} },
math .value_required:n = true,
- math .initial:n = times
+ math .initial:n = times,
+ unknown .code:n = \eb_msg_unknown_option:n { subfont }
}
\cs_new_protected:Npn \eb_put_newtxmath:n #1
@@ -2694,9 +2789,9 @@
math .fp_set:N = \l__eb_spread_math_fp,
math .initial:n = 1.05,
caption .fp_set:N = \l__eb_spread_caption_fp,
- caption .initial:n = 1,
+ caption .initial:n = 1.1,
footnote .fp_set:N = \l__eb_spread_footnote_fp,
- footnote .initial:n = 1,
+ footnote .initial:n = 1.1,
spread-all .meta:n =
{
line = #1,
@@ -2704,7 +2799,8 @@
math = #1,
caption = #1,
footnote = #1
- }
+ },
+ unknown .code:n = \eb_msg_unknown_option:n { spread }
}
\DeclareCaptionLabelSeparator{ccwd}{\hspace{\ccwd}}
@@ -2902,7 +2998,8 @@
thmbox .default:n = true,
thmbox .initial:n = false,
brackets .code:n = \eb_assign_tag_brackets:n {#1},
- brackets .initial:n = { (,) }
+ brackets .initial:n = { (,) },
+ unknown .code:n = \eb_msg_unknown_option:n { thmset }
}
\ctex_set:nn { thmset }
{
@@ -2967,13 +3064,14 @@
\linespread{\fp_use:N \l__eb_spread_math_fp}
\selectfont\ignorespaces
}
-\eb_patch_cmd:nnn { \start@gather,\start@align,\start@multline }
+\eb_at_end_patch_cmd:nnn
+ { \start@gather,\start@align,\start@multline }
{ \collect@body }
{
\linespread{\fp_use:N \l__eb_spread_math_fp}
\selectfont\collect@body
}
-\eb_patch_cmd:Nnn \gather@split
+\eb_at_end_patch_cmd:nnn \gather@split
{ \spread@equation }
{
\linespread{\fp_use:N \l__eb_spread_math_fp}
@@ -3031,7 +3129,8 @@
{ \tl_set:Nn \l__eb_bib_cite_style_tl {#1} },
datafile .clist_set:N = \l__eb_bib_datafile_clist,
bitoc-title .tl_set:N = \l__eb_bib_en_bitoc_title_tl,
- bitoc-title .initial:n = Reference
+ bitoc-title .initial:n = Reference,
+ unknown .code:n = \eb_msg_unknown_option:n { bibset }
}
\cs_new_protected:Npn \BibtexPreSet
@@ -3332,7 +3431,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/14}{1.27e}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/15}{1.27f}
{Customization of tcolorbox for easybook}
\cs_new_protected:Npn \eb_tcb_theorem_set:n #1
@@ -3386,12 +3485,12 @@
\tl_new:N \p@eb@exercise
\tl_new:N \eb@tc@list@prologue
\cs_new:Npn \exerprologue #1 { \tl_gset:Nn \eb@tc@list@prologue {#1} }
-\cs_new:Npn \tcphanifname #1#2
+\cs_new:Npn \tcphantomifname #1#2
{
\tl_gset:Nn \eb@tc@exercise@ifnametrue {#1}
\tl_gset:Nn \eb@tc@exercise@ifnamefalse {#2}
}
-\tcphanifname
+\tcphantomifname
{
\markright
{
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index fdc057e91b..fd5bca68db 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/huawei/huawei.cls b/macros/latex/contrib/huawei/huawei.cls
index 87c562736c..c05ba70175 100644
--- a/macros/latex/contrib/huawei/huawei.cls
+++ b/macros/latex/contrib/huawei/huawei.cls
@@ -21,7 +21,7 @@
% SOFTWARE.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{huawei}[2021/07/07 0.7.3 Template for Huawei Documents]
+\ProvidesClass{huawei}[2021/07/15 0.8.0 Template for Huawei Documents]
\newif\ifnosecurity
\DeclareOption{nosecurity}{\nosecuritytrue}
@@ -99,7 +99,6 @@
% Custom commands
\newcommand\nospell[1]{#1}
\newcommand\headers[1]{\setstretch{0.8}{\small\sffamily\color{gray}#1\par}}
-\newcommand\tbd[1]{{\color{red}#1}}
\newcommand\crumb[2]{\begin{minipage}{\columnwidth}\raggedright\textsc{#1}:\\#2\end{minipage}\vspace{4pt}}
\AtBeginDocument{%
diff --git a/macros/latex/contrib/huawei/huawei.pdf b/macros/latex/contrib/huawei/huawei.pdf
index 0cd923a93e..b7a570f9a1 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 f0607bf4ae..5e0cc72416 100644
--- a/macros/latex/contrib/huawei/huawei.tex
+++ b/macros/latex/contrib/huawei/huawei.tex
@@ -29,9 +29,9 @@
\begin{document}
\maketitle
-\ff{Version: 0.7.3}
+\ff{Version: 0.8.0}
\newline
-\ff{Date: 2021/07/07}
+\ff{Date: 2021/07/15}
\section{Overview}
@@ -170,16 +170,6 @@ renew them in your document, nothing will be printed.
\section{Custom Commands}
-There is a number of supplementary commands for better text formatting,
-which we introduced:
-
-\ff{\char`\\ff\{text\}}
- makes the text fixed-font with a nice border around.
-
-\ff{\char`\\tbd\{text\}}
- highlights the text, which is expected to be improved later
- (tbd stands for ``To Be Determined''), like \tbd{this one}.
-
Inside the document body you can use these commands:
\ff{\char`\\PrintFirstPage\{front-image\}}
diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.pdf b/macros/latex/contrib/nicematrix/nicematrix-french.pdf
index e630974f2f..8f455bfe5d 100644
--- a/macros/latex/contrib/nicematrix/nicematrix-french.pdf
+++ b/macros/latex/contrib/nicematrix/nicematrix-french.pdf
Binary files differ
diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.tex b/macros/latex/contrib/nicematrix/nicematrix-french.tex
index cfa537184b..4db0a583f1 100644
--- a/macros/latex/contrib/nicematrix/nicematrix-french.tex
+++ b/macros/latex/contrib/nicematrix/nicematrix-french.tex
@@ -218,6 +218,8 @@ lettres |L|, |C| et |R|, \pkg{nicematrix} doit être chargé avec l'option
\section{L'espace vertical entre les rangées}
+\label{cell-space}
+
Il est bien connu que certaines rangées des tableaux créés par défaut avec
LaTeX sont trop proches l'une de l'autre. On en donne ci-dessous un exemple
classique.
@@ -524,7 +526,7 @@ tableau) ;
\item la clé |color| prend en argument une couleur et l'applique au contenu et
trace également le cadre avec cette couleur.
\item la clé |line-width| fixe la largeur des filets servant pour le cadre (n'a
-d'intérêt que si |draw| est utilisée) ;
+d'intérêt que si |draw| ou |hvlines| est utilisée) ;
\item la clé |rounded-corners| impose des coins arrondis (pour le cadre dessiné
par |draw| et le fond dessiné par |fill|) avec un rayon égal à la valeur de
cette clé (la valeur par défaut est 4~pt\footnote{Cette valeur par défaut est la
@@ -534,8 +536,7 @@ cette clé prend comme valeur une liste d'éléments parmi les suivants : |left|
|right|, |top| et |bottom| ;
\item les clés |t| et |b| réglent la ligne de base qui sera donnée au bloc quand
celui-ci est constitué de plusieurs lignes (séparées par la commande |\\|) ;
-\item \colorbox{yellow!50}{\bfseries Nouveau 5.15}\enskip la clé |hvlines| trace
-tous les filets horizontaux et verticaux dans le bloc.
+\item la clé |hvlines| trace tous les filets horizontaux et verticaux dans le bloc.
\end{itemize}
@@ -1312,9 +1313,9 @@ première position) qui est le modèle colorimétrique pour la spécification de
couleurs.
\medskip
-\colorbox{yellow!50}{\textbf{Nouveau 5.15}}\enskip Ces commandes ne colorient
-pas les cases qui se trouvent dans les «coins» si la clé |corners| a été
-utilisée. La description de cette clé a été faite p.~\pageref{corners}.
+Ces commandes ne colorient pas les cases qui se trouvent dans les «coins» si la
+clé |corners| a été utilisée. La description de cette clé a été faite
+p.~\pageref{corners}.
\medskip
@@ -1732,6 +1733,38 @@ Dupont & Chantal & 15 janvier 1998 \\
\end{NiceTabular}
\end{center}
+\section{La commande \textbackslash RowStyle}
+
+\label{RowStyle}
+
+\colorbox{yellow!50}{\bfseries Nouveau 5.18}\enskip La commande |\RowStyle|
+prend en argument des instructions de mise en forme qui seront appliquées à
+chacune des cellules restantes sur la rangée en cours.
+
+\medskip
+Elle prend aussi en premier argument optionnel, entre crochets, une liste de
+couples clé-valeur. Les clés disponibles sont |cell-space-top-limit|,
+|cell-space-bottom-limit| et |cell-space-limits| avec le même effet que les clés
+globales de même nom (cf. p.~\pageref{cell-space}).
+
+\medskip
+\begin{BVerbatim}[boxwidth=11cm,baseline=c]
+\begin{NiceTabular}{cccc}[hlines,colortbl-like]
+~emphase#\RowStyle[cell-space-limits=3pt]{\rotate}@
+premier & deuxième & troisième & quatrième \\
+\rowcolor{blue!50}~emphase#\RowStyle{\color{white}\sffamily}@
+1 & 2 & 3 & 4 \\
+\end{NiceTabular}
+\end{BVerbatim}
+\begin{NiceTabular}{cccc}[hlines,colortbl-like]
+\RowStyle[cell-space-limits=3pt]{\rotate}
+premier & deuxième & troisième & quatrième \\
+\rowcolor{blue!50}\RowStyle{\color{white}\sffamily}
+1 & 2 & 3 & 4 \\
+\end{NiceTabular}
+
+\medskip
+La commande |\rotate| est présentée p.~\pageref{rotate}.
\section{La largeur des colonnes}
@@ -2590,7 +2623,7 @@ I & 0 & \Cdots &0 \\
\bigskip
Elle peut aussi être utilisée pour tracer une ligne diagonale non parallèle aux
autres lignes diagonales (par défaut, les lignes tracées par |\Ddots| sont
-«parallélisées» : cf~p.~\pageref{parallelization}).
+«parallélisées» : cf.~p.~\pageref{parallelization}).
\medskip
\begin{BVerbatim}
@@ -2666,7 +2699,34 @@ $\begin{NiceArray}{ccc@{\hspace{1.5em}}c}[cell-space-limits=2pt,margin]
\end{NiceArray}$
\bigskip
-Les options de la commande |\SubMatrix| sont les suivantes :
+\colorbox{yellow!50}{\bfseries Nouveau 5.18}\enskip La commande |\SubMatrix|
+accepte en fait également deux arguments optionnels spécifiés par les symboles
+traditionnels |^| et |_| pour des élements en exposant et en indice.
+
+\medskip
+\begin{scope}
+\hfuzz=15cm
+\begin{BVerbatim}[boxwidth=11cm,baseline=c]
+$\begin{bNiceMatrix}[right-margin=1em]
+1 & 1 & 1 \\
+1 & a & b \\
+1 & c & d
+\CodeAfter
+ ~emphase#\SubMatrix[{2-2}{3-3}]^{T}@
+\end{bNiceMatrix}$
+\end{BVerbatim}
+$\begin{bNiceMatrix}[right-margin=1em]
+1 & 1 & 1 \\
+1 & a & b \\
+1 & c & d
+\CodeAfter
+ \SubMatrix[{2-2}{3-3}]^{T}
+\end{bNiceMatrix}$
+\end{scope}
+
+
+\bigskip
+Les clés disponibles pour la commande |\SubMatrix| sont les suivantes :
%
\begin{itemize}
\item |left-xshift| et |right-xshift| déplacent horizontalement les délimiteurs
@@ -2763,7 +2823,6 @@ créée par une commande |\SubMatrix|. Ce nom est utilisé pour créer des nœud
PGF/Tikz : voir p.~\pageref{node-sub-matrix}.
\bigskip
-\colorbox{yellow!50}{\textbf{Nouveau 5.15}}\enskip
Il est également possible de spécifier des délimiteurs\footnote{Les délimiteurs
en question sont \verb|(|, \verb|[| et \verb|\{| et les fermants correspondants.
On peut bien sûr aussi mettre des \verb+|+ et des \verb+||+ dans le
@@ -3188,10 +3247,13 @@ $\begin{bNiceMatrix}[r]
\subsection{La commande \textbackslash rotate}
+\label{rotate}
+
Utilisée au début d'une case, la commande |\rotate| (fournie par \pkg{nicematrix}) compose le contenu après une
rotation de 90° dans le sens direct.
-Dans l'exemple suivant, on l'utilise dans le |code-for-first-row|.
+Dans l'exemple suivant, on l'utilise dans le |code-for-first-row|.\footnote{On
+ peut aussi l'utiliser dans |\RowStyle| (cf. p.~\pageref{RowStyle}).}
\bigskip
@@ -3419,6 +3481,10 @@ $\begin{bNiceMatrix}[delimiters/color=red]
3 & 4
\end{bNiceMatrix}$
+\medskip
+Cette couleur s'applique aussi aux délimiteurs tracés par |\SubMatrix|
+(cf.~p.~\pageref{sub-matrix}).
+
\subsection{L'environnement \{NiceArrayWithDelims\}}
diff --git a/macros/latex/contrib/nicematrix/nicematrix.dtx b/macros/latex/contrib/nicematrix/nicematrix.dtx
index f9ae880666..fdaa5ac42a 100644
--- a/macros/latex/contrib/nicematrix/nicematrix.dtx
+++ b/macros/latex/contrib/nicematrix/nicematrix.dtx
@@ -15,8 +15,8 @@
%
% \fi
% \iffalse
-\def\myfileversion{5.17a}
-\def\myfiledate{2021/07/04}
+\def\myfileversion{5.18}
+\def\myfiledate{2021/07/15}
%
%
%<*batchfile>
@@ -27,7 +27,6 @@
\preamble
-
Copyright (C) 2018-2021 by F. Pantigny
-----------------------------------
@@ -268,6 +267,8 @@ version 2005/12/01 or later.
%
% \section{The vertical space between the rows}
%
+% \label{cell-space}
+%
% It's well known that some rows of the arrays created by default with LaTeX
% are, by default, too close to each other. Here is a classical example.
%
@@ -572,7 +573,7 @@ version 2005/12/01 or later.
% \item the key |color| takes in as value a color and apply that color the
% content of the block but draws also the frame of the block with that color;
% \item the key |line-width| is the width (thickness) of the frame (this key
-% should be used only when the key |draw| is in force);
+% should be used only when the key |draw| or the key |hvlines| is in force);
% \item the key |rounded-corners| requires rounded corners (for the frame drawn
% by |draw| and the shape drawn by |fill|) with a radius equal to the value of
% that key (the default value is 4~pt\footnote{This value is the initial value
@@ -582,8 +583,7 @@ version 2005/12/01 or later.
% by |left|, |right|, |top| and |bottom|;
% \item the keys |t| and |b| fix the base line that will be given to the block
% when it has a multi-line content (the lines are separated by |\\|);
-% \item \colorbox{yellow!50}{\bfseries New 5.15}\enskip the keys |hvlines| draws
-% all the vertical and horizontal rules in the block.
+% \item the keys |hvlines| draws all the vertical and horizontal rules in the block.
% \end{itemize}
%
% \interitem
@@ -1319,9 +1319,8 @@ version 2005/12/01 or later.
% colors.
%
% \medskip
-% \colorbox{yellow!50}{\textbf{New 5.15}}\enskip These commands don't color the
-% cells which are in the ``corners'' if the key |corners| is used. This key has
-% been described p.~\pageref{corners}.
+% These commands don't color the cells which are in the ``corners'' if the key
+% |corners| is used. This key has been described p.~\pageref{corners}.
%
% \medskip
% \begin{itemize}
@@ -1724,6 +1723,38 @@ version 2005/12/01 or later.
% \end{NiceTabular}
% \end{center}
%
+% \section{The command \textbackslash RowStyle}
+%
+% \label{RowStyle}
+%
+% \colorbox{yellow!50}{\bfseries New 5.18}\enskip The command |\RowStyle| takes
+% in as argument some formatting intructions that will be applied to each cell
+% on the rest of the current row.
+%
+% \medskip
+% That command also takes in as optional argument (between square brackets)
+% a list of key-value pairs. The available keys are |cell-space-top-limit|,
+% |cell-space-bottom-limit| and |cell-space-limits| with the same meaning that
+% the corresponding global keys (cf. p.~\pageref{cell-space}).
+%
+% \medskip
+% \begin{BVerbatim}[boxwidth=11cm,baseline=c]
+% \begin{NiceTabular}{cccc}[hlines,colortbl-like]
+% ~emphase#\RowStyle[cell-space-limits=3pt]{\rotate}@
+% first & second & third & fourth \\
+% \rowcolor{blue!50}~emphase#\RowStyle{\color{white}\sffamily}@
+% 1 & 2 & 3 & 4 \\
+% \end{NiceTabular}
+% \end{BVerbatim}
+% \begin{NiceTabular}{cccc}[hlines,colortbl-like]
+% \RowStyle[cell-space-limits=3pt]{\rotate}
+% first & second & third & fourth \\
+% \rowcolor{blue!50}\RowStyle{\color{white}\sffamily}
+% 1 & 2 & 3 & 4 \\
+% \end{NiceTabular}
+%
+% \medskip
+% The command |\rotate| is described p.~\pageref{rotate}.
%
% \section{The width of the columns}
% \label{width}
@@ -2637,6 +2668,33 @@ version 2005/12/01 or later.
% \end{NiceArray}$
%
% \bigskip
+% \colorbox{yellow!50}{\bfseries New 5.18}\enskip In fact, the command
+% |\SubMatrix| also takes in two optional arguments specified by the
+% traditionnal symbols |^| and |_| for material in superscript and subscript.
+%
+% \medskip
+% \begin{scope}
+% \hfuzz=15cm
+% \begin{BVerbatim}[boxwidth=11cm,baseline=c]
+% $\begin{bNiceMatrix}[right-margin=1em]
+% 1 & 1 & 1 \\
+% 1 & a & b \\
+% 1 & c & d
+% \CodeAfter
+% ~emphase#\SubMatrix[{2-2}{3-3}]^{T}@
+% \end{bNiceMatrix}$
+% \end{BVerbatim}
+% $\begin{bNiceMatrix}[right-margin=1em]
+% 1 & 1 & 1 \\
+% 1 & a & b \\
+% 1 & c & d
+% \CodeAfter
+% \SubMatrix[{2-2}{3-3}]^{T}
+% \end{bNiceMatrix}$
+% \end{scope}
+%
+%
+% \bigskip
% The options of the command |\SubMatrix| are as follows:
% \begin{itemize}
% \item |left-xshift| and |right-shift| shift horizontally the delimiters (there
@@ -2735,7 +2793,6 @@ version 2005/12/01 or later.
%
%
% \bigskip
-% \colorbox{yellow!50}{\textbf{New 5.15}}\enskip
% It's also possible to specify some delimiters\footnote{Those delimiters are
% \verb|(|, \verb|[|, |\{| and the closing ones. Of course, it's also
% possible to put \verb+|+ and \verb+||+ in the preamble of the environement.}
@@ -3147,11 +3204,15 @@ version 2005/12/01 or later.
%
% \subsection{The command \textbackslash rotate}
%
+% \label{rotate}
+%
% The package \pkg{nicematrix} provides a command |\rotate|. When used in the
% beginning of a cell, this command composes the contents of the cell after a
% rotation of 90° in the direct sens.
%
-% In the following command, we use that command in the |code-for-first-row|.
+% In the following command, we use that command in the
+% |code-for-first-row|.\footnote{It can also be used in \verb|RowStyle|
+% (cf.~p.~\pageref{RowStyle}.}
%
%\bigskip
%
@@ -3378,6 +3439,9 @@ version 2005/12/01 or later.
% 3 & 4
% \end{bNiceMatrix}$
%
+% \medskip
+% This colour alos applies to the delimiters drawn by the command |\SubMatrix|
+% (cf.~p.~\pageref{sub-matrix}).
%
% \subsection{The environment \{NiceArrayWithDelims\}}
%
@@ -5147,7 +5211,9 @@ version 2005/12/01 or later.
\AtBeginDocument
{
\@ifpackageloaded { colortbl }
- { \bool_set_true:N \c_@@_colortbl_loaded_bool }
+ {
+ \bool_set_true:N \c_@@_colortbl_loaded_bool
+ }
{
% \end{macrocode}
% The command |\CT@arc@| is a command of \pkg{colortbl} which sets the color of
@@ -5164,7 +5230,6 @@ version 2005/12/01 or later.
% \end{macrocode}
% Idem for |\CT@drs@|.
% \begin{macrocode}
- \cs_set_protected:Npn \CT@drsc@ { }
\cs_set:Npn \doublerulesepcolor #1 # { \CT@drs { #1 } }
\cs_set:Npn\CT@drs #1 #2
{
@@ -5184,6 +5249,11 @@ version 2005/12/01 or later.
}
}
% \end{macrocode}
+%
+% We need that line for the case where you use \verb+||+ with \pkg{colortbl} loaded.
+% \begin{macrocode}
+\cs_set_protected:Npn \CT@drsc@ { }
+% \end{macrocode}
%
% \bigskip
% We have to redefine |\cline| for several reasons. The command |\@@_cline| will
@@ -5717,6 +5787,13 @@ version 2005/12/01 or later.
\tl_new:N \l_@@_code_before_tl
\bool_new:N \l_@@_code_before_bool
% \end{macrocode}
+%
+% \bigskip
+% The following token list will contain ce code inserted in each cell of the
+% current row (this token list will be cleared at the beginning of each row).
+% \begin{macrocode}
+\tl_new:N \g_@@_row_style_tl
+% \end{macrocode}
%
% \bigskip
% The following dimensions will be used when drawing the dotted lines.
@@ -6962,7 +7039,7 @@ version 2005/12/01 or later.
r .code:n = \tl_set:Nn \l_@@_type_of_col_tl r ,
small .bool_set:N = \l_@@_small_bool ,
small .value_forbidden:n = true ,
- unknown .code:n = \@@_error:n { Unknown~option~for~NiceMatrix }
+ unknown .code:n = \@@_error:n { Unknown~key~for~NiceMatrix }
}
% \end{macrocode}
%
@@ -6994,7 +7071,7 @@ version 2005/12/01 or later.
tabularnote .value_required:n = true ,
r .code:n = \@@_error:n { r~or~l~with~preamble } ,
l .code:n = \@@_error:n { r~or~l~with~preamble } ,
- unknown .code:n = \@@_error:n { Unknown~option~for~NiceArray }
+ unknown .code:n = \@@_error:n { Unknown~key~for~NiceArray }
}
% \end{macrocode}
%
@@ -7012,7 +7089,7 @@ version 2005/12/01 or later.
small .value_forbidden:n = true ,
r .code:n = \@@_error:n { r~or~l~with~preamble } ,
l .code:n = \@@_error:n { r~or~l~with~preamble } ,
- unknown .code:n = \@@_error:n { Unknown~option~for~NiceMatrix }
+ unknown .code:n = \@@_error:n { Unknown~key~for~NiceMatrix }
}
% \end{macrocode}
%
@@ -7034,7 +7111,7 @@ version 2005/12/01 or later.
\int_zero:N \l_@@_last_col_int ,
r .code:n = \@@_error:n { r~or~l~with~preamble } ,
l .code:n = \@@_error:n { r~or~l~with~preamble } ,
- unknown .code:n = \@@_error:n { Unknown~option~for~NiceTabular }
+ unknown .code:n = \@@_error:n { Unknown~key~for~NiceTabular }
}
% \end{macrocode}
%
@@ -7049,6 +7126,7 @@ version 2005/12/01 or later.
% \begin{macrocode}
\cs_new_protected:Npn \@@_Cell:
{
+ \tl_gclear:N \g_@@_exit_cell_tl
% \end{macrocode}
% At the beginning of the cell, we link |\CodeAfter| to a command which do
% \emph{not} begin with |\omit| (whereas the standard version of |\CodeAfter|
@@ -7087,6 +7165,7 @@ version 2005/12/01 or later.
% The codes |\l_@@_code_for_first_row_tl| and \emph{al} don't apply in the
% corners of the matrix.
% \begin{macrocode}
+ \g_@@_row_style_tl
\int_compare:nNnTF \c@iRow = 0
{
\int_compare:nNnT \c@jCol > 0
@@ -7112,6 +7191,7 @@ version 2005/12/01 or later.
% \begin{macrocode}
\cs_new_protected:Npn \@@_begin_of_row:
{
+ \tl_gclear:N \g_@@_row_style_tl
\int_gincr:N \c@iRow
\dim_gset_eq:NN \g_@@_dp_ante_last_row_dim \g_@@_dp_last_row_dim
\dim_gset:Nn \g_@@_dp_last_row_dim { \box_dp:N \@arstrutbox }
@@ -7205,6 +7285,7 @@ version 2005/12/01 or later.
{
\@@_math_toggle_token:
\hbox_set_end:
+ \g_@@_exit_cell_tl
\bool_if:NT \g_@@_rotate_bool \@@_rotate_cell_box:
\@@_adjust_size_box:
% \end{macrocode}
@@ -7480,8 +7561,8 @@ version 2005/12/01 or later.
\str_if_empty:NF \l_@@_name_str
{
\pgfnodealias
- { \l_@@_name_str - row - \int_use:N \c@iRow }
- { \@@_env: - row - \int_use:N \c@iRow }
+ { \l_@@_name_str - row - \@@_succ:n \c@iRow }
+ { \@@_env: - row - \@@_succ:n \c@iRow }
}
\endpgfpicture
}
@@ -7715,6 +7796,7 @@ version 2005/12/01 or later.
\cs_set_eq:NN \CodeAfter \@@_CodeAfter:
\cs_set_eq:NN \diagbox \@@_diagbox:nn
\cs_set_eq:NN \NotEmpty \@@_NotEmpty:
+ \cs_set_eq:NN \RowStyle \@@_RowStyle:n
\bool_if:NT \l_@@_colortbl_like_bool \@@_colortbl_like:
\bool_if:NT \l_@@_renew_dots_bool \@@_renew_dots:
% \end{macrocode}
@@ -7954,8 +8036,49 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
+% \bigskip
+% \begin{macrocode}
+\keys_define:nn { NiceMatrix / RowStyle }
+ {
+ cell-space-top-limit .code:n =
+ {
+ \tl_gput_right:Nn \g_@@_row_style_tl
+ {
+ \tl_gput_right:Nn \g_@@_exit_cell_tl
+ { \dim_set:Nn \l_@@_cell_space_top_limit_dim { #1 } }
+ }
+ } ,
+ cell-space-top-limit .value_required:n = true ,
+ cell-space-bottom-limit .code:n =
+ {
+ \tl_gput_right:Nn \g_@@_row_style_tl
+ {
+ \tl_gput_right:Nn \g_@@_exit_cell_tl
+ { \dim_set:Nn \l_@@_cell_space_bottom_limit_dim { #1 } }
+ }
+ } ,
+ cell-space-bottom-limit .value_required:n = true ,
+ cell-space-limits .meta:n =
+ {
+ cell-space-top-limit = #1 ,
+ cell-space-bottom-limit = #1 ,
+ } ,
+ unknown .code:n = \@@_error:n { Unknown~key~for~RowStyle }
+ }
+% \end{macrocode}
%
% \bigskip
+% \begin{macrocode}
+\NewDocumentCommand \@@_RowStyle:n { O { } m }
+ {
+ \tl_gset:Nn \g_@@_row_style_tl { #2 }
+ \keys_set:nn { NiceMatrix / RowStyle } { #1 }
+ #2
+ \ignorespaces
+ }
+% \end{macrocode}
+%
+% \bigskip
% \subsection*{The \textbackslash CodeBefore}
%
% The following command will be executed if the |\CodeBefore| has to be actually executed.
@@ -8247,6 +8370,7 @@ version 2005/12/01 or later.
\seq_gclear:N \g_@@_pos_of_stroken_blocks_seq
\seq_gclear:N \g_@@_pos_of_xdots_seq
\tl_gclear_new:N \g_@@_code_before_tl
+ \tl_gclear:N \g_@@_row_style_tl
% \end{macrocode}
%
% \bigskip
@@ -8374,7 +8498,6 @@ version 2005/12/01 or later.
% in |{NiceArray}| or |{NiceTabular}|, we have no delimiter to put (but we have
% tabular notes to put). We begin with this case.
%
-% Remark that, in all cases, |@@_use_arraybox_with_notes_c:| is used.
% \begin{macrocode}
\bool_if:NTF \l_@@_NiceArray_bool
{
@@ -9415,7 +9538,18 @@ version 2005/12/01 or later.
% whether there is tabular notes or not before the composition of the blocks).
% \begin{macrocode}
\cs_new_protected:Npn \@@_use_arraybox_with_notes_c:
- {
+ {
+% \end{macrocode}
+% With an environment |{Matrix}|, you want to remove the exterior |\arraycolsep|
+% but we don't know the number of columns (since there is no preamble) and
+% that's why we can't put |@{}| at the end of the preamble. That's why we remove
+% a |\arraycolsep| now.
+% \begin{macrocode}
+ \bool_lazy_and:nnT \l_@@_Matrix_bool \l_@@_NiceArray_bool
+ {
+ \box_set_wd:Nn \l_@@_the_array_box
+ { \box_wd:N \l_@@_the_array_box - \arraycolsep }
+ }
% \end{macrocode}
% We need a |{minipage}| because we will insert a LaTeX list for the tabular
% notes (that means that a |\vtop{\hsize=...}| is not enough).
@@ -9888,8 +10022,8 @@ version 2005/12/01 or later.
% \begin{macrocode}
\int_gset:Nn \g_tmpa_int 1
\bool_if:NTF \g_@@_last_col_found_bool
+ { \prg_replicate:nn { \g_@@_col_total_int - 3 } }
{ \prg_replicate:nn { \g_@@_col_total_int - 2 } }
- { \prg_replicate:nn { \g_@@_col_total_int - 1 } }
{
&
\omit
@@ -9926,17 +10060,58 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-% We want to remove the exterior |\arraycolsep| of a environment |{NiceArray}|.
% \begin{macrocode}
- \bool_lazy_all:nT
- {
- \l_@@_NiceArray_bool
- { \bool_not_p:n \l_@@_NiceTabular_bool }
- { \clist_if_empty_p:N \l_@@_vlines_clist }
- { \bool_not_p:n \l_@@_exterior_arraycolsep_bool }
- { ! \l_@@_bar_at_end_of_pream_bool }
- }
- { \skip_horizontal:n { - \col@sep } }
+ &
+ \omit
+ \int_gincr:N \g_tmpa_int
+ \skip_horizontal:N \g_tmpa_skip
+ \bool_lazy_all:nT
+ {
+ \l_@@_NiceArray_bool
+ { \bool_not_p:n \l_@@_NiceTabular_bool }
+ { \clist_if_empty_p:N \l_@@_vlines_clist }
+ { \bool_not_p:n \l_@@_exterior_arraycolsep_bool }
+ { ! \l_@@_bar_at_end_of_pream_bool }
+ }
+ { \skip_horizontal:N -\col@sep }
+ \bool_if:NT \l_@@_code_before_bool
+ {
+ \hbox
+ {
+ \skip_horizontal:N -0.5\arrayrulewidth
+% \end{macrocode}
+% With an environment |{Matrix}|, you want to remove the exterior |\arraycolsep|
+% but we don't know the number of columns (since there is no preamble) and
+% that's why we can't put |@{}| at the end of the preamble. That's why we remove
+% a |\arraycolsep| now.
+% \begin{macrocode}
+ \bool_lazy_and:nnT \l_@@_Matrix_bool \l_@@_NiceArray_bool
+ { \skip_horizontal:N -\arraycolsep }
+ \pgfsys@markposition { \@@_env: - col - \@@_succ:n \g_tmpa_int }
+ \skip_horizontal:N 0.5\arrayrulewidth
+ \bool_lazy_and:nnT \l_@@_Matrix_bool \l_@@_NiceArray_bool
+ { \skip_horizontal:N \arraycolsep }
+ }
+ }
+ \pgfpicture
+ \pgfrememberpicturepositiononpagetrue
+ \pgfcoordinate { \@@_env: - col - \@@_succ:n \g_tmpa_int }
+ {
+ \bool_lazy_and:nnTF \l_@@_Matrix_bool \l_@@_NiceArray_bool
+ {
+ \pgfpoint
+ { - 0.5 \arrayrulewidth - \arraycolsep }
+ \c_zero_dim
+ }
+ { \pgfpoint { - 0.5 \arrayrulewidth } \c_zero_dim }
+ }
+ \str_if_empty:NF \l_@@_name_str
+ {
+ \pgfnodealias
+ { \l_@@_name_str - col - \@@_succ:n \g_tmpa_int }
+ { \@@_env: - col - \@@_succ:n \g_tmpa_int }
+ }
+ \endpgfpicture
% \end{macrocode}
%
% \bigskip
@@ -10708,6 +10883,8 @@ version 2005/12/01 or later.
\dim_set:Nn \l_tmpa_dim { ( \l_tmpc_dim - \l_tmpa_dim ) / 2 }
\dim_set:Nn \l_tmpb_dim { ( \l_tmpd_dim - \l_tmpb_dim ) / 2 }
\pgfnode { @@_diag_node } { center } { } { \@@_env: - ##1 } { }
+ \str_if_empty:NF \l_@@_name_str
+ { \pgfnodealias { \l_@@_name_str - ##1 } { \@@_env: - ##1 } }
}
% \end{macrocode}
% Now, the last node. Of course, that is only a |coordinate| because there is
@@ -10722,6 +10899,15 @@ version 2005/12/01 or later.
\pgfnodealias
{ \@@_env: - last }
{ \@@_env: - \int_eval:n { \int_max:nn \c@iRow \c@jCol + 1 } }
+ \str_if_empty:NF \l_@@_name_str
+ {
+ \pgfnodealias
+ { \l_@@_name_str - \int_use:N \l_tmpa_int }
+ { \@@_env: - \int_use:N \l_tmpa_int }
+ \pgfnodealias
+ { \l_@@_name_str - last }
+ { \@@_env: - last }
+ }
\endpgfpicture
}
% \end{macrocode}
@@ -13537,7 +13723,7 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-% \subsubsection*{The key corners}
+% \subsection*{The key corners}
%
% When the key |corners| is raised, the rules are not drawn in the
% corners. Of course, we have to compute the corners before we begin to draw the
@@ -14563,6 +14749,13 @@ version 2005/12/01 or later.
\tl_if_empty:NTF \l_@@_color_tl
{ \int_compare:nNnT { #2 } = 1 \set@color }
{ \color { \l_@@_color_tl } }
+% \end{macrocode}
+% If the block is mono-row, we use |\g_@@_row_style_tl| even it has yet been used
+% in the beginning of the cell where the command |\Block| has been issued
+% because we want to be able to take into account a potential instruction of
+% color of the font in |\g_@@_row_style_tl|.
+% \begin{macrocode}
+ \int_compare:nNnT { #1 } = 1 \g_@@_row_style_tl
\group_begin:
\cs_set:Npn \arraystretch { 1 }
\dim_set_eq:NN \extrarowheight \c_zero_dim
@@ -14852,34 +15045,35 @@ version 2005/12/01 or later.
\keys_set:nn { NiceMatrix / Block / SecondPass } { #5 }
% \end{macrocode}
%
+%
% \begin{macrocode}
- \tl_if_empty:NF \l_@@_draw_tl
+ \bool_if:NT \l_@@_hvlines_block_bool
{
\tl_gput_right:Nx \g_nicematrix_code_after_tl
{
- \@@_stroke_block:nnn
+ \@@_hvlines_block:nnn
{ \exp_not:n { #5 } }
{ #1 - #2 }
{ \int_use:N \l_@@_last_row_int - \int_use:N \l_@@_last_col_int }
}
- \seq_gput_right:Nn \g_@@_pos_of_stroken_blocks_seq
- { { #1 } { #2 } { #3 } { #4 } }
}
% \end{macrocode}
-%
+%
% \begin{macrocode}
- \bool_if:NT \l_@@_hvlines_block_bool
+ \tl_if_empty:NF \l_@@_draw_tl
{
\tl_gput_right:Nx \g_nicematrix_code_after_tl
{
- \@@_hvlines_block:nnn
+ \@@_stroke_block:nnn
{ \exp_not:n { #5 } }
{ #1 - #2 }
{ \int_use:N \l_@@_last_row_int - \int_use:N \l_@@_last_col_int }
}
+ \seq_gput_right:Nn \g_@@_pos_of_stroken_blocks_seq
+ { { #1 } { #2 } { #3 } { #4 } }
}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\clist_if_empty:NF \l_@@_borders_clist
{
@@ -15296,7 +15490,7 @@ version 2005/12/01 or later.
% \bigskip
% The first argument of |\@@_hvlines_block:nnn| is a list of options for the
-% rules that wewill draw. The second argument is the upper-left cell of the
+% rules that we will draw. The second argument is the upper-left cell of the
% block (with, as usual, the syntax $i$|-|$j$) and the third is the last cell of
% the block (with the same syntax).
% \begin{macrocode}
@@ -15501,7 +15695,7 @@ version 2005/12/01 or later.
{
\exp_not:N \begin { NiceArrayWithDelims } { #1 } { #2 }
{ * { \int_use:N \l_@@_nb_cols_int } { \l_@@_type_of_col_tl } }
- [ \l_tmpa_tl ]
+ [ \exp_not:V \l_tmpa_tl ]
}
\int_compare:nNnT \l_@@_first_row_int = 0
{
@@ -15952,17 +16146,27 @@ version 2005/12/01 or later.
% \item |#2| is the upper-left cell of the matrix with the format $i$-$j$;
% \item |#3| is the lower-right cell of the matrix with the format $i$-$j$;
% \item |#4| is the right delimiter;
-% \item |#5| is the list of options of the command.
+% \item |#5| is the list of options of the command;
+% \item |#6| is the potential subscript;
+% \item |#7| is the potential superscript.
% \end{itemize}
+% For explanations about the construction with rescanning of the preamble, see
+% the documentation for the user command |\Cdots|.
% \begin{macrocode}
-\NewDocumentCommand \@@_SubMatrix { m m m m O { } }
+\AtBeginDocument
{
- \peek_remove_spaces:n
- { \@@_sub_matrix:nnnnn { #1 } { #2 } { #3 } { #4 } { #5 } }
- }
+ \tl_set:Nn \l_@@_argspec_tl { m m m m O { } E { _ ^ } { { } { } } }
+ \tl_set_rescan:Nno \l_@@_argspec_tl { } \l_@@_argspec_tl
+ \exp_args:NNV \NewDocumentCommand \@@_SubMatrix \l_@@_argspec_tl
+ {
+ \peek_remove_spaces:n
+ { \@@_sub_matrix:nnnnnnn
+ { #1 } { #2 } { #3 } { #4 } { #5 } { #6 } { #7 } }
+ }
+ }
% \end{macrocode}
% \begin{macrocode}
-\cs_new_protected:Npn \@@_sub_matrix:nnnnn #1 #2 #3 #4 #5
+\cs_new_protected:Npn \@@_sub_matrix:nnnnnnn #1 #2 #3 #4 #5 #6 #7
{
\group_begin:
% \end{macrocode}
@@ -16023,7 +16227,7 @@ version 2005/12/01 or later.
{
\dim_compare:nNnTF \l_@@_x_final_dim = { - \c_max_dim }
{ \@@_error:nn { impossible~delimiter } { right } }
- { \@@_sub_matrix_i:nn { #1 } { #4 } }
+ { \@@_sub_matrix_i:nnnn { #1 } { #4 } { #6 } { #7 } }
}
\endpgfpicture
}
@@ -16032,9 +16236,10 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-% |#1| is the left delimiter dans |#2| is the right one.
+% |#1| is the left delimiter, |#2| is the right one, |#3| is the subscript and
+% |#4| is the superscript.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_sub_matrix_i:nn #1 #2
+\cs_new_protected:Npn \@@_sub_matrix_i:nnnn #1 #2 #3 #4
{
\@@_qpoint:n { row - \l_@@_first_i_tl - base }
\dim_set:Nn \l_@@_y_initial_dim
@@ -16217,9 +16422,10 @@ version 2005/12/01 or later.
{ ( \l_@@_y_initial_dim + \l_@@_y_final_dim ) / 2 }
}
\str_if_empty:NTF \l_@@_submatrix_name_str
- { \@@_node_right:nn #2 { } }
+ { \@@_node_right:nnnn #2 { } { #3 } { #4 } }
{
- \@@_node_right:nn #2 { \@@_env: - \l_@@_submatrix_name_str - right }
+ \@@_node_right:nnnn #2
+ { \@@_env: - \l_@@_submatrix_name_str - right } { #3 } { #4 }
}
% \end{macrocode}
%
@@ -16368,8 +16574,9 @@ version 2005/12/01 or later.
% The command |\@@_node_right:nn| puts the right delimiter with the correct size.
% The argument |#1| is the delimiter to put. The argument |#2| is the name we
% will give to this PGF node (if the key |name| has been used in |\SubMatrix|).
+% The argument |#3| is the subscript and |#4| is the superscript.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_node_right:nn #1 #2
+\cs_new_protected:Npn \@@_node_right:nnnn #1 #2 #3 #4
{
\pgfnode
{ rectangle }
@@ -16387,7 +16594,9 @@ version 2005/12/01 or later.
\@depth \c_zero_dim
\@width \c_zero_dim
}
- \right #1
+ \right #1
+ \tl_if_empty:nF { #3 } { _ { \smash { #3 } } }
+ ^ { \smash { #4 } }
\c_math_toggle_token
}
{ #2 }
@@ -16428,7 +16637,7 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \begin{macrocode}
-\@@_msg_new:nnn { Unknown~option~for~package }
+\@@_msg_new:nnn { Unknown~key~for~package }
{
The~key~'\l_keys_key_str'~is~unknown. \\
If~you~go~on,~it~will~be~ignored. \\
@@ -16483,7 +16692,7 @@ version 2005/12/01 or later.
transparent .value_forbidden:n = true,
footnote .bool_set:N = \c_@@_footnote_bool ,
footnotehyper .bool_set:N = \c_@@_footnotehyper_bool ,
- unknown .code:n = \@@_error:n { Unknown~option~for~package }
+ unknown .code:n = \@@_error:n { Unknown~key~for~package }
}
\ProcessKeysOptions { NiceMatrix / Package }
% \end{macrocode}
@@ -16727,13 +16936,22 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { Unknown~key~for~xdots }
{
- As~for~now,~there~is~only~three~key~available~here:~'color',~'line-style'~
+ As~for~now,~there~is~only~three~keys~available~here:~'color',~'line-style'~
and~'shorten'~(and~you~try~to~use~'\l_keys_key_str').~If~you~go~on,~
this~key~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
+\@@_msg_new:nn { Unknown~key~for~RowStyle }
+ {
+ As~for~now,~there~is~only~three~keys~available~here:~'cell-space-top-limit',~
+ 'cell-space-bottom-limit~and~'cell-space-limits'~(and~you~try~to~use~
+ '\l_keys_key_str').~If~you~go~on,~this~key~will~be~ignored.
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
\@@_msg_new:nn { Unknown~key~for~rowcolors }
{
As~for~now,~there~is~only~two~keys~available~here:~'cols'~and~'respect-blocks'~
@@ -17153,7 +17371,7 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \begin{macrocode}
-\@@_msg_new:nnn { Unknown~option~for~NiceArray }
+\@@_msg_new:nnn { Unknown~key~for~NiceArray }
{
The~key~'\l_keys_key_str'~is~unknown~for~the~environment~
\{NiceArray\}. \\
@@ -17212,7 +17430,7 @@ version 2005/12/01 or later.
% |NiceMatrix/pNiceArray| (but not by |NiceMatrix/NiceArray| because, for this
% set of keys, there is also the keys |t|, |c| and~|b|).
% \begin{macrocode}
-\@@_msg_new:nnn { Unknown~option~for~NiceMatrix }
+\@@_msg_new:nnn { Unknown~key~for~NiceMatrix }
{
The~key~'\l_keys_key_str'~is~unknown~for~the~
\@@_full_name_env:. \\
@@ -17266,7 +17484,7 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \begin{macrocode}
-\@@_msg_new:nnn { Unknown~option~for~NiceTabular }
+\@@_msg_new:nnn { Unknown~key~for~NiceTabular }
{
The~key~'\l_keys_key_str'~is~unknown~for~the~environment~
\{NiceTabular\}. \\
@@ -17842,6 +18060,9 @@ version 2005/12/01 or later.
% It's now possible to use a key |l|, |r| or |c| with the command
% |\pAutoNiceMatrix| (and the similar ones).
%
+% \subsection*{Changes between versions 5.17 and 5.18}
+%
+% New command |\RowStyle|
%
% \PrintIndex
%
diff --git a/macros/latex/contrib/nicematrix/nicematrix.pdf b/macros/latex/contrib/nicematrix/nicematrix.pdf
index ca40e46907..18b8189cdf 100644
--- a/macros/latex/contrib/nicematrix/nicematrix.pdf
+++ b/macros/latex/contrib/nicematrix/nicematrix.pdf
Binary files differ
diff --git a/macros/latex/contrib/stackengine/stackengine.pdf b/macros/latex/contrib/stackengine/stackengine.pdf
index 26644fcb57..829e001d2d 100644
--- a/macros/latex/contrib/stackengine/stackengine.pdf
+++ b/macros/latex/contrib/stackengine/stackengine.pdf
Binary files differ
diff --git a/macros/latex/contrib/stackengine/stackengine.sty b/macros/latex/contrib/stackengine/stackengine.sty
index e7b79fb04b..d99282df7d 100644
--- a/macros/latex/contrib/stackengine/stackengine.sty
+++ b/macros/latex/contrib/stackengine/stackengine.sty
@@ -1,6 +1,6 @@
-\def\stackengineversionnumber{v4.01}
+\def\stackengineversionnumber{v4.1}
\ProvidesPackage{stackengine}
-[2017/02/13 \stackengineversionnumber\
+[2021/07/15 \stackengineversionnumber\
Stacking text and objects in convenient ways]
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -78,6 +78,16 @@
% \setlength, which could also cause potential problems with the
% calc package.
% -Changed \global\def to \gdef and \global\edef to \xdef.
+% V4.1 -Removed \widthof type measurements in \stackinset and
+% \stackengine, instead setting things in saveboxes from the
+% outset and using \wd, thereby only setting stacked content
+% once. This is helpful for speed and also if counters are
+% present in arguments, which are now incremented only once.
+% -Save and restore counter entering/exiting \@stack, which
+% favorably resolves issue of nesting for multi-row stacks.
+% -Introduce \lstackMath and \lstackText as local versions of
+% \stackMath and \stackText (which are global).
+% -Eliminated \usestackstrut (became internal \@usestackstrut)
\RequirePackage{etoolbox}
\RequirePackage{listofitems}% REQUIRES listofitems.sty AND listofitems.tex
\usepackage{calc}
@@ -91,6 +101,8 @@
\newlength\@stackedboxwidth
\newsavebox\@addedbox
\newsavebox\@anchorbox
+\newsavebox\@insetbox
+\newsavebox\@backgroundbox
\newsavebox\stackedbox
\newsavebox{\@centerbox}
\newcounter{ROWcellindex@}
@@ -113,7 +125,7 @@
\newcommand\@readMANYrows[1]{%
\expandafter\setsepchar\expandafter{\SEP@char}%
\readlist*\stack@arg{#1}%
- \xdef\stackengine@args{\stack@arglen}%
+ \edef\stackengine@args{\stack@arglen}%
}
%%%%%
@@ -162,18 +174,17 @@
\def\stacktype{S}% S for constant gap shortstack;
% L for constant baselineskip longstack
-% DEPRECATED USAGE \def\usestackstrut{}; INSTEAD USE \strutshortanchors{}
-%\def\usestackstrut{T}
-
%%%%% MODES
\newcommand\stackMath{\gdef\stack@delim{$}}
\newcommand\stackText{\gdef\stack@delim{}}
+\newcommand\lstackMath{\def\stack@delim{$}}
+\newcommand\lstackText{\def\stack@delim{}}
\stackText
\newcommand\strutlongstacks[1]{\def\@strutlongstacks{#1}}
\strutlongstacks{F}
-\newcommand\strutshortanchors[1]{\def\usestackstrut{#1}}
+\newcommand\strutshortanchors[1]{\def\@usestackstrut{#1}}
\strutshortanchors{T}
%%%%% MACROS
@@ -192,10 +203,10 @@
\sbox{\stackedbox}{%
\sbox{\@anchorbox}{\@STRT\stack@delim#2\stack@delim}%
\sbox{\@addedbox}{\@STRT\stack@delim#3\stack@delim}%
- \settowidth{\@stackedboxwidth}{\@STRT\stack@delim#2\stack@delim}%
+ \setlength{\@stackedboxwidth}{\wd\@anchorbox}%
\if F#7%
\ifdim\wd\@addedbox>\@stackedboxwidth%
- \settowidth{\@stackedboxwidth}{\stack@delim\@STRT#3\stack@delim}%
+ \setlength{\@stackedboxwidth}{\wd\@addedbox}%
\fi%
\fi%
\setlength{\@boxshift}{#1}%
@@ -216,14 +227,14 @@
\usebox{\@anchorbox}%
\hspace{-.5\wd\@anchorbox}%
\hspace{-.5\wd\@addedbox}%
- \raisebox{\@boxshift}{\@STRT\stack@delim#3\stack@delim}%
+ \raisebox{\@boxshift}{\usebox{\@addedbox}}%
\hspace{-.5\wd\@addedbox}%
\hspace{.5\@stackedboxwidth}%
\else%
\if l#5%
\usebox{\@anchorbox}%
\hspace{-\wd\@anchorbox}%
- \raisebox{\@boxshift}{\@STRT\stack@delim#3\stack@delim}%
+ \raisebox{\@boxshift}{\usebox{\@addedbox}}%
\hspace{-\wd\@addedbox}%
\hspace{\@stackedboxwidth}%
\else%
@@ -232,7 +243,7 @@
\hspace{-\wd\@anchorbox}%
\usebox{\@anchorbox}%
\hspace{-\wd\@addedbox}%
- \raisebox{\@boxshift}{\@STRT\stack@delim#3\stack@delim}%
+ \raisebox{\@boxshift}{\usebox{\@addedbox}}%
\fi%
\fi%
\fi%
@@ -255,6 +266,7 @@
\newcommand*\Longunderstack[2][\stackalignment]{\@stack{#1}{#2}{U}{L}}
\newcommand*\@stack[4]{%
+ \edef\sv@stackindex{\the@stackindex}%
\bgroup% SO AS NOT TO INTERFERE WITH loi's \setsepchar
\@readMANYrows{#2}%
\if U#3%
@@ -286,6 +298,7 @@
}%
\if F\quietstack\usebox{\stackedbox}\fi%
\egroup%
+ \setcounter{@stackindex}{\sv@stackindex}%
}
% PERHAPS THESE SIX MACROS CAN BE REPLACED BY \toplap AND \bottomlap
@@ -312,12 +325,12 @@
\newcommand*\stackanchor[3][\stackgap]{%
\setlength{\stack@tmplength}{#1}%
\setlength{\stack@tmplength}{.5\stack@tmplength}%
- \if T\usestackstrut%
+ \if T\@usestackstrut%
\if S\stacktype\addtolength{\stack@tmplength}%
{.5\ht\strutbox-.5\dp\strutbox}\fi%
\fi%
\stackengine{\stack@tmplength}{}{#2}{O}{\stackalignment}{T}{F}{\stacktype}%
- \if T\usestackstrut%
+ \if T\@usestackstrut%
\if S\stacktype\addtolength{\stack@tmplength}%
{-\ht\strutbox+\dp\strutbox}\fi%
\fi%
@@ -350,28 +363,26 @@
%\stackinset{l/c/r}{x}{b/c/t}{y}{inset}{anchor}
\newcommand*\stackinset[6]{%
- \def\conditioned@inset{\stack@delim#5\stack@delim}%
- \def\conditioned@anchor{\stack@delim#6\stack@delim}%
+ \sbox\@backgroundbox{\stack@delim#6\stack@delim}%
+ \sbox\@insetbox{\stack@delim#5\stack@delim}%
\ifstrequal{#4}{}%
{\setlength{\stack@tmplength}{0pt}}%
{\setlength{\stack@tmplength}{#4}}%
\if c#3%
- \setlength{\temp@stkl}{%
- \heightof{\conditioned@anchor}+\depthof{\conditioned@anchor}%
- -\heightof{\conditioned@inset}-\depthof{\conditioned@inset}}%
+ \setlength{\temp@stkl}{\ht\@backgroundbox+\dp\@backgroundbox%
+ -\ht\@insetbox-\dp\@insetbox}%
\addtolength{\stack@tmplength}{.5\temp@stkl}%
\fi%
\ifstrequal{#2}{}{\def\stack@tmp{0pt}}{\def\stack@tmp{#2}}%
\def\stack@lroffset{\rule{\stack@tmp}{0pt}}%
- \addtolength{\stack@tmplength}{%
- \heightof{\conditioned@inset}+\depthof{\conditioned@inset}}%
+ \addtolength{\stack@tmplength}{\ht\@insetbox+\dp\@insetbox}%
\if c#1%
- \def\conditioned@inset{\stack@lroffset\stack@lroffset#5}%
+ \def\conditioned@inset{\stack@lroffset\stack@lroffset\usebox{\@insetbox}}%
\else%
- \def\conditioned@inset{\stack@lroffset#5\stack@lroffset}%
+ \def\conditioned@inset{\stack@lroffset\usebox{\@insetbox}\stack@lroffset}%
\fi%
- \stackengine{-\stack@tmplength}{#6}{\conditioned@inset}%
- {\inset@valign{#3}}{#1}{\quietstack}{T}{S}%
+ \stackengine{-\stack@tmplength}{\usebox{\@backgroundbox}}%
+ {\conditioned@inset}{\inset@valign{#3}}{#1}{\quietstack}{T}{S}%
}
\def\inset@valign#1{\if t#1O\else U\fi}
diff --git a/macros/latex/contrib/stackengine/stackengine.tex b/macros/latex/contrib/stackengine/stackengine.tex
index 9a870887ac..35384cdac6 100644
--- a/macros/latex/contrib/stackengine/stackengine.tex
+++ b/macros/latex/contrib/stackengine/stackengine.tex
@@ -32,7 +32,7 @@
\rule{0em}{.7em}\small Highly customized stacking of objects, insets,
baseline changes, \textit{etc.}\\
\rule{0em}{2.7em}\large Steven B. Segletes\\
-steven.b.segletes.civ@mail.mil\\
+SSegletes@verizon.net\\
\rule{0em}{1.7em}\today\\
\stackengineversionnumber%
\end{center}
@@ -55,13 +55,13 @@ you to familiarize yourself with a few terms as used in this package.
\Huge\setstackgap{S}{.4ex}
\setstackgap{L}{2.2ex}\normalsize
-In this package, ``Short'' refers to squeezing the extra space out of
-glyphs comprising the stack, so that the inter-item gap is solely what
+In this package, ``Short'' refers to squeezing or growing the empty space
+between glyphs comprising the stack, so that the inter-item gap is solely what
is set. Likewise, ``Long'' refers to a stack kept at constant
inter-item baseline spacing. Let's look at the following two
examples to see this clearly.
-Notice the consistent inter-item gap on a short stack:
+Notice the consistent inter-item gap between short stack items:
\Huge
\Shortstack{{\fbox{t}} {\fbox{y}} {\fbox{k}} {\fbox{e}}}%
{\quad\setstackgap{S}{\dimexpr.4ex+1.2pt}\Shortstack{t y k e}}
@@ -244,8 +244,10 @@ In addition to parameter definitions, there are several {\ste} mode
settings:
\itshape
-\vb|\stackMath|\\
-\vb|\stackText|\\
+\vb|\stackMath|\qquad \textup{and}\qquad \vb|\lstackMath|
+ \quad\textup{(global/local declaration)}\\
+\vb|\stackText|\qquad \textup{and}\qquad \vb|\lstackText|
+ \quad\textup{(global/local declaration)}\\
\vb|\strutlongstacks{T| or \vb|F}|\\
\vb|\strutshortanchors{T| or \vb|F}|\\
\vb|\setstackEOL{|end-of-line character\vb|}|
@@ -262,7 +264,9 @@ text mode. Both of these modes are global in their scope, so that invocation,
even within a macro, will continue to persist until later changed. If
you would like to have a single application stacked in math mode, without
changing the default mode setting, one could use the \vb|\ensurestackMath{}|
-macro (see \ref{s:esm}).
+macro (see \ref{s:esm}), or else the local versions that are scope
+limited, \vb|\lstackMath|\margcmd{lstackMath} and/or
+\vb|\lstackText|\margcmd{lstackText}.
By default, stacks made by {\ste} are set in unframed boxes that are
flush with the top and bottom of the stack. The \vb|\addstackgap|
@@ -301,12 +305,12 @@ space token, leading and trailing spaces are ignored in the row data for
the four cited stacking commands, as well as their derivatives
\vb|\Centerstack| and \vb|\Vectorstack|. (Note: other stacking commands
in the \vb|\stackon| / \vb|\stackunder| family will not ignore, but
-retain spaces in their arguments, since there is no issue associated
-with EOL seperators.)
+retain leading/trailing spaces in their arguments, since there are no
+EOL separators present.)
Note that these five mode-setting commands are not themselves parameters
to be part of a {\ste} argument, but are instead to be issued as separate
-commands prior to the invocation of a desired stacking macro.
+declarative commands prior to the invocation of a desired stacking macro.
\subsection{Stacking Macros}
@@ -381,8 +385,8 @@ forced to be a long stack with right-alignment and be typeset using
While the stacking macros in the following sections offer the convenience
of a condensed syntax, which can be useful within your document, it may be
preferable to use the \vb|\stackengine| macro to create your own
-stacking macros, since one can achieve the stacking result without
-having to modify the package defaults.
+stacking macros, since one can achieve the stacking result regardless of
+how the package defaults are set.
\subsubsection{\cmd{stackon} and \cmd{stackunder}\label{s:sou}}
@@ -394,11 +398,11 @@ an optional argument.
\itshape
\vb|\stackon[|stacklength%
\vb|]{|anchor%
- \vb|}{|item
+ \vb|}{|item%
\vb|}|\\
\vb|\stackunder[|stacklength%
\vb|]{|anchor%
- \vb|}{|item
+ \vb|}{|item%
\vb|}|
\upshape
@@ -464,8 +468,8 @@ As of V3.1 of \ste, the user may define the the argument to
\vb|\Longstack|, \vb|\Shortstack|, \vb|\Longunderstack|, and
\vb|\Shortunderstack| with a row separator different than a space.
The \vb|[usestackEOL]| package option will make the EOL character within
-these stacking commands a \vb|\\| character instead of a space. Here
-are an example of equivalent stack arguments for two different EOL
+these stacking commands a \vb|\\| macro instead of a space. Here
+is an example of equivalent stack arguments for two different EOL
characters:
Space EOL:~~~~\vb|{a {b c} {\P} $\beta^2$ ANCHOR}|\\
@@ -632,7 +636,7 @@ which are, respectively,\\
The macro \vb|\ensurestackMath{}| macro is used to force its argument
(a stacking command) to be processed in math mode, without setting
the global default stacking
-mode to math mode (otherwise accomplished via \vb|\stackMath|). Note
+mode to math mode (accomplished via \vb|\stackMath|). Note
that this macro does \textbf{not} ensure that
all elements of its argument are processed in math mode (\textit{i.e.},
it does not use, nor is it a replacement for \vb|\ensuremath|), but
@@ -708,8 +712,8 @@ horizontal size of the anchor, even if the inset spills outside of it).
While this command was designed with inlaid images in mind (see
\S\ref{s:ii}), there is nothing that prevents its use to inlay
character glyphs upon each other, as in
-\stackinset{c}{}{c}{-.25ex}{*}{O}, accomplished with
-\vb|\stackinset{c}{}{c}{-.25ex}{*}{O}|.
+\stackinset{c}{}{c}{-.3ex}{*}{O}, accomplished with
+\vb|\stackinset{c}{}{c}{-.3ex}{*}{O}|.
\subsubsection{\cmd{addstackgap}\label{s:asg}}
\def\stacktype{S}
@@ -1131,7 +1135,7 @@ Make sure you use the one that best applies to your situation.
\section{Image Insets\label{s:ii}}
\setstackgap{L}{18pt}%
-The command \vb|\stackinset| allows images to be
+The command \vb|\stackinset| allows images (or other data) to be
stacked atop one another, to produce the effect of an inset image. In
addition to specifying the two images, the effect can be tailored by
specifying the vertical and horizontal offset of the inset image.
@@ -1277,13 +1281,15 @@ stacking gaps and alignment, there are several hints to remember.
\begin{enumerate}
-\item Arguments to stacking commands are only taken in math mode, by
-default, following the invocation of the \vb|\stackMath| macro.
+\item Arguments to stacking commands are only taken in math mode,
+\textit{by default}, following the invocation of the
+\vb|\stackMath| macro.
-\item The \vb|\stackMath| and \vb|\stackText| macros are not to be
-used within stacking arguments, but are invoked prior to stacking, to
-set the default manner in which stacking arguments are subsequently
-processed.
+\item The \vb|\stackMath| and \vb|\stackText| macros, as well as
+their locally scoped counterparts, \vb|\lstackMath| and \vb|\lstackText|,
+are not to be used within stacking arguments, but are invoked prior
+to stacking, to set the manner in which stacking arguments
+are subsequently processed.
\item As described in \S\ref{s:sls}, if the math argument has spaces in
a command which uses space-separated lists, or if the argument ends in a
@@ -1350,12 +1356,6 @@ because of more preferable alternatives. They have been omitted from the
current documentation, except for mention here. They are:
\begin{itemize}
-\item \vb|\def\usestackstrut{T/F}|. This definition is fully replaced
-by the mode setting given by the \vb|\strutshortanchors{T/F}| macro.
-The new name is less ambiguous and the macro form is chosen vis-\`a-vis
-the \vb|\def| form, because the macro represents a \textbf{mode} of
-stack construction, rather than an argument parameter.
-
\item \vb|\bottominset| and \vb|\topinset|. These
macros are subsumed by the much more versatile \vb|\stackinset| macro.
The replacement offers insets relative to not only the top and bottom,
@@ -1465,6 +1465,8 @@ Definition, Mode, or Macro & \S\ Defined & \S\ Used\\
\ref{s:nsc}, \ref{s:mm}\\
\cmd{Lstackgap}&\ref{s:parms}&\ref{s:st}, \ref{s:stackeng}, \ref{s:bbl},
\ref{s:nsc}, \ref{s:bc}\\
+\cmd{lstackMath}&\ref{s:sm}&\\
+\cmd{lstackText}&\ref{s:sm}&\\
\cmd{parenVectorstack}&\ref{s:csvs}&\\
\cmd{quietstack}&\ref{s:parms}&\ref{s:stackeng}, \ref{s:qs}\\
\cmd{savestack}&\ref{s:ss}&\ref{s:sanc}, \ref{s:svs}, \ref{s:cae},
diff --git a/macros/latex/contrib/to-be-determined/DEPENDS.txt b/macros/latex/contrib/to-be-determined/DEPENDS.txt
new file mode 100644
index 0000000000..ba363a7c9f
--- /dev/null
+++ b/macros/latex/contrib/to-be-determined/DEPENDS.txt
@@ -0,0 +1,3 @@
+hard xkeyval
+hard xcolor
+hard soul
diff --git a/macros/latex/contrib/to-be-determined/README.md b/macros/latex/contrib/to-be-determined/README.md
new file mode 100644
index 0000000000..26adf210da
--- /dev/null
+++ b/macros/latex/contrib/to-be-determined/README.md
@@ -0,0 +1,28 @@
+[![make](https://github.com/yegor256/to-be-determined/actions/workflows/latexmk.yml/badge.svg)](https://github.com/yegor256/to-be-determined/actions/workflows/latexmk.yml)
+[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/to-be-determined/blob/master/LICENSE.txt)
+
+This LaTeX package helps you highlight pieces of your code that needs
+further work (TBD stands for "to be determined").
+The package uses [`xcolor`](https://ctan.org/pkg/minted)
+and [`soul`](https://ctan.org/pkg/soul) packages.
+
+First, [install it](https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages)
+from [CTAN](https://ctan.org/pkg/to-be-determined)
+and then use in the preamble:
+
+```tex
+\documentclass{article}
+\usepackage{to-be-determined}
+\begin{document}
+The budget is \tbd{99.00 USD}.
+\end{document}
+```
+
+The full example and all commands are available in the
+[`to-be-determined.tex`](https://github.com/yegor256/to-be-determined/blob/master/to-be-determined.tex) file.
+
+If you want to contribute yourself, make a fork, then create a branch,
+then run `make` in the root directory.
+It should compile everything without errors. If not, submit an issue and wait.
+Otherwise, make your changes and then run `make` again. If the build is
+still clean, submit a pull request.
diff --git a/macros/latex/contrib/to-be-determined/to-be-determined.pdf b/macros/latex/contrib/to-be-determined/to-be-determined.pdf
new file mode 100644
index 0000000000..02529dfa3d
--- /dev/null
+++ b/macros/latex/contrib/to-be-determined/to-be-determined.pdf
Binary files differ
diff --git a/macros/latex/contrib/to-be-determined/to-be-determined.sty b/macros/latex/contrib/to-be-determined/to-be-determined.sty
new file mode 100644
index 0000000000..7dcea97033
--- /dev/null
+++ b/macros/latex/contrib/to-be-determined/to-be-determined.sty
@@ -0,0 +1,47 @@
+% (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.
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{to-be-determined}[2021/07/15 0.1.0 Highlighting places requiring future work]
+
+\RequirePackage{xkeyval}
+\newif\iftbdhide
+\DeclareOptionX{hide}{\tbdhidetrue}
+\newif\iftbdoff
+\DeclareOptionX{off}{\tbdofftrue}
+\ProcessOptionsX\relax
+
+\RequirePackage{xcolor}
+\RequirePackage{soul}
+
+\newcommand\tbd[1]{{%
+ \iftbdoff\else%
+ \sethlcolor{yellow}%
+ \iftbdhide%
+ \hl{TBD}
+ \else%
+ \hl{#1}
+ \fi%
+ \fi%
+}}
+
+\endinput
diff --git a/macros/latex/contrib/to-be-determined/to-be-determined.tex b/macros/latex/contrib/to-be-determined/to-be-determined.tex
new file mode 100644
index 0000000000..cdab462bd1
--- /dev/null
+++ b/macros/latex/contrib/to-be-determined/to-be-determined.tex
@@ -0,0 +1,73 @@
+% (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[12pt]{article}
+\usepackage[tt=false,type1=true]{libertine}
+\usepackage{multicol}
+\usepackage{to-be-determined}
+\usepackage{ffcode}
+\title{\ff{to-be-determined}: \LaTeX{} Package \\ for highlighting places that require more work}
+\author{Yegor Bugayenko}
+\date{0.1.0 2021/07/15}
+\begin{document}
+\pagenumbering{gobble}
+\raggedbottom
+\setlength{\parindent}{0pt}
+\setlength{\columnsep}{32pt}
+\setlength{\parskip}{6pt}
+\maketitle
+
+This package helps you highlight places in your articles
+and make sure it looks nice. Install it from CTAN and then
+use like this:
+
+\begin{multicols}{2}
+\setlength{\parskip}{0pt}
+\scriptsize
+\raggedcolumns
+\begin{verbatim}
+\documentclass{article}
+\usepackage{to-be-determined}
+\begin{document}
+The budget is \tbd{99.00 USD}.
+\end{document}
+\end{verbatim}
+
+\columnbreak
+
+The budget is \tbd{99.00 USD}.
+
+\end{multicols}
+
+With this package it's also possible to highlight
+\tbd{larger pieces of text that take \textbf{a few lines}} on the page.
+
+If you want to hide the content of what's inside \ff{\char`\\tbd},
+use \ff{hide} option of the package. They will all be replaced with
+\tbd{TBD} placeholders.
+
+If you want them to disappear entirely, use the \ff{off} package option.
+
+More details about this package you find
+in the \ff{yegor256/to-be-determined} GitHub repository.
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/tudscr/README.md b/macros/latex/contrib/tudscr/README.md
index 165e4116c2..ce8935a46b 100644
--- a/macros/latex/contrib/tudscr/README.md
+++ b/macros/latex/contrib/tudscr/README.md
@@ -4,10 +4,11 @@
Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2021
- tudscr 2021/07/06 v2.06m
+ tudscr 2021/07/15 v2.06n
This material is subject to the LaTeX Project Public License version 1.3c
- or later. See http://www.latex-project.org/lppl.txt for details.
+ or later.<br>
+ See http://www.latex-project.org/lppl.txt for details.
----------------------------------------------------------------------------
@@ -58,6 +59,9 @@ Das Bundle beinhaltet:
Versionen
---------
+**v2.06n** (2021/07/15)
++ Fix für **siunitx**
+
**v2.06m** (2021/07/06)
+ Fix eines internen Fehlers mit LuaLaTeX
@@ -280,6 +284,9 @@ The bundle offers:
Versions
--------
+**v2.06n** (2021/07/15)
++ bug fix for **siunitx**
+
**v2.06m** (2021/07/06)
+ bug fix for an internal error with LuaLaTeX
diff --git a/macros/latex/contrib/tudscr/doc/LICENSE.md b/macros/latex/contrib/tudscr/doc/LICENSE.md
index 33bfa98d87..164b7e79c0 100644
--- a/macros/latex/contrib/tudscr/doc/LICENSE.md
+++ b/macros/latex/contrib/tudscr/doc/LICENSE.md
@@ -7,29 +7,20 @@
----------------------------------------------------------------------------
This work may be distributed and/or modified under the conditions of the
- LaTeX Project Public License, version 1.3c of the license. The latest
- version of this license is in http://www.latex-project.org/lppl.txt and
- version 1.3c or later is part of all distributions of LaTeX 2005/12/01
- or later and of this work. This work has the LPPL maintenance status
- "author-maintained". The current maintainer and author of this work
- is Falk Hanisch.
+ LaTeX Project Public License, either version 1.3c of this license or
+ any later version. The latest version of this license is in<br>
+ &emsp;http://www.latex-project.org/lppl.txt<br>
+ and version 1.3c or later is part of all distributions of
+ LaTeX version 2008-05-04 or later.
- However, only members of the Technische Universität Dresden are permitted
- to publish documents in the corporate design, in particular with the use
- of an official logo.
+ This work has the LPPL maintenance status "maintained".
+
+ The current maintainer and author of this work is Falk Hanisch.
----------------------------------------------------------------------------
- Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
- in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
- Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
- Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
- oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
- "author-maintained", wird somit allein durch den Autor verwaltet. Der
- aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
-
- Jedoch ist es lediglich Angehörigen der Technischen Universität Dresden
- gestattet, Dokumente im Corporate Design insbesondere mit der Verwendung
- eines offiziellen Logos zu veröffentlichen.
+ However, only members of the Technische Universität Dresden are permitted
+ to publish documents in the corporate design, in particular with the use
+ of an official logo.
----------------------------------------------------------------------------
diff --git a/macros/latex/contrib/tudscr/doc/tudscr.pdf b/macros/latex/contrib/tudscr/doc/tudscr.pdf
index b3350d86d7..0b97ccbb5f 100644
--- a/macros/latex/contrib/tudscr/doc/tudscr.pdf
+++ b/macros/latex/contrib/tudscr/doc/tudscr.pdf
Binary files differ
diff --git a/macros/latex/contrib/tudscr/doc/tudscr_print.pdf b/macros/latex/contrib/tudscr/doc/tudscr_print.pdf
index 47312ee22f..2772364dd0 100644
--- a/macros/latex/contrib/tudscr/doc/tudscr_print.pdf
+++ b/macros/latex/contrib/tudscr/doc/tudscr_print.pdf
Binary files differ
diff --git a/macros/latex/contrib/tudscr/doc/tudscrsource.pdf b/macros/latex/contrib/tudscr/doc/tudscrsource.pdf
index 044f9c05f6..9f26752023 100644
--- a/macros/latex/contrib/tudscr/doc/tudscrsource.pdf
+++ b/macros/latex/contrib/tudscr/doc/tudscrsource.pdf
Binary files differ
diff --git a/macros/latex/contrib/tudscr/doc/tutorials/mathswap.pdf b/macros/latex/contrib/tudscr/doc/tutorials/mathswap.pdf
index 3ed0f3478c..24cbd34801 100644
--- a/macros/latex/contrib/tudscr/doc/tutorials/mathswap.pdf
+++ b/macros/latex/contrib/tudscr/doc/tutorials/mathswap.pdf
Binary files differ
diff --git a/macros/latex/contrib/tudscr/doc/tutorials/mathtype.pdf b/macros/latex/contrib/tudscr/doc/tutorials/mathtype.pdf
index a4d5a5d894..c784efffc7 100644
--- a/macros/latex/contrib/tudscr/doc/tutorials/mathtype.pdf
+++ b/macros/latex/contrib/tudscr/doc/tutorials/mathtype.pdf
Binary files differ
diff --git a/macros/latex/contrib/tudscr/doc/tutorials/treatise.pdf b/macros/latex/contrib/tudscr/doc/tutorials/treatise.pdf
index b0a3e429c6..114f90f083 100644
--- a/macros/latex/contrib/tudscr/doc/tutorials/treatise.pdf
+++ b/macros/latex/contrib/tudscr/doc/tutorials/treatise.pdf
Binary files differ
diff --git a/macros/latex/contrib/tudscr/source/doc/tudscr.tex b/macros/latex/contrib/tudscr/source/doc/tudscr.tex
index 58cb34423f..737412d91f 100644
--- a/macros/latex/contrib/tudscr/source/doc/tudscr.tex
+++ b/macros/latex/contrib/tudscr/source/doc/tudscr.tex
@@ -10,7 +10,8 @@
literate=%
{ä}{{\"a}}1 {ö}{{\"o}}1 {ü}{{\"u}}1
{Ä}{{\"A}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1
- {~}{{\textasciitilde}}1 {ß}{{\ss}}1
+ {ß}{{\ss}}1 {~}{{\textasciitilde}}1
+ {»}{{\guillemetright}}1 {«}{{\guillemetleft}}1
}
\usepackage{bookmark}
@@ -19,30 +20,29 @@
%\tracinglabels[all]
%\tracingmarkup
-%\tracingbundle
\begin{document}
\newrobustcmd*\cdurl{%
\begingroup%
\hypersetup{hidelinks}%
- \href{https://tu-dresden.de/cd/}{https://tu-dresden.de/cd}%
+ \href{https://tu-dresden.de/cd}{https://tu-dresden.de/cd}%
\endgroup%
}
\faculty{\cdurl}
-\date{2021-07-06}
-\author{%
- Falk Hanisch%
- \expandafter\emailaddress\expandafter{\tudscrmail}%
-}
-\publishers{\GitHubRepo'[]}
\subject{\TUDScript \vTUDScript{} basierend auf \KOMAScript}
-\title{Ein {LaTeX}-Bundle für Dokumente im \TUDCD}
+\title{Ein \hologo{LaTeX}-Bundle für Dokumente im \TUDCD}
\ifdef{\tudprintflag}{%
\subtitle{Benutzerhandbuch\thanks{\href{tudscr}{Online-Version}}}%
}{%
\subtitle{Benutzerhandbuch\thanks{\href{tudscr_print}{Druckversion}}}%
}
+\author{%
+ Falk Hanisch%
+ \expandafter\emailaddress\expandafter{\tudscrmail}%
+}
+\publishers{\GitHubRepo'[]}
+\date{2021-07-15}
\makeatletter
\begingroup%
@@ -51,9 +51,9 @@
\let\footnote\@gobble%
\let\emailaddress\@gobble%
\hypersetup{%
- pdfauthor = {\@author},%
- pdftitle = {\@title},%
- pdfsubject = {Benutzerhandbuch für \TUDScript},%
+ pdfauthor = {\@author},%
+ pdftitle = {\@title},%
+ pdfsubject = {\@subtitle},%
pdfkeywords = {LaTeX, \TUDScript, Benutzerhandbuch},%
}%
\endgroup%
diff --git a/macros/latex/contrib/tudscr/source/tudscr-area.dtx b/macros/latex/contrib/tudscr/source/tudscr-area.dtx
index 0d5e1e0b25..52414b66a7 100644
--- a/macros/latex/contrib/tudscr/source/tudscr-area.dtx
+++ b/macros/latex/contrib/tudscr/source/tudscr-area.dtx
@@ -4,27 +4,20 @@
% TUD-Script -- Corporate Design of Technische Universität Dresden
% ----------------------------------------------------------------------------
%
-% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2020
+% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2021
%
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
%
diff --git a/macros/latex/contrib/tudscr/source/tudscr-base.dtx b/macros/latex/contrib/tudscr/source/tudscr-base.dtx
index bc96db0bff..7a47fa64cc 100644
--- a/macros/latex/contrib/tudscr/source/tudscr-base.dtx
+++ b/macros/latex/contrib/tudscr/source/tudscr-base.dtx
@@ -4,27 +4,20 @@
% TUD-Script -- Corporate Design of Technische Universität Dresden
% ----------------------------------------------------------------------------
%
-% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2020
+% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2021
%
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
%
diff --git a/macros/latex/contrib/tudscr/source/tudscr-color.dtx b/macros/latex/contrib/tudscr/source/tudscr-color.dtx
index 4bc961987d..ba27b5aba8 100644
--- a/macros/latex/contrib/tudscr/source/tudscr-color.dtx
+++ b/macros/latex/contrib/tudscr/source/tudscr-color.dtx
@@ -4,27 +4,20 @@
% TUD-Script -- Corporate Design of Technische Universität Dresden
% ----------------------------------------------------------------------------
%
-% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2020
+% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2021
%
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
%
diff --git a/macros/latex/contrib/tudscr/source/tudscr-comp.dtx b/macros/latex/contrib/tudscr/source/tudscr-comp.dtx
index 64c5341700..add1e062fa 100644
--- a/macros/latex/contrib/tudscr/source/tudscr-comp.dtx
+++ b/macros/latex/contrib/tudscr/source/tudscr-comp.dtx
@@ -1,4 +1,4 @@
-% \CheckSum{1460}
+% \CheckSum{1461}
% \iffalse meta-comment
%
% TUD-Script -- Corporate Design of Technische Universität Dresden
@@ -9,22 +9,15 @@
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
%
@@ -52,7 +45,7 @@
% \fi
%
\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
-\ProvidesFile{tudscr-comp.dtx}[2021/07/06 v2.06m TUD-Script\space%
+\ProvidesFile{tudscr-comp.dtx}[2021/07/15 v2.06n TUD-Script\space%
%
% \iffalse
%</dtx>
@@ -397,6 +390,8 @@
% \changes{v2.06l}{2021/03/30}{neu}^^A
% \begin{macro}{\tud@v@2.06m}
% \changes{v2.06m}{2021/07/06}{neu}^^A
+% \begin{macro}{\tud@v@2.06n}
+% \changes{v2.06n}{2021/07/15}{neu}^^A
% \begin{macro}{\tud@v@last}
% \changes{v2.02}{2014/08/22}{neu}^^A
% \changes{v2.03}{2015/01/13}{angepasst}^^A
@@ -446,9 +441,11 @@
\csdef{tud@v@2.06k}{4}
\csdef{tud@v@2.06l}{4}
\csdef{tud@v@2.06m}{4}
+\csdef{tud@v@2.06n}{4}
\csdef{tud@v@last}{4}
% \end{macrocode}
% \end{macro}^^A \tud@v@last
+% \end{macro}^^A \tud@v@2.06n
% \end{macro}^^A \tud@v@2.06m
% \end{macro}^^A \tud@v@2.06l
% \end{macro}^^A \tud@v@2.06k
diff --git a/macros/latex/contrib/tudscr/source/tudscr-doc.dtx b/macros/latex/contrib/tudscr/source/tudscr-doc.dtx
index eb2401bde0..0089781abe 100644
--- a/macros/latex/contrib/tudscr/source/tudscr-doc.dtx
+++ b/macros/latex/contrib/tudscr/source/tudscr-doc.dtx
@@ -4,27 +4,20 @@
% TUD-Script -- Corporate Design of Technische Universität Dresden
% ----------------------------------------------------------------------------
%
-% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2020
+% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2021
%
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
%
diff --git a/macros/latex/contrib/tudscr/source/tudscr-fields.dtx b/macros/latex/contrib/tudscr/source/tudscr-fields.dtx
index f56f953e97..c662c46bd9 100644
--- a/macros/latex/contrib/tudscr/source/tudscr-fields.dtx
+++ b/macros/latex/contrib/tudscr/source/tudscr-fields.dtx
@@ -4,27 +4,20 @@
% TUD-Script -- Corporate Design of Technische Universität Dresden
% ----------------------------------------------------------------------------
%
-% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2020
+% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2021
%
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
%
diff --git a/macros/latex/contrib/tudscr/source/tudscr-fonts.dtx b/macros/latex/contrib/tudscr/source/tudscr-fonts.dtx
index 507b9d0fd4..8c76c12296 100644
--- a/macros/latex/contrib/tudscr/source/tudscr-fonts.dtx
+++ b/macros/latex/contrib/tudscr/source/tudscr-fonts.dtx
@@ -4,27 +4,20 @@
% TUD-Script -- Corporate Design of Technische Universität Dresden
% ----------------------------------------------------------------------------
%
-% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2020
+% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2021
%
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
%
@@ -52,7 +45,7 @@
\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
% \fi
%
-\ProvidesFile{tudscr-fonts.dtx}[2021/07/06 v2.06m TUD-Script\space%
+\ProvidesFile{tudscr-fonts.dtx}[2021/07/15 v2.06n TUD-Script\space%
%
% \iffalse
%</dtx>
@@ -1469,7 +1462,7 @@
\tud@DeclareTextSymbol{#1}{#2}{#3}{#4}%
}
% \end{macrocode}
-% Die an \cs{tud@cdfont@declare@symb} übergebenen Bezeichner für Auswahlbefehle
+% Die an \cs{tud@cdfont@declare@symb} übergebenen Letter für Auswahlbefehle
% erhalten \cs{tud@cdfont@symbol@\dots} als Präfix. Da so der ursprüngliche
% Befehlsname verändert wird, würde dieser Befehlsname auch verwendet werden,
% wenn dieser in einem fragilen Kontext genutzt wird (siehe \cs{@changed@cmd}).
@@ -1543,12 +1536,6 @@
% \end{macro}^^A \tud@cdfont@symbols@set
% \begin{macro}{\tud@cdfont@declare@textsymb}
% \changes{v2.06g}{2020/06/18}{neu}^^A
-% \begin{macro}{\tud@cdmath@symbol@textleftarrow}
-% \begin{macro}{\tud@cdmath@symbol@textrightarrow}
-% \begin{macro}{\tud@cdmath@symbol@textuparrow}
-% \begin{macro}{\tud@cdmath@symbol@textdownarrow}
-% \begin{macro}{\tud@cdmath@symbol@textlangle}
-% \begin{macro}{\tud@cdmath@symbol@textrangle}
% Die Definition der Textsymbole für die \val{TS1}-Kodierung.
% \begin{macrocode}
\newcommand*\tud@cdfont@declare@textsymb{%
@@ -1560,12 +1547,6 @@
\tud@cdfont@declare@symb{textrangle}{TS1}{iwona}{62}%
}
% \end{macrocode}
-% \end{macro}^^A \tud@cdmath@symbol@textrangle
-% \end{macro}^^A \tud@cdmath@symbol@textlangle
-% \end{macro}^^A \tud@cdmath@symbol@textdownarrow
-% \end{macro}^^A \tud@cdmath@symbol@textuparrow
-% \end{macro}^^A \tud@cdmath@symbol@textrightarrow
-% \end{macro}^^A \tud@cdmath@symbol@textleftarrow
% \end{macro}^^A \tud@cdfont@declare@textsymb
% \begin{macro}{\tud@font@skip@set}
% \changes{v2.04}{2015/02/17}{neu}^^A
@@ -2685,135 +2666,16 @@
% \changes{v2.06}{2018/07/02}{neu}^^A
% \begin{macro}{\tud@math@supplement@greeks}
% \changes{v2.06}{2019/06/19}{neu}^^A
-% \begin{macro}{\upDelta}
-% \begin{macro}{\upGamma}
-% \begin{macro}{\upLambda}
-% \begin{macro}{\upOmega}
-% \begin{macro}{\upPhi}
-% \begin{macro}{\upPi}
-% \begin{macro}{\upPsi}
-% \begin{macro}{\upSigma}
-% \begin{macro}{\upTheta}
-% \begin{macro}{\upUpsilon}
-% \begin{macro}{\upXi}
-% \begin{macro}{\upalpha}
-% \begin{macro}{\upbeta}
-% \begin{macro}{\upgamma}
-% \begin{macro}{\updelta}
-% \begin{macro}{\upepsilon}
-% \begin{macro}{\upzeta}
-% \begin{macro}{\upeta}
-% \begin{macro}{\uptheta}
-% \begin{macro}{\upiota}
-% \begin{macro}{\upkappa}
-% \begin{macro}{\uplambda}
-% \begin{macro}{\upmu}
-% \begin{macro}{\upnu}
-% \begin{macro}{\upxi}
-% \begin{macro}{\uppi}
-% \begin{macro}{\uprho}
-% \begin{macro}{\upsigma}
-% \begin{macro}{\uptau}
-% \begin{macro}{\upupsilon}
-% \begin{macro}{\upphi}
-% \begin{macro}{\upchi}
-% \begin{macro}{\uppsi}
-% \begin{macro}{\upomega}
-% \begin{macro}{\upvarepsilon}
-% \begin{macro}{\upvartheta}
-% \begin{macro}{\upvarpi}
-% \begin{macro}{\upvarrho}
-% \begin{macro}{\upvarsigma}
-% \begin{macro}{\upvarphi}
-% \begin{macro}{\itDelta}
-% \begin{macro}{\itGamma}
-% \begin{macro}{\itLambda}
-% \begin{macro}{\itOmega}
-% \begin{macro}{\itPhi}
-% \begin{macro}{\itPi}
-% \begin{macro}{\itPsi}
-% \begin{macro}{\itSigma}
-% \begin{macro}{\itTheta}
-% \begin{macro}{\itUpsilon}
-% \begin{macro}{\itXi}
-% \begin{macro}{\italpha}
-% \begin{macro}{\itbeta}
-% \begin{macro}{\itgamma}
-% \begin{macro}{\itdelta}
-% \begin{macro}{\itepsilon}
-% \begin{macro}{\itzeta}
-% \begin{macro}{\iteta}
-% \begin{macro}{\ittheta}
-% \begin{macro}{\itiota}
-% \begin{macro}{\itkappa}
-% \begin{macro}{\itlambda}
-% \begin{macro}{\itmu}
-% \begin{macro}{\itnu}
-% \begin{macro}{\itxi}
-% \begin{macro}{\itpi}
-% \begin{macro}{\itrho}
-% \begin{macro}{\itsigma}
-% \begin{macro}{\ittau}
-% \begin{macro}{\itupsilon}
-% \begin{macro}{\itphi}
-% \begin{macro}{\itchi}
-% \begin{macro}{\itpsi}
-% \begin{macro}{\itomega}
-% \begin{macro}{\itvarepsilon}
-% \begin{macro}{\itvartheta}
-% \begin{macro}{\itvarpi}
-% \begin{macro}{\itvarrho}
-% \begin{macro}{\itvarsigma}
-% \begin{macro}{\itvarphi}
-% \begin{macro}{\otherDelta}
-% \begin{macro}{\otherGamma}
-% \begin{macro}{\otherLambda}
-% \begin{macro}{\otherOmega}
-% \begin{macro}{\otherPhi}
-% \begin{macro}{\otherPi}
-% \begin{macro}{\otherPsi}
-% \begin{macro}{\otherSigma}
-% \begin{macro}{\otherTheta}
-% \begin{macro}{\otherUpsilon}
-% \begin{macro}{\otherXi}
-% \begin{macro}{\otheralpha}
-% \begin{macro}{\otherbeta}
-% \begin{macro}{\othergamma}
-% \begin{macro}{\otherdelta}
-% \begin{macro}{\otherepsilon}
-% \begin{macro}{\otherzeta}
-% \begin{macro}{\othereta}
-% \begin{macro}{\othertheta}
-% \begin{macro}{\otheriota}
-% \begin{macro}{\otherkappa}
-% \begin{macro}{\otherlambda}
-% \begin{macro}{\othermu}
-% \begin{macro}{\othernu}
-% \begin{macro}{\otherxi}
-% \begin{macro}{\otherpi}
-% \begin{macro}{\otherrho}
-% \begin{macro}{\othersigma}
-% \begin{macro}{\othertau}
-% \begin{macro}{\otherupsilon}
-% \begin{macro}{\otherphi}
-% \begin{macro}{\otherchi}
-% \begin{macro}{\otherpsi}
-% \begin{macro}{\otheromega}
-% \begin{macro}{\othervarepsilon}
-% \begin{macro}{\othervartheta}
-% \begin{macro}{\othervarpi}
-% \begin{macro}{\othervarrho}
-% \begin{macro}{\othervarsigma}
-% \begin{macro}{\othervarphi}
+% \changes{v2.06n}{2021/07/15}{\cs{mathord} statt \cs{mathalpha}}^^A
% Es gibt eine Vielzahl von Paketen, die das Setzen von aufrechten griechischen
% Glyphen adressieren. Allerdings gibt es keinen einheitlichen Standard, was
% die Nomenklatur der Auswahlbefehle betrifft. Mit diesem Makro wird nach den
% am häufigsten auftretenden Varianten für die Auswahl für aufrechte und
-% kursive Glyphen gesucht, um diese auf die von \TUDScript verwendete
-% Nomenklatur abzubilden, damit diese unabhängig von der Einstellung für
-% \opt{cdmath} genutzt werden kann und somit neben den normalen Makros für die
-% zusätzlichen Befehle (\cs{up\meta{Bezeichner}}, \cs{it\meta{Bezeichner}})
-% für das explizite Auswählen aufrechter und kursiver Buchstaben bereitstehen.
+% kursive Glyphen gesucht, um diese auf die von \TUDScript genutzte Nomenklatur
+% (\cs{up\meta{Letter}}, \cs{it\meta{Letter}}, \cs{other\meta{Letter}})
+% abzubilden, damit diese unabhängig von der Einstellung für \opt{cdmath}
+% genutzt werden kann und somit neben den normalen Makros zusätzliche Befehle
+% für das explizite Auswählen aufrechter und kursiver Lettern bereitstehen.
% \begin{macrocode}
\newcommand*\tud@math@map@greeks{%
\tud@math@loop@greeks@all\tud@math@map@@greeks%
@@ -2832,7 +2694,7 @@
% \end{macrocode}
% Einige Pakete stellen für griechische Majuskeln die Befehle \cs{var\dots}
% bereit, um diese im kursiven Schnitt zu setzen. Weiterhin existiert für
-% aufrechte Majuskeln auch noch die Form \cs{Up\meta{Bezeichner}}. Diese werden
+% aufrechte Majuskeln auch noch die Form \cs{Up\meta{Letter}}. Diese werden
% ebenfalls ausgewertet und ggf. auf die \TUDScript-Nomenklatur abgebildet.
% \begin{macrocode}
\newcommand*\tud@math@map@@@greeks[1]{%
@@ -2844,7 +2706,7 @@
}{}%
}
% \end{macrocode}
-% Mit diesem Makro werden in letztendlich~-- nachdem \cs{tud@math@map@greeks}
+% Mit diesem Makro werden letztendlich~-- nachdem \cs{tud@math@map@greeks}
% bereits ausgeführt wurde~-- die standardmäßig definierten Symbolschriften
% \val{operators} und \val{letters} geprüft, ob diese in den Kodierungen
% \val{OT1} bzw. \val{OML} genutzt werden. Trifft dies zu, so werden die
@@ -2949,13 +2811,13 @@
\ifcsundef{it##1}{%
\eappto\tud@res@c{%
\noexpand\DeclareMathSymbol{\csname it##1\endcsname}%
- {\noexpand\mathalpha}{tuditgrk}{##2}%
+ {\noexpand\mathord}{tuditgrk}{##2}%
}%
}{}%
\ifcsundef{up##1}{%
\eappto\tud@res@c{%
\noexpand\DeclareMathSymbol{\csname up##1\endcsname}%
- {\noexpand\mathalpha}{tudupgrk}{##2}%
+ {\noexpand\mathord}{tudupgrk}{##2}%
}%
}{}%
}%
@@ -2997,126 +2859,6 @@
\fi%
}
% \end{macrocode}
-% \end{macro}^^A \othervarphi
-% \end{macro}^^A \othervarsigma
-% \end{macro}^^A \othervarrho
-% \end{macro}^^A \othervarpi
-% \end{macro}^^A \othervartheta
-% \end{macro}^^A \othervarepsilon
-% \end{macro}^^A \otheromega
-% \end{macro}^^A \otherpsi
-% \end{macro}^^A \otherchi
-% \end{macro}^^A \otherphi
-% \end{macro}^^A \otherupsilon
-% \end{macro}^^A \othertau
-% \end{macro}^^A \othersigma
-% \end{macro}^^A \otherrho
-% \end{macro}^^A \otherpi
-% \end{macro}^^A \otherxi
-% \end{macro}^^A \othernu
-% \end{macro}^^A \othermu
-% \end{macro}^^A \otherlambda
-% \end{macro}^^A \otherkappa
-% \end{macro}^^A \otheriota
-% \end{macro}^^A \othertheta
-% \end{macro}^^A \othereta
-% \end{macro}^^A \otherzeta
-% \end{macro}^^A \otherepsilon
-% \end{macro}^^A \otherdelta
-% \end{macro}^^A \othergamma
-% \end{macro}^^A \otherbeta
-% \end{macro}^^A \otheralpha
-% \end{macro}^^A \otherXi
-% \end{macro}^^A \otherUpsilon
-% \end{macro}^^A \otherTheta
-% \end{macro}^^A \otherSigma
-% \end{macro}^^A \otherPsi
-% \end{macro}^^A \otherPi
-% \end{macro}^^A \otherPhi
-% \end{macro}^^A \otherOmega
-% \end{macro}^^A \otherLambda
-% \end{macro}^^A \otherGamma
-% \end{macro}^^A \otherDelta
-% \end{macro}^^A \itvarphi
-% \end{macro}^^A \itvarsigma
-% \end{macro}^^A \itvarrho
-% \end{macro}^^A \itvarpi
-% \end{macro}^^A \itvartheta
-% \end{macro}^^A \itvarepsilon
-% \end{macro}^^A \itomega
-% \end{macro}^^A \itpsi
-% \end{macro}^^A \itchi
-% \end{macro}^^A \itphi
-% \end{macro}^^A \itupsilon
-% \end{macro}^^A \ittau
-% \end{macro}^^A \itsigma
-% \end{macro}^^A \itrho
-% \end{macro}^^A \itpi
-% \end{macro}^^A \itxi
-% \end{macro}^^A \itnu
-% \end{macro}^^A \itmu
-% \end{macro}^^A \itlambda
-% \end{macro}^^A \itkappa
-% \end{macro}^^A \itiota
-% \end{macro}^^A \ittheta
-% \end{macro}^^A \iteta
-% \end{macro}^^A \itzeta
-% \end{macro}^^A \itepsilon
-% \end{macro}^^A \itdelta
-% \end{macro}^^A \itgamma
-% \end{macro}^^A \itbeta
-% \end{macro}^^A \italpha
-% \end{macro}^^A \itXi
-% \end{macro}^^A \itUpsilon
-% \end{macro}^^A \itTheta
-% \end{macro}^^A \itSigma
-% \end{macro}^^A \itPsi
-% \end{macro}^^A \itPi
-% \end{macro}^^A \itPhi
-% \end{macro}^^A \itOmega
-% \end{macro}^^A \itLambda
-% \end{macro}^^A \itGamma
-% \end{macro}^^A \itDelta
-% \end{macro}^^A \upvarphi
-% \end{macro}^^A \upvarsigma
-% \end{macro}^^A \upvarrho
-% \end{macro}^^A \upvarpi
-% \end{macro}^^A \upvartheta
-% \end{macro}^^A \upvarepsilon
-% \end{macro}^^A \upomega
-% \end{macro}^^A \uppsi
-% \end{macro}^^A \upchi
-% \end{macro}^^A \upphi
-% \end{macro}^^A \upupsilon
-% \end{macro}^^A \uptau
-% \end{macro}^^A \upsigma
-% \end{macro}^^A \uprho
-% \end{macro}^^A \uppi
-% \end{macro}^^A \upxi
-% \end{macro}^^A \upnu
-% \end{macro}^^A \upmu
-% \end{macro}^^A \uplambda
-% \end{macro}^^A \upkappa
-% \end{macro}^^A \upiota
-% \end{macro}^^A \uptheta
-% \end{macro}^^A \upeta
-% \end{macro}^^A \upzeta
-% \end{macro}^^A \upepsilon
-% \end{macro}^^A \updelta
-% \end{macro}^^A \upgamma
-% \end{macro}^^A \upbeta
-% \end{macro}^^A \upalpha
-% \end{macro}^^A \upXi
-% \end{macro}^^A \upUpsilon
-% \end{macro}^^A \upTheta
-% \end{macro}^^A \upSigma
-% \end{macro}^^A \upPsi
-% \end{macro}^^A \upPi
-% \end{macro}^^A \upPhi
-% \end{macro}^^A \upOmega
-% \end{macro}^^A \upLambda
-% \end{macro}^^A \upGamma
-% \end{macro}^^A \upDelta
% \end{macro}^^A \tud@math@supplement@greeks
% \end{macro}^^A \tud@math@map@@@greeks
% \end{macro}^^A \tud@math@map@@greeks
@@ -3160,7 +2902,7 @@
\def\tud@res@c{\TUD@key@preset{slantedgreek}{false}}%
\else%
% \end{macrocode}
-% Existiert \cs{itGamma} und ist mit \cs{Gamma} oder\dots
+% Existiert \cs{itGamma} und ist mit \cs{Gamma} identisch oder\dots
% \begin{macrocode}
\ifcsdef{itGamma}{%
\ifx\itGamma\Gamma%
@@ -3620,7 +3362,7 @@
}
% \end{macrocode}
% Die an \cs{tud@cdmath@declare@symb} und \cs{tud@cdmath@declare@char}
-% übergebene Bezeichner für Auswahlbefehle erhalten \cs{tud@cdmath@symbol@} als
+% übergebene Letter für Auswahlbefehle erhalten \cs{tud@cdmath@symbol@} als
% Präfix, wodurch sich die Definitionen für die einzelnen Mathematikversionen
% beliebig tauschen lassen.
% \begin{macrocode}
@@ -3733,38 +3475,21 @@
% \end{macro}^^A \tud@cdmath@symbols@set@cmd
% \end{macro}^^A \tud@cdmath@symbols@toks
% \end{macro}^^A \tud@cdmath@symbols@set
-% \begin{macro}{\tud@cdmath@declare@greek@uc}
-% \changes{v2.04}{2015/03/10}{neu}^^A
-% \begin{macro}{\tud@cdmath@symbol@upGamma}
-% \begin{macro}{\tud@cdmath@symbol@upDelta}
-% \begin{macro}{\tud@cdmath@symbol@upTheta}
-% \begin{macro}{\tud@cdmath@symbol@upLambda}
-% \begin{macro}{\tud@cdmath@symbol@upXi}
-% \begin{macro}{\tud@cdmath@symbol@upPi}
-% \begin{macro}{\tud@cdmath@symbol@upSigma}
-% \begin{macro}{\tud@cdmath@symbol@upUpsilon}
-% \begin{macro}{\tud@cdmath@symbol@upPhi}
-% \begin{macro}{\tud@cdmath@symbol@upPsi}
-% \begin{macro}{\tud@cdmath@symbol@upOmega}
-% \begin{macro}{\tud@cdmath@symbol@itGamma}
-% \begin{macro}{\tud@cdmath@symbol@itDelta}
-% \begin{macro}{\tud@cdmath@symbol@itTheta}
-% \begin{macro}{\tud@cdmath@symbol@itLambda}
-% \begin{macro}{\tud@cdmath@symbol@itXi}
-% \begin{macro}{\tud@cdmath@symbol@itPi}
-% \begin{macro}{\tud@cdmath@symbol@itSigma}
-% \begin{macro}{\tud@cdmath@symbol@itUpsilon}
-% \begin{macro}{\tud@cdmath@symbol@itPhi}
-% \begin{macro}{\tud@cdmath@symbol@itPsi}
-% \begin{macro}{\tud@cdmath@symbol@itOmega}
+%
% In Anlehnung an verschiedene Pakete für Mathematikschriften werden Symbole
% für aufrechte und kursive Majuskeln der griechischen Lettern definiert. Damit
% auch bei diesen Buchstaben ein Umschalten für die unterschiedlichen Schriften
% möglich ist, wird eine interne Version definiert und im Bedarfsfall der
-% dazugehörige \LaTeX-Befehl mit dieser überschrieben. Hierfür sind die beiden
-% Befehle \cs{tud@cdmath@symbols@set} und \cs{tud@cdmath@symbols@reset}
-% verantwortlich.
+% dazugehörige \LaTeX-Befehl mit dieser überschrieben. Hierfür sind die Befehle
+% \cs{tud@cdmath@symbols@set} und \cs{tud@cdmath@symbols@reset} verantwortlich,
+% welche die von \cs{tud@cdmath@declare@symb} und \cs{tud@cdmath@declare@char}
+% erzeugten Listen \cs{tud@cdmath@symb@list} und \cs{tud@cdmath@char@list}
+% nutzen.
% \ToDo{Codierungen \val{LS1/LS2}; siehe \pkg{stix,libertinust1math}}[v2.??]
+% \begin{macro}{\tud@cdmath@declare@greek@uc}
+% \changes{v2.04}{2015/03/10}{neu}^^A
+% Hiermit werden die Auswahlbefehle für Majuskeln der der griechischen Lettern
+% für die klassischen Kodierungen definiert.
% \begin{macrocode}
\newcommand*\tud@cdmath@declare@greek@uc[1]{%
\tud@cdmath@declare@symb{it#1}{\mathalpha}{letters}{\the\tud@res@cnt}%
@@ -3772,89 +3497,9 @@
\advance\tud@res@cnt\@ne\relax%
}
% \end{macrocode}
-% \end{macro}^^A \tud@cdmath@symbol@itOmega
-% \end{macro}^^A \tud@cdmath@symbol@itPsi
-% \end{macro}^^A \tud@cdmath@symbol@itPhi
-% \end{macro}^^A \tud@cdmath@symbol@itUpsilon
-% \end{macro}^^A \tud@cdmath@symbol@itSigma
-% \end{macro}^^A \tud@cdmath@symbol@itPi
-% \end{macro}^^A \tud@cdmath@symbol@itXi
-% \end{macro}^^A \tud@cdmath@symbol@itLambda
-% \end{macro}^^A \tud@cdmath@symbol@itTheta
-% \end{macro}^^A \tud@cdmath@symbol@itDelta
-% \end{macro}^^A \tud@cdmath@symbol@itGamma
-% \end{macro}^^A \tud@cdmath@symbol@upOmega
-% \end{macro}^^A \tud@cdmath@symbol@upPsi
-% \end{macro}^^A \tud@cdmath@symbol@upPhi
-% \end{macro}^^A \tud@cdmath@symbol@upUpsilon
-% \end{macro}^^A \tud@cdmath@symbol@upSigma
-% \end{macro}^^A \tud@cdmath@symbol@upPi
-% \end{macro}^^A \tud@cdmath@symbol@upXi
-% \end{macro}^^A \tud@cdmath@symbol@upLambda
-% \end{macro}^^A \tud@cdmath@symbol@upTheta
-% \end{macro}^^A \tud@cdmath@symbol@upDelta
-% \end{macro}^^A \tud@cdmath@symbol@upGamma
% \end{macro}^^A \tud@cdmath@declare@greek@uc
% \begin{macro}{\tud@cdmath@declare@greek@lc}
% \changes{v2.06}{2018/07/17}{neu}^^A
-% \begin{macro}{\tud@cdmath@symbol@upalpha}
-% \begin{macro}{\tud@cdmath@symbol@upbeta}
-% \begin{macro}{\tud@cdmath@symbol@upgamma}
-% \begin{macro}{\tud@cdmath@symbol@updelta}
-% \begin{macro}{\tud@cdmath@symbol@upepsilon}
-% \begin{macro}{\tud@cdmath@symbol@upzeta}
-% \begin{macro}{\tud@cdmath@symbol@upeta}
-% \begin{macro}{\tud@cdmath@symbol@uptheta}
-% \begin{macro}{\tud@cdmath@symbol@upiota}
-% \begin{macro}{\tud@cdmath@symbol@upkappa}
-% \begin{macro}{\tud@cdmath@symbol@uplambda}
-% \begin{macro}{\tud@cdmath@symbol@upmu}
-% \begin{macro}{\tud@cdmath@symbol@upnu}
-% \begin{macro}{\tud@cdmath@symbol@upxi}
-% \begin{macro}{\tud@cdmath@symbol@uppi}
-% \begin{macro}{\tud@cdmath@symbol@uprho}
-% \begin{macro}{\tud@cdmath@symbol@upsigma}
-% \begin{macro}{\tud@cdmath@symbol@uptau}
-% \begin{macro}{\tud@cdmath@symbol@upupsilon}
-% \begin{macro}{\tud@cdmath@symbol@upphi}
-% \begin{macro}{\tud@cdmath@symbol@upchi}
-% \begin{macro}{\tud@cdmath@symbol@uppsi}
-% \begin{macro}{\tud@cdmath@symbol@upomega}
-% \begin{macro}{\tud@cdmath@symbol@upvarepsilon}
-% \begin{macro}{\tud@cdmath@symbol@upvartheta}
-% \begin{macro}{\tud@cdmath@symbol@upvarpi}
-% \begin{macro}{\tud@cdmath@symbol@upvarrho}
-% \begin{macro}{\tud@cdmath@symbol@upvarsigma}
-% \begin{macro}{\tud@cdmath@symbol@upvarphi}
-% \begin{macro}{\tud@cdmath@symbol@italpha}
-% \begin{macro}{\tud@cdmath@symbol@itbeta}
-% \begin{macro}{\tud@cdmath@symbol@itgamma}
-% \begin{macro}{\tud@cdmath@symbol@itdelta}
-% \begin{macro}{\tud@cdmath@symbol@itepsilon}
-% \begin{macro}{\tud@cdmath@symbol@itzeta}
-% \begin{macro}{\tud@cdmath@symbol@iteta}
-% \begin{macro}{\tud@cdmath@symbol@ittheta}
-% \begin{macro}{\tud@cdmath@symbol@itiota}
-% \begin{macro}{\tud@cdmath@symbol@itkappa}
-% \begin{macro}{\tud@cdmath@symbol@itlambda}
-% \begin{macro}{\tud@cdmath@symbol@itmu}
-% \begin{macro}{\tud@cdmath@symbol@itnu}
-% \begin{macro}{\tud@cdmath@symbol@itxi}
-% \begin{macro}{\tud@cdmath@symbol@itpi}
-% \begin{macro}{\tud@cdmath@symbol@itrho}
-% \begin{macro}{\tud@cdmath@symbol@itsigma}
-% \begin{macro}{\tud@cdmath@symbol@ittau}
-% \begin{macro}{\tud@cdmath@symbol@itupsilon}
-% \begin{macro}{\tud@cdmath@symbol@itphi}
-% \begin{macro}{\tud@cdmath@symbol@itchi}
-% \begin{macro}{\tud@cdmath@symbol@itpsi}
-% \begin{macro}{\tud@cdmath@symbol@itomega}
-% \begin{macro}{\tud@cdmath@symbol@itvarepsilon}
-% \begin{macro}{\tud@cdmath@symbol@itvartheta}
-% \begin{macro}{\tud@cdmath@symbol@itvarpi}
-% \begin{macro}{\tud@cdmath@symbol@itvarrho}
-% \begin{macro}{\tud@cdmath@symbol@itvarsigma}
-% \begin{macro}{\tud@cdmath@symbol@itvarphi}
% Aufrechte griechische Minuskeln sind in den mathematischen Kodierungen von
% \LaTeXe{} leider nicht enthalten, weshalb diese hier auch nicht für die
% normale OML-Kodierung deklariert werden können.
@@ -3863,10 +3508,9 @@
\tud@cdmath@declare@symb{it#1}{\mathalpha}{letters}{\the\tud@res@cnt}%
% \end{macrocode}
% Für aufrechte griechische Minuskeln gibt es gewöhnlich keine Symbolschrift,
-% weshalb ein einfacher Eintrag \cs{up\meta{Bezeichner}} in die Liste
-% {tud@cdmath@symb@list} gesetzt wird, was in Verbindung mit einem fehlenden
-% Symbol \cs{tud@cdmath@symbol@\meta{Bezeichner}} zu einem undefinierten
-% cs{up\meta{Bezeichner}} bei \opt{cdmath=true} führt.
+% weshalb der Eintrag \cs{up\meta{Letter}} in \cs{tud@cdmath@symb@list} gesetzt
+% wird, was mit einem fehlenden \cs{tud@cdmath@symbol@\meta{Letter}} zu einem
+% undefinierten \cs{up\meta{Letter}} bei \opt{cdmath=true} führt.
% \ToDo{falls irgendwann erweiterte OML-Kodierung existiert, dann nutzen}[v2.??]
% \begin{macrocode}
%^^A \tud@cdmath@declare@symb{it##1}{\mathalpha}{letters}%
@@ -3875,70 +3519,13 @@
\advance\tud@res@cnt\@ne\relax%
}
% \end{macrocode}
-% \end{macro}^^A \tud@cdmath@symbol@itvarphi
-% \end{macro}^^A \tud@cdmath@symbol@itvarsigma
-% \end{macro}^^A \tud@cdmath@symbol@itvarrho
-% \end{macro}^^A \tud@cdmath@symbol@itvarpi
-% \end{macro}^^A \tud@cdmath@symbol@itvartheta
-% \end{macro}^^A \tud@cdmath@symbol@itvarepsilon
-% \end{macro}^^A \tud@cdmath@symbol@itomega
-% \end{macro}^^A \tud@cdmath@symbol@itpsi
-% \end{macro}^^A \tud@cdmath@symbol@itchi
-% \end{macro}^^A \tud@cdmath@symbol@itphi
-% \end{macro}^^A \tud@cdmath@symbol@itupsilon
-% \end{macro}^^A \tud@cdmath@symbol@ittau
-% \end{macro}^^A \tud@cdmath@symbol@itsigma
-% \end{macro}^^A \tud@cdmath@symbol@itrho
-% \end{macro}^^A \tud@cdmath@symbol@itpi
-% \end{macro}^^A \tud@cdmath@symbol@itxi
-% \end{macro}^^A \tud@cdmath@symbol@itnu
-% \end{macro}^^A \tud@cdmath@symbol@itmu
-% \end{macro}^^A \tud@cdmath@symbol@itlambda
-% \end{macro}^^A \tud@cdmath@symbol@itkappa
-% \end{macro}^^A \tud@cdmath@symbol@itiota
-% \end{macro}^^A \tud@cdmath@symbol@ittheta
-% \end{macro}^^A \tud@cdmath@symbol@iteta
-% \end{macro}^^A \tud@cdmath@symbol@itzeta
-% \end{macro}^^A \tud@cdmath@symbol@itepsilon
-% \end{macro}^^A \tud@cdmath@symbol@itdelta
-% \end{macro}^^A \tud@cdmath@symbol@itgamma
-% \end{macro}^^A \tud@cdmath@symbol@itbeta
-% \end{macro}^^A \tud@cdmath@symbol@italpha
-% \end{macro}^^A \tud@cdmath@symbol@upvarphi
-% \end{macro}^^A \tud@cdmath@symbol@upvarsigma
-% \end{macro}^^A \tud@cdmath@symbol@upvarrho
-% \end{macro}^^A \tud@cdmath@symbol@upvarpi
-% \end{macro}^^A \tud@cdmath@symbol@upvartheta
-% \end{macro}^^A \tud@cdmath@symbol@upvarepsilon
-% \end{macro}^^A \tud@cdmath@symbol@upomega
-% \end{macro}^^A \tud@cdmath@symbol@uppsi
-% \end{macro}^^A \tud@cdmath@symbol@upchi
-% \end{macro}^^A \tud@cdmath@symbol@upphi
-% \end{macro}^^A \tud@cdmath@symbol@upupsilon
-% \end{macro}^^A \tud@cdmath@symbol@uptau
-% \end{macro}^^A \tud@cdmath@symbol@upsigma
-% \end{macro}^^A \tud@cdmath@symbol@uprho
-% \end{macro}^^A \tud@cdmath@symbol@uppi
-% \end{macro}^^A \tud@cdmath@symbol@upxi
-% \end{macro}^^A \tud@cdmath@symbol@upnu
-% \end{macro}^^A \tud@cdmath@symbol@upmu
-% \end{macro}^^A \tud@cdmath@symbol@uplambda
-% \end{macro}^^A \tud@cdmath@symbol@upkappa
-% \end{macro}^^A \tud@cdmath@symbol@upiota
-% \end{macro}^^A \tud@cdmath@symbol@uptheta
-% \end{macro}^^A \tud@cdmath@symbol@upeta
-% \end{macro}^^A \tud@cdmath@symbol@upzeta
-% \end{macro}^^A \tud@cdmath@symbol@upepsilon
-% \end{macro}^^A \tud@cdmath@symbol@updelta
-% \end{macro}^^A \tud@cdmath@symbol@upgamma
-% \end{macro}^^A \tud@cdmath@symbol@upbeta
-% \end{macro}^^A \tud@cdmath@symbol@upalpha
% \end{macro}^^A \tud@cdmath@declare@greek@lc
% \begin{macro}{\tud@cdmath@declare@greek@lgr}
% \changes{v2.06}{2019/06/19}{neu}^^A
% \begin{macro}{\tud@cdmath@declare@greek@@lgr}
% \changes{v2.06}{2019/06/19}{neu}^^A
% \changes{v2.06d}{2019/08/27}{Ligaturen für Lua\LaTeX{} deaktiviert}^^A
+% \changes{v2.06n}{2021/07/15}{\cs{mathord} statt \cs{mathalpha}}^^A
% Die \OpenSans hält die griechischen Glyphen nur in der LGR-Kodierung bereit.
% Hiermit werden diese für den mathematischen Satz definiert. Die übergebenen
% Argumente an das Makro \cs{tud@cdmath@declare@greek@@lgr} sind Bezeichnung
@@ -3987,8 +3574,8 @@
\tud@cdmath@declare@greek@@lgr{varphi}{102}%
}
\newcommand*\tud@cdmath@declare@greek@@lgr[2]{%
- \tud@cdmath@declare@symb{it#1}{\mathalpha}{tuditgrk}{#2}%
- \tud@cdmath@declare@symb{up#1}{\mathalpha}{tudupgrk}{#2}%
+ \tud@cdmath@declare@symb{it#1}{\mathord}{tuditgrk}{#2}%
+ \tud@cdmath@declare@symb{up#1}{\mathord}{tudupgrk}{#2}%
% \end{macrocode}
% Normalerweise sollten Ligaturen für angrenzende Glyphen (boundary ligatures)
% im Mathematikmodus deaktiviert werden. Bei Lua\LaTeX{} ist dies jedoch nicht
@@ -4204,25 +3791,23 @@
% aktivieren.
% \begin{macrocode}
\tud@font@set%
- \AtBeginDocument{%
% \end{macrocode}
% Bereitstellung der Auswahlbefehle für griechische Glyphen in der Nomenklatur
-% von \TUDScript (\cs{up\meta{Bezeichner}}, \cs{it\meta{Bezeichner}}).
+% von \TUDScript (\cs{up\meta{Letter}}, \cs{it\meta{Letter}}).
% \begin{macrocode}
- \tud@math@map@greeks%
+ \tud@math@map@greeks%
% \end{macrocode}
% Für die griechischen Glyphen wird mit \cs{tud@math@checkslanted@greeks}
% geprüft, ob diese durch ein Paket explizit auf kursive Majuskeln oder eine
% vollständig aufrechte Variante gesetzt wurden. Ist dies der Fall, wird der
% Standardwert für die Option \opt{slantedgreek} entsprechend angepasst.
% \begin{macrocode}
- \tud@math@checkslanted@greeks%
+ \tud@math@checkslanted@greeks%
% \end{macrocode}
% Nachdem alle Vorbereitungen getroffen wurden, werden die Schriften für den
% mathematischen Satz nun endlich gesetzt.
% \begin{macrocode}
- \tud@math@set%
- }%
+ \AtBeginDocument{\tud@math@set}%
}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/tudscr/source/tudscr-frontmatter.dtx b/macros/latex/contrib/tudscr/source/tudscr-frontmatter.dtx
index 1090424980..eef1321553 100644
--- a/macros/latex/contrib/tudscr/source/tudscr-frontmatter.dtx
+++ b/macros/latex/contrib/tudscr/source/tudscr-frontmatter.dtx
@@ -4,27 +4,20 @@
% TUD-Script -- Corporate Design of Technische Universität Dresden
% ----------------------------------------------------------------------------
%
-% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2020
+% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2021
%
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
%
diff --git a/macros/latex/contrib/tudscr/source/tudscr-layout.dtx b/macros/latex/contrib/tudscr/source/tudscr-layout.dtx
index 3bf9ec030c..f44b8687d0 100644
--- a/macros/latex/contrib/tudscr/source/tudscr-layout.dtx
+++ b/macros/latex/contrib/tudscr/source/tudscr-layout.dtx
@@ -4,27 +4,20 @@
% TUD-Script -- Corporate Design of Technische Universität Dresden
% ----------------------------------------------------------------------------
%
-% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2020
+% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2021
%
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
%
diff --git a/macros/latex/contrib/tudscr/source/tudscr-localization.dtx b/macros/latex/contrib/tudscr/source/tudscr-localization.dtx
index b47cc7b68e..63ea159a0e 100644
--- a/macros/latex/contrib/tudscr/source/tudscr-localization.dtx
+++ b/macros/latex/contrib/tudscr/source/tudscr-localization.dtx
@@ -4,27 +4,20 @@
% TUD-Script -- Corporate Design of Technische Universität Dresden
% ----------------------------------------------------------------------------
%
-% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2020
+% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2021
%
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
%
diff --git a/macros/latex/contrib/tudscr/source/tudscr-manual.dtx b/macros/latex/contrib/tudscr/source/tudscr-manual.dtx
index 8346c60f7c..88906bd4a0 100644
--- a/macros/latex/contrib/tudscr/source/tudscr-manual.dtx
+++ b/macros/latex/contrib/tudscr/source/tudscr-manual.dtx
@@ -4,27 +4,20 @@
% TUD-Script -- Corporate Design of Technische Universität Dresden
% ----------------------------------------------------------------------------
%
-% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2020
+% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2021
%
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
%
diff --git a/macros/latex/contrib/tudscr/source/tudscr-mathswap.dtx b/macros/latex/contrib/tudscr/source/tudscr-mathswap.dtx
index 0c9418e669..f38a897db4 100644
--- a/macros/latex/contrib/tudscr/source/tudscr-mathswap.dtx
+++ b/macros/latex/contrib/tudscr/source/tudscr-mathswap.dtx
@@ -4,27 +4,20 @@
% TUD-Script -- Corporate Design of Technische Universität Dresden
% ----------------------------------------------------------------------------
%
-% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2020
+% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2021
%
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
%
diff --git a/macros/latex/contrib/tudscr/source/tudscr-misc.dtx b/macros/latex/contrib/tudscr/source/tudscr-misc.dtx
index 46d3ba4f20..fdabaea0ec 100644
--- a/macros/latex/contrib/tudscr/source/tudscr-misc.dtx
+++ b/macros/latex/contrib/tudscr/source/tudscr-misc.dtx
@@ -9,22 +9,15 @@
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
%
diff --git a/macros/latex/contrib/tudscr/source/tudscr-pagestyle.dtx b/macros/latex/contrib/tudscr/source/tudscr-pagestyle.dtx
index e15655eaba..67b272b9cb 100644
--- a/macros/latex/contrib/tudscr/source/tudscr-pagestyle.dtx
+++ b/macros/latex/contrib/tudscr/source/tudscr-pagestyle.dtx
@@ -9,22 +9,15 @@
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
%
diff --git a/macros/latex/contrib/tudscr/source/tudscr-supervisor.dtx b/macros/latex/contrib/tudscr/source/tudscr-supervisor.dtx
index 7645826e38..db5b85bd59 100644
--- a/macros/latex/contrib/tudscr/source/tudscr-supervisor.dtx
+++ b/macros/latex/contrib/tudscr/source/tudscr-supervisor.dtx
@@ -4,27 +4,20 @@
% TUD-Script -- Corporate Design of Technische Universität Dresden
% ----------------------------------------------------------------------------
%
-% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2020
+% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2021
%
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
%
diff --git a/macros/latex/contrib/tudscr/source/tudscr-texindy.dtx b/macros/latex/contrib/tudscr/source/tudscr-texindy.dtx
index 747cd157ff..49983ccdde 100644
--- a/macros/latex/contrib/tudscr/source/tudscr-texindy.dtx
+++ b/macros/latex/contrib/tudscr/source/tudscr-texindy.dtx
@@ -4,27 +4,20 @@
% TUD-Script -- Corporate Design of Technische Universität Dresden
% ----------------------------------------------------------------------------
%
-% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2020
+% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2021
%
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
%
diff --git a/macros/latex/contrib/tudscr/source/tudscr-title.dtx b/macros/latex/contrib/tudscr/source/tudscr-title.dtx
index f917275db4..df4975d375 100644
--- a/macros/latex/contrib/tudscr/source/tudscr-title.dtx
+++ b/macros/latex/contrib/tudscr/source/tudscr-title.dtx
@@ -4,27 +4,20 @@
% TUD-Script -- Corporate Design of Technische Universität Dresden
% ----------------------------------------------------------------------------
%
-% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2020
+% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2021
%
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
%
diff --git a/macros/latex/contrib/tudscr/source/tudscr-twocolfix.dtx b/macros/latex/contrib/tudscr/source/tudscr-twocolfix.dtx
index 26e9c62026..143038e2bc 100644
--- a/macros/latex/contrib/tudscr/source/tudscr-twocolfix.dtx
+++ b/macros/latex/contrib/tudscr/source/tudscr-twocolfix.dtx
@@ -4,27 +4,20 @@
% TUD-Script -- Corporate Design of Technische Universität Dresden
% ----------------------------------------------------------------------------
%
-% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2020
+% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2021
%
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
%
diff --git a/macros/latex/contrib/tudscr/source/tudscr-version.dtx b/macros/latex/contrib/tudscr/source/tudscr-version.dtx
index 0be14bde10..971205af90 100644
--- a/macros/latex/contrib/tudscr/source/tudscr-version.dtx
+++ b/macros/latex/contrib/tudscr/source/tudscr-version.dtx
@@ -9,22 +9,15 @@
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder später und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
%
@@ -128,7 +121,7 @@
%<*!(package|class)>
\fi
%</!(package|class)>
- \TUD@Version@Check{2021/07/06 v2.06m TUD-Script}
+ \TUD@Version@Check{2021/07/15 v2.06n TUD-Script}
\endgroup
% \end{macrocode}
% \end{macro}^^A \TUDScriptVersionNumber
diff --git a/macros/latex/contrib/tudscr/source/tudscr.ins b/macros/latex/contrib/tudscr/source/tudscr.ins
index e29f63d076..4b1d147de1 100644
--- a/macros/latex/contrib/tudscr/source/tudscr.ins
+++ b/macros/latex/contrib/tudscr/source/tudscr.ins
@@ -1,28 +1,21 @@
%
-% TUD-Script -- Corporate Design of Technische Universitaet Dresden
+% TUD-Script -- Corporate Design of Technische Universität Dresden
% ----------------------------------------------------------------------------
%
-% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2020
+% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2021
%
% ----------------------------------------------------------------------------
%
% This work may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License, version 1.3c of the license. The latest
-% version of this license is in http://www.latex-project.org/lppl.txt and
-% version 1.3c or later is part of all distributions of LaTeX 2005/12/01
-% or later and of this work. This work has the LPPL maintenance status
-% "author-maintained". The current maintainer and author of this work
-% is Falk Hanisch.
+% LaTeX Project Public License, either version 1.3c of this license or
+% any later version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008-05-04 or later.
%
-% ----------------------------------------------------------------------------
+% This work has the LPPL maintenance status "maintained".
%
-% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
-% in der Version 1.3c, verteilt und/oder veraendert werden. Die aktuelle
-% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
-% Version 1.3c oder spaeter ist Teil aller Verteilungen von LaTeX 2005/12/01
-% oder spaeter und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
-% "author-maintained", wird somit allein durch den Autor verwaltet. Der
-% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
+% The current maintainer and author of this work is Falk Hanisch.
%
% ----------------------------------------------------------------------------
\input docstrip.tex
@@ -53,19 +46,19 @@ TUD-Script -- Corporate Design of Technische Universitaet Dresden
\TUD@Version
-Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2020
+Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2021
This file was generated from file(s) of the TUD-Script bundle.
----------------------------------------------------------------------------
-This work may be distributed and/or modified under the conditions
-of the LaTeX Project Public License, version 1.3c of the license.
-The latest version of this license is in
- http://www.latex-project.org/lppl.txt
+This work may be distributed and/or modified under the conditions of the
+LaTeX Project Public License, either version 1.3c of this license or
+any later version. The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
and version 1.3c or later is part of all distributions of
-LaTeX 2005/12/01 or later and of this work.
+LaTeX version 2008-05-04 or later.
-This work has the LPPL maintenance status "author-maintained".
+This work has the LPPL maintenance status "maintained".
The current maintainer and author of this work is Falk Hanisch.
diff --git a/macros/luatex/latex/pyluatex/README.md b/macros/luatex/latex/pyluatex/README.md
index f9e727fabf..a555ec2008 100644
--- a/macros/luatex/latex/pyluatex/README.md
+++ b/macros/luatex/latex/pyluatex/README.md
@@ -54,3 +54,7 @@ Ubuntu 20.04, macOS Catalina 10.15 and Windows Server 2019.
We use the great [json.lua](https://github.com/rxi/json.lua) library under the terms
of the [MIT license](https://opensource.org/licenses/MIT).
+## Further Information
+Author: Tobias Enderle
+
+Development: https://github.com/tndrle/PyLuaTeX
diff --git a/macros/luatex/latex/pyluatex/pyluatex.lua b/macros/luatex/latex/pyluatex/pyluatex.lua
index 07d8ea49d3..4f904afe15 100644
--- a/macros/luatex/latex/pyluatex/pyluatex.lua
+++ b/macros/luatex/latex/pyluatex/pyluatex.lua
@@ -36,6 +36,7 @@ local script = file.join(folder, "pyluatex-interpreter.py")
local tcp = nil
local python_lines = {}
+local python_output = nil
local env_end = "\\end{python}"
@@ -71,28 +72,34 @@ local function request(data)
return response.success, response.output
end
-local function print_input(code)
+local function log_input(code)
texio.write_nl("PyLuaTeX input for session \"" .. pyluatex.session .. "\": " .. code)
end
-local function print_output(code)
+local function log_output(code)
texio.write_nl("PyLuaTeX output: " .. code)
end
+local function print_lines(str)
+ for s in str:gmatch("[^\r\n]+") do
+ tex.sprint(s)
+ end
+end
+
function pyluatex.execute(code, write)
- if pyluatex.verbose then print_input(code) end
+ if pyluatex.verbose then log_input(code) end
local success, output = request({ session = pyluatex.session, code = code })
if success then
- if pyluatex.verbose then print_output(output) end
+ if pyluatex.verbose then log_output(output) end
if write then
- tex.sprint(output)
+ print_lines(output)
else
return output
end
else
- if not pyluatex.verbose then print_input(code) end
- print_output(output)
+ if not pyluatex.verbose then log_input(code) end
+ log_output(output)
if write then
tex.sprint(err_cmd("Python error (see above)"))
end
@@ -100,6 +107,13 @@ function pyluatex.execute(code, write)
return nil
end
+function pyluatex.print_env()
+ if python_output ~= nil then
+ print_lines(python_output)
+ python_output = nil
+ end
+end
+
local function record_line(line)
local s, e = line:find(env_end)
if s ~= nil then
@@ -108,7 +122,8 @@ local function record_line(line)
local code = table.concat(python_lines, "\n")
local output = pyluatex.execute(code, false)
if output ~= nil then
- return output .. line:sub(s)
+ python_output = output
+ return line:sub(s)
else
return env_end .. err_cmd("Python error (see above)") .. line:sub(e + 1)
end
@@ -120,6 +135,7 @@ end
function pyluatex.record_env()
python_lines = {}
+ python_output = nil
luatexbase.add_to_callback("process_input_buffer", record_line, "pyluatex_record_line")
end
diff --git a/macros/luatex/latex/pyluatex/pyluatex.pdf b/macros/luatex/latex/pyluatex/pyluatex.pdf
index 2ff342d0f8..4e93fb2935 100644
--- a/macros/luatex/latex/pyluatex/pyluatex.pdf
+++ b/macros/luatex/latex/pyluatex/pyluatex.pdf
Binary files differ
diff --git a/macros/luatex/latex/pyluatex/pyluatex.sty b/macros/luatex/latex/pyluatex/pyluatex.sty
index 752f19d0e7..b9ce3f9717 100644
--- a/macros/luatex/latex/pyluatex/pyluatex.sty
+++ b/macros/luatex/latex/pyluatex/pyluatex.sty
@@ -9,7 +9,7 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{pyluatex}[2021/07/14 v0.1.2 Execute Python code on the fly]
+\ProvidesPackage{pyluatex}[2021/07/15 v0.1.3 Execute Python code on the fly]
\RequirePackage{expl3}
\ExplSyntaxOn
@@ -30,7 +30,8 @@
\directlua{pyluatex.start([==[\pyluatex@executable]==])}
-\newenvironment{python}{\directlua{pyluatex.record_env()}}{}
+\newenvironment{python}{\directlua{pyluatex.record_env()}}%
+{\directlua{pyluatex.print_env()}}
\newcommand*{\py}[1]{%
\directlua{pyluatex.execute([==[print(str(#1), end='')]==], true)}%
diff --git a/macros/luatex/latex/pyluatex/pyluatex.tex b/macros/luatex/latex/pyluatex/pyluatex.tex
index a6a66fbde2..c64d757945 100644
--- a/macros/luatex/latex/pyluatex/pyluatex.tex
+++ b/macros/luatex/latex/pyluatex/pyluatex.tex
@@ -15,7 +15,7 @@
\usepackage{url}
\title{The \emph{pyluatex} package}
\author{Tobias Enderle\\\url{https://github.com/tndrle/PyLuaTeX}}
-\date{v0.1.2 (2021/07/14)}
+\date{v0.1.3 (2021/07/15)}
\begin{document}
\maketitle
\raggedright
@@ -72,13 +72,18 @@ The folder \inlcode|example| contains additional example documents:
Demonstrates the use of different Python sessions in a document
\item \inlcode|data-visualization.tex|\\[0.5ex]
Demonstrates the visualization of data using \textit{pgfplots} and \textit{pandas}
+\item \inlcode|matplotlib-external.tex|\\[0.5ex]
+ Demonstrates how \textit{matplotlib} plots can be generated and included in a document
+\item \inlcode|matplotlib-pgf.tex|\\[0.5ex]
+ Demonstrates how \textit{matplotlib} plots can be generated and included in a document using \textit{PGF}
\end{itemize}
For more intricate use cases have a look at our tests in the folder \inlcode|test|.
\section{Installation}
-PyLuaTeX is not yet available through package managers or CTAN\footnote{\url{https://ctan.org}}.
+PyLuaTeX is available on CTAN\footnote{\url{https://ctan.org/pkg/pyluatex}} and in MiKTeX.
+It will be available in TeX Live soon (when you read this it probably already is).
-To install PyLuaTeX, do the following steps:
+To install PyLuaTeX \textbf{manually}, do the following steps:
\begin{enumerate}
\item Locate your local \textit{TEXMF} folder\\[0.5ex]
The location of this folder may vary. Typical defaults for TeX Live are \inlcode|~/texmf| for Linux,
diff --git a/macros/texinfo/latest/htmlxref.cnf b/macros/texinfo/latest/htmlxref.cnf
new file mode 100644
index 0000000000..b02c5fde54
--- /dev/null
+++ b/macros/texinfo/latest/htmlxref.cnf
@@ -0,0 +1,651 @@
+# htmlxref.cnf - reference file for free Texinfo manuals on the web.
+
+htmlxrefversion=2020-10-20.13; # UTC
+
+# Copyright 2010-2020 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+#
+# The latest version of this file is available at
+# http://ftpmirror.gnu.org/texinfo/htmlxref.cnf.
+# Email corrections or additions to bug-texinfo@gnu.org.
+# The primary goal is to list all relevant GNU manuals;
+# other free manuals are also welcome.
+#
+# To be included in this list, a manual must:
+#
+# - have a generic url, e.g., no version numbers;
+# - have a unique file name (e.g., manual identifier), i.e., be related to the
+# package name. Things like "refman" or "tutorial" don't work.
+# - follow the naming convention for nodes described at
+# http://www.gnu.org/software/texinfo/manual/texinfo/html_node/HTML-Xref.html
+# This is what makeinfo and texi2html implement.
+#
+# Unless the above criteria are met, it's not possible to generate
+# reliable cross-manual references.
+#
+# For information on automatically generating all the useful formats for
+# a manual to put on the web, see
+# http://www.gnu.org/prep/maintain/html_node/Manuals-on-Web-Pages.html.
+
+# For people editing this file: when a manual named foo is related to a
+# package named bar, the url should contain a variable reference ${BAR}.
+# Otherwise, the gnumaint scripts have no way of knowing they are
+# associated, and thus gnu.org/manual can't include them.
+
+# shorten references to manuals on www.gnu.org.
+G = https://www.gnu.org
+GS = ${G}/software
+
+3dldf mono ${GS}/3dldf/manual/user_ref/3DLDF.html
+3dldf node ${GS}/3dldf/manual/user_ref/
+
+alive mono ${GS}/alive/manual/alive.html
+alive node ${GS}/alive/manual/html_node/
+
+anubis chapter ${GS}/anubis/manual/html_chapter/
+anubis section ${GS}/anubis/manual/html_section/
+anubis node ${GS}/anubis/manual/html_node/
+
+artanis mono ${GS}/artanis/manual/artanis.html
+artanis node ${GS}/artanis/manual/html_node/
+
+aspell section http://aspell.net/man-html/index.html
+
+auctex mono ${GS}/auctex/manual/auctex.html
+auctex node ${GS}/auctex/manual/auctex/
+
+autoconf mono ${GS}/autoconf/manual/autoconf.html
+autoconf node ${GS}/autoconf/manual/html_node/
+
+autogen mono ${GS}/autogen/manual/html_mono/autogen.html
+autogen chapter ${GS}/autogen/manual/html_chapter/
+autogen node ${GS}/autoconf/manual/html_node/
+
+automake mono ${GS}/automake/manual/automake.html
+automake node ${GS}/automake/manual/html_node/
+
+avl node http://adtinfo.org/libavl.html/
+
+bash mono ${GS}/bash/manual/bash.html
+bash node ${GS}/bash/manual/html_node/
+
+BINUTILS = https://sourceware.org/binutils/docs
+binutils node ${BINUTILS}/binutils/
+ as node ${BINUTILS}/as/
+ bfd node ${BINUTILS}/bfd/
+ gprof node ${BINUTILS}/gprof/
+ ld node ${BINUTILS}/ld/
+
+bison mono ${GS}/bison/manual/bison.html
+bison node ${GS}/bison/manual/html_node/
+
+bpel2owfn mono ${GS}/bpel2owfn/manual/2.0.x/bpel2owfn.html
+
+ccd2cue mono ${GS}/ccd2cue/manual/ccd2cue.html
+ccd2cue node ${GS}/ccd2cue/manual/html_node/
+
+cflow mono ${GS}/cflow/manual/cflow.html
+cflow node ${GS}/cflow/manual/html_node/
+
+chess mono ${GS}/chess/manual/gnuchess.html
+chess node ${GS}/chess/manual/html_node/
+
+combine mono ${GS}/combine/manual/combine.html
+combine chapter ${GS}/combine/manual/html_chapter/
+combine section ${GS}/combine/manual/html_section/
+combine node ${GS}/combine/manual/html_node/
+
+complexity mono ${GS}/complexity/manual/complexity.html
+complexity node ${GS}/complexity/manual/html_node/
+
+coreutils mono ${GS}/coreutils/manual/coreutils
+coreutils node ${GS}/coreutils/manual/html_node/
+
+cpio mono ${GS}/cpio/manual/cpio
+cpio node ${GS}/cpio/manual/html_node/
+
+cssc node ${GS}/cssc/manual/
+
+CVS = ${GS}/trans-coord/manual
+cvs mono ${CVS}/cvs/cvs.html
+cvs node ${CVS}/cvs/html_node/
+
+ddd mono ${GS}/ddd/manual/html_mono/ddd.html
+
+ddrescue mono ${GS}/ddrescue/manual/ddrescue_manual.html
+
+dejagnu node ${GS}/dejagnu/manual/
+
+DICO = https://puszcza.gnu.org.ua/software/dico/manual
+dico mono ${DICO}/dico.html
+dico chapter ${DICO}/html_chapter/
+dico section ${DICO}/html_section/
+dico node ${DICO}/html_node/
+
+diffutils mono ${GS}/diffutils/manual/diffutils
+diffutils node ${GS}/diffutils/manual/html_node/
+
+dmd mono ${GS}/dmd/manual/dmd
+dmd node ${GS}/dmd/manual/html_node/
+
+ed mono ${GS}/ed/manual/ed_manual.html
+
+EMACS = ${GS}/emacs/manual
+emacs mono ${EMACS}/html_mono/emacs.html
+emacs node ${EMACS}/html_node/emacs/
+ #
+ ada-mode mono ${EMACS}/html_mono/ada-mode.html
+ ada-mode node ${EMACS}/html_node/ada-mode/
+ #
+ autotype mono ${EMACS}/html_mono/autotype.html
+ autotype node ${EMACS}/html_node/autotype/
+ #
+ ccmode mono ${EMACS}/html_mono/ccmode.html
+ ccmode node ${EMACS}/html_node/ccmode/
+ #
+ cl mono ${EMACS}/html_mono/cl.html
+ cl node ${EMACS}/html_node/cl/
+ #
+ ebrowse mono ${EMACS}/html_mono/ebrowse.html
+ ebrowse node ${EMACS}/html_node/ebrowse/
+ #
+ ediff mono ${EMACS}/html_mono/ediff.html
+ ediff node ${EMACS}/html_node/ediff/
+ #
+ eieio mono ${EMACS}/html_mono/eieio.html
+ eieio node ${EMACS}/html_node/eieio/
+ #
+ elisp mono ${EMACS}/html_mono/elisp.html
+ elisp node ${EMACS}/html_node/elisp/
+ #
+ epa mono ${EMACS}/html_mono/epa.html
+ epa node ${EMACS}/html_node/epa/
+ #
+ erc mono ${EMACS}/html_mono/erc.html
+ erc node ${EMACS}/html_node/erc/
+ #
+ dired-x mono ${EMACS}/html_mono/dired-x.html
+ dired-x node ${EMACS}/html_node/dired-x/
+ #
+ eshell mono ${EMACS}/html_mono/eshell.html
+ eshell node ${EMACS}/html_node/eshell/
+ #
+ eww mono ${EMACS}/html_mono/eww.html
+ eww node ${EMACS}/html_node/eww/
+ #
+ flymake mono ${EMACS}/html_mono/flymake.html
+ flymake node ${EMACS}/html_node/flymake/
+ #
+ gnus mono ${EMACS}/html_mono/gnus.html
+ gnus node ${EMACS}/html_node/gnus/
+ #
+ idlwave mono ${EMACS}/html_mono/idlwave.html
+ idlwave node ${EMACS}/html_node/idlwave/
+ #
+ info mono ${EMACS}/html_mono/info.html
+ info node ${EMACS}/html_node/info/
+ #
+ message mono ${EMACS}/html_mono/message.html
+ message node ${EMACS}/html_node/message/
+ #
+ mh-e mono ${EMACS}/html_mono/mh-e.html
+ mh-e node ${EMACS}/html_node/mh-e/
+ #
+ nxml-mode mono ${EMACS}/html_mono/nxml-mode.html
+ nxml-mode node ${EMACS}/html_node/nxml-mode/
+ #
+ org mono ${EMACS}/html_mono/org.html
+ org node ${EMACS}/html_node/org/
+ #
+ pcl-cvs mono ${EMACS}/html_mono/pcl-cvs.html
+ pcl-cvs node ${EMACS}/html_node/pcl-cvs/
+ #
+ rcirc mono ${EMACS}/html_mono/rcirc.html
+ rcirc node ${EMACS}/html_node/rcirc/
+ #
+ semantic mono ${EMACS}/html_mono/semantic.html
+ semantic node ${EMACS}/html_node/semantic/
+ #
+ smtp mono ${EMACS}/html_mono/smtpmail.html
+ smtp node ${EMACS}/html_node/smtpmail/
+ #
+ speedbar mono ${EMACS}/html_mono/speedbar.html
+ speedbar node ${EMACS}/html_node/speedbar/
+ #
+ tramp mono ${EMACS}/html_mono/tramp.html
+ tramp node ${EMACS}/html_node/tramp/
+ #
+ vip mono ${EMACS}/html_mono/vip.html
+ vip node ${EMACS}/html_node/vip/
+ #
+ viper mono ${EMACS}/html_mono/viper.html
+ viper node ${EMACS}/html_node/viper/
+ #
+ woman mono ${EMACS}/html_mono/woman.html
+ woman node ${EMACS}/html_node/woman/
+ # (end emacs manuals)
+
+easejs mono ${GS}/easejs/manual/easejs.html
+easejs node ${GS}/easejs/manual/
+
+emacs-muse node ${GS}/emacs-muse/manual/muse.html
+emacs-muse node ${GS}/emacs-muse/manual/html_node/
+
+emms node ${GS}/emms/manual/
+
+findutils mono ${GS}/findutils/manual/html_mono/find.html
+findutils node ${GS}/findutils/manual/html_node/find_html
+
+flex node https://westes.github.io/flex/manual/
+
+gama mono ${GS}/gama/manual/gama.html
+gama node ${GS}/gama/manual/html_node/
+
+GAWK = ${GS}/gawk/manual
+gawk mono ${GAWK}/gawk.html
+gawk node ${GAWK}/html_node/
+ gawkinet mono ${GAWK}/gawkinet/gawkinet.html
+ gawkinet node ${GAWK}/gawkinet/html_node/
+
+gcal mono ${GS}/gcal/manual/gcal.html
+gcal node ${GS}/gcal/manual/html_node/
+
+GCC = https://gcc.gnu.org/onlinedocs
+gcc node ${GCC}/gcc/
+ cpp node ${GCC}/cpp/
+ gfortran node ${GCC}/gfortran/
+ gnat_rm node ${GCC}/gnat_rm/
+ gnat_ugn node ${GCC}/gnat_ugn/
+ libgomp node ${GCC}/libgomp/
+ libstdc++ node ${GCC}/libstdc++/
+ #
+ gccint node ${GCC}/gccint/
+ cppinternals node ${GCC}/cppinternals/
+ gfc-internals node ${GCC}/gfc-internals/
+ gnat-style node ${GCC}/gnat-style/
+ libiberty node ${GCC}/libiberty/
+
+GDB = https://sourceware.org/gdb/current/onlinedocs
+gdb node ${GDB}/gdb/
+ stabs node ${GDB}/stabs/
+
+GDBM = http://www.gnu.org.ua/software/gdbm/manual
+gdbm mono ${GDBM}/gdbm.html
+gdbm chapter ${GDBM}/html_chapter/
+gdbm section ${GDBM}/html_section/
+gdbm node ${GDBM}/html_node/
+
+gettext mono ${GS}/gettext/manual/gettext.html
+gettext node ${GS}/gettext/manual/html_node/
+
+gforth node https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/
+
+global mono ${GS}/global/manual/global.html
+
+gmediaserver node ${GS}/gmediaserver/manual/
+
+gmp node https://www.gmplib.org/manual/
+
+gnu-arch node ${GS}/gnu-arch/tutorial/
+
+gnu-c-manual mono ${GS}/gnu-c-manual/gnu-c-manual.html
+
+gnu-crypto node ${GS}/gnu-crypto/manual/
+
+gnubg mono ${GS}/gnubg/manual/gnubg.html
+gnubg node ${GS}/gnubg/manual/html_node/
+
+gnubik mono ${GS}/gnubik/manual/gnubik.html
+gnubik node ${GS}/gnubik/manual/html_node/
+
+gnulib mono ${GS}/gnulib/manual/gnulib.html
+gnulib node ${GS}/gnulib/manual/html_node/
+
+GNUN = ${GS}/trans-coord/manual
+gnun mono ${GNUN}/gnun/gnun.html
+gnun node ${GNUN}/gnun/html_node/
+ web-trans mono ${GNUN}/web-trans/web-trans.html
+ web-trans node ${GNUN}/web-trans/html_node/
+
+GNUPG = https://www.gnupg.org/documentation/manuals
+gnupg node ${GNUPG}/gnupg/
+ dirmngr node ${GNUPG}/dirmngr/
+ gcrypt node ${GNUPG}/gcrypt/
+ libgcrypt node ${GNUPG}/gcrypt/
+ ksba node ${GNUPG}/ksba/
+ assuan node ${GNUPG}/assuan/
+ gpgme node ${GNUPG}/gpgme/
+
+gnuprologjava node ${GS}/gnuprologjava/manual/
+
+gnuschool mono ${GS}/gnuschool/gnuschool.html
+
+GNUSTANDARDS = ${G}/prep
+ maintain mono ${GNUSTANDARDS}/maintain/maintain.html
+ maintain node ${GNUSTANDARDS}/maintain/html_node/
+ #
+ standards mono ${GNUSTANDARDS}/standards/standards.html
+ standards node ${GNUSTANDARDS}/standards/html_node/
+
+gnutls mono ${GS}/gnutls/manual/gnutls.html
+gnutls node ${GS}/gnutls/manual/html_node/
+
+gperf mono ${GS}/gperf/manual/gperf.html
+gperf node ${GS}/gperf/manual/html_node/
+
+grep mono ${GS}/grep/manual/grep.html
+grep node ${GS}/grep/manual/html_node/
+
+groff node ${GS}/groff/manual/html_node/
+
+GRUB = ${GS}/grub/manual
+ grub mono ${GRUB}/grub.html
+ grub node ${GRUB}/html_node/
+ #
+ multiboot mono ${GRUB}/multiboot/multiboot.html
+ multiboot node ${GRUB}/multiboot/html_node/
+
+gsasl mono ${GS}/gsasl/manual/gsasl.html
+gsasl node ${GS}/gsasl/manual/html_node/
+
+gsl node ${GS}/gsl/manual/html_node/
+
+gsrc mono ${GS}/gsrc/manual/gsrc.html
+gsrc node ${GS}/gsrc/manual/html_node/
+
+gss mono ${GS}/gss/manual/gss.html
+gss node ${GS}/gss/manual/html_node/
+
+gtypist mono ${GS}/gtypist/doc/
+
+guile mono ${GS}/guile/manual/guile.html
+guile node ${GS}/guile/manual/html_node/
+
+GUILE_GNOME = ${GS}/guile-gnome/docs
+ gobject node ${GUILE_GNOME}/gobject/html/
+ glib node ${GUILE_GNOME}/glib/html/
+ atk node ${GUILE_GNOME}/atk/html/
+ pango node ${GUILE_GNOME}/pango/html/
+ pangocairo node ${GUILE_GNOME}/pangocairo/html/
+ gdk node ${GUILE_GNOME}/gdk/html/
+ gtk node ${GUILE_GNOME}/gtk/html/
+ libglade node ${GUILE_GNOME}/libglade/html/
+ gnome-vfs node ${GUILE_GNOME}/gnome-vfs/html/
+ libgnomecanvas node ${GUILE_GNOME}/libgnomecanvas/html/
+ gconf node ${GUILE_GNOME}/gconf/html/
+ libgnome node ${GUILE_GNOME}/libgnome/html/
+ libgnomeui node ${GUILE_GNOME}/libgnomeui/html/
+ corba node ${GUILE_GNOME}/corba/html/
+ clutter node ${GUILE_GNOME}/clutter/html/
+ clutter-glx node ${GUILE_GNOME}/clutter-glx/html/
+
+guile-gtk node ${GS}/guile-gtk/docs/guile-gtk/
+
+guile-rpc mono ${GS}/guile-rpc/manual/guile-rpc.html
+guile-rpc node ${GS}/guile-rpc/manual/html_node/
+
+guix mono ${GS}/guix/manual/guix.html
+guix node ${GS}/guix/manual/html_node/
+
+gv mono ${GS}/gv/manual/gv.html
+gv node ${GS}/gv/manual/html_node/
+
+gzip mono ${GS}/gzip/manual/gzip.html
+gzip node ${GS}/gzip/manual/html_node/
+
+hello mono ${GS}/hello/manual/hello.html
+hello node ${GS}/hello/manual/html_node/
+
+help2man mono ${GS}/help2man/help2man.html
+
+idutils mono ${GS}/idutils/manual/idutils.html
+idutils node ${GS}/idutils/manual/html_node/
+
+inetutils mono ${GS}/inetutils/manual/inetutils.html
+inetutils node ${GS}/inetutils/manual/html_node/
+
+jwhois mono ${GS}/jwhois/manual/jwhois.html
+jwhois node ${GS}/jwhois/manual/html_node/
+
+libc mono ${GS}/libc/manual/html_mono/libc.html
+libc node ${GS}/libc/manual/html_node/
+
+LIBCDIO = ${GS}/libcdio
+ libcdio mono ${LIBCDIO}/libcdio.html
+ cd-text mono ${LIBCDIO}/cd-text-format.html
+
+libextractor mono ${GS}/libextractor/manual/libextractor.html
+libextractor node ${GS}/libextractor/manual/html_node/
+
+libidn mono ${GS}/libidn/manual/libidn.html
+libidn node ${GS}/libidn/manual/html_node/
+
+librejs mono ${GS}/librejs/manual/librejs.html
+librejs node ${GS}/librejs/manual/html_node/
+
+libmatheval mono ${GS}/libmatheval/manual/libmatheval.html
+
+LIBMICROHTTPD = ${GS}/libmicrohttpd
+libmicrohttpd mono ${LIBMICROHTTPD}/manual/libmicrohttpd.html
+libmicrohttpd node ${LIBMICROHTTPD}/manual/html_node/
+ microhttpd-tutorial mono ${LIBMICROHTTPD}/tutorial.html
+
+libtasn1 mono ${GS}/libtasn1/manual/libtasn1.html
+libtasn1 node ${GS}/libtasn1/manual/html_node/
+
+libtool mono ${GS}/libtool/manual/libtool.html
+libtool node ${GS}/libtool/manual/html_node/
+
+lightning mono ${GS}/lightning/manual/lightning.html
+lightning node ${GS}/lightning/manual/html_node/
+
+# The stable/ url redirects immediately, but that's ok.
+# The .html extension is omitted on their web site, but it works if given.
+LILYPOND = http://lilypond.org/doc/stable/Documentation
+ lilypond-internals node ${LILYPOND}/internals/
+ lilypond-learning node ${LILYPOND}/learning/
+ lilypond-notation node ${LILYPOND}/notation/
+ lilypond-snippets node ${LILYPOND}/snippets/
+ lilypond-usage node ${LILYPOND}/usage/
+ lilypond-web node ${LILYPOND}/web/
+ music-glossary node ${LILYPOND}/music-glossary/
+
+liquidwar6 mono ${GS}/liquidwar6/manual/liquidwar6.html
+liquidwar6 node ${GS}/liquidwar6/manual/html_node/
+
+lispintro mono ${GS}/emacs/emacs-lisp-intro/html_mono/emacs-lisp-intro.html
+lispintro node ${GS}/emacs/emacs-lisp-intro/html_node/index.html
+
+LSH = http://www.lysator.liu.se/~nisse/lsh
+ lsh mono ${LSH}/lsh.html
+
+m4 mono ${GS}/m4/manual/m4.html
+m4 node ${GS}/m4/manual/html_node/
+
+mailutils mono ${GS}/mailutils/manual/mailutils.html
+mailutils chapter ${GS}/mailutils/manual/html_chapter/
+mailutils section ${GS}/mailutils/manual/html_section/
+mailutils node ${GS}/mailutils/manual/html_node/
+
+make mono ${GS}/make/manual/make.html
+make node ${GS}/make/manual/html_node/
+
+mdk mono ${GS}/mdk/manual/mdk.html
+mdk node ${GS}/mdk/manual/html_node/
+
+METAEXCHANGE = https://ftp.gwdg.de/pub/gnu2/iwfmdh/doc/texinfo
+ iwf_mh node ${METAEXCHANGE}/iwf_mh.html
+ scantest node ${METAEXCHANGE}/scantest.html
+
+MIT_SCHEME = ${GS}/mit-scheme/documentation/stable
+ mit-scheme-ref node ${MIT_SCHEME}/mit-scheme-ref/
+ mit-scheme-user node ${MIT_SCHEME}/mit-scheme-user/
+ sos node ${MIT_SCHEME}/mit-scheme-sos/
+ mit-scheme-imail mono ${MIT_SCHEME}/mit-scheme-imail.html
+
+moe mono ${GS}/moe/manual/moe_manual.html
+
+motti node ${GS}/motti/manual/
+
+mpc node http://www.multiprecision.org/index.php?prog=mpc&page=html
+
+mpfr mono http://www.mpfr.org/mpfr-current/mpfr.html
+
+mtools mono ${GS}/mtools/manual/mtools.html
+
+myserver mono http://www.myserverproject.net/doc.php
+
+nano mono https://www.nano-editor.org/dist/latest/nano.html
+
+nettle chapter http://www.lysator.liu.se/~nisse/nettle/nettle.html
+
+ocrad mono ${GS}/ocrad/manual/ocrad_manual.html
+
+parted mono ${GS}/parted/manual/parted.html
+parted node ${GS}/parted/manual/html_node/
+
+pascal mono http://www.gnu-pascal.de/gpc/
+
+# can't use pcb since url's contain dates --30nov10
+
+perl mono ${GS}/perl/manual/perldoc-all.html
+
+PIES = http://www.gnu.org.ua/software/pies/manual
+pies mono ${PIES}/pies.html
+pies chapter ${PIES}/html_chapter/
+pies section ${PIES}/html_section/
+pies node ${PIES}/html_node/
+
+plotutils mono ${GS}/plotutils/manual/en/plotutils.html
+plotutils node ${GS}/plotutils/manual/en/html_node/
+
+proxyknife mono ${GS}/proxyknife/manual/proxyknife.html
+proxyknife node ${GS}/proxyknife/manual/html_node/
+
+pspp mono ${GS}/pspp/manual/pspp.html
+pspp node ${GS}/pspp/manual/html_node/
+
+pyconfigure mono ${GS}/pyconfigure/manual/pyconfigure.html
+pyconfigure node ${GS}/pyconfigure/manual/html_node/
+
+R = https://cran.r-project.org/doc/manuals
+ R-intro mono ${R}/R-intro.html
+ R-lang mono ${R}/R-lang.html
+ R-exts mono ${R}/R-exts.html
+ R-data mono ${R}/R-data.html
+ R-admin mono ${R}/R-admin.html
+ R-ints mono ${R}/R-ints.html
+
+rcs mono ${GS}/rcs/manual/rcs.html
+rcs node ${GS}/rcs/manual/html_node/
+
+READLINE = https://tiswww.cwru.edu/php/chet/readline
+readline mono ${READLINE}/readline.html
+ rluserman mono ${READLINE}/rluserman.html
+ history mono ${READLINE}/history.html
+
+recode mono http://recode.progiciels-bpi.ca/manual/index.html
+
+recutils mono ${GS}/recutils/manual/recutils.html
+recutils node ${GS}/recutils/manual/html_node/
+
+reftex mono ${GS}/auctex/manual/reftex.html
+reftex node ${GS}/auctex/manual/reftex/
+
+remotecontrol mono ${GS}/remotecontrol/manual/remotecontrol.html
+remotecontrol node ${GS}/remotecontrol/manual/html_node/
+
+rottlog mono ${GS}/rottlog/manual/rottlog.html
+rottlog node ${GS}/rottlog/manual/html_node/
+
+RUSH = http://www.gnu.org.ua/software/rush/manual
+rush mono ${RUSH}/rush.html
+rush chapter ${RUSH}/html_chapter/
+rush section ${RUSH}/html_section/
+rush node ${RUSH}/html_node/
+
+screen mono ${GS}/screen/manual/screen.html
+screen node ${GS}/screen/manual/html_node/
+
+sed mono ${GS}/sed/manual/sed.html
+sed node ${GS}/sed/manual/html_node/
+
+sharutils mono ${GS}/sharutils/manual/html_mono/sharutils.html
+sharutils chapter ${GS}/sharutils/manual/html_chapter/
+sharutils node ${GS}/sharutils/manual/html_node/
+
+# can't use mono files since they have generic names
+SMALLTALK = ${GS}/smalltalk
+smalltalk node ${SMALLTALK}/manual/html_node/
+ smalltalk-base node ${SMALLTALK}/manual-base/html_node/
+ smalltalk-libs node ${SMALLTALK}/manual-libs/html_node/
+
+sourceinstall mono ${GS}/sourceinstall/manual/sourceinstall.html
+sourceinstall node ${GS}/sourceinstall/manual/html_node/
+
+sqltutor mono ${GS}/sqltutor/manual/sqltutor.html
+sqltutor node ${GS}/sqltutor/manual/html_node/
+
+src-highlite mono ${GS}/src-highlite/source-highlight.html
+
+swbis mono ${GS}/swbis/manual.html
+
+tar mono ${GS}/tar/manual/tar.html
+tar chapter ${GS}/tar/manual/html_chapter/
+tar section ${GS}/tar/manual/html_section/
+tar node ${GS}/tar/manual/html_node/
+
+teseq mono ${GS}/teseq/teseq.html
+teseq node ${GS}/teseq/html_node/
+
+TEXINFO = ${GS}/texinfo/manual
+texinfo mono ${TEXINFO}/texinfo/texinfo.html
+texinfo node ${TEXINFO}/texinfo/html_node/
+ #
+ info-stnd mono ${TEXINFO}/info-stnd/info-stnd.html
+ info-stnd node ${TEXINFO}/info-stnd/html_node/
+
+thales node ${GS}/thales/manual/
+
+units mono ${GS}/units/manual/units.html
+units node ${GS}/units/manual/html_node/
+
+vc-dwim mono ${GS}/vc-dwim/manual/vc-dwim.html
+vc-dwim node ${GS}/vc-dwim/manual/html_node/
+
+wdiff mono ${GS}/wdiff/manual/wdiff.html
+wdiff node ${GS}/wdiff/manual/html_node/
+
+websocket4j mono ${GS}/websocket4j/manual/websocket4j.html
+websocket4j node ${GS}/websocket4j/manual/html_node/
+
+wget mono ${GS}/wget/manual/wget.html
+wget node ${GS}/wget/manual/html_node/
+
+xboard mono ${GS}/xboard/manual/xboard.html
+xboard node ${GS}/xboard/manual/html_node/
+
+# emacs-page
+# Free TeX-related Texinfo manuals on tug.org.
+
+T = https://tug.org/texinfohtml
+
+dvipng mono ${T}/dvipng.html
+dvips mono ${T}/dvips.html
+eplain mono ${T}/eplain.html
+kpathsea mono ${T}/kpathsea.html
+latex2e mono ${T}/latex2e.html
+tlbuild mono ${T}/tlbuild.html
+web2c mono ${T}/web2c.html
+
+
+# Local Variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "htmlxrefversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/macros/texinfo/latest/texi2pdf b/macros/texinfo/latest/texi2pdf
new file mode 100644
index 0000000000..ca918e2198
--- /dev/null
+++ b/macros/texinfo/latest/texi2pdf
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Written by Thomas Esser. Public domain.
+# Execute texi2dvi --pdf.
+
+test -f /bin/ksh && test -z "$RUNNING_KSH" \
+ && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \
+ && { RUNNING_KSH=true; export RUNNING_KSH; exec /bin/ksh $0 ${1+"$@"}; }
+unset RUNNING_KSH
+
+test -f /bin/bsh && test -z "$RUNNING_BSH" \
+ && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \
+ && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; }
+unset RUNNING_BSH
+
+# hack around a bug in zsh:
+test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
+
+# special-case --version following GNU standards for identifying the
+# program name. If --version is specified as other than the first
+# argument, we don't output the standard name, but then, we're not
+# obliged to.
+if test "x$1" = x--version; then
+ cat <<EOF
+texi2pdf (GNU Texinfo 6.8)
+
+Copyright (C) 2021 Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+EOF
+ exit 0
+fi
+
+texi2dvi --pdf ${1+"$@"}
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.pdf b/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.pdf
index 25af416b7a..06abe4eebf 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.pdf
+++ b/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.tex b/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.tex
index 820bb86a05..34bc998f74 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.tex
+++ b/macros/unicodetex/latex/beaulivre/beaulivre-doc-cn.tex
@@ -1,12 +1,11 @@
-%! TEX program = xelatex
-\documentclass[Chinese,English,French,allowbf,puretext]{beaulivre}
+\documentclass[English,Chinese,French,allowbf,puretext]{beaulivre}
\theoremstyle{basic}
\CreateTheorem{definition}<highest>
-\CreateTheorem{theorem}<highest>
-\CreateTheorem{conjecture}<highest>
+\CreateTheorem{theorem}[definition]
+\CreateTheorem{conjecture}[definition]
\CreateTheorem*{example*}
-\CreateTheorem{problem}<highest>
+\CreateTheorem{problem}[definition]
\theoremstyle{emphasis}
\CreateTheorem{remark}<highest>
@@ -14,16 +13,19 @@
\theoremstyle{simple}
%%================================
-%% 引入工具集
+%% Import toolkit
%%================================
\usepackage{ProjLib}
\usepackage{longtable} % breakable tables
\usepackage{hologo} % more TeX logo
+\usetikzlibrary{calc}
+
+\usepackage{blindtext}
\UseLanguage{Chinese}
%%================================
-%% 排版代码
+%% For typesetting code
%%================================
\usepackage{listings}
\definecolor{maintheme}{RGB}{70,130,180}
@@ -42,19 +44,27 @@
escapeinside={(*}{*)},
% numbers=left,
numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- firstnumber=last,
-}
+ % firstnumber=last,
+}
\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{moretexcs=%
- {subsubsection,href,color,NameTheorem,CreateTheorem,proofideanameCN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib
+ {part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
+ color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
}
}
-\lstnewenvironment{code}%
-{\setkeys{lst}{columns=fullflexible,keepspaces=true}}{}
+\lstnewenvironment{code}%
+{\setstretch{1.07}%
+\setkeys{lst}{columns=fullflexible,keepspaces=true}%
+}{}
+\lstnewenvironment{code*}%
+{\setstretch{1.07}%
+\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
+}{}
%%================================
%% tip
%%================================
+\usepackage[many]{tcolorbox}
\newenvironment{tip}[1][提示]{%
\begin{tcolorbox}[breakable,
enhanced,
@@ -69,34 +79,30 @@
after skip = 0.3cm,
top = 3mm,
bottom = 3mm,
- title={\sffamily #1}]%
+ title={\scshape\sffamily #1}]%
}{\end{tcolorbox}}
%%================================
-%% 名称
+%% Names
%%================================
-\providecommand{\colorist}{{\normalfont\textsf{colorist}}}
-\providecommand{\colorart}{{\normalfont\textsf{colorart}}}
-\providecommand{\colorbook}{{\normalfont\textsf{colorbook}}}
-\providecommand{\lebhart}{{\normalfont\textsf{lebhart}}}
-\providecommand{\beaulivre}{{\normalfont\textsf{beaulivre}}}
-
-\usetikzlibrary{calc}
+\providecommand{\colorist}{\textsf{colorist}}
+\providecommand{\colorart}{\textsf{colorart}}
+\providecommand{\colorbook}{\textsf{colorbook}}
+\providecommand{\lebhart}{\textsf{lebhart}}
+\providecommand{\beaulivre}{\textsf{beaulivre}}
-\usepackage{blindtext}
+%%================================
+%% Titles
+%%================================
+\let\LevelOneTitle\chapter
+\let\LevelTwoTitle\section
+\let\LevelThreeTitle\subsection
%%================================
-%% 正文
+%% Main text
%%================================
\begin{document}
-% \title{\beaulivre{},以多彩的方式排版你的图书}
-% \author{许锦文}
-% \thanks{对应版本. \texttt{\beaulivre{} 2021/06/07}}
-% \date{2021年6月,北京}
-
-% \maketitle
-
\frontmatter
\begin{titlepage} % Suppresses displaying the page number on the title page and the subsequent page counts as page 1
@@ -104,9 +110,9 @@
\fill [cyan!90!black] ($(current page.south west)+(0,7)$) rectangle ($(current page.north west)+(25,-7)$);
\fill [yellow] (current page.south west) rectangle ($(current page.north west)+(3,0)$);
\node[text width=10cm] at ($(current page.north west)+(8.5,-6)$) {\huge\ProjLib};
- \node[text width=6cm,text height=3.5cm,scale=2.5] at ($(current page.north west)+(11,-10)$) {\textcolor{white}{\sffamily\beaulivre{}\\[5pt]\footnotesize\hspace*{-.05em}以多彩的方式排版你的图书\\[10pt]\tiny 对应版本. \texttt{\beaulivre{} 2021/06/30}}};
+ \node[text width=6cm,text height=3.5cm,scale=2.5] at ($(current page.north west)+(11,-10)$) {\textcolor{white}{\sffamily\beaulivre{}\\[5pt]\footnotesize\hspace*{-.05em}以多彩的方式排版你的图书\\[10pt]\tiny 对应版本. \texttt{\beaulivre{} 2021/07/15}}};
\node at ($(current page.south)+(1.5,3)$) {\fontsize{16pt}{0pt}\selectfont\textcolor{gray}{许锦文}};
- \node at ($(current page.south)+(1.5,2)$) {\fontsize{12pt}{0pt}\selectfont\textcolor{gray}{2021年6月,北京}};
+ \node at ($(current page.south)+(1.5,2)$) {\fontsize{12pt}{0pt}\selectfont\textcolor{gray}{2021年7月,北京}};
\end{tikzpicture}%
\end{titlepage}%
\cleardoublepage%
@@ -116,16 +122,11 @@
\beaulivre{} 是 \colorist{} 文档类系列的成员之一,其名称取自于法文的beau (美丽),以及livre (书),由二者组合而成。整个 \colorist{} 系列包含用于排版文章的 \colorart{}、\lebhart{} 以及用于排版书的 \colorbook{}、\beaulivre{}。我设计这一系列的初衷是为了撰写草稿与笔记,使之多彩而不缭乱。
-\beaulivre{} 英语、法语、德语、意大利语、葡萄牙语、巴西葡萄牙语、西班牙语、简体中文、繁体中文、日文、俄文,并且同一篇文档中这些语言可以很好地协调。由于采用了自定义字体,需要用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎进行编译。
+\beaulivre{} 支持英语、法语、德语、意大利语、葡萄牙语、巴西葡萄牙语、西班牙语、简体中文、繁体中文、日文、俄文,并且同一篇文档中这些语言可以很好地协调。由于采用了自定义字体,需要用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎进行编译。
这篇说明文档即是用 \beaulivre{} 排版的 (使用了参数 \texttt{allowbf}),你可以把它看作一份简短的说明与演示。
\bigskip
-\begin{tcolorbox}[enhanced jigsaw,pad at break*=1mm,breakable,colback=yellow!25!paper,boxrule=0pt,frame hidden]
- 由于\colorist{}主体是从\textsf{minimalist}系列修改而来的,因而一些页面元素还未完全重新设计,特别是目录、part和chapter的样式。这些内容会在将来逐渐加入。
-\end{tcolorbox}
-
-\bigskip
\begin{tip}
多语言支持、定理类环境、未完成标记等功能是由 \ProjLib{} 工具箱提供的,这里只给出了将其与本文档类搭配使用的要点。如需获取更详细的信息,可以参阅 \ProjLib{} 的说明文档。
\end{tip}
@@ -134,9 +135,21 @@
\mainmatter
-\chapter{初始化}
+\part{说明}
+\parttext{可以通过 \lstinline|\\parttext|\meta{text} 在这里添加一些说明}
+
+\medskip
+\LevelOneTitle*{开始之前}
+为了使用这篇文档中提到的文档类,你需要:
+\begin{itemize}
+ \item 安装一个尽可能新版本的 TeX Live 或 MikTeX 套装,并确保 \texttt{colorist} 和 \texttt{projlib} 被正确安装在你的 \TeX 封装中。
+ \item 熟悉 \LaTeX{} 的基本使用方式,并且知道如何用 \hologo{pdfLaTeX}、\hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 编译你的文档。
+\end{itemize}
+
-\section{如何载入}
+\LevelOneTitle{使用示例}
+
+\LevelTwoTitle{如何加载}
只需要在第一行写:
@@ -150,7 +163,110 @@
要使用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎才能编译。
\end{tip}
-\section{选项}
+\LevelTwoTitle{一篇完整的文档示例}
+
+首先来看一段完整的示例。
+
+
+\begin{code*}
+\documentclass{colorbook}
+\usepackage{ProjLib}
+
+\UseLanguage{French}
+
+\begin{document}
+
+\frontmatter
+
+\begin{titlepage}
+ (*\meta{code for titlepage}*)
+\end{titlepage}
+
+\tableofcontents
+
+\mainmatter
+
+\part{(*\meta{part title}*)}
+\parttext{(*\meta{text after part title}*)}
+
+\chapter{(*\meta{chapter title}*)}
+
+\section{(*\meta{section title}*)}
+
+\dnf<Plus de contenu est nécessaire.>
+
+\begin{theorem}\label{thm:abc}
+ Ceci est un théorème.
+\end{theorem}
+Référence du théorème: \cref{thm:abc}
+
+\backmatter
+
+...
+
+\end{document}
+\end{code*}
+
+如果你觉得这个例子有些复杂,不要担心。现在我们来一点点地观察这个例子。
+
+\LevelThreeTitle{初始化部分}
+
+\medskip
+\begin{code}
+\documentclass{beaulivre}
+\usepackage{ProjLib}
+\end{code}
+
+初始化部分很简单:第一行加载文档类 \beaulivre{},第二行加载 \ProjLib{} 工具箱,以便使用一些附加功能。
+
+\LevelThreeTitle{设定语言}
+
+\medskip
+\begin{code}
+\UseLanguage{French}
+\end{code}
+
+这一行表明文档中将使用法语(如果你的文章中只出现英语,那么可以不需要设定语言)。你也可以在文章中间用同样的方式再次切换语言。支持的语言包括简体中文、繁体中文、日文、英语、法语、德语、西班牙语、葡萄牙语、巴西葡萄牙语、俄语。
+
+对于这一命令的详细说明以及更多相关命令,可以参考后面关于多语言支持的小节。
+
+
+\LevelThreeTitle{未完成标记}
+
+\medskip
+\begin{code}
+\dnf<(*\meta{some hint}*)>
+\end{code}
+当你有一些地方尚未完成的时候,可以用这条指令标记出来,它在草稿阶段格外有用。
+
+\LevelThreeTitle{定理类环境}
+
+\medskip
+\begin{code}
+\begin{theorem}\label{thm:abc}
+ Ceci est un théorème.
+\end{theorem}
+Référence du théorème: \cref{thm:abc}
+\end{code}
+
+常见的定理类环境可以直接使用。在引用的时候,建议采用智能引用 \lstinline|\cref{|\meta{label}\lstinline|}|——这样就不必每次都写上相应环境的名称了。
+
+
+
+
+\LevelOneTitle{关于默认字体}
+\lebhart{} 默认使用 Palatino Linotype 作为英文字体,方正悠宋、悠黑GBK作为中文字体,并部分使用了 Neo Euler 作为数学字体。其中,Neo Euler可以在 \url{https://github.com/khaledhosny/euler-otf} 下载。其他字体不是免费字体,需要自行购买使用。可以在方正字库网站查询详细资料:\url{https://www.foundertype.com}。
+
+\begin{itemize}
+ \item English main font. \textsf{English sans serif font}.
+ \item 中文主要字体,\textsf{中文无衬线字体}
+ \item 数学示例: \( \alpha, \beta, \gamma, \delta, 1,2,3,4, a,b,c,d \), \[\mathrm{li}(x)\coloneqq \int_2^{\infty} \frac{1}{\log t}\,\mathrm{d}t \]
+\end{itemize}
+
+在没有安装相应的字体时,将采用TeX Live中自带的字体来代替,效果可能会有所折扣。
+
+
+\LevelOneTitle{选项}
\beaulivre{} 文档类有下面几个选项:
@@ -158,6 +274,7 @@
\item 语言选项 \texttt{EN} / \texttt{english} / \texttt{English}、\texttt{FR} / \texttt{french} / \texttt{French},等等
\begin{itemize}
\item 具体选项名称可参见下一节的 \meta{language name}。第一个指定的语言将作为默认语言。
+ \item 语言选项不是必需的,其主要用途是提高编译速度。不添加语言选项时效果是一样的,只是会更慢一些。
\end{itemize}
\item \texttt{draft} 或 \texttt{fast}
\begin{itemize}
@@ -168,9 +285,9 @@
\item 启用 \ProjLib{} 工具箱的快速模式。
\end{itemize}
\end{itemize}
-\begin{tip}
- 在文章的撰写阶段,建议使用 \verb|fast| 选项以加快编译速度,改善写作时的流畅度。使用 \verb|fast| 模式时会有“DRAFT”字样的水印,以提示目前处于草稿阶段。
-\end{tip}
+ \begin{tip}
+ 在文章的撰写阶段,建议使用 \verb|fast| 选项以加快编译速度,改善写作时的流畅度。使用 \verb|fast| 模式时会有“DRAFT”字样的水印,以提示目前处于草稿阶段。
+ \end{tip}
\item \texttt{a4paper} 或 \texttt{b5paper}
\begin{itemize}
\item 可选的纸张大小。默认的纸张大小为 8.5in $\times$ 11in。
@@ -180,7 +297,6 @@
\item 字体选项。顾名思义,会加载相应名称的字体。
\item \texttt{useosf} 选项用来启用“旧式”数字。
\end{itemize}
- \clearpage
\item \texttt{allowbf}
\begin{itemize}
\item 允许加粗。启用这一选项时,题目、各级标题、定理类环境名称会被加粗。
@@ -189,7 +305,7 @@
\begin{itemize}
\item \lstinline|\subsubsection| 采用 ``runin'' 风格。
\end{itemize}
- \item \texttt{puretext} or \texttt{nothms}
+ \item \texttt{puretext} 或 \texttt{nothms}
\begin{itemize}
\item 纯文本模式,不加载定理类环境。
\end{itemize}
@@ -198,30 +314,12 @@
\item 定理类环境不编号。
\end{itemize}
\end{itemize}
-
\bigskip
另外,排版图书时常用的 \texttt{oneside}、\texttt{twoside} 选项也是可以使用的。默认采用双页排版。
-\chapter{关于默认字体}
-\beaulivre{} 默认使用 Palatino Linotype 作为英文字体,方正悠宋、悠黑GBK作为中文字体,并部分使用了 Neo Euler 作为数学字体。其中,Neo Euler可以在 \url{https://github.com/khaledhosny/euler-otf} 下载。其他字体不是免费字体,需要自行购买使用。可以在方正字库网站查询详细资料:\url{https://www.foundertype.com}。
+\LevelOneTitle{具体说明}
-\begin{tip}[字体演示]
- \begin{itemize}
- \item English main font. \textsf{English sans serif font}. \texttt{English typewriter font}.
- \item 中文主要字体,\textsf{中文无衬线字体}
- \item 数学示例: \( \alpha, \beta, \gamma, \delta, 1,2,3,4, a,b,c,d \), \[\mathrm{li}(x)\coloneqq \int_2^{\infty} \frac{1}{\log t}\,\mathrm{d}t \]
- \end{itemize}
-\end{tip}
-
-\bigskip
-在没有安装相应的字体时,将采用TeX Live中自带的字体来代替,效果可能会有所折扣。
-
-
-\chapter{使用说明}
-
-接下来介绍的许多功能是由 \ProjLib{} 工具箱提供的。这里只介绍了基本使用方法,更多细节可以直接参阅其用户文档。
-
-\section{语言设置}
+\LevelTwoTitle{语言设置}
\beaulivre{} 提供了多语言支持,包括英语、法语、德语、意大利语、葡萄牙语、巴西葡萄牙语、西班牙语、简体中文、繁体中文、日文、俄文。可以通过下列命令来选定语言:
\begin{itemize}
@@ -236,7 +334,7 @@
\end{itemize}
\meta{language name} 有下列选择 (不区分大小写,如 \texttt{French} 或 \texttt{french} 均可):
-\begin{itemize}\setstretch{1.15}
+\begin{itemize}
\item 简体中文:\texttt{CN}、\texttt{Chinese}、\texttt{SChinese} 或 \texttt{SimplifiedChinese}
\item 繁体中文:\texttt{TC}、\texttt{TChinese} 或 \texttt{TraditionalChinese}
\item 英文:\texttt{EN} 或 \texttt{English}
@@ -263,8 +361,7 @@
\end{itemize}
例如,\lstinline|\AddLanguageSetting(German){\color{orange}}| 可以让所有德语以橙色显示(当然,还需要再加上 \lstinline|\AddLanguageSetting{\color{black}}| 来修正其他语言的颜色)。
-
-\section{定理类环境及其引用}
+\LevelTwoTitle{定理类环境及其引用}
定义、定理等环境已经被预定义,可以直接使用。
@@ -273,17 +370,19 @@
在引用定理类环境时,建议使用智能引用 \lstinline|\cref{|\meta{label}\lstinline|}|。这样就不必每次都写上相应环境的名称了。
+\medskip
\begin{tip}[例子]
\begin{code}
\begin{definition}[奇异物品] \label{def: strange} ...
\end{code}
将会生成
\begin{definition}[奇异物品]\label{def: strange}
- 这是奇异物品的定义。
+ 这是奇异物品的定义。定理类环境的前后有一行左右的间距。在定义结束的时候会有一个符号来标记。
\end{definition}
\lstinline|\cref{def: strange}| 会显示为:\cref{def: strange}。
+\medskip
使用 \lstinline|\UseLanguage{English}| 后,定理会显示为:
\UseLanguage{English}
@@ -294,7 +393,9 @@
默认情况下,引用时,定理的名称总是与定理所在区域的语言匹配,例如,上面的定义在现在的英文模式下依然显示为中文:\cref{def: strange} 和 \cref{thm}。如果在引用时想让定理的名称与当前语境相匹配,可以在全局选项中加入 \texttt{regionalref}。
\end{tip}
-\medskip
+\UseLanguage{Chinese}
+
+\bigskip
下面是定理类环境的几种主要样式:
\begin{theorem}
Theorem style: theorem, proposition, lemma, corollary, ...
@@ -304,8 +405,6 @@
Proof style
\end{proof}
-\vspace{-\baselineskip}
-
\begin{remark}
Remark style
\end{remark}
@@ -323,6 +422,7 @@
\end{problem}
\medskip
+\clearpage
为了美观,相邻的定义环境会自动连在一起:
\begin{definition}
First definition.
@@ -332,20 +432,14 @@
Second definition.
\end{definition}
-\UseLanguage{Chinese}
-
-
-\section{定义新的定理型环境}
+\LevelTwoTitle{定义新的定理型环境}
若需要定义新的定理类环境,首先要定义这个环境在所用语言下的名称:
-% \vspace{-.15\baselineskip}%
\begin{itemize}
\item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
\end{itemize}
-% \vspace{-.15\baselineskip}%
其中,\meta{language name} 可参阅关于语言设置的小节。当不指定 \meta{language name}时,则会将该名称设置为所有支持语言下的名称。另外,带星号与不带星号的同名环境共用一个名称,因此 \lstinline|\NameTheorem{envname*}{...}| 与 \lstinline|\NameTheorem{envname}{...}| 效果相同。
-\medskip
然后用下面五种方式之一定义这一环境:
\begin{itemize}
\item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
@@ -380,7 +474,6 @@
其内部使用了 \textsf{amsthm},因此传统的 \texttt{theoremstyle} 对其也是适用的,只需在相关定义前标明即可。
\end{tip}
-% \def\proofideanameCN{思路}
\NameTheorem[CN]{proofidea}{思路}
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<section>
@@ -393,18 +486,18 @@
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<section>
\end{code}
-
可以分别定义不编号的环境 \lstinline|proofidea*| 和编号的环境 \lstinline|proofidea| (在 section 内编号),它们支持在简体中文语境中使用,效果如下所示:
+\vspace{-.3\baselineskip}
\begin{proofidea*}
\lstinline|proofidea*| 环境。
\end{proofidea*}
-
+\vspace{-.5\baselineskip}
\begin{proofidea}
\lstinline|proofidea| 环境。
\end{proofidea}
-\section{未完成标记}
+\LevelTwoTitle{未完成标记}
你可以通过 \lstinline|\dnf| 来标记尚未完成的部分。例如:
\begin{itemize}
@@ -417,164 +510,19 @@
\end{itemize}
-% \section{关于文章标题、摘要与关键词}
-
-% % 由于引入了 \ProjLib{} 工具箱的 \textsf{PJLamssim} 组件,
-% \beaulivre{} 同时具有标准文档类与\AmS{} 文档类的一些特性。
-
-% 因此,文章的标题部分既可以按照标准文档类 \textsf{article} 的写法来写:
-
-% \begin{code}
-% \title{(*\meta{title}*)}
-% \author{(*\meta{author}*)}
-% \date{(*\meta{date}*)}
-% \maketitle
-% \begin{abstract}
-% (*\meta{abstract}*)
-% \end{abstract}
-% \begin{keyword}
-% (*\meta{keywords}*)
-% \end{keyword}
-% \end{code}
-
-% 也可以按照 \AmS{} 文档类的方式来写:
-
-% \begin{code}
-% \title{(*\meta{title}*)}
-% \author{(*\meta{author}*)}
-% \address{(*\meta{address}*)}
-% \email{(*\meta{email}*)}
-% \date{(*\meta{date}*)}
-% \keywords{(*\meta{keywords}*)}
-% \subjclass{(*\meta{subjclass}*)}
-% \begin{abstract}
-% (*\meta{abstract}*)
-% \end{abstract}
-% \maketitle
-% \end{code}
-
-% 作者信息可以包含多组,输入方式为:
-
-% \begin{code}
-% \author{(*\meta{author 1}*)}
-% \address{(*\meta{address 1}*)}
-% \email{(*\meta{email 1}*)}
-% \author{(*\meta{author 2}*)}
-% \address{(*\meta{address 2}*)}
-% \email{(*\meta{email 2}*)}
-% ...
-% \end{code}
-
-% 其中 \lstinline|\address|、\lstinline|\curraddr|、\lstinline|\email| 的相互顺序是不重要的。
-
-
-\section{目前存在的问题}
+\LevelOneTitle{目前存在的问题}
\begin{itemize}[itemsep=.6em]
- \item 目录、part、chapter 的设计依然有待改良。
\item 对于字体的设置仍然不够完善。
- \item 由于很多核心功能建立在 \ProjLib{} 工具箱的基础上,因此 \beaulivre{} 自然继承了其所有问题。详情可以参阅 \ProjLib{} 用户文档的“目前存在的问题”这一小节。
+ \item 由于很多核心功能建立在 \ProjLib{} 工具箱的基础上,因此 \lebhart{} 自然继承了其所有问题。详情可以参阅 \ProjLib{} 用户文档的“目前存在的问题”这一小节。
\item 错误处理功能不完善,在出现一些问题时没有相应的错误提示。
\item 代码中仍有许多可优化之处。
\end{itemize}
-
-\UseLanguage{English}
-
-
-\chapter{文档示例}
-
-\vspace*{-1.5\baselineskip}
-
-\section{标准文档类写法}
-
-如果想采用标准文档类中的写法,可以参考下面的例子:
-
-\begin{code}
-\documentclass{beaulivre}
-\usepackage{ProjLib} % Load ProjLib toolkit
-
-\UseLanguage{French} % Use French from here
-
-\begin{document}
-
-\title{Le Titre}
-\author{Auteur}
-\date{\PLdate{2022-04-01}}
-
-\maketitle
-
-\chapter{Un théorème}
-
-%% Theorem-like environments can be used directly
-\begin{theorem}\label{thm:abc}
- Ceci est un théorème.
-\end{theorem}
-
-Référence du théorème: \cref{thm:abc}
- % It is recommended to use clever reference
-
-\end{document}
-\end{code}
-
-如果以后想切换到标准文档类,只需要将前两行换为:
-
-\begin{code}
-\documentclass{book}
-\usepackage[a4paper,margin=1in]{geometry}
-\usepackage[hidelinks]{hyperref}
-\usepackage[palatino]{ProjLib} % Load ProjLib toolkit
-\end{code}
-
-
-\clearpage
-\section{\texorpdfstring{\AmS{}}{AMS} 文档类写法}
-
-如果日后有意切换到期刊模版,想采用 \AmS{} 文档类中的写法,可以参考下面的例子:
-
-\begin{code}
-\documentclass{beaulivre}
-\usepackage{ProjLib} % Load ProjLib toolkit
-
-\UseLanguage{French} % Use French from here
-
-\begin{document}
-
-\title{Le Titre}
-\author{Auteur 1}
-\address{Adresse 1}
-\email{\href{Courriel 1}{Courriel 1}}
-\author{Auteur 1}
-\address{Adresse 1}
-\email{\href{Courriel 2}{Courriel 2}}
-\date{\PLdate{2022-04-01}}
-\subjclass{*****}
-\keywords{...}
-
-\maketitle
-
-\section{Première section}
-
-%% Theorem-like environments can be used directly
-\begin{theorem}\label{thm:abc}
- Ceci est un théorème.
-\end{theorem}
-
-Référence du théorème: \cref{thm:abc}
- % It is recommended to use clever reference
-
-\end{document}
-\end{code}
-
-这样,若想切换到 \AmS{} 文档类,只需要将前两行换为:
-
-\begin{code}
-\documentclass{amsbook}
-\usepackage[a4paper,margin=1in]{geometry}
-\usepackage[hidelinks]{hyperref}
-\usepackage[palatino]{ProjLib} % Load ProjLib toolkit
-\end{code}
-
+\part{演示}
\blinddocument
\end{document}
+\endinput
+%%
+%% End of file `beaulivre/beaulivre-doc-cn.tex'.
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.pdf b/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.pdf
index a86048e001..58d7733540 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.pdf
+++ b/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.tex b/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.tex
index f177a9e556..a9d9a7870d 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.tex
+++ b/macros/unicodetex/latex/beaulivre/beaulivre-doc-en.tex
@@ -1,12 +1,11 @@
-%! TEX program = xelatex
-\documentclass[English,French,allowbf,puretext]{beaulivre}
+\documentclass[English,Chinese,French,allowbf,puretext]{beaulivre}
\theoremstyle{basic}
\CreateTheorem{definition}<highest>
-\CreateTheorem{theorem}<highest>
-\CreateTheorem{conjecture}<highest>
+\CreateTheorem{theorem}[definition]
+\CreateTheorem{conjecture}[definition]
\CreateTheorem*{example*}
-\CreateTheorem{problem}<highest>
+\CreateTheorem{problem}[definition]
\theoremstyle{emphasis}
\CreateTheorem{remark}<highest>
@@ -19,9 +18,14 @@
\usepackage{ProjLib}
\usepackage{longtable} % breakable tables
\usepackage{hologo} % more TeX logo
+\usetikzlibrary{calc}
+
+\usepackage{blindtext}
+
+\UseLanguage{English}
%%================================
-%% For typestting code
+%% For typesetting code
%%================================
\usepackage{listings}
\definecolor{maintheme}{RGB}{70,130,180}
@@ -40,19 +44,27 @@
escapeinside={(*}{*)},
% numbers=left,
numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- firstnumber=last,
-}
+ % firstnumber=last,
+}
\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{moretexcs=%
- {subsubsection,href,color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib
+ {part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
+ color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
}
}
-\lstnewenvironment{code}%
-{\setkeys{lst}{columns=fullflexible,keepspaces=true}}{}
+\lstnewenvironment{code}%
+{\setstretch{1.07}%
+\setkeys{lst}{columns=fullflexible,keepspaces=true}%
+}{}
+\lstnewenvironment{code*}%
+{\setstretch{1.07}%
+\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
+}{}
%%================================
%% tip
%%================================
+\usepackage[many]{tcolorbox}
\newenvironment{tip}[1][Tip]{%
\begin{tcolorbox}[breakable,
enhanced,
@@ -73,27 +85,24 @@
%%================================
%% Names
%%================================
-\providecommand{\colorist}{{\normalfont\textsf{colorist}}}
-\providecommand{\colorart}{{\normalfont\textsf{colorart}}}
-\providecommand{\colorbook}{{\normalfont\textsf{colorbook}}}
-\providecommand{\lebhart}{{\normalfont\textsf{lebhart}}}
-\providecommand{\beaulivre}{{\normalfont\textsf{beaulivre}}}
+\providecommand{\colorist}{\textsf{colorist}}
+\providecommand{\colorart}{\textsf{colorart}}
+\providecommand{\colorbook}{\textsf{colorbook}}
+\providecommand{\lebhart}{\textsf{lebhart}}
+\providecommand{\beaulivre}{\textsf{beaulivre}}
-\usetikzlibrary{calc}
-
-\usepackage{blindtext}
+%%================================
+%% Titles
+%%================================
+\let\LevelOneTitle\chapter
+\let\LevelTwoTitle\section
+\let\LevelThreeTitle\subsection
%%================================
%% Main text
%%================================
\begin{document}
-% \title{\beaulivre{}, write your books in a colorful way}
-% \author{Jinwen XU}
-% \thanks{Corresponding to: \texttt{\beaulivre{} 2021/06/07}}
-% \date{June 2021, Beijing}
-
-% \maketitle
\frontmatter
@@ -102,28 +111,23 @@
\fill [cyan!90!black] ($(current page.south west)+(0,7)$) rectangle ($(current page.north west)+(25,-7)$);
\fill [yellow] (current page.south west) rectangle ($(current page.north west)+(3,0)$);
\node[text width=10cm] at ($(current page.north west)+(8.5,-6)$) {\huge\ProjLib};
- \node[text width=6cm,text height=3.5cm,scale=2.5] at ($(current page.north west)+(11,-10)$) {\textcolor{white}{\sffamily\beaulivre{}\\[5pt]\footnotesize\textsc{Write your books in \\a colorful way}\\[10pt]\tiny Corresponding to: \texttt{\beaulivre{} 2021/06/30}}};
+ \node[text width=6cm,text height=3.5cm,scale=2.5] at ($(current page.north west)+(11,-10)$) {\textcolor{white}{\sffamily\beaulivre{}\\[5pt]\footnotesize\textsc{Write your books in \\a colorful way}\\[10pt]\tiny Corresponding to: \texttt{\beaulivre{} 2021/07/15}}};
\node at ($(current page.south)+(1.5,3)$) {\fontsize{16pt}{0pt}\selectfont\textcolor{gray}{\scshape Jinwen XU}};
- \node at ($(current page.south)+(1.5,2)$) {\fontsize{12pt}{0pt}\selectfont\textcolor{gray}{June 2021, Beijing}};
+ \node at ($(current page.south)+(1.5,2)$) {\fontsize{12pt}{0pt}\selectfont\textcolor{gray}{July 2021, Beijing}};
\end{tikzpicture}%
\end{titlepage}%
\cleardoublepage%
-\frontmatter
+
\chapter*{Preface}
\beaulivre{} is a member of the \colorist{} class series. Its name is taken from French words ``beau'' (for ``beautiful'') and ``livre'' (for ``book''). The entire collection includes \colorart{} and \lebhart{} for typesetting articles and \colorbook{} and \beaulivre{} for typesetting books. My original intention in designing this series was to write drafts and notes that look colorful yet not dazzling.
-\beaulivre{} has multi-language support, including Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish. These languages can be switched seamlessly in a single document. Due to the usage of custom fonts, \beaulivre{} requires \hologo{XeLaTeX} or \hologo{LuaLaTeX} to compile.
+\beaulivre{} has multi-language support, including Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish. These languages can be switched seamlessly in a single document. Due to the usage of custom fonts, \lebhart{} requires \hologo{XeLaTeX} or \hologo{LuaLaTeX} to compile.
This documentation is typeset using \beaulivre{} (with the option \texttt{allowbf}). You can think of it as a short introduction and demonstration.
\bigskip
-\begin{tcolorbox}[enhanced jigsaw,pad at break*=1mm,breakable,colback=yellow!25!paper,boxrule=0pt,frame hidden]
- Since the main body of \colorist{} is modified from the \textsf{minimalist} series, some elements have not been completely redesigned yet, especially the TOC, part and chapter style. These will be added gradually in the future versions.
-\end{tcolorbox}
-
-\bigskip
\begin{tip}
Multi-language support, theorem-like environments, draft marks and some other features are provided by the \ProjLib{} toolkit. Here we only briefly discuss how to use it with this document class. For more detailed information, you can refer to the documentation of \ProjLib{}.
\end{tip}
@@ -132,11 +136,25 @@ This documentation is typeset using \beaulivre{} (with the option \texttt{allowb
\mainmatter
-\chapter{Initialization}
+\part{Instruction}
+\parttext{You can add some introductory text here via \lstinline|\\parttext|\meta{text}.}
+
+\medskip
+\LevelOneTitle*{Before you start}
+\addcontentsline{toc}{chapter}{Before you start}
+In order to use the package or classes described here, you need to:
+\begin{itemize}
+ \item install TeX Live or MikTeX of the latest possible version, and make sure that \texttt{colorist} and \texttt{projlib} are correctly installed in your \TeX{} system.
+ \item be familiar with the basic usage of \LaTeX{}, and knows how to compile your document with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
+\end{itemize}
+
+
+\LevelOneTitle{Usage and examples}
-\section{How to load it}
+\LevelTwoTitle{How to load it}
One only needs to put
+
\begin{code}
\documentclass{beaulivre}
\end{code}
@@ -146,40 +164,144 @@ as the first line to use the \beaulivre{} class.
You need to use either \hologo{XeLaTeX} or \hologo{LuaLaTeX} engine to compile.
\end{tip}
-\section{Options}
+\LevelTwoTitle{Example - A complete document}
+
+Let's first look at a complete document.
+
+
+\begin{code*}
+\documentclass{colorbook}
+\usepackage{ProjLib}
+
+\UseLanguage{French}
+
+\begin{document}
+
+\frontmatter
+
+\begin{titlepage}
+ (*\meta{code for titlepage}*)
+\end{titlepage}
+
+\tableofcontents
+
+\mainmatter
+
+\part{(*\meta{part title}*)}
+\parttext{(*\meta{text after part title}*)}
-\beaulivre{} offers the following options:
+\chapter{(*\meta{chapter title}*)}
+
+\section{(*\meta{section title}*)}
+
+\dnf<Plus de contenu est nécessaire.>
+
+\begin{theorem}\label{thm:abc}
+ Ceci est un théorème.
+\end{theorem}
+Référence du théorème: \cref{thm:abc}
+
+\backmatter
+
+...
+
+\end{document}
+\end{code*}
+
+If you find this example a little complicated, don't worry. Let's now look at this example piece by piece.
+
+\LevelThreeTitle{Initialization}
+
+\medskip
+\begin{code}
+\documentclass{beaulivre}
+\usepackage{ProjLib}
+\end{code}
+
+Initialization is straightforward. The first line loads the document class \beaulivre{}, and the second line loads the \ProjLib{} toolkit to obtain some additional functionalities.
+
+\LevelThreeTitle{Set the language}
+
+\medskip
+\begin{code}
+\UseLanguage{French}
+\end{code}
+
+This line indicates that French will be used in the document (by the way, if only English appears in your article, then there is no need to set the language). You can also switch the language in the same way later in the middle of the text. Supported languages include Simplified Chinese, Traditional Chinese, Japanese, English, French, German, Spanish, Portuguese, Brazilian Portuguese and Russian%
+.%
+
+For detailed description of this command and more related commands, please refer to the section on the multi-language support.
+
+
+\LevelThreeTitle{Draft marks}
+
+\medskip
+\begin{code}
+\dnf<(*\meta{some hint}*)>
+\end{code}
+
+When you have some places that have not yet been finished yet, you can mark them with this command, which is especially useful during the draft stage.
+
+\LevelThreeTitle{Theorem-like environments}
+
+\medskip
+\begin{code}
+\begin{theorem}\label{thm:abc}
+ Ceci est un théorème.
+\end{theorem}
+Référence du théorème: \cref{thm:abc}
+\end{code}
+
+Commonly used theorem-like environments have been pre-defined. Also, when referencing a theorem-like environment, it is recommended to use \lstinline|\cref{|\meta{label}\texttt{\}} --- in this way, there is no need to explicitly write down the name of the corresponding environment every time.
+
+
+
+
+\LevelOneTitle{On the default fonts}
+By default, \lebhart{} uses Palatino Linotype as the English font, FounderType's YouSong and YouHei GBK as the Chinese fonts\footnote{For detail, pleaser visit FounderType's website: \url{https://www.foundertype.com}.}, and partially uses Neo Euler as the math font. Among them, Neo Euler can be downloaded at \url{https://github.com/khaledhosny/euler-otf}. The other fonts are not free, you need to purchase and install them on your own.
+
+\begin{itemize}
+ \item English main font. \textsf{English sans serif font}.
+ \item 中文主要字体, \textsf{中文无衬线字体}
+ \item Math demonstration: \( \alpha, \beta, \gamma, \delta, 1,2,3,4, a,b,c,d \), \[\mathrm{li}(x)\coloneqq \int_2^{\infty} \frac{1}{\log t}\,\mathrm{d}t \]
+\end{itemize}
+
+When the corresponding font is not installed, fonts that comes with TeX Live will be used instead. In this case, the experience might be reduced.
+
+\LevelOneTitle{The options}
+
+\beaulivre{} offers the following options:
\begin{itemize}
\item The language options \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French}, etc.
\begin{itemize}
\item For the option names of a specific language, please refer to \meta{language name} in the next section. The first specified language will be used as the default language.
+ \item The language options are optional, mainly for increasing the compilation speed. Without them the result would be the same, only slower.
\end{itemize}
\item \texttt{draft} or \texttt{fast}
\begin{itemize}
\item The option \verb|fast| enables a faster but slightly rougher style, main differences are:
\begin{itemize}
- \item Use simpler math font configuration;
- \item Do not use \textsf{hyperref};
+ \item Use simpler math font configuration;
+ \item Do not use \textsf{hyperref};
\item Enable the fast mode of \ProjLib{} toolkit.
\end{itemize}
\end{itemize}
-\begin{tip}
- During the draft stage, it is recommended to use the \verb|fast| option to speed up compilation. When in \verb|fast| mode, there will be a watermark ``DRAFT'' to indicate that you are currently in the draft mode.
-\end{tip}
-\medskip
+ \begin{tip}
+ During the draft stage, it is recommended to use the \verb|fast| option to speed up compilation. When in \verb|fast| mode, there will be a watermark ``DRAFT'' to indicate that you are currently in the draft mode.
+ \end{tip}
\item \texttt{a4paper} or \texttt{b5paper}
\begin{itemize}
- \item Optional paper size. The default paper size is 8.5in $\times$ 11in.
+ \item Paper size options. The default paper size is 8.5in $\times$ 11in.
\end{itemize}
\item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{biolinum} ~$|$~ \texttt{useosf}
\begin{itemize}
- \item Font options. As the name suggest, font with corresponding name will be loaded.
+ \item Font options. As the name suggest, font with corresponding name will be loaded.
\item The \texttt{useosf} option is used to enable the old-style figures.
\end{itemize}
\item \texttt{allowbf}
\begin{itemize}
- \item Allow boldface. When this option is enabled, the title, titles of all levels and names of theorem-like environments will be bolded.
+ \item Allow boldface. When this option is enabled, the main title, the titles of all levels and the names of theorem-like environments will be bolded.
\end{itemize}
\item \texttt{runin}
\begin{itemize}
@@ -198,28 +320,9 @@ as the first line to use the \beaulivre{} class.
\bigskip
In addition, the commonly used \texttt{oneside} and \texttt{twoside} options are also available. Two-page layout is used by default.
-\chapter{On the default fonts}
-By default, \beaulivre{} uses Palatino Linotype as the English font, FounderType's YouSong and YouHei GBK as the Chinese fonts, and partially uses Neo Euler as the math font. Among them, Neo Euler can be downloaded at \url{https://github.com/khaledhosny/euler-otf}. The other fonts are not free, you need to purchase and install them on your own. (For the Chinese fonts, visit FounderType's website for detail: \url{https://www.foundertype.com} ).
-
-\medskip
-\begin{tip}[Font demonstration]
- \begin{itemize}
- \item English main font. \textsf{English sans serif font}. \texttt{English typewriter font}.
- \item 中文主要字体,\textsf{中文无衬线字体}
- \item 数学示例: \( \alpha, \beta, \gamma, \delta, 1,2,3,4, a,b,c,d \), \[\mathrm{li}(x)\coloneqq \int_2^{\infty} \frac{1}{\log t}\,\mathrm{d}t \]
- \end{itemize}
-\end{tip}
-
-\bigskip
-When the corresponding font is not installed, fonts that comes with TeX Live will be used instead. In this case, the experience might be reduced.
+\LevelOneTitle{Instructions by topic}
-
-\chapter{Some instructions}
-
-% \vspace{-\baselineskip}
-Many of the features described next are provided by the \ProjLib{} toolkit. Only the basic usage is mentioned here. For more details, please refer to its user documentation.
-
-\section{Language configuration}
+\LevelTwoTitle{Language configuration}
\beaulivre{} has multi-language support, including Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish. The language can be selected by the following macros:
@@ -257,15 +360,13 @@ In addition, you can also add new settings to selected language:
\end{itemize}
For example, \lstinline|\AddLanguageSetting(German){\color{orange}}| can make all German text displayed in orange (of course, one then need to add \lstinline|\AddLanguageSetting{\color{black}}| in order to correct the color of the text in other languages).
+\LevelTwoTitle{Theorems and how to reference them}
-\section{Theorems and how to reference them}
+Environments such as \texttt{definition} and \texttt{theorem} have been preset and can be used directly.
-Environments such as \texttt{definition} and \texttt{theorem} have been pre-defined and can be used directly.
-
-More specifically, preset environments include:
+More specifically, preset environments include:
\texttt{assumption}, \texttt{axiom}, \texttt{conjecture}, \texttt{convention}, \texttt{corollary}, \texttt{definition}, \texttt{definition-proposition}, \texttt{definition-theorem}, \texttt{example}, \texttt{exercise}, \texttt{fact}, \texttt{hypothesis}, \texttt{lemma}, \texttt{notation}, \texttt{observation}, \texttt{problem}, \texttt{property}, \texttt{proposition}, \texttt{question}, \texttt{remark}, \texttt{theorem}, and the corresponding unnumbered version with an asterisk \lstinline|*| in the name. The titles will change with the current language. For example, \texttt{theorem} will be displayed as ``Theorem" in English mode and ``Théorème" in French mode.
-\medskip
When referencing a theorem-like environment, it is recommended to use \lstinline|\cref{|\meta{label}\texttt{\}}. In this way, there is no need to explicitly write down the name of the corresponding environment every time.
\begin{tip}[Example]
@@ -275,7 +376,7 @@ When referencing a theorem-like environment, it is recommended to use \lstinline
will produce
\begin{definition}[Strange things]\label{def: strange}
- This is the definition of some strange objects.
+ This is the definition of some strange objects. There is approximately an one-line space before and after the theorem environment, and there will be a symbol to mark the end of the environment.
\end{definition}
\lstinline|\cref{def: strange}| will be displayed as: \cref{def: strange}.
@@ -290,7 +391,9 @@ After using \lstinline|\UseLanguage{French}|, a theorem will be displayed as:
By default, when referenced, the name of the theorem always matches the language of the context in which the theorem is located. For example, the definition above is still displayed in English in the current French mode: \cref{def: strange} and \cref{thm}. If you want the name of the theorem to match the current context when referencing, you can add \texttt{regionalref} to the global options.
\end{tip}
-\medskip
+\UseLanguage{English}
+
+\bigskip
The following are the main styles of theorem-like environments:
\begin{theorem}
Theorem style: theorem, proposition, lemma, corollary, ...
@@ -300,12 +403,10 @@ The following are the main styles of theorem-like environments:
Proof style
\end{proof}
-\vspace{-\baselineskip}
\begin{remark}
Remark style
\end{remark}
-\vspace{-.7\baselineskip}
\begin{conjecture}
Conjecture style
\end{conjecture}
@@ -328,10 +429,7 @@ For aesthetics, adjacent definitions will be connected together automatically:
Second definition.
\end{definition}
-\UseLanguage{English}
-
-\bigskip
-\section{Define a new theorem-like environment}
+\LevelTwoTitle{Define a new theorem-like environment}
If you need to define a new theorem-like environment, you must first define the name of the environment in the language to use:
\begin{itemize}
@@ -356,7 +454,7 @@ And then define this environment in one of following five ways:
\end{itemize}
\item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
\begin{itemize}
- \item Define a numbered environment \meta{name of environment}, numbered within the \\counter \meta{numbered within}
+ \item Define a numbered environment \meta{name of environment}, numbered within the counter \meta{numbered within}
\end{itemize}
\item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
\lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
@@ -364,8 +462,8 @@ And then define this environment in one of following five ways:
\item Identify \meta{name of environment} with \meta{existed environment} or \meta{existed environment}\lstinline|*|.
\item This method is usually useful in the following two situations:
\begin{enumerate}
- \item To use a more concise name. For example, with \lstinline|\CreateTheorem{thm}|\\\lstinline|(theorem)|, one can then use the name \texttt{thm} to write theorem.
- \item To remove the numbering. For example, one can remove the numbering of the \texttt{remark} environment with \lstinline|\CreateTheorem{remark}(remark*)|.
+ \item To use a more concise name. For example, with \lstinline|\CreateTheorem{thm}(theorem)|, one can then use the name \texttt{thm} to write theorem.
+ \item To remove the numbering of some environments. For example, one can remove the numbering of the \texttt{remark} environment with \lstinline|\CreateTheorem{remark}(remark*)|.
\end{enumerate}
\end{itemize}
\end{itemize}
@@ -374,198 +472,58 @@ And then define this environment in one of following five ways:
This macro utilizes the feature of \textsf{amsthm} internally, so the traditional \texttt{theoremstyle} is also applicable to it. One only needs declare the style before the relevant definitions.
\end{tip}
-% \def\proofideanameEN{Idea}
\NameTheorem[EN]{proofidea}{Idea}
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<section>
\bigskip
Here is an example. The following code:
+
\begin{code}
\NameTheorem[EN]{proofidea}{Idea}
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<section>
\end{code}
-defines an unnumbered environment \lstinline|proofidea*| and a numbered environment \lstinline|proofidea| (numbered within section) respectively. They can be used in English context. The effect is as follows:
+defines an unnumbered environment \lstinline|proofidea*| and a numbered environment \lstinline|proofidea| (numbered within section) respectively. They can be used in English context.
+The effect is as follows:
+\vspace{-0.3\baselineskip}
\begin{proofidea*}
The \lstinline|proofidea*| environment.
\end{proofidea*}
+\vspace{-\baselineskip}
\begin{proofidea}
The \lstinline|proofidea| environment.
\end{proofidea}
\clearpage
-\section{Draft mark}
+\LevelTwoTitle{Draft mark}
You can use \lstinline|\dnf| to mark the unfinished part. For example:
\begin{itemize}
\item \lstinline|\dnf| or \lstinline|\dnf<...>|. The effect is: \dnf~ or \dnf<...>. \\The prompt text changes according to the current language. For example, it will be displayed as \UseOtherLanguage{French}{\dnf} in French mode.
\end{itemize}
-Similarly, there is \lstinline|\needgraph| :
+Similarly, there is \lstinline|\needgraph| :
\begin{itemize}
\item \lstinline|\needgraph| or \lstinline|\needgraph<...>|. The effect is: \needgraph or \needgraph<...>The prompt text changes according to the current language. For example, in French mode, it will be displayed as \UseOtherLanguage{French}{\needgraph}
\end{itemize}
-% \vspace{-.5\baselineskip}
-% \section{On the title, abstract and keywords}
-
-% \beaulivre{} has both the features of standard classes and that of the \AmS{} classes.
-
-% Therefore, the title part can either be written in the usual way, in accordance with the standard class \textsf{article}:
-
-% \begin{code}
-% \title{(*\meta{title}*)}
-% \author{(*\meta{author}*)}
-% \date{(*\meta{date}*)}
-% \maketitle
-% \begin{abstract}
-% (*\meta{abstract}*)
-% \end{abstract}
-% \begin{keyword}
-% (*\meta{keywords}*)
-% \end{keyword}
-% \end{code}
-
-% \vspace{-.5\baselineskip}
-% or written in the way of \AmS{} classes:
-
-% \begin{code}
-% \title{(*\meta{title}*)}
-% \author{(*\meta{author}*)}
-% \address{(*\meta{address}*)}
-% \email{(*\meta{email}*)}
-% \date{(*\meta{date}*)}
-% \keywords{(*\meta{keywords}*)}
-% \subjclass{(*\meta{subjclass}*)}
-% \begin{abstract}
-% (*\meta{abstract}*)
-% \end{abstract}
-% \maketitle
-% \end{code}
-
-% \medskip
-% The author information can contain multiple groups, written as:
-
-% \begin{code}
-% \author{(*\meta{author 1}*)}
-% \address{(*\meta{address 1}*)}
-% \email{(*\meta{email 1}*)}
-% \author{(*\meta{author 2}*)}
-% \address{(*\meta{address 2}*)}
-% \email{(*\meta{email 2}*)}
-% ...
-% \end{code}
-
-% Among them, the mutual order of \lstinline|\address|, \lstinline|\curraddr|, \lstinline|\email| is not important.
-
-
-\section{Known issues}
+
+\LevelOneTitle{Known issues}
\begin{itemize}[itemsep=.6em]
\item The font settings are still not perfect.
- \item Since many features are based on the \ProjLib{} toolkit, \beaulivre{} inherits all its problems. For details, please refer to the "Known Issues" section of the \ProjLib{} documentation.
+ \item Since many features are based on the \ProjLib{} toolkit, \colorist{} (and hence \colorart{}, \lebhart{} and \colorbook{}, \beaulivre{}) inherits all its problems. For details, please refer to the ``Known Issues'' section of the \ProjLib{} documentation.
\item The error handling mechanism is incomplete: there is no corresponding error prompt when some problems occur.
\item There are still many things that can be optimized in the code.
\end{itemize}
-
-\chapter{Document templates}
-
-% \vspace*{-1.5\baselineskip}
-
-\section{The standard way}
-
-If you want to write in the standard way, you can refer to the following example:
-
-\begin{code}
-\documentclass{beaulivre}
-\usepackage{ProjLib} % Load ProjLib toolkit
-
-\UseLanguage{French} % Use French from here
-
-\begin{document}
-
-\title{Le Titre}
-\author{Auteur}
-\date{\PLdate{2022-04-01}}
-
-\maketitle
-
-\chapter{Un théorème}
-
-%% Theorem-like environments can be used directly
-\begin{theorem}\label{thm:abc}
- Ceci est un théorème.
-\end{theorem}
-
-Référence du théorème: \cref{thm:abc}
- % It is recommended to use clever reference
-
-\end{document}
-\end{code}
-
-If you wish to switch to the standard class later, just replace the first two lines with:
-
-\begin{code}
-\documentclass{article}
-\usepackage[a4paper,margin=1in]{geometry}
-\usepackage[hidelinks]{hyperref}
-\usepackage[palatino]{ProjLib} % Load ProjLib toolkit
-\end{code}
-
-
-\clearpage
-\section{The \texorpdfstring{\AmS{}}{AMS} way}
-
-If you intend to switch to the journal template in the future and thus want to use the writing style as in the \AmS{} classes, you can refer to the following example:
-
-\begin{code}
-\documentclass{beaulivre}
-\usepackage{ProjLib} % Load ProjLib toolkit
-
-\UseLanguage{French} % Use French from here
-
-\begin{document}
-
-\title{Le Titre}
-\author{Auteur 1}
-\address{Adresse 1}
-\email{\href{Courriel 1}{Courriel 1}}
-\author{Auteur 1}
-\address{Adresse 1}
-\email{\href{Courriel 2}{Courriel 2}}
-\date{\PLdate{2022-04-01}}
-\subjclass{*****}
-\keywords{...}
-
-\maketitle
-
-\chapter{Première section}
-
-%% Theorem-like environments can be used directly
-\begin{theorem}\label{thm:abc}
- Ceci est un théorème.
-\end{theorem}
-
-Référence du théorème: \cref{thm:abc}
- % It is recommended to use clever reference
-
-\end{document}
-\end{code}
-
-\vspace{-0.3\baselineskip}
-In this way, if you wish to switch to \AmS{} class later, just replace the first two lines with:
-
-\begin{code}
-\documentclass{amsart}
-\usepackage[a4paper,margin=1in]{geometry}
-\usepackage[hidelinks]{hyperref}
-\usepackage[palatino]{ProjLib} % Load ProjLib toolkit
-\end{code}
-
+\part{Demonstration}
\blinddocument
\end{document}
+\endinput
+%%
+%% End of file `beaulivre/beaulivre-doc-en.tex'.
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.pdf b/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.pdf
new file mode 100644
index 0000000000..f6a1d88520
--- /dev/null
+++ b/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.tex b/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.tex
new file mode 100644
index 0000000000..3ce0d58883
--- /dev/null
+++ b/macros/unicodetex/latex/beaulivre/beaulivre-doc-fr.tex
@@ -0,0 +1,523 @@
+\documentclass[English,Chinese,French,allowbf,puretext]{beaulivre}
+
+\theoremstyle{basic}
+\CreateTheorem{definition}<highest>
+\CreateTheorem{theorem}[definition]
+\CreateTheorem{conjecture}[definition]
+\CreateTheorem*{example*}
+\CreateTheorem{problem}[definition]
+
+\theoremstyle{emphasis}
+\CreateTheorem{remark}<highest>
+
+\theoremstyle{simple}
+
+%%================================
+%% Import toolkit
+%%================================
+\usepackage{ProjLib}
+\usepackage{longtable} % breakable tables
+\usepackage{hologo} % more TeX logo
+\usetikzlibrary{calc}
+
+\usepackage{blindtext}
+
+\UseLanguage{French}
+
+%%================================
+%% For typesetting code
+%%================================
+\usepackage{listings}
+\definecolor{maintheme}{RGB}{70,130,180}
+\definecolor{forestgreen}{RGB}{21,122,81}
+\definecolor{lightergray}{gray}{0.99}
+\lstset{language=[LaTeX]TeX,
+ keywordstyle=\color{maintheme},
+ basicstyle=\ttfamily,
+ commentstyle=\color{forestgreen}\ttfamily,
+ stringstyle=\rmfamily,
+ showstringspaces=false,
+ breaklines=true,
+ frame=lines,
+ backgroundcolor=\color{lightergray},
+ flexiblecolumns=true,
+ escapeinside={(*}{*)},
+ % numbers=left,
+ numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
+ % firstnumber=last,
+}
+\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
+\lstset{moretexcs=%
+ {part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
+ color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
+ }
+}
+\lstnewenvironment{code}%
+{\setstretch{1.07}%
+\setkeys{lst}{columns=fullflexible,keepspaces=true}%
+}{}
+\lstnewenvironment{code*}%
+{\setstretch{1.07}%
+\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
+}{}
+
+%%================================
+%% tip
+%%================================
+\usepackage[many]{tcolorbox}
+\newenvironment{tip}[1][Astuce]{%
+ \begin{tcolorbox}[breakable,
+ enhanced,
+ width = \textwidth,
+ colback = paper, colbacktitle = paper,
+ colframe = gray!50, boxrule=0.2mm,
+ coltitle = black,
+ fonttitle = \sffamily,
+ attach boxed title to top left = {yshift=-\tcboxedtitleheight/2, xshift=.5cm},
+ boxed title style = {boxrule=0pt, colframe=paper},
+ before skip = 0.3cm,
+ after skip = 0.3cm,
+ top = 3mm,
+ bottom = 3mm,
+ title={\scshape\sffamily #1}]%
+}{\end{tcolorbox}}
+
+%%================================
+%% Names
+%%================================
+\providecommand{\colorist}{\textsf{colorist}}
+\providecommand{\colorart}{\textsf{colorart}}
+\providecommand{\colorbook}{\textsf{colorbook}}
+\providecommand{\lebhart}{\textsf{lebhart}}
+\providecommand{\beaulivre}{\textsf{beaulivre}}
+
+%%================================
+%% Titles
+%%================================
+\let\LevelOneTitle\chapter
+\let\LevelTwoTitle\section
+\let\LevelThreeTitle\subsection
+
+%%================================
+%% Main text
+%%================================
+\begin{document}
+
+\frontmatter
+
+\begin{titlepage} % Suppresses displaying the page number on the title page and the subsequent page counts as page 1
+\begin{tikzpicture}[overlay,remember picture]
+ \fill [cyan!90!black] ($(current page.south west)+(0,7)$) rectangle ($(current page.north west)+(25,-7)$);
+ \fill [yellow] (current page.south west) rectangle ($(current page.north west)+(3,0)$);
+ \node[text width=10cm] at ($(current page.north west)+(8.5,-6)$) {\huge\ProjLib};
+ \node[text width=6cm,text height=3.5cm,scale=2.5] at ($(current page.north west)+(11,-10)$) {\textcolor{white}{\sffamily\beaulivre{}\\[5pt]\footnotesize\textsc{Écrivez vos livres \\de manière colorée}\\[10pt]\tiny Correspondant à : \texttt{\beaulivre{} 2021/07/15}}};
+ \node at ($(current page.south)+(1.5,3)$) {\fontsize{16pt}{0pt}\selectfont\textcolor{gray}{\scshape Jinwen XU}};
+ \node at ($(current page.south)+(1.5,2)$) {\fontsize{12pt}{0pt}\selectfont\textcolor{gray}{juillet 2021, à Pékin}};
+\end{tikzpicture}%
+\end{titlepage}%
+\cleardoublepage%
+
+
+\chapter*{Préface}
+
+\beaulivre{} fait partie de la série de classes \colorist{}, dont le nom est tiré des mots « beau » et « livre ». L'ensemble de la collection comprend \colorart{} et \lebhart{} pour la composition d'articles, et \colorbook{} et \beaulivre{} pour celle des livres. Mon intention initiale en les concevant était d'écrire des brouillons et des notes qui ont l'air coloré mais pas éblouissant.
+
+\beaulivre{} prend en charge plusieurs langues, notamment le chinois (simplifié et traditionnel), l'anglais, le français, l'allemand, l'italien, le japonais, le portugais (européen et brésilien), le russe et l'espagnol. Ces langues peuvent être commutées de manière transparente dans un seul document. En raison de l'utilisation de polices personnalisées, \beaulivre{} demande soit \hologo{XeLaTeX} soit \hologo{LuaLaTeX} pour la compilation.
+
+Cette documentation est composée à l'aide de \beaulivre{} (avec l'option \texttt{allowbf}). Vous pouvez le considérer comme une courte introduction et une démonstration.
+
+\bigskip
+\begin{tip}
+ La prise en charge multilingue, les environnements de type théorème, les marques de brouillon et quelques autres fonctionnalités sont fournis par la boîte à outils \ProjLib{}. Ici, nous ne discutons que brièvement de la façon de l'utiliser avec cette classe de document. Pour plus d'informations, veuillez vous référer à la documentation de \ProjLib{}.
+\end{tip}
+
+\tableofcontents
+
+\mainmatter
+
+\part{Instruction}
+\parttext{Vous pouvez ajouter quelque texte d'introduction ici via \lstinline|\\parttext|\meta{text}.}
+
+\LevelOneTitle*{Avant de commencer}
+\addcontentsline{toc}{chapter}{Avant de commencer}
+
+Pour utiliser les classes de documents décrites ici, vous devez :
+\begin{itemize}
+ \item installer TeX Live ou MikTeX de la dernière version possible, et vous assurer que \texttt{colorist} et \texttt{projlib} sont correctement installés dans votre système \TeX{}.
+ \item être familiarisé avec l'utilisation de base de \LaTeX{}, et savoir comment compiler vos documents avec \hologo{pdfLaTeX}, \hologo{XeLaTeX} ou \hologo{LuaLaTeX}.
+\end{itemize}
+
+
+\LevelOneTitle{Utilisation et exemples}
+
+\LevelTwoTitle{Comment l'ajouter}
+
+Il suffit simplement de mettre
+
+\begin{code}
+ \documentclass{beaulivre}
+\end{code}
+
+comme première ligne pour utiliser la classe \beaulivre{}.
+
+\begin{tip}[Attention]
+ Vous devez utiliser le moteur \hologo{XeLaTeX} ou \hologo{LuaLaTeX} pour compiler.
+\end{tip}
+
+\LevelTwoTitle{Exemple - Un document complet}
+
+Regardons d'abord un document complet.
+
+
+\begin{code*}
+\documentclass{colorbook}
+\usepackage{ProjLib}
+
+\UseLanguage{French}
+
+\begin{document}
+
+\frontmatter
+
+\begin{titlepage}
+ (*\meta{code for titlepage}*)
+\end{titlepage}
+
+\tableofcontents
+
+\mainmatter
+
+\part{(*\meta{part title}*)}
+\parttext{(*\meta{text after part title}*)}
+
+\chapter{(*\meta{chapter title}*)}
+
+\section{(*\meta{section title}*)}
+
+\dnf<Plus de contenu est nécessaire.>
+
+\begin{theorem}\label{thm:abc}
+ Ceci est un théorème.
+\end{theorem}
+Référence du théorème: \cref{thm:abc}
+
+\backmatter
+
+...
+
+\end{document}
+\end{code*}
+
+Si vous trouvez cela un peu compliqué, ne vous inquiétez pas. Examinons maintenant cet exemple pièce par pièce.
+
+\LevelThreeTitle{Initialisation}
+
+\medskip
+\begin{code}
+\documentclass{beaulivre}
+\usepackage{ProjLib}
+\end{code}
+
+L'initialisation est simple. La première ligne ajoute la classe de document \beaulivre{}, et la deuxième ligne ajoute la boîte à outils \ProjLib{} pour obtenir des fonctionnalités supplémentaires.
+
+\LevelThreeTitle{Choisir la langue}
+
+\medskip
+\begin{code}
+\UseLanguage{French}
+\end{code}
+
+Cette ligne indique que le français sera utilisé dans le document (d'ailleurs, si seul l'anglais apparaît dans votre article, alors il n'est pas nécessaire de choisir la langue). Vous pouvez également changer de langue de la même manière plus tard au milieu du texte. Les langues prises en charge sont les suivantes : chinois simplifié, chinois traditionnel, japonais, anglais, français, allemand, espagnol, portugais, portugais brésilien et russe.
+
+Pour une description détaillée de cette commande et d'autres commandes associées, veuillez vous référer à la section sur le support multilingue.
+
+
+\LevelThreeTitle{Marques de brouillon}
+
+\medskip
+\begin{code}
+\dnf<(*\meta{some hint}*)>
+\end{code}
+Lorsque vous avez des endroits qui ne sont pas encore finis, vous pouvez les marquer avec cette commande, ce qui est particulièrement utile lors de la phase de brouillon.
+
+\LevelThreeTitle{Environnements de type théorème}
+
+\medskip
+\begin{code}
+\begin{theorem}\label{thm:abc}
+ Ceci est un théorème.
+\end{theorem}
+Référence du théorème: \cref{thm:abc}
+\end{code}
+
+Les environnements de type théorème couramment utilisés ont été prédéfinis. De plus, lors du référencement d'un environnement de type théorème, il est recommandé d'utiliser \lstinline|\cref{|\meta{label}\texttt{\}} --- de cette manière, il ne serait pas nécessaire d'écrire explicitement le nom de l'environnement correspondant à chaque fois.
+
+
+
+
+\LevelOneTitle{À propos des polices par défaut}
+Par défaut, cette classe de document utilise Palatino Linotype comme police anglaise, YouSong et YouHei GBK de FounderType comme polices chinoises\footnote{Pour plus de détails, veuillez visiter le site web de FounderType : \url{https://www.foundertype.com}.}, et utilise partiellement Neo Euler comme police mathématique. Parmi eux, Neo Euler peut être téléchargé sur \url{https://github.com/khaledhosny/euler-otf}. Les autres polices ne sont pas gratuites, vous devez les acheter et les installer vous-même.
+
+\begin{itemize}
+ \item English main font. \textsf{English sans serif font}.
+ \item 中文主要字体, \textsf{中文无衬线字体}
+ \item Démonstration de maths : \( \alpha, \beta, \gamma, \delta, 1,2,3,4, a,b,c,d \), \[\mathrm{li}(x)\coloneqq \int_2^{\infty} \frac{1}{\log t}\,\mathrm{d}t \]
+\end{itemize}
+
+Lorsque la police correspondante n'est pas installée, les polices fournies avec TeX Live seront utilisées à la place. Dans ce cas, l'expérience peut être réduite.
+
+
+\LevelOneTitle{Les options}
+
+
+\begin{itemize}
+ \item Les options de langue \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French}, etc.
+ \begin{itemize}
+ \item Pour les noms d'options d'une langue spécifique, veuillez vous référer à \meta{language name} dans la section suivante. La première langue spécifiée sera considérée comme la langue par défaut.
+ \item Les options de langue ne sont pas nécessaires, elles servent principalement à augmenter la vitesse de compilation. Sans eux, le résultat serait le même, justement plus lent.
+ \end{itemize}
+ \item \texttt{draft} ou \texttt{fast}
+ \begin{itemize}
+ \item L'option \verb|fast| permet un style plus rapide mais légèrement plus rugueux, les principales différences sont :
+ \begin{itemize}
+ \item Utilisez une configuration de police mathématique plus simple ;
+ \item N'utilisez pas \textsf{hyperref} ;
+ \item Activez le mode rapide de la boîte à outils \ProjLib{}.
+ \end{itemize}
+ \end{itemize}
+ \begin{tip}
+ Pendant la phase de brouillon, il est recommandé d'utiliser le \verb|fast| option pour accélérer la compilation. Quand dans \verb|fast| mode, il y aura un filigrane ``DRAFT'' pour indiquer que vous êtes actuellement en mode brouillon.
+ \end{tip}
+ \item \texttt{a4paper} ou \texttt{b5paper}
+ \begin{itemize}
+ \item Options de format de papier. Le format de papier par défaut est 8.5 pouces $\times$ 11 pouces.
+ \end{itemize}
+ \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{biolinum} ~$|$~ \texttt{useosf}
+ \begin{itemize}
+ \item Options de police. Comme son nom l'indique, la police avec le nom correspondant sera utilisée.
+ \item L'option \texttt{useosf} est pour activer les chiffres à l'ancienne.
+ \end{itemize}
+ \item \texttt{allowbf}
+ \begin{itemize}
+ \item Pour activer les titres en gras. Lorsque cette option est utilisée, le titre principal, les titres de tous les niveaux et les noms des environnements de type théorème seront en gras.
+ \end{itemize}
+ \item \texttt{runin}
+ \begin{itemize}
+ \item Utilisez le style « runin » pour \lstinline|\subsubsection|
+ \end{itemize}
+ \item \texttt{puretext} ou \texttt{nothms}
+ \begin{itemize}
+ \item Mode texte pur. Ne pas définir les environnements de type théorème.
+ \end{itemize}
+ \item \texttt{nothmnum}
+ \begin{itemize}
+ \item Ne pas numéroter les environnements de type théorème.
+ \end{itemize}
+\end{itemize}
+\bigskip
+De plus, les options \texttt{oneside} et \texttt{twoside} couramment utilisées lors de la composition de livres sont également disponibles. La disposition recto-verso est utilisée par défaut.
+
+\LevelOneTitle{Instructions par sujet}
+
+\LevelTwoTitle{Configurer la langue}
+
+\beaulivre{} prend en charge plusieurs langues, notamment le chinois (simplifié et traditionnel), l'anglais, le français, l'allemand, l'italien, le japonais, le portugais (européen et brésilien), le russe et l'espagnol. La langue peut être sélectionnée par les macros suivantes :
+
+\begin{itemize}
+ \item \lstinline|\UseLanguage{|\meta{language name}\lstinline|}| est utilisé pour spécifier la langue. Le réglage correspondant de la langue sera appliqué après celui-ci. Il peut être utilisé soit dans le préambule ou dans le texte. Lorsqu'aucune langue n'est spécifiée, « English » est sélectionné par défaut.
+ \item \lstinline|\UseOtherLanguage{|\meta{language name}\lstinline|}{|\meta{content}\lstinline|}|, qui utilise les paramètres de langue spécifiés pour composer \meta{content}. Par rapport à \lstinline|\UseLanguage|, il ne modifiera pas l'interligne, donc l'interligne restera stable lorsque le texte CJK et occidental sont mélangés.
+\end{itemize}
+
+\meta{language name} peut être (il n'est pas sensible à la casse, par exemple, \texttt{French} et \texttt{french} ont le même effet) :
+\begin{itemize}
+ \item chinois simplifié : \texttt{CN}, \texttt{Chinese}, \texttt{SChinese} ou \texttt{SimplifiedChinese}
+ \item chinois traditionnel : \texttt{TC}, \texttt{TChinese} ou \texttt{TraditionalChinese}
+ \item anglais : \texttt{EN} ou \texttt{English}
+ \item français : \texttt{FR} ou \texttt{French}
+ \item allemand : \texttt{DE}, \texttt{German} ou \texttt{ngerman}
+ \item italien : \texttt{IT} ou \texttt{Italian}
+ \item portugais : \texttt{PT} ou \texttt{Portuguese}
+ \item portugais (brésilien) : \texttt{BR} ou \texttt{Brazilian}
+ \item espagnol : \texttt{ES} ou \texttt{Spanish}
+ \item japonais : \texttt{JP} ou \texttt{Japanese}
+ \item russe : \texttt{RU} ou \texttt{Russian}
+\end{itemize}
+
+\medskip
+De plus, vous pouvez également ajouter de nouveaux paramètres à la langue sélectionnée :
+\begin{itemize}
+ \item \lstinline|\AddLanguageSetting{|\meta{settings}\lstinline|}|
+ \begin{itemize}
+ \item Ajoutez \meta{settings} à toutes les langues prises en charge.
+ \end{itemize}
+ \item \lstinline|\AddLanguageSetting(|\meta{language name}\lstinline|){|\meta{settings}\lstinline|}|
+ \begin{itemize}
+ \item Ajoutez \meta{settings} à la langue \meta{language name} sélectionnée.
+ \end{itemize}
+\end{itemize}
+Par exemple, \lstinline|\AddLanguageSetting(German){\color{orange}}| peut rendre tout le texte allemand affiché en orange (bien sûr, il faut alors ajouter \lstinline|\AddLanguageSetting{\color{black}}| afin de corriger la couleur du texte dans d'autres langues).
+
+\LevelTwoTitle{Théorèmes et comment les référencer}
+
+Des environnements tels que \texttt{definition} et \texttt{theorem} ont été prédéfinis et peuvent être utilisés directement.
+
+Plus précisement, les environnements prédéfinis incluent : \texttt{assumption}, \texttt{axiom}, \texttt{conjecture}, \texttt{convention}, \texttt{corollary}, \texttt{definition}, \texttt{definition-proposition}, \texttt{definition-theorem}, \texttt{example}, \texttt{exercise}, \texttt{fact}, \texttt{hypothesis}, \texttt{lemma}, \texttt{notation}, \texttt{observation}, \texttt{problem}, \texttt{property}, \texttt{proposition}, \texttt{question}, \texttt{remark}, \texttt{theorem}, et la version non numérotée correspondante avec un astérisque \lstinline|*| dans le nom. Les titres changeront avec la langue actuelle. Par exemple, \texttt{theorem} sera affiché comme « Theorem » en mode anglais et « Théorème » en mode français.
+
+Lors du référencement d'un environnement de type théorème, il est recommandé d'utiliser \lstinline|\cref{|\meta{label}\texttt{\}}. De cette façon, il n'est pas nécessaire d'écrire explicitement le nom de l'environnement correspondant à chaque fois.
+
+\begin{tip}[Exemple]
+\begin{code}
+ \begin{definition}[Des choses étranges] \label{def: strange} ...
+\end{code}
+
+will produce
+\begin{definition}[Des choses étranges]\label{def: strange}
+ C'est la définition de certains objets étranges. Il y a approximativement un espace d'une ligne avant et après l'environnement de type théorème, et il y aura un symbole pour marquer la fin de l'environnement.
+\end{definition}
+
+\lstinline|\cref{def: strange}| s'affichera sous la forme : \cref{def: strange}.
+
+Après avoir utilisé \lstinline|\UseLanguage{French}|, un théorème s'affichera sous la forme :
+
+\UseLanguage{English}
+\begin{theorem}[Useless]\label{thm}
+ A theorem in English.
+\end{theorem}
+
+Par défaut, lorsqu'il est référencé, le nom de l'environnement de type théorème correspond toujours à la langue du contexte dans lequel se trouve l'environnement. Par exemple, la définition ci-dessus est toujours affichée en français dans le mode anglais courant : \cref{def: strange} et \cref{thm}. Si vous voulez que le nom du théorème corresponde au contexte actuel lors du référencement, vous pouvez ajouter \texttt{regionalref} aux options globales.
+\end{tip}
+
+\UseLanguage{French}
+
+\bigskip
+Voici les principaux styles d'environnements de type théorème :
+\begin{theorem}
+ Style de théorème : theorem, proposition, lemma, corollary, ...
+\end{theorem}
+
+\begin{proof}
+ Style d'épreuve
+\end{proof}
+
+\begin{remark}
+ Style de remarque
+\end{remark}
+
+\begin{conjecture}
+ Style de conjecture
+\end{conjecture}
+
+\begin{example*}
+ Style d'exemple : example, fact, ...
+\end{example*}
+
+\begin{problem}
+ Style de problème : problem, question, ...
+\end{problem}
+
+\medskip
+Pour l'esthétique, les définitions adjacentes seront reliées entre elles automatiquement :
+\begin{definition}
+ Première définition.
+\end{definition}
+
+\begin{definition}
+ Deuxième définition.
+\end{definition}
+
+\LevelTwoTitle{Définir un nouvel environnement de type théorème}
+
+Si vous avez besoin de définir un nouvel environnement de type théorème, vous devez d'abord définir le nom de l'environnement dans le langage à utiliser :
+\begin{itemize}
+ \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
+\end{itemize}
+Pour \meta{language name}, veuillez vous référer à la section sur la configuration de la langue. Lorsqu'il n'est pas spécifié, le nom sera défini pour toutes les langues prises en charge. De plus, les environnements avec ou sans astérisque partagent le même nom, donc \lstinline|\NameTheorem{envname*}{...}| a le même effet que \lstinline|\NameTheorem{envname}{...}| .
+
+\medskip
+Ensuite, créez cet environnement de l'une des cinq manières suivantes :
+\begin{itemize}
+ \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
+ \begin{itemize}
+ \item Définir un environnement non numéroté \meta{name of environment}
+ \end{itemize}
+ \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
+ \begin{itemize}
+ \item Définir un environnement numéroté \meta{name of environment}, numéroté dans l'ordre 1, 2, 3, \dots
+ \end{itemize}
+ \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
+ \begin{itemize}
+ \item Définir un environnement numéroté \meta{name of environment}, qui partage le compteur \meta{numbered like}
+ \end{itemize}
+ \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
+ \begin{itemize}
+ \item Définir un environnement numéroté \meta{name of environment}, numéroté dans le compteur \meta{numbered within}
+ \end{itemize}
+ \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
+ \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
+ \begin{itemize}
+ \item Identifiez \meta{name of environment} avec \meta{existed environment} ou \meta{existed environment}\lstinline|*|.
+ \item Cette méthode est généralement utile dans les deux situations suivantes :
+ \begin{enumerate}
+ \item Pour utiliser un nom plus concis. Par exemple, avec \lstinline|\CreateTheorem{thm}(theorem)|, on peut alors utiliser le nom \texttt{thm} pour écrire le théorème.
+ \item Pour supprimer la numérotation de certains environnements. Par exemple, on peut supprimer la numérotation de l'environnement \texttt{remark} avec \lstinline|\CreateTheorem{remark}(remark*)|.
+ \end{enumerate}
+ \end{itemize}
+\end{itemize}
+
+\begin{tip}
+ Cette macro utilise la fonctionnalité de \textsf{amsthm} en interne, donc le traditionnel \texttt{theoremstyle} lui est également applicable. Il suffit de déclarer le style avant les définitions pertinentes.
+\end{tip}
+
+\NameTheorem[FR]{proofidea}{Idée}
+\CreateTheorem*{proofidea*}
+\CreateTheorem{proofidea}<section>
+
+\bigskip
+Voici un exemple. Le code suivant :
+
+\begin{code}
+ \NameTheorem[FR]{proofidea}{Idée}
+ \CreateTheorem*{proofidea*}
+ \CreateTheorem{proofidea}<section>
+\end{code}
+définit un environnement non numéroté \lstinline|proofidea*| et un environnement numéroté \lstinline|proofidea| (numérotés dans la section) respectivement. Ils peuvent être utilisés dans le contexte français. L'effet est le suivant :
+
+\vspace{-0.3\baselineskip}
+\begin{proofidea*}
+ La environnement \lstinline|proofidea*| .
+\end{proofidea*}
+
+\vspace{-\baselineskip}
+\begin{proofidea}
+ La environnement \lstinline|proofidea| .
+\end{proofidea}
+
+\LevelTwoTitle{Draft mark}
+
+Vous pouvez utiliser \lstinline|\dnf| pour marquer la partie inachevée. Par example :
+\begin{itemize}
+ \item \lstinline|\dnf| ou \lstinline|\dnf<...>|. L'effet est : \dnf~ ou \dnf<...>. \\Le texte à l'intérieur changera en fonction de la langue actuelle. Par exemple, il sera affiché sous la forme \UseOtherLanguage{English}{\dnf} en mode anglais.
+\end{itemize}
+
+De même, il y a aussi \lstinline|\needgraph| :
+\begin{itemize}
+ \item \lstinline|\needgraph| ou \lstinline|\needgraph<...>|. L'effet est : \needgraph ou \needgraph<...>Le texte de l'invite change en fonction de la langue actuelle. Par exemple, en mode anglais, il sera affiché sous la forme \UseOtherLanguage{English}{\needgraph}
+\end{itemize}
+
+
+\LevelOneTitle{Problèmes connus}
+
+\begin{itemize}[itemsep=.6em]
+ \item Les paramètres de police ne sont pas encore parfaits.
+ \item Comme de nombreuses fonctionnalités sont basées sur la boîte à outils \ProjLib{}, \colorist{} (et donc \colorart{}, \lebhart{} et \colorbook{}, \beaulivre{}) hérite de tous ses problèmes. Pour plus de détails, veuillez vous référer à la section « Problèmes connus » de la documentation de \ProjLib{}.
+ \item Le mécanisme de gestion des erreurs est incomplet : pas de messages correspondants lorsque certains problèmes surviennent.
+ \item Il y a encore beaucoup de choses qui peuvent être optimisées dans le code.
+\end{itemize}
+
+\part{Démonstration}
+\blinddocument
+
+\end{document}
+\endinput
+%%
+%% End of file `beaulivre/beaulivre-doc-fr.tex'.
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre.cls b/macros/unicodetex/latex/beaulivre/beaulivre.cls
index c5e5821c22..79ac9ee080 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre.cls
+++ b/macros/unicodetex/latex/beaulivre/beaulivre.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{beaulivre}
- [2021/06/30 A colorful book style]
+ [2021/07/15 A colorful book style]
\def\colorclass@baseclass{book}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -42,6 +42,7 @@
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{\colorclass@baseclass}}
\ProcessKeyvalOptions*\relax
\LoadClass{\colorclass@baseclass}
+
\if@colorclass@draft
\@colorclass@fasttrue
\fi
@@ -97,19 +98,18 @@
\RequirePackage{draftwatermark}
\DraftwatermarkOptions{text={\normalfont DRAFT},color=paper!95!-paper}
\fi
+
\RequirePackage{colorist}
%%================================
%% Fonts
%%================================
-%% Math fonts in fast mode
\if@colorclass@customfont\else
\if@colorclass@fast
\RequirePackage{mathpazo}
\fi
\fi
-%% English fonts
\PassOptionsToPackage{no-math}{fontspec}
\RequirePackage{fontspec}
\IfFontExistsTF{Palatino Linotype}{%
@@ -133,7 +133,6 @@
ItalicFont = cmunst.otf ,
BoldItalicFont = cmuntb.otf ]
-%% Chinese fonts
\PassOptionsToPackage{fontset=none,scheme=plain}{ctex}
\RequirePackage{ctex}
\WarningFilter{everysel}{Everysel is no longer required}
@@ -185,7 +184,6 @@
SmallCapsFont = * ]
}
-%% Math font
\if@colorclass@customfont\else
\if@colorclass@fast
\RequirePackage{amssymb}
@@ -215,6 +213,14 @@
\setmathfont[range={up/num, bfup/num}
]{texgyrepagella-math.otf}
+\AtBeginDocument{
+\let\mid@original\mid
+\renewcommand{\mid}{\hspace{-.2em}\mid@original\hspace{-.2em}}
+\let\nmid@original\nmid
+\renewcommand{\nmid}{\hspace{-.2em}\nmid@original\hspace{-.2em}}
+}
+
+\RequirePackage{tikz-cd}
\newbox\xratbelow
\newbox\xratabove
\renewcommand{\xrightarrow}[2][]{%
@@ -273,6 +279,7 @@
\draw (0,0) edge[commutative diagrams/equal] node[below=3pt] {\box\xratbelow}
node[above=2pt] {\box\xratabove}
(\xratlen,0) ;}}
+
\AtBeginDocument{
\renewcommand{\twoheadrightarrow}{%
\mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}]
@@ -344,7 +351,6 @@
\def\PJL@font@alreadyset{}
-%% Minor improvements
\PassOptionsToPackage{verbose=silent}{microtype}
\RequirePackage{microtype}
\PassOptionsToPackage{all}{nowidow}
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdf b/macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdf
index 19d522f008..856f770e8c 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdf
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-cn.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex b/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex
index 8815d8f683..8ad79b1d60 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex
@@ -1,12 +1,11 @@
-%! TEX program = xelatex
-\documentclass[Chinese,English,French,allowbf,puretext]{lebhart}
+\documentclass[English,Chinese,French,allowbf,puretext]{lebhart}
\theoremstyle{basic}
\CreateTheorem{definition}<highest>
-\CreateTheorem{theorem}<highest>
-\CreateTheorem{conjecture}<highest>
+\CreateTheorem{theorem}[definition]
+\CreateTheorem{conjecture}[definition]
\CreateTheorem*{example*}
-\CreateTheorem{problem}<highest>
+\CreateTheorem{problem}[definition]
\theoremstyle{emphasis}
\CreateTheorem{remark}<highest>
@@ -14,16 +13,19 @@
\theoremstyle{simple}
%%================================
-%% 引入工具集
+%% Import toolkit
%%================================
\usepackage{ProjLib}
\usepackage{longtable} % breakable tables
\usepackage{hologo} % more TeX logo
+\usetikzlibrary{calc}
+
+\usepackage{blindtext}
\UseLanguage{Chinese}
%%================================
-%% 排版代码
+%% For typesetting code
%%================================
\usepackage{listings}
\definecolor{maintheme}{RGB}{70,130,180}
@@ -42,19 +44,27 @@
escapeinside={(*}{*)},
% numbers=left,
numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- firstnumber=last,
-}
+ % firstnumber=last,
+}
\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{moretexcs=%
- {subsubsection,href,color,NameTheorem,CreateTheorem,proofideanameCN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib
+ {part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
+ color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
}
}
-\lstnewenvironment{code}%
-{\setkeys{lst}{columns=fullflexible,keepspaces=true}}{}
+\lstnewenvironment{code}%
+{\setstretch{1.07}%
+\setkeys{lst}{columns=fullflexible,keepspaces=true}%
+}{}
+\lstnewenvironment{code*}%
+{\setstretch{1.07}%
+\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
+}{}
%%================================
%% tip
%%================================
+\usepackage[many]{tcolorbox}
\newenvironment{tip}[1][提示]{%
\begin{tcolorbox}[breakable,
enhanced,
@@ -69,27 +79,35 @@
after skip = 0.3cm,
top = 3mm,
bottom = 3mm,
- title={\sffamily #1}]%
+ title={\scshape\sffamily #1}]%
}{\end{tcolorbox}}
%%================================
-%% 名称
+%% Names
+%%================================
+\providecommand{\colorist}{\textsf{colorist}}
+\providecommand{\colorart}{\textsf{colorart}}
+\providecommand{\colorbook}{\textsf{colorbook}}
+\providecommand{\lebhart}{\textsf{lebhart}}
+\providecommand{\beaulivre}{\textsf{beaulivre}}
+
+%%================================
+%% Titles
%%================================
-\providecommand{\colorist}{{\normalfont\textsf{colorist}}}
-\providecommand{\colorart}{{\normalfont\textsf{colorart}}}
-\providecommand{\colorbook}{{\normalfont\textsf{colorbook}}}
-\providecommand{\lebhart}{{\normalfont\textsf{lebhart}}}
-\providecommand{\beaulivre}{{\normalfont\textsf{beaulivre}}}
+\let\LevelOneTitle\section
+\let\LevelTwoTitle\subsection
+\let\LevelThreeTitle\subsubsection
%%================================
-%% 正文
+%% Main text
%%================================
\begin{document}
-\title{{\normalfont\textbf{\textsf{lebhart}}},以多彩的方式排版你的文章}
+\title{\lebhart{},以多彩的方式排版你的文章}
\author{许锦文}
-\thanks{对应版本. \texttt{\lebhart{} 2021/06/30}}
-\date{2021年6月,北京}
+\thanks{对应版本. \texttt{\lebhart{} 2021/07/15}}
+\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
+\date{2021年7月,北京}
\maketitle
@@ -97,21 +115,27 @@
\lebhart{} 是 \colorist{} 文档类系列的成员之一,其名称取自于德文的lebhaft (活泼),并取了artikel (文章)的前三个字母组合而成。整个 \colorist{} 系列包含用于排版文章的 \colorart{}、\lebhart{} 以及用于排版书的 \colorbook{}、\beaulivre{}。我设计这一系列的初衷是为了撰写草稿与笔记,使之多彩而不缭乱。
\lebhart{} 支持英语、法语、德语、意大利语、葡萄牙语、巴西葡萄牙语、西班牙语、简体中文、繁体中文、日文、俄文,并且同一篇文档中这些语言可以很好地协调。由于采用了自定义字体,需要用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎进行编译。
-
+
这篇说明文档即是用 \lebhart{} 排版的 (使用了参数 \texttt{allowbf}),你可以把它看作一份简短的说明与演示。
\end{abstract}
+
+\setcounter{tocdepth}{2}
\tableofcontents
-\vspace{2\baselineskip}
-\begin{tip}
- 多语言支持、定理类环境、未完成标记等功能是由 \ProjLib{} 工具箱提供的,这里只给出了将其与本文档类搭配使用的要点。如需获取更详细的信息,可以参阅 \ProjLib{} 的说明文档。
-\end{tip}
-\clearpage
-\section{初始化}
+\medskip
+\LevelOneTitle*{开始之前}
+为了使用这篇文档中提到的文档类,你需要:
+\begin{itemize}
+ \item 安装一个尽可能新版本的 TeX Live 或 MikTeX 套装,并确保 \texttt{colorist} 和 \texttt{projlib} 被正确安装在你的 \TeX 封装中。
+ \item 熟悉 \LaTeX{} 的基本使用方式,并且知道如何用 \hologo{pdfLaTeX}、\hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 编译你的文档。
+\end{itemize}
+
+
+\LevelOneTitle{使用示例}
-\subsection{如何载入}
+\LevelTwoTitle{如何加载}
只需要在第一行写:
@@ -121,7 +145,175 @@
即可使用 \lebhart{} 文档类。请注意,要使用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎才能编译。
-\subsection{选项}
+\LevelTwoTitle{一篇完整的文档示例}
+
+首先来看一段完整的示例。
+
+\begin{code*}
+\documentclass{lebhart}
+\usepackage{ProjLib}
+
+\UseLanguage{French}
+
+\begin{document}
+
+\title{(*\meta{title}*)}
+\author{(*\meta{author}*)}
+\date{\PLdate{2022-04-01}}
+
+\maketitle
+
+\begin{abstract}
+ Ceci est un résumé. \dnf<Plus de contenu est nécessaire.>
+\end{abstract}
+\begin{keyword}
+ AAA, BBB, CCC, DDD, EEE
+\end{keyword}
+
+\section{Un théorème}
+
+\begin{theorem}\label{thm:abc}
+ Ceci est un théorème.
+\end{theorem}
+Référence du théorème: \cref{thm:abc}
+
+\end{document}
+\end{code*}
+
+
+如果你觉得这个例子有些复杂,不要担心。现在我们来一点点地观察这个例子。
+
+\clearpage
+\LevelThreeTitle{初始化部分}
+
+\medskip
+\begin{code}
+\documentclass{lebhart}
+\usepackage{ProjLib}
+\end{code}
+
+初始化部分很简单:第一行加载文档类 \lebhart{},第二行加载 \ProjLib{} 工具箱,以便使用一些附加功能。
+
+\LevelThreeTitle{设定语言}
+
+\medskip
+\begin{code}
+\UseLanguage{French}
+\end{code}
+
+这一行表明文档中将使用法语(如果你的文章中只出现英语,那么可以不需要设定语言)。你也可以在文章中间用同样的方式再次切换语言。支持的语言包括简体中文、繁体中文、日文、英语、法语、德语、西班牙语、葡萄牙语、巴西葡萄牙语、俄语。
+
+对于这一命令的详细说明以及更多相关命令,可以参考后面关于多语言支持的小节。
+
+\LevelThreeTitle{标题,作者信息,摘要与关键词}
+
+\medskip
+\begin{code}
+\title{(*\meta{title}*)}
+\author{(*\meta{author}*)}
+\date{\PLdate{2022-04-01}}
+\maketitle
+
+\begin{abstract}
+ (*\meta{abstract}*)
+\end{abstract}
+\begin{keyword}
+ (*\meta{keywords}*)
+\end{keyword}
+\end{code}
+
+开头部分是标题和作者信息块。这个例子中给出的是最基本的形式,事实上你还可以这样写:
+
+\begin{code}
+\author{(*\meta{author 1}*)}
+\address{(*\meta{address 1}*)}
+\email{(*\meta{email 1}*)}
+\author{(*\meta{author 2}*)}
+\address{(*\meta{address 2}*)}
+\email{(*\meta{email 2}*)}
+...
+\end{code}
+
+另外,你还可以采用 \AmS{} 文档类的写法:
+
+\begin{code}
+\title{(*\meta{title}*)}
+\author{(*\meta{author 1}*)}
+\address{(*\meta{address 1}*)}
+\email{(*\meta{email 1}*)}
+\author{(*\meta{author 2}*)}
+\address{(*\meta{address 2}*)}
+\email{(*\meta{email 2}*)}
+\date{\PLdate{2022-04-01}}
+\subjclass{*****}
+\keywords{(*\meta{keywords}*)}
+
+\begin{abstract}
+ (*\meta{abstract}*)
+\end{abstract}
+
+\maketitle
+\end{code}
+
+\LevelThreeTitle{未完成标记}
+
+\medskip
+\begin{code}
+\dnf<(*\meta{some hint}*)>
+\end{code}
+当你有一些地方尚未完成的时候,可以用这条指令标记出来,它在草稿阶段格外有用。
+
+\LevelThreeTitle{定理类环境}
+
+\medskip
+\begin{code}
+\begin{theorem}\label{thm:abc}
+ Ceci est un théorème.
+\end{theorem}
+Référence du théorème: \cref{thm:abc}
+\end{code}
+
+常见的定理类环境可以直接使用。在引用的时候,建议采用智能引用 \lstinline|\cref{|\meta{label}\lstinline|}|——这样就不必每次都写上相应环境的名称了。
+
+\begin{tip}
+如果你之后想要切换到标准文档类,只需要把前两行换为:
+
+\begin{code}
+\documentclass{article}
+\usepackage[a4paper,margin=1in]{geometry}
+\usepackage[hidelinks]{hyperref}
+\usepackage[palatino,amsfashion]{ProjLib}
+\end{code}
+
+或者使用 \AmS{} 文档类:
+
+\begin{code}
+\documentclass{amsart}
+\usepackage[a4paper,margin=1in]{geometry}
+\usepackage[hidelinks]{hyperref}
+\usepackage[palatino]{ProjLib}
+\end{code}
+
+\end{tip}
+
+\begin{tip}
+如果你喜欢这个文档类,但又希望使用一种更加中规中矩的样式,那么不妨使用 \texttt{classical} 选项,就像这样:
+
+\begin{code}
+\documentclass[classical]{lebhart}
+\end{code}
+\end{tip}
+
+
+\clearpage
+\LevelOneTitle{关于默认字体}
+\lebhart{} 默认使用 Palatino Linotype 作为英文字体,方正悠宋、悠黑GBK作为中文字体,并部分使用了 Neo Euler 作为数学字体。其中,Neo Euler可以在 \url{https://github.com/khaledhosny/euler-otf} 下载。其他字体不是免费字体,需要自行购买使用。可以在方正字库网站查询详细资料:\url{https://www.foundertype.com}。
+
+
+在没有安装相应的字体时,将采用TeX Live中自带的字体来代替,效果可能会有所折扣。
+
+
+\LevelOneTitle{选项}
\lebhart{} 文档类有下面几个选项:
@@ -129,6 +321,7 @@
\item 语言选项 \texttt{EN} / \texttt{english} / \texttt{English}、\texttt{FR} / \texttt{french} / \texttt{French},等等
\begin{itemize}
\item 具体选项名称可参见下一节的 \meta{language name}。第一个指定的语言将作为默认语言。
+ \item 语言选项不是必需的,其主要用途是提高编译速度。不添加语言选项时效果是一样的,只是会更慢一些。
\end{itemize}
\item \texttt{draft} 或 \texttt{fast}
\begin{itemize}
@@ -139,9 +332,9 @@
\item 启用 \ProjLib{} 工具箱的快速模式。
\end{itemize}
\end{itemize}
-\begin{tip}
- 在文章的撰写阶段,建议使用 \verb|fast| 选项以加快编译速度,改善写作时的流畅度。使用 \verb|fast| 模式时会有“DRAFT”字样的水印,以提示目前处于草稿阶段。
-\end{tip}
+ \begin{tip}
+ 在文章的撰写阶段,建议使用 \verb|fast| 选项以加快编译速度,改善写作时的流畅度。使用 \verb|fast| 模式时会有“DRAFT”字样的水印,以提示目前处于草稿阶段。
+ \end{tip}
\item \texttt{a4paper} 或 \texttt{b5paper}
\begin{itemize}
\item 可选的纸张大小。默认的纸张大小为 8.5in $\times$ 11in。
@@ -159,7 +352,7 @@
\begin{itemize}
\item \lstinline|\subsubsection| 采用 ``runin'' 风格。
\end{itemize}
- \item \texttt{puretext} or \texttt{nothms}
+ \item \texttt{puretext} 或 \texttt{nothms}
\begin{itemize}
\item 纯文本模式,不加载定理类环境。
\end{itemize}
@@ -170,26 +363,9 @@
\end{itemize}
\clearpage
-\section{关于默认字体}
-\lebhart{} 默认使用 Palatino Linotype 作为英文字体,方正悠宋、悠黑GBK作为中文字体,并部分使用了 Neo Euler 作为数学字体。其中,Neo Euler可以在 \url{https://github.com/khaledhosny/euler-otf} 下载。其他字体不是免费的,需要自行购买使用,可在方正字库网站查询详细信息:\url{https://www.foundertype.com}。
-
-\begin{tip}[字体演示]
- \begin{itemize}\setstretch{1.15}
- \item English main font. \textsf{English sans serif font}. \texttt{English typewriter font}.
- \item 中文主要字体,\textsf{中文无衬线字体}
- \item 数学示例: \( \alpha, \beta, \gamma, \delta, 1,2,3,4, a,b,c,d \), \[\mathrm{li}(x)\coloneqq \int_2^{\infty} \frac{1}{\log t}\,\mathrm{d}t \]
- \end{itemize}
-\end{tip}
-
-在没有安装相应的字体时,将采用TeX Live中自带的字体来代替,效果可能会有所折扣。
+\LevelOneTitle{具体说明}
-
-\section{使用说明}
-
-接下来介绍的许多功能是由 \ProjLib{} 工具箱提供的。这里只介绍了基本使用方法,更多细节可以直接参阅其用户文档。
-
-\medskip
-\subsection{语言设置}
+\LevelTwoTitle{语言设置}
\lebhart{} 提供了多语言支持,包括英语、法语、德语、意大利语、葡萄牙语、巴西葡萄牙语、西班牙语、简体中文、繁体中文、日文、俄文。可以通过下列命令来选定语言:
\begin{itemize}
@@ -204,7 +380,7 @@
\end{itemize}
\meta{language name} 有下列选择 (不区分大小写,如 \texttt{French} 或 \texttt{french} 均可):
-\begin{itemize}\setstretch{1.15}
+\begin{itemize}
\item 简体中文:\texttt{CN}、\texttt{Chinese}、\texttt{SChinese} 或 \texttt{SimplifiedChinese}
\item 繁体中文:\texttt{TC}、\texttt{TChinese} 或 \texttt{TraditionalChinese}
\item 英文:\texttt{EN} 或 \texttt{English}
@@ -218,7 +394,6 @@
\item 俄文:\texttt{RU} 或 \texttt{Russian}
\end{itemize}
-\clearpage
另外,还可以通过下面的方式来填加相应语言的设置:
\begin{itemize}
\item \lstinline|\AddLanguageSetting{|\meta{settings}\lstinline|}|
@@ -232,24 +407,23 @@
\end{itemize}
例如,\lstinline|\AddLanguageSetting(German){\color{orange}}| 可以让所有德语以橙色显示(当然,还需要再加上 \lstinline|\AddLanguageSetting{\color{black}}| 来修正其他语言的颜色)。
-\medskip
-\subsection{定理类环境及其引用}
+\LevelTwoTitle{定理类环境及其引用}
定义、定理等环境已经被预定义,可以直接使用。
具体来说,预设的定理类环境包括:
\texttt{assumption}、\texttt{axiom}、\texttt{conjecture}、\texttt{convention}、\texttt{corollary}、\texttt{definition}、\texttt{definition-proposition}、\texttt{definition-theorem}、\texttt{example}、\texttt{exercise}、\texttt{fact}、\texttt{hypothesis}、\texttt{lemma}、\texttt{notation}、\texttt{observation}、\texttt{problem}、\texttt{property}、\texttt{proposition}、\texttt{question}、\texttt{remark}、\texttt{theorem},以及相应的带有星号 \lstinline|*| 的无编号版本。
-\medskip
在引用定理类环境时,建议使用智能引用 \lstinline|\cref{|\meta{label}\lstinline|}|。这样就不必每次都写上相应环境的名称了。
+\medskip
\begin{tip}[例子]
\begin{code}
\begin{definition}[奇异物品] \label{def: strange} ...
\end{code}
将会生成
\begin{definition}[奇异物品]\label{def: strange}
- 这是奇异物品的定义。
+ 这是奇异物品的定义。定理类环境的前后有一行左右的间距。在定义结束的时候会有一个符号来标记。
\end{definition}
\lstinline|\cref{def: strange}| 会显示为:\cref{def: strange}。
@@ -265,6 +439,8 @@
默认情况下,引用时,定理的名称总是与定理所在区域的语言匹配,例如,上面的定义在现在的英文模式下依然显示为中文:\cref{def: strange} 和 \cref{thm}。如果在引用时想让定理的名称与当前语境相匹配,可以在全局选项中加入 \texttt{regionalref}。
\end{tip}
+\UseLanguage{Chinese}
+
\bigskip
下面是定理类环境的几种主要样式:
\begin{theorem}
@@ -301,20 +477,14 @@
Second definition.
\end{definition}
-\UseLanguage{Chinese}
-
-
-\subsection{定义新的定理型环境}
+\LevelTwoTitle{定义新的定理型环境}
若需要定义新的定理类环境,首先要定义这个环境在所用语言下的名称:
-% \vspace{-.15\baselineskip}%
\begin{itemize}
\item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
\end{itemize}
-% \vspace{-.15\baselineskip}%
其中,\meta{language name} 可参阅关于语言设置的小节。当不指定 \meta{language name}时,则会将该名称设置为所有支持语言下的名称。另外,带星号与不带星号的同名环境共用一个名称,因此 \lstinline|\NameTheorem{envname*}{...}| 与 \lstinline|\NameTheorem{envname}{...}| 效果相同。
-\medskip
然后用下面五种方式之一定义这一环境:
\begin{itemize}
\item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
@@ -349,13 +519,11 @@
其内部使用了 \textsf{amsthm},因此传统的 \texttt{theoremstyle} 对其也是适用的,只需在相关定义前标明即可。
\end{tip}
-% \def\proofideanameCN{思路}
\NameTheorem[CN]{proofidea}{思路}
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<subsection>
-% \bigskip
-\clearpage
+\bigskip
下面提供一个例子。这三行代码:
\begin{code}
@@ -363,18 +531,18 @@
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<subsection>
\end{code}
-
可以分别定义不编号的环境 \lstinline|proofidea*| 和编号的环境 \lstinline|proofidea| (在 subsection 内编号),它们支持在简体中文语境中使用,效果如下所示:
+\vspace{-.3\baselineskip}
\begin{proofidea*}
\lstinline|proofidea*| 环境。
\end{proofidea*}
-
+\vspace{-.5\baselineskip}
\begin{proofidea}
\lstinline|proofidea| 环境。
\end{proofidea}
-\subsection{未完成标记}
+\LevelTwoTitle{未完成标记}
你可以通过 \lstinline|\dnf| 来标记尚未完成的部分。例如:
\begin{itemize}
@@ -386,10 +554,8 @@
\item \lstinline|\needgraph| 或 \lstinline|\needgraph<...>|。效果为:\needgraph~或 \needgraph<...>其提示文字与当前语言相对应,例如,在法语模式下将会显示为 \UseOtherLanguage{French}{\needgraph}
\end{itemize}
+\LevelTwoTitle{文章标题、摘要与关键词}
-\subsection{关于文章标题、摘要与关键词}
-
-% 由于引入了 \ProjLib{} 工具箱的 \textsf{PJLamssim} 组件,
\lebhart{} 同时具有标准文档类与\AmS{} 文档类的一些特性。
因此,文章的标题部分既可以按照标准文档类 \textsf{article} 的写法来写:
@@ -407,7 +573,6 @@
\end{keyword}
\end{code}
-\clearpage
也可以按照 \AmS{} 文档类的方式来写:
\begin{code}
@@ -439,12 +604,9 @@
其中 \lstinline|\address|、\lstinline|\curraddr|、\lstinline|\email| 的相互顺序是不重要的。
-
-\medskip
-\section{目前存在的问题}
+\LevelOneTitle{目前存在的问题}
\begin{itemize}[itemsep=.6em]
- \item 目录、part 的设计依然有待改良。
\item 对于字体的设置仍然不够完善。
\item 由于很多核心功能建立在 \ProjLib{} 工具箱的基础上,因此 \lebhart{} 自然继承了其所有问题。详情可以参阅 \ProjLib{} 用户文档的“目前存在的问题”这一小节。
\item 错误处理功能不完善,在出现一些问题时没有相应的错误提示。
@@ -452,109 +614,7 @@
\end{itemize}
-\UseLanguage{English}
-
-\clearpage
-\section{文档示例}
-
-\subsection{标准文档类写法}
-
-如果想采用标准文档类中的写法,可以参考下面的例子:
-
-\begin{code}
-\documentclass{lebhart}
-\usepackage{ProjLib} % Load ProjLib toolkit
-
-\UseLanguage{French} % Use French from here
-
-\begin{document}
-
-\title{Le Titre}
-\author{Auteur}
-\date{\PLdate{2022-04-01}}
-
-\maketitle
-
-\begin{abstract}
- Ceci est un résumé. \dnf<Plus de contenu est nécessaire.>
-\end{abstract}
-\begin{keyword}
- AAA, BBB, CCC, DDD, EEE
-\end{keyword}
-
-\section{Un théorème}
-
-%% Theorem-like environments can be used directly
-\begin{theorem}\label{thm:abc}
- Ceci est un théorème.
-\end{theorem}
-
-Référence du théorème: \cref{thm:abc}
- % It is recommended to use clever reference
-
-\end{document}
-\end{code}
-
-如果以后想切换到标准文档类,只需要将前两行换为:
-
-\begin{code}
-\documentclass{article}
-\usepackage[a4paper,margin=1in]{geometry}
-\usepackage[hidelinks]{hyperref}
-\usepackage[palatino]{ProjLib} % Load ProjLib toolkit
-\end{code}
-
-
-\clearpage
-\subsection{\texorpdfstring{\AmS{}}{AMS} 文档类写法}
-
-如果日后有意切换到期刊模版,想采用 \AmS{} 文档类中的写法,可以参考下面的例子:
-
-\begin{code}
-\documentclass{lebhart}
-\usepackage{ProjLib} % Load ProjLib toolkit
-
-\UseLanguage{French} % Use French from here
-
-\begin{document}
-
-\title{Le Titre}
-\author{Auteur 1}
-\address{Adresse 1}
-\email{\href{Courriel 1}{Courriel 1}}
-\author{Auteur 1}
-\address{Adresse 1}
-\email{\href{Courriel 2}{Courriel 2}}
-\date{\PLdate{2022-04-01}}
-\subjclass{*****}
-\keywords{...}
-
-\begin{abstract}
- Ceci est un résumé. \dnf<Plus de contenu est nécessaire.>
-\end{abstract}
-
-\maketitle
-
-\section{Première section}
-
-%% Theorem-like environments can be used directly
-\begin{theorem}\label{thm:abc}
- Ceci est un théorème.
-\end{theorem}
-
-Référence du théorème: \cref{thm:abc}
- % It is recommended to use clever reference
-
-\end{document}
-\end{code}
-
-这样,若想切换到 \AmS{} 文档类,只需要将前两行换为:
-
-\begin{code}
-\documentclass{amsart}
-\usepackage[a4paper,margin=1in]{geometry}
-\usepackage[hidelinks]{hyperref}
-\usepackage[palatino]{ProjLib} % Load ProjLib toolkit
-\end{code}
-
\end{document}
+\endinput
+%%
+%% End of file `lebhart/lebhart-doc-cn.tex'.
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-en.pdf b/macros/unicodetex/latex/lebhart/lebhart-doc-en.pdf
index 6f8dfda1aa..d16f90d88c 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-en.pdf
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-en.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-en.tex b/macros/unicodetex/latex/lebhart/lebhart-doc-en.tex
index a7f38aaa36..7f0b6c0f80 100644
--- a/macros/unicodetex/latex/lebhart/lebhart-doc-en.tex
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-en.tex
@@ -1,12 +1,11 @@
-%! TEX program = xelatex
-\documentclass[English,French,allowbf,puretext]{lebhart}
+\documentclass[English,Chinese,French,allowbf,puretext]{lebhart}
\theoremstyle{basic}
\CreateTheorem{definition}<highest>
-\CreateTheorem{theorem}<highest>
-\CreateTheorem{conjecture}<highest>
+\CreateTheorem{theorem}[definition]
+\CreateTheorem{conjecture}[definition]
\CreateTheorem*{example*}
-\CreateTheorem{problem}<highest>
+\CreateTheorem{problem}[definition]
\theoremstyle{emphasis}
\CreateTheorem{remark}<highest>
@@ -19,9 +18,14 @@
\usepackage{ProjLib}
\usepackage{longtable} % breakable tables
\usepackage{hologo} % more TeX logo
+\usetikzlibrary{calc}
+
+\usepackage{blindtext}
+
+\UseLanguage{English}
%%================================
-%% For typestting code
+%% For typesetting code
%%================================
\usepackage{listings}
\definecolor{maintheme}{RGB}{70,130,180}
@@ -40,19 +44,27 @@
escapeinside={(*}{*)},
% numbers=left,
numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- firstnumber=last,
-}
+ % firstnumber=last,
+}
\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{moretexcs=%
- {subsubsection,href,color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib
+ {part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
+ color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
}
}
-\lstnewenvironment{code}%
-{\setkeys{lst}{columns=fullflexible,keepspaces=true}}{}
+\lstnewenvironment{code}%
+{\setstretch{1.07}%
+\setkeys{lst}{columns=fullflexible,keepspaces=true}%
+}{}
+\lstnewenvironment{code*}%
+{\setstretch{1.07}%
+\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
+}{}
%%================================
%% tip
%%================================
+\usepackage[many]{tcolorbox}
\newenvironment{tip}[1][Tip]{%
\begin{tcolorbox}[breakable,
enhanced,
@@ -73,21 +85,29 @@
%%================================
%% Names
%%================================
-\providecommand{\colorist}{{\normalfont\textsf{colorist}}}
-\providecommand{\colorart}{{\normalfont\textsf{colorart}}}
-\providecommand{\colorbook}{{\normalfont\textsf{colorbook}}}
-\providecommand{\lebhart}{{\normalfont\textsf{lebhart}}}
-\providecommand{\beaulivre}{{\normalfont\textsf{beaulivre}}}
+\providecommand{\colorist}{\textsf{colorist}}
+\providecommand{\colorart}{\textsf{colorart}}
+\providecommand{\colorbook}{\textsf{colorbook}}
+\providecommand{\lebhart}{\textsf{lebhart}}
+\providecommand{\beaulivre}{\textsf{beaulivre}}
+
+%%================================
+%% Titles
+%%================================
+\let\LevelOneTitle\section
+\let\LevelTwoTitle\subsection
+\let\LevelThreeTitle\subsubsection
%%================================
%% Main text
%%================================
\begin{document}
-\title{{\normalfont\textbf{\textsf{lebhart}}}, write your articles in a colorful way}
+\title{\lebhart{}, write your articles in a colorful way}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\lebhart{} 2021/06/30}}
-\date{June 2021, Beijing}
+\thanks{Corresponding to: \texttt{\lebhart{} 2021/07/15}}
+\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
+\date{July 2021, Beijing}
\maketitle
@@ -95,63 +115,238 @@
\lebhart{} is a member of the \colorist{} class series. Its name is taken from German word ``lebhaft'' (``vividly''), combined with the first three letters of ``artikel'' (``article''). The entire collection includes \colorart{} and \lebhart{} for typesetting articles and \colorbook{} and \beaulivre{} for typesetting books. My original intention in designing this series was to write drafts and notes that look colorful yet not dazzling.
\lebhart{} has multi-language support, including Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish. These languages can be switched seamlessly in a single document. Due to the usage of custom fonts, \lebhart{} requires \hologo{XeLaTeX} or \hologo{LuaLaTeX} to compile.
-
+
This documentation is typeset using \lebhart{} (with the option \texttt{allowbf}). You can think of it as a short introduction and demonstration.
\end{abstract}
+
+\setcounter{tocdepth}{2}
\tableofcontents
-\vspace{2.5\baselineskip}
-\begin{tip}
- Multi-language support, theorem-like environments, draft marks and some other features are provided by the \ProjLib{} toolkit. Here we only briefly discuss how to use it with this document class. For more detailed information, you can refer to the documentation of \ProjLib{}.
-\end{tip}
+\medskip
+\LevelOneTitle*{Before you start}
+\addcontentsline{toc}{section}{Before you start}
+In order to use the package or classes described here, you need to:
+\begin{itemize}
+ \item install TeX Live or MikTeX of the latest possible version, and make sure that \texttt{colorist} and \texttt{projlib} are correctly installed in your \TeX{} system.
+ \item be familiar with the basic usage of \LaTeX{}, and knows how to compile your document with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
+\end{itemize}
-\clearpage
-\section{Initialization}
-\subsection{How to load it}
+\LevelOneTitle{Usage and examples}
+
+\LevelTwoTitle{How to load it}
One only needs to put
+
\begin{code}
\documentclass{lebhart}
\end{code}
as the first line to use the \lebhart{} class. Please note that you need to use either \hologo{XeLaTeX} or \hologo{LuaLaTeX} engine to compile.
-\subsection{Options}
+\LevelTwoTitle{Example - A complete document}
+
+Let's first look at a complete document.
+
+\begin{code*}
+\documentclass{lebhart}
+\usepackage{ProjLib}
+
+\UseLanguage{French}
+
+\begin{document}
+
+\title{(*\meta{title}*)}
+\author{(*\meta{author}*)}
+\date{\PLdate{2022-04-01}}
+
+\maketitle
+
+\begin{abstract}
+ Ceci est un résumé. \dnf<Plus de contenu est nécessaire.>
+\end{abstract}
+\begin{keyword}
+ AAA, BBB, CCC, DDD, EEE
+\end{keyword}
+
+\section{Un théorème}
+
+\begin{theorem}\label{thm:abc}
+ Ceci est un théorème.
+\end{theorem}
+Référence du théorème: \cref{thm:abc}
+
+\end{document}
+\end{code*}
+
+
+If you find this example a little complicated, don't worry. Let's now look at this example piece by piece.
+
+\clearpage
+\LevelThreeTitle{Initialization}
+
+\medskip
+\begin{code}
+\documentclass{lebhart}
+\usepackage{ProjLib}
+\end{code}
+
+Initialization is straightforward. The first line loads the document class \lebhart{}, and the second line loads the \ProjLib{} toolkit to obtain some additional functionalities.
+
+\LevelThreeTitle{Set the language}
+
+\medskip
+\begin{code}
+\UseLanguage{French}
+\end{code}
+
+This line indicates that French will be used in the document (by the way, if only English appears in your article, then there is no need to set the language). You can also switch the language in the same way later in the middle of the text. Supported languages include Simplified Chinese, Traditional Chinese, Japanese, English, French, German, Spanish, Portuguese, Brazilian Portuguese and Russian%
+.%
+
+For detailed description of this command and more related commands, please refer to the section on the multi-language support.
+
+\LevelThreeTitle{Title, author information, abstract and keywords}
+
+\medskip
+\begin{code}
+\title{(*\meta{title}*)}
+\author{(*\meta{author}*)}
+\date{\PLdate{2022-04-01}}
+\maketitle
+
+\begin{abstract}
+ (*\meta{abstract}*)
+\end{abstract}
+\begin{keyword}
+ (*\meta{keywords}*)
+\end{keyword}
+\end{code}
+
+This part begins with the title and author information block. The example shows the basic usage, but in fact, you can also write:
+
+\begin{code}
+\author{(*\meta{author 1}*)}
+\address{(*\meta{address 1}*)}
+\email{(*\meta{email 1}*)}
+\author{(*\meta{author 2}*)}
+\address{(*\meta{address 2}*)}
+\email{(*\meta{email 2}*)}
+...
+\end{code}
+
+In addition, you may also write in the \AmS{} fashion, i.e.:
+
+\begin{code}
+\title{(*\meta{title}*)}
+\author{(*\meta{author 1}*)}
+\address{(*\meta{address 1}*)}
+\email{(*\meta{email 1}*)}
+\author{(*\meta{author 2}*)}
+\address{(*\meta{address 2}*)}
+\email{(*\meta{email 2}*)}
+\date{\PLdate{2022-04-01}}
+\subjclass{*****}
+\keywords{(*\meta{keywords}*)}
+
+\begin{abstract}
+ (*\meta{abstract}*)
+\end{abstract}
+
+\maketitle
+\end{code}
+
+\LevelThreeTitle{Draft marks}
+
+\medskip
+\begin{code}
+\dnf<(*\meta{some hint}*)>
+\end{code}
+
+When you have some places that have not yet been finished yet, you can mark them with this command, which is especially useful during the draft stage.
+
+\LevelThreeTitle{Theorem-like environments}
+
+\medskip
+\begin{code}
+\begin{theorem}\label{thm:abc}
+ Ceci est un théorème.
+\end{theorem}
+Référence du théorème: \cref{thm:abc}
+\end{code}
+
+Commonly used theorem-like environments have been pre-defined. Also, when referencing a theorem-like environment, it is recommended to use \lstinline|\cref{|\meta{label}\texttt{\}} --- in this way, there is no need to explicitly write down the name of the corresponding environment every time.
+
+\begin{tip}
+If you wish to switch to the standard class later, just replace the first two lines with:
+
+\begin{code}
+\documentclass{article}
+\usepackage[a4paper,margin=1in]{geometry}
+\usepackage[hidelinks]{hyperref}
+\usepackage[palatino,amsfashion]{ProjLib}
+\end{code}
+
+or to use the \AmS{} class:
+
+\begin{code}
+\documentclass{amsart}
+\usepackage[a4paper,margin=1in]{geometry}
+\usepackage[hidelinks]{hyperref}
+\usepackage[palatino]{ProjLib}
+\end{code}
+
+\end{tip}
+
+\begin{tip}
+If you like the current document class, but want a more ``plain'' style, then you can use the option \texttt{classical}, like this:
+
+\begin{code}
+\documentclass[classical]{lebhart}
+\end{code}
+\end{tip}
+
+
+\LevelOneTitle{On the default fonts}
+By default, \lebhart{} uses Palatino Linotype as the English font, FounderType's YouSong and YouHei GBK as the Chinese fonts\footnote{For detail, pleaser visit FounderType's website: \url{https://www.foundertype.com}.}, and partially uses Neo Euler as the math font. Among them, Neo Euler can be downloaded at \url{https://github.com/khaledhosny/euler-otf}. The other fonts are not free, you need to purchase and install them on your own.
+
+
+When the corresponding font is not installed, fonts that comes with TeX Live will be used instead. In this case, the experience might be reduced.
+
+\LevelOneTitle{The options}
-\lebhart{} offers the following options:
+\lebhart{} offers the following options:
\begin{itemize}
\item The language options \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French}, etc.
\begin{itemize}
\item For the option names of a specific language, please refer to \meta{language name} in the next section. The first specified language will be used as the default language.
+ \item The language options are optional, mainly for increasing the compilation speed. Without them the result would be the same, only slower.
\end{itemize}
\item \texttt{draft} or \texttt{fast}
\begin{itemize}
\item The option \verb|fast| enables a faster but slightly rougher style, main differences are:
\begin{itemize}
- \item Use simpler math font configuration;
- \item Do not use \textsf{hyperref};
+ \item Use simpler math font configuration;
+ \item Do not use \textsf{hyperref};
\item Enable the fast mode of \ProjLib{} toolkit.
\end{itemize}
\end{itemize}
-\begin{tip}
- During the draft stage, it is recommended to use the \verb|fast| option to speed up compilation. When in \verb|fast| mode, there will be a watermark ``DRAFT'' to indicate that you are currently in the draft mode.
-\end{tip}
-\medskip
+ \begin{tip}
+ During the draft stage, it is recommended to use the \verb|fast| option to speed up compilation. When in \verb|fast| mode, there will be a watermark ``DRAFT'' to indicate that you are currently in the draft mode.
+ \end{tip}
\item \texttt{a4paper} or \texttt{b5paper}
\begin{itemize}
- \item Optional paper size. The default paper size is 8.5in $\times$ 11in.
+ \item Paper size options. The default paper size is 8.5in $\times$ 11in.
\end{itemize}
\item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{biolinum} ~$|$~ \texttt{useosf}
\begin{itemize}
- \item Font options. As the name suggest, font with corresponding name will be loaded.
+ \item Font options. As the name suggest, font with corresponding name will be loaded.
\item The \texttt{useosf} option is used to enable the old-style figures.
\end{itemize}
\item \texttt{allowbf}
\begin{itemize}
- \item Allow boldface. When this option is enabled, the title, titles of all levels and names of theorem-like environments will be bolded.
+ \item Allow boldface. When this option is enabled, the main title, the titles of all levels and the names of theorem-like environments will be bolded.
\end{itemize}
\item \texttt{runin}
\begin{itemize}
@@ -167,26 +362,10 @@ as the first line to use the \lebhart{} class. Please note that you need to use
\end{itemize}
\end{itemize}
-\clearpage
-\section{On the default fonts}
-By default, \lebhart{} uses Palatino Linotype as the English font, FounderType's YouSong and YouHei GBK as the Chinese fonts, and partially uses Neo Euler as the math font. Among them, Neo Euler can be downloaded at \url{https://github.com/khaledhosny/euler-otf}. The other fonts are not free, you need to purchase and install them on your own. (For the Chinese fonts, visit FounderType's website for detail: \url{https://www.foundertype.com} ).
-\begin{tip}[Font demonstration]
- \begin{itemize}
- \item English main font. \textsf{English sans serif font}. \texttt{English typewriter font}.
- \item 中文主要字体,\textsf{中文无衬线字体}
- \item 数学示例: \( \alpha, \beta, \gamma, \delta, 1,2,3,4, a,b,c,d \), \[\mathrm{li}(x)\coloneqq \int_2^{\infty} \frac{1}{\log t}\,\mathrm{d}t \]
- \end{itemize}
-\end{tip}
+\LevelOneTitle{Instructions by topic}
-When the corresponding font is not installed, fonts that comes with TeX Live will be used instead. In this case, the experience might be reduced.
-
-\section{Some instructions}
-
-Many of the features described next are provided by the \ProjLib{} toolkit. Only the basic usage is mentioned here. For more details, please refer to its user documentation.
-
-\bigskip
-\subsection{Language configuration}
+\LevelTwoTitle{Language configuration}
\lebhart{} has multi-language support, including Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish. The language can be selected by the following macros:
@@ -210,8 +389,7 @@ Many of the features described next are provided by the \ProjLib{} toolkit. Only
\item Russian: \texttt{RU} or \texttt{Russian}
\end{itemize}
-% \medskip
-\clearpage
+\medskip
In addition, you can also add new settings to selected language:
\begin{itemize}
\item \lstinline|\AddLanguageSetting{|\meta{settings}\lstinline|}|
@@ -225,15 +403,13 @@ In addition, you can also add new settings to selected language:
\end{itemize}
For example, \lstinline|\AddLanguageSetting(German){\color{orange}}| can make all German text displayed in orange (of course, one then need to add \lstinline|\AddLanguageSetting{\color{black}}| in order to correct the color of the text in other languages).
-\bigskip
-\subsection{Theorems and how to reference them}
+\LevelTwoTitle{Theorems and how to reference them}
-Environments such as \texttt{definition} and \texttt{theorem} have been pre-defined and can be used directly.
+Environments such as \texttt{definition} and \texttt{theorem} have been preset and can be used directly.
-More specifically, preset environments include:
+More specifically, preset environments include:
\texttt{assumption}, \texttt{axiom}, \texttt{conjecture}, \texttt{convention}, \texttt{corollary}, \texttt{definition}, \texttt{definition-proposition}, \texttt{definition-theorem}, \texttt{example}, \texttt{exercise}, \texttt{fact}, \texttt{hypothesis}, \texttt{lemma}, \texttt{notation}, \texttt{observation}, \texttt{problem}, \texttt{property}, \texttt{proposition}, \texttt{question}, \texttt{remark}, \texttt{theorem}, and the corresponding unnumbered version with an asterisk \lstinline|*| in the name. The titles will change with the current language. For example, \texttt{theorem} will be displayed as ``Theorem" in English mode and ``Théorème" in French mode.
-\medskip
When referencing a theorem-like environment, it is recommended to use \lstinline|\cref{|\meta{label}\texttt{\}}. In this way, there is no need to explicitly write down the name of the corresponding environment every time.
\begin{tip}[Example]
@@ -243,12 +419,11 @@ When referencing a theorem-like environment, it is recommended to use \lstinline
will produce
\begin{definition}[Strange things]\label{def: strange}
- This is the definition of some strange objects.
+ This is the definition of some strange objects. There is approximately an one-line space before and after the theorem environment, and there will be a symbol to mark the end of the environment.
\end{definition}
\lstinline|\cref{def: strange}| will be displayed as: \cref{def: strange}.
-\medskip
After using \lstinline|\UseLanguage{French}|, a theorem will be displayed as:
\UseLanguage{French}
@@ -259,6 +434,7 @@ After using \lstinline|\UseLanguage{French}|, a theorem will be displayed as:
By default, when referenced, the name of the theorem always matches the language of the context in which the theorem is located. For example, the definition above is still displayed in English in the current French mode: \cref{def: strange} and \cref{thm}. If you want the name of the theorem to match the current context when referencing, you can add \texttt{regionalref} to the global options.
\end{tip}
+\UseLanguage{English}
\bigskip
The following are the main styles of theorem-like environments:
@@ -296,15 +472,13 @@ For aesthetics, adjacent definitions will be connected together automatically:
Second definition.
\end{definition}
-\UseLanguage{English}
-
-
-\subsection{Define a new theorem-like environment}
+\LevelTwoTitle{Define a new theorem-like environment}
If you need to define a new theorem-like environment, you must first define the name of the environment in the language to use:
\begin{itemize}
\item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
\end{itemize}
+\clearpage
For \meta{language name}, please refer to the section on language configuration. When \meta{language name} is not specified, the name will be set for all supported languages. In addition, environments with or without asterisk share the same name, therefore, \lstinline|\NameTheorem{envname*}{...}| has the same effect as \lstinline|\NameTheorem{envname}{...}| .
\medskip
@@ -324,7 +498,7 @@ And then define this environment in one of following five ways:
\end{itemize}
\item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
\begin{itemize}
- \item Define a numbered environment \meta{name of environment}, numbered within the \\counter \meta{numbered within}
+ \item Define a numbered environment \meta{name of environment}, numbered within the counter \meta{numbered within}
\end{itemize}
\item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
\lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
@@ -332,8 +506,8 @@ And then define this environment in one of following five ways:
\item Identify \meta{name of environment} with \meta{existed environment} or \meta{existed environment}\lstinline|*|.
\item This method is usually useful in the following two situations:
\begin{enumerate}
- \item To use a more concise name. For example, with \lstinline|\CreateTheorem{thm}|\\\lstinline|(theorem)|, one can then use the name \texttt{thm} to write theorem.
- \item To remove the numbering. For example, one can remove the numbering of the \texttt{remark} environment with \lstinline|\CreateTheorem{remark}(remark*)|.
+ \item To use a more concise name. For example, with \lstinline|\CreateTheorem{thm}(theorem)|, one can then use the name \texttt{thm} to write theorem.
+ \item To remove the numbering of some environments. For example, one can remove the numbering of the \texttt{remark} environment with \lstinline|\CreateTheorem{remark}(remark*)|.
\end{enumerate}
\end{itemize}
\end{itemize}
@@ -342,43 +516,44 @@ And then define this environment in one of following five ways:
This macro utilizes the feature of \textsf{amsthm} internally, so the traditional \texttt{theoremstyle} is also applicable to it. One only needs declare the style before the relevant definitions.
\end{tip}
-% \def\proofideanameEN{Idea}
\NameTheorem[EN]{proofidea}{Idea}
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<subsection>
-% \bigskip
-\clearpage
+\bigskip
Here is an example. The following code:
+
\begin{code}
\NameTheorem[EN]{proofidea}{Idea}
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<subsection>
\end{code}
-defines an unnumbered environment \lstinline|proofidea*| and a numbered environment \lstinline|proofidea| (numbered within subsection) respectively. They can be used in English context. The effect is as follows:
+defines an unnumbered environment \lstinline|proofidea*| and a numbered environment \lstinline|proofidea| (numbered within subsection) respectively. They can be used in English context.
+The effect is as follows:
+\vspace{-0.3\baselineskip}
\begin{proofidea*}
The \lstinline|proofidea*| environment.
\end{proofidea*}
+\vspace{-\baselineskip}
\begin{proofidea}
The \lstinline|proofidea| environment.
\end{proofidea}
-\medskip
-\subsection{Draft mark}
+\LevelTwoTitle{Draft mark}
You can use \lstinline|\dnf| to mark the unfinished part. For example:
\begin{itemize}
\item \lstinline|\dnf| or \lstinline|\dnf<...>|. The effect is: \dnf~ or \dnf<...>. \\The prompt text changes according to the current language. For example, it will be displayed as \UseOtherLanguage{French}{\dnf} in French mode.
\end{itemize}
-Similarly, there is \lstinline|\needgraph| :
+Similarly, there is \lstinline|\needgraph| :
\begin{itemize}
\item \lstinline|\needgraph| or \lstinline|\needgraph<...>|. The effect is: \needgraph or \needgraph<...>The prompt text changes according to the current language. For example, in French mode, it will be displayed as \UseOtherLanguage{French}{\needgraph}
\end{itemize}
-\subsection{On the title, abstract and keywords}
+\LevelTwoTitle{Title, abstract and keywords}
\lebhart{} has both the features of standard classes and that of the \AmS{} classes.
@@ -396,7 +571,7 @@ Therefore, the title part can either be written in the usual way, in accordance
(*\meta{keywords}*)
\end{keyword}
\end{code}
-\clearpage
+
or written in the way of \AmS{} classes:
\begin{code}
@@ -414,7 +589,6 @@ or written in the way of \AmS{} classes:
\maketitle
\end{code}
-\medskip
The author information can contain multiple groups, written as:
\begin{code}
@@ -429,117 +603,17 @@ The author information can contain multiple groups, written as:
Among them, the mutual order of \lstinline|\address|, \lstinline|\curraddr|, \lstinline|\email| is not important.
-
-\section{Known issues}
+\LevelOneTitle{Known issues}
\begin{itemize}[itemsep=.6em]
\item The font settings are still not perfect.
- \item Since many features are based on the \ProjLib{} toolkit, \lebhart{} inherits all its problems. For details, please refer to the "Known Issues" section of the \ProjLib{} documentation.
+ \item Since many features are based on the \ProjLib{} toolkit, \colorist{} (and hence \colorart{}, \lebhart{} and \colorbook{}, \beaulivre{}) inherits all its problems. For details, please refer to the ``Known Issues'' section of the \ProjLib{} documentation.
\item The error handling mechanism is incomplete: there is no corresponding error prompt when some problems occur.
\item There are still many things that can be optimized in the code.
\end{itemize}
-\clearpage
-\section{Document templates}
-
-\subsection{The standard way}
-
-If you want to write in the standard way, you can refer to the following example:
-
-\begin{code}
-\documentclass{lebhart}
-\usepackage{ProjLib} % Load ProjLib toolkit
-
-\UseLanguage{French} % Use French from here
-
-\begin{document}
-
-\title{Le Titre}
-\author{Auteur}
-\date{\PLdate{2022-04-01}}
-
-\maketitle
-
-\begin{abstract}
- Ceci est un résumé. \dnf<Plus de contenu est nécessaire.>
-\end{abstract}
-\begin{keyword}
- AAA, BBB, CCC, DDD, EEE
-\end{keyword}
-
-\section{Un théorème}
-
-%% Theorem-like environments can be used directly
-\begin{theorem}\label{thm:abc}
- Ceci est un théorème.
-\end{theorem}
-
-Référence du théorème: \cref{thm:abc}
- % It is recommended to use clever reference
-
-\end{document}
-\end{code}
-
-If you wish to switch to the standard class later, just replace the first two lines with:
-
-\begin{code}
-\documentclass{article}
-\usepackage[a4paper,margin=1in]{geometry}
-\usepackage[hidelinks]{hyperref}
-\usepackage[palatino]{ProjLib} % Load ProjLib toolkit
-\end{code}
-
-
-\clearpage
-\subsection{The \texorpdfstring{\AmS{}}{AMS} way}
-
-If you intend to switch to the journal template in the future and thus want to use the writing style as in the \AmS{} classes, you can refer to the following example:
-
-\begin{code}
-\documentclass{lebhart}
-\usepackage{ProjLib} % Load ProjLib toolkit
-
-\UseLanguage{French} % Use French from here
-
-\begin{document}
-
-\title{Le Titre}
-\author{Auteur 1}
-\address{Adresse 1}
-\email{\href{Courriel 1}{Courriel 1}}
-\author{Auteur 1}
-\address{Adresse 1}
-\email{\href{Courriel 2}{Courriel 2}}
-\date{\PLdate{2022-04-01}}
-\subjclass{*****}
-\keywords{...}
-
-\begin{abstract}
- Ceci est un résumé. \dnf<Plus de contenu est nécessaire.>
-\end{abstract}
-
-\maketitle
-
-\section{Première section}
-
-%% Theorem-like environments can be used directly
-\begin{theorem}\label{thm:abc}
- Ceci est un théorème.
-\end{theorem}
-
-Référence du théorème: \cref{thm:abc}
- % It is recommended to use clever reference
-
-\end{document}
-\end{code}
-
-In this way, if you wish to switch to \AmS{} class later, just replace the first two lines with:
-
-\begin{code}
-\documentclass{amsart}
-\usepackage[a4paper,margin=1in]{geometry}
-\usepackage[hidelinks]{hyperref}
-\usepackage[palatino]{ProjLib} % Load ProjLib toolkit
-\end{code}
\end{document}
+\endinput
+%%
+%% End of file `lebhart/lebhart-doc-en.tex'.
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdf b/macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdf
new file mode 100644
index 0000000000..0f03ba0c28
--- /dev/null
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-fr.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex b/macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex
new file mode 100644
index 0000000000..77f97b8008
--- /dev/null
+++ b/macros/unicodetex/latex/lebhart/lebhart-doc-fr.tex
@@ -0,0 +1,616 @@
+\documentclass[English,Chinese,French,allowbf,puretext]{lebhart}
+
+\theoremstyle{basic}
+\CreateTheorem{definition}<highest>
+\CreateTheorem{theorem}[definition]
+\CreateTheorem{conjecture}[definition]
+\CreateTheorem*{example*}
+\CreateTheorem{problem}[definition]
+
+\theoremstyle{emphasis}
+\CreateTheorem{remark}<highest>
+
+\theoremstyle{simple}
+
+%%================================
+%% Import toolkit
+%%================================
+\usepackage{ProjLib}
+\usepackage{longtable} % breakable tables
+\usepackage{hologo} % more TeX logo
+\usetikzlibrary{calc}
+
+\usepackage{blindtext}
+
+\UseLanguage{French}
+
+%%================================
+%% For typesetting code
+%%================================
+\usepackage{listings}
+\definecolor{maintheme}{RGB}{70,130,180}
+\definecolor{forestgreen}{RGB}{21,122,81}
+\definecolor{lightergray}{gray}{0.99}
+\lstset{language=[LaTeX]TeX,
+ keywordstyle=\color{maintheme},
+ basicstyle=\ttfamily,
+ commentstyle=\color{forestgreen}\ttfamily,
+ stringstyle=\rmfamily,
+ showstringspaces=false,
+ breaklines=true,
+ frame=lines,
+ backgroundcolor=\color{lightergray},
+ flexiblecolumns=true,
+ escapeinside={(*}{*)},
+ % numbers=left,
+ numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
+ % firstnumber=last,
+}
+\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
+\lstset{moretexcs=%
+ {part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
+ color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
+ }
+}
+\lstnewenvironment{code}%
+{\setstretch{1.07}%
+\setkeys{lst}{columns=fullflexible,keepspaces=true}%
+}{}
+\lstnewenvironment{code*}%
+{\setstretch{1.07}%
+\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
+}{}
+
+%%================================
+%% tip
+%%================================
+\usepackage[many]{tcolorbox}
+\newenvironment{tip}[1][Astuce]{%
+ \begin{tcolorbox}[breakable,
+ enhanced,
+ width = \textwidth,
+ colback = paper, colbacktitle = paper,
+ colframe = gray!50, boxrule=0.2mm,
+ coltitle = black,
+ fonttitle = \sffamily,
+ attach boxed title to top left = {yshift=-\tcboxedtitleheight/2, xshift=.5cm},
+ boxed title style = {boxrule=0pt, colframe=paper},
+ before skip = 0.3cm,
+ after skip = 0.3cm,
+ top = 3mm,
+ bottom = 3mm,
+ title={\scshape\sffamily #1}]%
+}{\end{tcolorbox}}
+
+%%================================
+%% Names
+%%================================
+\providecommand{\colorist}{\textsf{colorist}}
+\providecommand{\colorart}{\textsf{colorart}}
+\providecommand{\colorbook}{\textsf{colorbook}}
+\providecommand{\lebhart}{\textsf{lebhart}}
+\providecommand{\beaulivre}{\textsf{beaulivre}}
+
+%%================================
+%% Titles
+%%================================
+\let\LevelOneTitle\section
+\let\LevelTwoTitle\subsection
+\let\LevelThreeTitle\subsubsection
+
+%%================================
+%% Main text
+%%================================
+\begin{document}
+
+\title{\lebhart{}, écrivez vos articles de manière colorée}
+\author{Jinwen XU}
+\thanks{Correspondant à : \texttt{\lebhart{} 2021/07/15}}
+\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
+\date{juillet 2021, à Pékin}
+
+\maketitle
+
+\begin{abstract}
+ \lebhart{} fait partie de la série de classes \colorist{}, dont le nom est tiré du mot allemand « lebhaft » (animé), combiné avec les trois premières lettres de « artikel » (article) . L'ensemble de la collection comprend \colorart{} et \lebhart{} pour la composition d'articles, et \colorbook{} et \beaulivre{} pour celle des livres. Mon intention initiale en les concevant était d'écrire des brouillons et des notes qui ont l'air coloré mais pas éblouissant.
+
+ \lebhart{} prend en charge plusieurs langues, notamment le chinois (simplifié et traditionnel), l'anglais, le français, l'allemand, l'italien, le japonais, le portugais (européen et brésilien), le russe et l'espagnol. Ces langues peuvent être commutées de manière transparente dans un seul document. En raison de l'utilisation de polices personnalisées, \lebhart{} demande soit \hologo{XeLaTeX} soit \hologo{LuaLaTeX} pour la compilation.
+
+ Cette documentation est composée à l'aide de \lebhart{} (avec l'option \texttt{allowbf}). Vous pouvez le considérer comme une courte introduction et une démonstration.
+\end{abstract}
+
+
+\setcounter{tocdepth}{2}
+\tableofcontents
+
+
+\LevelOneTitle*{Avant de commencer}
+\addcontentsline{toc}{section}{Avant de commencer}
+
+Pour utiliser les classes de documents décrites ici, vous devez :
+\begin{itemize}
+ \item installer TeX Live ou MikTeX de la dernière version possible, et vous assurer que \texttt{colorist} et \texttt{projlib} sont correctement installés dans votre système \TeX{}.
+ \item être familiarisé avec l'utilisation de base de \LaTeX{}, et savoir comment compiler vos documents avec \hologo{pdfLaTeX}, \hologo{XeLaTeX} ou \hologo{LuaLaTeX}.
+\end{itemize}
+
+
+\LevelOneTitle{Utilisation et exemples}
+
+\LevelTwoTitle{Comment l'ajouter}
+
+Il suffit simplement de mettre
+
+\begin{code}
+ \documentclass{lebhart}
+\end{code}
+
+comme première ligne pour utiliser la classe \lebhart{}. Veuillez noter que vous devez utiliser le moteur \hologo{XeLaTeX} ou \hologo{LuaLaTeX} pour compiler.
+
+\LevelTwoTitle{Exemple - Un document complet}
+
+Regardons d'abord un document complet.
+
+\begin{code*}
+\documentclass{lebhart}
+\usepackage{ProjLib}
+
+\UseLanguage{French}
+
+\begin{document}
+
+\title{(*\meta{title}*)}
+\author{(*\meta{author}*)}
+\date{\PLdate{2022-04-01}}
+
+\maketitle
+
+\begin{abstract}
+ Ceci est un résumé. \dnf<Plus de contenu est nécessaire.>
+\end{abstract}
+\begin{keyword}
+ AAA, BBB, CCC, DDD, EEE
+\end{keyword}
+
+\section{Un théorème}
+
+\begin{theorem}\label{thm:abc}
+ Ceci est un théorème.
+\end{theorem}
+Référence du théorème: \cref{thm:abc}
+
+\end{document}
+\end{code*}
+
+
+Si vous trouvez cela un peu compliqué, ne vous inquiétez pas. Examinons maintenant cet exemple pièce par pièce.
+
+\clearpage
+\LevelThreeTitle{Initialisation}
+
+\medskip
+\begin{code}
+\documentclass{lebhart}
+\usepackage{ProjLib}
+\end{code}
+
+L'initialisation est simple. La première ligne ajoute la classe de document \lebhart{}, et la deuxième ligne ajoute la boîte à outils \ProjLib{} pour obtenir des fonctionnalités supplémentaires.
+
+\LevelThreeTitle{Choisir la langue}
+
+\medskip
+\begin{code}
+\UseLanguage{French}
+\end{code}
+
+Cette ligne indique que le français sera utilisé dans le document (d'ailleurs, si seul l'anglais apparaît dans votre article, alors il n'est pas nécessaire de choisir la langue). Vous pouvez également changer de langue de la même manière plus tard au milieu du texte. Les langues prises en charge sont les suivantes : chinois simplifié, chinois traditionnel, japonais, anglais, français, allemand, espagnol, portugais, portugais brésilien et russe.
+
+Pour une description détaillée de cette commande et d'autres commandes associées, veuillez vous référer à la section sur le support multilingue.
+
+\LevelThreeTitle{Titre, informations sur l'auteur, résumé et mots-clés}
+
+\medskip
+\begin{code}
+\title{(*\meta{title}*)}
+\author{(*\meta{author}*)}
+\date{\PLdate{2022-04-01}}
+\maketitle
+
+\begin{abstract}
+ (*\meta{abstract}*)
+\end{abstract}
+\begin{keyword}
+ (*\meta{keywords}*)
+\end{keyword}
+\end{code}
+
+Cette partie commence par le titre et le bloc d'informations sur l'auteur. L'exemple montre l'utilisation de base, mais en fait, vous pouvez également écrire comme :
+
+\begin{code}
+\author{(*\meta{author 1}*)}
+\address{(*\meta{address 1}*)}
+\email{(*\meta{email 1}*)}
+\author{(*\meta{author 2}*)}
+\address{(*\meta{address 2}*)}
+\email{(*\meta{email 2}*)}
+...
+\end{code}
+
+De plus, vous pouvez également écrire à la manière \AmS{}, c'est-à-dire :
+
+\begin{code}
+\title{(*\meta{title}*)}
+\author{(*\meta{author 1}*)}
+\address{(*\meta{address 1}*)}
+\email{(*\meta{email 1}*)}
+\author{(*\meta{author 2}*)}
+\address{(*\meta{address 2}*)}
+\email{(*\meta{email 2}*)}
+\date{\PLdate{2022-04-01}}
+\subjclass{*****}
+\keywords{(*\meta{keywords}*)}
+
+\begin{abstract}
+ (*\meta{abstract}*)
+\end{abstract}
+
+\maketitle
+\end{code}
+
+\LevelThreeTitle{Marques de brouillon}
+
+\medskip
+\begin{code}
+\dnf<(*\meta{some hint}*)>
+\end{code}
+Lorsque vous avez des endroits qui ne sont pas encore finis, vous pouvez les marquer avec cette commande, ce qui est particulièrement utile lors de la phase de brouillon.
+
+\LevelThreeTitle{Environnements de type théorème}
+
+\medskip
+\begin{code}
+\begin{theorem}\label{thm:abc}
+ Ceci est un théorème.
+\end{theorem}
+Référence du théorème: \cref{thm:abc}
+\end{code}
+
+Les environnements de type théorème couramment utilisés ont été prédéfinis. De plus, lors du référencement d'un environnement de type théorème, il est recommandé d'utiliser \lstinline|\cref{|\meta{label}\texttt{\}} --- de cette manière, il ne serait pas nécessaire d'écrire explicitement le nom de l'environnement correspondant à chaque fois.
+
+\begin{tip}
+Si vous souhaitez utiliser la classe standard à la place plus tard, remplacez simplement les deux premières lignes par :
+
+\begin{code}
+\documentclass{article}
+\usepackage[a4paper,margin=1in]{geometry}
+\usepackage[hidelinks]{hyperref}
+\usepackage[palatino,amsfashion]{ProjLib}
+\end{code}
+
+ou utilisez la classe \AmS{} :
+
+\begin{code}
+\documentclass{amsart}
+\usepackage[a4paper,margin=1in]{geometry}
+\usepackage[hidelinks]{hyperref}
+\usepackage[palatino]{ProjLib}
+\end{code}
+\vspace{-.5\baselineskip}
+\end{tip}
+
+\begin{tip}
+Si vous aimez la classe de document actuelle, mais que vous souhaitez un style plus « simple », vous pouvez utiliser l'option \texttt{classical}, comme ceci :
+
+\begin{code}
+\documentclass[classical]{lebhart}
+\end{code}
+\vspace{-.5\baselineskip}
+\end{tip}
+
+
+\LevelOneTitle{À propos des polices par défaut}
+Par défaut, cette classe de document utilise Palatino Linotype comme police anglaise, YouSong et YouHei GBK de FounderType comme polices chinoises\footnote{Pour plus de détails, veuillez visiter le site web de FounderType : \url{https://www.foundertype.com}.}, et utilise partiellement Neo Euler comme police mathématique. Parmi eux, Neo Euler peut être téléchargé sur \url{https://github.com/khaledhosny/euler-otf}. Les autres polices ne sont pas gratuites, vous devez les acheter et les installer vous-même.
+
+
+Lorsque la police correspondante n'est pas installée, les polices fournies avec TeX Live seront utilisées à la place. Dans ce cas, l'expérience peut être réduite.
+
+
+\LevelOneTitle{Les options}
+
+
+\begin{itemize}
+ \item Les options de langue \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French}, etc.
+ \begin{itemize}
+ \item Pour les noms d'options d'une langue spécifique, veuillez vous référer à \meta{language name} dans la section suivante. La première langue spécifiée sera considérée comme la langue par défaut.
+ \item Les options de langue ne sont pas nécessaires, elles servent principalement à augmenter la vitesse de compilation. Sans eux, le résultat serait le même, justement plus lent.
+ \end{itemize}
+ \item \texttt{draft} ou \texttt{fast}
+ \begin{itemize}
+ \item L'option \verb|fast| permet un style plus rapide mais légèrement plus rugueux, les principales différences sont :
+ \begin{itemize}
+ \item Utilisez une configuration de police mathématique plus simple ;
+ \item N'utilisez pas \textsf{hyperref} ;
+ \item Activez le mode rapide de la boîte à outils \ProjLib{}.
+ \end{itemize}
+ \end{itemize}
+ \begin{tip}
+ Pendant la phase de brouillon, il est recommandé d'utiliser le \verb|fast| option pour accélérer la compilation. Quand dans \verb|fast| mode, il y aura un filigrane ``DRAFT'' pour indiquer que vous êtes actuellement en mode brouillon.
+ \end{tip}
+ \item \texttt{a4paper} ou \texttt{b5paper}
+ \begin{itemize}
+ \item Options de format de papier. Le format de papier par défaut est 8.5 pouces $\times$ 11 pouces.
+ \end{itemize}
+ \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{biolinum} ~$|$~ \texttt{useosf}
+ \begin{itemize}
+ \item Options de police. Comme son nom l'indique, la police avec le nom correspondant sera utilisée.
+ \item L'option \texttt{useosf} est pour activer les chiffres à l'ancienne.
+ \end{itemize}
+ \item \texttt{allowbf}
+ \begin{itemize}
+ \item Pour activer les titres en gras. Lorsque cette option est utilisée, le titre principal, les titres de tous les niveaux et les noms des environnements de type théorème seront en gras.
+ \end{itemize}
+ \item \texttt{runin}
+ \begin{itemize}
+ \item Utilisez le style « runin » pour \lstinline|\subsubsection|
+ \end{itemize}
+ \item \texttt{puretext} ou \texttt{nothms}
+ \begin{itemize}
+ \item Mode texte pur. Ne pas définir les environnements de type théorème.
+ \end{itemize}
+ \item \texttt{nothmnum}
+ \begin{itemize}
+ \item Ne pas numéroter les environnements de type théorème.
+ \end{itemize}
+\end{itemize}
+
+\LevelOneTitle{Instructions par sujet}
+
+\LevelTwoTitle{Configurer la langue}
+
+\lebhart{} prend en charge plusieurs langues, notamment le chinois (simplifié et traditionnel), l'anglais, le français, l'allemand, l'italien, le japonais, le portugais (européen et brésilien), le russe et l'espagnol. La langue peut être sélectionnée par les macros suivantes :
+
+\begin{itemize}
+ \item \lstinline|\UseLanguage{|\meta{language name}\lstinline|}| est utilisé pour spécifier la langue. Le réglage correspondant de la langue sera appliqué après celui-ci. Il peut être utilisé soit dans le préambule ou dans le texte. Lorsqu'aucune langue n'est spécifiée, « English » est sélectionné par défaut.
+ \item \lstinline|\UseOtherLanguage{|\meta{language name}\lstinline|}{|\meta{content}\lstinline|}|, qui utilise les paramètres de langue spécifiés pour composer \meta{content}. Par rapport à \lstinline|\UseLanguage|, il ne modifiera pas l'interligne, donc l'interligne restera stable lorsque le texte CJK et occidental sont mélangés.
+\end{itemize}
+
+
+\meta{language name} peut être (il n'est pas sensible à la casse, par exemple, \texttt{French} et \texttt{french} ont le même effet) :
+\begin{itemize}
+ \item chinois simplifié : \texttt{CN}, \texttt{Chinese}, \texttt{SChinese} ou \texttt{SimplifiedChinese}
+ \item chinois traditionnel : \texttt{TC}, \texttt{TChinese} ou \texttt{TraditionalChinese}
+ \item anglais : \texttt{EN} ou \texttt{English}
+ \item français : \texttt{FR} ou \texttt{French}
+ \item allemand : \texttt{DE}, \texttt{German} ou \texttt{ngerman}
+ \item italien : \texttt{IT} ou \texttt{Italian}
+ \item portugais : \texttt{PT} ou \texttt{Portuguese}
+ \item portugais (brésilien) : \texttt{BR} ou \texttt{Brazilian}
+ \item espagnol : \texttt{ES} ou \texttt{Spanish}
+ \item japonais : \texttt{JP} ou \texttt{Japanese}
+ \item russe : \texttt{RU} ou \texttt{Russian}
+\end{itemize}
+
+\medskip
+De plus, vous pouvez également ajouter de nouveaux paramètres à la langue sélectionnée :
+\begin{itemize}
+ \item \lstinline|\AddLanguageSetting{|\meta{settings}\lstinline|}|
+ \begin{itemize}
+ \item Ajoutez \meta{settings} à toutes les langues prises en charge.
+ \end{itemize}
+ \item \lstinline|\AddLanguageSetting(|\meta{language name}\lstinline|){|\meta{settings}\lstinline|}|
+ \begin{itemize}
+ \item Ajoutez \meta{settings} à la langue \meta{language name} sélectionnée.
+ \end{itemize}
+\end{itemize}
+Par exemple, \lstinline|\AddLanguageSetting(German){\color{orange}}| peut rendre tout le texte allemand affiché en orange (bien sûr, il faut alors ajouter \lstinline|\AddLanguageSetting{\color{black}}| afin de corriger la couleur du texte dans d'autres langues).
+
+\LevelTwoTitle{Théorèmes et comment les référencer}
+
+Des environnements tels que \texttt{definition} et \texttt{theorem} ont été prédéfinis et peuvent être utilisés directement.
+
+Plus précisement, les environnements prédéfinis incluent : \texttt{assumption}, \texttt{axiom}, \texttt{conjecture}, \texttt{convention}, \texttt{corollary}, \texttt{definition}, \texttt{definition-proposition}, \texttt{definition-theorem}, \texttt{example}, \texttt{exercise}, \texttt{fact}, \texttt{hypothesis}, \texttt{lemma}, \texttt{notation}, \texttt{observation}, \texttt{problem}, \texttt{property}, \texttt{proposition}, \texttt{question}, \texttt{remark}, \texttt{theorem}, et la version non numérotée correspondante avec un astérisque \lstinline|*| dans le nom. Les titres changeront avec la langue actuelle. Par exemple, \texttt{theorem} sera affiché comme « Theorem » en mode anglais et « Théorème » en mode français.
+
+Lors du référencement d'un environnement de type théorème, il est recommandé d'utiliser \lstinline|\cref{|\meta{label}\texttt{\}}. De cette façon, il n'est pas nécessaire d'écrire explicitement le nom de l'environnement correspondant à chaque fois.
+
+\begin{tip}[Exemple]
+\begin{code}
+ \begin{definition}[Des choses étranges] \label{def: strange} ...
+\end{code}
+
+will produce
+\begin{definition}[Des choses étranges]\label{def: strange}
+ C'est la définition de certains objets étranges. Il y a approximativement un espace d'une ligne avant et après l'environnement de type théorème, et il y aura un symbole pour marquer la fin de l'environnement.
+\end{definition}
+
+\lstinline|\cref{def: strange}| s'affichera sous la forme : \cref{def: strange}.
+
+Après avoir utilisé \lstinline|\UseLanguage{French}|, un théorème s'affichera sous la forme :
+
+\UseLanguage{English}
+\begin{theorem}[Useless]\label{thm}
+ A theorem in English.
+\end{theorem}
+
+Par défaut, lorsqu'il est référencé, le nom de l'environnement de type théorème correspond toujours à la langue du contexte dans lequel se trouve l'environnement. Par exemple, la définition ci-dessus est toujours affichée en français dans le mode anglais courant : \cref{def: strange} et \cref{thm}. Si vous voulez que le nom du théorème corresponde au contexte actuel lors du référencement, vous pouvez ajouter \texttt{regionalref} aux options globales.
+\end{tip}
+
+\UseLanguage{French}
+
+\bigskip
+Voici les principaux styles d'environnements de type théorème :
+\begin{theorem}
+ Style de théorème : theorem, proposition, lemma, corollary, ...
+\end{theorem}
+
+\begin{proof}
+ Style d'épreuve
+\end{proof}
+
+\begin{remark}
+ Style de remarque
+\end{remark}
+
+\begin{conjecture}
+ Style de conjecture
+\end{conjecture}
+
+\begin{example*}
+ Style d'exemple : example, fact, ...
+\end{example*}
+
+\begin{problem}
+ Style de problème : problem, question, ...
+\end{problem}
+
+\medskip
+Pour l'esthétique, les définitions adjacentes seront reliées entre elles automatiquement :
+\begin{definition}
+ Première définition.
+\end{definition}
+
+\begin{definition}
+ Deuxième définition.
+\end{definition}
+
+\LevelTwoTitle{Définir un nouvel environnement de type théorème}
+
+Si vous avez besoin de définir un nouvel environnement de type théorème, vous devez d'abord définir le nom de l'environnement dans le langage à utiliser :
+\begin{itemize}
+ \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
+\end{itemize}
+Pour \meta{language name}, veuillez vous référer à la section sur la configuration de la langue. Lorsqu'il n'est pas spécifié, le nom sera défini pour toutes les langues prises en charge. De plus, les environnements avec ou sans astérisque partagent le même nom, donc \lstinline|\NameTheorem{envname*}{...}| a le même effet que \lstinline|\NameTheorem{envname}{...}| .
+
+\medskip
+Ensuite, créez cet environnement de l'une des cinq manières suivantes :
+\begin{itemize}
+ \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
+ \begin{itemize}
+ \item Définir un environnement non numéroté \meta{name of environment}
+ \end{itemize}
+ \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
+ \begin{itemize}
+ \item Définir un environnement numéroté \meta{name of environment}, numéroté dans l'ordre 1, 2, 3, \dots
+ \end{itemize}
+ \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
+ \begin{itemize}
+ \item Définir un environnement numéroté \meta{name of environment}, qui partage le compteur \meta{numbered like}
+ \end{itemize}
+ \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
+ \begin{itemize}
+ \item Définir un environnement numéroté \meta{name of environment}, numéroté dans le compteur \meta{numbered within}
+ \end{itemize}
+ \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
+ \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
+ \begin{itemize}
+ \item Identifiez \meta{name of environment} avec \meta{existed environment} ou \meta{existed environment}\lstinline|*|.
+ \item Cette méthode est généralement utile dans les deux situations suivantes :
+ \begin{enumerate}
+ \item Pour utiliser un nom plus concis. Par exemple, avec \lstinline|\CreateTheorem{thm}(theorem)|, on peut alors utiliser le nom \texttt{thm} pour écrire le théorème.
+ \item Pour supprimer la numérotation de certains environnements. Par exemple, on peut supprimer la numérotation de l'environnement \texttt{remark} avec \lstinline|\CreateTheorem{remark}(remark*)|.
+ \end{enumerate}
+ \end{itemize}
+\end{itemize}
+
+\begin{tip}
+ Cette macro utilise la fonctionnalité de \textsf{amsthm} en interne, donc le traditionnel \texttt{theoremstyle} lui est également applicable. Il suffit de déclarer le style avant les définitions pertinentes.
+\end{tip}
+
+\NameTheorem[FR]{proofidea}{Idée}
+\CreateTheorem*{proofidea*}
+\CreateTheorem{proofidea}<subsection>
+
+\bigskip
+Voici un exemple. Le code suivant :
+
+\begin{code}
+ \NameTheorem[FR]{proofidea}{Idée}
+ \CreateTheorem*{proofidea*}
+ \CreateTheorem{proofidea}<subsection>
+\end{code}
+définit un environnement non numéroté \lstinline|proofidea*| et un environnement numéroté \lstinline|proofidea| (numérotés dans la sous-section) respectivement. Ils peuvent être utilisés dans le contexte français. L'effet est le suivant :
+
+\vspace{-0.3\baselineskip}
+\begin{proofidea*}
+ La environnement \lstinline|proofidea*| .
+\end{proofidea*}
+
+\vspace{-\baselineskip}
+\begin{proofidea}
+ La environnement \lstinline|proofidea| .
+\end{proofidea}
+
+\LevelTwoTitle{Draft mark}
+
+Vous pouvez utiliser \lstinline|\dnf| pour marquer la partie inachevée. Par example :
+\begin{itemize}
+ \item \lstinline|\dnf| ou \lstinline|\dnf<...>|. L'effet est : \dnf~ ou \dnf<...>. \\Le texte à l'intérieur changera en fonction de la langue actuelle. Par exemple, il sera affiché sous la forme \UseOtherLanguage{English}{\dnf} en mode anglais.
+\end{itemize}
+
+De même, il y a aussi \lstinline|\needgraph| :
+\begin{itemize}
+ \item \lstinline|\needgraph| ou \lstinline|\needgraph<...>|. L'effet est : \needgraph ou \needgraph<...>Le texte de l'invite change en fonction de la langue actuelle. Par exemple, en mode anglais, il sera affiché sous la forme \UseOtherLanguage{English}{\needgraph}
+\end{itemize}
+
+\LevelTwoTitle{Titre, résumé et mots-clés}
+
+\lebhart{} possède à la fois les caractéristiques des classes standard et celles des classes \AmS{}.
+
+Par conséquent, le titre et les informations sur l'auteur peuvent être soit écrits de la manière habituelle, conformément à la classe standard \textsf{article} :
+
+\begin{code}
+ \title{(*\meta{title}*)}
+ \author{(*\meta{author}*)\thanks{(*\meta{text}*)}}
+ \date{(*\meta{date}*)}
+ \maketitle
+ \begin{abstract}
+ (*\meta{abstract}*)
+ \end{abstract}
+ \begin{keyword}
+ (*\meta{keywords}*)
+ \end{keyword}
+\end{code}
+
+ou écrit à la manière des classes \AmS{} :
+
+\begin{code}
+ \title{(*\meta{title}*)}
+ \author{(*\meta{author}*)}
+ \thanks{(*\meta{text}*)}
+ \address{(*\meta{address}*)}
+ \email{(*\meta{email}*)}
+ \date{(*\meta{date}*)}
+ \keywords{(*\meta{keywords}*)}
+ \subjclass{(*\meta{subjclass}*)}
+ \begin{abstract}
+ (*\meta{abstract}*)
+ \end{abstract}
+ \maketitle
+\end{code}
+
+Les informations sur l'auteur peuvent contenir plusieurs groupes, écrits comme suit :
+
+\begin{code}
+ \author{(*\meta{author 1}*)}
+ \address{(*\meta{address 1}*)}
+ \email{(*\meta{email 1}*)}
+ \author{(*\meta{author 2}*)}
+ \address{(*\meta{address 2}*)}
+ \email{(*\meta{email 2}*)}
+ ...
+\end{code}
+
+Parmi eux, l'ordre mutuel de \lstinline|\address|, \lstinline|\curraddr|, \lstinline|\email| n'est pas important.
+
+\LevelOneTitle{Problèmes connus}
+
+\begin{itemize}[itemsep=.6em]
+ \item Les paramètres de police ne sont pas encore parfaits.
+ \item Comme de nombreuses fonctionnalités sont basées sur la boîte à outils \ProjLib{}, \colorist{} (et donc \colorart{}, \lebhart{} et \colorbook{}, \beaulivre{}) hérite de tous ses problèmes. Pour plus de détails, veuillez vous référer à la section « Problèmes connus » de la documentation de \ProjLib{}.
+ \item Le mécanisme de gestion des erreurs est incomplet : pas de messages correspondants lorsque certains problèmes surviennent.
+ \item Il y a encore beaucoup de choses qui peuvent être optimisées dans le code.
+\end{itemize}
+
+
+\end{document}
+\endinput
+%%
+%% End of file `lebhart/lebhart-doc-fr.tex'.
diff --git a/macros/unicodetex/latex/lebhart/lebhart.cls b/macros/unicodetex/latex/lebhart/lebhart.cls
index 29a4088e80..4221ba16be 100644
--- a/macros/unicodetex/latex/lebhart/lebhart.cls
+++ b/macros/unicodetex/latex/lebhart/lebhart.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{lebhart}
- [2021/06/30 A colorful article style]
+ [2021/07/15 A colorful article style]
\def\colorclass@baseclass{article}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -42,6 +42,7 @@
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{\colorclass@baseclass}}
\ProcessKeyvalOptions*\relax
\LoadClass{\colorclass@baseclass}
+
\if@colorclass@draft
\@colorclass@fasttrue
\fi
@@ -97,19 +98,18 @@
\RequirePackage{draftwatermark}
\DraftwatermarkOptions{text={\normalfont DRAFT},color=paper!95!-paper}
\fi
+
\RequirePackage{colorist}
%%================================
%% Fonts
%%================================
-%% Math fonts in fast mode
\if@colorclass@customfont\else
\if@colorclass@fast
\RequirePackage{mathpazo}
\fi
\fi
-%% English fonts
\PassOptionsToPackage{no-math}{fontspec}
\RequirePackage{fontspec}
\IfFontExistsTF{Palatino Linotype}{%
@@ -133,7 +133,6 @@
ItalicFont = cmunst.otf ,
BoldItalicFont = cmuntb.otf ]
-%% Chinese fonts
\PassOptionsToPackage{fontset=none,scheme=plain}{ctex}
\RequirePackage{ctex}
\WarningFilter{everysel}{Everysel is no longer required}
@@ -185,7 +184,6 @@
SmallCapsFont = * ]
}
-%% Math font
\if@colorclass@customfont\else
\if@colorclass@fast
\RequirePackage{amssymb}
@@ -215,6 +213,14 @@
\setmathfont[range={up/num, bfup/num}
]{texgyrepagella-math.otf}
+\AtBeginDocument{
+\let\mid@original\mid
+\renewcommand{\mid}{\hspace{-.2em}\mid@original\hspace{-.2em}}
+\let\nmid@original\nmid
+\renewcommand{\nmid}{\hspace{-.2em}\nmid@original\hspace{-.2em}}
+}
+
+\RequirePackage{tikz-cd}
\newbox\xratbelow
\newbox\xratabove
\renewcommand{\xrightarrow}[2][]{%
@@ -273,6 +279,7 @@
\draw (0,0) edge[commutative diagrams/equal] node[below=3pt] {\box\xratbelow}
node[above=2pt] {\box\xratabove}
(\xratlen,0) ;}}
+
\AtBeginDocument{
\renewcommand{\twoheadrightarrow}{%
\mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}]
@@ -344,7 +351,6 @@
\def\PJL@font@alreadyset{}
-%% Minor improvements
\PassOptionsToPackage{verbose=silent}{microtype}
\RequirePackage{microtype}
\PassOptionsToPackage{all}{nowidow}