summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/fixdif/fixdif.dtx82
-rw-r--r--macros/latex/contrib/fixdif/fixdif.pdfbin314029 -> 330827 bytes
-rw-r--r--macros/latex/contrib/jpneduenumerate/README.md7
-rw-r--r--macros/latex/contrib/jpneduenumerate/jpneduenumerate.pdfbin153607 -> 161713 bytes
-rw-r--r--macros/latex/contrib/jpneduenumerate/jpneduenumerate.sty151
-rw-r--r--macros/latex/contrib/jpneduenumerate/jpneduenumerate.tex121
-rw-r--r--macros/latex/contrib/l3kernel/CHANGELOG.md8
-rw-r--r--macros/latex/contrib/l3kernel/README.md2
-rw-r--r--macros/latex/contrib/l3kernel/expl3.dtx4
-rw-r--r--macros/latex/contrib/l3kernel/expl3.pdfbin625919 -> 626032 bytes
-rw-r--r--macros/latex/contrib/l3kernel/interface3.pdfbin1768279 -> 1768454 bytes
-rw-r--r--macros/latex/contrib/l3kernel/interface3.tex2
-rw-r--r--macros/latex/contrib/l3kernel/l3basics.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3bootstrap.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3box.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3candidates.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3cctab.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3clist.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3coffins.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3color.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3debug.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3deprecation.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3doc.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3doc.pdfbin557804 -> 557944 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3docstrip.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3docstrip.pdfbin151561 -> 151659 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3expan.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3file.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3flag.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-assign.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-aux.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-basics.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-convert.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-expo.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-extended.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-logic.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-parse.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-random.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-round.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-traps.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-trig.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fparray.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3int.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3intarray.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3kernel-functions.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3keys.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3legacy.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3luatex.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3msg.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3names.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3news.pdfbin395879 -> 395879 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news01.pdfbin122710 -> 122710 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news02.pdfbin150676 -> 150676 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news03.pdfbin148702 -> 148702 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news04.pdfbin114588 -> 114588 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news05.pdfbin112487 -> 112487 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news06.pdfbin151573 -> 151573 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news07.pdfbin128309 -> 128309 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news08.pdfbin163454 -> 163454 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news09.pdfbin250139 -> 250139 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news10.pdfbin150279 -> 150279 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news11.pdfbin170063 -> 170063 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news12.pdfbin204990 -> 204990 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3pdf.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3prefixes.pdfbin81493 -> 81493 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3prg.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3prop.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3quark.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3regex.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3seq.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3skip.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3sort.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3str-convert.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3str.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3styleguide.pdfbin295977 -> 296098 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3styleguide.tex2
-rw-r--r--macros/latex/contrib/l3kernel/l3syntax-changes.pdfbin242655 -> 242768 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3syntax-changes.tex2
-rw-r--r--macros/latex/contrib/l3kernel/l3sys.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3term-glossary.pdfbin231062 -> 231173 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3term-glossary.tex2
-rw-r--r--macros/latex/contrib/l3kernel/l3text-case.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3text-purify.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3text.dtx25
-rw-r--r--macros/latex/contrib/l3kernel/l3tl-analysis.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3tl.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3token.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3unicode.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/source3.pdfbin7226173 -> 7227731 bytes
-rw-r--r--macros/latex/contrib/l3kernel/source3.tex2
-rw-r--r--macros/latex/contrib/pseudo/LICENSE2
-rw-r--r--macros/latex/contrib/pseudo/Makefile6
-rw-r--r--macros/latex/contrib/pseudo/README.md7
-rw-r--r--macros/latex/contrib/pseudo/VERSION2
-rw-r--r--macros/latex/contrib/pseudo/doc/fig/readmefig.svg304
-rw-r--r--macros/latex/contrib/pseudo/doc/fig/readmefig.tex2
-rw-r--r--macros/latex/contrib/pseudo/doc/pseudo.bib11
-rw-r--r--macros/latex/contrib/pseudo/doc/pseudo.pdfbin574424 -> 949345 bytes
-rw-r--r--macros/latex/contrib/pseudo/doc/pseudo.tex2685
-rw-r--r--macros/latex/contrib/pseudo/pseudo.sty415
-rw-r--r--macros/latex/contrib/pseudo/test/pseudotest.tex218
-rw-r--r--macros/latex/contrib/xpinyin/xpinyin.dtx23
-rw-r--r--macros/latex/contrib/xpinyin/xpinyin.pdfbin208401 -> 209536 bytes
-rw-r--r--macros/latex/contrib/zhnumber/README.md2
-rw-r--r--macros/latex/contrib/zhnumber/zhnumber.dtx1061
-rw-r--r--macros/latex/contrib/zhnumber/zhnumber.pdfbin271657 -> 299593 bytes
107 files changed, 3913 insertions, 1343 deletions
diff --git a/macros/latex/contrib/fixdif/fixdif.dtx b/macros/latex/contrib/fixdif/fixdif.dtx
index bced2e43bf..43337e7f88 100644
--- a/macros/latex/contrib/fixdif/fixdif.dtx
+++ b/macros/latex/contrib/fixdif/fixdif.dtx
@@ -126,14 +126,14 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>.
%</internal>
%
%<*driver>
-\ProvidesFile{fixdif.dtx}[2022/07/09 (c) Copyright 2022 by Zhang Tingxuan]
+\ProvidesFile{fixdif.dtx}[2022/07/14 (c) Copyright 2022 by Zhang Tingxuan]
\documentclass{ltxdoc}
\usepackage{xcolor}
\definecolor{titlecolor}{RGB}{0,12,160}
\usepackage{doc}
\usepackage{fancyvrb}
-\fvset{xleftmargin=2em,fontsize=\small,gobble=2}
+\fvset{xleftmargin=2.5em,fontsize=\small,gobble=2}
\MakeShortVerb|
\usepackage{hologo}
@@ -145,14 +145,15 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>.
\title{The \pkg{fixdif} Package}
\author{Zhang Tingxuan}
-\date{2022/07/09\quad Version 1.2\thanks{\url{https://github.com/AlphaZTX/fixdif}}}
+\date{2022/07/14\quad Version 1.3\thanks{\url{https://github.com/AlphaZTX/fixdif}}}
\usepackage{hyperref}
\hypersetup{
pdftitle = {The fixdif Package},
pdfauthor = {Zhang Tingxuan},
pdfcreator = {pdfLaTeX/XeLaTeX/LuaLaTeX},
- hidelinks,
+ linkcolor = black,
+ urlcolor = titlecolor!80!black,
}
\def\pkg{\textsf}
@@ -188,10 +189,9 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>.
\usepackage{fixdif}
-
\linespread{1.05}
-\parskip5pt plus 2pt minus 1pt
-\parindent3em
+\parskip6pt plus 2pt minus 1pt
+\parindent2.5em
\begin{document}
\DocInput{\jobname.dtx}
@@ -391,14 +391,14 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>.
% Then you get |\D| for an uppercase upright ``D'' as a differential operator.
%
% If your second argument contains only one command like |\Delta|,
-% you should use \cs{letdif} or \cs{letdif*} instead.
+% it's recommended to use \cs{letdif} or \cs{letdif*} instead.
%
% These two commands will check whether \meta{cmd} has been defined already.
% If so, an error message will be given.
%
-% \noindent\textcolor{titlecolor}{\cs{renewdif}\marg{cmd}\marg{multi-cmd}}\DescribeMacro{\newdif}
+% \noindent\textcolor{titlecolor}{\cs{renewdif}\marg{cmd}\marg{multi-cmd}}\DescribeMacro{\renewdif}
% \hfill(without correction, preamble only)\\
-% \noindent\textcolor{titlecolor}{\cs{renewdif*}\marg{cmd}\marg{multi-cmd}}\DescribeMacro{\newdif*}
+% \noindent\textcolor{titlecolor}{\cs{renewdif*}\marg{cmd}\marg{multi-cmd}}\DescribeMacro{\renewdif*}
% \hfill(with correction, preamble only)
%
% These two commands are basically the same as \cs{newdif} and \cs{newdif*}.
@@ -406,6 +406,55 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>.
% whether \meta{cmd} has \emph{not} been defined yet. If so, an error message
% will be given.
%
+% \section{Using differential operators temporarily}
+%
+% \noindent\textcolor{titlecolor}{\cs{mathdif}\marg{symbol}}\DescribeMacro{\mathdif}
+% \hfill(without correction, in math mode only)\\
+%\noindent\textcolor{titlecolor}{\cs{mathdif*}\marg{symbol}}\DescribeMacro{\mathdif*}
+% \hfill(with correction, in math mode only)
+%
+% These two commands can be used in math mode only, more specifically,
+% after \verb|\begin{document}|. For example, \verb|$x\mathdif{\Delta}\psi$|
+% will get $x\mathdif{\Delta}\psi$.
+%
+% \section{Examples}
+%
+% This section shows how to use this package properly in your document.
+%
+% Take the two examples below:
+% \begin{Verbatim}
+% \letdif{\Delta}{Delta} % Example 1, in preamble
+% \letdif{\nabla}{nabla} % Example 2, in preamble
+% \end{Verbatim}
+% Actually, the second example is more reasonable.
+% Sometimes, we take ``$\Delta$'' as laplacian (equivalent to $\nabla^2$),
+% while ``$\Delta$'' can also be regarded as a variable
+% or function at some other times. Consequently, it's better to save
+% a different command for ``$\Delta$'' as laplacian while reserve
+% \verb|\Delta| as a command for an ordinary math symbol ``$\Delta$''.
+% However, in the vast majority of cases, ``$\nabla$'' is regarded as
+% nabla operator so there is no need to save a different command for
+% ``$\nabla$''. Then we can correct the code above:
+% \begin{Verbatim}
+% \letdif{\laplacian}{Delta} % Example 1, corrected, in preamble
+% \end{Verbatim}
+% With the \pkg{xparse} package, we can define the command in another method:
+% \begin{Verbatim}
+% \letdif{\nabla}{nabla}
+% \DeclareDocumentCommand{ \laplacian }{ s }{
+% \IfBooleanTF{#1}{\mathdif{\Delta}}{\nabla^2}
+% }
+% \end{Verbatim}
+% Then \verb|\laplacian| produces $\nabla^2$ and \verb|\laplacian*|
+% produces $\Delta$.
+%
+% \paragraph{Dealing with ``$+$'' and ``$-$''}
+% If you input \verb|$-\d x$|, you'll get ``$-\d x$'' in your document,
+% but compared to ``$-\d x$'', ``$-{\d x}$'' is better. To get ``$-{\d x}$'',
+% you can input \verb|-{\d x}|. The ``\verb|\d x|'' in a \emph{group} will be
+% regarded \textsl{ordinary} but not \textsl{inner}
+% so that the small skip will disappear.
+%
% \section{The source code}
% \begin{macrocode}
%<*package>
@@ -413,10 +462,10 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>.
% Check the \TeX{} format and provides the package name.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{fixdif}[2022/05/29 Interface for defining the differential operator.]
+\ProvidesPackage{fixdif}[2022/07/14 Interface for defining the differential operators.]
% \end{macrocode}
%
-% \subsection{Control the skip between slash and differential operator}
+% \subsection{Control the skip between slashes and differential operator}
% Change the math code of slash ($/$) and backslash ($\backslash$) so that the skip
% between slashes and differential operators can be ignored.
% \begin{macrocode}
@@ -572,6 +621,15 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>.
\fi%
}}
\def\renewdif{\@ifstar\s@renewdif\@renewdif}
+% \end{macrocode}
+% \subsection{In-document commands: \cs{mathdif} and \cs{mathdif*}}
+% \begin{macrocode}
+\def\@mathdif#1{\mathinner{#1}\mup@tch}
+\def\s@mathdif#1{\s@beforep@tch\mathinner{#1\mbox{}}\mup@tch}
+\DeclareRobustCommand\mathdif{\@ifstar\s@mathdif\@mathdif}
+% \end{macrocode}
+% End of the package.
+% \begin{macrocode}
%</package>
% \end{macrocode}
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/fixdif/fixdif.pdf b/macros/latex/contrib/fixdif/fixdif.pdf
index e83fd2d10d..375106548c 100644
--- a/macros/latex/contrib/fixdif/fixdif.pdf
+++ b/macros/latex/contrib/fixdif/fixdif.pdf
Binary files differ
diff --git a/macros/latex/contrib/jpneduenumerate/README.md b/macros/latex/contrib/jpneduenumerate/README.md
index aec10d0b35..24a3cd7908 100644
--- a/macros/latex/contrib/jpneduenumerate/README.md
+++ b/macros/latex/contrib/jpneduenumerate/README.md
@@ -2,6 +2,8 @@
Mathematical equation representation in Japanese education differs somewhat from the standard LaTeX writing style. This package introduces enumerative expressions in Japanese education.
+The term "in Japanese education" here refers to the results of my own survey of representations in authorized textbooks for high schools of several companies.
+
## Documents
@@ -17,6 +19,11 @@ This package released under [the MIT license](https://ctan.org/license/mit).
## Revision History
++ Version 1.2 2022-07-15
+ + Improve README.
+ + Improve the documentation.
+ + Add the [casebracket] and [stepbracket] option.
+ + Add the bracketenumerate environment.
+ Version 1.1 2022-07-09
+ Rewrite README.
+ Add the document (jpneduenumerate.pdf).
diff --git a/macros/latex/contrib/jpneduenumerate/jpneduenumerate.pdf b/macros/latex/contrib/jpneduenumerate/jpneduenumerate.pdf
index c7928aaac1..b3ed5127d1 100644
--- a/macros/latex/contrib/jpneduenumerate/jpneduenumerate.pdf
+++ b/macros/latex/contrib/jpneduenumerate/jpneduenumerate.pdf
Binary files differ
diff --git a/macros/latex/contrib/jpneduenumerate/jpneduenumerate.sty b/macros/latex/contrib/jpneduenumerate/jpneduenumerate.sty
index bfe092f80c..9208b09961 100644
--- a/macros/latex/contrib/jpneduenumerate/jpneduenumerate.sty
+++ b/macros/latex/contrib/jpneduenumerate/jpneduenumerate.sty
@@ -11,13 +11,23 @@
%%
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{jpneduenumerate}[2022/07/09 v1.1]
+\ProvidesPackage{jpneduenumerate}[2022/07/15 v1.2]
%
%% [lua]
\newif\if@jpnedu@enumerate@lua
\@jpnedu@enumerate@luafalse
\DeclareOption{lua}{\@jpnedu@enumerate@luatrue}%
%
+%% [casebracket]
+\newif\if@jpnedu@enumerate@casebracket
+\@jpnedu@enumerate@casebracketfalse
+\DeclareOption{casebracket}{\@jpnedu@enumerate@casebrackettrue}%
+%
+%% [stepbracket]
+\newif\if@jpnedu@enumerate@stepbracket
+\@jpnedu@enumerate@stepbracketfalse
+\DeclareOption{stepbracket}{\@jpnedu@enumerate@stepbrackettrue}%
+%
\ExecuteOptions{}
\ProcessOptions\relax
%
@@ -87,23 +97,20 @@
}%
{\end{enumerate}}
%
-%% \begin{caseenumerate}
-%% \begin{caseenumerate*}
-%% \begin{stepenumerate}
-%% \begin{stepenumerate*}
-\newenvironment{caseenumerate}%
-{\begin{romanenumerate}}%
-{\end{romanenumerate}}
-\newenvironment{caseenumerate*}%
-{\begin{romanenumerate*}}%
-{\end{romanenumerate*}}
-\newenvironment{stepenumerate}%
-{\begin{Romanenumerate}}%
-{\end{Romanenumerate}}
-\newenvironment{stepenumerate*}%
-{\begin{Romanenumerate*}}%
-{\end{Romanenumerate*}}
-%%
+%% \begin{bracketenumerate}
+%% \begin{bracketenumerate*}
+\newenvironment{bracketenumerate}%
+{\begin{enumerate}[nosep,leftmargin=2\zw,itemindent=1\zw,labelsep=1.15\zw,listparindent=1\zw]%
+\renewcommand{\labelenumi}{[\arabic{enumi}]}%
+\renewcommand{\labelenumii}{[\alph{enumii}]}%
+}%
+{\end{enumerate}}
+\newenvironment{bracketenumerate*}%
+{\begin{enumerate}[nosep,leftmargin=3\zw,itemindent=0\zw,labelsep=1.15\zw]%
+\renewcommand{\labelenumi}{[\arabic{enumi}]}%
+\renewcommand{\labelenumii}{[\alph{enumii}]}%
+}%
+{\end{enumerate}}
%
%% \@jpneduenumerate@z@w@space
\chardef\@jpneduenumerate@z@w@space=\jis"2121\relax
@@ -178,23 +185,20 @@
}%
{\end{enumerate}}
%
-%% \begin{caseenumerate}
-%% \begin{caseenumerate*}
-%% \begin{stepenumerate}
-%% \begin{stepenumerate*}
-\newenvironment{caseenumerate}%
-{\begin{romanenumerate}}%
-{\end{romanenumerate}}
-\newenvironment{caseenumerate*}%
-{\begin{romanenumerate*}}%
-{\end{romanenumerate*}}
-\newenvironment{stepenumerate}%
-{\begin{Romanenumerate}}%
-{\end{Romanenumerate}}
-\newenvironment{stepenumerate*}%
-{\begin{Romanenumerate*}}%
-{\end{Romanenumerate*}}
-%%
+%% \begin{bracketenumerate}
+%% \begin{bracketenumerate*}
+\newenvironment{bracketenumerate}%
+{\begin{enumerate}[nosep,leftmargin=2zw,itemindent=1zw,labelsep=1.15zw,listparindent=1zw]%
+\renewcommand{\labelenumi}{[\arabic{enumi}]}%
+\renewcommand{\labelenumii}{[\alph{enumii}]}%
+}%
+{\end{enumerate}}
+\newenvironment{bracketenumerate*}%
+{\begin{enumerate}[nosep,leftmargin=3zw,itemindent=0zw,labelsep=1.15zw]%
+\renewcommand{\labelenumi}{[\arabic{enumi}]}%
+\renewcommand{\labelenumii}{[\alph{enumii}]}%
+}%
+{\end{enumerate}}
%
%% \@jpneduenumerate@makenumber
% Non-stared macros are heading ones.
@@ -213,6 +217,41 @@
\fi
%%%%%%%%%%%%%%%%%%%%%%%%
%
+%% \begin{caseenumerate}
+%% \begin{caseenumerate*}
+%% \begin{stepenumerate}
+%% \begin{stepenumerate*}
+\if@jpnedu@enumerate@casebracket
+\newenvironment{caseenumerate}%
+{\begin{bracketenumerate}}%
+{\end{bracketenumerate}}
+\newenvironment{caseenumerate*}%
+{\begin{bracketenumerate*}}%
+{\end{bracketenumerate*}}
+\else
+\newenvironment{caseenumerate}%
+{\begin{romanenumerate}}%
+{\end{romanenumerate}}
+\newenvironment{caseenumerate*}%
+{\begin{romanenumerate*}}%
+{\end{romanenumerate*}}
+\fi
+\if@jpnedu@enumerate@stepbracket
+\newenvironment{stepenumerate}%
+{\begin{bracketenumerate}}%
+{\end{bracketenumerate}}
+\newenvironment{stepenumerate*}%
+{\begin{bracketenumerate*}}%
+{\end{bracketenumerate*}}
+\else
+\newenvironment{stepenumerate}%
+{\begin{Romanenumerate}}%
+{\end{Romanenumerate}}
+\newenvironment{stepenumerate*}%
+{\begin{Romanenumerate*}}%
+{\end{Romanenumerate*}}
+\fi
+%
%% \@jpneduenumerate@z@w@space
\chardef\@jpneduenumerate@z@w@space=\jis"2121\relax
%
@@ -223,6 +262,7 @@
\@jpneduenumerate@makenumber{parenromanref}{(\ajroman{\getrefnumber{#1}})}
\@jpneduenumerate@makenumber{Romanref}{\ajRoman{\getrefnumber{#1}}}
\@jpneduenumerate@makenumber{parenRomanref}{(\ajRoman{\getrefnumber{#1}})}
+\@jpneduenumerate@makenumber{bracketref}{[\ref{#1}]}
%
%%* ENUMERATE GENERATOR
%% \@jpneduenumeratetext@makenumber
@@ -277,20 +317,12 @@
\@jpneduenumeratetext@makenumber{square}{\mbox{\setlength{\fboxsep}{3pt}\@jpneduenumerate@z@w@space\kern-1\zw\framebox[1.5em]{\vphantom{\raisebox{2pt}{1}\raisebox{-2pt}{1}}#1}\kern-1\zw\@jpneduenumerate@z@w@space}}
\@jpneduenumeratetext@makenumber{question}{\mbox{\setlength{\fboxsep}{3pt}\@jpneduenumerate@z@w@space\kern-1\zw\framebox[1.5em]{\vphantom{\raisebox{2pt}{1}\raisebox{-2pt}{1}}#1}\kern-1\zw\@jpneduenumerate@z@w@space}}
% NG: \mbox{(#1)}
-\@jpneduenumeratetext@makenumber{subquestion}{\:(#1)}
-\@jpneduenumeratetext@makenumber{enumerate}{\:(#1)}
-\@jpneduenumeratetext@makenumber{case}{\mbox{(\ajroman{#1})}}
-\@jpneduenumeratetext@makenumber{step}{\mbox{(\ajRoman{#1})}}
%%
%
%% Refs
\@jpneduenumerate@makenumber{squareref}{{\setlength{\fboxsep}{3pt}\@jpneduenumerate@z@w@space\kern-1\zw\framebox[1.5em]{\vphantom{\raisebox{2pt}{1}\raisebox{-2pt}{1}}\ref{#1}}\kern-1\zw\@jpneduenumerate@z@w@space}}
\@jpneduenumerate@makenumber{questionref}{{\setlength{\fboxsep}{3pt}\@jpneduenumerate@z@w@space\kern-1\zw\framebox[1.5em]{\vphantom{\raisebox{2pt}{1}\raisebox{-2pt}{1}}\ref{#1}}\kern-1\zw\@jpneduenumerate@z@w@space}}
% \@jpneduenumerate@makenumber{questionref}{\mbox{\@jpneduenumerate@z@w@space\kern-1\zw\framebox[1.3em]{\ref{#1}}\kern-1\zw\@jpneduenumerate@z@w@space}}
-\@jpneduenumerate@makenumber{subquestionref}{\:\mbox{(\ref{#1})}}
-\@jpneduenumerate@makenumber{enumerateref}{\:\mbox{(\ref{#1})}}
-\@jpneduenumerate@makenumber{caseref}{\refused{#1}\mbox{(\ajroman{\getrefnumber{#1}})}}
-\@jpneduenumerate@makenumber{stepref}{\refused{#1}\mbox{(\ajRoman{\getrefnumber{#1}})}}
%
%%%%%%%%%%%%%%%%%%%%%%%%
% without [lua] %%%%%%%%
@@ -302,20 +334,12 @@
\@jpneduenumeratetext@makenumber{square}{\mbox{\setlength{\fboxsep}{3pt}\@jpneduenumerate@z@w@space\kern-1zw\framebox[1.5em]{\vphantom{\raisebox{2pt}{1}\raisebox{-2pt}{1}}#1}\kern-1zw\@jpneduenumerate@z@w@space}}
\@jpneduenumeratetext@makenumber{question}{\mbox{\setlength{\fboxsep}{3pt}\@jpneduenumerate@z@w@space\kern-1zw\framebox[1.5em]{\vphantom{\raisebox{2pt}{1}\raisebox{-2pt}{1}}#1}\kern-1zw\@jpneduenumerate@z@w@space}}
% NG: \mbox{(#1)}
-\@jpneduenumeratetext@makenumber{subquestion}{\:(#1)}
-\@jpneduenumeratetext@makenumber{enumerate}{\:(#1)}
-\@jpneduenumeratetext@makenumber{case}{\mbox{(\ajroman{#1})}}
-\@jpneduenumeratetext@makenumber{step}{\mbox{(\ajRoman{#1})}}
%%
%
%% Refs
\@jpneduenumerate@makenumber{squareref}{{\setlength{\fboxsep}{3pt}\@jpneduenumerate@z@w@space\kern-1zw\framebox[1.5em]{\vphantom{\raisebox{2pt}{1}\raisebox{-2pt}{1}}\ref{#1}}\kern-1zw\@jpneduenumerate@z@w@space}}
\@jpneduenumerate@makenumber{questionref}{{\setlength{\fboxsep}{3pt}\@jpneduenumerate@z@w@space\kern-1zw\framebox[1.5em]{\vphantom{\raisebox{2pt}{1}\raisebox{-2pt}{1}}\ref{#1}}\kern-1zw\@jpneduenumerate@z@w@space}}
% \@jpneduenumerate@makenumber{questionref}{\mbox{\@jpneduenumerate@z@w@space\kern-1zw\framebox[1.3em]{\ref{#1}}\kern-1zw\@jpneduenumerate@z@w@space}}
-\@jpneduenumerate@makenumber{subquestionref}{\:\mbox{(\ref{#1})}}
-\@jpneduenumerate@makenumber{enumerateref}{\:\mbox{(\ref{#1})}}
-\@jpneduenumerate@makenumber{caseref}{\refused{#1}\mbox{(\ajroman{\getrefnumber{#1}})}}
-\@jpneduenumerate@makenumber{stepref}{\refused{#1}\mbox{(\ajRoman{\getrefnumber{#1}})}}
%
%%%%%%%%%%%%%%%%%%%%%%%%
% common %%%%%%%%%%%%%%%
@@ -323,6 +347,18 @@
\fi
%%%%%%%%%%%%%%%%%%%%%%%%
%
+\@jpneduenumeratetext@makenumber{subquestion}{\:(#1)}
+\@jpneduenumeratetext@makenumber{enumerate}{\:(#1)}
+\@jpneduenumerate@makenumber{subquestionref}{\:\mbox{(\ref{#1})}}
+\@jpneduenumerate@makenumber{enumerateref}{\:\mbox{(\ref{#1})}}
+%
+\if@jpnedu@enumerate@casebracket
+\@jpneduenumeratetext@makenumber{case}{\:[#1]}
+\@jpneduenumerate@makenumber{caseref}{\:\mbox{[\ref{#1}]}}
+\else
+\@jpneduenumeratetext@makenumber{case}{\mbox{(\ajroman{#1})}}
+\@jpneduenumerate@makenumber{caseref}{\refused{#1}\mbox{(\ajroman{\getrefnumber{#1}})}}
+%
%%* AVOID ERROR of COUNTER
%% case
\renewcommand{\caseauto}{\@ifstar{\@jpneduenumeratetext@avoid@caseauto@star}{\@jpneduenumeratetext@avoid@caseauto@nostar}}
@@ -341,8 +377,16 @@
\newcommand{\@jpneduenumeratetext@avoid@casekeep@nostar}{%
\casenumber{\value{jpneduenumeratetextcasecounter}}%
}
-%%
%
+\fi
+\if@jpnedu@enumerate@stepbracket
+\@jpneduenumeratetext@makenumber{step}{\:[#1]}
+\@jpneduenumerate@makenumber{stepref}{\:\mbox{[\ref{#1}]}}
+\else
+\@jpneduenumeratetext@makenumber{step}{\mbox{(\ajRoman{#1})}}
+\@jpneduenumerate@makenumber{stepref}{\refused{#1}\mbox{(\ajRoman{\getrefnumber{#1}})}}
+%
+%%* AVOID ERROR of COUNTER
%% step
\renewcommand{\stepauto}{\@ifstar{\@jpneduenumeratetext@avoid@stepauto@star}{\@jpneduenumeratetext@avoid@stepauto@nostar}}
\newcommand{\@jpneduenumeratetext@avoid@stepauto@star}{%
@@ -360,7 +404,8 @@
\newcommand{\@jpneduenumeratetext@avoid@stepkeep@nostar}{%
\stepnumber{\value{jpneduenumeratetextstepcounter}}%
}
-%%
+\fi
+%
%%*
%
%% \equationreset
diff --git a/macros/latex/contrib/jpneduenumerate/jpneduenumerate.tex b/macros/latex/contrib/jpneduenumerate/jpneduenumerate.tex
index 0f54fe909b..d8dccf6580 100644
--- a/macros/latex/contrib/jpneduenumerate/jpneduenumerate.tex
+++ b/macros/latex/contrib/jpneduenumerate/jpneduenumerate.tex
@@ -151,9 +151,11 @@ enumerative expressions in Japanese education}
\begin{translateing}
Mathematical equation representation in Japanese education differs somewhat from the standard \LaTeX\ writing style.
This package introduces enumerative expressions in Japanese education.
+The term ``in Japanese education'' here refers to the results of my own survey of representations in authorized textbooks for high schools of several companies.
日本の教育における数式表現には,\LaTeX の標準である書きかたとはやや異なる部分があります。
このパッケージでは,日本の教育における列挙表現を導入します。
+なお,ここでの「日本の教育における」とは,数社の高等学校の検定済み教科書における表記を独自に調査した結果により述べています。
\end{translateing}
\psuedocontents{Requirements}{System Requirements}{前提条件}
@@ -166,6 +168,8 @@ This package introduces enumerative expressions in Japanese education.
\psuedocontents{moreinfo}{For More Information}{問い合わせ・詳しくは}
+\newpage
+\vspace*{-1.8\baselineskip}
\psuedosection{Requirements}{System Requirements}{前提条件}
\begin{translateing}
@@ -207,17 +211,21 @@ To use this package, load .sty file with |\usepackage{jpneduenumerate}| command
%\end{translateing}
%\begin{translateing}
-There are the |[lua]| options:
-This option changes the engine this package runs on from \pTeX/\upTeX\ to \LuaTeX. It does not change the appearance of the output.
+There are the three options:\\
+\textbullet\ |[casebracket]|/|[stepbracket]| change \\|case|/|step| |enumerate|, |auto|, |keep|, |reset|, |ref| to square bracket (as [1]).\\
+\textbullet\ |[lua]| changes the engine this package runs on from \pTeX/\upTeX\ to \LuaTeX. It does not change the appearance of the output.
Since the unit |zw| is used when no options are loaded, it can be used only in the \pTeX/\upTeX\ series.
Since the unit |\zw| is used when the \code{[lua]} loaded, it can be used only in the \LuaTeX\ series and \LuaTeX-ja.
-|[lua]| オプションがあります。
-このオプションは,このパッケージが動作するエンジンを\pTeX/\upTeX から\LuaTeX に変更します。それは出力の見た目には変化を及ぼしません。
+3つのオプションがあります。\\
+\textbullet\ |[casebracket]|/|[stepbracket]|は\\|case|/|step|環境,|auto|,|keep|,|reset|,|ref|を角括弧に変えます([1]のように)。\\
+\textbullet\ |lua|は,このパッケージが動作するエンジンを\pTeX/\upTeX から\LuaTeX に変更します。それは出力の見た目には変化を及ぼしません。
オプションを使用しないときには単位|zw|を用いますので,\pTeX/\upTeX 系列でのみ使用できます。
\code{[lua]}を読み込むと単位\commandtojskip|\zw|を用いますので,\LuaTeX 系列でのみ使用できます。
\end{translateing}
+\newpage
+\vspace*{-1\baselineskip}
\psuedosection{Usage}{Usage}{使用方法}
\macroexplanation{astarisked environments}
@@ -230,15 +238,12 @@ For example:
たとえば,次のようになります。
\end{translateing}
-\newpage
-
\noindent\hspace*{\fill}\fbox{\parbox{0.625\textwidth}{%
\ttfamily\textbackslash begin\{itemize\}\\
\textbackslash item 石炭をば早や積み果てつ。中等室の卓のほとりはいと靜にて、熾熱燈の光の晴れがましきも徒なり。\\
\textbackslash item 今宵は夜毎にこゝに集ひ來る骨牌仲間も「ホテル」に宿りて、舟に殘れるは余一人のみなれば。\\
-\textbackslash end\{itemize\}
-
-\linespace*
+\textbackslash end\{itemize\}\\
+%\linespace*
\textbackslash begin\{itemize*\}\\
\textbackslash item 石炭をば早や積み果てつ。中等室の卓のほとりはいと靜にて、熾熱燈の光の晴れがましきも徒なり。\\
\textbackslash item 今宵は夜毎にこゝに集ひ來る骨牌仲間も「ホテル」に宿りて、舟に殘れるは余一人のみなれば。\\
@@ -251,7 +256,6 @@ For example:
\item 石炭をば早や積み果てつ。中等室の卓のほとりはいと靜にて、熾熱燈の光の晴れがましきも徒なり。
\item 今宵は夜毎にこゝに集ひ來る骨牌仲間も「ホテル」に宿りて、舟に殘れるは余一人のみなれば。
\end{itemize}
-
\begin{itemize*}
\item 石炭をば早や積み果てつ。中等室の卓のほとりはいと靜にて、熾熱燈の光の晴れがましきも徒なり。
\item 今宵は夜毎にこゝに集ひ來る骨牌仲間も「ホテル」に宿りて、舟に殘れるは余一人のみなれば。
@@ -266,6 +270,7 @@ If you use this package in a Latin text, the |parindent| will be set to the same
欧文のもとでこのパッケージを使用しても,同じ大きさすなわち全角1文字分の|parindent|が設定されます。
\end{translateing}
+\newpage
\macroexplanation{environment enumerate and itemize}
\begin{translateing}
@@ -278,56 +283,95 @@ See the examples immediately above.
例は直前のものを見てください。
\end{translateing}
-\newpage
-\macroexplanation{environment romanenumerate and caseenumerate}
+\macroexplanation{environment caseenumerate}
+
+\begin{translateing}
+If |[casebracket]| is not loaded, |caseenumerate| is an alias for |romanenumerate|.
+If |[casebracket]| is loaded, |caseenumerate| is an alias for |bracketenumerate|.
+The appearance is shown below.
+
+|[casebracket]|を読み込んでいなければ,|caseenumerate|は|romanenumerate|の別名です。
+|[casebracket]|を読み込んでいれば,|caseenumerate|は|bracketenumerate|の別名です。見た目は次に載せます。
+\end{translateing}
+
+\macroexplanation{environment stepenumerate}
+
+\begin{translateing}
+If |[stepbracket]| is not loaded, |stepenumerate| is an alias for |Romanenumerate|.
+If |stepbracket| is loaded, |stepenumerate| is an alias for |bracketenumerate|.
+The appearance is shown below.
+
+|[stepbracket]|を読み込んでいなければ,|stepenumerate|は|Romanenumerate|の別名です。
+|[stepbracket]|を読み込んでいれば,|stepenumerate|は|bracketenumerate|の別名です。見た目は次に載せます。
+\end{translateing}
+
+\macroexplanation{environment romanenumerate}
\begin{translateing}
This environment replaces the symbols in the |enumerate| environment with a full-width (i).
-|caseenumerate| is synonym for |romanenumerate|.
この環境は|enumerate|環境の記号を全角の(i)に置き換えたものです。
-|caseenumerate|は|romanenumerate|の別名です。
\end{translateing}
\begin{lstlisting}
-\begin{caseenumerate}
+\begin{romanenumerate}
\item The best and most beautiful things in the world cannot be seen or even touched.
\item They must be felt with the heart.
-\end{caseenumerate}
+\end{romanenumerate}
\end{lstlisting}
\begin{macroexample}
-\begin{caseenumerate}
+\begin{romanenumerate}
\item The best and most beautiful things in the world cannot be seen or even touched.
\item They must be felt with the heart.
-\end{caseenumerate}
+\end{romanenumerate}
\end{macroexample}
-\macroexplanation{environment Romanenumerate and stepenumerate}
+\newpage
+\macroexplanation{environment Romanenumerate}
\begin{translateing}
This environment replaces the symbols in the |enumerate| environment with a full-width (I).
-|stepenumerate| is synonym for |Romanenumerate|.
この環境は|enumerate|環境の記号を全角の(I)に置き換えたものです。
-|stepenumerate|は|Romanenumerate|の別名です。
\end{translateing}
\begin{lstlisting}
-\begin{stepenumerate}
+\begin{Romanenumerate}
\item The best and most beautiful things in the world cannot be seen or even touched.
\item They must be felt with the heart.
-\end{stepenumerate}
+\end{Romanenumerate}
\end{lstlisting}
\begin{macroexample}
-\begin{stepenumerate}
+\begin{Romanenumerate}
\item The best and most beautiful things in the world cannot be seen or even touched.
\item They must be felt with the heart.
-\end{stepenumerate}
+\end{Romanenumerate}
+\end{macroexample}
+
+\macroexplanation{environment bracketenumerate}
+
+\begin{translateing}
+This environment replaces the symbols in the |enumerate| environment with [1].
+
+この環境は|enumerate|環境の記号を[1]に置き換えたものです。
+\end{translateing}
+
+\begin{lstlisting}
+\begin{bracketenumerate}
+\item The best and most beautiful things in the world cannot be seen or even touched.
+\item They must be felt with the heart.
+\end{bracketenumerate}
+\end{lstlisting}
+
+\begin{macroexample}
+\begin{bracketenumerate}
+\item The best and most beautiful things in the world cannot be seen or even touched.
+\item They must be felt with the heart.
+\end{bracketenumerate}
\end{macroexample}
-\newpage
\macroexplanation{\parenref{<label>}}
\begin{translateing}
@@ -344,6 +388,7 @@ Referred to as \ajroman{1} depending on the label.
ラベルによって\ajroman{1}のように参照します。
\end{translateing}
+\newpage
\macroexplanation{\parenromanref{<label>}}
\begin{translateing}
@@ -368,6 +413,15 @@ Referred to as (\ajRoman{1}) depending on the label.
ラベルによって(\ajRoman{1})のように参照します。
\end{translateing}
+\macroexplanation{\bracketref{<label>}}
+
+\begin{translateing}
+Referred to as [1] depending on the label.
+
+ラベルによって[1]のように参照します。
+\end{translateing}
+
+
\begin{lstlisting}
\begin{enumerate}
\item The best and most beautiful things in the world cannot be seen or even touched.\label{A}
@@ -379,6 +433,7 @@ Referred to as (\ajRoman{1}) depending on the label.
\parenromanref{A}\parenromanref{B}
\Romanref{A}\Romanref{B}
\parenRomanref{A}\parenRomanref{B}
+\bracketref{A}\bracketref{B}
\end{lstlisting}
\begin{macroexample}
@@ -391,7 +446,7 @@ Referred to as (\ajRoman{1}) depending on the label.
\romanref{A}\romanref{B}
\parenromanref{A}\parenromanref{B}
\Romanref{A}\Romanref{B}
-\parenRomanref{A}\parenRomanref{B}
+\bracketref{A}\bracketref{B}
\end{macroexample}
\begin{translateing}
@@ -399,9 +454,9 @@ Since the label only manages numbers, the appearance is achieved by changing the
ラベルは数字しか管理していないので,見た目はrefの種類を変えることで実現します。
-As in the example above, these commands except |\parenref| disable |hyperref|.
+As in the example above, these commands except |\parenref| and |\bracketref| disable |hyperref|.
-上の例で分かる通り,|\parenref|以外のこれらのコマンドは|hyperref|を無効にします。
+上の例で分かる通り,|\parenref|と|\bracketref|以外のこれらのコマンドは|hyperref|を無効にします。
\end{translateing}
\newpage
@@ -417,8 +472,8 @@ The |??| parts can be the following:\\
\textbullet\ |square| or |question| (\squarenumber*{1})\\
\textbullet\ |enumerate| (1)\\
\textbullet\ |subquestion| (1)\\
-\textbullet\ |case| (\ajroman{1})\\
-\textbullet\ |step| (\ajRoman{1})
+\textbullet\ |case| (\ajroman{1}) / [1] (with |[casebracket]|)\\
+\textbullet\ |step| (\ajRoman{1}) / [1] (with |[stepbracket]|)
|\??auto|は自動で番号が進む見出しを出力します。
|\??keep|は直前の番号のままで見出しを出力します。
@@ -428,8 +483,8 @@ The |??| parts can be the following:\\
\textbullet\ |square|または|question| (\squarenumber*{1})\\
\textbullet\ |enumerate| (1)\\
\textbullet\ |subquestion| (1)\\
-\textbullet\ |case| (\ajroman{1})\\
-\textbullet\ |step| (\ajRoman{1})
+\textbullet\ |case| (\ajroman{1}) / [1](|[casebracket]|読込時)\\
+\textbullet\ |step| (\ajRoman{1}) / [1](|[casebracket]|読込時)
Non-asterisked commands are heading.
Asterisked commands are not heading.
diff --git a/macros/latex/contrib/l3kernel/CHANGELOG.md b/macros/latex/contrib/l3kernel/CHANGELOG.md
index dd76907ac6..68df90b460 100644
--- a/macros/latex/contrib/l3kernel/CHANGELOG.md
+++ b/macros/latex/contrib/l3kernel/CHANGELOG.md
@@ -7,6 +7,11 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2022-07-14]
+
+### Changed
+- Improved approach to `\text_case_switch:nnnn` expansion
+
## [2022-07-04]
### Added
@@ -1147,7 +1152,8 @@ this project uses date-based 'snapshot' version identifiers.
- Step functions have been added for dim variables,
e.g. `\dim_step_inline:nnnn`
-[Unreleased]: https://github.com/latex3/latex3/compare/2022-07-04...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2022-07-14...HEAD
+[2022-07-14]: https://github.com/latex3/latex3/compare/2022-07-04...2022-07-14
[2022-07-04]: https://github.com/latex3/latex3/compare/2022-07-01...2022-07-04
[2022-07-01]: https://github.com/latex3/latex3/compare/2022-06-16...2022-07-01
[2022-06-16]: https://github.com/latex3/latex3/compare/2022-06-02...2022-06-16
diff --git a/macros/latex/contrib/l3kernel/README.md b/macros/latex/contrib/l3kernel/README.md
index 4dd55ea7fb..baf23c0f69 100644
--- a/macros/latex/contrib/l3kernel/README.md
+++ b/macros/latex/contrib/l3kernel/README.md
@@ -1,7 +1,7 @@
LaTeX3 Programming Conventions
==============================
-Release 2022-07-04
+Release 2022-07-14
Overview
--------
diff --git a/macros/latex/contrib/l3kernel/expl3.dtx b/macros/latex/contrib/l3kernel/expl3.dtx
index 83499161e3..17080c56c6 100644
--- a/macros/latex/contrib/l3kernel/expl3.dtx
+++ b/macros/latex/contrib/l3kernel/expl3.dtx
@@ -24,7 +24,7 @@
%
%<*driver|generic|package|2ekernel>
%</driver|generic|package|2ekernel>
-\def\ExplFileDate{2022-07-04}%
+\def\ExplFileDate{2022-07-14}%
%<*driver>
\documentclass[full]{l3doc}
\usepackage{graphicx}
@@ -51,7 +51,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/expl3.pdf b/macros/latex/contrib/l3kernel/expl3.pdf
index d0ef48784a..aa29fccf54 100644
--- a/macros/latex/contrib/l3kernel/expl3.pdf
+++ b/macros/latex/contrib/l3kernel/expl3.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/interface3.pdf b/macros/latex/contrib/l3kernel/interface3.pdf
index fdb30e80e2..bdc084fb8a 100644
--- a/macros/latex/contrib/l3kernel/interface3.pdf
+++ b/macros/latex/contrib/l3kernel/interface3.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/interface3.tex b/macros/latex/contrib/l3kernel/interface3.tex
index e2823f3f39..a71f97afdb 100644
--- a/macros/latex/contrib/l3kernel/interface3.tex
+++ b/macros/latex/contrib/l3kernel/interface3.tex
@@ -54,7 +54,7 @@ for those people who are interested.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2022-07-04}
+\date{Released 2022-07-14}
\pagenumbering{roman}
\maketitle
diff --git a/macros/latex/contrib/l3kernel/l3basics.dtx b/macros/latex/contrib/l3kernel/l3basics.dtx
index 18c4a13654..1b0468e9f3 100644
--- a/macros/latex/contrib/l3kernel/l3basics.dtx
+++ b/macros/latex/contrib/l3kernel/l3basics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3bootstrap.dtx b/macros/latex/contrib/l3kernel/l3bootstrap.dtx
index f0470747d1..a6703c68c8 100644
--- a/macros/latex/contrib/l3kernel/l3bootstrap.dtx
+++ b/macros/latex/contrib/l3kernel/l3bootstrap.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3box.dtx b/macros/latex/contrib/l3kernel/l3box.dtx
index b4ab3f444e..6626fe9400 100644
--- a/macros/latex/contrib/l3kernel/l3box.dtx
+++ b/macros/latex/contrib/l3kernel/l3box.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3candidates.dtx b/macros/latex/contrib/l3kernel/l3candidates.dtx
index d73a82a178..07f1a366e5 100644
--- a/macros/latex/contrib/l3kernel/l3candidates.dtx
+++ b/macros/latex/contrib/l3kernel/l3candidates.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3cctab.dtx b/macros/latex/contrib/l3kernel/l3cctab.dtx
index 391aeda2a1..7ef6f6b0a6 100644
--- a/macros/latex/contrib/l3kernel/l3cctab.dtx
+++ b/macros/latex/contrib/l3kernel/l3cctab.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3clist.dtx b/macros/latex/contrib/l3kernel/l3clist.dtx
index 8772756c4b..e476410d53 100644
--- a/macros/latex/contrib/l3kernel/l3clist.dtx
+++ b/macros/latex/contrib/l3kernel/l3clist.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3coffins.dtx b/macros/latex/contrib/l3kernel/l3coffins.dtx
index 21051c944c..0c1505ad90 100644
--- a/macros/latex/contrib/l3kernel/l3coffins.dtx
+++ b/macros/latex/contrib/l3kernel/l3coffins.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3color.dtx b/macros/latex/contrib/l3kernel/l3color.dtx
index f4cc11970a..7d1f84868c 100644
--- a/macros/latex/contrib/l3kernel/l3color.dtx
+++ b/macros/latex/contrib/l3kernel/l3color.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3debug.dtx b/macros/latex/contrib/l3kernel/l3debug.dtx
index 4e2e5ab5ba..b6fa01ebca 100644
--- a/macros/latex/contrib/l3kernel/l3debug.dtx
+++ b/macros/latex/contrib/l3kernel/l3debug.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3deprecation.dtx b/macros/latex/contrib/l3kernel/l3deprecation.dtx
index 7af4e13b75..c9de7062c6 100644
--- a/macros/latex/contrib/l3kernel/l3deprecation.dtx
+++ b/macros/latex/contrib/l3kernel/l3deprecation.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3doc.dtx b/macros/latex/contrib/l3kernel/l3doc.dtx
index 8825f66e7a..07e250f8bc 100644
--- a/macros/latex/contrib/l3kernel/l3doc.dtx
+++ b/macros/latex/contrib/l3kernel/l3doc.dtx
@@ -85,7 +85,7 @@ and all files in that bundle must be distributed together.
% require you to do updates, if the class changes.}}
%
% \author{\Team}
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
% \maketitle
% \tableofcontents
%
diff --git a/macros/latex/contrib/l3kernel/l3doc.pdf b/macros/latex/contrib/l3kernel/l3doc.pdf
index 19d8eea711..c650932055 100644
--- a/macros/latex/contrib/l3kernel/l3doc.pdf
+++ b/macros/latex/contrib/l3kernel/l3doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3docstrip.dtx b/macros/latex/contrib/l3kernel/l3docstrip.dtx
index 22291607ad..4be7e0ba75 100644
--- a/macros/latex/contrib/l3kernel/l3docstrip.dtx
+++ b/macros/latex/contrib/l3kernel/l3docstrip.dtx
@@ -63,7 +63,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3docstrip.pdf b/macros/latex/contrib/l3kernel/l3docstrip.pdf
index cbd25a0dcb..8fe5c06f0d 100644
--- a/macros/latex/contrib/l3kernel/l3docstrip.pdf
+++ b/macros/latex/contrib/l3kernel/l3docstrip.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3expan.dtx b/macros/latex/contrib/l3kernel/l3expan.dtx
index cc418a9157..a6195cff6b 100644
--- a/macros/latex/contrib/l3kernel/l3expan.dtx
+++ b/macros/latex/contrib/l3kernel/l3expan.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3file.dtx b/macros/latex/contrib/l3kernel/l3file.dtx
index c2fa6c957e..1adf10d7fe 100644
--- a/macros/latex/contrib/l3kernel/l3file.dtx
+++ b/macros/latex/contrib/l3kernel/l3file.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3flag.dtx b/macros/latex/contrib/l3kernel/l3flag.dtx
index d8efa5849b..101a17c257 100644
--- a/macros/latex/contrib/l3kernel/l3flag.dtx
+++ b/macros/latex/contrib/l3kernel/l3flag.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-assign.dtx b/macros/latex/contrib/l3kernel/l3fp-assign.dtx
index b12deb8fbe..503e26bc40 100644
--- a/macros/latex/contrib/l3kernel/l3fp-assign.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-assign.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
% \maketitle
%
% \begin{documentation}
diff --git a/macros/latex/contrib/l3kernel/l3fp-aux.dtx b/macros/latex/contrib/l3kernel/l3fp-aux.dtx
index 5df6423e1b..f95612917c 100644
--- a/macros/latex/contrib/l3kernel/l3fp-aux.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-aux.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-basics.dtx b/macros/latex/contrib/l3kernel/l3fp-basics.dtx
index 0df07800cf..3fcc934354 100644
--- a/macros/latex/contrib/l3kernel/l3fp-basics.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-basics.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-convert.dtx b/macros/latex/contrib/l3kernel/l3fp-convert.dtx
index 457809c6ba..e52cf05c26 100644
--- a/macros/latex/contrib/l3kernel/l3fp-convert.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-convert.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-expo.dtx b/macros/latex/contrib/l3kernel/l3fp-expo.dtx
index b29a488357..edc783919e 100644
--- a/macros/latex/contrib/l3kernel/l3fp-expo.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-expo.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-extended.dtx b/macros/latex/contrib/l3kernel/l3fp-extended.dtx
index 30a77c9f17..53d3aa1296 100644
--- a/macros/latex/contrib/l3kernel/l3fp-extended.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-extended.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-logic.dtx b/macros/latex/contrib/l3kernel/l3fp-logic.dtx
index 17fce1d474..83589faee6 100644
--- a/macros/latex/contrib/l3kernel/l3fp-logic.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-logic.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-parse.dtx b/macros/latex/contrib/l3kernel/l3fp-parse.dtx
index aa1394c598..2a7bdb32de 100644
--- a/macros/latex/contrib/l3kernel/l3fp-parse.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-parse.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-random.dtx b/macros/latex/contrib/l3kernel/l3fp-random.dtx
index 0cd08ada5f..7a5a3e484c 100644
--- a/macros/latex/contrib/l3kernel/l3fp-random.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-random.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-round.dtx b/macros/latex/contrib/l3kernel/l3fp-round.dtx
index 0e334e9946..f27e95e1ac 100644
--- a/macros/latex/contrib/l3kernel/l3fp-round.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-round.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-traps.dtx b/macros/latex/contrib/l3kernel/l3fp-traps.dtx
index 048f32ce44..542883176c 100644
--- a/macros/latex/contrib/l3kernel/l3fp-traps.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-traps.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
% \maketitle
%
% \begin{documentation}
diff --git a/macros/latex/contrib/l3kernel/l3fp-trig.dtx b/macros/latex/contrib/l3kernel/l3fp-trig.dtx
index dfedbc6b47..5a6cd7d7d8 100644
--- a/macros/latex/contrib/l3kernel/l3fp-trig.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-trig.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp.dtx b/macros/latex/contrib/l3kernel/l3fp.dtx
index f4ea4dfcb1..74f525c785 100644
--- a/macros/latex/contrib/l3kernel/l3fp.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fparray.dtx b/macros/latex/contrib/l3kernel/l3fparray.dtx
index 3312c10a28..1ce5cd9f48 100644
--- a/macros/latex/contrib/l3kernel/l3fparray.dtx
+++ b/macros/latex/contrib/l3kernel/l3fparray.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3int.dtx b/macros/latex/contrib/l3kernel/l3int.dtx
index 840c4b6e3e..bf694d69dc 100644
--- a/macros/latex/contrib/l3kernel/l3int.dtx
+++ b/macros/latex/contrib/l3kernel/l3int.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3intarray.dtx b/macros/latex/contrib/l3kernel/l3intarray.dtx
index 815d0811da..c4b4ffc002 100644
--- a/macros/latex/contrib/l3kernel/l3intarray.dtx
+++ b/macros/latex/contrib/l3kernel/l3intarray.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx
index c3dd15982f..5d9b04dbca 100644
--- a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx
+++ b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3keys.dtx b/macros/latex/contrib/l3kernel/l3keys.dtx
index 548953bdc5..9e4c23372b 100644
--- a/macros/latex/contrib/l3kernel/l3keys.dtx
+++ b/macros/latex/contrib/l3kernel/l3keys.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3legacy.dtx b/macros/latex/contrib/l3kernel/l3legacy.dtx
index 0203767c6a..34a5e58f7c 100644
--- a/macros/latex/contrib/l3kernel/l3legacy.dtx
+++ b/macros/latex/contrib/l3kernel/l3legacy.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3luatex.dtx b/macros/latex/contrib/l3kernel/l3luatex.dtx
index 6a574fc450..900432669b 100644
--- a/macros/latex/contrib/l3kernel/l3luatex.dtx
+++ b/macros/latex/contrib/l3kernel/l3luatex.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3msg.dtx b/macros/latex/contrib/l3kernel/l3msg.dtx
index ff602270cd..0fbf5a30d9 100644
--- a/macros/latex/contrib/l3kernel/l3msg.dtx
+++ b/macros/latex/contrib/l3kernel/l3msg.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3names.dtx b/macros/latex/contrib/l3kernel/l3names.dtx
index c6a8a5aa33..31665d0352 100644
--- a/macros/latex/contrib/l3kernel/l3names.dtx
+++ b/macros/latex/contrib/l3kernel/l3names.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3news.pdf b/macros/latex/contrib/l3kernel/l3news.pdf
index 6041f642e3..8532f6541e 100644
--- a/macros/latex/contrib/l3kernel/l3news.pdf
+++ b/macros/latex/contrib/l3kernel/l3news.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news01.pdf b/macros/latex/contrib/l3kernel/l3news01.pdf
index 32bd65ffa0..6aafea5028 100644
--- a/macros/latex/contrib/l3kernel/l3news01.pdf
+++ b/macros/latex/contrib/l3kernel/l3news01.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news02.pdf b/macros/latex/contrib/l3kernel/l3news02.pdf
index 7710464d57..ff2bee0da0 100644
--- a/macros/latex/contrib/l3kernel/l3news02.pdf
+++ b/macros/latex/contrib/l3kernel/l3news02.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news03.pdf b/macros/latex/contrib/l3kernel/l3news03.pdf
index a9df37a969..c415d582be 100644
--- a/macros/latex/contrib/l3kernel/l3news03.pdf
+++ b/macros/latex/contrib/l3kernel/l3news03.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news04.pdf b/macros/latex/contrib/l3kernel/l3news04.pdf
index 40621f2d6d..819c4c560d 100644
--- a/macros/latex/contrib/l3kernel/l3news04.pdf
+++ b/macros/latex/contrib/l3kernel/l3news04.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news05.pdf b/macros/latex/contrib/l3kernel/l3news05.pdf
index 5c2680f6a9..116280a126 100644
--- a/macros/latex/contrib/l3kernel/l3news05.pdf
+++ b/macros/latex/contrib/l3kernel/l3news05.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news06.pdf b/macros/latex/contrib/l3kernel/l3news06.pdf
index e24c57a2af..f5526bc32d 100644
--- a/macros/latex/contrib/l3kernel/l3news06.pdf
+++ b/macros/latex/contrib/l3kernel/l3news06.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news07.pdf b/macros/latex/contrib/l3kernel/l3news07.pdf
index 50570f4426..211bf700d2 100644
--- a/macros/latex/contrib/l3kernel/l3news07.pdf
+++ b/macros/latex/contrib/l3kernel/l3news07.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news08.pdf b/macros/latex/contrib/l3kernel/l3news08.pdf
index 9bc9224f90..4333070036 100644
--- a/macros/latex/contrib/l3kernel/l3news08.pdf
+++ b/macros/latex/contrib/l3kernel/l3news08.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news09.pdf b/macros/latex/contrib/l3kernel/l3news09.pdf
index 327f7d2c0e..8f6b4e36e7 100644
--- a/macros/latex/contrib/l3kernel/l3news09.pdf
+++ b/macros/latex/contrib/l3kernel/l3news09.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news10.pdf b/macros/latex/contrib/l3kernel/l3news10.pdf
index a55859357a..afc42b0bdb 100644
--- a/macros/latex/contrib/l3kernel/l3news10.pdf
+++ b/macros/latex/contrib/l3kernel/l3news10.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news11.pdf b/macros/latex/contrib/l3kernel/l3news11.pdf
index ed52a4b509..48c00c6fd4 100644
--- a/macros/latex/contrib/l3kernel/l3news11.pdf
+++ b/macros/latex/contrib/l3kernel/l3news11.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news12.pdf b/macros/latex/contrib/l3kernel/l3news12.pdf
index c4c2502c13..ff26fd58ef 100644
--- a/macros/latex/contrib/l3kernel/l3news12.pdf
+++ b/macros/latex/contrib/l3kernel/l3news12.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3pdf.dtx b/macros/latex/contrib/l3kernel/l3pdf.dtx
index e07a49afd9..0eb1ebd6d4 100644
--- a/macros/latex/contrib/l3kernel/l3pdf.dtx
+++ b/macros/latex/contrib/l3kernel/l3pdf.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3prefixes.pdf b/macros/latex/contrib/l3kernel/l3prefixes.pdf
index 9daaac6f16..8a23be45c1 100644
--- a/macros/latex/contrib/l3kernel/l3prefixes.pdf
+++ b/macros/latex/contrib/l3kernel/l3prefixes.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3prg.dtx b/macros/latex/contrib/l3kernel/l3prg.dtx
index 2a5c083786..afa0326584 100644
--- a/macros/latex/contrib/l3kernel/l3prg.dtx
+++ b/macros/latex/contrib/l3kernel/l3prg.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3prop.dtx b/macros/latex/contrib/l3kernel/l3prop.dtx
index c6971f01a5..8df4465af4 100644
--- a/macros/latex/contrib/l3kernel/l3prop.dtx
+++ b/macros/latex/contrib/l3kernel/l3prop.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3quark.dtx b/macros/latex/contrib/l3kernel/l3quark.dtx
index 2ace77160a..9c83974d6d 100644
--- a/macros/latex/contrib/l3kernel/l3quark.dtx
+++ b/macros/latex/contrib/l3kernel/l3quark.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3regex.dtx b/macros/latex/contrib/l3kernel/l3regex.dtx
index 095f6c429d..d6099e6879 100644
--- a/macros/latex/contrib/l3kernel/l3regex.dtx
+++ b/macros/latex/contrib/l3kernel/l3regex.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3seq.dtx b/macros/latex/contrib/l3kernel/l3seq.dtx
index 1288caf580..e6ed2f6356 100644
--- a/macros/latex/contrib/l3kernel/l3seq.dtx
+++ b/macros/latex/contrib/l3kernel/l3seq.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3skip.dtx b/macros/latex/contrib/l3kernel/l3skip.dtx
index 70cb17abc6..329c297fb9 100644
--- a/macros/latex/contrib/l3kernel/l3skip.dtx
+++ b/macros/latex/contrib/l3kernel/l3skip.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3sort.dtx b/macros/latex/contrib/l3kernel/l3sort.dtx
index 417b0d592e..66155c1769 100644
--- a/macros/latex/contrib/l3kernel/l3sort.dtx
+++ b/macros/latex/contrib/l3kernel/l3sort.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3str-convert.dtx b/macros/latex/contrib/l3kernel/l3str-convert.dtx
index 0e81254c95..0e8ee05098 100644
--- a/macros/latex/contrib/l3kernel/l3str-convert.dtx
+++ b/macros/latex/contrib/l3kernel/l3str-convert.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3str.dtx b/macros/latex/contrib/l3kernel/l3str.dtx
index 04cf109cc9..8392aa9a0e 100644
--- a/macros/latex/contrib/l3kernel/l3str.dtx
+++ b/macros/latex/contrib/l3kernel/l3str.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3styleguide.pdf b/macros/latex/contrib/l3kernel/l3styleguide.pdf
index 1468d3edfd..ad82f1ca01 100644
--- a/macros/latex/contrib/l3kernel/l3styleguide.pdf
+++ b/macros/latex/contrib/l3kernel/l3styleguide.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3styleguide.tex b/macros/latex/contrib/l3kernel/l3styleguide.tex
index 03415bcd51..bcde2442e7 100644
--- a/macros/latex/contrib/l3kernel/l3styleguide.tex
+++ b/macros/latex/contrib/l3kernel/l3styleguide.tex
@@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2022-07-04}
+\date{Released 2022-07-14}
\begin{document}
diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf
index 9fe03a88fe..cb63c033a1 100644
--- a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf
+++ b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.tex b/macros/latex/contrib/l3kernel/l3syntax-changes.tex
index b8d6f8f56b..606ae571d0 100644
--- a/macros/latex/contrib/l3kernel/l3syntax-changes.tex
+++ b/macros/latex/contrib/l3kernel/l3syntax-changes.tex
@@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2022-07-04}
+\date{Released 2022-07-14}
\newcommand{\TF}{\textit{(TF)}}
diff --git a/macros/latex/contrib/l3kernel/l3sys.dtx b/macros/latex/contrib/l3kernel/l3sys.dtx
index 20895ff059..8a4e5ef0e3 100644
--- a/macros/latex/contrib/l3kernel/l3sys.dtx
+++ b/macros/latex/contrib/l3kernel/l3sys.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.pdf b/macros/latex/contrib/l3kernel/l3term-glossary.pdf
index 9238d4f07e..9258b12475 100644
--- a/macros/latex/contrib/l3kernel/l3term-glossary.pdf
+++ b/macros/latex/contrib/l3kernel/l3term-glossary.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.tex b/macros/latex/contrib/l3kernel/l3term-glossary.tex
index 671f351ef1..6c91ec6c8a 100644
--- a/macros/latex/contrib/l3kernel/l3term-glossary.tex
+++ b/macros/latex/contrib/l3kernel/l3term-glossary.tex
@@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2022-07-04}
+\date{Released 2022-07-14}
\newcommand{\TF}{\textit{(TF)}}
diff --git a/macros/latex/contrib/l3kernel/l3text-case.dtx b/macros/latex/contrib/l3kernel/l3text-case.dtx
index 6cb58cb567..592e598b26 100644
--- a/macros/latex/contrib/l3kernel/l3text-case.dtx
+++ b/macros/latex/contrib/l3kernel/l3text-case.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3text-purify.dtx b/macros/latex/contrib/l3kernel/l3text-purify.dtx
index eab63e9ff7..c27bf56ea9 100644
--- a/macros/latex/contrib/l3kernel/l3text-purify.dtx
+++ b/macros/latex/contrib/l3kernel/l3text-purify.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3text.dtx b/macros/latex/contrib/l3kernel/l3text.dtx
index 45ed617bd7..1a8b2cc6a0 100644
--- a/macros/latex/contrib/l3kernel/l3text.dtx
+++ b/macros/latex/contrib/l3kernel/l3text.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
@@ -701,6 +701,7 @@
% \@@_expand_explicit:N ,
% \@@_expand_exclude:N
% }
+% \begin{macro}[EXP]{\@@_expand_exclude_switch:Nnnnn}
% \begin{macro}[EXP]{\@@_expand_exclude:nN}
% \begin{macro}[EXP]{\@@_expand_exclude:NN}
% \begin{macro}[EXP]{\@@_expand_exclude:Nw}
@@ -960,17 +961,26 @@
}
% \end{macrocode}
% Next we exclude math commands: this is mainly as there \emph{might} be an
-% \cs{ensuremath}.
+% \cs{ensuremath}. The switching command for case needs special handling
+% as it has to work by meaning.
% \begin{macrocode}
\cs_new:Npn \@@_expand_exclude:N #1
{
- \exp_args:Ne \@@_expand_exclude:nN
+ \cs_if_eq:NNTF #1 \text_case_switch:nnnn
+ { \@@_expand_exclude_switch:Nnnnn #1 }
{
- \exp_not:V \l_text_math_arg_tl
- \exp_not:V \l_text_expand_exclude_tl
- \exp_not:N \text_case_switch:nnnn
+ \exp_args:Ne \@@_expand_exclude:nN
+ {
+ \exp_not:V \l_text_math_arg_tl
+ \exp_not:V \l_text_expand_exclude_tl
+ }
+ #1
}
- #1
+ }
+\cs_new:Npn \@@_expand_exclude_switch:Nnnnn #1#2#3#4#5
+ {
+ \@@_expand_store:n { #1 {#2} {#3} {#4} {#5} }
+ \@@_expand_loop:w
}
\cs_new:Npn \@@_expand_exclude:nN #1#2
{
@@ -1237,6 +1247,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}
% {
diff --git a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx
index a17a05749e..2ba8e8cb35 100644
--- a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx
+++ b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3tl.dtx b/macros/latex/contrib/l3kernel/l3tl.dtx
index 45395af792..869c8870a8 100644
--- a/macros/latex/contrib/l3kernel/l3tl.dtx
+++ b/macros/latex/contrib/l3kernel/l3tl.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3token.dtx b/macros/latex/contrib/l3kernel/l3token.dtx
index 8423e040ac..51f368d14b 100644
--- a/macros/latex/contrib/l3kernel/l3token.dtx
+++ b/macros/latex/contrib/l3kernel/l3token.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3unicode.dtx b/macros/latex/contrib/l3kernel/l3unicode.dtx
index f0af4f46fd..0af8dc6c71 100644
--- a/macros/latex/contrib/l3kernel/l3unicode.dtx
+++ b/macros/latex/contrib/l3kernel/l3unicode.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-07-04}
+% \date{Released 2022-07-14}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/source3.pdf b/macros/latex/contrib/l3kernel/source3.pdf
index 7879756195..7a02a4bd70 100644
--- a/macros/latex/contrib/l3kernel/source3.pdf
+++ b/macros/latex/contrib/l3kernel/source3.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/source3.tex b/macros/latex/contrib/l3kernel/source3.tex
index 40e2419bff..9713b14826 100644
--- a/macros/latex/contrib/l3kernel/source3.tex
+++ b/macros/latex/contrib/l3kernel/source3.tex
@@ -53,7 +53,7 @@ for those people who are interested.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2022-07-04}
+\date{Released 2022-07-14}
\pagenumbering{roman}
\maketitle
diff --git a/macros/latex/contrib/pseudo/LICENSE b/macros/latex/contrib/pseudo/LICENSE
index 84cd6084ca..f0b6409bee 100644
--- a/macros/latex/contrib/pseudo/LICENSE
+++ b/macros/latex/contrib/pseudo/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2019 Magnus Lie Hetland
+Copyright (c) 2019-2022 Magnus Lie Hetland
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/macros/latex/contrib/pseudo/Makefile b/macros/latex/contrib/pseudo/Makefile
index 0541b20e49..b8b64dcd5e 100644
--- a/macros/latex/contrib/pseudo/Makefile
+++ b/macros/latex/contrib/pseudo/Makefile
@@ -7,13 +7,13 @@ TESTS=build/pseudotest.pdf
all: $(TARGETS)
doc/pseudo.pdf: build/pseudo.pdf
- cp $< $@
+ mkdir -p $(@D) && cp $< $@
build/pseudo.pdf: doc/pseudo.tex build/pseudo.bib $(FIGS) $(TESTS) README.md pseudo.sty
$(LATEX) $<
build/pseudo.bib: doc/pseudo.bib
- cp $< $@
+ mkdir -p $(@D) && cp $< $@
build/hilitefig.pdf: doc/fig/hilitefig.tex pseudo.sty
$(LATEX) $<
@@ -44,7 +44,7 @@ pseudo.sty: VERSION LICENSE doc/pseudo.tex
-e "}" >> pseudo.sty
build/readmecode.tex: doc/fig/readmecode.tex
- cp $< $@
+ mkdir -p $(@D) && cp $< $@
build/readmefig.pdf: doc/fig/readmefig.tex build/readmecode.tex
$(LATEX) $<
diff --git a/macros/latex/contrib/pseudo/README.md b/macros/latex/contrib/pseudo/README.md
index 90df5792f4..9b1919f243 100644
--- a/macros/latex/contrib/pseudo/README.md
+++ b/macros/latex/contrib/pseudo/README.md
@@ -97,6 +97,7 @@ Beyond the styling of text, there are also the `\==` and `\..` commands
dots.
This covers most of the core functionality, but there are also more obscure
-features (such as dimming or highlighting lines) and a host of configuration
-keys for getting the pseudocode looking more like you'd want it to. For
-details, consult [the documentation](doc/pseudo.pdf).
+features (such as dimming or highlighting lines), support for algorithm floats
+(and inline boxes) with customizable numbering and appearance, and a host of
+configuration keys for getting the pseudocode looking more like you'd want it
+to. For details, consult [the documentation](doc/pseudo.pdf).
diff --git a/macros/latex/contrib/pseudo/VERSION b/macros/latex/contrib/pseudo/VERSION
index 781dcb07cd..5625e59da8 100644
--- a/macros/latex/contrib/pseudo/VERSION
+++ b/macros/latex/contrib/pseudo/VERSION
@@ -1 +1 @@
-1.1.3
+1.2
diff --git a/macros/latex/contrib/pseudo/doc/fig/readmefig.svg b/macros/latex/contrib/pseudo/doc/fig/readmefig.svg
index 6070ef987b..9d9ab55b8b 100644
--- a/macros/latex/contrib/pseudo/doc/fig/readmefig.svg
+++ b/macros/latex/contrib/pseudo/doc/fig/readmefig.svg
@@ -1,411 +1,411 @@
<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="249.212pt" height="144.458pt" viewBox="0 0 249.212 144.458" version="1.1">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="209.482pt" height="119.552pt" viewBox="0 0 209.482 119.552" version="1.1">
<defs>
<g>
<symbol overflow="visible" id="glyph0-0">
<path style="stroke:none;" d=""/>
</symbol>
<symbol overflow="visible" id="glyph0-1">
-<path style="stroke:none;" d="M 7.421875 -5.34375 C 8.828125 -5.59375 10 -6.53125 10 -7.671875 C 10 -9 8.515625 -10.203125 6.515625 -10.203125 L 0.859375 -10.203125 L 0.859375 -9.734375 L 1.21875 -9.734375 C 2.375 -9.734375 2.40625 -9.578125 2.40625 -9.03125 L 2.40625 -1.171875 C 2.40625 -0.625 2.375 -0.46875 1.21875 -0.46875 L 0.859375 -0.46875 L 0.859375 0 L 6.9375 0 C 9 0 10.421875 -1.328125 10.421875 -2.734375 C 10.421875 -3.984375 9.21875 -5.140625 7.421875 -5.328125 Z M 3.640625 -9.140625 C 3.640625 -9.640625 3.671875 -9.734375 4.375 -9.734375 L 6.40625 -9.734375 C 7.9375 -9.734375 8.546875 -8.515625 8.546875 -7.671875 C 8.546875 -6.625 7.65625 -5.46875 5.96875 -5.46875 L 3.640625 -5.46875 Z M 6.640625 -5.140625 C 8.1875 -5.140625 8.9375 -3.8125 8.9375 -2.75 C 8.9375 -1.640625 8.03125 -0.46875 6.4375 -0.46875 L 4.375 -0.46875 C 3.671875 -0.46875 3.640625 -0.5625 3.640625 -1.0625 L 3.640625 -5.140625 Z M 6.640625 -5.140625 "/>
+<path style="stroke:none;" d="M 6.1875 -4.453125 C 7.359375 -4.671875 8.328125 -5.4375 8.328125 -6.40625 C 8.328125 -7.515625 7.09375 -8.5 5.421875 -8.5 L 0.71875 -8.5 L 0.71875 -8.125 L 1.015625 -8.125 C 1.984375 -8.125 2 -7.984375 2 -7.53125 L 2 -0.96875 C 2 -0.515625 1.984375 -0.390625 1.015625 -0.390625 L 0.71875 -0.390625 L 0.71875 0 L 5.78125 0 C 7.5 0 8.6875 -1.109375 8.6875 -2.28125 C 8.6875 -3.328125 7.6875 -4.28125 6.1875 -4.453125 Z M 3.03125 -7.625 C 3.03125 -8.03125 3.0625 -8.125 3.65625 -8.125 L 5.34375 -8.125 C 6.609375 -8.125 7.125 -7.09375 7.125 -6.40625 C 7.125 -5.53125 6.390625 -4.5625 4.984375 -4.5625 L 3.03125 -4.5625 Z M 5.546875 -4.28125 C 6.828125 -4.28125 7.453125 -3.171875 7.453125 -2.296875 C 7.453125 -1.375 6.703125 -0.390625 5.375 -0.390625 L 3.65625 -0.390625 C 3.0625 -0.390625 3.03125 -0.46875 3.03125 -0.890625 L 3.03125 -4.28125 Z M 5.546875 -4.28125 "/>
</symbol>
<symbol overflow="visible" id="glyph0-2">
-<path style="stroke:none;" d="M 4.921875 -7.609375 C 4.828125 -7.84375 4.75 -7.9375 4.578125 -7.9375 C 4.375 -7.9375 4.34375 -7.84375 4.265625 -7.640625 L 1.859375 -1.484375 C 1.703125 -1.078125 1.453125 -0.40625 0.515625 -0.375 L 0.515625 0 C 0.84375 -0.03125 1.265625 -0.046875 1.59375 -0.046875 C 1.859375 -0.046875 2.546875 -0.015625 2.84375 0 L 2.84375 -0.375 C 2.203125 -0.40625 2.171875 -0.90625 2.171875 -1.046875 C 2.171875 -1.171875 2.171875 -1.1875 2.671875 -2.53125 L 5.765625 -2.53125 L 6.09375 -1.6875 C 6.21875 -1.390625 6.40625 -0.875 6.40625 -0.796875 C 6.40625 -0.375 5.875 -0.375 5.609375 -0.375 L 5.609375 0 C 6.015625 -0.015625 6.90625 -0.046875 7.203125 -0.046875 C 7.703125 -0.046875 8.296875 -0.015625 8.65625 0 L 8.65625 -0.375 C 7.8125 -0.375 7.671875 -0.453125 7.484375 -0.96875 Z M 5.609375 -2.890625 L 2.828125 -2.890625 L 4.234375 -6.5 Z M 5.609375 -2.890625 "/>
+<path style="stroke:none;" d="M 4.09375 -6.34375 C 4.015625 -6.53125 3.953125 -6.609375 3.828125 -6.609375 C 3.65625 -6.609375 3.625 -6.53125 3.5625 -6.375 L 1.5625 -1.234375 C 1.421875 -0.890625 1.203125 -0.34375 0.421875 -0.3125 L 0.421875 0 C 0.703125 -0.03125 1.0625 -0.03125 1.328125 -0.03125 C 1.546875 -0.03125 2.109375 -0.015625 2.359375 0 L 2.359375 -0.3125 C 1.84375 -0.34375 1.8125 -0.765625 1.8125 -0.875 C 1.8125 -0.96875 1.8125 -1 2.234375 -2.109375 L 4.8125 -2.109375 L 5.078125 -1.40625 C 5.1875 -1.15625 5.34375 -0.734375 5.34375 -0.65625 C 5.34375 -0.3125 4.890625 -0.3125 4.6875 -0.3125 L 4.6875 0 C 5.015625 -0.015625 5.75 -0.03125 6 -0.03125 C 6.421875 -0.03125 6.90625 -0.015625 7.203125 0 L 7.203125 -0.3125 C 6.515625 -0.3125 6.40625 -0.375 6.234375 -0.8125 Z M 4.6875 -2.421875 L 2.359375 -2.421875 L 3.53125 -5.421875 Z M 4.6875 -2.421875 "/>
</symbol>
<symbol overflow="visible" id="glyph0-3">
-<path style="stroke:none;" d="M 7.109375 -6.953125 C 6.796875 -7.28125 6.0625 -7.890625 4.9375 -7.890625 C 2.6875 -7.890625 0.765625 -6.109375 0.765625 -3.84375 C 0.765625 -1.5625 2.6875 0.203125 4.9375 0.203125 C 6.890625 0.203125 8.0625 -1.34375 8.0625 -2.640625 C 8.0625 -2.78125 8.0625 -2.890625 7.875 -2.890625 C 7.703125 -2.890625 7.703125 -2.796875 7.6875 -2.640625 C 7.59375 -1.0625 6.296875 -0.171875 5.046875 -0.171875 C 4.296875 -0.171875 2.046875 -0.5625 2.046875 -3.84375 C 2.046875 -7.15625 4.359375 -7.515625 5.03125 -7.515625 C 6.125 -7.515625 7.390625 -6.734375 7.671875 -4.84375 C 7.703125 -4.734375 7.71875 -4.640625 7.875 -4.640625 C 8.0625 -4.640625 8.0625 -4.71875 8.0625 -5 L 8.0625 -7.53125 C 8.0625 -7.765625 8.0625 -7.890625 7.921875 -7.890625 C 7.828125 -7.890625 7.8125 -7.859375 7.6875 -7.703125 Z M 7.109375 -6.953125 "/>
+<path style="stroke:none;" d="M 5.921875 -5.796875 C 5.671875 -6.0625 5.0625 -6.578125 4.125 -6.578125 C 2.234375 -6.578125 0.640625 -5.09375 0.640625 -3.203125 C 0.640625 -1.3125 2.234375 0.171875 4.125 0.171875 C 5.734375 0.171875 6.71875 -1.125 6.71875 -2.203125 C 6.71875 -2.3125 6.71875 -2.40625 6.5625 -2.40625 C 6.421875 -2.40625 6.421875 -2.328125 6.40625 -2.203125 C 6.328125 -0.890625 5.25 -0.140625 4.203125 -0.140625 C 3.59375 -0.140625 1.703125 -0.46875 1.703125 -3.203125 C 1.703125 -5.96875 3.640625 -6.265625 4.203125 -6.265625 C 5.109375 -6.265625 6.171875 -5.609375 6.40625 -4.03125 C 6.421875 -3.953125 6.4375 -3.875 6.5625 -3.875 C 6.71875 -3.875 6.71875 -3.9375 6.71875 -4.171875 L 6.71875 -6.28125 C 6.71875 -6.46875 6.71875 -6.578125 6.59375 -6.578125 C 6.53125 -6.578125 6.515625 -6.546875 6.40625 -6.421875 Z M 5.921875 -5.796875 "/>
</symbol>
<symbol overflow="visible" id="glyph0-4">
-<path style="stroke:none;" d="M 2.796875 -3.28125 L 2.796875 -6.609375 C 2.796875 -7.21875 2.875 -7.296875 3.875 -7.296875 L 3.875 -7.671875 C 3.4375 -7.65625 2.578125 -7.640625 2.25 -7.640625 C 1.921875 -7.640625 1.09375 -7.65625 0.640625 -7.671875 L 0.640625 -7.296875 C 1.640625 -7.296875 1.71875 -7.21875 1.71875 -6.609375 L 1.71875 -1.078125 C 1.71875 -0.46875 1.640625 -0.375 0.640625 -0.375 L 0.640625 0 C 1.078125 -0.015625 1.921875 -0.046875 2.25 -0.046875 C 2.578125 -0.046875 3.421875 -0.015625 3.875 0 L 3.875 -0.375 C 2.875 -0.375 2.796875 -0.46875 2.796875 -1.078125 L 2.796875 -2.78125 L 4.234375 -4.046875 L 6.21875 -1.375 C 6.359375 -1.1875 6.546875 -0.890625 6.546875 -0.6875 C 6.546875 -0.40625 6.1875 -0.375 6.0625 -0.375 L 6.0625 0 C 6.359375 -0.015625 7.34375 -0.046875 7.625 -0.046875 C 8.015625 -0.046875 8.484375 -0.03125 8.890625 0 L 8.890625 -0.375 C 8.390625 -0.375 8.078125 -0.421875 7.53125 -1.1875 L 4.9375 -4.671875 C 7.765625 -7.25 8.078125 -7.265625 8.71875 -7.296875 L 8.71875 -7.671875 C 8.375 -7.640625 8.15625 -7.640625 7.78125 -7.640625 C 7.375 -7.640625 6.609375 -7.65625 6.390625 -7.671875 L 6.390625 -7.296875 C 6.5625 -7.28125 6.640625 -7.1875 6.640625 -7.015625 C 6.640625 -6.75 6.390625 -6.4375 6.15625 -6.234375 Z M 2.796875 -3.28125 "/>
+<path style="stroke:none;" d="M 2.328125 -2.734375 L 2.328125 -5.5 C 2.328125 -6.015625 2.390625 -6.09375 3.21875 -6.09375 L 3.21875 -6.40625 C 2.859375 -6.390625 2.15625 -6.359375 1.875 -6.359375 C 1.609375 -6.359375 0.90625 -6.390625 0.53125 -6.40625 L 0.53125 -6.09375 C 1.375 -6.09375 1.4375 -6.015625 1.4375 -5.5 L 1.4375 -0.890625 C 1.4375 -0.390625 1.375 -0.3125 0.53125 -0.3125 L 0.53125 0 C 0.890625 -0.015625 1.609375 -0.03125 1.875 -0.03125 C 2.15625 -0.03125 2.859375 -0.015625 3.21875 0 L 3.21875 -0.3125 C 2.390625 -0.3125 2.328125 -0.390625 2.328125 -0.890625 L 2.328125 -2.3125 L 3.53125 -3.375 L 5.1875 -1.140625 C 5.3125 -0.984375 5.453125 -0.75 5.453125 -0.578125 C 5.453125 -0.34375 5.15625 -0.3125 5.0625 -0.3125 L 5.0625 0 C 5.3125 -0.015625 6.125 -0.03125 6.34375 -0.03125 C 6.6875 -0.03125 7.078125 -0.03125 7.40625 0 L 7.40625 -0.3125 C 7 -0.3125 6.734375 -0.34375 6.28125 -0.984375 L 4.125 -3.890625 C 6.46875 -6.046875 6.734375 -6.046875 7.265625 -6.09375 L 7.265625 -6.40625 C 6.984375 -6.375 6.796875 -6.359375 6.484375 -6.359375 C 6.15625 -6.359375 5.5 -6.390625 5.328125 -6.40625 L 5.328125 -6.09375 C 5.46875 -6.0625 5.546875 -5.984375 5.546875 -5.859375 C 5.546875 -5.625 5.328125 -5.375 5.125 -5.1875 Z M 2.328125 -2.734375 "/>
</symbol>
<symbol overflow="visible" id="glyph0-5">
-<path style="stroke:none;" d="M 7 -6.5625 C 6.9375 -6.75 6.9375 -6.78125 6.9375 -6.875 C 6.9375 -7.296875 7.453125 -7.296875 7.734375 -7.296875 L 7.734375 -7.671875 C 7.296875 -7.65625 6.546875 -7.640625 6.171875 -7.640625 C 5.890625 -7.640625 5.234375 -7.640625 4.828125 -7.671875 L 4.828125 -7.296875 C 5.390625 -7.296875 5.5625 -7.265625 5.703125 -7.015625 C 5.828125 -6.859375 6.03125 -6.203125 6.03125 -6.171875 C 6.03125 -6.15625 6.03125 -6.125 5.96875 -5.96875 L 4.34375 -1.390625 L 2.515625 -6.59375 C 2.5 -6.640625 2.4375 -6.78125 2.4375 -6.875 C 2.4375 -7.296875 3 -7.296875 3.25 -7.296875 L 3.25 -7.671875 C 2.8125 -7.65625 2.0625 -7.640625 1.6875 -7.640625 C 1.40625 -7.640625 0.75 -7.640625 0.34375 -7.671875 L 0.34375 -7.296875 C 0.984375 -7.296875 1.171875 -7.25 1.328125 -6.796875 L 3.703125 -0.125 C 3.765625 0.046875 3.8125 0.171875 4 0.171875 C 4.203125 0.171875 4.25 0.03125 4.296875 -0.125 L 6.25 -5.59375 L 8.171875 -0.171875 C 8.25 0.046875 8.296875 0.171875 8.484375 0.171875 C 8.671875 0.171875 8.703125 0.078125 8.78125 -0.140625 L 10.953125 -6.234375 C 11.234375 -7.03125 11.625 -7.28125 12.140625 -7.296875 L 12.140625 -7.671875 C 11.828125 -7.640625 11.4375 -7.640625 11.125 -7.640625 C 10.78125 -7.640625 10.09375 -7.65625 9.828125 -7.671875 L 9.828125 -7.296875 C 10.484375 -7.28125 10.625 -6.828125 10.625 -6.578125 C 10.625 -6.40625 10.5625 -6.25 10.546875 -6.203125 L 8.84375 -1.390625 Z M 7 -6.5625 "/>
+<path style="stroke:none;" d="M 5.84375 -5.46875 C 5.78125 -5.625 5.78125 -5.65625 5.78125 -5.734375 C 5.78125 -6.09375 6.21875 -6.09375 6.453125 -6.09375 L 6.453125 -6.40625 C 6.078125 -6.390625 5.453125 -6.359375 5.140625 -6.359375 C 4.90625 -6.359375 4.359375 -6.375 4.015625 -6.40625 L 4.015625 -6.09375 C 4.5 -6.09375 4.625 -6.046875 4.75 -5.859375 C 4.859375 -5.71875 5.03125 -5.171875 5.03125 -5.140625 C 5.03125 -5.125 5.03125 -5.109375 4.984375 -4.984375 L 3.625 -1.15625 L 2.09375 -5.484375 C 2.078125 -5.546875 2.03125 -5.65625 2.03125 -5.734375 C 2.03125 -6.09375 2.5 -6.09375 2.71875 -6.09375 L 2.71875 -6.40625 C 2.34375 -6.390625 1.71875 -6.359375 1.40625 -6.359375 C 1.171875 -6.359375 0.625 -6.375 0.28125 -6.40625 L 0.28125 -6.09375 C 0.828125 -6.09375 0.96875 -6.046875 1.109375 -5.671875 L 3.09375 -0.09375 C 3.140625 0.03125 3.171875 0.140625 3.34375 0.140625 C 3.5 0.140625 3.53125 0.03125 3.59375 -0.09375 L 5.203125 -4.671875 L 6.8125 -0.140625 C 6.875 0.03125 6.90625 0.140625 7.078125 0.140625 C 7.234375 0.140625 7.265625 0.0625 7.328125 -0.109375 L 9.125 -5.1875 C 9.359375 -5.859375 9.6875 -6.0625 10.125 -6.09375 L 10.125 -6.40625 C 9.859375 -6.375 9.53125 -6.359375 9.28125 -6.359375 C 8.984375 -6.359375 8.421875 -6.390625 8.1875 -6.40625 L 8.1875 -6.09375 C 8.734375 -6.0625 8.859375 -5.6875 8.859375 -5.484375 C 8.859375 -5.34375 8.796875 -5.203125 8.796875 -5.171875 L 7.375 -1.15625 Z M 5.84375 -5.46875 "/>
</symbol>
<symbol overflow="visible" id="glyph0-6">
-<path style="stroke:none;" d="M 2.78125 -6.65625 C 2.78125 -7.03125 2.8125 -7.1875 2.953125 -7.265625 C 3.0625 -7.296875 3.46875 -7.296875 3.734375 -7.296875 C 4.84375 -7.296875 6.109375 -7.265625 6.109375 -5.65625 C 6.109375 -5.078125 6.03125 -4 4.09375 -4 L 2.78125 -4 Z M 5.421875 -3.8125 C 6.46875 -4.078125 7.390625 -4.75 7.390625 -5.65625 C 7.390625 -6.703125 6.0625 -7.671875 4.25 -7.671875 L 0.671875 -7.671875 L 0.671875 -7.296875 C 1.671875 -7.296875 1.75 -7.21875 1.75 -6.609375 L 1.75 -1.078125 C 1.75 -0.46875 1.671875 -0.375 0.671875 -0.375 L 0.671875 0 C 1.125 -0.015625 1.84375 -0.046875 2.25 -0.046875 C 2.6875 -0.046875 3.46875 -0.015625 3.859375 0 L 3.859375 -0.375 C 2.859375 -0.375 2.78125 -0.46875 2.78125 -1.078125 L 2.78125 -3.671875 L 4.125 -3.671875 C 4.5 -3.671875 4.890625 -3.65625 5.34375 -3.203125 C 5.65625 -2.875 5.65625 -2.515625 5.65625 -1.859375 C 5.65625 -1.015625 5.65625 -0.75 6.140625 -0.28125 C 6.40625 -0.015625 7 0.203125 7.671875 0.203125 C 8.640625 0.203125 8.859375 -0.71875 8.859375 -1.015625 C 8.859375 -1.09375 8.859375 -1.234375 8.65625 -1.234375 C 8.5 -1.234375 8.484375 -1.109375 8.484375 -1.046875 C 8.375 -0.140625 7.84375 -0.125 7.734375 -0.125 C 7.4375 -0.125 7.296875 -0.3125 7.21875 -0.484375 C 7.09375 -0.71875 7 -1.140625 6.8125 -2.09375 C 6.6875 -2.609375 6.546875 -3.375 5.421875 -3.8125 Z M 5.421875 -3.8125 "/>
+<path style="stroke:none;" d="M 2.3125 -5.546875 C 2.3125 -5.859375 2.34375 -5.984375 2.46875 -6.046875 C 2.546875 -6.09375 2.890625 -6.09375 3.109375 -6.09375 C 4.03125 -6.09375 5.09375 -6.046875 5.09375 -4.71875 C 5.09375 -4.234375 5.03125 -3.34375 3.40625 -3.34375 L 2.3125 -3.34375 Z M 4.515625 -3.171875 C 5.390625 -3.40625 6.171875 -3.953125 6.171875 -4.71875 C 6.171875 -5.59375 5.0625 -6.40625 3.546875 -6.40625 L 0.5625 -6.40625 L 0.5625 -6.09375 C 1.390625 -6.09375 1.453125 -6.015625 1.453125 -5.5 L 1.453125 -0.890625 C 1.453125 -0.390625 1.390625 -0.3125 0.5625 -0.3125 L 0.5625 0 C 0.9375 -0.015625 1.53125 -0.03125 1.875 -0.03125 C 2.234375 -0.03125 2.890625 -0.015625 3.21875 0 L 3.21875 -0.3125 C 2.375 -0.3125 2.3125 -0.390625 2.3125 -0.890625 L 2.3125 -3.0625 L 3.4375 -3.0625 C 3.75 -3.0625 4.078125 -3.046875 4.453125 -2.671875 C 4.71875 -2.390625 4.71875 -2.09375 4.71875 -1.546875 C 4.71875 -0.84375 4.71875 -0.625 5.125 -0.234375 C 5.34375 -0.015625 5.84375 0.171875 6.40625 0.171875 C 7.203125 0.171875 7.390625 -0.59375 7.390625 -0.84375 C 7.390625 -0.90625 7.390625 -1.03125 7.21875 -1.03125 C 7.078125 -1.03125 7.078125 -0.921875 7.078125 -0.875 C 6.984375 -0.109375 6.53125 -0.09375 6.453125 -0.09375 C 6.203125 -0.09375 6.09375 -0.265625 6.015625 -0.40625 C 5.921875 -0.59375 5.84375 -0.953125 5.671875 -1.75 C 5.578125 -2.171875 5.453125 -2.8125 4.515625 -3.171875 Z M 4.515625 -3.171875 "/>
</symbol>
<symbol overflow="visible" id="glyph0-7">
-<path style="stroke:none;" d="M 1.75 -1.078125 C 1.75 -0.46875 1.671875 -0.375 0.671875 -0.375 L 0.671875 0 L 4.875 0 C 6.96875 0 8.5625 -1.734375 8.5625 -3.78125 C 8.5625 -5.84375 7.015625 -7.671875 4.875 -7.671875 L 0.671875 -7.671875 L 0.671875 -7.296875 C 1.671875 -7.296875 1.75 -7.21875 1.75 -6.609375 Z M 3.375 -0.375 C 2.859375 -0.375 2.78125 -0.421875 2.78125 -1.015625 L 2.78125 -6.65625 C 2.78125 -7.265625 2.859375 -7.296875 3.375 -7.296875 L 4.53125 -7.296875 C 5.8125 -7.296875 6.453125 -6.609375 6.65625 -6.328125 C 6.984375 -5.921875 7.3125 -5.28125 7.3125 -3.78125 C 7.3125 -2.546875 7.09375 -1.921875 6.78125 -1.453125 C 6.546875 -1.125 5.90625 -0.375 4.53125 -0.375 Z M 3.375 -0.375 "/>
+<path style="stroke:none;" d="M 1.453125 -0.890625 C 1.453125 -0.390625 1.390625 -0.3125 0.5625 -0.3125 L 0.5625 0 L 4.0625 0 C 5.8125 0 7.140625 -1.4375 7.140625 -3.15625 C 7.140625 -4.875 5.859375 -6.40625 4.0625 -6.40625 L 0.5625 -6.40625 L 0.5625 -6.09375 C 1.390625 -6.09375 1.453125 -6.015625 1.453125 -5.5 Z M 2.8125 -0.3125 C 2.375 -0.3125 2.3125 -0.34375 2.3125 -0.84375 L 2.3125 -5.546875 C 2.3125 -6.046875 2.375 -6.09375 2.8125 -6.09375 L 3.765625 -6.09375 C 4.84375 -6.09375 5.375 -5.5 5.546875 -5.28125 C 5.828125 -4.9375 6.109375 -4.40625 6.109375 -3.15625 C 6.109375 -2.125 5.921875 -1.609375 5.65625 -1.203125 C 5.453125 -0.9375 4.921875 -0.3125 3.765625 -0.3125 Z M 2.8125 -0.3125 "/>
</symbol>
<symbol overflow="visible" id="glyph1-0">
<path style="stroke:none;" d=""/>
</symbol>
<symbol overflow="visible" id="glyph1-1">
-<path style="stroke:none;" d="M 4.859375 3.625 C 4.859375 3.578125 4.859375 3.5625 4.59375 3.296875 C 3.109375 1.796875 2.265625 -0.671875 2.265625 -3.71875 C 2.265625 -6.625 2.96875 -9.109375 4.703125 -10.875 C 4.859375 -11.015625 4.859375 -11.03125 4.859375 -11.078125 C 4.859375 -11.171875 4.78125 -11.203125 4.71875 -11.203125 C 4.53125 -11.203125 3.296875 -10.125 2.5625 -8.65625 C 1.8125 -7.15625 1.46875 -5.5625 1.46875 -3.71875 C 1.46875 -2.390625 1.671875 -0.609375 2.453125 0.984375 C 3.328125 2.78125 4.5625 3.75 4.71875 3.75 C 4.78125 3.75 4.859375 3.71875 4.859375 3.625 Z M 4.859375 3.625 "/>
+<path style="stroke:none;" d="M 4.125 2.984375 C 4.125 2.953125 4.125 2.921875 3.90625 2.71875 C 2.359375 1.140625 1.953125 -1.203125 1.953125 -3.109375 C 1.953125 -5.28125 2.421875 -7.453125 3.953125 -9 C 4.125 -9.15625 4.125 -9.171875 4.125 -9.21875 C 4.125 -9.296875 4.078125 -9.34375 4 -9.34375 C 3.875 -9.34375 2.75 -8.5 2.015625 -6.90625 C 1.375 -5.546875 1.234375 -4.15625 1.234375 -3.109375 C 1.234375 -2.140625 1.375 -0.640625 2.0625 0.765625 C 2.796875 2.296875 3.875 3.109375 4 3.109375 C 4.078125 3.109375 4.125 3.078125 4.125 2.984375 Z M 4.125 2.984375 "/>
</symbol>
<symbol overflow="visible" id="glyph1-2">
-<path style="stroke:none;" d="M 4.21875 -3.71875 C 4.21875 -4.859375 4.0625 -6.703125 3.21875 -8.4375 C 2.34375 -10.234375 1.125 -11.203125 0.953125 -11.203125 C 0.890625 -11.203125 0.828125 -11.171875 0.828125 -11.078125 C 0.828125 -11.03125 0.828125 -11.015625 1.078125 -10.75 C 2.5625 -9.25 3.40625 -6.78125 3.40625 -3.734375 C 3.40625 -0.84375 2.703125 1.65625 0.96875 3.421875 C 0.828125 3.5625 0.828125 3.578125 0.828125 3.625 C 0.828125 3.71875 0.890625 3.75 0.953125 3.75 C 1.15625 3.75 2.375 2.671875 3.109375 1.203125 C 3.875 -0.3125 4.21875 -1.921875 4.21875 -3.71875 Z M 4.21875 -3.71875 "/>
+<path style="stroke:none;" d="M 3.59375 -3.109375 C 3.59375 -4.078125 3.46875 -5.59375 2.78125 -7 C 2.03125 -8.53125 0.953125 -9.34375 0.828125 -9.34375 C 0.765625 -9.34375 0.703125 -9.296875 0.703125 -9.21875 C 0.703125 -9.171875 0.703125 -9.15625 0.953125 -8.921875 C 2.171875 -7.703125 2.875 -5.71875 2.875 -3.109375 C 2.875 -0.984375 2.421875 1.203125 0.875 2.78125 C 0.703125 2.921875 0.703125 2.953125 0.703125 2.984375 C 0.703125 3.0625 0.765625 3.109375 0.828125 3.109375 C 0.953125 3.109375 2.078125 2.265625 2.8125 0.6875 C 3.453125 -0.6875 3.59375 -2.0625 3.59375 -3.109375 Z M 3.59375 -3.109375 "/>
</symbol>
<symbol overflow="visible" id="glyph1-3">
-<path style="stroke:none;" d="M 4.296875 -9.578125 C 4.296875 -9.921875 4.296875 -9.9375 4 -9.9375 C 3.640625 -9.53125 2.890625 -8.984375 1.359375 -8.984375 L 1.359375 -8.546875 C 1.703125 -8.546875 2.453125 -8.546875 3.265625 -8.9375 L 3.265625 -1.15625 C 3.265625 -0.609375 3.21875 -0.4375 1.90625 -0.4375 L 1.453125 -0.4375 L 1.453125 0 C 1.859375 -0.03125 3.296875 -0.03125 3.796875 -0.03125 C 4.28125 -0.03125 5.71875 -0.03125 6.125 0 L 6.125 -0.4375 L 5.65625 -0.4375 C 4.34375 -0.4375 4.296875 -0.609375 4.296875 -1.15625 Z M 4.296875 -9.578125 "/>
+<path style="stroke:none;" d="M 3.65625 -7.96875 C 3.65625 -8.265625 3.65625 -8.296875 3.375 -8.296875 C 2.609375 -7.5 1.5 -7.5 1.109375 -7.5 L 1.109375 -7.109375 C 1.359375 -7.109375 2.09375 -7.109375 2.734375 -7.4375 L 2.734375 -0.984375 C 2.734375 -0.53125 2.703125 -0.390625 1.578125 -0.390625 L 1.1875 -0.390625 L 1.1875 0 C 1.625 -0.03125 2.703125 -0.03125 3.203125 -0.03125 C 3.703125 -0.03125 4.78125 -0.03125 5.21875 0 L 5.21875 -0.390625 L 4.8125 -0.390625 C 3.703125 -0.390625 3.65625 -0.515625 3.65625 -0.984375 Z M 3.65625 -7.96875 "/>
</symbol>
<symbol overflow="visible" id="glyph1-4">
-<path style="stroke:none;" d="M 10.078125 -4.84375 C 10.296875 -4.84375 10.5625 -4.84375 10.5625 -5.109375 C 10.5625 -5.390625 10.3125 -5.390625 10.078125 -5.390625 L 1.28125 -5.390625 C 1.078125 -5.390625 0.8125 -5.390625 0.8125 -5.125 C 0.8125 -4.84375 1.0625 -4.84375 1.28125 -4.84375 Z M 10.078125 -2.0625 C 10.296875 -2.0625 10.5625 -2.0625 10.5625 -2.328125 C 10.5625 -2.609375 10.3125 -2.609375 10.078125 -2.609375 L 1.28125 -2.609375 C 1.078125 -2.609375 0.8125 -2.609375 0.8125 -2.34375 C 0.8125 -2.0625 1.0625 -2.0625 1.28125 -2.0625 Z M 10.078125 -2.0625 "/>
+<path style="stroke:none;" d="M 8.5625 -4.078125 C 8.734375 -4.078125 8.984375 -4.078125 8.984375 -4.328125 C 8.984375 -4.5625 8.734375 -4.5625 8.5625 -4.5625 L 1.109375 -4.5625 C 0.9375 -4.5625 0.703125 -4.5625 0.703125 -4.328125 C 0.703125 -4.078125 0.9375 -4.078125 1.125 -4.078125 Z M 8.5625 -1.65625 C 8.734375 -1.65625 8.984375 -1.65625 8.984375 -1.90625 C 8.984375 -2.15625 8.734375 -2.15625 8.5625 -2.15625 L 1.125 -2.15625 C 0.9375 -2.15625 0.703125 -2.15625 0.703125 -1.90625 C 0.703125 -1.65625 0.9375 -1.65625 1.109375 -1.65625 Z M 8.5625 -1.65625 "/>
</symbol>
<symbol overflow="visible" id="glyph1-5">
-<path style="stroke:none;" d="M 6.578125 -2.515625 L 6.25 -2.515625 C 6.203125 -2.25 6.078125 -1.4375 5.9375 -1.1875 C 5.828125 -1.0625 4.96875 -1.0625 4.53125 -1.0625 L 1.765625 -1.0625 C 2.171875 -1.40625 3.078125 -2.359375 3.46875 -2.71875 C 5.734375 -4.8125 6.578125 -5.59375 6.578125 -7.0625 C 6.578125 -8.78125 5.21875 -9.9375 3.484375 -9.9375 C 1.75 -9.9375 0.734375 -8.453125 0.734375 -7.171875 C 0.734375 -6.40625 1.390625 -6.40625 1.4375 -6.40625 C 1.75 -6.40625 2.140625 -6.625 2.140625 -7.109375 C 2.140625 -7.53125 1.859375 -7.8125 1.4375 -7.8125 C 1.296875 -7.8125 1.265625 -7.8125 1.21875 -7.796875 C 1.515625 -8.8125 2.3125 -9.5 3.28125 -9.5 C 4.5625 -9.5 5.328125 -8.4375 5.328125 -7.0625 C 5.328125 -5.796875 4.59375 -4.6875 3.75 -3.734375 L 0.734375 -0.359375 L 0.734375 0 L 6.1875 0 Z M 6.578125 -2.515625 "/>
+<path style="stroke:none;" d="M 1.578125 -0.953125 L 2.90625 -2.234375 C 4.84375 -3.953125 5.59375 -4.625 5.59375 -5.875 C 5.59375 -7.296875 4.46875 -8.296875 2.953125 -8.296875 C 1.546875 -8.296875 0.625 -7.140625 0.625 -6.046875 C 0.625 -5.34375 1.25 -5.34375 1.28125 -5.34375 C 1.5 -5.34375 1.9375 -5.484375 1.9375 -6 C 1.9375 -6.328125 1.703125 -6.65625 1.265625 -6.65625 C 1.171875 -6.65625 1.140625 -6.65625 1.109375 -6.640625 C 1.390625 -7.453125 2.0625 -7.90625 2.796875 -7.90625 C 3.921875 -7.90625 4.453125 -6.90625 4.453125 -5.875 C 4.453125 -4.875 3.828125 -3.890625 3.15625 -3.125 L 0.765625 -0.453125 C 0.625 -0.328125 0.625 -0.296875 0.625 0 L 5.25 0 L 5.59375 -2.171875 L 5.28125 -2.171875 C 5.21875 -1.796875 5.125 -1.25 5 -1.0625 C 4.921875 -0.953125 4.09375 -0.953125 3.828125 -0.953125 Z M 1.578125 -0.953125 "/>
</symbol>
<symbol overflow="visible" id="glyph1-6">
-<path style="stroke:none;" d="M 2.75 -5.359375 C 2.5 -5.34375 2.4375 -5.328125 2.4375 -5.203125 C 2.4375 -5.046875 2.515625 -5.046875 2.78125 -5.046875 L 3.46875 -5.046875 C 4.734375 -5.046875 5.296875 -4 5.296875 -2.5625 C 5.296875 -0.609375 4.28125 -0.09375 3.5625 -0.09375 C 2.84375 -0.09375 1.609375 -0.4375 1.1875 -1.421875 C 1.65625 -1.34375 2.09375 -1.609375 2.09375 -2.15625 C 2.09375 -2.578125 1.78125 -2.890625 1.359375 -2.890625 C 1 -2.890625 0.609375 -2.671875 0.609375 -2.109375 C 0.609375 -0.78125 1.9375 0.3125 3.59375 0.3125 C 5.375 0.3125 6.6875 -1.046875 6.6875 -2.546875 C 6.6875 -3.921875 5.59375 -5 4.15625 -5.265625 C 5.453125 -5.625 6.28125 -6.71875 6.28125 -7.890625 C 6.28125 -9.0625 5.0625 -9.9375 3.609375 -9.9375 C 2.125 -9.9375 1.015625 -9.015625 1.015625 -7.9375 C 1.015625 -7.328125 1.484375 -7.21875 1.703125 -7.21875 C 2.015625 -7.21875 2.375 -7.4375 2.375 -7.890625 C 2.375 -8.359375 2.015625 -8.578125 1.6875 -8.578125 C 1.59375 -8.578125 1.5625 -8.578125 1.53125 -8.5625 C 2.09375 -9.578125 3.5 -9.578125 3.5625 -9.578125 C 4.0625 -9.578125 5.03125 -9.34375 5.03125 -7.890625 C 5.03125 -7.609375 4.984375 -6.765625 4.5625 -6.125 C 4.109375 -5.46875 3.59375 -5.421875 3.203125 -5.40625 Z M 2.75 -5.359375 "/>
+<path style="stroke:none;" d="M 3.609375 -4.390625 C 4.625 -4.71875 5.359375 -5.59375 5.359375 -6.578125 C 5.359375 -7.59375 4.265625 -8.296875 3.0625 -8.296875 C 1.8125 -8.296875 0.859375 -7.546875 0.859375 -6.59375 C 0.859375 -6.1875 1.140625 -5.953125 1.5 -5.953125 C 1.875 -5.953125 2.125 -6.21875 2.125 -6.59375 C 2.125 -7.203125 1.546875 -7.203125 1.359375 -7.203125 C 1.75 -7.828125 2.5625 -7.984375 3.015625 -7.984375 C 3.53125 -7.984375 4.203125 -7.703125 4.203125 -6.59375 C 4.203125 -6.4375 4.1875 -5.71875 3.859375 -5.171875 C 3.484375 -4.5625 3.0625 -4.53125 2.75 -4.515625 C 2.65625 -4.515625 2.359375 -4.484375 2.265625 -4.484375 C 2.171875 -4.46875 2.078125 -4.453125 2.078125 -4.328125 C 2.078125 -4.203125 2.171875 -4.203125 2.375 -4.203125 L 2.921875 -4.203125 C 3.953125 -4.203125 4.40625 -3.34375 4.40625 -2.125 C 4.40625 -0.4375 3.546875 -0.078125 3 -0.078125 C 2.46875 -0.078125 1.53125 -0.28125 1.09375 -1.015625 C 1.53125 -0.953125 1.921875 -1.234375 1.921875 -1.703125 C 1.921875 -2.15625 1.578125 -2.40625 1.21875 -2.40625 C 0.921875 -2.40625 0.515625 -2.234375 0.515625 -1.6875 C 0.515625 -0.546875 1.6875 0.28125 3.03125 0.28125 C 4.5625 0.28125 5.6875 -0.859375 5.6875 -2.125 C 5.6875 -3.15625 4.90625 -4.125 3.609375 -4.390625 Z M 3.609375 -4.390625 "/>
</symbol>
<symbol overflow="visible" id="glyph1-7">
-<path style="stroke:none;" d="M 6.6875 -4.78125 C 6.6875 -6.015625 6.625 -7.234375 6.078125 -8.359375 C 5.46875 -9.609375 4.390625 -9.9375 3.65625 -9.9375 C 2.796875 -9.9375 1.734375 -9.5 1.1875 -8.265625 C 0.765625 -7.3125 0.609375 -6.390625 0.609375 -4.78125 C 0.609375 -3.328125 0.71875 -2.234375 1.25 -1.1875 C 1.84375 -0.046875 2.875 0.3125 3.640625 0.3125 C 4.9375 0.3125 5.6875 -0.46875 6.125 -1.328125 C 6.65625 -2.453125 6.6875 -3.90625 6.6875 -4.78125 Z M 3.640625 0.015625 C 3.171875 0.015625 2.203125 -0.25 1.90625 -1.875 C 1.75 -2.78125 1.75 -3.90625 1.75 -4.953125 C 1.75 -6.1875 1.75 -7.296875 1.984375 -8.171875 C 2.234375 -9.171875 3 -9.640625 3.640625 -9.640625 C 4.21875 -9.640625 5.078125 -9.296875 5.359375 -8 C 5.5625 -7.15625 5.5625 -5.96875 5.5625 -4.953125 C 5.5625 -3.953125 5.5625 -2.828125 5.390625 -1.90625 C 5.109375 -0.265625 4.171875 0.015625 3.640625 0.015625 Z M 3.640625 0.015625 "/>
+<path style="stroke:none;" d="M 5.734375 -3.984375 C 5.734375 -4.984375 5.671875 -5.984375 5.234375 -6.90625 C 4.65625 -8.09375 3.640625 -8.296875 3.109375 -8.296875 C 2.359375 -8.296875 1.453125 -7.96875 0.953125 -6.8125 C 0.546875 -5.953125 0.484375 -4.984375 0.484375 -3.984375 C 0.484375 -3.046875 0.53125 -1.9375 1.046875 -0.984375 C 1.578125 0.03125 2.484375 0.28125 3.09375 0.28125 C 3.765625 0.28125 4.71875 0.015625 5.265625 -1.171875 C 5.671875 -2.03125 5.734375 -3 5.734375 -3.984375 Z M 3.09375 0 C 2.609375 0 1.875 -0.3125 1.65625 -1.5 C 1.515625 -2.25 1.515625 -3.40625 1.515625 -4.140625 C 1.515625 -4.9375 1.515625 -5.75 1.625 -6.421875 C 1.859375 -7.90625 2.796875 -8.015625 3.09375 -8.015625 C 3.515625 -8.015625 4.328125 -7.796875 4.5625 -6.5625 C 4.6875 -5.859375 4.6875 -4.921875 4.6875 -4.140625 C 4.6875 -3.203125 4.6875 -2.359375 4.5625 -1.5625 C 4.375 -0.375 3.65625 0 3.09375 0 Z M 3.09375 0 "/>
</symbol>
<symbol overflow="visible" id="glyph1-8">
-<path style="stroke:none;" d="M 5.390625 -9.71875 C 5.390625 -10.015625 5.390625 -10.078125 5.1875 -10.078125 C 5.0625 -10.078125 5.015625 -10.078125 4.90625 -9.90625 L 0.40625 -2.921875 L 0.40625 -2.5 L 4.328125 -2.5 L 4.328125 -1.140625 C 4.328125 -0.578125 4.296875 -0.4375 3.21875 -0.4375 L 2.90625 -0.4375 L 2.90625 0 C 3.25 -0.03125 4.4375 -0.03125 4.859375 -0.03125 C 5.265625 -0.03125 6.46875 -0.03125 6.8125 0 L 6.8125 -0.4375 L 6.515625 -0.4375 C 5.4375 -0.4375 5.390625 -0.578125 5.390625 -1.140625 L 5.390625 -2.5 L 6.90625 -2.5 L 6.90625 -2.921875 L 5.390625 -2.921875 Z M 4.40625 -8.5625 L 4.40625 -2.921875 L 0.78125 -2.921875 Z M 4.40625 -8.5625 "/>
+<path style="stroke:none;" d="M 3.65625 -2.0625 L 3.65625 -0.96875 C 3.65625 -0.515625 3.640625 -0.390625 2.71875 -0.390625 L 2.453125 -0.390625 L 2.453125 0 C 2.96875 -0.03125 3.609375 -0.03125 4.140625 -0.03125 C 4.65625 -0.03125 5.3125 -0.03125 5.828125 0 L 5.828125 -0.390625 L 5.5625 -0.390625 C 4.640625 -0.390625 4.625 -0.515625 4.625 -0.96875 L 4.625 -2.0625 L 5.859375 -2.0625 L 5.859375 -2.4375 L 4.625 -2.4375 L 4.625 -8.109375 C 4.625 -8.359375 4.625 -8.4375 4.421875 -8.4375 C 4.3125 -8.4375 4.265625 -8.4375 4.171875 -8.28125 L 0.34375 -2.4375 L 0.34375 -2.0625 Z M 3.734375 -2.4375 L 0.703125 -2.4375 L 3.734375 -7.078125 Z M 3.734375 -2.4375 "/>
</symbol>
<symbol overflow="visible" id="glyph1-9">
-<path style="stroke:none;" d="M 1.90625 -8.5625 C 2.546875 -8.34375 3.078125 -8.328125 3.234375 -8.328125 C 4.921875 -8.328125 6 -9.578125 6 -9.78125 C 6 -9.84375 5.96875 -9.921875 5.890625 -9.921875 C 5.859375 -9.921875 5.828125 -9.921875 5.6875 -9.859375 C 4.859375 -9.5 4.140625 -9.453125 3.75 -9.453125 C 2.765625 -9.453125 2.0625 -9.75 1.78125 -9.875 C 1.671875 -9.921875 1.640625 -9.921875 1.625 -9.921875 C 1.515625 -9.921875 1.515625 -9.828125 1.515625 -9.59375 L 1.515625 -5.15625 C 1.515625 -4.890625 1.515625 -4.796875 1.6875 -4.796875 C 1.765625 -4.796875 1.78125 -4.8125 1.921875 -4.984375 C 2.34375 -5.59375 3.046875 -5.953125 3.796875 -5.953125 C 4.578125 -5.953125 4.96875 -5.234375 5.09375 -4.96875 C 5.34375 -4.390625 5.359375 -3.65625 5.359375 -3.09375 C 5.359375 -2.53125 5.359375 -1.671875 4.9375 -1 C 4.609375 -0.46875 4.03125 -0.09375 3.375 -0.09375 C 2.390625 -0.09375 1.421875 -0.765625 1.15625 -1.859375 C 1.21875 -1.828125 1.3125 -1.8125 1.390625 -1.8125 C 1.640625 -1.8125 2.046875 -1.953125 2.046875 -2.46875 C 2.046875 -2.890625 1.765625 -3.125 1.390625 -3.125 C 1.125 -3.125 0.734375 -2.984375 0.734375 -2.40625 C 0.734375 -1.140625 1.75 0.3125 3.40625 0.3125 C 5.09375 0.3125 6.578125 -1.109375 6.578125 -3 C 6.578125 -4.78125 5.375 -6.265625 3.8125 -6.265625 C 2.953125 -6.265625 2.296875 -5.890625 1.90625 -5.46875 Z M 1.90625 -8.5625 "/>
+<path style="stroke:none;" d="M 5.59375 -2.5 C 5.59375 -3.984375 4.5625 -5.234375 3.21875 -5.234375 C 2.625 -5.234375 2.09375 -5.03125 1.640625 -4.59375 L 1.640625 -7.03125 C 1.890625 -6.953125 2.296875 -6.859375 2.703125 -6.859375 C 4.234375 -6.859375 5.109375 -8 5.109375 -8.15625 C 5.109375 -8.234375 5.0625 -8.296875 4.984375 -8.296875 C 4.96875 -8.296875 4.9375 -8.296875 4.875 -8.25 C 4.625 -8.140625 4.015625 -7.890625 3.1875 -7.890625 C 2.6875 -7.890625 2.109375 -7.984375 1.53125 -8.25 C 1.4375 -8.28125 1.40625 -8.28125 1.375 -8.28125 C 1.25 -8.28125 1.25 -8.1875 1.25 -7.984375 L 1.25 -4.296875 C 1.25 -4.078125 1.25 -3.96875 1.4375 -3.96875 C 1.515625 -3.96875 1.546875 -4.015625 1.59375 -4.078125 C 1.734375 -4.28125 2.1875 -4.953125 3.203125 -4.953125 C 3.84375 -4.953125 4.15625 -4.390625 4.265625 -4.15625 C 4.453125 -3.703125 4.484375 -3.21875 4.484375 -2.59375 C 4.484375 -2.15625 4.484375 -1.40625 4.1875 -0.890625 C 3.890625 -0.40625 3.421875 -0.078125 2.859375 -0.078125 C 1.9375 -0.078125 1.234375 -0.734375 1.015625 -1.46875 C 1.0625 -1.453125 1.09375 -1.4375 1.234375 -1.4375 C 1.640625 -1.4375 1.859375 -1.75 1.859375 -2.0625 C 1.859375 -2.359375 1.640625 -2.671875 1.234375 -2.671875 C 1.0625 -2.671875 0.625 -2.578125 0.625 -2 C 0.625 -0.9375 1.484375 0.28125 2.875 0.28125 C 4.328125 0.28125 5.59375 -0.921875 5.59375 -2.5 Z M 5.59375 -2.5 "/>
</symbol>
<symbol overflow="visible" id="glyph1-10">
-<path style="stroke:none;" d="M 1.84375 -5.203125 C 1.84375 -8.984375 3.671875 -9.578125 4.484375 -9.578125 C 5.015625 -9.578125 5.5625 -9.40625 5.84375 -8.96875 C 5.65625 -8.96875 5.09375 -8.96875 5.09375 -8.34375 C 5.09375 -8.015625 5.3125 -7.734375 5.703125 -7.734375 C 6.078125 -7.734375 6.328125 -7.96875 6.328125 -8.390625 C 6.328125 -9.171875 5.765625 -9.9375 4.46875 -9.9375 C 2.578125 -9.9375 0.609375 -8 0.609375 -4.71875 C 0.609375 -0.609375 2.40625 0.3125 3.671875 0.3125 C 5.296875 0.3125 6.6875 -1.109375 6.6875 -3.046875 C 6.6875 -5.03125 5.296875 -6.359375 3.8125 -6.359375 C 2.484375 -6.359375 1.984375 -5.21875 1.84375 -4.796875 Z M 3.671875 -0.09375 C 2.734375 -0.09375 2.28125 -0.921875 2.15625 -1.234375 C 2.015625 -1.625 1.859375 -2.359375 1.859375 -3.40625 C 1.859375 -4.578125 2.40625 -6.0625 3.75 -6.0625 C 4.578125 -6.0625 5 -5.515625 5.234375 -5 C 5.46875 -4.453125 5.46875 -3.703125 5.46875 -3.0625 C 5.46875 -2.296875 5.46875 -1.625 5.1875 -1.0625 C 4.8125 -0.34375 4.265625 -0.09375 3.671875 -0.09375 Z M 3.671875 -0.09375 "/>
+<path style="stroke:none;" d="M 1.640625 -4.078125 L 1.640625 -4.390625 C 1.640625 -7.53125 3.1875 -7.984375 3.828125 -7.984375 C 4.125 -7.984375 4.640625 -7.90625 4.921875 -7.484375 C 4.734375 -7.484375 4.234375 -7.484375 4.234375 -6.921875 C 4.234375 -6.53125 4.53125 -6.34375 4.8125 -6.34375 C 5 -6.34375 5.375 -6.46875 5.375 -6.953125 C 5.375 -7.703125 4.828125 -8.296875 3.796875 -8.296875 C 2.203125 -8.296875 0.515625 -6.6875 0.515625 -3.9375 C 0.515625 -0.609375 1.96875 0.28125 3.125 0.28125 C 4.515625 0.28125 5.6875 -0.890625 5.6875 -2.546875 C 5.6875 -4.125 4.578125 -5.3125 3.203125 -5.3125 C 2.359375 -5.3125 1.890625 -4.6875 1.640625 -4.078125 Z M 3.125 -0.078125 C 2.34375 -0.078125 1.96875 -0.828125 1.890625 -1.015625 C 1.671875 -1.59375 1.671875 -2.59375 1.671875 -2.8125 C 1.671875 -3.78125 2.0625 -5.03125 3.1875 -5.03125 C 3.390625 -5.03125 3.953125 -5.03125 4.34375 -4.265625 C 4.5625 -3.796875 4.5625 -3.15625 4.5625 -2.546875 C 4.5625 -1.953125 4.5625 -1.328125 4.359375 -0.890625 C 3.984375 -0.140625 3.40625 -0.078125 3.125 -0.078125 Z M 3.125 -0.078125 "/>
</symbol>
<symbol overflow="visible" id="glyph1-11">
-<path style="stroke:none;" d="M 7.09375 -9.28125 L 7.09375 -9.625 L 3.5 -9.625 C 1.6875 -9.625 1.65625 -9.8125 1.59375 -10.09375 L 1.265625 -10.09375 L 0.8125 -7.109375 L 1.140625 -7.109375 C 1.1875 -7.375 1.3125 -8.3125 1.515625 -8.46875 C 1.625 -8.5625 2.75 -8.5625 2.953125 -8.5625 L 6.125 -8.5625 L 4.546875 -6.28125 C 4.140625 -5.703125 2.625 -3.25 2.625 -0.453125 C 2.625 -0.28125 2.625 0.3125 3.234375 0.3125 C 3.875 0.3125 3.875 -0.265625 3.875 -0.46875 L 3.875 -1.203125 C 3.875 -3.4375 4.234375 -5.171875 4.921875 -6.171875 Z M 7.09375 -9.28125 "/>
+<path style="stroke:none;" d="M 5.921875 -7.578125 C 6.046875 -7.734375 6.046875 -7.765625 6.046875 -8.015625 L 3.015625 -8.015625 C 1.5 -8.015625 1.46875 -8.1875 1.421875 -8.421875 L 1.109375 -8.421875 L 0.703125 -5.859375 L 1.015625 -5.859375 C 1.046875 -6.046875 1.15625 -6.84375 1.3125 -6.984375 C 1.40625 -7.0625 2.375 -7.0625 2.546875 -7.0625 L 5.125 -7.0625 C 4.984375 -6.859375 4 -5.5 3.71875 -5.09375 C 2.609375 -3.40625 2.1875 -1.6875 2.1875 -0.40625 C 2.1875 -0.28125 2.1875 0.28125 2.765625 0.28125 C 3.34375 0.28125 3.34375 -0.28125 3.34375 -0.40625 L 3.34375 -1.046875 C 3.34375 -1.734375 3.375 -2.421875 3.46875 -3.09375 C 3.53125 -3.375 3.703125 -4.453125 4.25 -5.21875 Z M 5.921875 -7.578125 "/>
</symbol>
<symbol overflow="visible" id="glyph1-12">
-<path style="stroke:none;" d="M 5.953125 -3.453125 L 10.078125 -3.453125 C 10.296875 -3.453125 10.5625 -3.453125 10.5625 -3.71875 C 10.5625 -4 10.3125 -4 10.078125 -4 L 5.953125 -4 L 5.953125 -8.125 C 5.953125 -8.328125 5.953125 -8.609375 5.6875 -8.609375 C 5.40625 -8.609375 5.40625 -8.34375 5.40625 -8.125 L 5.40625 -4 L 1.28125 -4 C 1.078125 -4 0.8125 -4 0.8125 -3.734375 C 0.8125 -3.453125 1.0625 -3.453125 1.28125 -3.453125 L 5.40625 -3.453125 L 5.40625 0.671875 C 5.40625 0.875 5.40625 1.15625 5.671875 1.15625 C 5.953125 1.15625 5.953125 0.890625 5.953125 0.671875 Z M 5.953125 -3.453125 "/>
+<path style="stroke:none;" d="M 5.09375 -2.859375 L 8.5625 -2.859375 C 8.734375 -2.859375 8.984375 -2.859375 8.984375 -3.109375 C 8.984375 -3.359375 8.734375 -3.359375 8.5625 -3.359375 L 5.09375 -3.359375 L 5.09375 -6.84375 C 5.09375 -7.03125 5.09375 -7.265625 4.84375 -7.265625 C 4.59375 -7.265625 4.59375 -7.03125 4.59375 -6.84375 L 4.59375 -3.359375 L 1.109375 -3.359375 C 0.9375 -3.359375 0.703125 -3.359375 0.703125 -3.109375 C 0.703125 -2.859375 0.9375 -2.859375 1.109375 -2.859375 L 4.59375 -2.859375 L 4.59375 0.625 C 4.59375 0.796875 4.59375 1.03125 4.84375 1.03125 C 5.09375 1.03125 5.09375 0.796875 5.09375 0.625 Z M 5.09375 -2.859375 "/>
</symbol>
<symbol overflow="visible" id="glyph2-0">
<path style="stroke:none;" d=""/>
</symbol>
<symbol overflow="visible" id="glyph2-1">
-<path style="stroke:none;" d="M 9.25 -8.546875 C 9.75 -9.34375 10.21875 -9.703125 10.984375 -9.765625 C 11.125 -9.78125 11.25 -9.78125 11.25 -10.046875 C 11.25 -10.109375 11.21875 -10.203125 11.078125 -10.203125 C 10.8125 -10.203125 10.171875 -10.171875 9.90625 -10.171875 C 9.46875 -10.171875 9.015625 -10.203125 8.609375 -10.203125 C 8.484375 -10.203125 8.328125 -10.203125 8.328125 -9.921875 C 8.328125 -9.78125 8.46875 -9.765625 8.53125 -9.765625 C 9.078125 -9.71875 9.140625 -9.453125 9.140625 -9.28125 C 9.140625 -9.046875 8.9375 -8.703125 8.921875 -8.6875 L 4.234375 -1.25 L 3.1875 -9.3125 C 3.1875 -9.734375 3.953125 -9.765625 4.125 -9.765625 C 4.34375 -9.765625 4.484375 -9.765625 4.484375 -10.046875 C 4.484375 -10.203125 4.3125 -10.203125 4.265625 -10.203125 C 4.015625 -10.203125 3.71875 -10.171875 3.46875 -10.171875 L 2.625 -10.171875 C 1.53125 -10.171875 1.09375 -10.203125 1.078125 -10.203125 C 0.984375 -10.203125 0.8125 -10.203125 0.8125 -9.9375 C 0.8125 -9.765625 0.90625 -9.765625 1.15625 -9.765625 C 1.90625 -9.765625 1.953125 -9.640625 2 -9.265625 L 3.203125 -0.046875 C 3.234375 0.265625 3.234375 0.3125 3.453125 0.3125 C 3.625 0.3125 3.703125 0.265625 3.859375 0.03125 Z M 9.25 -8.546875 "/>
+<path style="stroke:none;" d="M 7.828125 -7.078125 C 8.4375 -8.0625 8.953125 -8.09375 9.421875 -8.125 C 9.5625 -8.125 9.578125 -8.34375 9.578125 -8.359375 C 9.578125 -8.453125 9.515625 -8.5 9.421875 -8.5 C 9.09375 -8.5 8.734375 -8.46875 8.390625 -8.46875 C 7.984375 -8.46875 7.5625 -8.5 7.15625 -8.5 C 7.078125 -8.5 6.921875 -8.5 6.921875 -8.265625 C 6.921875 -8.125 7.03125 -8.125 7.125 -8.125 C 7.453125 -8.09375 7.703125 -7.96875 7.703125 -7.703125 C 7.703125 -7.515625 7.515625 -7.25 7.515625 -7.234375 L 3.6875 -1.15625 L 2.84375 -7.75 C 2.84375 -7.953125 3.125 -8.125 3.703125 -8.125 C 3.875 -8.125 4.015625 -8.125 4.015625 -8.375 C 4.015625 -8.484375 3.90625 -8.5 3.828125 -8.5 C 3.34375 -8.5 2.796875 -8.46875 2.296875 -8.46875 C 2.0625 -8.46875 1.828125 -8.484375 1.609375 -8.484375 C 1.375 -8.484375 1.140625 -8.5 0.9375 -8.5 C 0.84375 -8.5 0.703125 -8.5 0.703125 -8.265625 C 0.703125 -8.125 0.8125 -8.125 1.015625 -8.125 C 1.703125 -8.125 1.71875 -8 1.75 -7.703125 L 2.734375 -0.015625 C 2.78125 0.234375 2.828125 0.28125 2.984375 0.28125 C 3.1875 0.28125 3.234375 0.21875 3.34375 0.046875 Z M 7.828125 -7.078125 "/>
</symbol>
<symbol overflow="visible" id="glyph2-2">
-<path style="stroke:none;" d="M 2.90625 0.0625 C 2.90625 -0.8125 2.625 -1.453125 2.015625 -1.453125 C 1.53125 -1.453125 1.296875 -1.0625 1.296875 -0.734375 C 1.296875 -0.40625 1.53125 0 2.03125 0 C 2.21875 0 2.390625 -0.0625 2.53125 -0.1875 C 2.546875 -0.21875 2.5625 -0.21875 2.578125 -0.21875 C 2.609375 -0.21875 2.609375 -0.015625 2.609375 0.0625 C 2.609375 0.546875 2.53125 1.53125 1.65625 2.5 C 1.5 2.671875 1.5 2.703125 1.5 2.734375 C 1.5 2.8125 1.5625 2.890625 1.640625 2.890625 C 1.765625 2.890625 2.90625 1.78125 2.90625 0.0625 Z M 2.90625 0.0625 "/>
+<path style="stroke:none;" d="M 2.53125 -0.015625 C 2.53125 -0.828125 2.21875 -1.3125 1.734375 -1.3125 C 1.3125 -1.3125 1.078125 -1.015625 1.078125 -0.65625 C 1.078125 -0.328125 1.3125 0 1.734375 0 C 1.875 0 2.046875 -0.046875 2.171875 -0.15625 C 2.203125 -0.1875 2.21875 -0.203125 2.234375 -0.203125 C 2.234375 -0.203125 2.25 -0.1875 2.25 -0.015625 C 2.25 0.90625 1.8125 1.65625 1.40625 2.0625 C 1.265625 2.203125 1.265625 2.234375 1.265625 2.265625 C 1.265625 2.359375 1.328125 2.40625 1.390625 2.40625 C 1.53125 2.40625 2.53125 1.4375 2.53125 -0.015625 Z M 2.53125 -0.015625 "/>
</symbol>
<symbol overflow="visible" id="glyph2-3">
-<path style="stroke:none;" d="M 10.375 -3.46875 C 10.390625 -3.515625 10.4375 -3.609375 10.4375 -3.671875 C 10.4375 -3.75 10.375 -3.828125 10.296875 -3.828125 C 10.234375 -3.828125 10.203125 -3.8125 10.15625 -3.765625 C 10.125 -3.75 10.125 -3.71875 10 -3.421875 C 9.109375 -1.328125 8.46875 -0.4375 6.078125 -0.4375 L 3.90625 -0.4375 C 3.6875 -0.4375 3.65625 -0.4375 3.5625 -0.453125 C 3.40625 -0.46875 3.390625 -0.5 3.390625 -0.609375 C 3.390625 -0.71875 3.421875 -0.8125 3.453125 -0.9375 L 4.484375 -5.0625 L 5.953125 -5.0625 C 7.125 -5.0625 7.21875 -4.8125 7.21875 -4.359375 C 7.21875 -4.21875 7.21875 -4.078125 7.109375 -3.625 C 7.078125 -3.5625 7.0625 -3.515625 7.0625 -3.46875 C 7.0625 -3.359375 7.140625 -3.3125 7.234375 -3.3125 C 7.359375 -3.3125 7.375 -3.421875 7.4375 -3.625 L 8.296875 -7.09375 C 8.296875 -7.171875 8.234375 -7.25 8.140625 -7.25 C 8 -7.25 7.984375 -7.1875 7.9375 -6.96875 C 7.640625 -5.828125 7.328125 -5.5 6 -5.5 L 4.578125 -5.5 L 5.515625 -9.171875 C 5.640625 -9.6875 5.671875 -9.734375 6.28125 -9.734375 L 8.421875 -9.734375 C 10.265625 -9.734375 10.640625 -9.25 10.640625 -8.109375 C 10.640625 -8.09375 10.640625 -7.671875 10.578125 -7.1875 C 10.5625 -7.125 10.546875 -7.03125 10.546875 -7 C 10.546875 -6.890625 10.625 -6.84375 10.703125 -6.84375 C 10.8125 -6.84375 10.875 -6.90625 10.90625 -7.171875 L 11.21875 -9.78125 C 11.21875 -9.828125 11.25 -9.984375 11.25 -10.015625 C 11.25 -10.171875 11.109375 -10.171875 10.84375 -10.171875 L 3.5625 -10.171875 C 3.265625 -10.171875 3.125 -10.171875 3.125 -9.90625 C 3.125 -9.734375 3.21875 -9.734375 3.484375 -9.734375 C 4.40625 -9.734375 4.40625 -9.640625 4.40625 -9.46875 C 4.40625 -9.390625 4.390625 -9.328125 4.34375 -9.171875 L 2.328125 -1.109375 C 2.203125 -0.578125 2.171875 -0.4375 1.125 -0.4375 C 0.84375 -0.4375 0.6875 -0.4375 0.6875 -0.171875 C 0.6875 0 0.78125 0 1.078125 0 L 8.578125 0 C 8.90625 0 8.921875 -0.015625 9.015625 -0.25 Z M 10.375 -3.46875 "/>
+<path style="stroke:none;" d="M 8.8125 -2.90625 C 8.84375 -2.96875 8.875 -3.046875 8.875 -3.078125 C 8.875 -3.09375 8.875 -3.21875 8.734375 -3.21875 C 8.625 -3.21875 8.59375 -3.140625 8.5625 -3.0625 C 7.765625 -1.21875 7.296875 -0.390625 5.171875 -0.390625 L 3.34375 -0.390625 C 3.171875 -0.390625 3.15625 -0.390625 3.078125 -0.40625 C 2.953125 -0.40625 2.90625 -0.421875 2.90625 -0.515625 C 2.90625 -0.5625 2.90625 -0.578125 2.96875 -0.8125 L 3.828125 -4.203125 L 5.0625 -4.203125 C 6.109375 -4.203125 6.109375 -3.953125 6.109375 -3.640625 C 6.109375 -3.546875 6.109375 -3.40625 6.03125 -3.03125 C 6 -2.96875 5.984375 -2.921875 5.984375 -2.890625 C 5.984375 -2.828125 6.046875 -2.75 6.15625 -2.75 C 6.25 -2.75 6.28125 -2.8125 6.34375 -3 L 7.046875 -5.921875 C 7.046875 -5.984375 6.984375 -6.046875 6.90625 -6.046875 C 6.78125 -6.046875 6.765625 -5.984375 6.71875 -5.828125 C 6.46875 -4.875 6.234375 -4.59375 5.09375 -4.59375 L 3.921875 -4.59375 L 4.671875 -7.59375 C 4.78125 -8.03125 4.796875 -8.078125 5.34375 -8.078125 L 7.09375 -8.078125 C 8.625 -8.078125 8.984375 -7.71875 8.984375 -6.703125 C 8.984375 -6.40625 8.984375 -6.375 8.9375 -6.046875 C 8.9375 -5.96875 8.921875 -5.875 8.921875 -5.8125 C 8.921875 -5.75 8.96875 -5.671875 9.078125 -5.671875 C 9.21875 -5.671875 9.234375 -5.734375 9.25 -5.984375 L 9.5 -8.125 C 9.53125 -8.46875 9.484375 -8.46875 9.171875 -8.46875 L 2.875 -8.46875 C 2.625 -8.46875 2.5 -8.46875 2.5 -8.21875 C 2.5 -8.078125 2.609375 -8.078125 2.859375 -8.078125 C 3.3125 -8.078125 3.65625 -8.078125 3.65625 -7.859375 C 3.65625 -7.8125 3.65625 -7.78125 3.59375 -7.5625 L 1.953125 -0.96875 C 1.828125 -0.484375 1.8125 -0.390625 0.828125 -0.390625 C 0.609375 -0.390625 0.46875 -0.390625 0.46875 -0.15625 C 0.46875 0 0.578125 0 0.828125 0 L 7.28125 0 C 7.578125 0 7.578125 -0.015625 7.671875 -0.21875 Z M 8.8125 -2.90625 "/>
</symbol>
<symbol overflow="visible" id="glyph2-4">
-<path style="stroke:none;" d="M 6.828125 -5.59375 C 6.828125 -6.53125 6.34375 -6.59375 6.234375 -6.59375 C 5.875 -6.59375 5.546875 -6.234375 5.546875 -5.9375 C 5.546875 -5.75 5.640625 -5.640625 5.703125 -5.59375 C 5.859375 -5.453125 6.25 -5.046875 6.25 -4.265625 C 6.25 -3.640625 5.34375 -0.15625 3.5625 -0.15625 C 2.640625 -0.15625 2.46875 -0.90625 2.46875 -1.46875 C 2.46875 -2.203125 2.8125 -3.25 3.21875 -4.328125 C 3.453125 -4.9375 3.515625 -5.09375 3.515625 -5.390625 C 3.515625 -6.015625 3.0625 -6.59375 2.328125 -6.59375 C 0.953125 -6.59375 0.40625 -4.421875 0.40625 -4.296875 C 0.40625 -4.25 0.46875 -4.171875 0.5625 -4.171875 C 0.703125 -4.171875 0.71875 -4.234375 0.78125 -4.4375 C 1.140625 -5.71875 1.71875 -6.28125 2.28125 -6.28125 C 2.421875 -6.28125 2.671875 -6.28125 2.671875 -5.796875 C 2.671875 -5.40625 2.515625 -4.96875 2.28125 -4.40625 C 1.5625 -2.5 1.5625 -2.03125 1.5625 -1.671875 C 1.5625 -1.34375 1.609375 -0.734375 2.078125 -0.3125 C 2.609375 0.15625 3.359375 0.15625 3.5 0.15625 C 5.96875 0.15625 6.828125 -4.734375 6.828125 -5.59375 Z M 6.828125 -5.59375 "/>
+<path style="stroke:none;" d="M 5.828125 -4.625 C 5.828125 -5.3125 5.5 -5.5 5.28125 -5.5 C 4.96875 -5.5 4.671875 -5.1875 4.671875 -4.90625 C 4.671875 -4.75 4.734375 -4.671875 4.875 -4.53125 C 5.125 -4.28125 5.296875 -3.953125 5.296875 -3.515625 C 5.296875 -2.984375 4.53125 -0.140625 3.078125 -0.140625 C 2.4375 -0.140625 2.15625 -0.578125 2.15625 -1.21875 C 2.15625 -1.921875 2.484375 -2.828125 2.875 -3.859375 C 2.96875 -4.078125 3.03125 -4.25 3.03125 -4.484375 C 3.03125 -5.046875 2.625 -5.5 2 -5.5 C 0.828125 -5.5 0.359375 -3.703125 0.359375 -3.59375 C 0.359375 -3.46875 0.484375 -3.46875 0.515625 -3.46875 C 0.640625 -3.46875 0.640625 -3.484375 0.703125 -3.6875 C 1.078125 -4.9375 1.609375 -5.234375 1.96875 -5.234375 C 2.0625 -5.234375 2.28125 -5.234375 2.28125 -4.828125 C 2.28125 -4.515625 2.15625 -4.1875 2.0625 -3.953125 C 1.515625 -2.515625 1.359375 -1.9375 1.359375 -1.40625 C 1.359375 -0.0625 2.453125 0.140625 3.03125 0.140625 C 5.125 0.140625 5.828125 -3.984375 5.828125 -4.625 Z M 5.828125 -4.625 "/>
</symbol>
<symbol overflow="visible" id="glyph2-5">
-<path style="stroke:none;" d="M 4.234375 -2.140625 C 4.234375 -2.203125 4.171875 -2.265625 4.078125 -2.265625 C 3.9375 -2.265625 3.921875 -2.21875 3.859375 -1.96875 C 3.46875 -0.609375 2.859375 -0.15625 2.359375 -0.15625 C 2.1875 -0.15625 1.96875 -0.1875 1.96875 -0.640625 C 1.96875 -1.046875 2.15625 -1.5 2.3125 -1.9375 L 3.359375 -4.71875 C 3.40625 -4.84375 3.515625 -5.109375 3.515625 -5.390625 C 3.515625 -6.015625 3.0625 -6.59375 2.328125 -6.59375 C 0.953125 -6.59375 0.40625 -4.421875 0.40625 -4.296875 C 0.40625 -4.25 0.46875 -4.171875 0.5625 -4.171875 C 0.703125 -4.171875 0.71875 -4.234375 0.78125 -4.4375 C 1.140625 -5.6875 1.703125 -6.28125 2.28125 -6.28125 C 2.421875 -6.28125 2.671875 -6.28125 2.671875 -5.796875 C 2.671875 -5.40625 2.484375 -4.921875 2.359375 -4.578125 L 1.3125 -1.8125 C 1.21875 -1.5625 1.140625 -1.328125 1.140625 -1.0625 C 1.140625 -0.390625 1.59375 0.15625 2.3125 0.15625 C 3.6875 0.15625 4.234375 -2.03125 4.234375 -2.140625 Z M 4.109375 -9.328125 C 4.109375 -9.546875 3.921875 -9.8125 3.59375 -9.8125 C 3.25 -9.8125 2.875 -9.484375 2.875 -9.09375 C 2.875 -8.71875 3.1875 -8.609375 3.359375 -8.609375 C 3.765625 -8.609375 4.109375 -9 4.109375 -9.328125 Z M 4.109375 -9.328125 "/>
+<path style="stroke:none;" d="M 3.53125 -7.78125 C 3.53125 -8.03125 3.359375 -8.234375 3.078125 -8.234375 C 2.734375 -8.234375 2.40625 -7.90625 2.40625 -7.578125 C 2.40625 -7.328125 2.578125 -7.125 2.875 -7.125 C 3.15625 -7.125 3.53125 -7.40625 3.53125 -7.78125 Z M 2.59375 -3.09375 C 2.734375 -3.46875 2.734375 -3.484375 2.859375 -3.828125 C 2.96875 -4.078125 3.03125 -4.25 3.03125 -4.484375 C 3.03125 -5.046875 2.625 -5.5 2 -5.5 C 0.828125 -5.5 0.359375 -3.703125 0.359375 -3.59375 C 0.359375 -3.46875 0.484375 -3.46875 0.515625 -3.46875 C 0.640625 -3.46875 0.640625 -3.484375 0.703125 -3.6875 C 1.046875 -4.859375 1.546875 -5.234375 1.96875 -5.234375 C 2.0625 -5.234375 2.28125 -5.234375 2.28125 -4.828125 C 2.28125 -4.5625 2.1875 -4.3125 2.140625 -4.1875 C 2.046875 -3.859375 1.484375 -2.421875 1.28125 -1.875 C 1.15625 -1.5625 1 -1.140625 1 -0.890625 C 1 -0.296875 1.421875 0.140625 2.015625 0.140625 C 3.1875 0.140625 3.65625 -1.671875 3.65625 -1.78125 C 3.65625 -1.90625 3.53125 -1.90625 3.5 -1.90625 C 3.375 -1.90625 3.375 -1.875 3.3125 -1.6875 C 3.09375 -0.890625 2.671875 -0.140625 2.046875 -0.140625 C 1.828125 -0.140625 1.75 -0.265625 1.75 -0.546875 C 1.75 -0.859375 1.8125 -1.03125 2.109375 -1.796875 Z M 2.59375 -3.09375 "/>
</symbol>
<symbol overflow="visible" id="glyph2-6">
-<path style="stroke:none;" d="M 2.75 -0.71875 C 2.75 -1.15625 2.390625 -1.453125 2.03125 -1.453125 C 1.59375 -1.453125 1.296875 -1.09375 1.296875 -0.734375 C 1.296875 -0.296875 1.65625 0 2.015625 0 C 2.453125 0 2.75 -0.359375 2.75 -0.71875 Z M 2.75 -0.71875 "/>
+<path style="stroke:none;" d="M 2.390625 -0.65625 C 2.390625 -1.015625 2.09375 -1.3125 1.734375 -1.3125 C 1.375 -1.3125 1.078125 -1.015625 1.078125 -0.65625 C 1.078125 -0.296875 1.375 0 1.734375 0 C 2.09375 0 2.390625 -0.296875 2.390625 -0.65625 Z M 2.390625 -0.65625 "/>
</symbol>
<symbol overflow="visible" id="glyph2-7">
-<path style="stroke:none;" d="M 5.09375 -0.859375 C 5.28125 -0.03125 6 0.15625 6.359375 0.15625 C 6.84375 0.15625 7.203125 -0.171875 7.4375 -0.671875 C 7.6875 -1.203125 7.890625 -2.09375 7.890625 -2.140625 C 7.890625 -2.203125 7.828125 -2.265625 7.734375 -2.265625 C 7.609375 -2.265625 7.59375 -2.203125 7.53125 -1.96875 C 7.265625 -0.9375 6.984375 -0.15625 6.390625 -0.15625 C 5.9375 -0.15625 5.9375 -0.640625 5.9375 -0.84375 C 5.9375 -1.1875 5.984375 -1.328125 6.140625 -1.953125 C 6.25 -2.359375 6.34375 -2.765625 6.4375 -3.1875 L 7.046875 -5.609375 C 7.15625 -5.984375 7.15625 -6.015625 7.15625 -6.0625 C 7.15625 -6.28125 6.96875 -6.4375 6.75 -6.4375 C 6.3125 -6.4375 6.21875 -6.0625 6.125 -5.6875 C 5.96875 -5.109375 5.171875 -1.890625 5.0625 -1.375 C 5.046875 -1.375 4.46875 -0.15625 3.375 -0.15625 C 2.59375 -0.15625 2.453125 -0.828125 2.453125 -1.375 C 2.453125 -2.21875 2.875 -3.421875 3.25 -4.421875 C 3.4375 -4.90625 3.515625 -5.09375 3.515625 -5.390625 C 3.515625 -6.03125 3.046875 -6.59375 2.328125 -6.59375 C 0.953125 -6.59375 0.40625 -4.421875 0.40625 -4.296875 C 0.40625 -4.25 0.46875 -4.171875 0.5625 -4.171875 C 0.703125 -4.171875 0.71875 -4.234375 0.78125 -4.4375 C 1.140625 -5.71875 1.71875 -6.28125 2.28125 -6.28125 C 2.4375 -6.28125 2.671875 -6.28125 2.671875 -5.796875 C 2.671875 -5.40625 2.515625 -4.96875 2.28125 -4.40625 C 1.625 -2.625 1.546875 -2.0625 1.546875 -1.609375 C 1.546875 -0.09375 2.703125 0.15625 3.3125 0.15625 C 4.265625 0.15625 4.796875 -0.515625 5.09375 -0.859375 Z M 5.09375 -0.859375 "/>
+<path style="stroke:none;" d="M 4.359375 -0.703125 C 4.5 -0.1875 4.9375 0.140625 5.46875 0.140625 C 5.90625 0.140625 6.1875 -0.15625 6.390625 -0.546875 C 6.59375 -1 6.765625 -1.75 6.765625 -1.78125 C 6.765625 -1.90625 6.65625 -1.90625 6.609375 -1.90625 C 6.484375 -1.90625 6.46875 -1.859375 6.4375 -1.6875 C 6.265625 -0.984375 6.03125 -0.140625 5.5 -0.140625 C 5.25 -0.140625 5.125 -0.296875 5.125 -0.703125 C 5.125 -0.984375 5.265625 -1.5625 5.375 -2 L 5.71875 -3.34375 C 5.75 -3.53125 5.875 -4.015625 5.921875 -4.203125 C 5.984375 -4.484375 6.109375 -4.953125 6.109375 -5.03125 C 6.109375 -5.25 5.9375 -5.375 5.75 -5.375 C 5.6875 -5.375 5.375 -5.359375 5.265625 -4.9375 C 5.03125 -4.015625 4.484375 -1.84375 4.328125 -1.1875 C 4.328125 -1.140625 3.828125 -0.140625 2.90625 -0.140625 C 2.265625 -0.140625 2.140625 -0.703125 2.140625 -1.15625 C 2.140625 -1.859375 2.484375 -2.84375 2.8125 -3.703125 C 2.96875 -4.078125 3.03125 -4.25 3.03125 -4.484375 C 3.03125 -5.046875 2.625 -5.5 2 -5.5 C 0.828125 -5.5 0.359375 -3.703125 0.359375 -3.59375 C 0.359375 -3.46875 0.484375 -3.46875 0.515625 -3.46875 C 0.640625 -3.46875 0.640625 -3.484375 0.703125 -3.6875 C 1.015625 -4.765625 1.5 -5.234375 1.96875 -5.234375 C 2.078125 -5.234375 2.28125 -5.21875 2.28125 -4.8125 C 2.28125 -4.515625 2.140625 -4.15625 2.0625 -3.96875 C 1.609375 -2.734375 1.34375 -1.96875 1.34375 -1.359375 C 1.34375 -0.171875 2.203125 0.140625 2.875 0.140625 C 3.703125 0.140625 4.140625 -0.421875 4.359375 -0.703125 Z M 4.359375 -0.703125 "/>
</symbol>
<symbol overflow="visible" id="glyph2-8">
-<path style="stroke:none;" d="M 9.84375 -7.28125 C 10.109375 -7.390625 10.140625 -7.5 10.140625 -7.59375 C 10.140625 -7.75 10.015625 -7.875 9.859375 -7.875 C 9.828125 -7.875 9.8125 -7.859375 9.609375 -7.765625 L 1.53125 -4.046875 C 1.25 -3.921875 1.21875 -3.828125 1.21875 -3.734375 C 1.21875 -3.625 1.234375 -3.546875 1.53125 -3.40625 L 9.609375 0.3125 C 9.796875 0.40625 9.828125 0.421875 9.859375 0.421875 C 10.015625 0.421875 10.140625 0.296875 10.140625 0.140625 C 10.140625 0.046875 10.109375 -0.0625 9.84375 -0.171875 L 2.15625 -3.71875 Z M 9.84375 -7.28125 "/>
+<path style="stroke:none;" d="M 8.40625 -6.203125 C 8.5625 -6.28125 8.640625 -6.34375 8.640625 -6.46875 C 8.640625 -6.609375 8.53125 -6.71875 8.390625 -6.71875 C 8.359375 -6.71875 8.328125 -6.71875 8.171875 -6.640625 L 1.265625 -3.390625 C 1.140625 -3.328125 1.03125 -3.265625 1.03125 -3.109375 C 1.03125 -2.96875 1.140625 -2.90625 1.265625 -2.84375 L 8.171875 0.40625 C 8.328125 0.5 8.359375 0.5 8.390625 0.5 C 8.53125 0.5 8.640625 0.390625 8.640625 0.25 C 8.640625 0.109375 8.5625 0.046875 8.40625 -0.03125 L 1.875 -3.109375 Z M 8.40625 -6.203125 "/>
</symbol>
<symbol overflow="visible" id="glyph3-0">
<path style="stroke:none;" d=""/>
</symbol>
<symbol overflow="visible" id="glyph3-1">
-<path style="stroke:none;" d="M 4.453125 -10.015625 C 4.46875 -10.109375 4.5 -10.171875 4.5 -10.21875 C 4.5 -10.359375 4.390625 -10.359375 4.15625 -10.359375 L 2.65625 -10.21875 C 2.453125 -10.203125 2.3125 -10.1875 2.3125 -9.921875 C 2.3125 -9.765625 2.4375 -9.765625 2.640625 -9.765625 C 3.390625 -9.765625 3.390625 -9.640625 3.390625 -9.484375 C 3.390625 -9.421875 3.359375 -9.28125 3.34375 -9.21875 L 1.46875 -1.6875 C 1.4375 -1.546875 1.390625 -1.390625 1.390625 -1.171875 C 1.390625 -0.375 1.890625 0.15625 2.578125 0.15625 C 3.09375 0.15625 3.390625 -0.1875 3.59375 -0.609375 C 3.875 -1.109375 4.078125 -2.078125 4.078125 -2.125 C 4.078125 -2.265625 3.953125 -2.265625 3.890625 -2.265625 C 3.828125 -2.265625 3.71875 -2.265625 3.6875 -2.1875 C 3.671875 -2.140625 3.609375 -1.90625 3.5625 -1.78125 C 3.375 -1.046875 3.125 -0.15625 2.609375 -0.15625 C 2.28125 -0.15625 2.203125 -0.46875 2.203125 -0.75 C 2.203125 -0.9375 2.28125 -1.359375 2.328125 -1.546875 Z M 4.453125 -10.015625 "/>
+<path style="stroke:none;" d="M 3.765625 -8.328125 C 3.78125 -8.375 3.8125 -8.46875 3.8125 -8.5 C 3.8125 -8.609375 3.734375 -8.640625 3.640625 -8.640625 C 3.59375 -8.640625 3.46875 -8.625 3.4375 -8.625 L 2.203125 -8.515625 C 2.0625 -8.5 1.921875 -8.5 1.921875 -8.25 C 1.921875 -8.125 2.046875 -8.125 2.21875 -8.125 C 2.8125 -8.125 2.84375 -8.03125 2.84375 -7.90625 C 2.84375 -7.875 2.796875 -7.703125 2.796875 -7.703125 L 1.25 -1.46875 C 1.234375 -1.421875 1.171875 -1.171875 1.171875 -0.984375 C 1.171875 -0.328125 1.625 0.140625 2.21875 0.140625 C 2.6875 0.140625 2.9375 -0.203125 3.09375 -0.515625 C 3.3125 -0.953125 3.484375 -1.75 3.484375 -1.78125 C 3.484375 -1.90625 3.390625 -1.90625 3.296875 -1.90625 C 3.234375 -1.90625 3.15625 -1.90625 3.125 -1.84375 L 3.03125 -1.53125 C 2.828125 -0.65625 2.59375 -0.140625 2.234375 -0.140625 C 1.921875 -0.140625 1.921875 -0.46875 1.921875 -0.640625 C 1.921875 -0.734375 1.921875 -0.921875 2 -1.21875 Z M 3.765625 -8.328125 "/>
</symbol>
<symbol overflow="visible" id="glyph3-2">
-<path style="stroke:none;" d="M 7.09375 -5.703125 C 7.140625 -5.875 7.140625 -5.921875 7.140625 -5.9375 C 7.140625 -6.109375 7.015625 -6.296875 6.75 -6.296875 C 6.28125 -6.296875 6.171875 -5.71875 6.171875 -5.71875 L 6.15625 -5.703125 C 5.875 -6.40625 5.359375 -6.59375 4.953125 -6.59375 C 3.328125 -6.59375 1.609375 -4.296875 1.609375 -2.125 C 1.609375 -0.796875 2.3125 0.15625 3.328125 0.15625 C 3.9375 0.15625 4.5625 -0.234375 5.125 -0.90625 C 5.28125 0 5.953125 0.15625 6.296875 0.15625 C 6.890625 0.15625 7.1875 -0.28125 7.375 -0.71875 C 7.640625 -1.234375 7.8125 -2.09375 7.8125 -2.140625 C 7.8125 -2.265625 7.671875 -2.265625 7.625 -2.265625 C 7.4375 -2.265625 7.421875 -2.25 7.328125 -1.90625 C 7.03125 -0.671875 6.75 -0.15625 6.328125 -0.15625 C 6 -0.15625 5.9375 -0.46875 5.9375 -0.75 C 5.9375 -0.96875 5.984375 -1.3125 6.046875 -1.53125 Z M 5.21875 -1.8125 C 5.125 -1.421875 4.234375 -0.15625 3.359375 -0.15625 C 2.5625 -0.15625 2.546875 -1.3125 2.546875 -1.5 C 2.546875 -2.234375 3.015625 -4 3.25 -4.59375 C 3.640625 -5.53125 4.3125 -6.28125 4.953125 -6.28125 C 5.859375 -6.28125 5.953125 -4.953125 5.953125 -4.859375 C 5.953125 -4.84375 5.921875 -4.671875 5.921875 -4.640625 Z M 5.21875 -1.8125 "/>
+<path style="stroke:none;" d="M 4.34375 -0.734375 C 4.484375 -0.125 4.9375 0.140625 5.375 0.140625 C 5.84375 0.140625 6.109375 -0.171875 6.28125 -0.5625 C 6.515625 -1.03125 6.65625 -1.75 6.65625 -1.78125 C 6.65625 -1.90625 6.5625 -1.90625 6.46875 -1.90625 C 6.328125 -1.90625 6.3125 -1.890625 6.234375 -1.625 C 6.0625 -0.921875 5.828125 -0.140625 5.40625 -0.140625 C 5.078125 -0.140625 5.078125 -0.46875 5.078125 -0.640625 C 5.078125 -0.734375 5.078125 -0.9375 5.171875 -1.28125 L 6.015625 -4.671875 C 6.0625 -4.84375 6.0625 -4.875 6.0625 -4.9375 C 6.0625 -5.1875 5.859375 -5.25 5.734375 -5.25 C 5.328125 -5.25 5.25 -4.828125 5.234375 -4.765625 C 5 -5.3125 4.59375 -5.5 4.203125 -5.5 C 2.8125 -5.5 1.34375 -3.609375 1.34375 -1.796875 C 1.34375 -0.734375 1.921875 0.140625 2.859375 0.140625 C 3.296875 0.140625 3.84375 -0.125 4.34375 -0.734375 Z M 5.015625 -3.890625 L 4.4375 -1.546875 C 4.328125 -1.140625 3.5625 -0.140625 2.875 -0.140625 C 2.296875 -0.140625 2.1875 -0.875 2.1875 -1.25 C 2.1875 -1.875 2.578125 -3.328125 2.796875 -3.84375 C 3.109375 -4.609375 3.6875 -5.234375 4.203125 -5.234375 C 4.75 -5.234375 5.0625 -4.578125 5.0625 -4.0625 C 5.0625 -4.03125 5.046875 -3.96875 5.015625 -3.890625 Z M 5.015625 -3.890625 "/>
</symbol>
<symbol overflow="visible" id="glyph3-3">
-<path style="stroke:none;" d="M 4.453125 -10.015625 C 4.484375 -10.125 4.5 -10.171875 4.5 -10.21875 C 4.5 -10.359375 4.390625 -10.359375 4.15625 -10.359375 L 2.65625 -10.21875 C 2.453125 -10.203125 2.3125 -10.1875 2.3125 -9.921875 C 2.3125 -9.765625 2.4375 -9.765625 2.640625 -9.765625 C 3.390625 -9.765625 3.390625 -9.640625 3.390625 -9.484375 C 3.390625 -9.40625 3.359375 -9.3125 3.34375 -9.234375 L 1.84375 -3.1875 C 1.703125 -2.640625 1.703125 -2.25 1.703125 -2.09375 C 1.703125 -0.671875 2.421875 0.15625 3.34375 0.15625 C 5.015625 0.15625 6.703125 -2.1875 6.703125 -4.3125 C 6.703125 -5.609375 6.015625 -6.59375 4.984375 -6.59375 C 4.25 -6.59375 3.625 -5.984375 3.390625 -5.75 Z M 3.359375 -0.15625 C 2.6875 -0.15625 2.484375 -0.953125 2.484375 -1.578125 C 2.484375 -2.171875 2.640625 -2.765625 2.96875 -4.109375 C 3.015625 -4.25 3.046875 -4.40625 3.09375 -4.5625 C 3.234375 -5.140625 4.15625 -6.28125 4.9375 -6.28125 C 5.484375 -6.28125 5.765625 -5.734375 5.765625 -4.9375 C 5.765625 -4.109375 5.265625 -2.234375 4.953125 -1.609375 C 4.4375 -0.5625 3.828125 -0.15625 3.359375 -0.15625 Z M 3.359375 -0.15625 "/>
+<path style="stroke:none;" d="M 3.765625 -8.328125 C 3.78125 -8.375 3.8125 -8.46875 3.8125 -8.5 C 3.8125 -8.609375 3.734375 -8.640625 3.640625 -8.640625 C 3.59375 -8.640625 3.46875 -8.625 3.4375 -8.625 L 2.203125 -8.515625 C 2.0625 -8.5 1.921875 -8.5 1.921875 -8.25 C 1.921875 -8.125 2.046875 -8.125 2.21875 -8.125 C 2.8125 -8.125 2.84375 -8.03125 2.84375 -7.90625 C 2.84375 -7.875 2.796875 -7.703125 2.796875 -7.703125 L 1.5625 -2.78125 C 1.5625 -2.734375 1.4375 -2.234375 1.4375 -1.75 C 1.4375 -0.703125 1.953125 0.140625 2.859375 0.140625 C 4.265625 0.140625 5.71875 -1.734375 5.71875 -3.5625 C 5.71875 -4.890625 4.96875 -5.5 4.21875 -5.5 C 3.75 -5.5 3.328125 -5.25 2.90625 -4.84375 Z M 2.859375 -0.140625 C 2.546875 -0.140625 2.140625 -0.40625 2.140625 -1.328125 C 2.140625 -1.875 2.25 -2.3125 2.609375 -3.734375 C 2.703125 -4.03125 2.703125 -4.0625 2.890625 -4.3125 C 3.25 -4.8125 3.71875 -5.234375 4.203125 -5.234375 C 4.75 -5.234375 4.875 -4.515625 4.875 -4.125 C 4.875 -3.59375 4.546875 -2.109375 4.1875 -1.3125 C 4.03125 -1.015625 3.5 -0.140625 2.859375 -0.140625 Z M 2.859375 -0.140625 "/>
</symbol>
<symbol overflow="visible" id="glyph3-4">
-<path style="stroke:none;" d="M 3.4375 -3.46875 C 3.953125 -3.46875 6.765625 -3.46875 6.765625 -5.34375 C 6.765625 -6.015625 6.21875 -6.59375 5.328125 -6.59375 C 3.78125 -6.59375 1.703125 -5.0625 1.703125 -2.4375 C 1.703125 -0.921875 2.484375 0.15625 3.75 0.15625 C 5.59375 0.15625 6.828125 -1.359375 6.828125 -1.5625 C 6.828125 -1.671875 6.703125 -1.796875 6.625 -1.796875 C 6.578125 -1.796875 6.5625 -1.78125 6.4375 -1.640625 C 5.640625 -0.5625 4.53125 -0.15625 3.765625 -0.15625 C 2.78125 -0.15625 2.640625 -1.328125 2.640625 -1.8125 C 2.640625 -2.46875 2.75 -2.890625 2.890625 -3.46875 Z M 2.984375 -3.765625 C 3.578125 -6.140625 5.046875 -6.28125 5.3125 -6.28125 C 5.921875 -6.28125 6.265625 -5.875 6.265625 -5.359375 C 6.265625 -3.765625 3.78125 -3.765625 3.296875 -3.765625 Z M 2.984375 -3.765625 "/>
+<path style="stroke:none;" d="M 2.96875 -2.875 C 3.34375 -2.875 4.1875 -2.90625 4.78125 -3.15625 C 5.765625 -3.546875 5.765625 -4.359375 5.765625 -4.453125 C 5.765625 -5.015625 5.3125 -5.5 4.515625 -5.5 C 3.203125 -5.5 1.421875 -4.25 1.421875 -2.046875 C 1.421875 -0.921875 2.015625 0.140625 3.203125 0.140625 C 4.796875 0.140625 5.828125 -1.109375 5.828125 -1.296875 C 5.828125 -1.359375 5.734375 -1.5 5.625 -1.5 C 5.578125 -1.5 5.5625 -1.484375 5.46875 -1.359375 C 4.546875 -0.1875 3.4375 -0.140625 3.21875 -0.140625 C 2.421875 -0.140625 2.28125 -1.015625 2.28125 -1.5 C 2.28125 -1.984375 2.40625 -2.546875 2.484375 -2.875 Z M 2.5625 -3.15625 C 3.09375 -5.1875 4.390625 -5.234375 4.515625 -5.234375 C 5 -5.234375 5.296875 -4.890625 5.296875 -4.46875 C 5.296875 -3.15625 3.234375 -3.15625 2.828125 -3.15625 Z M 2.5625 -3.15625 "/>
</symbol>
<symbol overflow="visible" id="glyph4-0">
<path style="stroke:none;" d=""/>
</symbol>
<symbol overflow="visible" id="glyph4-1">
-<path style="stroke:none;" d="M 3.046875 -5.9375 L 4.4375 -5.9375 L 4.4375 -6.625 L 2.953125 -6.625 L 2.953125 -8.15625 C 2.953125 -9.90625 4.140625 -9.921875 4.296875 -9.921875 C 4.34375 -9.921875 4.40625 -9.921875 4.46875 -9.90625 C 4.3125 -9.796875 4.109375 -9.546875 4.109375 -9.15625 C 4.109375 -8.515625 4.625 -8.234375 5.015625 -8.234375 C 5.46875 -8.234375 5.9375 -8.546875 5.9375 -9.15625 C 5.9375 -9.78125 5.421875 -10.453125 4.34375 -10.453125 C 2.96875 -10.453125 1.4375 -9.84375 1.4375 -8.140625 L 1.4375 -6.625 L 0.5625 -6.625 L 0.5625 -5.9375 L 1.4375 -5.9375 L 1.4375 -0.703125 L 0.40625 -0.703125 L 0.40625 0 C 0.921875 -0.015625 1.59375 -0.046875 2.28125 -0.046875 C 2.859375 -0.046875 3.8125 -0.046875 4.34375 0 L 4.34375 -0.703125 L 3.046875 -0.703125 Z M 3.046875 -5.9375 "/>
+<path style="stroke:none;" d="M 2.546875 -4.9375 L 3.703125 -4.9375 L 3.703125 -5.53125 L 2.46875 -5.53125 L 2.46875 -6.796875 C 2.46875 -8.25 3.453125 -8.265625 3.59375 -8.265625 C 3.625 -8.265625 3.671875 -8.265625 3.71875 -8.25 C 3.59375 -8.171875 3.421875 -7.953125 3.421875 -7.640625 C 3.421875 -7.09375 3.859375 -6.859375 4.1875 -6.859375 C 4.5625 -6.859375 4.953125 -7.125 4.953125 -7.640625 C 4.953125 -8.15625 4.515625 -8.71875 3.625 -8.71875 C 2.484375 -8.71875 1.203125 -8.203125 1.203125 -6.78125 L 1.203125 -5.53125 L 0.46875 -5.53125 L 0.46875 -4.9375 L 1.203125 -4.9375 L 1.203125 -0.578125 L 0.34375 -0.578125 L 0.34375 0 C 0.765625 -0.015625 1.328125 -0.03125 1.90625 -0.03125 C 2.375 -0.03125 3.171875 -0.03125 3.625 0 L 3.625 -0.578125 L 2.546875 -0.578125 Z M 2.546875 -4.9375 "/>
</symbol>
<symbol overflow="visible" id="glyph4-2">
-<path style="stroke:none;" d="M 7.03125 -3.265625 C 7.03125 -5.375 5.71875 -6.765625 3.71875 -6.765625 C 1.796875 -6.765625 0.421875 -5.4375 0.421875 -3.265625 C 0.421875 -1.125 1.828125 0.09375 3.71875 0.09375 C 5.6875 0.09375 7.03125 -1.1875 7.03125 -3.265625 Z M 3.734375 -0.515625 C 3.1875 -0.515625 2.609375 -0.84375 2.453125 -1.5 C 2.328125 -1.984375 2.328125 -2.890625 2.328125 -3.421875 C 2.328125 -4.125 2.328125 -4.84375 2.46875 -5.3125 C 2.609375 -5.890625 3.171875 -6.234375 3.71875 -6.234375 C 4.359375 -6.234375 4.859375 -5.796875 4.984375 -5.3125 C 5.125 -4.828125 5.125 -4.109375 5.125 -3.421875 C 5.125 -2.71875 5.125 -1.9375 4.96875 -1.4375 C 4.828125 -0.84375 4.265625 -0.515625 3.734375 -0.515625 Z M 3.734375 -0.515625 "/>
+<path style="stroke:none;" d="M 5.859375 -2.734375 C 5.859375 -4.484375 4.765625 -5.640625 3.09375 -5.640625 C 1.5 -5.640625 0.34375 -4.53125 0.34375 -2.734375 C 0.34375 -0.9375 1.515625 0.078125 3.09375 0.078125 C 4.75 0.078125 5.859375 -0.984375 5.859375 -2.734375 Z M 3.109375 -0.421875 C 2.65625 -0.421875 2.171875 -0.703125 2.046875 -1.25 C 1.9375 -1.65625 1.9375 -2.421875 1.9375 -2.859375 C 1.9375 -3.4375 1.9375 -4.03125 2.0625 -4.4375 C 2.171875 -4.90625 2.640625 -5.1875 3.09375 -5.1875 C 3.640625 -5.1875 4.046875 -4.828125 4.15625 -4.4375 C 4.265625 -4.015625 4.265625 -3.421875 4.265625 -2.859375 C 4.265625 -2.265625 4.265625 -1.625 4.140625 -1.203125 C 4.015625 -0.703125 3.5625 -0.421875 3.109375 -0.421875 Z M 3.109375 -0.421875 "/>
</symbol>
<symbol overflow="visible" id="glyph4-3">
-<path style="stroke:none;" d="M 2.890625 -3.375 C 2.890625 -4.5 3.109375 -6.1875 4.4375 -6.1875 C 4.421875 -6.171875 4.15625 -5.9375 4.15625 -5.5 C 4.15625 -4.890625 4.625 -4.578125 5.0625 -4.578125 C 5.5 -4.578125 5.96875 -4.90625 5.96875 -5.5 C 5.96875 -6.328125 5.09375 -6.71875 4.375 -6.71875 C 3.6875 -6.71875 3.0625 -6.359375 2.734375 -5.359375 L 2.71875 -5.359375 L 2.71875 -6.71875 L 0.234375 -6.609375 L 0.234375 -5.90625 C 1.171875 -5.90625 1.265625 -5.90625 1.265625 -5.3125 L 1.265625 -0.703125 L 0.234375 -0.703125 L 0.234375 0 C 0.765625 -0.015625 1.4375 -0.046875 2.125 -0.046875 C 2.6875 -0.046875 3.640625 -0.046875 4.1875 0 L 4.1875 -0.703125 L 2.890625 -0.703125 Z M 2.890625 -3.375 "/>
+<path style="stroke:none;" d="M 2.40625 -2.8125 C 2.40625 -3.75 2.59375 -5.15625 3.703125 -5.15625 C 3.6875 -5.140625 3.46875 -4.9375 3.46875 -4.578125 C 3.46875 -4.078125 3.859375 -3.828125 4.21875 -3.828125 C 4.578125 -3.828125 4.984375 -4.078125 4.984375 -4.578125 C 4.984375 -5.28125 4.25 -5.609375 3.65625 -5.609375 C 3.078125 -5.609375 2.546875 -5.3125 2.28125 -4.46875 L 2.265625 -4.46875 L 2.265625 -5.609375 L 0.203125 -5.5 L 0.203125 -4.921875 C 0.96875 -4.921875 1.0625 -4.921875 1.0625 -4.4375 L 1.0625 -0.578125 L 0.203125 -0.578125 L 0.203125 0 C 0.640625 -0.015625 1.203125 -0.03125 1.765625 -0.03125 C 2.234375 -0.03125 3.03125 -0.03125 3.484375 0 L 3.484375 -0.578125 L 2.40625 -0.578125 Z M 2.40625 -2.8125 "/>
</symbol>
<symbol overflow="visible" id="glyph4-4">
-<path style="stroke:none;" d="M 3.1875 -9.21875 C 3.1875 -9.875 2.640625 -10.375 2.015625 -10.375 C 1.375 -10.375 0.84375 -9.859375 0.84375 -9.21875 C 0.84375 -8.578125 1.375 -8.046875 2.015625 -8.046875 C 2.640625 -8.046875 3.1875 -8.5625 3.1875 -9.21875 Z M 0.4375 -6.609375 L 0.4375 -5.90625 C 1.3125 -5.90625 1.421875 -5.90625 1.421875 -5.3125 L 1.421875 -0.703125 L 0.390625 -0.703125 L 0.390625 0 C 0.84375 -0.015625 1.578125 -0.046875 2.203125 -0.046875 C 2.65625 -0.046875 3.421875 -0.015625 3.953125 0 L 3.953125 -0.703125 L 3.03125 -0.703125 L 3.03125 -6.71875 Z M 0.4375 -6.609375 "/>
+<path style="stroke:none;" d="M 2.65625 -7.6875 C 2.65625 -8.234375 2.203125 -8.65625 1.6875 -8.65625 C 1.140625 -8.65625 0.703125 -8.21875 0.703125 -7.6875 C 0.703125 -7.140625 1.140625 -6.71875 1.6875 -6.71875 C 2.203125 -6.71875 2.65625 -7.140625 2.65625 -7.6875 Z M 0.359375 -5.5 L 0.359375 -4.921875 C 1.09375 -4.921875 1.1875 -4.921875 1.1875 -4.4375 L 1.1875 -0.578125 L 0.328125 -0.578125 L 0.328125 0 C 0.703125 -0.015625 1.3125 -0.03125 1.84375 -0.03125 C 2.21875 -0.03125 2.859375 -0.015625 3.296875 0 L 3.296875 -0.578125 L 2.53125 -0.578125 L 2.53125 -5.609375 Z M 0.359375 -5.5 "/>
</symbol>
<symbol overflow="visible" id="glyph5-0">
<path style="stroke:none;" d=""/>
</symbol>
<symbol overflow="visible" id="glyph5-1">
-<path style="stroke:none;" d="M 8.1875 -3.4375 C 8.4375 -3.4375 8.703125 -3.4375 8.703125 -3.734375 C 8.703125 -4.03125 8.4375 -4.03125 8.1875 -4.03125 L 1.859375 -4.03125 C 2.03125 -6.03125 3.75 -7.46875 5.859375 -7.46875 L 8.1875 -7.46875 C 8.4375 -7.46875 8.703125 -7.46875 8.703125 -7.765625 C 8.703125 -8.0625 8.4375 -8.0625 8.1875 -8.0625 L 5.828125 -8.0625 C 3.265625 -8.0625 1.234375 -6.125 1.234375 -3.734375 C 1.234375 -1.34375 3.265625 0.59375 5.828125 0.59375 L 8.1875 0.59375 C 8.4375 0.59375 8.703125 0.59375 8.703125 0.296875 C 8.703125 0 8.4375 0 8.1875 0 L 5.859375 0 C 3.75 0 2.03125 -1.4375 1.859375 -3.4375 Z M 8.1875 -3.4375 "/>
+<path style="stroke:none;" d="M 6.828125 -2.859375 C 7.03125 -2.859375 7.265625 -2.859375 7.265625 -3.109375 C 7.265625 -3.359375 7.03125 -3.359375 6.828125 -3.359375 L 1.546875 -3.359375 C 1.6875 -5.03125 3.125 -6.21875 4.875 -6.21875 L 6.828125 -6.21875 C 7.03125 -6.21875 7.265625 -6.21875 7.265625 -6.46875 C 7.265625 -6.71875 7.03125 -6.71875 6.828125 -6.71875 L 4.859375 -6.71875 C 2.734375 -6.71875 1.03125 -5.109375 1.03125 -3.109375 C 1.03125 -1.125 2.734375 0.5 4.859375 0.5 L 6.828125 0.5 C 7.03125 0.5 7.265625 0.5 7.265625 0.25 C 7.265625 0 7.03125 0 6.828125 0 L 4.875 0 C 3.125 0 1.6875 -1.203125 1.546875 -2.859375 Z M 6.828125 -2.859375 "/>
</symbol>
<symbol overflow="visible" id="glyph6-0">
<path style="stroke:none;" d=""/>
</symbol>
<symbol overflow="visible" id="glyph6-1">
-<path style="stroke:none;" d="M 6.84375 -4.84375 C 6.984375 -4.84375 7.171875 -4.84375 7.171875 -5.109375 C 7.171875 -5.390625 7 -5.390625 6.84375 -5.390625 L 0.875 -5.390625 C 0.734375 -5.390625 0.546875 -5.390625 0.546875 -5.125 C 0.546875 -4.84375 0.71875 -4.84375 0.875 -4.84375 Z M 6.84375 -2.0625 C 6.984375 -2.0625 7.171875 -2.0625 7.171875 -2.328125 C 7.171875 -2.609375 7 -2.609375 6.84375 -2.609375 L 0.875 -2.609375 C 0.734375 -2.609375 0.546875 -2.609375 0.546875 -2.34375 C 0.546875 -2.0625 0.71875 -2.0625 0.875 -2.0625 Z M 6.84375 -2.0625 "/>
+<path style="stroke:none;" d="M 5.8125 -4.078125 C 5.9375 -4.078125 6.09375 -4.078125 6.09375 -4.328125 C 6.09375 -4.5625 5.9375 -4.5625 5.8125 -4.5625 L 0.75 -4.5625 C 0.640625 -4.5625 0.46875 -4.5625 0.46875 -4.328125 C 0.46875 -4.078125 0.640625 -4.078125 0.765625 -4.078125 Z M 5.8125 -1.65625 C 5.9375 -1.65625 6.09375 -1.65625 6.09375 -1.90625 C 6.09375 -2.15625 5.9375 -2.15625 5.8125 -2.15625 L 0.765625 -2.15625 C 0.640625 -2.15625 0.46875 -2.15625 0.46875 -1.90625 C 0.46875 -1.65625 0.640625 -1.65625 0.75 -1.65625 Z M 5.8125 -1.65625 "/>
</symbol>
</g>
</defs>
<g id="surface1">
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph0-1" x="0" y="12.64"/>
- <use xlink:href="#glyph0-2" x="11.518835" y="12.64"/>
+ <use xlink:href="#glyph0-1" x="0" y="10.4615"/>
+ <use xlink:href="#glyph0-2" x="9.598965" y="10.4615"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph0-3" x="20.355222" y="12.64"/>
- <use xlink:href="#glyph0-4" x="29.188621" y="12.64"/>
- <use xlink:href="#glyph0-5" x="38.687027" y="12.64"/>
+ <use xlink:href="#glyph0-3" x="16.962572" y="10.4615"/>
+ <use xlink:href="#glyph0-4" x="24.323688" y="10.4615"/>
+ <use xlink:href="#glyph0-5" x="32.238974" y="10.4615"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph0-2" x="49.844218" y="12.64"/>
- <use xlink:href="#glyph0-6" x="59.009373" y="12.64"/>
- <use xlink:href="#glyph0-7" x="68.00865" y="12.64"/>
+ <use xlink:href="#glyph0-2" x="41.53657" y="10.4615"/>
+ <use xlink:href="#glyph0-6" x="49.174148" y="10.4615"/>
+ <use xlink:href="#glyph0-7" x="56.673495" y="10.4615"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-1" x="77.33875" y="12.64"/>
+ <use xlink:href="#glyph1-1" x="64.44875" y="10.4615"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-1" x="83.02875" y="12.64"/>
+ <use xlink:href="#glyph2-1" x="69.2925" y="10.4615"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-2" x="92.365761" y="12.64"/>
+ <use xlink:href="#glyph2-2" x="77.253863" y="10.4615"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-3" x="98.926177" y="12.64"/>
+ <use xlink:href="#glyph2-3" x="82.780615" y="10.4615"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-2" x="110.639284" y="12.64"/>
+ <use xlink:href="#glyph2-2" x="92.695893" y="10.4615"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-4" x="117.184756" y="12.64"/>
+ <use xlink:href="#glyph2-4" x="98.222645" y="10.4615"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-2" x="124.79723" y="12.64"/>
+ <use xlink:href="#glyph2-2" x="104.707052" y="10.4615"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-5" x="131.357646" y="12.64"/>
+ <use xlink:href="#glyph2-5" x="110.246258" y="10.4615"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-2" x="136.3475" y="12.64"/>
+ <use xlink:href="#glyph1-2" x="114.53625" y="10.4615"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-3" x="0.000000000000017764" y="30.6975"/>
+ <use xlink:href="#glyph1-3" x="0.000000000000017764" y="25.40525"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-4" x="18.29" y="30.6975"/>
+ <use xlink:href="#glyph2-4" x="15.56625" y="25.40525"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-6" x="25.902474" y="30.6975"/>
+ <use xlink:href="#glyph2-6" x="22.050657" y="25.40525"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph3-1" x="29.965" y="30.6975"/>
- <use xlink:href="#glyph3-2" x="33.701" y="30.6975"/>
- <use xlink:href="#glyph3-3" x="41.173" y="30.6975"/>
+ <use xlink:href="#glyph3-1" x="25.50875" y="25.40525"/>
+ <use xlink:href="#glyph3-2" x="28.691801" y="25.40525"/>
+ <use xlink:href="#glyph3-3" x="35.056657" y="25.40525"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph3-4" x="47.1506" y="30.6975"/>
- <use xlink:href="#glyph3-1" x="53.8754" y="30.6975"/>
+ <use xlink:href="#glyph3-4" x="40.150036" y="25.40525"/>
+ <use xlink:href="#glyph3-1" x="45.878531" y="25.40525"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-4" x="63.3125" y="30.6975"/>
+ <use xlink:href="#glyph1-4" x="53.805" y="25.40525"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-5" x="78.845" y="30.6975"/>
+ <use xlink:href="#glyph2-5" x="66.95" y="25.40525"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-5" x="0.000000000000026645" y="48.755"/>
+ <use xlink:href="#glyph1-5" x="0.000000000000017764" y="40.349"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph4-1" x="18.29" y="48.755"/>
- <use xlink:href="#glyph4-2" x="22.856886" y="48.755"/>
- <use xlink:href="#glyph4-3" x="30.328886" y="48.755"/>
+ <use xlink:href="#glyph4-1" x="15.56625" y="40.349"/>
+ <use xlink:href="#glyph4-2" x="19.371963" y="40.349"/>
+ <use xlink:href="#glyph4-3" x="25.598588" y="40.349"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-1" x="41.7025" y="48.755"/>
+ <use xlink:href="#glyph1-1" x="35.07625" y="40.349"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-7" x="47.39375" y="48.755"/>
- <use xlink:href="#glyph2-2" x="55.722041" y="48.755"/>
+ <use xlink:href="#glyph2-7" x="39.92" y="40.349"/>
+ <use xlink:href="#glyph2-2" x="47.049486" y="40.349"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-4" x="62.282457" y="48.755"/>
+ <use xlink:href="#glyph2-4" x="52.588691" y="40.349"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-2" x="69.88625" y="48.755"/>
+ <use xlink:href="#glyph1-2" x="59.06625" y="40.349"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph5-1" x="79.72875" y="48.755"/>
+ <use xlink:href="#glyph5-1" x="67.36875" y="40.349"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-3" x="93.8425" y="48.755"/>
+ <use xlink:href="#glyph2-3" x="79.13" y="40.349"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-6" x="0.000000000000035527" y="66.81125"/>
+ <use xlink:href="#glyph1-6" x="0.000000000000017764" y="55.29275"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph4-4" x="47.265" y="66.81125"/>
- <use xlink:href="#glyph4-1" x="51.416443" y="66.81125"/>
+ <use xlink:href="#glyph4-4" x="39.7125" y="55.29275"/>
+ <use xlink:href="#glyph4-1" x="43.172013" y="55.29275"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-7" x="60.96375" y="66.81125"/>
+ <use xlink:href="#glyph1-7" x="51.1275" y="55.29275"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-8" x="72.43125" y="66.81125"/>
+ <use xlink:href="#glyph2-8" x="60.81375" y="55.29275"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-4" x="87.967032" y="66.81125"/>
+ <use xlink:href="#glyph2-4" x="73.961891" y="55.29275"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-6" x="95.579506" y="66.81125"/>
+ <use xlink:href="#glyph2-6" x="80.446299" y="55.29275"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph3-1" x="99.6375" y="66.81125"/>
- <use xlink:href="#glyph3-2" x="103.3735" y="66.81125"/>
- <use xlink:href="#glyph3-3" x="110.8455" y="66.81125"/>
+ <use xlink:href="#glyph3-1" x="83.90125" y="55.29275"/>
+ <use xlink:href="#glyph3-2" x="87.084301" y="55.29275"/>
+ <use xlink:href="#glyph3-3" x="93.449157" y="55.29275"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph3-4" x="116.8231" y="66.81125"/>
- <use xlink:href="#glyph3-1" x="123.5479" y="66.81125"/>
+ <use xlink:href="#glyph3-4" x="98.542536" y="55.29275"/>
+ <use xlink:href="#glyph3-1" x="104.271031" y="55.29275"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-8" x="132.985" y="66.81125"/>
+ <use xlink:href="#glyph2-8" x="112.1975" y="55.29275"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-5" x="148.520782" y="66.81125"/>
+ <use xlink:href="#glyph2-5" x="125.345641" y="55.29275"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-8" x="0.000000000000035527" y="84.86875"/>
+ <use xlink:href="#glyph1-8" x="0.000000000000017764" y="70.2365"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph0-1" x="76.24" y="84.86875"/>
- <use xlink:href="#glyph0-2" x="87.758835" y="84.86875"/>
+ <use xlink:href="#glyph0-1" x="63.8575" y="70.2365"/>
+ <use xlink:href="#glyph0-2" x="73.456465" y="70.2365"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph0-3" x="96.595222" y="84.86875"/>
- <use xlink:href="#glyph0-4" x="105.428621" y="84.86875"/>
- <use xlink:href="#glyph0-5" x="114.927027" y="84.86875"/>
+ <use xlink:href="#glyph0-3" x="80.820072" y="70.2365"/>
+ <use xlink:href="#glyph0-4" x="88.181188" y="70.2365"/>
+ <use xlink:href="#glyph0-5" x="96.096474" y="70.2365"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph0-2" x="126.084218" y="84.86875"/>
- <use xlink:href="#glyph0-6" x="135.249373" y="84.86875"/>
- <use xlink:href="#glyph0-7" x="144.24865" y="84.86875"/>
+ <use xlink:href="#glyph0-2" x="105.39407" y="70.2365"/>
+ <use xlink:href="#glyph0-6" x="113.031648" y="70.2365"/>
+ <use xlink:href="#glyph0-7" x="120.530995" y="70.2365"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-1" x="153.57875" y="84.86875"/>
+ <use xlink:href="#glyph1-1" x="128.30625" y="70.2365"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-1" x="159.26875" y="84.86875"/>
+ <use xlink:href="#glyph2-1" x="133.15" y="70.2365"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-2" x="168.605761" y="84.86875"/>
+ <use xlink:href="#glyph2-2" x="141.111363" y="70.2365"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-3" x="175.166177" y="84.86875"/>
+ <use xlink:href="#glyph2-3" x="146.638115" y="70.2365"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-2" x="186.879284" y="84.86875"/>
+ <use xlink:href="#glyph2-2" x="156.553393" y="70.2365"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-7" x="193.424756" y="84.86875"/>
- <use xlink:href="#glyph2-2" x="201.753048" y="84.86875"/>
+ <use xlink:href="#glyph2-7" x="162.080145" y="70.2365"/>
+ <use xlink:href="#glyph2-2" x="169.209631" y="70.2365"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-5" x="208.313464" y="84.86875"/>
+ <use xlink:href="#glyph2-5" x="174.748836" y="70.2365"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-2" x="213.30625" y="84.86875"/>
+ <use xlink:href="#glyph1-2" x="179.04" y="70.2365"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-9" x="0.000000000000071054" y="102.92625"/>
+ <use xlink:href="#glyph1-9" x="0.000000000000035527" y="85.1815"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph4-1" x="18.29" y="102.92625"/>
- <use xlink:href="#glyph4-2" x="22.856886" y="102.92625"/>
- <use xlink:href="#glyph4-3" x="30.328886" y="102.92625"/>
+ <use xlink:href="#glyph4-1" x="15.56625" y="85.1815"/>
+ <use xlink:href="#glyph4-2" x="19.371963" y="85.1815"/>
+ <use xlink:href="#glyph4-3" x="25.598588" y="85.1815"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-1" x="41.7025" y="102.92625"/>
+ <use xlink:href="#glyph1-1" x="35.07625" y="85.1815"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-7" x="47.39375" y="102.92625"/>
- <use xlink:href="#glyph2-2" x="55.722041" y="102.92625"/>
+ <use xlink:href="#glyph2-7" x="39.92" y="85.1815"/>
+ <use xlink:href="#glyph2-2" x="47.049486" y="85.1815"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-4" x="62.282457" y="102.92625"/>
+ <use xlink:href="#glyph2-4" x="52.588691" y="85.1815"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-2" x="69.88625" y="102.92625"/>
+ <use xlink:href="#glyph1-2" x="59.06625" y="85.1815"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph5-1" x="79.72875" y="102.92625"/>
+ <use xlink:href="#glyph5-1" x="67.36875" y="85.1815"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-3" x="93.8425" y="102.92625"/>
+ <use xlink:href="#glyph2-3" x="79.13" y="85.1815"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-10" x="0.000000000000071054" y="120.98375"/>
+ <use xlink:href="#glyph1-10" x="0.000000000000035527" y="100.12525"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph4-4" x="47.265" y="120.98375"/>
- <use xlink:href="#glyph4-1" x="51.416443" y="120.98375"/>
+ <use xlink:href="#glyph4-4" x="39.7125" y="100.12525"/>
+ <use xlink:href="#glyph4-1" x="43.172013" y="100.12525"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-7" x="60.96375" y="120.98375"/>
- <use xlink:href="#glyph2-6" x="69.292041" y="120.98375"/>
+ <use xlink:href="#glyph2-7" x="51.1275" y="100.12525"/>
+ <use xlink:href="#glyph2-6" x="58.256986" y="100.12525"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph3-1" x="73.35625" y="120.98375"/>
- <use xlink:href="#glyph3-2" x="77.09225" y="120.98375"/>
- <use xlink:href="#glyph3-3" x="84.56425" y="120.98375"/>
+ <use xlink:href="#glyph3-1" x="61.71625" y="100.12525"/>
+ <use xlink:href="#glyph3-2" x="64.899301" y="100.12525"/>
+ <use xlink:href="#glyph3-3" x="71.264157" y="100.12525"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph3-4" x="90.54185" y="120.98375"/>
- <use xlink:href="#glyph3-1" x="97.26665" y="120.98375"/>
+ <use xlink:href="#glyph3-4" x="76.357536" y="100.12525"/>
+ <use xlink:href="#glyph3-1" x="82.086031" y="100.12525"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph6-1" x="106.93625" y="120.98375"/>
+ <use xlink:href="#glyph6-1" x="90.20625" y="100.12525"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph6-1" x="115.18125" y="120.98375"/>
+ <use xlink:href="#glyph6-1" x="97.21375" y="100.12525"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-7" x="127.28625" y="120.98375"/>
+ <use xlink:href="#glyph1-7" x="107.43875" y="100.12525"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-11" x="0.000000000000014211" y="139.04125"/>
+ <use xlink:href="#glyph1-11" x="-0.000000000000028422" y="115.069"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph0-1" x="76.24" y="139.04125"/>
- <use xlink:href="#glyph0-2" x="87.758835" y="139.04125"/>
+ <use xlink:href="#glyph0-1" x="63.8575" y="115.069"/>
+ <use xlink:href="#glyph0-2" x="73.456465" y="115.069"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph0-3" x="96.595222" y="139.04125"/>
- <use xlink:href="#glyph0-4" x="105.428621" y="139.04125"/>
- <use xlink:href="#glyph0-5" x="114.927027" y="139.04125"/>
+ <use xlink:href="#glyph0-3" x="80.820072" y="115.069"/>
+ <use xlink:href="#glyph0-4" x="88.181188" y="115.069"/>
+ <use xlink:href="#glyph0-5" x="96.096474" y="115.069"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph0-2" x="126.084218" y="139.04125"/>
- <use xlink:href="#glyph0-6" x="135.249373" y="139.04125"/>
- <use xlink:href="#glyph0-7" x="144.24865" y="139.04125"/>
+ <use xlink:href="#glyph0-2" x="105.39407" y="115.069"/>
+ <use xlink:href="#glyph0-6" x="113.031648" y="115.069"/>
+ <use xlink:href="#glyph0-7" x="120.530995" y="115.069"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-1" x="153.57875" y="139.04125"/>
+ <use xlink:href="#glyph1-1" x="128.30625" y="115.069"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-1" x="159.26875" y="139.04125"/>
+ <use xlink:href="#glyph2-1" x="133.15" y="115.069"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-2" x="168.605761" y="139.04125"/>
+ <use xlink:href="#glyph2-2" x="141.111363" y="115.069"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-3" x="175.166177" y="139.04125"/>
+ <use xlink:href="#glyph2-3" x="146.638115" y="115.069"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-2" x="186.879284" y="139.04125"/>
+ <use xlink:href="#glyph2-2" x="156.553393" y="115.069"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-7" x="193.424756" y="139.04125"/>
- <use xlink:href="#glyph2-2" x="201.753048" y="139.04125"/>
+ <use xlink:href="#glyph2-7" x="162.080145" y="115.069"/>
+ <use xlink:href="#glyph2-2" x="169.209631" y="115.069"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph2-5" x="208.313464" y="139.04125"/>
+ <use xlink:href="#glyph2-5" x="174.748836" y="115.069"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-12" x="216.62625" y="139.04125"/>
+ <use xlink:href="#glyph1-12" x="181.8075" y="115.069"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
- <use xlink:href="#glyph1-3" x="231.325168" y="139.04125"/>
- <use xlink:href="#glyph1-2" x="238.641751" y="139.04125"/>
+ <use xlink:href="#glyph1-3" x="194.258259" y="115.069"/>
+ <use xlink:href="#glyph1-2" x="200.484884" y="115.069"/>
</g>
</g>
</svg>
diff --git a/macros/latex/contrib/pseudo/doc/fig/readmefig.tex b/macros/latex/contrib/pseudo/doc/fig/readmefig.tex
index 27a5778288..6aabea257e 100644
--- a/macros/latex/contrib/pseudo/doc/fig/readmefig.tex
+++ b/macros/latex/contrib/pseudo/doc/fig/readmefig.tex
@@ -1,4 +1,4 @@
-\documentclass[preview,multi,12pt]{standalone}
+\documentclass[preview,multi]{standalone}
\usepackage{adjustbox}
\usepackage[kw]{pseudo}
\pseudoset{compact}
diff --git a/macros/latex/contrib/pseudo/doc/pseudo.bib b/macros/latex/contrib/pseudo/doc/pseudo.bib
index 91e20240af..b101e4fa30 100644
--- a/macros/latex/contrib/pseudo/doc/pseudo.bib
+++ b/macros/latex/contrib/pseudo/doc/pseudo.bib
@@ -4,7 +4,16 @@
title={Introduction to Algorithms},
year={2009},
publisher={MIT Press},
- edition={third}
+ edition={3rd ed.}
+}
+
+@book{Cormen:2022,
+ author={Thomas H. Cormen and Charles E. Leiserson and Ronald L. Rivest and
+ Clifford Stein},
+ title={Introduction to Algorithms},
+ year={2022},
+ publisher={MIT Press},
+ edition={4th ed.}
}
@book{Graham:1994,
diff --git a/macros/latex/contrib/pseudo/doc/pseudo.pdf b/macros/latex/contrib/pseudo/doc/pseudo.pdf
index 515978d79c..a33aa551c2 100644
--- a/macros/latex/contrib/pseudo/doc/pseudo.pdf
+++ b/macros/latex/contrib/pseudo/doc/pseudo.pdf
Binary files differ
diff --git a/macros/latex/contrib/pseudo/doc/pseudo.tex b/macros/latex/contrib/pseudo/doc/pseudo.tex
index de0e5a8a69..c5fc55456f 100644
--- a/macros/latex/contrib/pseudo/doc/pseudo.tex
+++ b/macros/latex/contrib/pseudo/doc/pseudo.tex
@@ -9,6 +9,8 @@
\usepackage{tabularx}
+\usepackage{tabto}
+
\usepackage{float}
\usepackage[small]{caption}
@@ -16,8 +18,6 @@
giveninits,doi=false,url=false,
natbib,sortcites,hyperref]{biblatex}
-\usepackage{noindentafter}
-
\renewcommand{\subtitlepunct}{\addcolon\addspace}
\renewbibmacro{in:}{}
\bibliography{pseudo}
@@ -25,6 +25,8 @@
% Avoid too much space after code:
\def\paragraph#1{\noindent\textbf{#1}\enskip}
+\usepackage{lmodern}
+
\let\origbfseries\bfseries
\def\bfseries{\fontseries{b}\selectfont}
@@ -43,15 +45,29 @@
\RequirePackage[hang,perpage,symbol*,bottom,stable]{footmisc}
\renewcommand{\footnotemargin}{1em}
-\usepackage[pdfusetitle, hidelinks]{hyperref}
+\usepackage[pdfusetitle, hidelinks, bookmarks=false]{hyperref}
\usepackage[xparse,
breakable,
hooks,
listingsutf8, documentation]{tcolorbox}
+% For box/float examples
+\tcbuselibrary{theorems}
+
\usepackage{pseudo}
-\usepackage{noindentafter}
+% ! Duplicate of the one inside the texexp in the HOWTO section:
+\pseudodefinestyle{fullwidth}{
+ begin-tabular =
+ \tabularx{\linewidth}[t]{@{}
+ r % Labels
+ >{\leavevmode\pseudosetup} % Indent, font, ...
+ X % Code (flexible)
+ >{\leavevmode\small\color{gray}} % Comment styling
+ p{0.5\linewidth} % Comments (fixed)
+ @{}},
+ end-tabular=\endtabularx,
+}
\usepackage{url}
\usepackage{amsopn} % For \newmcodes@ example
@@ -61,7 +77,13 @@
\usepackage{amsmath}
\DeclareMathOperator{\MyFunc}{my-func}
-\usepackage{cleveref}
+\usepackage{varioref}
+\usepackage[sort&compress,capitalize]{cleveref}
+
+\crefname{page}{page}{pages}
+\crefname{equation}{Eq.}{eqs.}
+\crefname{figure}{Fig.}{figs.}
+\crefname{section}{Sect.}{sects.}
\usepackage{booktabs}
@@ -94,20 +116,25 @@
\NewDocumentCommand \pkg { o m } {
\IfNoValueTF { #1 } {
- \textsf { #2 }
+ % The literal colon has a different meaning with expl3 syntax
+ \href{ https\c_colon_str//ctan.org/pkg/#2 }{ \textsf { #2 } }
} {
\href{ #1 }{ \textsf { #2 } }
}
}
+\NewDocumentCommand \codefont { m } {
+ \texttt{ #1 }
+}
+
\NewDocumentCommand \code { s m } {
\tl_set:Nn \l_tmpa_tl { #2 }
\IfBooleanT { #1 } {
\regex_replace_all:nnN
{ \s+ }{ \c{textnormal}\cB\{ \0 \cE\} } \l_tmpa_tl
}
- \texttt{ \l_tmpa_tl }
+ \codefont{ \l_tmpa_tl }
}
\ExplSyntaxOff
@@ -119,9 +146,8 @@
}
\NewDocumentCommand \shortcutted { m m } {%
- If some package defines \cs{#1} before \pkg{pseudo} is loaded,
- \pkg{pseudo} will not overwrite it. The command will still be available,
- as \cs{#2}.%
+ If some package defines \cs{#1} before \pkg{pseudo} is loaded, \pkg{pseudo}
+ will not overwrite it. The command will still be available, as \cs{#2}.%
}
\NewDocumentCommand \pseudoshortcutted { m } {%
@@ -156,6 +182,10 @@
The command set by the \refk{#1} option. Used as part of \refc{#2}.%
}
+\NewDocumentCommand \setandusedinit{ m m }{%
+ The command set by the \refk{#1} option. Used as part of the initial value
+ of \refk{#2}.%
+}
\NewDocumentCommand \fontcmd { m } {%
\setandused{#1font}{#1}%
@@ -178,6 +208,51 @@
See also \refc{#1}. (Note that \cs{pseudo#1} is used internally here.)%
}
+\NewExpandableDocumentCommand \tcolorboxstylepre { } {%
+ \parindent1.5em
+ \noindent
+ A style defined for use with \pkg{tcolorbox} (i.e., not with
+ \cs{pseudoset}).
+
+ A simple, manually numbered example:
+}
+
+\NewExpandableDocumentCommand \tcolorboxstylepost { } {%
+ To create a floating box, use the \pkg{tcolorbox} key \cs{float}. In
+ general, it is probably better to create such boxes with \cs{newtcbtheorem}.
+ For more information on using \pkg{tcolorbox} styles, see \cref{sec:floats}.
+
+}
+
+\NewExpandableDocumentCommand \tcolorboxstylenosource { m } {%
+\begin{docKey}{pseudo/#1}{}{\pkg{tcolorbox} style}
+ \parindent1.5em
+ \noindent
+ A style defined for use with \pkg{tcolorbox} (i.e., not with
+ \cs{pseudoset}).
+ A simple example:
+
+\begin{tcolorbox}[pseudo/#1,
+ title={Algorithm 1\enskip \pr{Hello}(x)}]
+ \begin{pseudo}
+ \kw{print} \st{Hello,} $x$
+ \end{pseudo}
+\end{tcolorbox}
+
+ \noindent
+ See the \refk{pseudo/boxed} reference entry and \cref{sec:floats} for more
+ information.
+\end{docKey}
+}
+
+\pgfqkeys {/tcb} {
+ listing/.style = {
+ listing only,
+ before skip balanced=8pt plus 2pt minus 2pt,
+ after app=\noindent
+ }
+}
+
\lstdefinestyle{tcblatex}{language={[LaTeX]TeX},
columns=fullflexible,
keepspaces=true,
@@ -187,12 +262,13 @@
extendedchars=true,
nolol,
inputencoding=\kvtcb@listingencoding,
- literate={\$}{\textcolor{black!65}{\$}}1,
+ literate={\$}{\textcolor{black!65}{\$}}{1}%
+ {~}{\textcolor{gray}{\raisebox{-.75ex}{\textasciitilde}}}{1},
+ commentstyle=\color{gray},
}
\let\braces\brackets
-\makeatletter
\DeclareTCBListing{texexp}{ !O{} }{
empty,
arc=0pt,
@@ -207,15 +283,15 @@
},
left=1.5em, % \parindent -- but that changes inside doc
text above listing,
- before={\par\pagebreak[0]\medskip\parindent=0pt},
- after={\par\medskip\noindent},
+ before skip balanced=6pt plus 2pt minus 2pt,
+ after skip balanced=8pt plus 2pt minus 2pt,
+ after app=\noindent,
% Because listings messes with the equals sign:
before lower app={
- \pseudoeq
+ \RestorePseudoEq
},
#1
}
-\makeatother
\def\refc{\refCom*}
\def\refe{\refEnv*}
@@ -339,15 +415,33 @@
arc=0pt,
boxsep=0pt,
left=\parindent,
- before={\par\medskip\parindent=0pt},
- after={\mbox{}\\\def\if@endpe{%
- \@doendpe
- \let\par\@@par
- \iffalse}},
+ top=0pt,
+ bottom=0pt,
+ beforeafter skip balanced=\bigskipamount,
+ after app=\noindent,
#1
}
\makeatother
+% Doesn't work:
+% \usepackage{noindentafter}
+% \NoIndentAfterEnv{source}
+
+\newtcbtheorem[
+ number within = section,
+ crefname = {Algorithm}{algorithms}
+ ]%
+ {algorithm}{Algorithm}{pseudo/ruled}{alg}
+
+\newtcbtheorem[
+ use counter from = algorithm,
+ crefname={Algorithm}{algorithms}
+ ]%
+ % {internalpseudobox}{Algorithm}{float}{pbx}
+ {internalpseudobox}{Algorithm}{}{pbx}
+
+\usepackage{ellipsis}
+
\begin{document}
\maketitle
@@ -360,6 +454,7 @@ not all too opinionated manner. You don't need to use separate commands for
different constructs; the indentation level is controlled in a manner similar
to in a \code{tabbing} environment:
+\label{p:intro-euclid}
{
\pseudoset{kw}
\begin{texexp}
@@ -383,6 +478,74 @@ The only option usable here at the moment is \refk{kw} (used in the example
above), as the \cs{usepackage} command is a bit too eager in expanding its
arguments, but there are several options that may be provided to the
\refc{pseudoset} command, to configure things (see \cref{sec:cmdandkeyref}).
+For a more complete example, see \cref{alg:euclid}.
+
+{
+\pseudoset{kw}
+\TabPositions{1.5cm}
+% Duplicated in example, below, without [float]:
+\begin{algorithm}[float]{Euclid's algorithm, \pr{Euclid}(a, b)}{euclid}
+
+\textbf{Input:} \tab Two positive integers, $a$ and $b$.
+
+\textbf{Output:} \tab The greatest common divisor of $a$ and $b$.
+
+\begin{pseudo}[label=\small\arabic*, indent-mark, fullwidth]
+
+ while $a \neq b$ & If equal, both are gcd \\+
+ if $a > b$ & Reduce max with multiple of min \\+
+ $a = a - b$ & $a$ is largest \\-
+ else $b = b - a$ & $b$ is largest \\-
+ return $a$ & Both are gcd, so return one
+%
+\end{pseudo}
+
+The running time is quadratic in the number of bits in the input.
+
+\end{algorithm}
+}
+
+\subsection*{Microtutorial: How to produce \cref{alg:euclid}}
+
+The pseudocode in \cref{alg:euclid} is typeset in the same way as on
+\vpageref{p:intro-euclid}. The line numbers are styled using the \refk{label}
+key, the vertical lines are produced by the \refk{indent-mark} option, and the
+comments are just a separate column of a \code{tabularx}, which is used instead
+of the built-in \code{tabular}, as explained in
+\cref{sec:tabularx}.\footnote{That is, the \code{fullwidth} style that is
+defined \vpageref{p:fullwidth} is used in this example.} To get the surrounding
+ruled box, a \pkg{tcolorbox} is used, with the style \refk{pseudo/ruled}. This
+has been set up with a predefined box environment, \code{algorithm}, which is
+defined in \cref{sec:floats} (\vpageref{p:pseudo-ruled-def}). The \refc{pr}
+command and its relatives (as well as most other functionality) are discussed in
+\cref{sec:overview}, with individual definitions given in
+\cref{sec:reference}.\footnote{The actual implementations, with explanations,
+are found in \cref{sec:impl}.} The input and output descriptions are aligned
+using \cs{tab} from the \pkg{tabto} package (cf.\@ \cref{sec:tabstops}).
+
+\begin{texexp}[listing]
+% In document preamble:
+% \usepackage{tabto}
+% \TabPositions{1.5cm}
+
+\begin{algorithm}{Euclid's algorithm, \pr{Euclid}(a, b)}{euclid}
+
+\textbf{Input:} \tab Two positive integers, $a$ and $b$.
+
+\textbf{Output:} \tab The greatest common divisor of $a$ and $b$.
+
+\begin{pseudo}[label=\small\arabic*, indent-mark, fullwidth]
+ while $a \neq b$ & If equal, both are gcd \\+
+ if $a > b$ & Reduce max with multiple of min \\+
+ $a = a - b$ & $a$ is largest \\-
+ else $b = b - a$ & $b$ is largest \\-
+ return $a$ & Both are gcd, so return one
+\end{pseudo}
+
+The running time is quadratic in the number of bits in the input.
+
+\end{algorithm}
+\end{texexp}
\subsection*{Alternatives}
@@ -403,9 +566,9 @@ commands for conditionals, loops, etc.
The basic style of pseudocode is inspired by the standard reference
\emph{Introduction to Algorithms} by \citet{Cormen:2009} (i.e., similar to
-that of \pkg[https://ctan.org/pkg/newalg]{newalg},
+that of \pkg{newalg},
\pkg[https://ctan.org/tex-archive/macros/latex/contrib/clrscode]{clrscode} and
-\pkg[https://ctan.org/pkg/clrscode3e]{clrscode3e}).
+\pkg{clrscode3e}).
%
Rather than locking down all aspects of pseudocode appearance, however, I've
tried to make \pkg{pseudo} highly configurable, but if it's not flexible
@@ -413,15 +576,19 @@ enough, or just not to your liking, you might want to have a look at the
following packages:
\begin{quote}
+ \raggedright
\pkg[https://ctan.org/tex-archive/macros/latex/contrib/alg]{alg},
- \pkg[https://ctan.org/pkg/algobox]{algobox},
- \pkg[https://ctan.org/pkg/algorithm2e]{algorithm2e},
- \pkg[https://ctan.org/pkg/algorithmicx]{algorithmicx},
- \pkg[https://ctan.org/pkg/algorithms]{algorithms},
+ \pkg{algobox},
+ \pkg{algorithm2e},
+ \pkg{algorithmicx},
+ \pkg{algorithms},
+ \pkg{algpseudocodex},
+ \pkg{algxpar},
\pkg[https://ctan.org/tex-archive/macros/latex/contrib/clrscode]{clrscode},
- \pkg[https://ctan.org/pkg/clrscode3e]{clrscode3e},
+ \pkg{clrscode3e},
+ \pkg[https://www.cs.dartmouth.edu/~thc/]{clrscode4e},
\pkg[https://github.com/esneider/latex-pseudocode]{latex-pseudocode},
- \pkg[https://ctan.org/pkg/newalg]{newalg},
+ \pkg{newalg},
\pkg[https://ctan.org/tex-archive/macros/latex/contrib/program]{program},
\pkg[https://ctan.org/tex-archive/macros/latex/contrib/pseudocode]{pseudocode}
\end{quote}
@@ -429,29 +596,26 @@ following packages:
\noindent
There are also code-typesetting packages like
\pkg[https://ctan.org/tex-archive/macros/latex/contrib/listings]{listings} and
-\pkg[https://ctan.org/pkg/minted]{minted}, of course.
+\pkg{minted}, of course.
\subsection*{Using older \TeX\ distributions}
The imlementation of \pkg{pseudo} uses some functionality that isn't available
-in older \TeX\ distributions, in particular, older versions of
-\pkg[https://ctan.org/pkg/xparse]{xparse} and
-\pkg[https://ctan.org/pkg/expl3]{expl3}. Some care has been taken to make the
-code backward compatible to the point where it works on \TeX\ Live~2016, which
-is what is used (at the time of writing) on \href{https://arxiv.org}{arXiv}.
-If you run into issues somewhere else (e.g., when submitting to some publisher
-with a custom setup), feel free to
+in older \TeX\ distributions, in particular, older versions of \pkg{xparse} and
+\pkg{expl3}. Some care has been taken to make the code backward compatible to
+the point where it works on \TeX\ Live~2020, which is what is used (at the time
+of writing) on \href{https://arxiv.org}{arXiv}. If you run into issues somewhere
+else (e.g., when submitting to some publisher with a custom setup), feel free to
\href{https://github.com/mlhetland/pseudo.sty/issues}{file an issue}, or even
\href{https://github.com/mlhetland/pseudo.sty/pulls}{provide a pull request}
-with a fix. One thing to look out for is that older versions of
-\pkg[https://ctan.org/pkg/xparse]{xparse} parse arguments differently, so
-things like
-\begin{texexp}[listing only]
+with a fix. One thing to look out for is that older versions of \pkg{xparse}
+parse arguments differently, so things like
+\begin{texexp}[listing]
foo\\<1>
bar\\[hl]
\end{texexp}
would work, but separating the arguments with spaces, as in
-\begin{texexp}[listing only]
+\begin{texexp}[listing]
foo\\ <1>
bar\\ [hl]
\end{texexp}
@@ -460,6 +624,7 @@ from some of my examples, later). For more advice on working around an older
distribution, see also \cref{sec:older}.
\section{Overview}
+\label{sec:overview}
The main component of the \pkg{pseudo} package is the \refe{pseudo}
environment, which is, in a sense, a hybrid of \code{enumerate},
@@ -467,7 +632,7 @@ environment, which is, in a sense, a hybrid of \code{enumerate},
placed in a tabular row (for ease of highlighting and automatic column width
calculation), with functionality for increasing and decreasing indentation
similar to the \code{tabbing} commands \cs{+} and \cs{-} (in \pkg{pseudo},
-combined with the row separator \refc{\bslash}). Here, for example, is
+combined with the row separator \refc{\bslash}). Here, once again, is
Euclid's algorithm for finding the gcd of $a$ and $b$:
\begin{texexp}
@@ -508,8 +673,7 @@ name collisions, and are only defined if the names are not already in use when
The \refk{indent-length} option, which determines the length of each
indentation step, is initially set via the secondary \refk{indent-text} key,
so that the any code after \code{\cs{kw}\braces{else}} aligns with the
-indented text (a stylistic choice from
-\pkg[https://ctan.org/pkg/clrscode3e]{clrscode3e}):
+indented text (a stylistic choice from \pkg{clrscode3e}):
\begin{texexp}
\begin{pseudo}
\kw{if} $x < y$ \\+
@@ -518,9 +682,59 @@ indented text (a stylistic choice from
\end{pseudo}
\end{texexp}
%
-If you want, you can certainly create shortcuts, e.g.,
-\verb|\def\While{\kw{while}}|, or using various declaration commands, such as
-\refc{DeclarePseudoKeyword} or \refc{DeclarePseudoConstant}. Procedures and
+\label{p:indent-mark}%
+The indentation may also be configured with \refk{indent-mark}, which inserts a
+mark at every indenation step:
+\begin{texexp}
+\begin{pseudo}[indent-mark]
+ while $x\leq n$ \\+
+ $x = x + 1$ \\
+ if $f(x) < y$ \\+
+ $x = x + 1$ \\-
+ print $x$ \\-
+ return $x$
+\end{pseudo}
+\end{texexp}
+The default is a vertical line, but anything else may be supplied as an
+argument. To avoid adding to the indentation, you can wrap this argument in
+\cs{rlap}.\footnote{If your mark is very tall, and you don't wish it to increase
+the line height, you could also wrap it in \cs{smash}.} The color may be
+modified using \refk{indent-mark-color}:
+\begin{texexp}
+\begin{pseudo}[
+ indent-mark=\rlap{$\triangleright$}, indent-mark-color=teal]
+ while $x\leq n$ \\+
+ $x = x + 1$ \\
+ if $f(x) < y$ \\+
+ $x = x + 1$ \\-
+ print $x$ \\-
+ return $x$
+\end{pseudo}
+\end{texexp}
+%
+The default indent mark scales with the line height, which can be adjusted with
+\refk{line-height} and \refk{extra-space}, to avoid gaps in the vertical lines,
+and its width has no impact on the indentation. The width of the (default) mark
+can be set with \refk{indent-mark-width}:\footnote{You can also shift the
+default mark inward by setting \refk{indent-mark-shift}.}
+\begin{texexp}
+\begin{pseudo}[
+ indent-mark, indent-mark-width=3pt, line-height=1.5]
+ the \\+
+ lines \\+[3ex]
+ are \\-
+ scaled
+\end{pseudo}
+\end{texexp}
+%
+Note here how some extra space is specified using the optional argument
+\code{3ex} with \refc{\bslash}. This is equivalent to explicitly setting the
+key \refk{extra-space} (i.e., in this case,
+\code{\cs{\bslash}+[extra-space=2ex]}).
+
+If you want, you can certainly create shortcuts, e.g., with simple macro
+definitions like \verb|\def\While{\kw{while}}|, or with declaration commands such
+as \refc{DeclarePseudoKeyword} or \refc{DeclarePseudoConstant}. Procedures and
functions capture parenthesized arguments and set them in math mode; this
carries over in shortcuts, so if you define \verb|\Euclid| to mean
\verb|\pr{Euclid}|, then \code*{\cs{Euclid}(a, b)} yields
@@ -626,7 +840,8 @@ order to prevent your code from ending up in the numbering column, you must
insert a column separator manually. A version of the \refc{pr} command, called
\refc{hd} (or \cs{pseudohd}, where \refc{hd} stands for \emph{header}) instead
wraps a procedure call in a \code{multicolumn}, so it can be used, for
-example, as an unnumbered header line:
+example, as an unnumbered header line:\footnote{See also \refk{hd-space}, if you
+want some extra space after the header.}
\begin{texexp}
\begin{pseudo}[kw]*
@@ -640,12 +855,17 @@ if $b \== 0$ \\+
\noindent
As can be seen in this example, \cs{==} (or \refc{eqs}) is a notational
convenience defined by \pkg{pseudo}, along with interval dots \cs{..}\@ (or
-\refc{dts}). Other special symbols may be found in other packages. For
-example, if you want to use $\coloneqq$ for assignment, you can use
-\cs{coloneqq} from \pkg[https://ctan.org/pkg/mathtools]{mathtools} (perhaps
-with \verb|\let\gets\coloneqq|).\footnote{Tip: If you want to use a left-arrow
-for assignment, but think it's a bit large in Computer Modern or Latin
-Modern, you can use the
+\refc{dts}) and the alternative range operator \refc{rng}:
+\begin{texexp}
+Do you prefer $A[1 \.. n]$ or $A[1 \rng n]$?
+\end{texexp}
+
+\noindent
+Other special symbols may be found in other packages. For example, if you want
+to use $\coloneqq$ for assignment, you can use \cs{coloneqq} from
+\pkg{mathtools} (perhaps with \verb|\let\gets\coloneqq|).\footnote{Tip: If you
+want to use a left-arrow for assignment, but think it's a bit large in Computer
+Modern or Latin Modern, you can use the
\pkg[https://ctan.org/tex-archive/fonts/old-arrows]{old-arrows} package,
so \code*{x \cs{gets} y} yields $x\gets y$.}
@@ -672,9 +892,8 @@ argument to the row separator, i.e.,
level. Within the \refe{pseudo} environment, there is also a counter named
\code{*} that is simply a local clone of \code{pseudoline}, letting you use
starred versions of counter commands, similarly to how label definitions work
-in \pkg[https://ctan.org/pkg/enumitem]{enumitem}:\footnote{Also like in
-\pkg[https://ctan.org/pkg/enumitem]{enumitem}, there's a \refk{start} key for
-setting the first line number.}
+in \pkg{enumitem}:\footnote{Also like in \pkg{enumitem}, there's a \refk{start}
+key for setting the first line number.}
\begin{texexp}
\pseudoset{label=\small\arabic*:}
@@ -702,8 +921,8 @@ And here's a reference to line \ref{roman-line}.
%
The \refk{label-align} key sets the alignment of the label column, and can be
\code{l}, \code{r} or \code{c} (or really any other column type compatible
-with the \pkg[https://ctan.org/pkg/array]{array} package; you could use a
-\code{p\braces{\dots}} column to get fixed width, for example).
+with the \pkg{array} package; you could use a \code{p\braces{\dots}} column to
+get fixed width, for example).
Highlighting can also be done in a similar manner, by, e.g., inserting a
\cs{rowcolor} at the start of the first column. Rather than doing this
@@ -711,12 +930,15 @@ manually, you could use the \refk{bol} key, which inserts a command at the
beginning of the line---or the \refk{hl} key, which is equivalent to
\code*{\refk{bol-prepend} = \refc{pseudohl}}:
+{
+\pseudoset{hl-warn=false}%
\begin{texexp}
\begin{pseudo*}
I'm not highlighted \\[hl]
But I am!
\end{pseudo*}
\end{texexp}
+}
%
Initially, the \refc{pseudohl} command that is inserted is simply a
\cs{rowcolor} that uses \refk{hl-color}, but you're free to redefine this
@@ -728,9 +950,11 @@ pseudocode aligned with the surrounding text. However, when using row
highlighting (e.g., because you are stepping through the code in some
presentation), that alignment may be less of an issue---and you'd rather widen
the highlight a bit. The horizontal padding on each side is controlled by the
-\refk{hpad} key. You can either specify a length, or just turn on the default,
-by not supplying an argument. There's a similar option, \refk{hsep}, which
-controls the separation between the two columns.
+\refk{hpad} key.\footnote{In fact, if you use \refk{hl} without \refk{hpad},
+you'll get a warning. You can turn this warning off using \refk{hl-warn}, or by,
+e.g., setting \refk{hpad} to \code{0pt}.} You can either specify a length, or
+just turn on the default, by not supplying an argument. There's a similar
+option, \refk{hsep}, which controls the separation between the two columns.
\begin{texexp}
\begin{pseudo}[hpad, hsep=1em, indent-length=1em]
@@ -742,12 +966,11 @@ controls the separation between the two columns.
\end{texexp}
\noindent\label{p:overlays}%
-For ease of use with \pkg[https://ctan.org/pkg/beamer]{beamer}, the various
-\pkg{pseudo} options support \pkg[https://ctan.org/pkg/beamer]{beamer} overlay
-specifications. For example, using \code{\refk{hl}<1>} means that the
-\refk{hl} specification would only take effect on slide~1. If you use such an
-overlay specification on a key when \emph{not} using beamer, the key is simply
-ignored.
+For ease of use with \pkg{beamer}, the various \pkg{pseudo} options support
+\pkg{beamer} overlay specifications. For example, using \code{\refk{hl}<1>}
+means that the \refk{hl} specification would only take effect on slide~1. If you
+use such an overlay specification on a key when \emph{not} using beamer, the key
+is simply ignored.
What is more, the row separator \emph{itself} takes an overlay specification
as a shortcut for the one on \refk{hl}, so \code{\refc{\bslash}<1,2-4>} is
@@ -758,12 +981,12 @@ you're free to put the specification in front of the line in question:
\medskip
\noindent
-\includegraphics[page=1]{hilitefig}\hfill
-\includegraphics[page=2]{hilitefig}\hfill
-\includegraphics[page=3]{hilitefig}\hfill
-\includegraphics[page=4]{hilitefig}
+\includegraphics[page=1]{hilitefig.pdf}\hfill
+\includegraphics[page=2]{hilitefig.pdf}\hfill
+\includegraphics[page=3]{hilitefig.pdf}\hfill
+\includegraphics[page=4]{hilitefig.pdf}
-\medskip
+\vspace{-4pt}
% ! Copied from Beamer file
\begin{texexp}[listing only]
@@ -792,12 +1015,13 @@ purpose (equivalent to \code*{\refk{eol-append} = \cs{pause}}):
\medskip
\noindent
-\includegraphics[page=1]{pausefig}\hfill
-\includegraphics[page=2]{pausefig}\hfill
-\includegraphics[page=3]{pausefig}\hfill
-\includegraphics[page=4]{pausefig}
+\includegraphics[page=1]{pausefig.pdf}\hfill
+\includegraphics[page=2]{pausefig.pdf}\hfill
+\includegraphics[page=3]{pausefig.pdf}\hfill
+\includegraphics[page=4]{pausefig.pdf}
+
+\vspace{-4pt}
-\medskip
% ! Copied from Beamer file
\begin{texexp}[listing only]
% In a beamer presentation
@@ -835,6 +1059,292 @@ unnumbered version of the \refe{pseudo} environment:
\end{texexp}
}
+\section{Boxes and floats}
+\label{sec:floats}
+
+There are (at least) two different ways of viewing a block of pseudocode: as
+an inline element, like equations, or as a float, like figures and tables. For
+example, \citet{Cormen:2009} place their pseudocode inline, and refer to the
+algorithms by name (e.g., ``\pr{Dijkstra}''), while \citet{Williamson:2011} place
+them in floats, and refer to them by number (e.g., ``Algorithm~3.1'').%
+\footnote{A third option that is sometimes used is to use a theorem-like
+environment for your algorithms. There are many packages to help with this;
+just search \href{https://ctan.org}{\textsc{ctan}} for
+``\href{https://ctan.org/search/?phrase=theorem}{theorem}''.}
+
+Just using the \refe{pseudo} environment is sufficient for typesetting
+pseudocode as part of the body text. If you wish to place your pseudocode in a
+float, you can easily use a package such as
+\pkg[https://ctan.org/tex-archive/macros/latex/contrib/float]{float}.\footnote{Or
+you could do a quick \href{https://ctan.org}{\textsc{ctan}} search for
+``\href{https://ctan.org/search/?phrase=float}{float}'', or a look at the
+\href{https://ctan.org/recommendations/float}{recommendations} related to
+the \pkg[https://ctan.org/tex-archive/macros/latex/contrib/float]{float}
+package, will give you many options, with varying functionality.} You could also
+use the float environments supplied with packages such as \pkg{algorithms},
+\pkg{algorithmicx} and \pkg{algorithm2e}.\footnote{The definition of \refc{==}
+doesn't properly carry over into floats. It's properly redefined inside
+\refe{pseudo}, so you probably won't notice, but if you wish to use the symbol
+outside the \refe{pseudo} environment, but in a float (e.g., inside
+\cs{caption}), you'll need to either call \refc{RestorePseudoEq} to
+re-establish \pkg{pseudo}'s redefinition of \cs{=} or simply use \refc{eqs}
+instead of \refc{==}.}
+
+The \pkg{pseudo} package does provide some specialized setup,
+however, using \pkg{tcolorbox}. This also lets you typeset non-float pseudocode
+with a colored background, for example, like \citeauthor{Cormen:2022} do in the
+most recent version of their textbook~\citep{Cormen:2022}.
+
+\medskip\noindent
+\textb{Note:} For performance reasons, \pkg{pseudo} does \emph{not}
+automatically import \pkg{tcolorbox}; if you want to use the float
+functionality, you will need to import \pkg{tcolorbox} yourself:
+\begin{texexp}[listing]
+\usepackage{pseudo}
+% ...
+\usepackage{tcolorbox} % possibly with options
+\tcbuselibrary{skins,theorems} % remember these
+\end{texexp}
+It does not matter whether you import
+\pkg{tcolorbox} before or after \pkg{pseudo}, but make sure you also import the
+two libraries \code{skins} and \code{theorems}, as in the example above.
+
+The styles defined by \pkg{pseudo} are versions of the commonly used
+\emph{boxed} and \emph{ruled} styles, as found in, e.g.,
+\pkg[https://ctan.org/tex-archive/macros/latex/contrib/float]{float}, as well as
+the \emph{boxruled} and \emph{tworuled} styles found in \pkg{algorithm2e}. In
+addition, there's a \emph{filled} style, with a colored background. If you wish
+to customize and extend the box style, \refk{pseudo/boxruled} is probably the
+best starting point, as the other styles disable the default frame drawing.
+
+The ruled style is one of the more common ones in use in publications. This is
+a style originally used for (non-floating) tables in \emph{Concrete
+Mathematics}~\citep{Graham:1994}. Rather than reproducing the look of those
+tables directly, \pkg{pseudo} aims to match the style of \pkg{booktabs}, with
+spacing and line thicknesses taken from its constants such as \cs{aboverulesep},
+\cs{heavyrulewidth}, etc.\@ (with defaults provided if \pkg{booktabs} has not
+been imported).\footnote{In \pkg{booktabs}, the contents between the top rules
+make up the header row, whereas in the \emph{Concrete Mathematics} style, it's
+the caption.} The \refk{pseudo/booktabs} style uses the same pattern of thin and
+thick lines as \pkg{booktabs} tables, while \refk{pseudo/ruled} uses a thin line
+at the bottom, as in the \emph{Concrete Mathematics} style.
+
+The \pkg{pseudo} box styles can be used used directly to style \code{tcolorbox}
+environments, possiby with additional \pkg{tcolorbox} options for customization:
+{
+% \pseudoset{kw}
+\label{ex:clrscode4ish}
+\begin{texexp}
+% In document preamble:
+% \usepackage[cmyk]{xcolor}
+% Partial clrscode4e.sty emulation:
+\definecolor{lighttan}{cmyk}{0,0.05,0.17,0}
+\pseudoset{label=\small\arabic*, hd-space}
+
+\begin{tcolorbox}[pseudo/filled, colback=lighttan]
+ \begin{pseudo}*
+ \hd{Bor\r{u}vka}(V, E, w, T) \\
+ \kw{while} $E$ is not empty \\+
+ \kw{for} each $u\in V$ \\+
+ add light $uv \in E$ to $T$ \\-
+ \kw{for} each $e \in T$ \\+
+ contract $e$
+ \end{pseudo}
+\end{tcolorbox}
+\end{texexp}
+}%
+Beyond the boxes themselves, you can customize the pseudocode inside them
+(separately from pseudocode elsewhere) by defining the \refk{in-float} style
+with \refc{pseudodefinestyle}.
+
+You can also create new environments with \cs{newtcolorbox},\footnote{See the
+\pkg{tcolorbox} for details and alternatives.} but the most common use-case will
+probably be to define a (possibly floating) theorem-style environment, using
+\cs{newtcbtheorem} (probably in the preamble):
+
+\label{p:pseudo-ruled-def}
+\begin{texexp}[listing]
+\newtcbtheorem{algorithm}{Algorithm}{pseudo/ruled}{alg}
+\end{texexp}
+
+\noindent
+Here \code{algorithm} is the name we've chosen for our new environment,
+\code{Algorithm} is the label to be used when numbering (i.e., ``Algorithm~1,''
+etc.), \refk{pseudo/ruled} is the ruled box style, and \code{alg} is is a prefix
+that will be used in automatically labeling our boxes.
+
+If you want a \emph{floating} box (like figures and tables, for example), simply
+add the key \code{float} alongside the box style, such as:
+\begin{texexp}[listing]
+\newtcbtheorem{algorithm}{Algorithm}{pseudo/ruled, float}{alg}
+\end{texexp}
+%
+Other \pkg{tcolorbox} styling options may be inserted in the same place. One can
+also supply some \emph{init options} as a first argument, for configuring the
+automatic numbering. For example, if we want our algorithms to be numbered
+within sections, and we wish to provide \pkg{cleveref} with the appropriate
+names, we could define the environment like this:\footnote{If you use the
+\code{crefname} option, you should make sure to place your \cs{newtcbtheorem}
+command in the preamble, and not in the document body, for the naming to take
+effect.}
+%
+% Actual definition in preamble (so crefname works)
+\begin{texexp}[listing]
+\newtcbtheorem[
+ number within = section,
+ crefname = {Algorithm}{algorithms}
+ ]%
+ {algorithm}{Algorithm}{pseudo/ruled, float}{alg}
+\end{texexp}
+%
+Once our environment has been defined with \cs{newtcbtheorem}, it can be used as
+follows (here with floating turned off locally):
+
+% Disappears when it's in a texexp, because the tcolorboxes check if they're
+% first inside another box:
+\vspace{0.5\baselineskip plus 2pt}
+{
+\pseudoset{kw}
+\begin{texexp}
+\begin{algorithm}{Sort an array $A$ of $n$ elements.}{gnome}
+\begin{pseudo}
+ $i = 1$ \\
+ while $i < n$ \\+
+ if \nf $i\== 1$ or $A[i-1] \leq A[i]$ \\+
+ $i = i + 1$ \\-
+ else \nf swap $A[i-1]$ and $A[i]$ \\+
+ $i = i - 1$
+\end{pseudo}
+\end{algorithm}
+\end{texexp}
+}
+
+The first argument is the title, or ``caption,'' and the second argument
+(\code{gnome}) is the \emph{marker}, which is combined with the prefix (in our
+case, \code{alg}) to create the label, \code{alg:gnome}, which can be used with
+\cs{ref} or (using \pkg{cleveref}) \cs{cref}, etc.:\footnote{The separator
+(\code{:}) can be configured; see the \pkg{tcolorbox} docs.}
+
+\begin{texexp}
+\Cref{alg:gnome} is the well-known \emph{gnome sort}, by
+Sarbazi-Azad and Grune.
+\end{texexp}
+
+% The internalpseudobox environment is defined in the preamble, so crefname
+% works.
+\noindent
+\Cref{pbx:booktabs,pbx:boxed,pbx:boxruled,pbx:tworuled,pbx:filled} are typeset
+with the remaining box styles.
+
+\NewDocumentCommand \boxstylesample { m } {
+\begin{internalpseudobox}[pseudo/#1]{\refk{pseudo/#1}}{#1}
+\begin{pseudo}[kw]
+ $i = 1$ \\
+ while $i < n$\\+
+ if \nf $i\== 1$ or $A[i-1] \leq A[i]$ \\+
+ $i = i + 1$ \\-
+ else \nf swap $A[i-1]$ and $A[i]$ \\+
+ $i = i - 1$
+\end{pseudo}
+\end{internalpseudobox}
+}
+
+\boxstylesample{booktabs}
+\boxstylesample{boxed}
+\boxstylesample{boxruled}
+\boxstylesample{tworuled}
+\boxstylesample{filled}
+
+Unnumbered boxes may be constructed with \cs{newtcolorbox}, using the same
+styles. These boxes, by default, have no title part---only the main
+body, containing the pseudocode itself:
+
+{
+\pseudoset{kw}
+\begin{texexp}
+\newtcolorbox{pseudobox}{pseudo/filled}
+
+\begin{pseudobox}
+\begin{pseudo}*
+ \hd{Sum}(a, b) \\
+ if $b \== 0$ \\+
+ return $a$ \\-
+ return $\pr{Sum}(a, b - 1) + 1$
+\end{pseudo}
+\end{pseudobox}
+\end{texexp}
+}
+
+It is possible to add titles using the \code{title} key, but then the definition
+must be expanded slightly, to permit arguments, e.g.:
+
+\begin{texexp}[listing]
+\newtcolorbox{pseudobox}[1][]{pseudo/filled, #1}
+\end{texexp}
+\newtcolorbox{pseudobox}[1][]{pseudo/filled, #1}% For later use
+%
+Here we've added a single argument (\code{[1]}), with an empty default
+(\code{[]}), and this is spliced into the box options at the end. Now we
+may con\-figure each box individually, as we please:
+
+{
+\pseudoset{kw}
+\begin{texexp}
+\begin{pseudobox}[title={\pr{Sum}(a, b)}]
+\begin{pseudo}
+ if $b \== 0$ \\+
+ return $a$ \\-
+ return $\pr{Sum}(a, b - 1) + 1$
+\end{pseudo}
+\end{pseudobox}
+\end{texexp}
+}%
+%
+Colors (e.g., \code{colback}, \code{colbacktitle} or \code{colframe}), fonts
+(e.g., \code{fonttitle}), line thicknesses (\code{boxrule} or \code{titlerule}),
+puncutation (\code{separator sign} and \code{terminator sign}) etc., may also be
+configured, either for all the boxes of this type (directly in the call to
+\cs{newtcolorbox}) or for any individual box, as with the \code{title} key in
+the previous example. The style that is closest to a plain, default
+\code{tcolorbox} is \refk{pseudo/boxruled}, which may be a good starting-point
+for this kind of configuration. However, if you just wish to add some minor
+tweaks to one of the existing \code{pseudo} styles (e.g., changing the colors of
+\refk{pseudo/filled}), starting with that style may be easier. (For some hints
+on configuring the boxes, see \cref{sec:boxconfig}.)
+
+The contents of one of these boxes need not be restricted to pseudocode---the
+spacing is set up to handle plain text as well. For example, you may want to
+specify inputs and outputs.\footnote{Common alternatives to ``Input/Output'' are
+``Require/Ensure'' and ``Data/Result.''} (If you want to align such
+specification, as in \cref{alg:euclid} \vpageref{alg:euclid}, you can use the
+\pkg{tabto} package; see \cref{sec:tabstops}.)
+
+\vspace{0.5\baselineskip plus 2pt}
+{
+\pseudoset{kw}
+\begin{texexp}
+\begin{algorithm}{Gnome sort}{} % environment defined earlier
+
+\textbf{Input:} An array $A$ of length $n$.
+
+\textbf{Output:} $A$, sorted in nondescending order.
+
+\begin{pseudo}
+ $i = 1$ \\
+ while $i < n$ \\+
+ if \nf $i \== 1$ or $A[i-1] \leq A[i]$ \\+
+ $i = i + 1$ \\-
+ else \nf swap $A[i-1]$ and $A[i]$ \\+
+ $i = i - 1$
+\end{pseudo}
+
+The running time of the algorithm is quadratic.
+
+\end{algorithm}
+\end{texexp}
+}
+
+
\section{Reference}
\label{sec:reference}
@@ -843,8 +1353,8 @@ This section gives an overview of all the moving parts of the package. A
explicit value given, while an \emph{initial} value is one provided to the key
at the point where \pkg{pseudo} is imported. Several commands (such as, e.g.,
\refc{pseudoprefix}) may be modified using corresponding keys (e.g.,
-\refk{prefix}). When the behavior of such commands is described, the
-description references their initial behavior.
+\refk{prefix}). When the behavior of such commands is described, the description
+references their initial behavior.
\subsection{Line structure}
\label{sec:linestructure}
@@ -902,18 +1412,21 @@ Each line of a \refe{pseudo} environment is (initially) structured as follows:
($(line-1-7.south east)+(-1pt,-4pt)$)
;
- \draw[overlay] (prefix.south) node[font=\footnotesize, below] {\strut Inserted by
- \refc{\bslash} (not
- \code{\refc{\bslash}*})};
- \draw (setup.south) node[font=\footnotesize, below] {\strut Part of preamble};
+ \draw[overlay] (prefix.south) node[font=\footnotesize, below=2pt, inner sep=0pt]
+ {\strut Inserted by \refc{\bslash} (not \code{\refc{\bslash}*})};
+
+ \draw (setup.south) node[font=\footnotesize, below=2pt, inner sep=0pt]
+ {\strut Part of preamble};
\draw[semithick] (line-1-9.south) + (0,-4pt)
- -- (line-1-9.south |- setup.south) node[font=\footnotesize, below]
+ -- (line-1-9.south |- setup.south)
+ node[font=\footnotesize, below=2pt, inner sep=0pt]
{\strut Inserted by \refc{\bslash} (not last)};
\draw[semithick] (line.south west) rectangle (line.north east);
\end{tikzpicture}
\end{center}
+\vspace{-2.5pt}
\noindent
The components in the \refk{prefix} are populated by the \refc{\bslash}
@@ -960,10 +1473,9 @@ appropriate options (e.g., \refk{prefix} and \refk{setup}).
\item[\refk{eol}] Inserted by the terminating \refc{\bslash} (using
\refc{pseudoeol}), unless we're at the end of the environment. Useful,
e.g., for taking actions such as a
- \pkg[https://ctan.org/pkg/beamer]{beamer} \cs{pause} (cf.,
- \refk{pause}) between the lines.\footnote{If the same action must be
- taken after the last line, you can simply insert it there
- manually.}
+ \pkg{beamer} \cs{pause} (cf., \refk{pause}) between the
+ lines.\footnote{If the same action must be taken after the last line,
+ you can simply insert it there manually.}
\item[\refc{\bslash}] The row/line separator. Ends one line (inserting
\refk{eol}) and begins another (inserting \refk{prefix}). As in
tabulars in general, this command is also permitted after the final
@@ -983,23 +1495,23 @@ alphabetical order), you'll find definitions of a couple of counters here
This counter is a duplicate of \refk{pseudoline}, available inside
\refe{pseudo}. It makes it possible to simplify calls such as
\code{\cs{arabic}\braces{\refk{pseudoline}}} to starred forms such as
- \cs{arabic*}, like in \pkg[https://ctan.org/pkg/enumitem]{enumitem}. These
- short forms are available (and intended) for use in \refk{label} and
- \refk{ref}.
+ \cs{arabic*}, like in \pkg{enumitem}. These short forms are available (and
+ intended) for use in \refk{label} and \refk{ref}.
\end{docKey}
\begin{docCommand}{..}{}
This is a shortcut that hijacks the normal \cs{.}\@ accent command, so
that if it is called with \code{.}\@ as an argument, the result is
- \cs{dts}. In other words, the command \cs{..}\@ is really the call
+ \refc{dts}. In other words, the command \cs{..}\@ is really the call
\code{\cs{.}\braces{.}}. For any other arguments, the original \cs{.}\@ is
used, so while \code{\$1\cs{..}n\$} produces $1\..n$, \code{\cs{.}o} still
yields~\.o.
\end{docCommand}
\begin{docCommand}{==}{}
+ \RestorePseudoEq % Having some trouble bc/o floats, or something?
This is a shortcut that hijacks the normal \cs{=} accent command, so that
- if it is called with \code{=} as an argument, the result is \cs{eqs}. In
+ if it is called with \code{=} as an argument, the result is \refc{eqs}. In
other words, the command \cs{==} is really the call
\code{\cs{=}\braces{=}}. For any other arguments, the original \cs{=} is
used, so while \code{\$x\cs{==}y\$} produces $x\==y$, \code{\cs{=}o} still
@@ -1008,8 +1520,8 @@ alphabetical order), you'll find definitions of a couple of counters here
In some contexts, this may not work because \cs{=} has reverted to its
original meaning (as is currently the case if you try to use it within a
custom float, as in \cref{sec:floats}, or a standard one such as
- \code{figure}). In this case, you can restore the \pkg{pseudo} meaning
- (and the \refc{==} shortcut) by using \refc{pseudoeq}. In some cases, you
+ \code{figure}). In this case, you can restore the \pkg{pseudo} meaning (and
+ the \refc{==} shortcut) by using \refc{RestorePseudoEq}. In some cases, you
may want to just use \refc{eqs} instead.
\end{docCommand}
@@ -1020,9 +1532,9 @@ alphabetical order), you'll find definitions of a couple of counters here
\parindent1.5em
\noindent
- This row separator is the workhorse of the \pkg{pseudo} package. Just as
- in a \code{tabular} environment, it signals the end of a line. It is
- optional after the list line, where it doesn't do any work.
+ This row separator is the workhorse of the \pkg{pseudo} package. Just as in
+ a \code{tabular} environment, it signals the end of a line. It is optional
+ after the list line, where it doesn't do any work.
%
The command may be followed by a series of one or more plus (\code{+})
signs, each of which will increment the indentation level before starting
@@ -1050,6 +1562,20 @@ alphabetical order), you'll find definitions of a couple of counters here
specification and the line options. This means that you may, for example,
place the overlay specification at the beginning of the following line in
the source.
+
+ The \refc{\bslash} command is special in that it also permits a keyless
+ value to be used among its option; this will then be taken to implicitly use
+ the key \refk{extra-space}, which adds extra vertical space below as part of
+ the line break. This means you can supply a length argument in the same way
+ as with the ordinary \cs{\bslash} command:
+
+\begin{texexp}
+\begin{pseudo}
+ no extra space after this line \\
+ but there's extra space after this line \\[2ex]
+ so this line is a bit lonely
+\end{pseudo}
+\end{texexp}
\end{docCommand}
\begin{docCommand}{arabic*}{}
@@ -1061,8 +1587,18 @@ alphabetical order), you'll find definitions of a couple of counters here
environment used by \refe{pseudo}. Normally not needed, as the
\code{tabular} behavior may be modified by other keys, but could be used
to use some other tabular environment, e.g., from packages such as
- \pkg[https://ctan.org/pkg/tabularx]{tabularx} or
- \pkg[https://ctan.org/pkg/longtable]{longtable}.
+ \pkg{tabularx} or \pkg{longtable}. Rather than
+ \code{\cs{begin}\braces{tabularx}} and \code{\cs{end}{\braces{tabularx}}},
+ the command versions \cs{tabularx} and \cs{endtabularx} should be used.
+ Commands such as \refc{pseudopos} and \refc{pseudopreamble} may be used as
+ part of the setup:
+\begin{texexp}[listing]
+\pseudoset{
+ begin-tabular =
+ \tabularx{\linewidth}[\pseudopos]{\pseudopreamble},
+ end-tabular = \endtabularx
+}
+\end{texexp}
\end{docKey}
\begin{docKey}{bol}{\,=\,\meta{commands}}{\initiallyempty}
@@ -1104,19 +1640,19 @@ alphabetical order), you'll find definitions of a couple of counters here
The \refe{pseudo} environment emulates the built-in \LaTeX\ lists when it
comes to spacing above and below, in normal text. If the environment is
part of an ongoing paragraph, paragraphs will be inserted above and below,
- along with whitespace specified by \refk{topsep} and \refk{parskip}. If
+ along with whitespace specified by \refk{topsep} (and \cs{parskip}). If
the environment begins a paragraph of its own, additional whitespace is
added, as specified by \refk{partopsep}. It is also possible to specify
space to insert to the left of the environment, using \refk{left-margin}.
However, these spacing commands don't work well inside \cs{mbox},
- \cs{fbox}, etc. To avoid getting into trouble, \pkg{pseudo} determines
- that the environment should be \emph{compact}, and drop this surrounding
- space, if we're in inner horizontal mode at the beginning of the
- environment.
+ \cs{fbox}, etc. To avoid getting into trouble, \pkg{pseudo} determines that
+ the environment should be \emph{compact}, and drop this surrounding space,
+ if we're in inner horizontal mode at the beginning of the environment. This
+ will also turn off setting \cs{prevdepth} (cf.\@ \refk{prevdepth}).
\begin{texexp}
-% In preamble:
+% In document preamble:
% \usepackage{tikz}
\begin{tikzpicture}
\draw (0,0) node [draw] {%
@@ -1128,10 +1664,10 @@ alphabetical order), you'll find definitions of a couple of counters here
\end{texexp}
This may not be enough, however. For example, if you're using
- \pkg[https://ctan.org/pkg/standalone]{standalone} to produce individual
- pseudocode images, this compactness may not be triggered automatically. In
- such cases, you can override the behavior using the \refk{compact} key,
- manually specifying whether you want the pseudocode to be compact or not.
+ \pkg{standalone} to produce individual pseudocode images, this compactness
+ may not be triggered automatically. In such cases, you can override the
+ behavior using the \refk{compact} key, manually specifying whether you want
+ the pseudocode to be compact or not.
\end{docKey}
\begin{docCommand}{ct}{\marg{text}}
@@ -1161,7 +1697,7 @@ alphabetical order), you'll find definitions of a couple of counters here
\medskip\noindent
\begin{pseudo}[
- begin-tabular=\tabularx{\linewidth}{@{}r>{\pseudosetup}X@{}},
+ begin-tabular=\tabularx{\linewidth}[t]{@{}r>{\pseudosetup}X@{}},
end-tabular=\endtabularx,
ctfont=\color{black!75},
ct-left=\unskip\qquad\texttt{/* },
@@ -1175,13 +1711,13 @@ alphabetical order), you'll find definitions of a couple of counters here
\medskip\noindent
Or if you'd rather have the comments right-aligned (like you can in, e.g.,
- \pkg[https://ctan.org/pkg/algorithm2e]{algorithm2e}), you could use
- insert the \cs{hfill} at the beginning of the \refk{ct-left}:
+ \pkg{algorithm2e}), you could use insert the \cs{hfill} at the beginning of
+ the \refk{ct-left}:
\medskip\noindent
\begin{pseudo}[
- begin-tabular=\tabularx{\linewidth}{@{}r>{\pseudosetup}X@{}},
+ begin-tabular=\tabularx{\linewidth}[t]{@{}r>{\pseudosetup}X@{}},
end-tabular=\endtabularx,
ctfont=\color{black!75},
ct-left=\hfill\texttt{/* },
@@ -1283,7 +1819,7 @@ $x = y$ \qquad \Imp
\begin{docKey}{dim}{}{}
Dims the following line. Equivalent to:
-\begin{texexp}[listing only]
+\begin{texexp}[listing]
\pseudodefinestyle{dim}{
bol-append = \color{\pseudodimcolor},
setup-append = \color{\pseudodimcolor}
@@ -1318,8 +1854,8 @@ See also \refk{bol-append}, \refk{setup-append} and \refk{dim-color}.
A two-dot ellipsis, for use in the Wirth interval notation $1\..n$,
typeset as \citeauthor{Graham:1994} did in
\citetitle{Graham:1994}~\citep{Graham:1994}. Its definition is the same as
- in \pkg[https://ctan.org/pkg/gkpmac]{gkpmac}. Also accessible via the
- \refc{..} shortcut.
+ in \pkg{gkpmac}. Also accessible via the \refc{..} shortcut. See also
+ \refc{rng}.
\end{docCommand}
\begin{docKey}{end-tabular}{}{\initialkeyvalue{\code{\cs{end}\braces{tabular}}}}
@@ -1344,13 +1880,11 @@ See also \refk{bol-append}, \refk{setup-append} and \refk{dim-color}.
\begin{docCommand}{eqs}{}
Two equality signs typeset together as a binary relation, as in $x \eqs
y$ (as opposed to the wider $x == y$, resulting from \code*{\$x == y\$}).
- It emulates the \pkg[https://ctan.org/pkg/stix]{stix} symbol \cs{eqeq},
- but for use with Computer Modern (the default \LaTeX\ font) or Latin
- Modern (available via the
- \pkg[https://ctan.org/tex-archive/info/lmodern]{lmodern} package). It
- should work just fine with other fonts. Also accessible via the \refc{==}
- shortcut, and configurable via \refk{eqs-pad}, \refk{eqs-scale} and
- \refk{eqs-sep}.
+ It emulates the \pkg{stix} symbol \cs{eqeq}, but for use with Computer
+ Modern (the default \LaTeX\ font) or Latin Modern (available via the
+ \pkg[https://ctan.org/tex-archive/info/lmodern]{lmodern} package). It should
+ work just fine with other fonts. Also accessible via the \refc{==} shortcut,
+ and configurable via \refk{eqs-pad}, \refk{eqs-scale} and \refk{eqs-sep}.
\end{docCommand}
\begin{docKey}{eqs-pad}{\,=\,\meta{muskip}}{\initialkeyvalue{\code{0.28mu}}}
The amount of space inserted on each side of \refc{eqs}.
@@ -1363,6 +1897,60 @@ See also \refk{bol-append}, \refk{setup-append} and \refk{dim-color}.
The amount of space inserted between the two \code{=} signs in \cs{eqs}.
\end{docKey}
+\begin{docKey}{in-float}{}{\pkg{pseudo} style}
+ This is a style, defined using \refc{pseudodefinestyle}, that is applied to
+ the contents of every \code{tcolorbox} styled using the \code{pseudo/}
+ styles, such as \refk{pseudo/boxed}, \refk{pseudo/ruled}, etc. (Despite the
+ name, it is not limited to boxes defined with the \code{float} key.) The
+ style is initially empty, and acts as a hook for user customization (similar
+ to \refk{pseudo/init}, but specifically for \pkg{pseudo} configuration):
+ \begin{texexp}
+ \pseudodefinestyle{in-float}{kwfont = \sffamily}
+ \kw{not modified}
+ \begin{tcolorbox}[pseudo/filled]
+ \kw{modified}
+ \end{tcolorbox}
+ \end{texexp}
+\end{docKey}
+
+\begin{docKey}{extra-space}{\,=\,\meta{length}}{\initialkeyvalue{\code{0pt}}}
+ \parindent1.5em
+ \noindent
+ Additional space to be added by \refc{\bslash}, below the baseline of the
+ current row. For example:
+
+\begin{texexp}
+\begin{pseudo}[indent-mark, extra-space=2ex]
+ a \\+
+ b \\+
+ c
+\end{pseudo}
+\end{texexp}
+Note the difference from \refk{line-height}: Here the space is added below, just
+like with the \emph{normal} \cs{\bslash} command, when its optional argument is
+used, whereas with \refk{line-height} the height and depth of the line are both
+scaled. Also, unlike with \refk{line-height}, with \refk{extra-space}, nothing
+is added to the last line unless it actually ends with a \refc{\bslash} command.
+
+The most likely use-case for this command is to add space after specific lines,
+rather than for \emph{every} line, as in the previous example. For example:
+\begin{texexp}
+\begin{pseudo}
+ one group that is \\
+ logically connected \\ [extra-space=1.5ex]
+ another group that is \\
+ separate from the first
+\end{pseudo}
+\end{texexp}
+In fact, \refk{extra-space} is so closely tied to \refc{\bslash}, that you can
+supply a keyless value as one of its options, and \refk{extra-space} will be
+\emph{assumed}. So, for example, in the previous example, you could simply have
+used \code{\cs{\bslash}[1.5ex]}.
+
+If you want spacing only after the heading (created with \refc{hd}), you can set
+that using the \refk{hd-space} key.
+\end{docKey}
+
\begin{docCommand}{fn}{\marg{name}\colOpt{(\meta{arguments})}}
Indicates a function name, such as \fn{length}, and is initially
@@ -1414,6 +2002,8 @@ We're not in math mode, but the argument of \Ln[A] is.
\end{docKey}
\begin{docCommand}{hd}{\marg{name}(\meta{arguments})}
+ \parindent1.5em
+ \noindent
Typesets a procedure signature, like \refc{pr}, but is intended for use as
a \emph{header} for a procedure, rather than a procedure call. The
difference is that \cs{hd} wraps its contents in a \cs{multicolumn},
@@ -1433,35 +2023,59 @@ We're not in math mode, but the argument of \Ln[A] is.
\end{pseudo}
\end{texexp}
- Note that the arguments are mandatory; in order to function properly,
- \cs{hd} must be \emph{expandable}, and therefore cannot end with an
- optional argument, the way \refc{pr} does.
- \pseudoshortcutted{pr}
+ \noindent
+ The \refk{hd-space} key can be used to configure \refc{hd} so it sets the
+ \refk{extra-space} key. Note that the signature arguments are mandatory; in
+ order to function properly, \cs{hd} must be \emph{expandable}, and therefore
+ cannot end with an optional argument, the way \refc{pr} does.
+ \pseudoshortcutted{hd}
\end{docCommand}
\begin{docKey}{hd-preamble}{\,=\,\meta{columns}}{no default}
- Sets the preamble used by \refc{hd}. Initially, a single left-aligned
- column with \refc{pseudohpad} on either side (see
- \cpageref{p:hdpreamble}). If you introduce more columns in
- \refk{preamble}, you might want to increase the number of columns in
- \refk{hd-preamble} as well, or at least remove the right-hand
- \refc{pseudohpad}.
+ Sets the preamble used by \refc{hd}. The result is available as the column
+ type with name \cs{pseudohdpreamble}. (Note that this is the literal
+ column name, and not a macro containing the name. See \refk{preamble} for
+ more information.) Initially, a single left-aligned column with
+ \refc{pseudohpad} on either side (see \cpageref{p:hdpreamble}). If you
+ introduce more columns in \refk{preamble}, you might want to increase the
+ number of columns in \refk{hd-preamble} as well, or at least remove the
+ right-hand \refc{pseudohpad}.
+\end{docKey}
+
+\begin{docKey}{hd-space}{\,=\,\meta{length}}{default \code{0.41386ex}, initial
+ value \code{0pt}}
+ The value \refk{extra-space} is set to (before any value set manually as
+ part of \refc{\bslash}) after the use of \refc{hd}. This is useful if one
+ wants some extra space only after the header. The default is based on
+ \pkg[https://www.cs.dartmouth.edu/~thc/]{clrscode4e},\footnote{And older
+ versions, for that matter.} and, so getting spacing header spacing similar
+ to that package requires only \code{\cs{pseudoset}\braces{hd-space}}. (See,
+ e.g., the example \vpageref{ex:clrscode4ish}.)
\end{docKey}
\begin{docKey}{hl}{}{\novaluekey}
- Prepends \refc{pseudohl} to \refk{bol}. Normally used with
- \pkg[https://ctan.org/pkg/beamer]{beamer} (see \cpageref{p:overlays}).
+ Prepends \refc{pseudohl} to \refk{bol}. Normally used with \pkg{beamer} (see
+ \cpageref{p:overlays}). Note that if if \refk{hpad} is set, a warning will
+ be emitted (unless this is overridden by \refk{hl-warn}).
\end{docKey}
\begin{docKey}{hl-color}{\,=\,\meta{color}}{\initialkeyvalue{\code{black!12}}}
Sets the color used by \refc{pseudohl} (available as \cs{pseudohlcolor}).
\end{docKey}
+\begin{docKey}{hl-warn}{\,=\,\meta{warn}}{default \code{true}, initial
+ value \code{true}}
+ Permits turns off (by setting \refk{hl-warn} to \code{false}) the warning
+ that is normally emitted if you use \refk{hl} without having used
+ \refk{hpad}.
+\end{docKey}
+
\begin{docKey}{hpad}{\,=\,\meta{length}}%
{default \code{0.3em}, initially \code{0em}}
Horizontal padding on either side of the pseudocode. Useful, among other
things when highlighting lines, to have some of the highlighting (i.e.,
- row color) protrude beyond the text.
+ row color) protrude beyond the text. This key also sets \refk{hl-warn} to
+ \code{false}.
\end{docKey}
\begin{docKey}{hsep}{\,=\,\meta{length}}%
@@ -1488,9 +2102,8 @@ $\mathit{foo-bar:baz}$
\end{texexp}
This may be remedied, e.g., by using the (internal) command
- \cs{newmcodes@} from \pkg[https://ctan.org/pkg/amsopn]{amsopn}, but the
- kerning, spacing and font application in the result still leaves something
- to be desired:
+ \cs{newmcodes@} from \pkg{amsopn}, but the kerning, spacing and font
+ application in the result still leaves something to be desired:
\makeatletter
\begin{texexp}
@@ -1505,7 +2118,7 @@ $\textit{foo-bar:baz}$
\end{texexp}
The decision to use \cs{textit} means that you can't use, say, subscripts
- or the like as pars of an identifier, or mix in greek letters or other
+ or the like as parts of an identifier, or mix in greek letters or other
mathematical symbols. Though you can still easily typeset things like
$\id{foo-$\alpha$}$, you'll have to mix in the math mode more
explicitly (in this case, \verb|$\id{foo-$\alpha$}$|).
@@ -1546,6 +2159,66 @@ This is some text interrupting the code.
\end{texexp}
\end{docKey}
+\def\algoexample#1{%
+\begin{pseudo}[#1]
+\kw{repeat} $n-1$ times \\+
+ \kw{for} each edge $uv$ \\+
+ update estimate for $v$ via $u$ \\--
+\kw{for} each edge $uv$ \\+
+ \kw{if} estimate for $v$ improves via $u$ \\+
+ \kw{return} \cn{false} \\--
+\kw{return} \cn{true}
+\end{pseudo}
+}
+\begin{docKey}{indent-mark}{\,=\,\meta{mark}}{default vertical line, initially
+ empty}
+A mark used to indicate the start of each step of indentation.\footnote{Similar
+to \code{c:indentLine\_char} in the vim plugin
+\pkg[https://github.com/Yggdroot/indentLine]{indentLine}.}
+Any horizontal space taken up by this mark is added to the indentation; to
+prevent this, wrap the mark in \cs{rlap} (and, if necessary, in \cs{smash}, to
+handle \emph{vertical} space). The following example uses
+\verb|indent-mark=\rlap{$\cdot$}|:
+
+\algoexample{indent-mark=\rlap{$\cdot$}}
+%
+By default, the indent mark is a vertical line that scales with the line height,
+so each indented block is indicated by a single unbroken vertical line. It also
+``undoes'' its own width, so it doesn't impact the indentation. The following
+example uses the \refk{indent-mark} key with no argument:
+
+\algoexample{indent-mark}
+%
+This default mark may be configured by using the keys \refk{indent-mark-color},
+\refk{indent-mark-width} and \refk{indent-mark-shift}.
+\end{docKey}
+
+\begin{docKey}{indent-mark-color}{\,=\,\meta{color}}%
+ {\initialkeyvalue{\codefont{lightgray}}}
+ Sets the color to be used by the default \refk{indent-mark}. See
+ \refk{indent-mark-shift} for an example.
+\end{docKey}
+
+\begin{docKey}{indent-mark-shift}{\,=\,\meta{length}}{default \code{.5em},
+ initial value \code{0pt}}
+ Sets the horizontal shift (from the actual start of an indent step) at which
+ to render the default \refk{indent-mark}. The following example uses the
+ default value, and sets \refk{indent-mark-width} to \code{.4pt} and
+ \refk{indent-mark-color} to \code{black}, to approximate the look of the
+ indent mark in \pkg{algorithm2e}.
+\algoexample{indent-mark, indent-mark-shift, indent-mark-color=black,
+indent-mark-width=.4pt}
+\end{docKey}
+
+\begin{docKey}{indent-mark-width}{\,=\,\meta{width}}%
+ {\initialkeyvalue{\codefont{.6pt}}}
+ Sets the width of the default \refk{indent-mark}. See
+ \refk{indent-mark-shift} for an example.
+ %
+ The default value of \code{.6pt} corresponds to the
+ \pkg[https://ctan.org/pkg/pgf]{tikz} line width \code{semithick}.
+\end{docKey}
+
\begin{docKey}{indent-text}{\,=\,\meta{text}}%
{\initialkeyvalue{%
\code*{\cs{pseudofont}\cs{kw}\braces{else}\cs{\verbvisiblespace}}}}
@@ -1612,16 +2285,16 @@ vs.\
it's called (normally when evaluating the initial value of
\refk{indent-text}), it also runs a check to see if the font selection
\emph{worked}, as in some cases (such as in a default
- \pkg[https://ctan.org/pkg/beamer]{beamer} presentation), the non-extended
- bold may not be available. In that case, it defaults to an extended bold
- (\cs{bfseries}) instead. At this point, the command is redefined to
+ \pkg{beamer} presentation), the non-extended bold may not be available. In
+ that case, it defaults to an extended bold (\cs{bfseries}) instead. At this
+ point, the command is redefined to
\code{\cs{fontseries}\braces{b}\cs{selectfont}} or \cs{bfseries}, as
appropriate (i.e., without this check). So, while
\code{\refc{kw}\braces{hello}} produces the non-extended \kw{hello} in a
default \LaTeX\ document, it yields the extended {\origbfseries\sffamily
- hello} in a default \pkg[https://ctan.org/pkg/beamer]{beamer}
- presentation. Perhaps more clearly, this is the result in plain \LaTeX\
- (using \pkg[https://ctan.org/tex-archive/info/lmodern]{lmodern}):
+ hello} in a default \pkg{beamer} presentation. Perhaps more clearly, this is
+ the result in plain \LaTeX\ (using
+ \pkg[https://ctan.org/tex-archive/info/lmodern]{lmodern}):
{\let\bfseries\origbfseries
\begin{texexp}
@@ -1632,21 +2305,20 @@ vs.\
}\ignorespaces\par
\noindent
- The same code results in the the following in
- \pkg[https://ctan.org/pkg/beamer]{beamer}:
+ The same code results in the the following in \pkg{beamer}:
\medskip\noindent
- \includegraphics{kwfig}
+ \includegraphics{kwfig.pdf}
\medskip\noindent
You'll also get a font warning,\footnote{Of course, if you use a different
- font or theme, e.g., with the \pkg[https://ctan.org/pkg/beamer]{beamer}
- command \code{\cs{usefonttheme}\braces{serif}}, you may not have any issues to
- begin with.} though only once, as it's suppressed after the first occurrence,
- so the fact that the font selection doesn't work on the last line isn't
- reported. Note, however, that the current implementation of \refc{kwfont}
- actually \emph{piggybacks} on this warning to determine if the non-extended
- bold is available. This means that if you've tried (and failed) to use
+ font or theme, e.g., with the \pkg{beamer} command
+ \code{\cs{usefonttheme}\braces{serif}}, you may not have any issues to begin
+ with.} though only once, as it's suppressed after the first occurrence, so the
+ fact that the font selection doesn't work on the last line isn't reported. Note,
+ however, that the current implementation of \refc{kwfont} actually
+ \emph{piggybacks} on this warning to determine if the non-extended bold is
+ available. This means that if you've tried (and failed) to use
\code{\cs{fontseries}\braces{b}} \emph{before} the fist use of \refc{kwfont},
the fallback (i.e., extended bold) won't be triggered.
@@ -1662,22 +2334,26 @@ vs.\
\begin{docKey}{label}{\,=\,\meta{commands}}{%
\initialkeyvalue{\code{\refc{arabic*}}}}%
+ \parindent1.5em
+ \noindent
+ Used to format the line label/number. For example, to emulate
+ \pkg[https://www.cs.dartmouth.edu/~thc/]{clrscode4e} rather than
+ \pkg{clrscode3e}, you'd use \code*{label = \cs{small}\cs{arabic}*}. You can
+ also add punctuation or the like, as in \pkg{enumitem}:
\begin{texexp}
\pseudoset{kw, label=\footnotesize\arabic*:}
\begin{pseudo}
-print \st{Hello, label!} \label{li:label} \\
+print \st{Hello, label!} \label{li:label} \\
goto \tn{\ref{li:label}}
\end{pseudo}
\end{texexp}
-
+ \noindent
Note that \cs{label} should be used in the actual code line, as here, and
not in the number cell (which is generally not explicitly written,
anyway).
- \medskip
-
- As kan be seen from the example, \cs{ref} is unaffected by
+ As can be seen from the example, \cs{ref} is unaffected by
\refKey*{label}, and in many cases that's what you want---as apposed to,
say, ``\kw{goto} {\footnotesize 1:}''. In some cases, however (especially
when using one of the other formatting commands, such as \cs{alph} or
@@ -1692,9 +2368,9 @@ goto \tn{\ref{li:label}}
which is a part of the default \refk{preamble}. In other words, beyond the
basic \code{l} and \code{r} (for left- and right-justified), you can
supply anything that would be valid as part of the preamble (possibly
- using functionality from the \pkg[https://ctan.org/pkg/array]{array}
- package). If you want to get creative here, though, it might be easier to
- get the results you want by specifying your own \refk{preamble} in full.
+ using functionality from the \pkg{array} package). If you want to get
+ creative here, though, it might be easier to get the results you want by
+ specifying your own \refk{preamble} in full.
\end{docKey}
\begin{docKey}{left-margin}{\,=\,\meta{length}}{\initialkeyvalue{\code{0pt}}}
@@ -1722,11 +2398,11 @@ I'm a livin' in a box \\
I'm a livin' in a cardboard box
\end{pseudo*}}
\end{texexp}
-Note that as opposed to \refk{topsep}, \refk{parskip} and \refk{partopsep}, we
-are \emph{not} working with one of the built-in list spacing commands;
-\cs{leftmargin} has no effect on this key (which is why the hyphenated naming
-style of other keys such as \refk{label-align} or \refk{indent-text} is also
-adopted for \refk{left-margin}).
+Note that as opposed to \refk{topsep} and \refk{partopsep}, we are \emph{not}
+working with one of the built-in list spacing commands; \cs{leftmargin} has no
+effect on this key (which is why the hyphenated naming style of other keys such
+as \refk{label-align} or \refk{indent-text} is also adopted for
+\refk{left-margin}).
%
See also \refk{compact}.
\end{docKey}
@@ -1738,9 +2414,8 @@ See also \refk{compact}.
gets too crowded with text and notation, you may wish to increase
\code{line-height}. To emulate, e.g., the
\cs{jot} set by
- \pkg[https://ctan.org/pkg/amsmath]{amsmath} (which is
- \code{0.25\cs{baselineskip}}), you could use \code{1.25}, though even
- \code{1.1} should help in many cases.
+ \pkg{amsmath} (which is \code{0.25\cs{baselineskip}}), you could use
+ \code{1.25}, though even \code{1.1} should help in many cases.
\end{docKey}
\begin{docCommand}{nf}{}
@@ -1749,20 +2424,88 @@ See also \refk{compact}.
See also \refc{tn}.
\end{docCommand}
-\begin{docKey}{parskip}{\,=\,\meta{length}}{\initialkeyvalue{\cs{parskip}}}
- Sets a \pkg{pseudo}-local copy of \cs{parskip} for use in vertical spacing
- above and below the \refe{pseudo} environment. See also \refk{compact}.
-\end{docKey}
-
\begin{docKey}{partopsep}{\,=\,\meta{length}}{\initialkeyvalue{\cs{partopsep}}}
- Sets a \pkg{pseudo}-local copy of \cs{partopsep} for use in vertical
- spacing above and below the \refe{pseudo} environment. See also \refk{compact}.
+ Sets a \pkg{pseudo}-local copy of \cs{partopsep} for use in vertical spacing
+ above and below the \refe{pseudo} environment. See also \refk{compact}.
\end{docKey}
\begin{docKey}{pause}{}{\novaluekey}
Equivalent to \code*{\refk{eol-append} = \cs{pause}} (see \cref{p:pause}).
\end{docKey}
+\begin{docKey}{pos}{\,=\,\meta{depth}}{\initialkeyvalue{\code{t}}}
+ Specifies the vertical position of the \refe{pseudo} environment, i.e.,
+ whether it should be vertically aligned on the top (\code{t}) or bottom
+ (\code{b}) row, or be vertically centered (no value).
+%
+ This is equivalent to the (optional) \code{pos} argument to \code{tabular},
+ and is in fact supplied to the internal \code{tabular} environment. The
+ initial value is \code{t}, which makes sure the spacing above is
+ consistent, regardless of the depth of the previous line. Here are two
+ examples, set side by side:
+
+ \medskip
+
+ \begin{minipage}[t]{1.1cm}
+ $x$
+ \begin{pseudo}
+ foo \\
+ bar
+ \end{pseudo}
+ \end{minipage}
+ \begin{minipage}[t]{1.1cm}
+ $f(x)$
+ \begin{pseudo}
+ frozz \\
+ bozz
+ \end{pseudo}
+ \end{minipage}
+
+ \medskip
+
+ The \refe{pseudo} environments are properly aligned. If, instead, we set
+ \code*{pos = \braces{}}, they will not be, because $f(x)$ has more depth
+ than $x$:\footnote{This was the behavior in older versions of
+ \pkg{pseudo}.}
+
+ \medskip
+
+ \begin{minipage}[t]{1.1cm}
+ $x$
+ \begin{pseudo}[pos=]
+ foo \\
+ bar
+ \end{pseudo}
+ \end{minipage}
+ \begin{minipage}[t]{1.1cm}
+ $f(x)$
+ \begin{pseudo}[pos=]
+ frozz \\
+ bozz
+ \end{pseudo}
+ \end{minipage}
+
+ \medskip
+
+ If \refk{compact} is set to \code{true}, \refk{pos} is automatically
+ emptied like this---a behavior which can, of course, be overridden:
+
+ \begin{texexp}
+ Lorem
+ \begin{pseudo*}[compact]
+ foo \\ bar
+ \end{pseudo*}
+ ipsum
+ \begin{pseudo*}[compact, pos=b]
+ foo \\ bar
+ \end{pseudo*}
+ dolor
+ \begin{pseudo*}[compact, pos=t]
+ foo \\ bar
+ \end{pseudo*}.
+ \end{texexp}
+\end{docKey}
+
\begin{docCommand}{pr}{\marg{name}\colOpt{(\meta{arguments})}}
Indicates a procedure name, such as \cn{Quicksort}, and is initially
more or less an alias for \refCom*{cn}. The optional arguments (in
@@ -1778,11 +2521,11 @@ See also \refk{compact}.
available as the column type with name \cs{pseudopreamble}. (Note that
this is the literal column name, and not a macro containing the name.
Initially, \pkg{pseudo} uses a \code{tabular} as redefined by the
- \pkg[https://ctan.org/pkg/array]{array}, which prevents the expansion of
- whatever is provided as its preamble, and so we supply the preamble in the
- form of a single ``column'' instead.) For the default value, see the
- actual implementation on \cpageref{p:preamble} as well as the explanation
- in \cref{sec:linestructure}.
+ \pkg{array}, which prevents the expansion of whatever is provided as its
+ preamble, and so we supply the preamble in the form of a single ``column''
+ instead.) For the default value, see the actual implementation on
+ \cpageref{p:preamble} as well as the explanation in
+ \cref{sec:linestructure}.
\end{docKey}
\begin{docKey}{prefix}{\,=\,\meta{commands}}{no default}
@@ -1795,6 +2538,15 @@ See also \refk{compact}.
\cref{sec:linestructure}.
\end{docKey}
+\begin{docKey}{prevdepth}{\,=\,\meta{depth}}{\initialkeyvalue{\code{.3\cs{baselineskip}}}}
+ This value is used to properly adjust the vertical distance to any
+ following text, by setting \cs{prevdepth} to \meta{depth}, unless
+ \refk{compact} is set to \code{true}. In general, it should not be
+ necessary to change its value.\footnote{In previous versions,
+ \cs{prevdepth} was not set. To get the old behavior, set \code*{prevdepth =
+ 0pt}.}
+\end{docKey}
+
\begin{docKey}{prfont}{\,=\,\meta{font}}{\initialkeyvalue{\refc{cnfont}}}
\fontkey{pr}
\end{docKey}
@@ -1814,6 +2566,7 @@ See also \refk{compact}.
without the star or the \meta{overlay specification}, you need to supply
at least an empty pair of brackets for the global options:
\begin{texexp}
+\pseudoset{hpad} % because we're using hl
\begin{pseudo}[][hl]
First line \\
Second line
@@ -1838,6 +2591,47 @@ Second line
to only \refk{bol}.
\end{docEnvironment}
+\begin{docKey}{pseudo/boxed}{}{\pkg{tcolorbox} style}
+ \tcolorboxstylepre
+
+\begin{texexp}
+\begin{tcolorbox}[pseudo/boxed,
+ title={Algorithm 1\enskip \pr{Hello}(x)}]
+ \begin{pseudo}
+ \kw{print} \st{Hello,} $x$
+ \end{pseudo}
+\end{tcolorbox}
+\end{texexp}
+
+ \tcolorboxstylepost
+\end{docKey}
+%
+\tcolorboxstylenosource{booktabs}
+\tcolorboxstylenosource{boxruled}
+\tcolorboxstylenosource{filled}
+
+\begin{docKey}{pseudo/init}{\,=\,\meta{commands}}{\pkg{tcolorbox} hook}
+ Can be used to define the contents of a hook that is inserted before the
+ contents of a \pkg{tcolorbox} box styled with one of the \code{pseudo/}
+ styles, such as \refk{pseudo/boxruled}, etc. It is used as part of the
+ \pkg{tcolorbox} configuration, and is \emph{not} set using \cs{pseudoset}.
+ Useful, e.g., for setting \cs{parskip} or tabstops (with the \pkg{tabto}
+ package).
+\begin{texexp}
+\begin{tcolorbox}[pseudo/boxed, pseudo/init=\parskip 2ex]
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
+diam nonumy eirmod tempor invidunt ut labore et dolore magna.
+
+At vero eos et accusam et justo duo dolores et ea rebum. Stet
+clita kasd gubergren, no sea takimata sanctus est Lorem ipsum
+dolor sit amet.
+\end{tcolorbox}
+\end{texexp}
+\end{docKey}
+
+\tcolorboxstylenosource{ruled}
+\tcolorboxstylenosource{tworuled}
+
\begin{docCommand}{pseudobol}{}
\setandused{bol}{pseudoprefix}
\end{docCommand}
@@ -1854,12 +2648,6 @@ Second line
It is inserted between lines, but not after the last one.
\end{docCommand}
-\begin{docCommand}{pseudoeq}{}
- Similar to \refc{pseudoslash}. Switches the definition of \cs{=} to the
- one used by \pkg{pseudo}. Useful if \cs{=} reverts to its original
- definition in some context (see \refc{==}).
-\end{docCommand}
-
\begin{docCommand}{pseudofont}{}
\setandused{font}{pseudosetup}
It is used to set up the font for each pseudocode line. (See also
@@ -1885,14 +2673,18 @@ Second line
% Protrudes into the margin:
% \setandused{indent-length}{pseudosetup}
% Manual:
- The command set by the \refk{indent-length} option. Used in
- \refc{pseudosetup}.
+ The command set by the \refk{indent-length} and \refk{indent-mark} options.
+ Used in \refc{pseudosetup}.
More precisely, \refk{indent-length} is stored textually, and is converted
to the length \cs{pseudoindentlength} when entering a \refe{pseudo}
environment (so that units like \code{em} and \code{ex} adapt to the
- current font). The \cs{pseudoindent} command then inserts a horizontal
- space of length $\cs{pseudoindentlength}\times\textit{current indent
- level}$.
+ current font). If no \refk{indent-mark} is set, the \cs{pseudoindent}
+ command then inserts a horizontal space of length
+ $\cs{pseudoindentlength}\times\textit{current indent level}$. Otherwise,
+ one \refk{indent-mark} and a horizontal space of length
+ \cs{pseudoindentlength} is inserted for each level of indentation up to the
+ current indentation level. (This horizontal space is measured from the left
+ edge of the \refk{indent-mark}.)
\end{docCommand}
\begin{docCommand}{pseudolabel}{}
@@ -1904,6 +2696,14 @@ Second line
Counter for pseudocode lines. See also \refk{*}.
\end{docKey}
+\begin{docCommand}{pseudopos}{}
+ \setandusedinit{pos}{begin-tabular}
+\end{docCommand}
+
+\begin{docCommand}{pseudopreamble}{}
+ \setandusedinit{preamble}{begin-tabular}
+\end{docCommand}
+
\begin{docCommand}{pseudoprefix}{}
\setandused{prefix}{\bslash}
\end{docCommand}
@@ -1920,8 +2720,7 @@ Second line
\begin{docCommand}{pseudoset}{\marg{options}}
Used to set the configuration keys of the \pkg{pseudo} package (using
- \pkg[https://ctan.org/pkg/l3kernel]{l3keys} with
- \code{pseudo} as the module). These may also be set as
+ \pkg{l3keys} with \code{pseudo} as the module). These may also be set as
% package options (in \cs{usepackage}) and as
optional arguments to the \refEnv*{pseudo} and \refEnv*{pseudo*}
environments. For example, if you'd like to switch to \cs{rm} as your base
@@ -1937,14 +2736,6 @@ Second line
\emph{Not to be confused with \refc{pseudoset}.}
\end{docCommand}
-\begin{docCommand}{pseudoslash}{}
- Command similar to the \cs{arrayslash} of the
- \pkg[https://ctan.org/pkg/array]{array} package. Switches the definition
- of \cs{\bslash} to the one used by \pkg{pseudo}. Useful if you've used
- some code that modifies \cs{\bslash} for its own purposes (such as
- \cs{raggedleft} or the like).
-\end{docCommand}
-
\begin{docKey}{ref}{\,=\,\meta{commands}}{initially empty, default
\refc{pseudolabel}}
Shortcut for setting the \cs{thepseudoline} command. If used without
@@ -1963,6 +2754,30 @@ goto \tn{\ref{li:ref}}
\end{texexp}
\end{docKey}
+\begin{docCommand}{RestorePseudoBackslash}{}
+ Command similar to the \cs{arraybackslash} of the \pkg{array} package.
+ Switches the definition of \cs{\bslash} to the one used by \pkg{pseudo}.
+ Useful if you've used some code that modifies \cs{\bslash} for its own
+ purposes (such as \cs{raggedleft} or the like).
+\end{docCommand}
+
+\begin{docCommand}{RestorePseudoEq}{}
+ Similar to \refc{RestorePseudoBackslash}. Switches the definition of \cs{=}
+ to the one used by \pkg{pseudo}. Useful if \cs{=} reverts to its original
+ definition in some context (see \refc{==}).
+\end{docCommand}
+
+\begin{docCommand}{rng}{}
+ Used to typeset a range, slice or subarray, or simply to indicate the
+ indices of an array, similar to \refc{dts}, but using a colon rather than
+ two dots placed horizontally. Uses the same spacing as \refc{dts}, as
+ opposed to a plain \code{:}, which adds more space (more suitable, for
+ example, to set-builder notation).
+\begin{texexp}
+Compare $A[1\rng n]$ to $A[1:n]$.
+\end{texexp}
+\end{docCommand}
+
\begin{docKey}{setup}{\,=\,\meta{commands}}{no default}
The setup part of each pseudocode line: Save the line counter
(using the \refc{pseudosavelabel} command), insert the proper indentation
@@ -2052,8 +2867,10 @@ See also \refk{indent-level}.
\end{docKey}
\begin{docKey}{unknown}{}{}
- Unknown keys are checked for \pkg[https://ctan.org/pkg/beamer]{beamer}
- overlay specifications. That is, if an unknown key has the form
+ \parindent1.5em
+ \noindent
+ Unknown keys are checked for \pkg{beamer} overlay specifications. That is,
+ if an unknown key has the form
\medskip
@@ -2062,8 +2879,9 @@ See also \refk{indent-level}.
\medskip
- then it does not trigger an error, but, if
- \pkg[https://ctan.org/pkg/beamer]{beamer} is used, is rewritten to:
+ \noindent
+ then it does not trigger an error, but, if \pkg{beamer} is used, is
+ rewritten to:
\medskip
@@ -2073,9 +2891,9 @@ See also \refk{indent-level}.
\medskip
- If \pkg[https://ctan.org/pkg/beamer]{beamer} is \emph{not} used, the key
- is simply ignored. Note that because of current limitations on how keys
- are handled,
+ \noindent
+ If \pkg{beamer} is \emph{not} used, the key is simply ignored. Note that
+ because of current limitations on how keys are handled,
% Cf. https://github.com/latex3/latex3/issues/67
unknown keys cannot have defaults, and so there is no way to insert a
marker for when no value is provided, which could be used to determine
@@ -2089,11 +2907,17 @@ See also \refk{indent-level}.
\code*{\refc{pseudoset}\braces{\meta{name}}}
rather than
\code*{\refc{pseudoset}\braces{\meta{name} = }}.
+
+ If an unknown key does \emph{not} take the form of a key with an overlay
+ specification, a second special case is also handled: If we're processing
+ arguments for \refc{\bslash}, and the key does not have an associated
+ (non-blank) value, we treat the key instead as a \emph{value}, whose
+ implicit key is \refk{extra-space}. This means that you can specify extra
+ space in the ordinary way, with \code{\cs{\bslash}[1.5ex]}, etc.
\end{docKey}
\section{But how do I\,\dots}
-
Some functionality is not built in, but is still fairly easy to achieve. Some
streamlining may be added in future versions.
@@ -2104,7 +2928,7 @@ could have it not start its own, i.e., not have an empty line before it. This
will reduce the amount of spacing as well; if you'd rather have that reduced,
you could simply drop the empty line \emph{after} the environment:
-\begin{texexp}[listing only]
+\begin{texexp}[listing]
Text before
\begin{pseudo}
@@ -2123,13 +2947,14 @@ The effect would then be the following:
%
No indentation here, and normal spacing. If, however, you wish to suppress
indentation after \emph{all} instances of \refe{pseudo}, you could use the
-\pkg[https://ctan.org/pkg/noindentafter]{noindentafter} package, as follows:
+\pkg{noindentafter} package, as follows:
\medskip
-\begin{texexp}[listing only]
+\begin{texexp}[listing]
\usepackage{noindentafter}
\NoIndentAfterEnv{pseudo}
+\NoIndentAfterEnv{pseudo*}
\end{texexp}
\noindent
@@ -2144,7 +2969,7 @@ everywhere). If you wish to define your own, you could use \cs{operatorname}
or \cs{DeclareMathOperator}. For example:
\begin{texexp}
-% In preamble:
+% In document preamble:
% \usepackage{amsmath}
% \DeclareMathOperator{\MyFunc}{my-func}
\begin{pseudo}[kw]
@@ -2163,22 +2988,21 @@ If you use the \refk{kw} key, all pseudocode not in math mode will end up
using the keyword font (\refc{kwfont}), which initially is bold. Though some
\emph{do} typeset, e.g., grouping braces in boldface, you might not want to do
that; the same goes for, say, line-terminating semicolons. The
-\code{theoremfont} option of, e.g., \pkg[https://ctan.org/pkg/newtx]{newtx}
-does something similar (for italics), but uses a custom font for that.
-Packages like \pkg[https://ctan.org/pkg/embrac]{emrac} rely on straightforward
-textual substitution, replacing certain characters with marked-up ones, but
-the way things are set up at the moment, our font command won't have access to
-the entire line when it's executed.
-
-If you're adventurous, it's not hard (using the
-\pkg[https://ctan.org/pkg/xparse]{xparse} argument type \code{u}) to make a
-version that \emph{does} gobble up the entire line, up to and including
-\verb|\\| (and you could then use the regular expression functionality from
-\pkg[https://ctan.org/pkg/expl3]{expl3}, presumably also reinserting
-\refc{\bslash}). A simpler solution is to just use \refc{DeclarePseudoNormal}.
-Here's an example based on pseudocode from \citet{Knuth:1975}:
+\code{theoremfont} option of, e.g., \pkg{newtx} does something similar (for
+italics), but uses a custom font for that. Packages like \pkg{emrac} rely on
+straightforward textual substitution, replacing certain characters with
+marked-up ones, but the way things are set up at the moment, our font command
+won't have access to the entire line when it's executed.
+
+If you're adventurous, it's not hard (using the \pkg{xparse} argument type
+\code{u}) to make a version that \emph{does} gobble up the entire line, up to
+and including \verb|\\| (and you could then use the regular expression
+functionality from \pkg{expl3}, presumably also reinserting \refc{\bslash}). A
+simpler solution is to just use \refc{DeclarePseudoNormal}. Here's an example
+based on pseudocode from \citet{Knuth:1975}:
\begin{texexp}
+% In document preamble:
% \usepackage{mathtools}
\let\gets\coloneqq
@@ -2189,10 +3013,10 @@ Here's an example based on pseudocode from \citet{Knuth:1975}:
\begin{pseudo*}
procedure \id{printstatistics}\; \\
begin integer $j$\; \\+
- $\id{write}(\st{Closed sets for rank}, r, \st{:})$\; \\
+ \fn{write}(\st{Closed sets for rank}, r, \st{:})\; \\
$j \gets L[h]$\; \\
while $j \neq h$ do \\+
- begin $\id{writeon}(S[j])$\; $j\gets L[j]$ end\; \\--
+ begin \fn{writeon}(S[j])\; $j\gets L[j]$ end\; \\--
end\;
\end{pseudo*}
\end{texexp}
@@ -2213,39 +3037,27 @@ only do it locally, at the very least):
\end{pseudo*}
\end{texexp}
-\subsection{\dots\,use \texttt{tabularx}?}
+\subsection{\dots\,use \codefont{tabularx}?}
\label{sec:tabularx}
-You can use other tabular packages such as
-\pkg[https://ctan.org/pkg/tabularx]{tabularx} via \refk{begin-tabular} and
-\refk{end-tabular}. Let's say, for example, that you wish to extend the
-\refe{pseudo} environment to fill out the entire line, and set up a new column
-for comments. You could achieve that as follows:
+You can use other tabular packages such as \pkg{tabularx} via
+\refk{begin-tabular} and \refk{end-tabular}. Let's say, for example, that you
+wish to extend the \refe{pseudo} environment to fill out the entire line, and
+set up a new column for comments. You could achieve that as follows:
-% ! Duplicate of the one inside texexp, so it can be reused later.
-\pseudodefinestyle{fullwidth}{
- begin-tabular =
- \tabularx{\linewidth}{@{}
- r % Labels
- >{\pseudosetup} % Indent, font, ...
- X % Code (flexible)
- >{\leavevmode\small\color{black!60}} % Comment styling
- p{0.45\linewidth} % Comments (fixed)
- @{}},
- end-tabular=\endtabularx
-}
+\label{p:fullwidth}
\begin{texexp}
\pseudodefinestyle{fullwidth}{
begin-tabular =
- \tabularx{\linewidth}{@{}
+ \tabularx{\linewidth}[t]{@{}
r % Labels
>{\pseudosetup} % Indent, font, ...
X % Code (flexible)
- >{\leavevmode\small\color{black!60}} % Comment styling
- p{0.45\linewidth} % Comments (fixed)
+ >{\leavevmode\small\color{gray}} % Comment styling
+ p{0.5\linewidth} % Comments (fixed)
@{}},
end-tabular = \endtabularx,
- setup-append = \pseudoeq
+ setup-append = \RestorePseudoEq
}
\begin{pseudo}[kw, fullwidth, line-height=1.1]*
\hd{Counting-Sort}(A, k) & Find positions by counting \\
@@ -2260,16 +3072,16 @@ modifier with a \code{p} column places the text in a new paragraph, on the
next line; you'll need to insert \cs{leavevmode} or the like to prevent that.
This is true also of normal \code{tabular} environments. Also note
that \code{tabularx} environments with \code{X} columns don't interact nicely
-with \cs{=}; so i you wish to use \refc{==}, you can reassert the definition
-by adding \code{>\braces{\refc{pseudoeq}}} before each column.
+with \cs{=}; so if you wish to use \refc{==}, you can reassert the definition
+by adding \code{>\braces{\refc{RestorePseudoEq}}} before each
+column.\footnote{You can also, of course, just use \refc{eqs} instead.}
-See the \pkg[https://ctan.org/pkg/tabularx]{tabularx} documentation
-(page~4) for an explanation of why we can't use
-\code{\cs{begin}\braces{tabularx}} and \code{\cs{end}\braces{tabularx}}.
-Also note that because \pkg[https://ctan.org/pkg/tabularx]{tabularx} passes
-its contents as the argument to a macro, the parsing \pkg{pseudo} uses to
-determine if \refc{\bslash} is at the end of the last line doesn't work; if
-you add \refc{\bslash} at the end here, you'll introduce an empty line.
+See the \pkg{tabularx} documentation (page~4) for an explanation of why we can't
+use \code{\cs{begin}\braces{tabularx}} and \code{\cs{end}\braces{tabularx}}.
+Also note that because \pkg{tabularx} passes its contents as the argument to a
+macro, the parsing \pkg{pseudo} uses to determine if \refc{\bslash} is at the
+end of the last line doesn't work; if you add \refc{\bslash} at the end here,
+you'll introduce an empty line.
\makeatletter
For simplicity, I've used \code{@\braces{}} to remove space on either side.
@@ -2279,21 +3091,22 @@ For \refk{hpad} to work, you should use \code{>\braces{\cs{pseudohpad}}} and
to use \cs{pseudolabelalign}, rather than \code{r}.
\makeatother
+
\subsection{\dots\,get tab stops?}
+\label{sec:tabstops}
-Some packages, such as \pkg[https://ctan.org/pkg/clrscode3e]{clrscode3e}, use
-an actual \code{tabbing} environment internally. While this may be a bit
-brittle (e.g., creating problems if you wish to insert your pseudocode into a
+Some packages, such as \pkg{clrscode3e}, use an actual \code{tabbing}
+environment internally. While this may be a bit brittle (e.g., creating problems
+if you wish to insert your pseudocode into a
\pkg[https://ctan.org/pkg/pgf]{tikz} node---one of the goals of \pkg{pseudo}),
it does mean that you can use the tabbing command \cs{>} manually, to align
various construct.
If all your tabbing is done \emph{before} the text on a given code line, you
can achieve this in \pkg{pseudo} as well, by using the \code{+} and \code{-}
-modifiers. (For example, the tab stops in
-\pkg[https://ctan.org/pkg/clrscode3e]{clrscode3e} are set at fixed intervals,
-just like in \pkg{pseudo}.) But what if you'd like to align something that
-comes later, such as comments after code lines? You can't simply use
+modifiers. (For example, the tab stops in \pkg{clrscode3e} are set at fixed
+intervals, just like in \pkg{pseudo}.) But what if you'd like to align something
+that comes later, such as comments after code lines? You can't simply use
\cs{hspace}, of course, unless the code lines themselves have exactly the same
length.
@@ -2306,7 +3119,6 @@ use \cs{noindent}, here. You could replace
\code{\cs{makebox}[0pt][l]\braces{\dots}}. This isn't an issue in
\code{pseudo} code lines, however.}
-
\begin{texexp}
\noindent\rlap{This is some text}%
And here is some more
@@ -2315,7 +3127,7 @@ And here is some more
\noindent
By using \cs{rlap} on the code lines in question, you can insert \cs{hspace}
that begins at the beginning of the code line (here with an example
-convenience command defined using \pkg[https://ctan.org/pkg/xparse]{xparse}):
+convenience command defined using \pkg{xparse}):
\begin{texexp}
\NewDocumentCommand \C { +u{/* } +u{ */} } {%
@@ -2333,6 +3145,51 @@ comments. If you wish to align things across different indentation levels,
you'll have to add or subtract multiples of \cs{pseudoindentlength} (see
\refc{pseudoindent}).
+Another option for aligning comments or the like is to use a custom \cs{tabular}
+or \cs{tabular}-like environment, where the aligned material is placed in a
+column of its own. This is the technique used in \cref{alg:gnome}, for example.
+For more on this approach, see \cref{sec:tabularx}.
+
+If you want alignment or tabbing \emph{outside} the \refe{pseudo} environment,
+for example, to align the input and output descriptions inside a
+\code{tcolorbox} (cf.\@ \cref{sec:floats}), an excellent alternative is the
+\pkg{tabto} package.
+%
+You could also use other constructs, such as a \code{tabular}, \code{tabbing} or
+\code{description}. An advantage of the \pkg{tabto} solution is that you retain
+the paragraph spacing set up by the \pkg{tcolorbox} styles defined by
+\pkg{pseudo}.
+
+You can simply define the tab stops globally, using \cs{TabPositions} in your
+preamble, or you can do it as part of the box setup, e.g.,. using
+\refk{pseudo/init} when defining your \pkg{tcolorbox} environment with
+\cs{newtcbtheorem} (or, as in the following simplified example,
+just supply it directly as an option to the box environment).
+
+\begin{texexp}
+% In document preamble:
+% \usepackage{tabto}
+\begin{tcolorbox}[pseudo/filled,
+ pseudo/init = {\TabPositions{1.5cm}}]
+
+\textbf{Data}
+ \tab A graph $G=(V,E)$ with weight function $w:E\to\mathbf{R}$
+
+ \tab A start node $s\in V$
+
+\textbf{Require}
+ \tab No negative cycle in $G$ is reachable from $s$
+
+\textbf{Result}
+ \tab An matrix $D$ of distances between the vertices in $V$
+
+\begin{pseudo}
+\dots
+\end{pseudo}
+\end{tcolorbox}
+\end{texexp}
+
+
\subsection{\dots\,use horizontal lines?}
\label{sec:horizontallines}
@@ -2341,8 +3198,8 @@ horizontal lines above and below, and generally a header row on top. While
this may be part of a surrounding floating environment (see
\cref{sec:floats}), you may also wish to include such lines in your actual
pseudocode. In this case, you can simply use existing \code{tabular}-based
-tools such as \pkg[https://ctan.org/pkg/booktabs]{booktabs}, making sure to
-suppress the \pkg{pseudo} \refk{prefix} using the star flag (\code{*}):
+tools such as \pkg{booktabs}, making sure to suppress the \pkg{pseudo}
+\refk{prefix} using the star flag (\code{*}):
\begin{texexp}
% \usepackage{booktabs}
@@ -2369,114 +3226,11 @@ Rather than \code{\cs{\bslash}[bol=\cs{midrule}]}, you could also have used
that the paragraph break between \refc{\bslash} and its argument has been
commented out.)
-\subsection{\dots\,get an algorithm float?}
-\label{sec:floats}
-
-There are (at least) two different ways of viewing a block of pseudocode: As
-an inline element, like equations, or as a float, like figures and tables. For
-example, \citet{Cormen:2009} place their pseudocode inline, and refer to the
-algorithms by name (e.g., \pr{Dijkstra}), while \citet{Williamson:2011} place
-them in floats, and refer to them by number (e.g.,
-Algorithm~3.1).%
-\footnote{A third option that is sometimes used is to use a theorem-like
-environment for your algorithms. There are many packages to help with this;
-just search \href{https://ctan.org}{\textsc{ctan}} for
-``\href{https://ctan.org/search/?phrase=theorem}{theorem}''.}
-%
-Some pseudocode packages have a custom float environment (à la \code{table}
-and \code{figure}) for use with algorithms described by pseudocode. Beyond
-having a new float name (such as ``Algorithm'') with its own numbering and the
-like, they at times have rather distinct styling (horizontal lines in
-\pkg[https://ctan.org/pkg/algorithms]{algorithms} and
-\pkg[https://ctan.org/pkg/algorithmicx]{algorithmicx}, and a surrounding box
-in \pkg[https://ctan.org/pkg/algorithm2e]{algorithm2e}), which may or may not
-suit the styling of the rest of your document.
-
-Rather than getting into the business of float environments, I leave such
-things to separate packages designed for that use. A basic solution would be
-to simply use the \pkg[https://ctan.org/pkg/float]{float} package (which also
-provides ruled and boxed floats, should you wish to have those), but a quick
-\href{https://ctan.org}{\textsc{ctan}} search for
-``\href{https://ctan.org/search/?phrase=float}{float}'', or a look at the
-\href{https://ctan.org/recommendations/float}{recommendations} related to the
-\pkg[https://ctan.org/pkg/float]{float} package, will give you many options,
-with varying functionality.
-%
-
-\medskip
-
-\paragraph{Note:} The definition of \refc{==} doesn't properly carry over into
-floats. It's properly redefined inside \refe{pseudo}, so you probably won't
-notice, but if you wish to use the symbol outside the \refe{pseudo}
-environment, but in a float (e.g., inside \cs{caption}), you'll need to either
-call \refc{pseudoeq} to re-establish the definition of \cs{=} or simply use
-\refc{eqs} instead of \refc{==}.
-
-\medskip
-
-\noindent
-Here's a simple example using the \pkg[https://ctan.org/pkg/float]{float}
-and \pkg[https://ctan.org/pkg/caption]{caption} packages, reusing the
-\code{fullwidth} style example from \cref{sec:tabularx} and the horizontal
-line ideas from \cref{sec:horizontallines}:
-
-% ! Duplicate of the code in the actual float
-\begin{texexp}[listing only]
-% \usepackage{float}
-% \usepackage{caption}
-\floatstyle{plaintop}
-\newfloat{algorithm}{tbp}{alg}[section]
-\floatname{algorithm}{Algorithm}
-
-\begin{algorithm}
-\begin{pseudo}[fullwidth]*
-
-% Insert pseudocode and comments
-
-\end{pseudo}
-\caption{...}
-\end{algorithm}
-\end{texexp}
-
-\noindent
-You can see the result in \cref{alg:example}.
-
-\floatstyle{plaintop}
-\newfloat{algorithm}{tbp}{alg}[section]
-\floatname{algorithm}{Algorithm}
-\begin{algorithm}
-\begin{pseudo}[fullwidth]*
-\toprule
-
- \hd{Bor\r{u}vka}(G, w) &
- Construct MST $T$ for $G$ wrt.\ $w$ \\[bol=\midrule]
-
- \kw{while} $E(G)$ is not empty &
- Not all are contracted yet \\+
- \kw{for} each $u\in V(G)$ &
- One light edge per node \\+
- add light $uv \in E(G)$ to $T$ &
- $T$ is the tree we're building \\-
- \kw{for} each $e \in T$ &
- These edges are already used \\+
- contract $e$ &
- We focus on the remaining ones \\*
-
-\bottomrule
-\end{pseudo}
-\caption{Bor\r{u}vka's algorithm for finding minimum spanning trees. For a
-node $u$, a \emph{light} edge is an edge $uv$ of minimum weight $w(u,v)$.
-Contracting $uv$ deletes it, identifies $u$ and $v$, and removes resulting
-loops. The result $T$ is initially empty.}
-\label{alg:example}
-\end{algorithm}
-
\subsection{\dots\,handle object attributes?}
-In the \pkg[https://ctan.org/pkg/clrscode3e]{clrscode3e} package, you'll find
-an assortment of commands for handling
-object attributes such as $A.\id{length}$. The manual says (here with emulated
-kerning of the dot operator):
+In the \pkg{clrscode3e} package, you'll find an assortment of commands for
+handling object attributes such as $A.\id{length}$. The manual says (here with
+emulated kerning of the dot operator):
\begin{quote}
You might think you could typeset $A\mkern1mu.\id{length}$ by
@@ -2487,15 +3241,11 @@ kerning of the dot operator):
\noindent
However, this is a font issue, more than anything. If, for example, if you
-want Times New Roman (like Cormen et al.)\@ and use
-\pkg[https://ctan.org/pkg/mathptm]{mathptm}, you at times run into the problem
-described; with \pkg[https://ctan.org/pkg/newtx]{newtx} it's less pronounced.
-With other fonts (e.g.,
-\pkg[https://ctan.org/pkg/fourier]{fourier},
-\pkg[https://ctan.org/pkg/mathpple]{mathpple} or
-\pkg[https://ctan.org/pkg/newtx]{newtxmath} with
-\pkg[https://ctan.org/pkg/libertine]{libertine}), or even without any font
-packages (or possibly using \pkg{lmodern}), the kerning works just fine.
+want Times New Roman (like Cormen et al.)\@ and use \pkg{mathptm}, you at times
+run into the problem described; with \pkg{newtx} it's less pronounced. With
+other fonts (e.g., \pkg{fourier}, \pkg{mathpple} or \pkg{newtxmath} with
+\pkg{libertine}), or even without any font packages (or possibly using
+\pkg{lmodern}), the kerning works just fine.
In general, then, I suggest you try to use \code{\$A.\cs{id}\braces{length}\$}
and the like, and see if the result is satisfactory:
@@ -2506,22 +3256,24 @@ $v.\id{prev}.\id{next} = v.\id{next}$
\noindent
If you \emph{do} need to adjust the kerning (with \cs{mkern} commands or
-perhaps using \pkg[https://ctan.org/pkg/microtype]{microtype}), you may of
-course do so, but \pkg{pseudo} does not (at present) include any special
-attribute lookup commands that do it for you.
+perhaps using \pkg{microtype}), you may of course do so, but \pkg{pseudo} does
+not (at present) include any special attribute lookup commands that do it for
+you.
-\subsection{\dots\,get vertical lines or braces?}
+\subsection{\dots\,indicate blocks with braces or the like?}
-Some packages (such as \pkg[https://ctan.org/pkg/algorithm2e]{algorithm2e})
-have support for using vertical lines to indicate the block structure;
+Some packages (such as \pkg{algorithm2e}) have support for using vertical lines
+to indicate the block structure;
\pkg[https://ctan.org/tex-archive/macros/latex/contrib/pseudocode]{pseudocode}
-uses large braces. At least in the current version, there is no such built-in
-functionality in \pkg{pseudo}. This could be added in a future version, but if
-you want to play around with it yourself, you could use
-\pkg[https://ctan.org/pkg/pgf]{tikz}. For example, you could add a \code{node}
-at the start of each code line, containing an \verb|\@arstrut|, the
-(\pkg[https://ctan.org/pkg/array]{array}) strut used to indicate the extent of
-a tabular row:
+uses large braces. In \pkg{pseudo}, there is support for using an
+\refk{indent-mark}, for which the default is a semithick, gray vertical line
+(see \cpageref{p:indent-mark}). However, by using
+\pkg[https://ctan.org/pkg/pgf]{tikz}, you could draw all kinds of indentation
+decorations.
+
+You could, for example, add a \code{node} at the start of each code line,
+containing an \verb|\@arstrut|, the (\pkg{array}) strut used to indicate the
+extent of a tabular row:
% ! Contents duplicated
\makeatletter
@@ -2531,7 +3283,7 @@ a tabular row:
\ignorespaces
}
\makeatother
-\begin{texexp}[listing only]
+\begin{texexp}[listing]
% \usepackage{xparse,tikz}
% \usetikzlibrary{decorations.pathreplacing,calligraphy}
\makeatletter
@@ -2544,11 +3296,11 @@ a tabular row:
\end{texexp}
\noindent
-We can then use the resulting nodes to draw braces or lines or whatever. First
+You can then use the resulting nodes to draw braces or lines or whatever. First
some example setup:
% ! Duplicated
-\begin{texexp}[listing only]
+\begin{texexp}[listing]
\pseudoset{
kw,
indent-length = 3.5em,
@@ -2600,12 +3352,12 @@ might add it in a future version.
\label{sec:older}
As mentioned in the introduction, I've tried to make \pkg{pseudo} work with at
-least \emph{somewhat} outdated \TeX\ distributions. In these cases, the
-package itself won't be available as part of the distribution, of course, but
-you can simply download the file
-\texttt{\href{http://mirrors.ctan.org/macros/latex/contrib/pseudo/pseudo.sty}{pseudo.sty}}
-and place it in the directory where you're compiling your document (or
-anywhere else where your \LaTeX\ executable can find it).
+least \emph{somewhat} outdated \TeX\ distributions. In these cases, the package
+itself won't be available as part of the distribution, of course, but you can
+simply download the file
+\codefont{\href{http://mirrors.ctan.org/macros/latex/contrib/pseudo/pseudo.sty}%
+{pseudo.sty}} and place it in the directory where you're compiling your document
+(or anywhere else where your \LaTeX\ executable can find it).
However, there may be cases where this just doesn't work, such as when
submitting to a publisher with a really old setup.\footnote{If possible,
@@ -2614,13 +3366,12 @@ though, feel free to
\href{https://github.com/mlhetland/pseudo.sty/pulls}{provide a pull request}
to address the issue.}
In that case, the simplest solution is probably to use the
-\pkg[https://ctan.org/pkg/standalone]{standalone} package to produce
-individual PDFs of your algorithms, and then to include those in your
-document. Then you can submit the PDFs rather than the \LaTeX, so that the
-pseudocode need not be compiled on the old system. Each algorithm could go in
-a file like this:
+\pkg{standalone} package to produce individual PDFs of your algorithms, and then
+to include those in your document. Then you can submit the PDFs rather than the
+\LaTeX, so that the pseudocode need not be compiled on the old system. Each
+algorithm could go in a file like this:
-\begin{texexp}[listing only]
+\begin{texexp}[listing]
\documentclass{standalone}
\usepackage{pseudo}
\begin{document}
@@ -2631,9 +3382,9 @@ a file like this:
\end{texexp}
\noindent
-Let's say this is compiled to \texttt{algo1.pdf}. You then include this file:
+Let's say this is compiled to \codefont{algo1.pdf}. You then include this file:
-\begin{texexp}[listing only]
+\begin{texexp}[listing]
\documentclass{article}
\usepackage{graphicx} % For \includegraphics
...
@@ -2641,7 +3392,7 @@ Let's say this is compiled to \texttt{algo1.pdf}. You then include this file:
... sanctus est Lorem ipsum dolor sit amet:
\medskip\noindent
-\includegraphics{algo1}
+\includegraphics{algo1.pdf}
\smallskip
Lorem ipsum dolor sit amet, consetetur sadipscing ...
@@ -2657,6 +3408,278 @@ Of course, you won't have access to other functionality (such as
of that should be possible to emulate by hand (possibly peeking at the
implementation in \cref{sec:impl}).
+\subsection{\dots\,use a header with no arguments?}
+
+Normally, \refc{hd} has a mandatory set of arguments; at the very least,
+you'll need to supply the parentheses:
+
+\begin{texexp}
+\begin{pseudo}*
+\hd{No-Arguments}() \\
+\dots\ but still with parentheses
+\end{pseudo}
+\end{texexp}
+
+\noindent
+This is because \refc{hd} has to be fully expandable to be able to insert the
+requisite \cs{multicolumn}, and then it cannot have any (final) optional
+arguments. If you'd like, though, you can just use \cs{multicolumn} yourself
+(see also \refk{hd-preamble}):
+
+\begin{texexp}
+\begin{pseudo}*
+\multicolumn{2}{\pseudohdpreamble}
+{\pr{No-Arguments}} \\
+\dots\ and no parentheses!
+\end{pseudo}
+\end{texexp}
+
+\subsection{\dots\,place algorithm boxes side by side?}
+
+In the simplest case, maybe you just want to place two of them side by side in
+the text (i.e., not as floats). Let's say you've defined an environment as
+follows:
+
+% Duplicated:
+\newtcbtheorem{procedure}{Procedure}{pseudo/filled}{}
+\begin{texexp}[listing]
+\newtcbtheorem{procedure}{Procedure}{pseudo/filled}{}
+\end{texexp}
+
+Two of these cannot directly be placed side by side, because each will insert
+paragraph breaks and spacing before and after itself. However, this code can be
+disabled by using the \pkg{tcolorbox} keys \code{before} and \code{after} (along
+with \code{width}, to make sure there's room. If we also want the boxes to have
+the same height, we can use the key \code*{equal height group} (with some
+arbitrary name):
+
+\begin{texexp}
+\begin{procedure}[after={}, width=.49\linewidth,
+ equal height group=A]{}{}
+\begin{pseudo}
+Foo \\ Bar \\ Baz
+\end{pseudo}
+\end{procedure}
+\hfill
+\begin{procedure}[before={}, width=.49\linewidth,
+ equal height group=A]{}{}
+\begin{pseudo}
+Frozz \\ Bozz
+\end{pseudo}
+\end{procedure}
+\end{texexp}
+
+\noindent
+If the boxes are floats (i.e., either defined or used with the \pkg{tcolorbox}
+key \code{float}, you can still use the \code*{equal height group} key. This is
+useful, for example, in a twocolumn layout, if the boxes are at the top (or
+bottom), one in each column.
+
+Finally, if your boxes are floats in general, you're using a single-column
+layout, and you want two boxes to float \emph{together}, side by side (e.g.,
+because the pseudocode itself takes up little horizontal space), you can use the
+first technique (setting \code{width}, \code{before} and \code{after}) along
+with the \pkg{tcolorbox} key \code{nofloat}, and then place the boxes inside
+some other float (such as a normal \LaTeX\@ \code{figure}, or a custom one using
+the \pkg[https://ctan.org/tex-archive/macros/latex/contrib/float]{float}
+package):
+
+\begin{texexp}[listing]
+\begin{figure}
+\begin{procedure}[nofloat, after={}, width=.49\linewidth,
+ equal height group=A]{}{}
+\begin{pseudo}
+ % ...
+\end{pseudo}
+\end{procedure}
+\hfill
+\begin{procedure}[nofloat, after={}, width=.49\linewidth,
+ equal height group=A]{}{}
+\begin{pseudo}
+ % ...
+\end{pseudo}
+\end{procedure}
+\end{figure}
+\end{texexp}
+
+\subsection{\dots\,have steps span multiple lines?}
+
+First of all, you can do this by just breaking your lines manually, keeping any
+additional lines belonging to the same step unnumbered, by using the starred
+version of \refc{\bslash} (and skipping the number column with \code{\&}):
+adding unnumbered lines:
+\begin{texexp}
+\begin{pseudo}[line-height=1.1]
+ This step is broken\,\dots \\*
+& \dots\,into multiple lines \\
+ This one is not
+\end{pseudo}
+\end{texexp}
+If you want the line breaking to be automated, you can use a \code{p} column,
+specified in \refk{preamble} (perhaps defining a style using
+\refc{pseudodefinestyle}), adapted from the default:\footnote{The default is
+found on p.~\pageref{p:preamble}. However, in the source code there, whitespace
+is insignificant. If writing your own preamble, you should avoid spurious
+whitespace inside \code{>\braces{\dots}} and \code{<\braces{\dots}}.}
+\begin{texexp}
+\begin{pseudo}[preamble = {
+ >{\pseudohpad} \pseudolabelalign
+ >{\pseudosetup} p{11.7cm} <{\pseudohpad}
+ },
+ setup-append = \raggedright\RestorePseudoBackslash,
+ line-height = 1.5]
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
+erat. \\
+At vero eos et accusam et justo duo dolores et ea rebum. Stet
+clita kasd gubergren, no sea takimata sanctus est Lorem ipsum
+dolor sit amet.
+\end{pseudo}
+\end{texexp}
+
+\noindent
+In addition to introducing the \code{p} column, I've added \cs{raggedright} to
+the setup (with \refk{setup-append}, with \cs{RestorePseudoBackslash} to restore
+\refc{\bslash}, because \cs{raggedright} redefines it).
+
+One disadvantage of the \code{p} column is that you need to know its exact
+width. A better solution is probably to replace the default \code{tabular} with
+a \code{tabularx}, as discussed in \cref{sec:tabularx}, and use an \code{X}
+column, i.e.:
+\begin{texexp}[listing]
+ begin-tabular = \tabularx{\linewidth}[t]{
+ >{\pseudohpad} \pseudolabelalign
+ >{\pseudosetup} X <{\pseudohpad}
+ },
+ end-tabular = \endtabularx,
+ setup-append = \RestorePseudoEq,
+\end{texexp}
+
+
+\subsection{\dots\,get the old spacing?}
+
+The current version of the \refe{pseudo} environment ensures the spacing above
+and below is adjusted, so the baselines of the previous and following lines are
+positioned equally, regardless of their depths or heights. If you'd rather have
+the old behavior (which, frankly, was really a bug), you can get that as
+follows:
+\begin{texexp}
+\pseudoset{pos = {}, prevdepth = 0pt}
+\end{texexp}
+
+
+\subsection{\dots\,configure my \code{tcolorbox}es?}
+\label{sec:boxconfig}
+
+If you use the \pkg{pseudo} styles for \code{tcolorbox}es (see
+\cref{sec:floats}), you might still wish to do some tweaking, or even redefine
+most of the styling. This is done using the \pkg{tcolorbox} configuration
+system, not that of \pkg{pseudo}, so it's worth consulting the \pkg{tcolorbox}
+documentation (and, perhaps, the source of the \pkg{pseudo} box styles, in
+\cref{sec:floatsrc}). In the following, I go through some examples of things you
+might want to adjust. First, let's define a rather unstyled environment which we
+can modify locally.\footnote{If you want the styling to apply to the environment
+in general, simply insert it as the third argument. See the \pkg{tcolorbox}
+documentation for more about \cs{newtcbtheorem}.}
+
+% Duplicated:
+\newtcbtheorem{example}{Example}{}{}
+\begin{texexp}[listing]
+\newtcbtheorem{example}{Example}{}{}
+\end{texexp}
+
+\paragraph{A different separator.} By default, the \pkg{pseudo} box styles use
+an \cs{enskip} to separate the label part from the description, but you might
+want to use something else, such as a colon or a period. You can get this by
+using the \code*{separator sign} key:
+\begin{texexp}
+\begin{example}[pseudo/ruled, separator sign = :]{\dots}{}
+ \dots
+\end{example}
+\end{texexp}
+
+\paragraph{A different parskip.} You might want more or less spacing between the
+paragraphs of any plain text outside your pseudocode. You do this by setting
+\cs{parskip}, which is normally set as part of the \code*{before upper} key in
+the \code{pseudo/\dots} styles (see p.~\ref{p:before-upper}). Rather than
+overwrite the \code*{before upper} code, you can use the hook \refk{pseudo/init}
+(set as part of the \pkg{tcolorbox} configuration, not using \cs{pseudoset}):%
+\footnote{It is possible to use the \pkg{tcolorbox} key \code*{before upper app}
+(together with the \pkg{tcolorbox} library \code{hooks}) instead of
+\refk{pseudo/init}. However, the compatibility code (\cref{sec:compat}) appends
+some spacing to this setup hook, and this may be messed up by inserting more
+code after it. In this case, \refk{pseudo/init} is safer.}
+\begin{texexp}
+\begin{example}[pseudo/boxed,
+ pseudo/init = \parskip\baselineskip]{\dots}{}
+ The parskip
+
+ is bigger!
+\end{example}
+\end{texexp}
+You \emph{could} set \cs{topsep} and \cs{partopsep} in the same manner, but
+unless you want to change the settings for lists (such as \code{itemize} and
+\code{enumerate}), you could also just set those for pseudocode specifically,
+using the \pkg{pseudo} keys \refk{topsep} and \refk{partopsep}, perhaps as part
+of the \refk{in-float} style.
+
+\bigskip
+
+\paragraph{Different line widths.} If you start with \refk{pseudo/boxruled},
+this is easy enough---you can just use the standard \pkg{tcolorbox} keys to
+adjust the line widths.
+\begin{texexp}
+\begin{example}[pseudo/boxruled,
+ boxrule = 4pt, titlerule = 2pt]{\dots}{}
+ Now \emph{that's} a \emph{box}!
+\end{example}
+\end{texexp}
+The problem with the other ruled or boxed styles is that they use the
+\code{empty} skin, which removes the box drawing.\footnote{The reason they don't
+just set the appropriate line widths to zero is that this generally still
+results in visible hairlines in many PDF viewers.}
+They then instead rely on various \code{borderline} commands. These are
+cumulative, so if you want to replace some of them, you first need to clear the
+deck with \code*{no borderline}, and then re-do them all. For example, maybe you
+want a version of \refk{pseudo/tworuled} with light rules:
+\begin{texexp}
+\begin{example}[pseudo/tworuled,
+ no borderline,
+ toprule = \lightrulewidth,
+ bottomrule = \lightrulewidth,
+ borderline horizontal = {\lightrulewidth}{0pt}{black}]{\dots}{}
+\dots
+\end{example}
+\end{texexp}
+Note that even though the box rules aren't \emph{drawn}, they can still be used
+for spacing---which the borderlines don't handle. In \code{pseudo/tworuled},
+\code{toprule} and \code{bottomrule} are set to \cs{heavyrulewidth}, so since
+we're replacing the horizontal borderlines with lighter ones, we need adjust
+these as well. (If you do something similar with \refk{pseudo/ruled}, the width
+of the title rule can still be changed by using the \code{titlerule} key, as in
+the previous example.)
+
+\bigskip
+
+\paragraph{Different colors.} Again, customizing \code{pseudo/boxruled} is easy
+enough; you can set the line colors using the \code{colframe}, and the fill
+colors using \code{colback} and \code{colbacktitle}. The latter two keys also
+work well with the \code{pseudo/filled} style (as shown in the example
+\vpageref{ex:clrscode4ish}). To modify the line colors in the other styles,
+you'll need borderline commands, again (though with separate styling for the
+title rule). For example:
+\begin{texexp}
+\begin{example}[pseudo/booktabs,
+ no borderline,
+ titlerule style = lightgray,
+ borderline horizontal = {\heavyrulewidth}{0pt}{gray}]{\dots}{}
+\dots
+\end{example}
+\end{texexp}
+If you want to style the top and bottom line separately, just use
+\code*{borderline north} and \code*{borderline south} separately, rather than
+the collective \code*{borderline horizontal}.
+
\section{Implementation}
\label{sec:impl}
@@ -2672,13 +3695,15 @@ implementation in \cref{sec:impl}).
extendedchars=true,
nolol,
inputencoding=\kvtcb@listingencoding,
- literate={VERSION}{\pseudoversion}{3}{DATE}{\pseudodate}{10},
+ literate={VERSION}{\pseudoversion}{3}{DATE}{\pseudodate}{10}%
+ {~}{\textcolor{gray}{\raisebox{-.75ex}{\textasciitilde}}}{1},
+ commentstyle=\color{gray},
}
\noindent
\textbf{Note:} In the following, \verb|_@@| and \verb|@@| represent
an internal prefix (\verb|__pseudo|), the same way they do with
-\pkg[https://ctan.org/pkg/l3docstrip]{l3docstrip}.
+\pkg{l3docstrip}.
\bigskip\noindent
First, we just define some metadata:
@@ -2687,7 +3712,7 @@ First, we just define some metadata:
\def \pseudodate {DATE}
\end{source}
The \pkg{pseudo} package is implemented using experimental \LaTeX\,3, so we
-start by importing \pkg[https://ctan.org/pkg/expl3]{expl3}:
+start by importing \pkg{expl3}:
\begin{source}
\RequirePackage{expl3}
\end{source}
@@ -2703,6 +3728,10 @@ Tools for defining user commands:
\begin{source}
\RequirePackage{xparse}
\end{source}
+For defining \pkg{tcolorbox} styles, without importing \pkg{tcolorbox}:
+\begin{source}
+\RequirePackage{pgfkeys}
+\end{source}
The \refe{pseudo} environment is built upon tabular functionality, and we're
using some extensions:
\begin{source}
@@ -2714,14 +3743,12 @@ still use the mechanism:
\RequirePackage{l3keys2e}
\end{source}
Inside the \refe{pseudo} environment, \refk{*} is an alias for
-\refk{pseudoline}. To perform the proper aliasing, we use
-\pkg[https://ctan.org/pkg/aliascnt]{aliascnt}:
+\refk{pseudoline}. To perform the proper aliasing, we use \pkg{aliascnt}:
\begin{source}
\RequirePackage{aliascnt}
\end{source}
As part of the initial setup, we also record whether we're part of a
-\pkg[https://ctan.org/pkg/beamer]{beamer} presentation; this will affect the
-overlay functionality:
+\pkg{beamer} presentation; this will affect the overlay functionality:
\begin{source}
\bool_new:N \c_@@_beamer_bool
\@ifclassloaded{beamer}
@@ -2765,7 +3792,13 @@ which the current line is indented. The initial indent level may be set using
\int_new:N \g_@@_indent_level_int
\int_new:N \l_@@_initial_indent_level_int
\end{source}
-%
+
+When handling unknown keys, we have special-casing of \refc{\bslash}, so we need
+to know if that's the command we're in:
+\begin{source}
+\bool_new:N \l_@@_in_eol_bool
+\end{source}
+
\subsection{Utilities}
\paragraph{Variants.} First, let's just generate a couple of expansion
@@ -2774,24 +3807,24 @@ variants we'll need of some standard commands. (I'm using the
compatibility with older \TeX\ distributions.)
\begin{source}
\cs_generate_variant:Nn \quark_if_no_value:nTF { VTF }
+\cs_generate_variant:Nn \tl_if_novalue:nTF { VTF }
\cs_generate_variant:Nn \tl_set:Nn { Ne }
\end{source}
\paragraph{Defining columns.} The \refk{preamble} is is configurable, but the
-\pkg[https://ctan.org/pkg/array]{array} package makes sure it doesn't expand
-any part of its preamble. One way of inserting a dynamically generated one is
-to simply define it all as a single column type. To avoid getting an error
-when overwriting this definition through the configuration, we'll also need to
-be able to \emph{un}-define column types:
+\pkg{array} package makes sure it doesn't expand any part of its preamble. One
+way of inserting a dynamically generated one is to simply define it all as a
+single column type. To avoid getting an error when overwriting this definition
+through the configuration, we'll also need to be able to \emph{un}-define column
+types:
\begin{source}
-\cs_new:Nn \@@_undef_col:n {
+\cs_new:Npn \@@_undef_col:n #1 {
\tl_set_eq:cN { NC@find@ \token_to_str:N #1 } \scan_stop:
}
\end{source}
-Note that the implementation specifically targets the
-\pkg[https://ctan.org/pkg/array]{array} package. The following command then
-will either define or \emph{re}-define a column type:
+Note that the implementation specifically targets the \pkg{array} package. The
+following command then will either define or \emph{re}-define a column type:
\begin{source}
-\cs_new:Nn \@@_def_col:nn {
+\cs_new:Npn \@@_def_col:nn #1 #2 {
\@@_undef_col:n { #1 }
\newcolumntype { #1 } { #2 }
}
@@ -2802,21 +3835,21 @@ This command creates a new command with a \code{pseudo} prefix, and defines
the prefixless version as well, \emph{if the name is available} (i.e.,
undefined):
\begin{source}
-\cs_new:Nn \@@_meta_new_cmd:NNnn {
+\cs_new:Npn \@@_meta_new_cmd:NNnn #1 #2 #3 #4 {
\tl_set:Nn \l_tmpa_tl {pseudo \cs_to_str:N #2}
\exp_args:Nc
#1 \l_tmpa_tl #3 {#4}
\cs_if_free:NT #2 {\cs_gset_eq:Nc #2 \l_tmpa_tl}
}
-\cs_new:Nn \@@_new_cmd:Nnn {
+\cs_new:Npn \@@_new_cmd:Nnn #1 #2 #3 {
\@@_meta_new_cmd:NNnn
\NewDocumentCommand #1 {{#2}} {
#3
}
}
-\cs_new:Nn \@@_new_ecmd:Nnn {
+\cs_new:Npn \@@_new_ecmd:Nnn #1 #2 #3 {
\@@_meta_new_cmd:NNnn
% \NewExpandableDocumentCommand #1 {{#2}} {
% Replaced for compatibility:
@@ -2827,7 +3860,7 @@ undefined):
\end{source}
This is for defining commands that declare styled shortcuts:
\begin{source}
-\cs_new:Nn \@@_new_dec:nn {
+\cs_new:Npn \@@_new_dec:nn #1 #2 {
\tl_set:Nn \l_tmpa_tl { DeclarePseudo #1 }
\exp_args:Nc
\DeclareDocumentCommand \l_tmpa_tl { mm } {
@@ -2853,7 +3886,7 @@ arguments to \refc{\bslash}, we'll gobble up one character at a time, each
time performing some action. We also supply code to be performed once we're
done.
\begin{source}
-\cs_new:Nn \@@_per_char:nnn {
+\cs_new:Npn \@@_per_char:nnn #1 #2 #3 {
\peek_charcode_remove:NTF { #1 } {
#2 % body
\@@_per_char:nnn{#1}{#2}{#3}
@@ -2868,7 +3901,7 @@ step of indentation) is either set directly through \refk{indent-length}, or
indirectly through \refk{indent-text}. The latter is there the default is
provided, but \refk{indent-text} is only used if there is no \refk{indent-length}.
\begin{source}
-\cs_new:Nn \@@_set_indent_length: {
+\cs_new:Npn \@@_set_indent_length: {
\quark_if_no_value:VTF \l_@@_indent_length_tl {
\hbox_set:Nn \l_tmpa_box { \l_@@_indent_text_tl }
@@ -2883,33 +3916,47 @@ Note that the configured indent length is stored in a \code{tl}, which is
expanded in the \refe{pseudo} environment.
The indent size is subsequently used by the indent command, which takes the
-number of indentation steps as its only argument:
+number of indentation steps as its only argument. If no \refk{indent-mark} is
+set, it just inserts an appropriate horizontal space. Otherwise, it iterates
+over the indent levels, inserting one indent marker for each level. Note that to
+avoid affecting the indent, the \refk{indent-mark} should have no width (i.e.,
+it should ``undo'' the width of any text it contains, using \cs{rlap}, a
+negative \cs{hspace} or the like).
\begin{source}
-\cs_new:Nn \@@_indent:N {
- \skip_horizontal:n{ \pseudoindentlength * #1 }
+\cs_new:Npn \@@_indent:N #1 {
+ \tl_if_novalue:VTF \l_@@_indent_mark_tl {
+ \skip_horizontal:n{ \pseudoindentlength * #1 }
+ } {
+ \group_begin:
+ \color{\l_@@_indent_color_tl}
+ \int_step_inline:nn { \g_@@_indent_level_int } {
+ \l_@@_indent_mark_tl
+ \skip_horizontal:n{ \pseudoindentlength }
+ }
+ \group_end:
+ }
\ignorespaces
}
\end{source}
%
\paragraph{Counter copying.} Inside the \refe{pseudo} environment, we want
-\code{*} to be a duplicate of \code{pseudoline}, for convenience. This
-requires a bit of work. We use the
-\pkg[https://ctan.org/pkg/aliascnt]{aliascnt} package to deal with much of the
+\code{*} to be a duplicate of \code{pseudoline}, for convenience. This requires
+a bit of work. We use the \pkg{aliascnt} package to deal with much of the
book-keeping, but in order for \cs{newaliascnt} to work whenever a counter
already exists, we need to undefine it first. (Here we're relying on the
internal \LaTeX\ convention of using \verb|c@| as a prefix to counter names.)
\begin{source}
-\cs_new:Nn \@@_drop_ctr:n {
+\cs_new:Npn \@@_drop_ctr:n #1 {
\cs_undefine:c { c@ #1 }
}
-\cs_new:Nn \@@_copy_ctr:nn {
+\cs_new:Npn \@@_copy_ctr:nn #1 #2 {
\@@_drop_ctr:n { #1 }
\newaliascnt { #1 } { #2 }
}
-\cs_new:Nn \@@_star_setup: {
+\cs_new:Npn \@@_star_setup: {
\cs_if_exist:cT { c@ * } {
\@@_copy_ctr:nn { @@_orig_* } { * }
@@ -2920,7 +3967,7 @@ internal \LaTeX\ convention of using \verb|c@| as a prefix to counter names.)
}
-\cs_new:Nn \@@_star_reset: {
+\cs_new:Npn \@@_star_reset: {
\cs_if_exist:cT { c@ @@_orig_* } {
\@@_copy_ctr:nn { * } { @@_orig_* }
\cs_undefine:c { c@ @@_orig_* }
@@ -2936,7 +3983,7 @@ again increment it, this time with \cs{refstepcounter}. However, we only do so
if the counter actually \emph{was} incremented, i.e., if it's different from
the last one we saved.
\begin{source}
-\cs_new:Nn \@@_save_label: {
+\cs_new:Npn \@@_save_label: {
\int_set:Nn \l_tmpa_int {\arabic{pseudoline}}
@@ -2963,7 +4010,7 @@ the original name to the meaning it had when we entered the scope.
In saving a macro, we also supply a name for the original, which may then be
used to refer to it until it's restored.
\begin{source}
-\cs_new:Nn \@@_gsave_as:NN {
+\cs_new:Npn \@@_gsave_as:NN #1 #2 {
\cs_gset_eq:NN #2 #1
\group_insert_after:N \cs_gset_eq:NN
\group_insert_after:N #1
@@ -2988,7 +4035,7 @@ which we don't really need.)
While we're at it, we'll define the initial value for \refc{kwfont}, which is
generally non-extended bold, if that's available, but extended bold otherwise:
\begin{source}
-\cs_new:Nn \@@_b_or_bx: {
+\cs_new:Npn \@@_b_or_bx: {
% Note: We're relying on the warning text in \@defaultsubs
% being defined by \selectfont if the desired font isn't
@@ -3028,11 +4075,10 @@ The \refc{pr} command is also a font shortcut, but in addition takes optional
parenthesis-delimited arguments, which are set in math mode. To avoid
erroneousy slurping up following parentheticals, there should be no space
separating the command and its optional argument. With current versions of
-\pkg[https://ctan.org/pkg/xparse]{xparse}, this can be achieved with the
-\verb|!| argument type, but for compatibility with older \TeX\ distributions,
-I'll deal with it ``manually.''
+\pkg{xparse}, this can be achieved with the \verb|!| argument type, but for
+compatibility with older \TeX\ distributions, I'll deal with it ``manually.''
\begin{source}
-\cs_new:Nn \@@_fmt_pr:n {
+\cs_new:Npn \@@_fmt_pr:n #1 {
\textnormal{\prfont{ #1 }}
}
@@ -3060,7 +4106,7 @@ I'll deal with it ``manually.''
The \refc{fn} command is similar, but alternatively permits arguments in
square brackets.
\begin{source}
-\cs_new:Nn \@@_fmt_fn:n {
+\cs_new:Npn \@@_fmt_fn:n #1 {
\textnormal{\fnfont{ #1 }}
}
\@@_new_cmd:Nnn \fn { m } {
@@ -3073,14 +4119,16 @@ square brackets.
The \refc{hd} command is similar to \refc{pr} command, except that it spans
two columns (effectively ignoring the labeling column). Because it needs to be
expandable in order to insert the multicolumn, the final, parenthesis-enclosed
-argument can not be optional (unlike for \refc{pr}).
+argument can not be optional (unlike for \refc{pr}). Note also that \refc{hd}
+sets \refk{extra-space} (or the underlying \code{tl}) based on \refk{hd-space}.
\begin{source}
% \@@_new_ecmd:Nnn \hd { m +r() } {
% Now uses \def syntax:
\@@_new_ecmd:Nnn \hd { #1 ( #2 ) } {
\multicolumn{2}
- {\@@_hd_preamble}
+ {\pseudohdpreamble}
{\@@_fmt_pr:n{#1}\ensuremath{(#2)}}
+ \tl_set_eq:NN \l_@@_extra_space_tl \l_@@_hd_space_tl
}
\end{source}
Finally, \refc{st} and \refc{ct} add quotes and comment delimiters,
@@ -3127,9 +4175,8 @@ equals sign, ubiquitous in modern programming languages, and useful if
as well as the space between them and the padding on both sides may be
adjusted by using the keys \refk{eqs-scale}, \refk{eqs-sep} and
\refk{eqs-pad}. Initially, these are set to emulate the \cs{eqeq} symbol from
-\pkg[https://ctan.org/pkg/stix]{stix} when used with Computer Modern, Latin
-Modern or the like (though the command works just fine with other fonts as
-well).
+\pkg{stix} when used with Computer Modern, Latin Modern or the like (though the
+command works just fine with other fonts as well).
\begin{source}
\NewDocumentCommand \eqs { } {
\group_begin:
@@ -3162,23 +4209,24 @@ For convenience and source-code clarity, the following shortcut (i.e.,
}
}
-\cs_gset_eq:NN \@@_eq: \= % Stored for \pseudoeq
+\cs_gset_eq:NN \@@_eq: \= % Stored for \RestorePseudoEq
\end{source}
Similarly, there's the
\href{https://proofwiki.org/wiki/Definition:Real_Interval/Notation/Wirth}{Pascal
two-dot interval notation}, whose implementation mirrors Knuth's \cs{dts}
-command from Concrete Mathematics (see
-\pkg[https://ctan.org/pkg/gkpmac]{gkpmac.tex}).
+command from Concrete Mathematics (see \pkg{gkpmac.tex}), with the addition of
+\cs{nolinebreak}, taken from
+\pkg[https://www.cs.dartmouth.edu/~thc/]{clrscode4e}.
\begin{source}
-\cs_new:Nn \@@_dts: {
+\NewDocumentCommand \dts { } {
+ \nolinebreak
\mathinner {
\ldotp
\ldotp
}
+ \nolinebreak
}
-
-\NewDocumentCommand \dts { } { \@@_dts: }
\end{source}
%
There's a shortcut (\cs{..}) defined for this as well (this time hijacking
@@ -3190,23 +4238,33 @@ There's a shortcut (\cs{..}) defined for this as well (this time hijacking
\tl_if_eq:nnTF { #1 } { . } {
\dts
} {
- \c_@@_dot_cs{#1}
+ \c_@@_dot_cs { #1 }
}
}
\end{source}
%
+Finally, we define a different syntax for numeric ranges like these (or
+\emph{slices} or \emph{subarrays}). This command is based on the \cs{subarr}
+command of \pkg[https://www.cs.dartmouth.edu/~thc/]{clrscode4e}.
+\begin{source}
+\NewDocumentCommand \rng { } {
+ \nolinebreak
+ \mathinner { : }
+ \nolinebreak
+}
+\end{source}
+
\subsection{Options}
\label{sec:options}
-Much of the behavior of \pkg{pseudo} may be configured through various
-options, and these are defined below. You provide these either through
-\refc{pseudoset} or (where applicable) as optional arguments to
-\refc{\bslash} or the \refe{pseudo} environment itself.
+Much of the behavior of \pkg{pseudo} may be configured through various options,
+and these are defined below. You provide these either through \refc{pseudoset}
+or (where applicable) as optional arguments to \refc{\bslash} or the
+\refe{pseudo} environment itself.
-The \cs{usepackage} options (handled by
-\pkg[https://ctan.org/pkg/l3keys2e]{l3keys2e}) are subject to full expansion,
-an so many options simply won't work. In order to make the \refk{kw} option as
-easily available as possible, however, we permit it here, by way of a
+The \cs{usepackage} options (handled by \pkg{l3keys2e}) are subject to full
+expansion, an so many options simply won't work. In order to make the \refk{kw}
+option as easily available as possible, however, we permit it here, by way of a
\code{bool} that triggers the \emph{actual} key later on:
\begin{source}
@@ -3231,10 +4289,16 @@ typesetting the pseudocode.
font .tl_set:N = \pseudofont,
font .initial:n = \normalfont,
- hpad .tl_set:N = \l_@@_hpad_tl,
- hpad .initial:n = 0.0em,
+ hpad .meta:n = {
+ hpad-val = { #1 },
+ hl-warn = false,
+ },
hpad .default:n = 0.3em,
+ % For internal use:
+ hpad-val .tl_set:N = \l_@@_hpad_tl,
+ hpad-val .initial:n = 0.0em,
+
hsep .tl_set:N = \l_@@_hsep_tl,
hsep .initial:n = .75em,
@@ -3257,6 +4321,31 @@ typesetting the pseudocode.
indent-text .tl_set:N = \l_@@_indent_text_tl,
indent-text .initial:n = { \pseudofont\kw{else}\ },
+ indent-mark .tl_set:N = \l_@@_indent_mark_tl,
+ indent-mark .initial:x = \c_novalue_tl,
+\end{source}
+The default \refk{indent-mark} is a vertical rule with width set by
+\refk{indent-mark-width}, followed by a negative horizontal space of the same
+magnitude.
+\begin{source}
+ indent-mark .default:n =
+ \skip_horizontal:n { \l_@@_indent_mark_shift_tl }
+ \tex_vrule:D width \l_@@_indent_mark_wd_tl
+ \skip_horizontal:n {
+ -\l_@@_indent_mark_wd_tl
+ -\l_@@_indent_mark_shift_tl
+ },
+
+ indent-mark-width .tl_set:N = \l_@@_indent_mark_wd_tl,
+ indent-mark-width .initial:n = \c_@@_semithick_dim,
+
+ indent-mark-shift .tl_set:N = \l_@@_indent_mark_shift_tl,
+ indent-mark-shift .initial:n = 0pt,
+ indent-mark-shift .default:n = .5em,
+
+ indent-mark-color .tl_set:N = \l_@@_indent_color_tl,
+ indent-mark-color .initial:n = lightgray,
+
indent-level .int_set:N = \l_@@_initial_indent_level_int,
kwfont .tl_set:N = \kwfont,
@@ -3265,9 +4354,24 @@ typesetting the pseudocode.
kw .meta:n = { font = \kwfont },
kw .value_forbidden:n = true,
- hl .meta:n = { bol-prepend = \pseudohl },
+ hl-warn .bool_set:N = \l_@@_hl_warn_bool,
+ hl-warn .initial:n = true,
+ hl-warn .default:n = true,
+
+ % For internal use:
+ hl-warn-code .code:n = {
+ \bool_if:nT \l_@@_hl_warn_bool {
+ \msg_warning:nn { pseudo } { hl-without-hpad }
+ }
+ },
+
+ hl .meta:n = {
+ hl-warn-code,
+ bol-prepend = \pseudohl
+ },
hl .value_forbidden:n = true,
+
bol .tl_set:N = \l_@@_bol_tl,
bol-append .code:n = {
\tl_put_right:Nn \l_@@_bol_tl {#1}
@@ -3329,16 +4433,29 @@ typesetting the pseudocode.
setup-append = \color{\pseudodimcolor}
},
- line-height .fp_set:N = \l_@@_line_height_fp,
+ line-height .tl_set:N = \l_@@_line_height_tl,
line-height .initial:n = 1,
+ extra-space .tl_set:N = \l_@@_extra_space_tl,
+ extra-space .initial:n = 0pt,
+
+ hd-space .tl_set:N = \l_@@_hd_space_tl,
+ hd-space .initial:n = 0pt,
+\end{source}
+The default value here emulates the spacing used in
+\pkg[https://www.cs.dartmouth.edu/~thc/]{clrscode4e}, though with a different
+mechanism:\footnote{They insert
+\code{\cs{rule}[-1.25ex]\braces{0pt}\braces{0pt}} as part of the header.}
+\begin{source}
+ hd-space .default:n = 0.41386ex,
+
start .tl_set:N = \l_@@_start_tl,
start .initial:n = 1,
\end{source}
%
\paragraph{Line structure.} The preamble for the internal \code{tabular} is
defined as a single column type, to make it easier to apply it despite the
-\pkg[https://ctan.org/pkg/array]{array} protections against expansion.
+\pkg{array} protections against expansion.
\begin{source}
preamble .code:n =
\@@_def_col:nn{ \pseudopreamble }{#1},
@@ -3365,14 +4482,13 @@ The preamble is laid out as described in \cref{sec:reference}:
\tl_put_left:Nn \l_@@_setup_tl {#1}
},
\end{source}
-\noindent
The preamble used for multicolumns is treated similarly:
\label{p:hdpreamble}%
\begin{source}
hd-preamble .code:n =
- \@@_def_col:nn{ \@@_hd_preamble }{#1},
+ \@@_def_col:nn{ \pseudohdpreamble }{#1},
hd-preamble .initial:n = {
- >{\pseudohpad} l <{\pseudohpad}
+ >{ \pseudohpad } l <{ \pseudohpad }
},
\end{source}
The prefix is inserted by the row separator command.
@@ -3382,37 +4498,51 @@ The prefix is inserted by the row separator command.
prefix .initial:n = {
\pseudobol \stepcounter* \pseudolabel &
},
+\end{source}
+\paragraph{Tabular setup.}
+The beginning and end of the tabular environment, as well as some positioning
+and spacing.
+\begin{source}
+ pos .tl_set:N = \pseudopos,
+ pos .initial:n = t,
+
+ prevdepth .tl_set:N = \l_@@_prevdepth_tl,
+ prevdepth .initial:n = .3 \baselineskip,
begin-tabular .tl_set:N = \l_@@_begin_tabular_tl,
- begin-tabular .initial:n = \begin{tabular}{\pseudopreamble},
+ begin-tabular .initial:n =
+ \begin{tabular}[\pseudopos]{\pseudopreamble},
end-tabular .tl_set:N = \l_@@_end_tabular_tl,
end-tabular .initial:n = \end{tabular},
\end{source}
\paragraph{List-like spacing.} Space above and below is handled similarly to
in the built-in \LaTeX\ lists, with the option of locally overriding
-\cs{topsep}, \cs{parskip} and \cs{partopsep}, with \refk{compact} used to
-control the presence of this spacing (overriding the ordinary automatic choice
-based on the current mode).
+\cs{topsep} and \cs{partopsep}, with \refk{compact} used to control the presence
+of this spacing (overriding the ordinary automatic choice based on the current
+mode).
\begin{source}
topsep .tl_set:N = \l_@@_topsep_tl,
topsep .initial:n = { \topsep },
- parskip .tl_set:N = \l_@@_parskip_tl,
- parskip .initial:n = { \parskip },
-
partopsep .tl_set:N = \l_@@_partopsep_tl,
partopsep .initial:n = { \partopsep },
compact .meta:n = {
- compact-val = #1,
- compact-def = true,
+ compact-val = { #1 },
+ compact-def = true,
+ compact-code = { #1 },
},
compact .default:n = true,
% For internal use:
compact-val .bool_set:N = \l_@@_compact_bool,
compact-def .bool_set:N = \l_@@_compact_def_bool,
+ compact-code .code:n = {
+ \bool_if:nT { \l_@@_compact_bool } {
+ \tl_clear:N \pseudopos
+ }
+ },
\end{source}
\paragraph{Details.} Finally, some tweakable parameters.
@@ -3426,12 +4556,11 @@ based on the current mode).
eqs-pad .tl_set:N = \l_@@_eqs_pad_tl,
eqs-pad .initial:n = 0.28mu,
-
}
\end{source}
%
Now that we've defined the real \refk{kw} key, we reexamine the placeholder
-handled by \pkg[https://ctan.org/pkg/l3keys2e]{l3keys2e}:
+handled by \pkg{l3keys2e}:
\begin{source}
\bool_if:NT \g_@@_kw_bool {
\keys_set:nn { pseudo } { kw }
@@ -3439,8 +4568,7 @@ handled by \pkg[https://ctan.org/pkg/l3keys2e]{l3keys2e}:
\end{source}
%
\paragraph{Beamer overlays.}
-We redefine the \refk{pause} key if we're using
-\pkg[https://ctan.org/pkg/beamer]{beamer}:
+We redefine the \refk{pause} key if we're using \pkg{beamer}:
\begin{source}
\bool_if:NT \c_@@_beamer_bool {
\keys_define:nn { pseudo } {
@@ -3448,11 +4576,10 @@ We redefine the \refk{pause} key if we're using
}
}
\end{source}
-There's also the mechanism for handling overlay specifications on keys. Here
-we handle unknown keys by checking if they end with an overlay specification,
-and if they do, and we're in \pkg[https://ctan.org/pkg/beamer]{beamer}, we
-extract it. Outside \pkg[https://ctan.org/pkg/beamer]{beamer}, keys with
-overlays are simply ignored.
+There's also the mechanism for handling overlay specifications on keys. Here we
+handle unknown keys by checking if they end with an overlay specification, and
+if they do, and we're in \pkg{beamer}, we extract it. Outside \pkg{beamer}, keys
+with overlays are simply ignored.
Note that because unknown keys currently can't have a default (which we could,
in this case, use for some kind of marker, indicating no value was supplied),
@@ -3462,7 +4589,7 @@ equivalent, and both will trigger the default of \code{foo}, even though the
latter of the two really shouldn't.\footnote{See
\url{https://github.com/latex3/latex3/issues/67}.}
\begin{source}
-\cs_new:Nn \@@_keys_set_overlay:nnn {
+\cs_new:Npn \@@_keys_set_overlay:nnn #1 #2 #3 {
\bool_if:NT \c_@@_beamer_bool {
\only<#1>{ \keys_set:nn { #2 } { #3 } }
}
@@ -3515,22 +4642,49 @@ latter of the two really shouldn't.\footnote{See
\int_compare_p:n { \l_tmpa_int == \l_tmpb_int == 1 }
&&
\tl_if_empty_p:N \l_tmpa_tl
- }{
- % Match
- \tl_if_blank:nF{#1} {
+ } {
+\end{source}
+We've matched a key with an overlay specification. If it's got a (non-blank)
+value, we include that in the key-setting code we're building in
+\cs{l\_tmpb\_tl}, and then we set the key, with the appropriate overlay
+specification.
+\begin{source}
+ \tl_if_blank:nF{ #1 } {
\tl_put_right:Nn \l_tmpb_tl {= #1}
}
\@@_keys_set_overlay:VnV
\l_@@_overlay_tl { pseudo } \l_tmpb_tl
} {
- % No match
- \msg_error:nnx
- { pseudo } { unknown-key } { \l_keys_path_tl }
+\end{source}
+We have \emph{not} matched an overlay specification, so we just have an unknown
+key. However, we have another special case to consider: If we're processing
+arguments to \refc{\bslash}, we also permit a keyless value to be used to
+specify extra space (normally done using \refk{extra-space}). If the unknown
+key doesn't have an attached (non-blank) value, we treat the key itself as a
+value, and use it as extra space. If this, too, fails, we emit an error message.
+\begin{source}
+ \bool_if:nTF {
+ \bool_lazy_and_p:nn
+ { \l_@@_in_eol_bool }
+ { \tl_if_blank_p:n { #1 } }
+ } {
+ \tl_set_rescan:Nno
+ \l_@@_extra_space_tl { }
+ { \l_keys_key_str }
+ } {
+ \msg_error:nnx
+ { pseudo } { unknown-key }
+ { \l_keys_path_str }
+ }
}
- \group_end:
+ % Make sure extra space carries over outside the group:
+ \exp_args:NNNV
+ \group_end:
+ \tl_set:Nn \l_@@_extra_space_tl \l_@@_extra_space_tl
}
+
}
\end{source}
%
@@ -3538,7 +4692,7 @@ latter of the two really shouldn't.\footnote{See
than when they're available as optional arguments to other commands), we
supply a command for setting them.
\begin{source}
-\cs_new:Nn \@@_set:n { \keys_set:nn { pseudo } { #1 } }
+\cs_new:Npn \@@_set:n #1 { \keys_set:nn { pseudo } { #1 } }
\end{source}
%
\subsection{The row separator}
@@ -3564,11 +4718,11 @@ modifying the indentation level and setting any locally meaningful keys.
the indentation level---essentially just incrementing, decrementing and
setting it to zero.
\begin{source}
-\cs_new:Nn \@@_inc_indent: {
+\cs_new:Npn \@@_inc_indent: {
\int_gincr:N \g_@@_indent_level_int
}
-\cs_new:Nn \@@_dec_indent: {
+\cs_new:Npn \@@_dec_indent: {
\end{source}
If the user happens to dedent too much, we might as well be a bit forgiving,
and clamp the indent level to non-negative values:
@@ -3585,11 +4739,13 @@ interacting macros. The implementation of \refc{\bslash} is
\verb|@@_eol:|, but that is just a thin wrapper that counts pluses and
minuses, before handing the control over to \verb|@@_eol_tail|. This is where
the remaining argument parsing takes place, and the \cs{tabularnewline} is
-inserted, after which controll is passed to \verb|\@@_bol:| in order to begin
-a new line---unless we're at the end of the environment.
+inserted, after which control is passed to \verb|\@@_bol:| in order to begin a
+new line---unless we're at the end of the environment.
\begin{source}
-\cs_new:Nn \@@_eol_handle_args:nnn {
+\cs_new:Npn \@@_eol_handle_args:nnn #1 #2 #3 {
+ % Make extra-space default key for keyless value:
+ \bool_set_true:N \l_@@_in_eol_bool
\@@_keys_set_overlay:nnn { #2 } { pseudo } { hl }
\keys_set:nn { pseudo } { #3 }
\end{source}
@@ -3618,18 +4774,24 @@ A new line is begun only if we're not at the end of the (or, at least of
\emph{some}) environment. (We could have put the \cs{tabularnewline} outside,
but then we'd have a conditional at the beginning of the next line, which
would mess up \cs{bottomrule} or the like. We need to keep \verb|\@@_bol:|
-alone at the start of the line.)
+alone at the start of the line.) We call \cs{tabularnewline} either way, in
+particular for it to use any extra space provided to \refk{extra-space}.
\begin{source}
- \peek_meaning_ignore_spaces:NF \end {
+ \tl_set:Nx \l_tmpa_tl {
+ \exp_not:N \tabularnewline [ \l_@@_extra_space_tl ]
+ }
+ \peek_meaning_ignore_spaces:NTF \end {
+ \l_tmpa_tl
+ } {
\pseudoeol
- \tabularnewline
+ \l_tmpa_tl
\@@_bol:
}
}
\end{source}
And here is the actual \verb|\@@_eol:| command:
\begin{source}
-\cs_new:Nn \@@_eol: {
+\cs_new:Npn \@@_eol: {
\@@_per_char:nnn { + } {
\@@_inc_indent:
@@ -3645,7 +4807,7 @@ And here is the actual \verb|\@@_eol:| command:
%
The \verb|\@@_bol:| command (currently) just inserts the \refk{prefix}:
\begin{source}
-\cs_new:Nn \@@_bol: {
+\cs_new:Npn \@@_bol: {
\g_@@_cur_prefix_tl
}
\end{source}
@@ -3663,20 +4825,19 @@ for use in the \refk{preamble}, together with \refc{pseudosavelabel} and
\@@_indent:N { \g_@@_indent_level_int }
}
\end{source}
-\noindent
-The \refc{pseudoslash} command simply redefines the row separator, and is used at
-the start of the \refe{pseudo} environment. It may be useful for the user if
-some other construct redefines \refc{\bslash} as well. (This is similar to the
-\cs{arraycr} command of the \pkg[https://ctan.org/pkg/array]{array} package.)
+The \refc{RestorePseudoBackslash} command simply redefines the row separator,
+and is used at the start of the \refe{pseudo} environment. It may be useful for
+the user if some other construct redefines \refc{\bslash} as well. (This is
+similar to the \cs{arraycr} command of the \pkg{array} package.)
\begin{source}
-\NewDocumentCommand \pseudoslash { } {
+\NewDocumentCommand \RestorePseudoBackslash { } {
\cs_gset_eq:NN \\ \@@_eol:
}
\end{source}
We also have a command for restoring our definition of \cs{=} if it has been
overwritten:
\begin{source}
-\NewDocumentCommand \pseudoeq { } {
+\NewDocumentCommand \RestorePseudoEq { } {
\cs_gset_eq:NN \= \@@_eq:
}
\end{source}
@@ -3698,7 +4859,7 @@ for setting multiple keys at some later point:
\end{source}
%
% Not allowed to use \code in header, here:
-\subsection{The \texttt{pseudo} environment}
+\subsection{The \codefont{pseudo} environment}
While this is the main attraction, it's essentially just an augmented
\code{tabular} environment, which does a bit of setup initially, using the
@@ -3712,8 +4873,8 @@ various macros already described.
\@@_gsave_as:NN \\ \c_@@_saved_cr_cs
\@@_gsave_as:NN \= \c_@@_saved_eq_cs
- % \pseudoslash is inside the tabular
- \pseudoeq
+ % \RestorePseudoBackslash is inside the tabular
+ \RestorePseudoEq
\int_set:Nn \g_@@_last_saved_line_int {\arabic{pseudoline}}
\@@_star_setup:
@@ -3734,7 +4895,7 @@ various macros already described.
\bool_if:nF { \l_@@_compact_bool } {
\skip_set:Nn \l_tmpa_skip {
- \l_@@_topsep_tl + \l_@@_parskip_tl
+ \l_@@_topsep_tl
}
\mode_if_vertical:TF {
\skip_add:Nn \l_tmpa_skip { \l_@@_partopsep_tl }
@@ -3749,10 +4910,8 @@ various macros already described.
}
-
- \dim_set:Nn \tabcolsep { \l_@@_hsep_tl / 2 }
- \tl_set:Nn \arraystretch
- { \fp_to_decimal:n { \l_@@_line_height_fp } }
+ \dim_set:Nn \tabcolsep { \l_@@_hsep_tl / 2 }
+ \tl_set_eq:NN \arraystretch \l_@@_line_height_tl
\stepcounter{pseudoenv}
\setcounter{pseudoline}{\l_@@_start_tl}
@@ -3762,9 +4921,9 @@ various macros already described.
\end{source}
We use \cs{noalign} to be able to place these definitions inside the tabular,
without messing up \cs{multicolumn} or \cs{hline} or the like. It's not really
-supposed to be used in \pkg[https://ctan.org/pkg/expl3]{expl3}; the
-alternative would be to create an extra dummy line, like:
-\begin{texexp}[listing only]
+supposed to be used in \pkg{expl3}; the alternative would be to create an extra
+dummy line, like:
+\begin{texexp}[listing]
\skip_vertical:n{ -\dim_eval:n{ \box_ht:N \@arstrutbox +
\box_dp:N \@arstrutbox } }
\tabularnewline
@@ -3774,11 +4933,10 @@ more hacky than just using \cs{noalign} here, though, so\,\dots
\begin{source}
\tex_noalign:D {
\end{source}
-We keep the \refc{\bslash}-definition inside the \code{tabular}, to override
-the redefinition placed there by \pkg[https://ctan.org/pkg/array]{array},
-without patching any internals:
+We keep the \refc{\bslash}-definition inside the \code{tabular}, to override the
+redefinition placed there by \pkg{array}, without patching any internals:
\begin{source}
- \pseudoslash
+ \RestorePseudoBackslash
\end{source}
In a \code{tabularx}, for example, the body is executed multiple times, so we
must make sure that any resets that are performed---such as setting the
@@ -3801,9 +4959,15 @@ the line:
} {
\tl_use:N \l_@@_end_tabular_tl
+\end{source}
+We'll only adjust spacing here if we're not \refk{compact}. Otherwise, we'll
+just end the current group:
+\begin{source}
+ \bool_if:nTF { \l_@@_compact_bool } {
+ \group_end:
- \bool_if:nF { \l_@@_compact_bool } {
+ } {
\mode_if_vertical:F {
\unskip \par
@@ -3811,24 +4975,30 @@ the line:
}
\addvspace{ \l_tmpa_skip }
+\end{source}
+To ensure any local changes to \refk{prevdepth} are used, we expand its local
+value before setting cs{prevdepth} \emph{outside} the group.\footnote{See,
+e.g., \url{https://tex.stackexchange.com/questions/56294}.}
+\begin{source}
+ \exp_args:NNNV
+ \group_end:
+ \dim_set:Nn \prevdepth \l_@@_prevdepth_tl
}
- \group_end:
-
}
\end{source}
The starred version of the environment is just a wrapper that uses the custom
(and overridable) \code{starred} style:
\label{p:starred}%
\begin{source}
-\pseudodefinestyle{starred}{
- preamble={
+\pseudodefinestyle{ starred }{
+ preamble = {
>{\pseudohpad\pseudoindent\pseudofont}
l
<{\pseudohpad}
},
- prefix={\pseudobol},
+ prefix = {\pseudobol},
}
\NewDocumentEnvironment { pseudo* } { +O{} } {
@@ -3838,7 +5008,402 @@ The starred version of the environment is just a wrapper that uses the custom
\end{pseudo}
}
\end{source}
-%
+
+\subsection{Boxes and floats}
+\label{sec:floatsrc}
+
+Some spacing and width values are taken from \pkg{booktabs}, to partly emulate
+its table appearance. If \pkg{booktabs} is not loaded, we'll just define these
+constants ourselves; if \pkg{booktabs} is loaded later, it will blithely
+overwrite these.
+\begin{source}
+\@ifpackageloaded { booktabs } { } {
+ \dim_const:Nn \aboverulesep { .40ex }
+ \dim_const:Nn \belowrulesep { .65ex }
+ \dim_const:Nn \heavyrulewidth { .08em }
+ \dim_const:Nn \lightrulewidth { .05em }
+}
+\end{source}
+We also define some line widths based on those used by
+\pkg[https://ctan.org/pkg/pgf]{tikz}.
+% ultra thin 0.1pt
+% very thin 0.2pt
+% thin 0.4pt
+% semithick 0.6pt
+% thick 0.8pt
+% very thick 1.2pt
+% ultra thick 1.6pt
+\begin{source}
+\dim_const:Nn \c_@@_very_thin_dim { 0.2pt }
+\dim_const:Nn \c_@@_thin_dim { 0.4pt }
+\dim_const:Nn \c_@@_semithick_dim { 0.6pt }
+\end{source}
+We'll be adjusting the spacing after the contents based on the value of
+\cs{prevdepth}. If \cs{prevdepth} is negative, this is suppressed. Otherwise, we
+add vertical space to the \cs{prevdepth}, to take us to (at least)
+\code{.3\cs{baselineskip}}. Since the mechanism is the same for the title and
+the body, we define a macro:
+\begin{source}
+\cs_new:Npn \@@_prevdepth_adjustment: {
+ \par % Ensure vertical mode
+ \dim_compare:nNnF \prevdepth < \c_zero_dim {
+ \dim_compare:nNnT \prevdepth < { .3 \baselineskip } {
+ \skip_vertical:n { .3 \baselineskip - \prevdepth }
+ \skip_vertical:N \c_zero_dim % Hide previous skip
+ }
+ }
+}
+\end{source}
+To permit the styling specifically of \refe{pseudo} environments inside our
+boxes, we define and use a \pkg{pseudo} style, and a hook (token list) that may
+overridden by the user:
+\begin{source}
+\pseudodefinestyle { in-float } {
+ % Initially empty
+}
+\tl_new:N \l_@@_float_init_tl
+\end{source}
+We now define some \pkg{tcolorbox} box styles. Rather than importing
+\pkg{tcolorbox}, we just use its key management mechanism, \pkg{pgfkeys}, with
+the appropriate name\-space.
+\begin{source}
+\pgfqkeys { /tcb/pseudo } {
+\end{source}
+We begin by defining our hook \refk{pseudo/init}.
+\begin{source}
+ init/.code = {
+ \tl_set:Nn \l_@@_float_init_tl { #1 }
+ },
+\end{source}
+The first box style (\refk{pseudo/boxruled}) is the basis for the others.
+\begin{source}
+boxruled/.style = {
+\end{source}
+By default, our boxes aren't floats, but if the \code{float} style is used,
+we'll want to have the placement configured. The \pkg{tcolorbox} default is
+\code{htb}, but we're emulating normal floats, so we'll use the normal \LaTeX{}
+default:
+\begin{source}
+ floatplacement = tbp,
+\end{source}
+Before the contents (which uses the upper part of the box), we adjust some
+distances, and set \cs{prevdepth}, for consistent vertical spacing of the first
+line. These settings may be overridden using \code*{before upper app}, which
+appends code to \code*{before upper}. For example, one could change the
+\cs{topsep} by using \code*{before upper app =
+\braces{\cs{topsep}10pt}}.\footnote{While you might want to modify \cs{parskip},
+\cs{topsep} or \cs{partopsep}, there's probably no need to change
+\cs{prevdepth}.}%
+\label{p:before-upper}
+\begin{source}
+ before~upper = {
+ \dim_set:Nn \parskip { .3 \baselineskip }
+ \dim_set:Nn \topsep { .2 \baselineskip }
+ \dim_set:Nn \partopsep { 0pt }
+ \dim_set:Nn \prevdepth { .3 \baselineskip }
+ \RestorePseudoEq % Broken in floats
+ \pseudoset { in-float } % User hook (style)
+ \l_@@_float_init_tl % User hook (code)
+ },
+\end{source}
+At the end of the contents, we add some spacing, again for consistent vertical
+alignment.
+\begin{source}
+ after~upper = \@@_prevdepth_adjustment:,
+\end{source}
+Now we add spacing before and after the box, when it's not used with
+the \code{float} key. We just mirror the spacing of the \refe{pseudo}
+environment (except without the support for \refk{partopsep}).
+\begin{source}
+ beforeafter~skip~balanced = \l_@@_topsep_tl,
+\end{source}
+Now we set up basic spacing for the contents. The spacing above and below the
+title is the same as for the top row of a \pkg{booktabs} tabular. For the
+``body'' of the box (and the left/right), we add some extra space.
+\begin{source}
+ boxsep = 0pt,
+ toptitle = \belowrulesep,
+ bottomtitle = \aboverulesep,
+ top = 2 \belowrulesep,
+ bottom = 2 \aboverulesep,
+ left = 2 \belowrulesep,
+ right = 2 \belowrulesep,
+\end{source}
+The title has a separate part called the \emph{description} (in \pkg{tcolorbox}
+theorem terms). We give the title one font (bold), and then reset that to
+\cs{normalfont} when we get to the description.
+\begin{source}
+ fonttitle = \bfseries,
+ description~font = \normalfont,
+\end{source}
+The spacing above and below the title is adjusted as for the body. We want to
+separate the initial part of the title (e.g., ``Algorithm 3.2'') from the
+description by an \cs{enskip} (\code{.5em} horizontal space). However, a single
+normal space is hard-coded into \pkg{tcolorbox}, so we'll subtract the width of
+that. (We make sure to do this with \cs{normalfont}, to not get the units warped
+by an extended bold, for example.)
+% Cf. https://tex.stackexchange.com/questions/229640/
+\begin{source}
+ before~title =
+ \dim_set:Nn \prevdepth { .3 \baselineskip },
+ after~title = \@@_prevdepth_adjustment:,
+ separator~sign = {
+ \normalfont
+ \skip_horizontal:n { .5em - \fontdimen2\font\space }
+ },
+\end{source}
+Finally, some basic styling.
+\begin{source}
+ sharp~corners,
+ colback = white,
+ colbacktitle = white,
+ coltitle = black,
+ colframe = black,
+ boxrule = \c_@@_thin_dim,
+ titlerule = \c_@@_very_thin_dim,
+},
+\end{source}
+The remaining box styles are based on \code{boxruled}, but rely on other skins
+(\code{empty} and \code{tile}), which remove the default frame drawing, as some
+of the frame are removed. (It would be possible to simply set the relevant
+widths to zero, but this tends to leave perceptible hairlines in most PDF
+viewers---probably because the fram is drawn by \emph{filling} rather than
+\emph{drawing}.)
+\begin{source}
+ruled/.style = {
+ pseudo/boxruled,
+ empty,
+\end{source}
+Even though we've removed the default frame, we do want some rules. First the
+various rule thicknesses (and some horizontal spacing) are set. The ones
+that are missing have their thicknesses set to zero, for spacing/positioning
+purposes. The titlerule is drawn normally, but for the top and bottom rules, we
+need to use the \code{borderline} mechanism.
+\begin{source}
+ boxrule = 0pt,
+ toprule = \heavyrulewidth,
+ titlerule = \lightrulewidth,
+ bottomrule = \heavyrulewidth,
+ left = 0pt,
+ right = 0pt,
+ titlerule~style = draw,
+ borderline~north = {\heavyrulewidth}{0pt}{black},
+ borderline~south = {\lightrulewidth}{0pt}{black},
+},
+\end{source}
+The \code{booktabs} is a variation of \code{ruled}, where the bottom rule is
+also thick, to match the style of \code{booktabs} tables.
+\begin{source}
+booktabs/.style = {
+ pseudo/ruled,
+ no~borderline,
+ bottomrule = \heavyrulewidth,
+ borderline~horizontal = {\heavyrulewidth}{0pt}{black}
+},
+\end{source}
+The \code{boxed} style is similar, with the titlerule removed, and with the
+borderline drawn on all sides. Finally, we want to ``simulate'' the title just
+being the first paragraph of the contents, so we set the space above the title
+\emph{almost} equal to the space used elsewhere above the content, zero out the
+spacing after the title, and make the top spacing equal to the the normal
+\cs{parskip} (which we set to \code{.3\cs{baselineskip}} in \code{before
+upper}).
+\begin{source}
+boxed/.style = {
+ pseudo/boxruled,
+ empty,
+ titlerule = 0pt,
+ borderline = {\c_@@_thin_dim}{0pt}{black},
+ toptitle = 1.5 \belowrulesep,
+ bottomtitle = 0pt,
+ top = 0.3 \baselineskip,
+},
+\end{source}
+The \code{tworuled} style is based on \code{boxed} (including the spacing
+adjustment between title and body), but removes the previously drawn
+borderlines, adjusts the thicknesses, and draws new horizontal lines.
+\begin{source}
+tworuled/.style = {
+ pseudo/boxed,
+ no~borderline,
+ left = 0pt,
+ right = 0pt,
+ boxrule = 0pt,
+ toprule = \heavyrulewidth,
+ bottomrule = \heavyrulewidth,
+ borderline~horizontal = {\heavyrulewidth}{0pt}{black},
+},
+\end{source}
+Finally, the \code{filled} style uses the \code{tile} skin, which has no
+frame, and is designed for filling. In addition to the colors, there's a slight
+spacing adjustment.\footnote{The \code{tile} skin also sets things like
+\code*{sharp corners} and \code{fonttitle}, so some of what we inherit from
+\code{boxruled} is a bit redundant, here.} Since we have no border, we increase
+the spacing a bit (though not at the top, to prevent a ``top-heavy'' look,
+especially when dropping the title).
+\begin{source}
+filled/.style = {
+ pseudo/boxruled,
+ tile,
+ colback = \pseudohlcolor, % black!12
+ colbacktitle = lightgray, % black!25
+ bottom = 2 \aboverulesep + \c_@@_thin_dim,
+ left = 2 \belowrulesep + \c_@@_thin_dim,
+ right = 2 \belowrulesep + \c_@@_thin_dim,
+}
+\end{source}
+And that ends the \pkg{tcolorbox} definitions:
+\begin{source}
+} % \pgfqkeys
+\end{source}
+
+
+\section{Deprecations and warnings}
+
+Some commands are no longer intended for use, but are included for backward
+compatibility. These will issue a deprecation warning when used.
+
+% Not sure why there should be no `~` after the parameters?
+\begin{source}
+\msg_new:nnn { pseudo } { useinstead } {
+ The~#1 command~(used~\msg_line_context:)~is~deprecated;~
+ use~#2 instead.
+}
+
+\cs_new:Npn \@@_use_instead:nn #1 #2 {
+ \msg_warning:nnnn { pseudo } { useinstead } { #1 } { #2 }
+ % \tl_gset_eq:NN #1 #2
+}
+
+\NewDocumentCommand \pseudoslash { } {
+ \@@_use_instead:nn \pseudoslash \RestorePseudoBackslash
+ \RestorePseudoBackslash
+}
+
+\NewDocumentCommand \pseudoeq { } {
+ \@@_use_instead:nn \pseudoeq \RestorePseudoEq
+ \RestorePseudoEq
+}
+\end{source}
+Finally, we define a warning to issue if \refk{hl} is used without \refk{hpad}.
+\begin{source}
+\msg_new:nnn { pseudo } { hl-without-hpad } {
+ hl~used~without~hpad~\msg_line_context:.
+}
+\end{source}
+
+
+\section{Compatibility}
+\label{sec:compat}
+
+If the box and float functionality is used with a version of \pkg{tcolorbox}
+prior to~4.40 (e.g., on \url{https://arxiv.org}, at the time of writing), the
+\code*{beforeafter skip balanced} option won't be defined
+\begin{source}
+\pgfkeysifdefined { /tcb/beforeafter~skip~balanced/.@cmd } { } {
+\end{source}
+To handle this, at least for the time being, \pkg{pseudo} implements a fallback
+version of this option.
+\begin{source}
+\pgfqkeys { /tcb } {
+ before~skip~balanced/.style = { before = {
+ \int_compare:nNnF { \lastnodetype } = { -1 } {
+ \par
+ \mode_if_vertical:T {
+ \@@_if_minipage:
+ \dim_compare:nNnTF \parskip > \c_zero_dim {
+ \addvspace{ -\parskip }
+ }
+ \else:
+ \bool_lazy_or:nnTF {
+ \dim_compare_p:nNn
+ \prevdepth < \c_zero_dim
+ } {
+ \dim_compare_p:nNn
+ \prevdepth > { .3 \baselineskip }
+ } {
+ \addvspace { \skip_eval:n {
+ #1 - \parskip
+ } }
+ } {
+ \addvspace { \skip_eval:n {
+ #1 + .3 \baselineskip
+ - \prevdepth - \parskip
+ } }
+ }
+ \fi:
+ \nointerlineskip
+ }
+ }
+ \dim_set_eq:NN \lineskip \c_zero_dim
+ \noindent
+ } },
+ after~skip~balanced/.style = { after = {
+ \par
+ \mode_if_vertical:T {
+ \dim_set:Nn \prevdepth { .3\baselineskip }
+ \addvspace { \skip_eval:n { #1 - \parskip } }
+ }
+ } },
+ beforeafter~skip~balanced/.style = {
+ before~skip~balanced = { #1 },
+ after~skip~balanced = { #1 }
+ }
+}
+\end{source}
+We need to know if the box is in a \code{minipage}, and this is normally
+detected as part of \cs{tcb@apply@box@options}. We override that macro (if
+\pkg{tcolorbox} has been loaded by the time we reach the end of the preamble) to
+insert the approproate definition.
+\begin{source}
+\RequirePackage{etoolbox}
+
+\AtEndPreamble {
+ \@ifpackageloaded { tcolorbox } {
+ \tl_set_eq:NN \@@_orig_tcbopt \tcb@apply@box@options
+ \def \tcb@apply@box@options #1 {
+ \@@_orig_tcbopt { #1 }
+ \tl_set_eq:NN \@@_if_minipage: \if@minipage
+ }
+ } { }
+}
+\end{source}
+End of \cs{pgfkeysifdefined}:
+\begin{source}
+}
+\end{source}
+In older version of \pkg{tcolorbox}, we end up with extra space at the top of
+the box contents. The simple solution here it so simply add \code{-\cs{parskip}}
+of vertical space. This doesn't really do much harm, but it is redundant with
+newer versions, and it does interfere with the use of \code*{before upper app},
+for example. Therefore, we only add this spacing in older versions (for
+simplicity, just going with 4.x and older). We do this at the end of the
+preamble, and only if \pkg{tcolorbox} has actually been loaded at that point.
+\begin{source}
+\AtEndPreamble {
+ \@ifpackageloaded { tcolorbox } {
+
+ \cs_new:Npn \@@_vmaj:n #1 { \@@_vmaj_aux:w #1 \q_stop }
+ \cs_new:Npn \@@_vmaj_aux:w #1 . #2 \q_stop { #1 }
+
+ \tl_set:Nx \l_tmpa_tl { \exp_args:No \@@_vmaj:n \tcb@version }
+
+ \int_compare:nNnT \l_tmpa_tl < 5 {
+
+ \tcbuselibrary { hooks }
+ \tcbset {
+ pseudo/boxruled/.append~style = {
+ before~upper~app = \vspace { -\parskip }
+ }
+ }
+
+ }
+
+ }
+
+}
+\end{source}
+
\printbibliography
\end{document}
diff --git a/macros/latex/contrib/pseudo/pseudo.sty b/macros/latex/contrib/pseudo/pseudo.sty
index 938fb4e887..850b19fa14 100644
--- a/macros/latex/contrib/pseudo/pseudo.sty
+++ b/macros/latex/contrib/pseudo/pseudo.sty
@@ -1,6 +1,6 @@
% MIT License
%
-% Copyright (c) 2019 Magnus Lie Hetland
+% Copyright (c) 2019-2022 Magnus Lie Hetland
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the "Software"), to deal
@@ -20,8 +20,8 @@
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
% SOFTWARE.
%
-\def \pseudoversion {1.1.3}
-\def \pseudodate {2019/10/30}
+\def \pseudoversion {1.2}
+\def \pseudodate {2022/07/14}
\RequirePackage{expl3}
\ProvidesExplPackage
{pseudo}
@@ -29,6 +29,7 @@
{\pseudoversion}
{Straightforward pseudocode}
\RequirePackage{xparse}
+\RequirePackage{pgfkeys}
\RequirePackage{array, xcolor, colortbl}
\RequirePackage{l3keys2e}
\RequirePackage{aliascnt}
@@ -42,34 +43,36 @@
\dim_new:N \pseudoindentlength
\int_new:N \g__pseudo_indent_level_int
\int_new:N \l__pseudo_initial_indent_level_int
+\bool_new:N \l__pseudo_in_eol_bool
\cs_generate_variant:Nn \quark_if_no_value:nTF { VTF }
+\cs_generate_variant:Nn \tl_if_novalue:nTF { VTF }
\cs_generate_variant:Nn \tl_set:Nn { Ne }
-\cs_new:Nn \__pseudo_undef_col:n {
+\cs_new:Npn \__pseudo_undef_col:n #1 {
\tl_set_eq:cN { NC@find@ \token_to_str:N #1 } \scan_stop:
}
-\cs_new:Nn \__pseudo_def_col:nn {
+\cs_new:Npn \__pseudo_def_col:nn #1 #2 {
\__pseudo_undef_col:n { #1 }
\newcolumntype { #1 } { #2 }
}
-\cs_new:Nn \__pseudo_meta_new_cmd:NNnn {
+\cs_new:Npn \__pseudo_meta_new_cmd:NNnn #1 #2 #3 #4 {
\tl_set:Nn \l_tmpa_tl {pseudo \cs_to_str:N #2}
\exp_args:Nc
#1 \l_tmpa_tl #3 {#4}
\cs_if_free:NT #2 {\cs_gset_eq:Nc #2 \l_tmpa_tl}
}
-\cs_new:Nn \__pseudo_new_cmd:Nnn {
+\cs_new:Npn \__pseudo_new_cmd:Nnn #1 #2 #3 {
\__pseudo_meta_new_cmd:NNnn
\NewDocumentCommand #1 {{#2}} {
#3
}
}
-\cs_new:Nn \__pseudo_new_ecmd:Nnn {
+\cs_new:Npn \__pseudo_new_ecmd:Nnn #1 #2 #3 {
\__pseudo_meta_new_cmd:NNnn
\def #1 {#2} {
#3
}
}
-\cs_new:Nn \__pseudo_new_dec:nn {
+\cs_new:Npn \__pseudo_new_dec:nn #1 #2 {
\tl_set:Nn \l_tmpa_tl { DeclarePseudo #1 }
\exp_args:Nc
\DeclareDocumentCommand \l_tmpa_tl { mm } {
@@ -78,7 +81,7 @@
}
}
}
-\cs_new:Nn \__pseudo_per_char:nnn {
+\cs_new:Npn \__pseudo_per_char:nnn #1 #2 #3 {
\peek_charcode_remove:NTF { #1 } {
#2
\__pseudo_per_char:nnn{#1}{#2}{#3}
@@ -86,7 +89,7 @@
#3
}
}
-\cs_new:Nn \__pseudo_set_indent_length: {
+\cs_new:Npn \__pseudo_set_indent_length: {
\quark_if_no_value:VTF \l__pseudo_indent_length_tl {
\hbox_set:Nn \l_tmpa_box { \l__pseudo_indent_text_tl }
\dim_set:Nn \pseudoindentlength { \box_wd:N \l_tmpa_box }
@@ -94,31 +97,41 @@
\dim_set:Nn \pseudoindentlength \l__pseudo_indent_length_tl
}
}
-\cs_new:Nn \__pseudo_indent:N {
- \skip_horizontal:n{ \pseudoindentlength * #1 }
+\cs_new:Npn \__pseudo_indent:N #1 {
+ \tl_if_novalue:VTF \l__pseudo_indent_mark_tl {
+ \skip_horizontal:n{ \pseudoindentlength * #1 }
+ } {
+ \group_begin:
+ \color{\l__pseudo_indent_color_tl}
+ \int_step_inline:nn { \g__pseudo_indent_level_int } {
+ \l__pseudo_indent_mark_tl
+ \skip_horizontal:n{ \pseudoindentlength }
+ }
+ \group_end:
+ }
\ignorespaces
}
-\cs_new:Nn \__pseudo_drop_ctr:n {
+\cs_new:Npn \__pseudo_drop_ctr:n #1 {
\cs_undefine:c { c@ #1 }
}
-\cs_new:Nn \__pseudo_copy_ctr:nn {
+\cs_new:Npn \__pseudo_copy_ctr:nn #1 #2 {
\__pseudo_drop_ctr:n { #1 }
\newaliascnt { #1 } { #2 }
}
-\cs_new:Nn \__pseudo_star_setup: {
+\cs_new:Npn \__pseudo_star_setup: {
\cs_if_exist:cT { c@ * } {
\__pseudo_copy_ctr:nn { __pseudo_orig_* } { * }
}
\__pseudo_copy_ctr:nn { * } { pseudoline }
\group_insert_after:N \__pseudo_star_reset:
}
-\cs_new:Nn \__pseudo_star_reset: {
+\cs_new:Npn \__pseudo_star_reset: {
\cs_if_exist:cT { c@ __pseudo_orig_* } {
\__pseudo_copy_ctr:nn { * } { __pseudo_orig_* }
\cs_undefine:c { c@ __pseudo_orig_* }
}
}
-\cs_new:Nn \__pseudo_save_label: {
+\cs_new:Npn \__pseudo_save_label: {
\int_set:Nn \l_tmpa_int {\arabic{pseudoline}}
\int_compare:nF {\l_tmpa_int = \g__pseudo_last_saved_line_int} {
\addtocounter{pseudoline}{-1}
@@ -129,7 +142,7 @@
\DeclareDocumentCommand \pseudosavelabel { } {
\__pseudo_save_label:
}
-\cs_new:Nn \__pseudo_gsave_as:NN {
+\cs_new:Npn \__pseudo_gsave_as:NN #1 #2 {
\cs_gset_eq:NN #2 #1
\group_insert_after:N \cs_gset_eq:NN
\group_insert_after:N #1
@@ -140,7 +153,7 @@
\__pseudo_new_cmd:Nnn \kw { m } { \textnormal {\kwfont { #1 } } }
\__pseudo_new_cmd:Nnn \cn { m } { \textnormal {\cnfont { #1 } } }
\__pseudo_new_cmd:Nnn \id { m } { \textnormal {\idfont { #1 } } }
-\cs_new:Nn \__pseudo_b_or_bx: {
+\cs_new:Npn \__pseudo_b_or_bx: {
\group_begin:
\cs_if_exist:NT \@defaultsubs {
\__pseudo_gsave_as:NN \@defaultsubs \__pseudo_defaultsubs
@@ -154,7 +167,7 @@
\group_end:
\__pseudo_b_or_bx:
}
-\cs_new:Nn \__pseudo_fmt_pr:n {
+\cs_new:Npn \__pseudo_fmt_pr:n #1 {
\textnormal{\prfont{ #1 }}
}
\NewDocumentCommand \__pseudo_parse_paren_args { +d() } {
@@ -175,7 +188,7 @@
\__pseudo_parse_paren_args
}
}
-\cs_new:Nn \__pseudo_fmt_fn:n {
+\cs_new:Npn \__pseudo_fmt_fn:n #1 {
\textnormal{\fnfont{ #1 }}
}
\__pseudo_new_cmd:Nnn \fn { m } {
@@ -186,8 +199,9 @@
}
\__pseudo_new_ecmd:Nnn \hd { #1 ( #2 ) } {
\multicolumn{2}
- {\__pseudo_hd_preamble}
+ {\pseudohdpreamble}
{\__pseudo_fmt_pr:n{#1}\ensuremath{(#2)}}
+ \tl_set_eq:NN \l__pseudo_extra_space_tl \l__pseudo_hd_space_tl
}
\__pseudo_new_cmd:Nnn \st { +m } {
\textnormal {
@@ -232,21 +246,27 @@
}
}
\cs_gset_eq:NN \__pseudo_eq: \=
-\cs_new:Nn \__pseudo_dts: {
+\NewDocumentCommand \dts { } {
+ \nolinebreak
\mathinner {
\ldotp
\ldotp
}
+ \nolinebreak
}
-\NewDocumentCommand \dts { } { \__pseudo_dts: }
\cs_gset_eq:NN \c__pseudo_dot_cs \.
\DeclareDocumentCommand \. { m } {
\tl_if_eq:nnTF { #1 } { . } {
\dts
} {
- \c__pseudo_dot_cs{#1}
+ \c__pseudo_dot_cs { #1 }
}
}
+\NewDocumentCommand \rng { } {
+ \nolinebreak
+ \mathinner { : }
+ \nolinebreak
+}
\keys_define:nn { pseudo/package } {
kw .bool_gset:N = \g__pseudo_kw_bool,
kw .default:n = true
@@ -255,9 +275,13 @@
\keys_define:nn { pseudo } {
font .tl_set:N = \pseudofont,
font .initial:n = \normalfont,
- hpad .tl_set:N = \l__pseudo_hpad_tl,
- hpad .initial:n = 0.0em,
+ hpad .meta:n = {
+ hpad-val = { #1 },
+ hl-warn = false,
+ },
hpad .default:n = 0.3em,
+ hpad-val .tl_set:N = \l__pseudo_hpad_tl,
+ hpad-val .initial:n = 0.0em,
hsep .tl_set:N = \l__pseudo_hsep_tl,
hsep .initial:n = .75em,
left-margin .tl_set:N = \l__pseudo_left_margin_tl,
@@ -273,12 +297,39 @@
indent-length .initial:V = \q_no_value,
indent-text .tl_set:N = \l__pseudo_indent_text_tl,
indent-text .initial:n = { \pseudofont\kw{else}\ },
+ indent-mark .tl_set:N = \l__pseudo_indent_mark_tl,
+ indent-mark .initial:x = \c_novalue_tl,
+ indent-mark .default:n =
+ \skip_horizontal:n { \l__pseudo_indent_mark_shift_tl }
+ \tex_vrule:D width \l__pseudo_indent_mark_wd_tl
+ \skip_horizontal:n {
+ -\l__pseudo_indent_mark_wd_tl
+ -\l__pseudo_indent_mark_shift_tl
+ },
+ indent-mark-width .tl_set:N = \l__pseudo_indent_mark_wd_tl,
+ indent-mark-width .initial:n = \c__pseudo_semithick_dim,
+ indent-mark-shift .tl_set:N = \l__pseudo_indent_mark_shift_tl,
+ indent-mark-shift .initial:n = 0pt,
+ indent-mark-shift .default:n = .5em,
+ indent-mark-color .tl_set:N = \l__pseudo_indent_color_tl,
+ indent-mark-color .initial:n = lightgray,
indent-level .int_set:N = \l__pseudo_initial_indent_level_int,
kwfont .tl_set:N = \kwfont,
kwfont .initial:n = \__pseudo_b_or_bx:,
kw .meta:n = { font = \kwfont },
kw .value_forbidden:n = true,
- hl .meta:n = { bol-prepend = \pseudohl },
+ hl-warn .bool_set:N = \l__pseudo_hl_warn_bool,
+ hl-warn .initial:n = true,
+ hl-warn .default:n = true,
+ hl-warn-code .code:n = {
+ \bool_if:nT \l__pseudo_hl_warn_bool {
+ \msg_warning:nn { pseudo } { hl-without-hpad }
+ }
+ },
+ hl .meta:n = {
+ hl-warn-code,
+ bol-prepend = \pseudohl
+ },
hl .value_forbidden:n = true,
bol .tl_set:N = \l__pseudo_bol_tl,
bol-append .code:n = {
@@ -324,8 +375,13 @@
bol-append = \color{\pseudodimcolor},
setup-append = \color{\pseudodimcolor}
},
- line-height .fp_set:N = \l__pseudo_line_height_fp,
+ line-height .tl_set:N = \l__pseudo_line_height_tl,
line-height .initial:n = 1,
+ extra-space .tl_set:N = \l__pseudo_extra_space_tl,
+ extra-space .initial:n = 0pt,
+ hd-space .tl_set:N = \l__pseudo_hd_space_tl,
+ hd-space .initial:n = 0pt,
+ hd-space .default:n = 0.41386ex,
start .tl_set:N = \l__pseudo_start_tl,
start .initial:n = 1,
preamble .code:n =
@@ -348,31 +404,40 @@
\tl_put_left:Nn \l__pseudo_setup_tl {#1}
},
hd-preamble .code:n =
- \__pseudo_def_col:nn{ \__pseudo_hd_preamble }{#1},
+ \__pseudo_def_col:nn{ \pseudohdpreamble }{#1},
hd-preamble .initial:n = {
- >{\pseudohpad} l <{\pseudohpad}
+ >{ \pseudohpad } l <{ \pseudohpad }
},
prefix .tl_set:N = \pseudoprefix,
prefix .initial:n = {
\pseudobol \stepcounter* \pseudolabel &
},
+ pos .tl_set:N = \pseudopos,
+ pos .initial:n = t,
+ prevdepth .tl_set:N = \l__pseudo_prevdepth_tl,
+ prevdepth .initial:n = .3 \baselineskip,
begin-tabular .tl_set:N = \l__pseudo_begin_tabular_tl,
- begin-tabular .initial:n = \begin{tabular}{\pseudopreamble},
+ begin-tabular .initial:n =
+ \begin{tabular}[\pseudopos]{\pseudopreamble},
end-tabular .tl_set:N = \l__pseudo_end_tabular_tl,
end-tabular .initial:n = \end{tabular},
topsep .tl_set:N = \l__pseudo_topsep_tl,
topsep .initial:n = { \topsep },
- parskip .tl_set:N = \l__pseudo_parskip_tl,
- parskip .initial:n = { \parskip },
partopsep .tl_set:N = \l__pseudo_partopsep_tl,
partopsep .initial:n = { \partopsep },
compact .meta:n = {
- compact-val = #1,
- compact-def = true,
+ compact-val = { #1 },
+ compact-def = true,
+ compact-code = { #1 },
},
compact .default:n = true,
compact-val .bool_set:N = \l__pseudo_compact_bool,
compact-def .bool_set:N = \l__pseudo_compact_def_bool,
+ compact-code .code:n = {
+ \bool_if:nT { \l__pseudo_compact_bool } {
+ \tl_clear:N \pseudopos
+ }
+ },
eqs-scale .fp_set:N = \l__pseudo_eqs_scale_fp,
eqs-scale .initial:n = 0.6785,
eqs-sep .tl_set:N = \l__pseudo_eqs_sep_tl,
@@ -388,7 +453,7 @@
pause .meta:n = { eol-append = \pause }
}
}
-\cs_new:Nn \__pseudo_keys_set_overlay:nnn {
+\cs_new:Npn \__pseudo_keys_set_overlay:nnn #1 #2 #3 {
\bool_if:NT \c__pseudo_beamer_bool {
\only<#1>{ \keys_set:nn { #2 } { #3 } }
}
@@ -422,29 +487,43 @@
\int_compare_p:n { \l_tmpa_int == \l_tmpb_int == 1 }
&&
\tl_if_empty_p:N \l_tmpa_tl
- }{
- \tl_if_blank:nF{#1} {
+ } {
+ \tl_if_blank:nF{ #1 } {
\tl_put_right:Nn \l_tmpb_tl {= #1}
}
\__pseudo_keys_set_overlay:VnV
\l__pseudo_overlay_tl { pseudo } \l_tmpb_tl
} {
- \msg_error:nnx
- { pseudo } { unknown-key } { \l_keys_path_tl }
+ \bool_if:nTF {
+ \bool_lazy_and_p:nn
+ { \l__pseudo_in_eol_bool }
+ { \tl_if_blank_p:n { #1 } }
+ } {
+ \tl_set_rescan:Nno
+ \l__pseudo_extra_space_tl { }
+ { \l_keys_key_str }
+ } {
+ \msg_error:nnx
+ { pseudo } { unknown-key }
+ { \l_keys_path_str }
+ }
}
- \group_end:
+ \exp_args:NNNV
+ \group_end:
+ \tl_set:Nn \l__pseudo_extra_space_tl \l__pseudo_extra_space_tl
}
}
-\cs_new:Nn \__pseudo_set:n { \keys_set:nn { pseudo } { #1 } }
-\cs_new:Nn \__pseudo_inc_indent: {
+\cs_new:Npn \__pseudo_set:n #1 { \keys_set:nn { pseudo } { #1 } }
+\cs_new:Npn \__pseudo_inc_indent: {
\int_gincr:N \g__pseudo_indent_level_int
}
-\cs_new:Nn \__pseudo_dec_indent: {
+\cs_new:Npn \__pseudo_dec_indent: {
\int_compare:nNnT \g__pseudo_indent_level_int > 0 {
\int_gdecr:N \g__pseudo_indent_level_int
}
}
-\cs_new:Nn \__pseudo_eol_handle_args:nnn {
+\cs_new:Npn \__pseudo_eol_handle_args:nnn #1 #2 #3 {
+ \bool_set_true:N \l__pseudo_in_eol_bool
\__pseudo_keys_set_overlay:nnn { #2 } { pseudo } { hl }
\keys_set:nn { pseudo } { #3 }
\tl_gset_eq:NN \pseudolabel \l__pseudo_label_tl
@@ -459,13 +538,18 @@
}
\NewDocumentCommand \__pseudo_eol_tail { s d<> +O{ } } {
\__pseudo_eol_handle_args:nnn{#1}{#2}{#3}
- \peek_meaning_ignore_spaces:NF \end {
+ \tl_set:Nx \l_tmpa_tl {
+ \exp_not:N \tabularnewline [ \l__pseudo_extra_space_tl ]
+ }
+ \peek_meaning_ignore_spaces:NTF \end {
+ \l_tmpa_tl
+ } {
\pseudoeol
- \tabularnewline
+ \l_tmpa_tl
\__pseudo_bol:
}
}
-\cs_new:Nn \__pseudo_eol: {
+\cs_new:Npn \__pseudo_eol: {
\__pseudo_per_char:nnn { + } {
\__pseudo_inc_indent:
} {
@@ -475,7 +559,7 @@
\__pseudo_eol_tail
} }
}
-\cs_new:Nn \__pseudo_bol: {
+\cs_new:Npn \__pseudo_bol: {
\g__pseudo_cur_prefix_tl
}
\NewDocumentCommand \pseudohpad { } {
@@ -484,10 +568,10 @@
\NewDocumentCommand \pseudoindent { } {
\__pseudo_indent:N { \g__pseudo_indent_level_int }
}
-\NewDocumentCommand \pseudoslash { } {
+\NewDocumentCommand \RestorePseudoBackslash { } {
\cs_gset_eq:NN \\ \__pseudo_eol:
}
-\NewDocumentCommand \pseudoeq { } {
+\NewDocumentCommand \RestorePseudoEq { } {
\cs_gset_eq:NN \= \__pseudo_eq:
}
\NewDocumentCommand \pseudoset { +m }
@@ -503,7 +587,7 @@
\group_begin:
\__pseudo_gsave_as:NN \\ \c__pseudo_saved_cr_cs
\__pseudo_gsave_as:NN \= \c__pseudo_saved_eq_cs
- \pseudoeq
+ \RestorePseudoEq
\int_set:Nn \g__pseudo_last_saved_line_int {\arabic{pseudoline}}
\__pseudo_star_setup:
\IfNoValueF { #1 } {
@@ -517,7 +601,7 @@
}
\bool_if:nF { \l__pseudo_compact_bool } {
\skip_set:Nn \l_tmpa_skip {
- \l__pseudo_topsep_tl + \l__pseudo_parskip_tl
+ \l__pseudo_topsep_tl
}
\mode_if_vertical:TF {
\skip_add:Nn \l_tmpa_skip { \l__pseudo_partopsep_tl }
@@ -528,15 +612,14 @@
\noindent
\skip_horizontal:n{ \dim_eval:n { \l__pseudo_left_margin_tl } }
}
- \dim_set:Nn \tabcolsep { \l__pseudo_hsep_tl / 2 }
- \tl_set:Nn \arraystretch
- { \fp_to_decimal:n { \l__pseudo_line_height_fp } }
+ \dim_set:Nn \tabcolsep { \l__pseudo_hsep_tl / 2 }
+ \tl_set_eq:NN \arraystretch \l__pseudo_line_height_tl
\stepcounter{pseudoenv}
\setcounter{pseudoline}{\l__pseudo_start_tl}
\addtocounter{pseudoline}{-1}
\tl_use:N \l__pseudo_begin_tabular_tl
\tex_noalign:D {
- \pseudoslash
+ \RestorePseudoBackslash
\int_gset_eq:NN \g__pseudo_indent_level_int
\l__pseudo_initial_indent_level_int
\__pseudo_eol_handle_args:nnn{#2}{#3}{#4}
@@ -544,25 +627,229 @@
\__pseudo_bol:
} {
\tl_use:N \l__pseudo_end_tabular_tl
- \bool_if:nF { \l__pseudo_compact_bool } {
+ \bool_if:nTF { \l__pseudo_compact_bool } {
+ \group_end:
+ } {
\mode_if_vertical:F {
\unskip \par
\group_insert_after:N \@endparenv
}
\addvspace{ \l_tmpa_skip }
+ \exp_args:NNNV
+ \group_end:
+ \dim_set:Nn \prevdepth \l__pseudo_prevdepth_tl
}
- \group_end:
}
-\pseudodefinestyle{starred}{
- preamble={
+\pseudodefinestyle{ starred }{
+ preamble = {
>{\pseudohpad\pseudoindent\pseudofont}
l
<{\pseudohpad}
},
- prefix={\pseudobol},
+ prefix = {\pseudobol},
}
\NewDocumentEnvironment { pseudo* } { +O{} } {
\begin{pseudo}[starred, #1]
} {
\end{pseudo}
}
+\@ifpackageloaded { booktabs } { } {
+ \dim_const:Nn \aboverulesep { .40ex }
+ \dim_const:Nn \belowrulesep { .65ex }
+ \dim_const:Nn \heavyrulewidth { .08em }
+ \dim_const:Nn \lightrulewidth { .05em }
+}
+\dim_const:Nn \c__pseudo_very_thin_dim { 0.2pt }
+\dim_const:Nn \c__pseudo_thin_dim { 0.4pt }
+\dim_const:Nn \c__pseudo_semithick_dim { 0.6pt }
+\cs_new:Npn \__pseudo_prevdepth_adjustment: {
+ \par
+ \dim_compare:nNnF \prevdepth < \c_zero_dim {
+ \dim_compare:nNnT \prevdepth < { .3 \baselineskip } {
+ \skip_vertical:n { .3 \baselineskip - \prevdepth }
+ \skip_vertical:N \c_zero_dim
+ }
+ }
+}
+\pseudodefinestyle { in-float } {
+}
+\tl_new:N \l__pseudo_float_init_tl
+\pgfqkeys { /tcb/pseudo } {
+ init/.code = {
+ \tl_set:Nn \l__pseudo_float_init_tl { #1 }
+ },
+boxruled/.style = {
+ floatplacement = tbp,
+ before~upper = {
+ \dim_set:Nn \parskip { .3 \baselineskip }
+ \dim_set:Nn \topsep { .2 \baselineskip }
+ \dim_set:Nn \partopsep { 0pt }
+ \dim_set:Nn \prevdepth { .3 \baselineskip }
+ \RestorePseudoEq
+ \pseudoset { in-float }
+ \l__pseudo_float_init_tl
+ },
+ after~upper = \__pseudo_prevdepth_adjustment:,
+ beforeafter~skip~balanced = \l__pseudo_topsep_tl,
+ boxsep = 0pt,
+ toptitle = \belowrulesep,
+ bottomtitle = \aboverulesep,
+ top = 2 \belowrulesep,
+ bottom = 2 \aboverulesep,
+ left = 2 \belowrulesep,
+ right = 2 \belowrulesep,
+ fonttitle = \bfseries,
+ description~font = \normalfont,
+ before~title =
+ \dim_set:Nn \prevdepth { .3 \baselineskip },
+ after~title = \__pseudo_prevdepth_adjustment:,
+ separator~sign = {
+ \normalfont
+ \skip_horizontal:n { .5em - \fontdimen2\font\space }
+ },
+ sharp~corners,
+ colback = white,
+ colbacktitle = white,
+ coltitle = black,
+ colframe = black,
+ boxrule = \c__pseudo_thin_dim,
+ titlerule = \c__pseudo_very_thin_dim,
+},
+ruled/.style = {
+ pseudo/boxruled,
+ empty,
+ boxrule = 0pt,
+ toprule = \heavyrulewidth,
+ titlerule = \lightrulewidth,
+ bottomrule = \heavyrulewidth,
+ left = 0pt,
+ right = 0pt,
+ titlerule~style = draw,
+ borderline~north = {\heavyrulewidth}{0pt}{black},
+ borderline~south = {\lightrulewidth}{0pt}{black},
+},
+booktabs/.style = {
+ pseudo/ruled,
+ no~borderline,
+ bottomrule = \heavyrulewidth,
+ borderline~horizontal = {\heavyrulewidth}{0pt}{black}
+},
+boxed/.style = {
+ pseudo/boxruled,
+ empty,
+ titlerule = 0pt,
+ borderline = {\c__pseudo_thin_dim}{0pt}{black},
+ toptitle = 1.5 \belowrulesep,
+ bottomtitle = 0pt,
+ top = 0.3 \baselineskip,
+},
+tworuled/.style = {
+ pseudo/boxed,
+ no~borderline,
+ left = 0pt,
+ right = 0pt,
+ boxrule = 0pt,
+ toprule = \heavyrulewidth,
+ bottomrule = \heavyrulewidth,
+ borderline~horizontal = {\heavyrulewidth}{0pt}{black},
+},
+filled/.style = {
+ pseudo/boxruled,
+ tile,
+ colback = \pseudohlcolor,
+ colbacktitle = lightgray,
+ bottom = 2 \aboverulesep + \c__pseudo_thin_dim,
+ left = 2 \belowrulesep + \c__pseudo_thin_dim,
+ right = 2 \belowrulesep + \c__pseudo_thin_dim,
+}
+}
+\msg_new:nnn { pseudo } { useinstead } {
+ The~#1 command~(used~\msg_line_context:)~is~deprecated;~
+ use~#2 instead.
+}
+\cs_new:Npn \__pseudo_use_instead:nn #1 #2 {
+ \msg_warning:nnnn { pseudo } { useinstead } { #1 } { #2 }
+}
+\NewDocumentCommand \pseudoslash { } {
+ \__pseudo_use_instead:nn \pseudoslash \RestorePseudoBackslash
+ \RestorePseudoBackslash
+}
+\NewDocumentCommand \pseudoeq { } {
+ \__pseudo_use_instead:nn \pseudoeq \RestorePseudoEq
+ \RestorePseudoEq
+}
+\msg_new:nnn { pseudo } { hl-without-hpad } {
+ hl~used~without~hpad~\msg_line_context:.
+}
+\pgfkeysifdefined { /tcb/beforeafter~skip~balanced/.@cmd } { } {
+\pgfqkeys { /tcb } {
+ before~skip~balanced/.style = { before = {
+ \int_compare:nNnF { \lastnodetype } = { -1 } {
+ \par
+ \mode_if_vertical:T {
+ \__pseudo_if_minipage:
+ \dim_compare:nNnTF \parskip > \c_zero_dim {
+ \addvspace{ -\parskip }
+ }
+ \else:
+ \bool_lazy_or:nnTF {
+ \dim_compare_p:nNn
+ \prevdepth < \c_zero_dim
+ } {
+ \dim_compare_p:nNn
+ \prevdepth > { .3 \baselineskip }
+ } {
+ \addvspace { \skip_eval:n {
+ #1 - \parskip
+ } }
+ } {
+ \addvspace { \skip_eval:n {
+ #1 + .3 \baselineskip
+ - \prevdepth - \parskip
+ } }
+ }
+ \fi:
+ \nointerlineskip
+ }
+ }
+ \dim_set_eq:NN \lineskip \c_zero_dim
+ \noindent
+ } },
+ after~skip~balanced/.style = { after = {
+ \par
+ \mode_if_vertical:T {
+ \dim_set:Nn \prevdepth { .3\baselineskip }
+ \addvspace { \skip_eval:n { #1 - \parskip } }
+ }
+ } },
+ beforeafter~skip~balanced/.style = {
+ before~skip~balanced = { #1 },
+ after~skip~balanced = { #1 }
+ }
+}
+\RequirePackage{etoolbox}
+\AtEndPreamble {
+ \@ifpackageloaded { tcolorbox } {
+ \tl_set_eq:NN \__pseudo_orig_tcbopt \tcb@apply@box@options
+ \def \tcb@apply@box@options #1 {
+ \__pseudo_orig_tcbopt { #1 }
+ \tl_set_eq:NN \__pseudo_if_minipage: \if@minipage
+ }
+ } { }
+}
+}
+\AtEndPreamble {
+ \@ifpackageloaded { tcolorbox } {
+ \cs_new:Npn \__pseudo_vmaj:n #1 { \__pseudo_vmaj_aux:w #1 \q_stop }
+ \cs_new:Npn \__pseudo_vmaj_aux:w #1 . #2 \q_stop { #1 }
+ \tl_set:Nx \l_tmpa_tl { \exp_args:No \__pseudo_vmaj:n \tcb@version }
+ \int_compare:nNnT \l_tmpa_tl < 5 {
+ \tcbuselibrary { hooks }
+ \tcbset {
+ pseudo/boxruled/.append~style = {
+ before~upper~app = \vspace { -\parskip }
+ }
+ }
+ }
+ }
+}
diff --git a/macros/latex/contrib/pseudo/test/pseudotest.tex b/macros/latex/contrib/pseudo/test/pseudotest.tex
index c95a03ab3f..282de1975a 100644
--- a/macros/latex/contrib/pseudo/test/pseudotest.tex
+++ b/macros/latex/contrib/pseudo/test/pseudotest.tex
@@ -1,9 +1,16 @@
-\documentclass[a4paper]{article}
+\documentclass{article}
\def\id{my previous definition}
\usepackage{pseudo}
+\usepackage{tcolorbox}
+\tcbuselibrary{skins,theorems}
+
+\usepackage{noindentafter}
+\NoIndentAfterEnv{pseudo}
+\NoIndentAfterEnv{pseudo*}
+
\title{Tests for the \textsf{pseudo} package}
\author{Magnus Lie Hetland}
@@ -68,7 +75,6 @@ The previous definition of \verb|\id| is: \id\\
bar
\end{pseudo}
-\noindent
Should be \verb|\fn{test}[A]| followed by \verb|(B)| in normalfont:
\fn{test}[A](B)
@@ -135,7 +141,6 @@ keyword \tn{normal} keyword \nf normal
first line
\end{pseudo}
-\noindent
Reference to line~\ref{linetwo}.
\begin{pseudo}[hpad=1cm, hsep=.1cm, indent-length=2cm, indent-level=1]
@@ -159,7 +164,6 @@ Here's a compact piece of pseudocode:
print \st{42}
\end{pseudo*}
-\noindent
Automatically compact:
\fbox{\begin{pseudo*}
In a box.
@@ -175,10 +179,151 @@ far \\
apart
\end{pseudo}
-\begin{pseudo}[parskip=1cm, topsep=1cm, partopsep=1cm]
-custom parskip, topsep and partopsep
+\begin{pseudo}[topsep=1cm, partopsep=1cm]
+custom topsep and partopsep
\end{pseudo}
+Adjustments based on depth:
+
+\bigskip
+
+{
+\pseudoset{hl-warn=false}
+
+\parskip0pt % Default
+\topsep0pt
+\partopsep0pt
+\noindent
+\begin{minipage}[t]{2em}
+.
+
+\begin{pseudo*}[hl]
+(x) \\
+x \\
+x \\
+(x)
+\end{pseudo*}%
+\end{minipage}%
+%
+%
+%
+\begin{minipage}[t]{2em}
+.
+
+\begin{pseudo*}[hl]
+x \\
+x \\
+x \\
+x
+\end{pseudo*}%
+\end{minipage}%
+%
+%
+%
+\begin{minipage}[t]{2em}%
+.
+
+\begin{tabular}[t]{@{}l@{}}
+x \\
+x \\
+x \\
+x
+\end{tabular}%
+\end{minipage}
+%
+%
+%
+\begin{minipage}[t]{2em}%
+.
+
+x
+
+\begin{tabular}[t]{@{}l@{}}
+x \\
+x
+\end{tabular}%
+
+\prevdepth=.3\baselineskip
+
+x
+\end{minipage}%
+%
+%
+%
+\begin{minipage}[t]{2em}
+.
+
+x
+
+\begin{pseudo*}[hl]
+x \\
+x
+\end{pseudo*}%
+
+x
+\end{minipage}%
+%
+%
+%
+\begin{minipage}[t]{2em}
+.
+
+g
+
+\begin{pseudo*}[hl]
+x \\
+x
+\end{pseudo*}%
+
+x
+\end{minipage}%
+%
+%
+%
+\begin{minipage}[t]{2em}
+.
+
+x
+
+\begin{pseudo*}[hl]
+x \\
+x
+\end{pseudo*}%
+
+A
+\end{minipage}%
+%
+%
+%
+\begin{minipage}[t]{2em}
+.
+
+(x)
+
+\begin{pseudo*}[hl]
+x \\
+x
+\end{pseudo*}%
+
+(x)
+\end{minipage}%
+%
+%
+%
+\begin{minipage}[t]{2em}
+.
+
+\strut x
+
+\begin{pseudo*}[hl]
+x \\
+x
+\end{pseudo*}%
+
+\strut x
+\end{minipage}%
+}
+
\section*{Overlays etc.}
Ignored outside \textsf{beamer}.
@@ -189,6 +334,65 @@ Ignored outside \textsf{beamer}.
baz
\end{pseudo}
+\clearpage
+
+\section*{Boxes and floats; spacing}
+
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
+tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
+
+\begin{tcolorbox}[pseudo/tworuled]
+ Test: $f(x)$
+\end{tcolorbox}
+
+\begin{tcolorbox}[pseudo/tworuled]
+ Foobar
+\end{tcolorbox}
+
+\noindent
+At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd
+gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
+
+\begin{pseudo}
+foo \\
+bar \\
+baz
+\end{pseudo}
+
+\begin{pseudo}
+foo \\
+bar \\
+baz
+\end{pseudo}
+
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
+tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At
+vero eos et accusam et justo duo dolores et ea rebum.
+
+\begin{tcolorbox}[pseudo/filled, float]
+Testing. $x\== y$.
+\end{tcolorbox}
+
+\section*{Extra space}
+
+\begin{pseudo}[indent-mark, extra-space=1.5ex]
+Alpha \\+
+Beta \\+[1cm]
+Gamma
+\end{pseudo}
+
+
+% Should emit three warnings:
+% \pseudoslash
+% \pseudoslash
+% \pseudoslash
+
+% Should emit three warnings:
+% \pseudoeq
+% \pseudoeq
+% \pseudoeq
+
+
% Things that could also be tested:
% begin-tabular
% bol
@@ -200,7 +404,7 @@ Ignored outside \textsf{beamer}.
% preamble
% prefix
% pseudoeq
-% pseudoslash
+% RestorePseudoBackslash
% setup
% setup-append
% setup-prepend
diff --git a/macros/latex/contrib/xpinyin/xpinyin.dtx b/macros/latex/contrib/xpinyin/xpinyin.dtx
index e142fba5ce..31d960cd66 100644
--- a/macros/latex/contrib/xpinyin/xpinyin.dtx
+++ b/macros/latex/contrib/xpinyin/xpinyin.dtx
@@ -167,12 +167,12 @@ Copyright and Licence
%</internal>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\RequirePackage{expl3}
-%<+package>\GetIdInfo$Id: xpinyin.dtx b319ff9 2022-06-04 19:40:35 +0800 Qing Lee <sobenlee@gmail.com> $
+%<+package>\GetIdInfo$Id: xpinyin.dtx dd0cc20 2022-07-14 18:53:49 +0800 Qing Lee <sobenlee@gmail.com> $
%<package> {Automatically add pinyin to Chinese characters}
%<package>\ProvidesExplPackage{\ExplFileName}
-%<package> {\ExplFileDate}{3.0}{\ExplFileDescription}
+%<package> {\ExplFileDate}{3.1}{\ExplFileDescription}
%<database>\ProvidesFile{xpinyin-database.def}%
-%<database> [2022/06/04 v3.0 xpinyin database]
+%<database> [2022/07/14 v3.1 xpinyin database]
%<*driver>
\documentclass{ctxdoc}
\usepackage{xpinyin}
@@ -186,7 +186,7 @@ Copyright and Licence
%</driver>
% \fi
%
-% \CheckSum{690}
+% \CheckSum{695}
% \GetFileId{xpinyin.sty}
%
% \title{\bfseries\pkg{xpinyin} 宏包}
@@ -279,7 +279,7 @@ Copyright and Licence
% 对于多音字,可以使用 \tn{xpinyin} 为其设置拼音;而 \tn{xpinyin*} 相当于
% \env{pinyinscope} 环境的命令形式。\tn{xpinyin} 可以在 \env{pinyinscope} 环境和
% \tn{xpinyin*} 中使用。例如,
-% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.5\linewidth,gobble=5]
+% \begin{SideBySideExample}
% \xpinyin{长}{chang2}\\
% \xpinyin*{甄士隐梦幻识通灵}\\
% \xpinyin*{\xpinyin{重}{zhong4}要}
@@ -291,7 +291,7 @@ Copyright and Licence
% \tn{pinyin} \oarg{options} \Arg{拼音}
% \end{syntax}
% 用于输出拼音,为了输入的方便 \texttt{\"u} 可以用 |v| 代替。例如,
-% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.5\linewidth,gobble=5]
+% \begin{SideBySideExample}
% \pinyin{lv2zi}\\
% \pinyin{nv3hai2zi}
% \end{SideBySideExample}
@@ -422,8 +422,8 @@ Copyright and Licence
% \end{macrocode}
%
% \begin{macrocode}
-\RequirePackage { xparse }
-\RequirePackage { l3keys2e }
+\cs_if_exist:NF \NewDocumentCommand
+ { \RequirePackage { xparse } }
% \end{macrocode}
%
% \begin{variable}{\c_@@_tone_prop}
@@ -1176,7 +1176,12 @@ Copyright and Licence
% \end{macro}
%
% \begin{macrocode}
-\ProcessKeysOptions { xpinyin }
+\cs_if_exist:NTF \ProcessKeyOptions
+ { \ProcessKeyOptions [ xpinyin ] }
+ {
+ \RequirePackage { l3keys2e }
+ \ProcessKeysOptions { xpinyin }
+ }
% \end{macrocode}
%
% \begin{macrocode}
diff --git a/macros/latex/contrib/xpinyin/xpinyin.pdf b/macros/latex/contrib/xpinyin/xpinyin.pdf
index b7037f95bf..2d9870ae51 100644
--- a/macros/latex/contrib/xpinyin/xpinyin.pdf
+++ b/macros/latex/contrib/xpinyin/xpinyin.pdf
Binary files differ
diff --git a/macros/latex/contrib/zhnumber/README.md b/macros/latex/contrib/zhnumber/README.md
index 48cd3d5733..50f1379bd6 100644
--- a/macros/latex/contrib/zhnumber/README.md
+++ b/macros/latex/contrib/zhnumber/README.md
@@ -38,7 +38,7 @@ Issues and pull requests are welcome.
Copyright and Licence
---------------------
- Copyright (C) 2012, 2014-2020 by Qing Lee <sobenlee@gmail.com>
+ Copyright (C) 2012, 2014-2020, 2022 by Qing Lee <sobenlee@gmail.com>
----------------------------------------------------------------------
This work may be distributed and/or modified under the
diff --git a/macros/latex/contrib/zhnumber/zhnumber.dtx b/macros/latex/contrib/zhnumber/zhnumber.dtx
index d5ed4bdd22..6244949bc8 100644
--- a/macros/latex/contrib/zhnumber/zhnumber.dtx
+++ b/macros/latex/contrib/zhnumber/zhnumber.dtx
@@ -44,7 +44,7 @@ Issues and pull requests are welcome.
Copyright and Licence
---------------------
- Copyright (C) 2012, 2014-2020 by Qing Lee <sobenlee@gmail.com>
+ Copyright (C) 2012, 2014-2020, 2022 by Qing Lee <sobenlee@gmail.com>
----------------------------------------------------------------------
This work may be distributed and/or modified under the
@@ -83,7 +83,7 @@ Copyright and Licence
\preamble
- Copyright (C) 2012, 2014-2020 by Qing Lee <sobenlee@gmail.com>
+ Copyright (C) 2012, 2014-2020, 2022 by Qing Lee <sobenlee@gmail.com>
--------------------------------------------------------------------------
This work may be distributed and/or modified under the
@@ -141,7 +141,7 @@ Copyright and Licence
%</internal>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\RequirePackage{expl3}
-%<+package|config>\GetIdInfo$Id: zhnumber.dtx c4664c6 2020-05-01 21:10:24 +0800 Qing Lee <sobenlee@gmail.com> $
+%<+package|config>\GetIdInfo$Id: zhnumber.dtx 5e8c3fe 2022-07-14 18:53:36 +0800 Qing Lee <sobenlee@gmail.com> $
%<package> {Typesetting numbers with Chinese glyphs}
%<config&utf8> {Chinese numerals with UTF8 encoding}
%<config&big5> {Chinese numerals with Big5 encoding}
@@ -150,9 +150,10 @@ Copyright and Licence
%<config&utf8>\ProvidesExplFile{\ExplFileName-utf8.cfg}
%<config&big5>\ProvidesExplFile{\ExplFileName-big5.cfg}
%<config&gbk>\ProvidesExplFile{\ExplFileName-gbk.cfg}
-%<package|config> {\ExplFileDate}{2.8}{\ExplFileDescription}
+%<package|config> {\ExplFileDate}{3.0}{\ExplFileDescription}
%<*driver>
\documentclass{ctxdoc}
+\SideBySideExampleSet{xrightmargin=.6\linewidth}
\begin{document}
\DocInput{\jobname.dtx}
\IndexLayout
@@ -161,7 +162,7 @@ Copyright and Licence
%</driver>
% \fi
%
-% \CheckSum{1189}
+% \CheckSum{1394}
% \GetFileId{zhnumber.sty}
%
% \title{\bfseries\pkg{zhnumber} 宏包}
@@ -181,22 +182,22 @@ Copyright and Licence
%
% \section{使用方法}
%
-% \begin{function}[updated=2014-09-09]{encoding}
+% \begin{function}[updated=2022-07-10]{encoding}
% \begin{syntax}
-% encoding = <GBK|Big5|UTF8>
+% encoding = <GBK|Big5|(UTF8)>
% \end{syntax}
% 用于指定编码的宏包选项,可以在调用宏包的时候设定,也可以用 \tn{zhnumsetup}
% 在导言区内设定。对于 \upLaTeX、\XeLaTeX{} 和 \LuaLaTeX,不用指定编码,宏包将
% 自动使用 |UTF8| 编码。只有 \LaTeX{} 和 \pdfLaTeX{} 需要指定编码,如果没有指定,
-% 默认将使用 |GBK|。
+% 默认也使用 |UTF8|。
% \end{function}
%
-% \begin{function}[rEXP, updated=2014-09-12]{\zhnumber}
+% \begin{function}[EXP, updated=2022-07-10]{\zhnumber}
% \begin{syntax}
% \tn{zhnumber} \Arg{number}
% \end{syntax}
% 以中文格式输出数字。这里的数字可以是整数、小数和分数。例如
-% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.6\linewidth,gobble=5]
+% \begin{SideBySideExample}
% \zhnumber{2012020120}\\
% \zhnumber{2 012 020 120}\\
% \zhnumber{2,012,020,120}\\
@@ -210,126 +211,126 @@ Copyright and Licence
% \end{SideBySideExample}
% \end{function}
%
-% \begin{function}[rEXP, updated=2014-09-09]{\zhdigits}
+% \begin{function}[EXP, updated=2022-07-10]{\zhdigits}
% \begin{syntax}
% \tn{zhdigits} \Arg{number}
% \tn{zhdigits} * \Arg{number}
% \end{syntax}
% 将阿拉伯数字转换为中文数字串。缺省状态下,\tn{zhdigits} 将 0 映射为〇,如果需要
% 将其映射为零,可以使用带星号的形式。例如
-% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.6\linewidth,gobble=5]
+% \begin{SideBySideExample}
% \zhdigits{2012020120}\\
% \zhdigits*{2012020120}
% \end{SideBySideExample}
% \end{function}
%
-% \begin{function}[rEXP, updated=2016-05-01]{\zhnum}
+% \begin{function}[EXP, updated=2022-07-10]{\zhnum}
% \begin{syntax}
% \tn{zhnum} \Arg{counter}
% \tn{pagenumbering} \{zhnum\}
% \end{syntax}
% 与 |\roman| 等类似,用于将 \LaTeX 计数器的值转换为中文数字。例如
-% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.6\linewidth,gobble=5]
+% \begin{SideBySideExample}
% \zhnum{section}
% \end{SideBySideExample}
% \end{function}
%
-% \begin{function}[rEXP, added=2016-05-01]{\zhdig}
+% \begin{function}[EXP, updated=2022-07-10]{\zhdig}
% \begin{syntax}
% \tn{zhdig} \Arg{counter}
% \tn{pagenumbering} \{zhdig\}
% \end{syntax}
% 与 |\roman| 等类似,用于将 \LaTeX 计数器的值转换为中文数字串。例如
-% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.6\linewidth,gobble=5]
+% \begin{SideBySideExample}
% \zhdig{section}
% \end{SideBySideExample}
% \end{function}
%
-% \begin{function}[rEXP, added=2012-05-25]{\zhweekday}
+% \begin{function}[EXP, updated=2022-07-10]{\zhweekday}
% \begin{syntax}
% \tn{zhweekday} \Arg{yyyy/mm/dd}
% \end{syntax}
% 输出日期当天的星期。例如
-% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.6\linewidth,gobble=5]
+% \begin{SideBySideExample}
% \zhweekday{2012/5/20}
% \end{SideBySideExample}
% \end{function}
%
-% \begin{function}[rEXP, added=2012-05-25]{\zhdate}
+% \begin{function}[EXP, updated=2022-07-10]{\zhdate}
% \begin{syntax}
% \tn{zhdate} \Arg{yyyy/mm/dd}
% \tn{zhdate} * \Arg{yyyy/mm/dd}
% \end{syntax}
% 以中文格式输出日期,其中带 |*| 的命令还输出星期。例如
-% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.6\linewidth,gobble=5]
+% \begin{SideBySideExample}
% \zhdate{2012/5/21}\\
% \zhdate*{2012/5/21}
% \end{SideBySideExample}
% \end{function}
%
-% \begin{function}[rEXP, added=2012-05-25]{\zhtoday}
+% \begin{function}[EXP, updated=2022-07-10]{\zhtoday}
% 与 |\today| 类似,以中文输出当天的日期。例如
-% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.6\linewidth,gobble=5]
+% \begin{SideBySideExample}
% \zhtoday
% \end{SideBySideExample}
% \end{function}
%
-% \begin{function}[rEXP, added=2012-05-25]{\zhtime}
+% \begin{function}[EXP, updated=2022-07-10]{\zhtime}
% \begin{syntax}
% \tn{zhtime} \Arg{hh:mm}
% \end{syntax}
% 以中文格式输出时间。例如
-% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.6\linewidth,gobble=5]
+% \begin{SideBySideExample}
% \zhtime{23:56}
% \end{SideBySideExample}
% \end{function}
%
-% \begin{function}[rEXP, added=2012-05-25]{\zhcurrtime}
+% \begin{function}[EXP, updated=2022-07-10]{\zhcurrtime}
% 输出当前的时间。例如
-% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.6\linewidth,gobble=5]
+% \begin{SideBySideExample}
% \zhcurrtime
% \end{SideBySideExample}
% \end{function}
%
-% \begin{function}[rEXP, added=2015-05-20]{\zhtiangan}
+% \begin{function}[EXP, updated=2022-07-10]{\zhtiangan}
% \begin{syntax}
% \tn{zhtiangan} \Arg{number}
% \end{syntax}
% 输出对应的天干计数。\meta{number} 的正常范围是 1--10,超出范围的数字将输出空值。例如
-% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.4\linewidth,gobble=5]
+% \begin{SideBySideExample}[xrightmargin=.4\linewidth]
% \zhtiangan{1} \zhtiangan{2} \zhtiangan{3}
% \zhtiangan{4} \zhtiangan{5} \zhtiangan{10}
% \end{SideBySideExample}
% \end{function}
%
-% \begin{function}[rEXP, added=2015-05-20]{\zhdizhi}
+% \begin{function}[EXP, updated=2022-07-10]{\zhdizhi}
% \begin{syntax}
% \tn{zhdizhi} \Arg{number}
% \end{syntax}
% 输出对应的地支计数。\meta{number} 的正常范围是 1--12,超出范围的数字将输出空值。例如
-% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.4\linewidth,gobble=5]
+% \begin{SideBySideExample}[xrightmargin=.4\linewidth]
% \zhdizhi{1} \zhdizhi{2} \zhdizhi{3}
% \zhdizhi{4} \zhdizhi{5} \zhdizhi{12}
% \end{SideBySideExample}
% \end{function}
%
-% \begin{function}[rEXP, added=2015-05-20]{\zhganzhi}
+% \begin{function}[EXP, updated=2022-07-10]{\zhganzhi}
% \begin{syntax}
% \tn{zhganzhi} \Arg{number}
% \end{syntax}
% 输出对应的干支计数。\meta{number} 的正常范围是 1--60,超出范围的数字将输出空值。例如
-% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.4\linewidth,gobble=5]
+% \begin{SideBySideExample}[xrightmargin=.4\linewidth]
% \zhganzhi{1} \zhganzhi{2} \zhganzhi{3} \\
% \zhganzhi{4} \zhganzhi{5} \zhganzhi{60}
% \end{SideBySideExample}
% \end{function}
%
-% \begin{function}[rEXP, added=2015-05-20]{\zhganzhinian}
+% \begin{function}[EXP, updated=2022-07-10]{\zhganzhinian}
% \begin{syntax}
% \tn{zhganzhinian} \Arg{year}
% \end{syntax}
% 输出公元纪年 \meta{year} 对应的干支纪年。公元前的年份用负数表示。例如
-% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.4\linewidth,gobble=5]
+% \begin{SideBySideExample}[xrightmargin=.4\linewidth]
% \zhganzhinian{1898} \zhganzhinian{-246} \\
% \zhganzhinian{-2697} \zhganzhinian{\year}
% \end{SideBySideExample}
@@ -345,7 +346,7 @@ Copyright and Licence
% 数字大于 $10^{4(n+12)}-1$ 时,统一用 \meta{character} 设置输出数字的进位。
% \end{function}
%
-% \begin{function}{\zhnumsetup}
+% \begin{function}[updated=2022-07-10]{\zhnumsetup}
% \begin{syntax}
% \tn{zhnumsetup} \{<key_1>=<val_1>, <key_2>=<val_2>, ...\}
% \end{syntax}
@@ -359,7 +360,7 @@ Copyright and Licence
% \end{syntax}
% 设置日期和时间的数字格式,\meta{Arabic} 为阿拉伯数字,而 \meta{Chinese} 为中文数字。
% 例如
-% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.6\linewidth,gobble=5]
+% \begin{SideBySideExample}
% \zhnumsetup{time=Chinese}
% \zhtoday\zhcurrtime
% \end{SideBySideExample}
@@ -387,8 +388,8 @@ Copyright and Licence
% \item[Ancient] 以廿输出 20,以卅输出 30,以卌输出 40,以皕输出 200。
% \end{description}
%
-% 可以设置 |style| 为其中一个,也可以是前三个与后两个的适当组合,默认是简体小写。例如
-% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.4\linewidth,gobble=5]
+% 可以设置 |style| 为其中一个,也可以是前两个与后三个的适当组合,默认是简体小写。例如
+% \begin{SideBySideExample}[xrightmargin=.4\linewidth]
% \zhnumsetup{style={Traditional,Financial}}
% \zhnumber{62012.3}\\
% \zhnumsetup{style=Ancient}
@@ -411,7 +412,7 @@ Copyright and Licence
% 天干、地支和干支的数字都有一定范围。若参数大于这个范围,\tn{tiangan} 等将输出空值。
% 可以将本选项设置为 |true|,对超出范围的数字取相应的模。
% 请注意,数字 |0| 的结果总是为空值。例如
-% \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.3\linewidth,gobble=5]
+% \begin{SideBySideExample}[xrightmargin=.3\linewidth]
% \zhnumsetup{ganzhi-cyclic}
% \zhtiangan{11} \zhtiangan{12} \zhtiangan{209}
% \zhtiangan{-1} \zhtiangan{-2} \zhtiangan{-683} \\
@@ -422,9 +423,8 @@ Copyright and Licence
% \end{SideBySideExample}
% \end{function}
%
-%\bigskip
% \pkg{zhnumber} 提供下列选项来控制阿拉伯数字的中文映射。
-% \begin{verbatim}[frame=single]
+% \begin{frameverb}
% - -0 0 1 2 3 4 5 6 7 8 9 10 20 30 40 100 200 1000
% E2 E3 E4 E8 E12 E16 E20 E24 E28 E32 E36 E40 E44
% F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F100 F1000 FE2 FE3
@@ -433,18 +433,18 @@ Copyright and Licence
% GZ1 GZ2 GZ3 GZ4 GZ5 GZ6 GZ7 GZ8 GZ9 GZ10 ... GZ60
% dot and parts
% year month day hour minute weekday mon tue wed thu fri sat sun
-% \end{verbatim}
+% \end{frameverb}
% 其中 |-| 设置负,|-0| 设置〇,|dot| 设置小数的点,|and| 和 |parts| 分别设置分数
% 的“又”和“分之”,|E|$n$ 设置 $10^n$,|F|$n$ 设置数字 $n$ 的大写,|T|$n$ 设置
% 数字 $n$ 的天干,|D|$n$ 设置数字 $n$ 的地支,而 |GZ|$n$ 设置数字 $n$ 的干支。
% 其他的选项同字面意思,不再赘述。例如
-% \begin{verbatim}[frame=single]
+% \begin{frameverb}
% \zhnumsetup{2={两}}
-% \end{verbatim}
+% \end{frameverb}
% 可以将 2 映射成两。需要说明的是,\pkg{zhnumber} 将优先使用这里的设置,所以可能会影响
% 到 |style| 选项。如果要恢复 |style| 的功能,可以使用 |reset| 选项。
%
-% \begin{function}[updated=2014-09-12]{reset}
+% \begin{function}[updated=2022-07-10]{reset}
% \begin{syntax}
% reset
% \end{syntax}
@@ -463,7 +463,7 @@ Copyright and Licence
% 才会有效果。
% \end{function}
%
-% \begin{function}[updated=2016-05-01]{\zhnumber,\zhdigits,\zhnum,\zhdig}
+% \begin{function}[updated=2022-07-10]{\zhnumber,\zhdigits,\zhnum,\zhdig}
% \begin{syntax}
% \tn{zhnumber} \oarg{options} \Arg{number}
% \tn{zhdigits} * \oarg{options} \Arg{number}
@@ -504,16 +504,65 @@ Copyright and Licence
% \end{macrocode}
%
% \begin{macrocode}
-\RequirePackage { xparse , l3keys2e }
+\cs_if_exist:NF \NewDocumentCommand
+ { \RequirePackage { xparse } }
+% \end{macrocode}
+%
+% \begin{macro}{\zhnum_output:n,\zhnum_expand_wrap:wn}
+% 受益于 \tn{tex_expanded:D},我们使用如下的结构简单实现 |f| 展开。
+% \begin{verbatim}
+% \exp_not:e
+% {
+% ...
+% \exp_not:o { <tl_var> }
+% ...
+% \exp_not:o { <tl_var> }
+% ...
+% \exp_not:o { <tl_var> }
+% ...
+% }
+% \end{verbatim}
+% 并且可以将 \tn{zhnumber} 等无风险地使用于诸如 \tn{edef} 定义等完全展开的场合。
+% 从 \TeXLive\ 2019 开始,各个主要引擎都已经支持 \tn{tex_expanded:D},
+% 对于较早的版本,\LaTeXiii\ 也实现了一个模拟。
+% \begin{macrocode}
+\cs_new:Npn \zhnum_output:n #1
+ { \exp_args:Nc \zhnum_exp_not:o { l_@@_ #1 _tl } }
+\cs_new_protected:Npn \zhnum_expand_wrap:wn #1#
+ { \@@_expand_wrap_aux:nn {#1} }
+\cs_new_protected:Npn \@@_expand_wrap_aux:nn #1#2
+ { #1 { \exp_not:e {#2} } }
+\cs_new_eq:NN \zhnum_exp_not:e \exp_not:e
+\cs_new_eq:NN \zhnum_exp_not:o \exp_not:o
% \end{macrocode}
+% 但这种方式也有一定的缺点,比如在 \pdfTeX\ 引擎下,\pkg{hyperref} 包的
+% \tn{pdfstringdef} 就需要把汉字首字节的活动字符展开,
+% 并作适当的重定义后才能得到预期的结果。为此,我们定义一个清除命令,不使用以上机制。
+% \begin{macrocode}
+\cs_new_protected:Npn \zhnumClearWrapper
+ {
+ \cs_set_eq:NN \zhnum_exp_not:e \use:n
+ \cs_set_eq:NN \zhnum_exp_not:o \use:n
+ }
+\cs_new_protected:Npn \zhnumResetWrapper
+ {
+ \cs_set_eq:NN \zhnum_exp_not:e \exp_not:e
+ \cs_set_eq:NN \zhnum_exp_not:o \exp_not:o
+ }
+\hook_gput_code:nnn { package/CJKutf8/after } { zhnumber }
+ { \g@addto@macro \pdfstringdefPreHook { \zhnumClearWrapper } }
+\hook_gput_code:nnn { package/xCJK2uni/after } { zhnumber }
+ { \g@addto@macro \pdfstringdefPreHook { \zhnumClearWrapper } }
+% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\zhnumber}
% 用于将输入的数字按照中文格式输出。
% \begin{macrocode}
-\DeclareExpandableDocumentCommand \zhnumber { +o +m }
+\NewExpandableDocumentCommand \zhnumber { +o +m }
{
- \IfNoValueTF {#1}
- { \zhnum_number:f }
+ \tl_if_novalue:nTF {#1}
+ { \zhnum_number:e }
{ \zhnumberwithoptions {#1} }
{#2}
}
@@ -526,8 +575,8 @@ Copyright and Licence
\NewDocumentCommand \zhnumberwithoptions { +m +m }
{
\group_begin:
- \keys_set:nn { zhnum / options } {#1}
- \zhnum_number:f {#2}
+ \zhnum_set:n {#1}
+ \zhnum_number:e {#2}
\group_end:
}
% \end{macrocode}
@@ -537,6 +586,7 @@ Copyright and Licence
% \begin{macro}{\@@_number:www}
% 先判断输入的是小数还是分数。
% \begin{macrocode}
+\zhnum_expand_wrap:wn
\cs_new:Npn \zhnum_number:n #1
{ \@@_number:www #1 . \q_nil . \q_stop }
\cs_new:Npn \@@_number:www #1 . #2 . #3 \q_stop
@@ -545,7 +595,7 @@ Copyright and Licence
{ \@@_integer_or_fraction:www #1 / \q_nil / \q_stop }
{ \zhnum_decimal:nn {#1} {#2} }
}
-\cs_generate_variant:Nn \zhnum_number:n { f }
+\cs_generate_variant:Nn \zhnum_number:n { e }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -570,17 +620,17 @@ Copyright and Licence
\quark_if_nil:nTF {#3}
{
\zhnum_blank_to_zero:n {#1}
- \c_@@_parts_tl
+ \zhnum_output:n { parts }
\zhnum_blank_to_zero:n {#2}
}
{
\tl_if_blank:nF {#2}
{
\zhnum_number:n {#2}
- \c_@@_and_tl
+ \zhnum_output:n { and }
}
\zhnum_blank_to_zero:n {#1}
- \c_@@_parts_tl
+ \zhnum_output:n { parts }
\zhnum_blank_to_zero:n {#3}
}
}
@@ -592,9 +642,10 @@ Copyright and Licence
% \begin{macrocode}
\cs_new:Npn \zhnum_decimal:nn #1#2
{
- \zhnum_blank_to_zero:n {#1} \c_@@_dot_tl
+ \zhnum_blank_to_zero:n {#1}
+ \zhnum_output:n { dot }
\tl_if_blank:nTF {#2}
- { \c_@@_zero_tl }
+ { \zhnum_output:n { 0 } }
{ \zhnum_digits_zero:n {#2} }
}
% \end{macrocode}
@@ -606,7 +657,7 @@ Copyright and Licence
\cs_new:Npn \zhnum_blank_to_zero:n #1
{
\tl_if_blank:nTF {#1}
- { \c_@@_zero_tl }
+ { \zhnum_output:n { 0 } }
{ \zhnum_number:n {#1} }
}
% \end{macrocode}
@@ -615,9 +666,9 @@ Copyright and Licence
% \begin{macro}{\zhnum,\zhnumberwithoptions}
% 用于将 \LaTeX{} 计数器按中文格式输出。
% \begin{macrocode}
-\DeclareExpandableDocumentCommand \zhnum { +o +m }
+\NewExpandableDocumentCommand \zhnum { +o +m }
{
- \IfNoValueTF {#1}
+ \tl_if_novalue:nTF {#1}
{ \zhnum_counter:n }
{ \zhnumwithoptions {#1} }
{#2}
@@ -625,7 +676,7 @@ Copyright and Licence
\NewDocumentCommand \zhnumwithoptions { +m +m }
{
\group_begin:
- \keys_set:nn { zhnum / options } {#1}
+ \zhnum_set:n {#1}
\zhnum_counter:n {#2}
\group_end:
}
@@ -645,6 +696,7 @@ Copyright and Licence
{ \msg_expandable_error:nnn { zhnumber } { not-counter } {#1} }
\msg_new:nnn { zhnumber } { not-counter }
{ `#1'~is~not~a~LaTeX~counter. }
+\zhnum_expand_wrap:wn
\cs_new:Npn \zhnum_int:n #1
{
\int_compare:nNnTF {#1} > \c_zero_int
@@ -652,10 +704,10 @@ Copyright and Licence
{
\int_compare:nNnTF {#1} < \c_zero_int
{
- \c_@@_minus_tl
+ \zhnum_output:n { minus }
\zhnum_parse_number:f { \int_eval:n { - #1 } }
}
- { \c_@@_zero_tl }
+ { \zhnum_output:n { 0 } }
}
}
% \end{macrocode}
@@ -735,10 +787,10 @@ Copyright and Licence
\cs_new:Npn \@@_read_integer:www #1 ; #2 ; #3 ;
{
\int_compare:nNnTF {#2} = \c_zero_int
- { \c_@@_zero_tl }
+ { \zhnum_output:n { 0 } }
{
\int_compare:nNnF {#1} = \c_one_int
- { \c_@@_minus_tl }
+ { \zhnum_output:n { minus } }
\zhnum_parse_number:nn {#2} {#3}
}
}
@@ -772,7 +824,7 @@ Copyright and Licence
\cs_new:Npn \@@_parse_number:nnn #1#2
{
\int_compare:nNnTF {#2} < 2
- { \zhnum_digit_map:n }
+ { \zhnum_output:n }
{
\int_compare:nNnTF {#1} = \c_zero_int
{ \zhnum_split_number:fn { \int_eval:n { #2 / 4 - 1 } } }
@@ -823,7 +875,7 @@ Copyright and Licence
\int_compare:nNnTF { #4#5#6#7 } = \c_zero_int
{ \use_i:nn }
{
- \bool_if:NF #1 { \c_@@_zero_tl }
+ \bool_if:NF #1 { \zhnum_output:n { 0 } }
\zhnum_process_number:NNNNNN #4#5#6#7#1#2
\zhnum_scale_map:n {#3}
\int_compare:nNnTF {#7} = \c_zero_int
@@ -842,37 +894,52 @@ Copyright and Licence
\cs_new:Npn \zhnum_process_number:NNNNNN #1#2#3#4#5#6
{
\int_compare:nNnTF {#1} = \c_zero_int
- { \bool_if:NF #6 { \c_@@_zero_tl } }
- { \zhnum_digit_map:n {#1} \c_@@_thousand_tl }
+ {
+ \bool_if:NF #6
+ { \zhnum_output:n { 0 } }
+ }
+ {
+ \zhnum_output:n {#1}
+ \zhnum_output:n { 1000 }
+ }
\int_compare:nNnTF {#2} = \c_zero_int
- { \int_compare:nNnF { #1 * (#3#4) } = \c_zero_int { \c_@@_zero_tl } }
{
- \bool_lazy_and:nnTF
- { \l_@@_ancient_bool }
- { \int_compare_p:nNn {#2} = 2 }
- { \zhnum_digit_map:n { #2 00 } }
- { \zhnum_digit_map:n {#2} \c_@@_hundred_tl }
+ \int_compare:nNnF { #1 * (#3#4) } = \c_zero_int
+ { \zhnum_output:n { 0 } }
+ }
+ {
+ \int_compare:nNnTF {#2} = 2
+ { \zhnum_output:n { 200 } }
+ {
+ \zhnum_output:n {#2}
+ \zhnum_output:n { 100 }
+ }
}
\int_compare:nNnTF {#3} = \c_zero_int
- { \int_compare:nNnF { #2 * #4 } = \c_zero_int { \c_@@_zero_tl } }
{
- \bool_lazy_all:nF
+ \int_compare:nNnF { #2 * #4 } = \c_zero_int
+ { \zhnum_output:n { 0 } }
+ }
+ {
+ \bool_lazy_all:nTF
{
{ \int_compare_p:nNn {#3} = \c_one_int }
{ \int_compare_p:nNn {#1#2} = \c_zero_int }
{#6}
{#5}
}
+ { \zhnum_output:n { 10 } }
{
- \bool_lazy_and:nnTF
- { \l_@@_ancient_bool }
- { \int_compare_p:n { 1 < #3 < 5 } }
- { \zhnum_digit_map:n { #3 0 } \use_none:n }
- { \zhnum_digit_map:n {#3} }
+ \int_compare:nTF { 1 < #3 < 5 }
+ { \zhnum_output:n { #3 0 } }
+ {
+ \zhnum_output:n {#3}
+ \zhnum_output:n { 10 }
+ }
}
- \c_@@_ten_tl
}
- \int_compare:nNnF {#4} = \c_zero_int { \zhnum_digit_map:n {#4} }
+ \int_compare:nNnF {#4} = \c_zero_int
+ { \zhnum_output:n {#4} }
}
% \end{macrocode}
% \end{macro}
@@ -880,9 +947,9 @@ Copyright and Licence
% \begin{macro}{\zhdig}
% 用于将 \LaTeX{} 计数器按中文数字串输出。
% \begin{macrocode}
-\DeclareExpandableDocumentCommand \zhdig { +o +m }
+\NewExpandableDocumentCommand \zhdig { +o +m }
{
- \IfNoValueTF {#1}
+ \tl_if_novalue:nTF {#1}
{ \zhnum_digits_counter:n }
{ \zhdigwithoptions {#1} }
{#2}
@@ -890,7 +957,7 @@ Copyright and Licence
\NewDocumentCommand \zhdigwithoptions { +m +m }
{
\group_begin:
- \keys_set:nn { zhnum / options } {#1}
+ \zhnum_set:n {#1}
\zhnum_digits_counter:n #1 {#2}
\group_end:
}
@@ -906,25 +973,26 @@ Copyright and Licence
% \begin{macro}[int]{\@zhdig}
% 用于支持 |\pagenumbering{zhdig}|。
% \begin{macrocode}
-\cs_new:Npn \@zhdig #1 { \zhnum_digits_null:f { \int_eval:n {#1} } }
+\cs_new:Npn \@zhdig #1
+ { \zhnum_digits_null:f { \int_eval:n {#1} } }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\zhdigits,\zhdigitswithoptions}
% 将输入的数字输出为中文数字串输出。
% \begin{macrocode}
-\DeclareExpandableDocumentCommand \zhdigits { +s +o +m }
+\NewExpandableDocumentCommand \zhdigits { +s +o +m }
{
- \IfNoValueTF {#2}
- { \zhnum_digits:Nn #1 }
+ \tl_if_novalue:nTF {#2}
+ { \zhnum_digits:Ne #1 }
{ \zhdigitswithoptions {#1} {#2} }
{#3}
}
\NewDocumentCommand \zhdigitswithoptions { +m +m +m }
{
\group_begin:
- \keys_set:nn { zhnum / options } {#2}
- \zhnum_digits:Nn #1 {#3}
+ \zhnum_set:n {#2}
+ \zhnum_digits:Ne #1 {#3}
\group_end:
}
% \end{macrocode}
@@ -934,16 +1002,17 @@ Copyright and Licence
% 快捷方式。
% \begin{macrocode}
\cs_new:Npn \zhnum_digits_zero:n
- { \zhnum_digits:Nn \BooleanTrue }
+ { \zhnum_digits:Nn \c_true_bool }
\cs_new:Npn \zhnum_digits_null:n
- { \zhnum_digits:Nn \BooleanFalse }
-\cs_generate_variant:Nn \zhnum_digits_null:n { V , v , f }
+ { \zhnum_digits:Nn \c_false_bool }
+\cs_generate_variant:Nn \zhnum_digits_null:n { v , f }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}[int]{\zhnum_digits:Nn}
% 与 \cs{zhnum_integer:n} 类似,但不用去掉多余的零。
% \begin{macrocode}
+\zhnum_expand_wrap:wn
\cs_new:Npn \zhnum_digits:Nn #1#2
{
\exp_after:wN \@@_read_digits:w
@@ -970,7 +1039,8 @@ Copyright and Licence
{ \@@_output_digits:NN #1#2 }
{
\quark_if_recursion_tail_stop:N #2
- \if:w .\exp_not:N #2 \exp_after:wN \c_@@_dot_tl \fi:
+ \token_if_eq_charcode:NNT #2 .
+ { \zhnum_output:n { dot } }
}
\exp_after:wN \@@_read_digits_loop:NN \exp_after:wN #1
\exp:w \exp_end_continue_f:w \use:n
@@ -978,31 +1048,30 @@ Copyright and Licence
\cs_new:Npn \@@_read_digits:w #1 ;
{
\int_compare:nNnF {#1} = \c_one_int
- { \c_@@_minus_tl }
+ { \zhnum_output:n { minus } }
}
\cs_new:Npn \@@_output_digits:NN #1#2
{
- \cs:w
- c_@@_
+ \zhnum_output:n
+ {
\if_int_compare:w #2 = \c_zero_int
- \IfBooleanTF #1 { zero } { null }
+ \bool_if:NTF #1 { zero } { null }
\else:
#2
\fi:
- _tl
- \cs_end:
+ }
}
+\cs_generate_variant:Nn \zhnum_digits:Nn { Ne }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\zhdate}
% 输出中文日期。
% \begin{macrocode}
-\DeclareExpandableDocumentCommand \zhdate { +s +m }
+\NewExpandableDocumentCommand \zhdate { +s +m }
{
\@@_date:www #2 \q_stop
- \IfBooleanT #1
- { \@@_week_day:www #2 \q_stop }
+ \bool_if:NT #1 { \@@_week_day:www #2 \q_stop }
}
\cs_new:Npn \@@_date:www #1/#2/#3 \q_stop
{ \@@_date_aux:nnn {#1} {#2} {#3} }
@@ -1013,7 +1082,12 @@ Copyright and Licence
% 输出当天日期。
% \begin{macrocode}
\cs_new:Npn \zhtoday
- { \@@_date_aux:Vnn \tex_year:D \tex_month:D \tex_day:D }
+ {
+ \@@_date_aux:nnn
+ { \int_value:w \tex_year:D }
+ { \tex_month:D }
+ { \tex_day:D }
+ }
% \end{macrocode}
% \end{macro}
%
@@ -1025,15 +1099,15 @@ Copyright and Licence
{ \@@_date_aux:NNnnnn \zhnum_digits_null:n \zhnum_int:n { } }
{ \@@_date_aux:Nnnnn \int_to_arabic:n { \l_@@_arabic_sep_tl } }
}
-\cs_new:Npn \@@_date_aux:Nnnnn #1
- { \@@_date_aux:NNnnnn #1#1 }
+\cs_new:Npn \@@_date_aux:Nnnnn #1#2
+ { \@@_date_aux:NNnnnn #1#1 { \zhnum_exp_not:o {#2} } }
+\zhnum_expand_wrap:wn
\cs_new:Npn \@@_date_aux:NNnnnn #1#2#3#4#5#6
{
- #1 {#4} #3 \c_@@_year_tl #3
- #2 {#5} #3 \c_@@_month_tl #3
- #2 {#6} #3 \c_@@_day_tl
+ #1 {#4} #3 \zhnum_output:n { year } #3
+ #2 {#5} #3 \zhnum_output:n { month } #3
+ #2 {#6} #3 \zhnum_output:n { day }
}
-\cs_generate_variant:Nn \@@_date_aux:nnn { V }
% \end{macrocode}
% \end{macro}
%
@@ -1048,16 +1122,17 @@ Copyright and Licence
% \begin{macro}{\@@_week_day:www}
% 用 Zeller 公式计算的结果 $h$ 与实际星期的关系是 $d=h+5\pmod7+1$。
% \begin{macrocode}
+\zhnum_expand_wrap:wn
\cs_new:Npn \@@_week_day:www #1/#2/#3 \q_stop
{
\if_case:w \zhnum_Zeller:nnn {#1} {#2} {#3} \exp_stop_f:
- \c_@@_sat_tl
- \or: \c_@@_sun_tl
- \or: \c_@@_mon_tl
- \or: \c_@@_tue_tl
- \or: \c_@@_wed_tl
- \or: \c_@@_thu_tl
- \or: \c_@@_fri_tl
+ \zhnum_output:n { sat }
+ \or: \zhnum_output:n { sun }
+ \or: \zhnum_output:n { mon }
+ \or: \zhnum_output:n { tue }
+ \or: \zhnum_output:n { wed }
+ \or: \zhnum_output:n { thu }
+ \or: \zhnum_output:n { fri }
\fi:
}
% \end{macrocode}
@@ -1139,11 +1214,13 @@ Copyright and Licence
% \begin{macro}{\zhtime}
% 输出时间。
% \begin{macrocode}
+\zhnum_expand_wrap:wn
\cs_new:Npn \zhtime #1
{ \@@_time:ww #1 \q_stop }
-\use:x
+\use:e
{
- \cs_new:Npn \exp_not:N \@@_time:ww ##1 \c_colon_str ##2 \exp_not:N \q_stop
+ \cs_new:Npn \exp_not:N \@@_time:ww
+ #1 \c_colon_str #2 \exp_not:N \q_stop
}
{ \@@_time_aux:nn {#1} {#2} }
% \end{macrocode}
@@ -1152,6 +1229,7 @@ Copyright and Licence
% \begin{macro}{\zhcurrtime}
% 输出当前时间。
% \begin{macrocode}
+\zhnum_expand_wrap:wn
\cs_new:Npn \zhcurrtime
{
\@@_time_aux:nn
@@ -1171,26 +1249,19 @@ Copyright and Licence
}
\cs_new:Npn \@@_time_aux:Nnnn #1#2#3#4
{
- #1 {#3} #2 \c_@@_hour_tl #2
- #1 {#4} #2 \c_@@_minute_tl
+ #1 {#3} #2 \zhnum_output:n { hour } #2
+ #1 {#4} #2 \zhnum_output:n { minute }
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\zhnum_digit_map:n}
-% 阿拉伯数字与中文数字的映射。
-% \begin{macrocode}
-\cs_new:Npn \zhnum_digit_map:n #1
- { \use:c { c_@@_ #1 _tl } }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}[int]{\zhnum_scale_map:n,\zhnum_scale_map_loop:n}
% 大数系统的映射。
% \begin{macrocode}
\cs_new:Npn \zhnum_scale_map:n #1
{
- \cs_if_exist_use:cF { c_@@_s #1 _tl }
+ \tl_if_exist:cTF { l_@@_s #1 _tl }
+ { \zhnum_output:n { s #1 } }
{ \zhnum_scale_map_hook:n {#1} }
}
\cs_new:Npn \zhnum_scale_map_loop:n #1
@@ -1199,7 +1270,7 @@ Copyright and Licence
\int_new:N \l_@@_scale_int
\int_set:Nn \l_@@_scale_int { 11 }
\cs_new_eq:NN \zhnum_scale_map_hook:n \zhnum_scale_map_loop:n
-\tl_const:cn { c_@@_s0_tl } { }
+\tl_new:c { l_@@_s 0 _tl }
% \end{macrocode}
% \end{macro}
%
@@ -1208,9 +1279,9 @@ Copyright and Licence
% \begin{macrocode}
\NewDocumentCommand \zhnumExtendScaleMap { > { \TrimSpaces } +o +m }
{
- \int_zero:N \l_tmpa_int
+ \int_zero:N \l_@@_tmp_int
\clist_map_function:nN {#2} \zhnum_set_scale:n
- \IfNoValueF {#1}
+ \tl_if_novalue:nF {#1}
{ \cs_set:Npn \zhnum_scale_map_hook:n ##1 {#1} }
}
% \end{macrocode}
@@ -1220,23 +1291,35 @@ Copyright and Licence
% \begin{macrocode}
\cs_new_protected:Npn \zhnum_set_scale:n #1
{
- \int_incr:N \l_tmpa_int
- \tl_set:Nx \l_tmpa_tl
- { c_@@_s \int_eval:n { \l_tmpa_int + 11 } _tl }
- \tl_if_exist:cF { \l_tmpa_tl }
- { \int_incr:N \l_@@_scale_int }
- \tl_set:cn { \l_tmpa_tl } {#1}
+ \int_incr:N \l_@@_tmp_int
+ \exp_args:Nc \@@_set_scale:Nn
+ { l_@@_s \int_eval:n { \l_@@_tmp_int + 11 } _tl }
+ {#1}
}
+\cs_new_protected:Npn \@@_set_scale:Nn #1
+ {
+ \tl_if_exist:NF #1
+ {
+ \tl_new:N #1
+ \int_incr:N \l_@@_scale_int
+ }
+ \tl_set:Nn #1
+ }
+\int_new:N \l_@@_tmp_int
% \end{macrocode}
% \end{macro}
%
% \begin{macro}[int]{\zhnum_ganzhi_normal:nnn}
% 保证干支的参数为正数。
% \begin{macrocode}
+\zhnum_expand_wrap:wn
\cs_new:Npn \zhnum_ganzhi_normal:nnn #1#2#3
{
\int_compare:nNnF {#1} < \c_one_int
- { \cs_if_exist_use:c { c_@@_ #2 _ #1 _tl } }
+ {
+ \cs_if_free:cF { l_@@_ #2 _ #1 _tl }
+ { \zhnum_output:n { #2 _ #1 } }
+ }
}
% \end{macrocode}
% \end{macro}
@@ -1245,11 +1328,13 @@ Copyright and Licence
% \begin{macro}{\@@_ganzhi_cyclic_mod:nnnn}
% 对超出范围的数字取模,参数 |0| 的结果是空值。
% \begin{macrocode}
+\zhnum_expand_wrap:wn
\cs_new:Npn \zhnum_ganzhi_cyclic:nnn #1#2#3
{
\int_compare:nNnF {#1} = \c_zero_int
{
- \cs_if_exist_use:cF { c_@@_ #2 _ #1 _tl }
+ \tl_if_exist:cTF { l_@@_ #2 _ #1 _tl }
+ { \zhnum_output:n { #2 _ #1 } }
{
\@@_ganzhi_cyclic_mod:fnnn
{ \int_mod:nn {#1} {#3} } {#1} {#2} {#3}
@@ -1259,11 +1344,11 @@ Copyright and Licence
\cs_new:Npn \@@_ganzhi_cyclic_mod:nnnn #1#2#3#4
{
\int_compare:nNnTF {#2} > \c_zero_int
- { \use:c { c_@@_ #3 _ #1 _tl } }
+ { \zhnum_output:n { #3 _ #1 } }
{
\int_compare:nNnTF {#1} = \c_zero_int
- { \use:c { c_@@_ #3 _ 1 _tl } }
- { \use:c { c_@@_ #3 _ \int_eval:n { #1 + #4 + 1 } _tl } }
+ { \zhnum_output:n { #3 _ 1 } }
+ { \zhnum_output:n { #3 _ \int_eval:n { #1 + #4 + 1 } } }
}
}
\cs_generate_variant:Nn \@@_ganzhi_cyclic_mod:nnnn { f }
@@ -1314,18 +1399,18 @@ Copyright and Licence
% \begin{macro}[int]{\zhnum_ganzhi_nian:n}
% 干支纪年。公元元年是 |\zhganzhi{58}|。
% \begin{macrocode}
+\zhnum_expand_wrap:wn
\cs_new:Npn \zhnum_ganzhi_nian:n #1
{
\int_compare:nNnTF {#1} > \c_zero_int
- { \use:c { c_@@_ganzhi_ \int_mod:nn { #1 + 57 } { 60 } _tl } }
+ { \zhnum_output:n { ganzhi_ \int_mod:nn { #1 + 57 } { 60 } } }
{
\int_compare:nNnF {#1} = \c_zero_int
{
- \use:c
+ \zhnum_output:n
{
- c_@@_ganzhi_
- \int_eval:n { \int_mod:nn { #1 - 2 } { 60 } + 60 }
- _tl
+ ganzhi_ \int_eval:n
+ { \int_mod:nn { #1 - 2 } { 60 } + 60 }
}
}
}
@@ -1336,67 +1421,101 @@ Copyright and Licence
%
% 根据需要设置中文阿拉伯数字。
% \begin{macrocode}
+\tl_new:N \l_@@_kv_tl
+\tl_new:N \l_@@_tmp_tl
\group_begin:
- \tl_set:Nn \l_tmpa_tl
- {
- - .tl_set:N = \l_@@_minus_tl ,
- -0 .tl_set:N = \l_@@_null_tl ,
- }
- \tl_put_right:Nx \l_tmpa_tl
- {
- E2 .tl_set:N = \exp_not:c { l_@@_ 100 _tl } ,
- E3 .tl_set:N = \exp_not:c { l_@@_ 1000 _tl } ,
- FE2 .tl_set:N = \exp_not:c { l_@@_financial_ 100 _tl } ,
- FE3 .tl_set:N = \exp_not:c { l_@@_financial_ 1000 _tl } ,
- D11 .tl_set:N = \exp_not:c { l_@@_dizhi_ 11 _tl } ,
- D12 .tl_set:N = \exp_not:c { l_@@_dizhi_ 12 _tl } ,
- E44 .tl_set:N = \exp_not:c { l_@@_ s11 _tl } ,
- }
+ \tl_build_begin:N \l_@@_kv_tl
\int_step_inline:nn { 10 }
{
- \tl_put_right:Nx \l_tmpa_tl
+ \tl_new:c { l_@@_ #1 _tl }
+ \tl_build_put_right:Nx \l_@@_kv_tl
{
- #1 .tl_set:N = \exp_not:c { l_@@_ #1 _tl } ,
+ #1 .tl_set:N = \exp_not:c { l_@@_normal_ #1 _tl } ,
F#1 .tl_set:N = \exp_not:c { l_@@_financial_ #1 _tl } ,
- T#1 .tl_set:N = \exp_not:c { l_@@_tiangan_ #1 _tl } ,
- D#1 .tl_set:N = \exp_not:c { l_@@_dizhi_ #1 _tl } ,
- GZ#1 .tl_set:N = \exp_not:c { l_@@_ganzhi_ #1 _tl } ,
E \int_eval:n { #1 * 4 }
.tl_set:N = \exp_not:c { l_@@_ s#1 _tl } ,
}
}
- \int_step_inline:nnn { 11 } { 60 }
- {
- \tl_put_right:Nx \l_tmpa_tl
- { GZ#1 .tl_set:N = \exp_not:c { l_@@_ganzhi_ #1 _tl } , }
- }
\clist_map_inline:nn { 0 , 100 , 1000 }
{
- \tl_put_right:Nx \l_tmpa_tl
+ \tl_new:c { l_@@_ #1 _tl }
+ \tl_build_put_right:Nx \l_@@_kv_tl
{
- #1 .tl_set:N = \exp_not:c { l_@@_ #1 _tl } ,
+ #1 .tl_set:N = \exp_not:c { l_@@_normal_ #1 _tl } ,
F#1 .tl_set:N = \exp_not:c { l_@@_financial_ #1 _tl } ,
}
}
- \clist_map_inline:nn { 20 , 30 , 40 , 200 }
+ \clist_map_inline:nn
+ {
+ 20 , 30 , 40 , 200 ,
+ dot , and , parts , year , month , day , hour , minute
+ }
{
- \tl_put_right:Nx \l_tmpa_tl
+ \tl_build_put_right:Nx \l_@@_kv_tl
{ #1 .tl_set:N = \exp_not:c { l_@@_ #1 _tl } , }
}
+ \tl_build_put_right:Nx \l_@@_kv_tl
+ {
+ - .tl_set:N = \exp_not:N \l_@@_minus_tl ,
+ -0 .tl_set:N = \exp_not:N \l_@@_null_tl ,
+ E2 .tl_set:N = \exp_not:c { l_@@_normal_ 100 _tl } ,
+ E3 .tl_set:N = \exp_not:c { l_@@_normal_ 1000 _tl } ,
+ FE2 .tl_set:N = \exp_not:c { l_@@_financial_ 100 _tl } ,
+ FE3 .tl_set:N = \exp_not:c { l_@@_financial_ 1000 _tl } ,
+ E44 .tl_set:N = \exp_not:c { l_@@_ s11 _tl }
+ }
+ \tl_build_get:NN \l_@@_kv_tl \l_@@_tmp_tl
+ \cs_set:Npn \@@_tmp:w #1 . #2 \q_stop
+ { , #1 .groups:n = { user } }
+ \clist_map_inline:Nn \l_@@_tmp_tl
+ {
+ \tl_build_put_right:Nx \l_@@_kv_tl
+ { \@@_tmp:w #1 \q_stop }
+ }
+ \tl_build_put_right:Nn \l_@@_kv_tl
+ {
+ ,
+ weekday .tl_set:N = \l_@@_weekday_tl ,
+ weekday .groups:n = { user , pre , weekday } ,
+ }
\clist_map_inline:nn
+ { mon , tue , wed , thu , fri , sat , sun }
{
- dot , and , parts , year , month , day , weekday , hour , minute
- mon , tue , wed , thu , fri , sat , sun
+ \tl_build_put_right:Nx \l_@@_kv_tl
+ {
+ #1 .tl_set:N = \exp_not:c { l_@@_ #1 _tl } ,
+ #1 .groups:n = { user , pos , day } ,
+ }
}
+ \int_step_inline:nn { 10 }
{
- \tl_put_right:Nx \l_tmpa_tl
- { #1 .tl_set:N = \exp_not:c { l_@@_ #1 _tl } , }
+ \tl_build_put_right:Nx \l_@@_kv_tl
+ {
+ T#1 .tl_set:N = \exp_not:c { l_@@_ganzhi_ #1 _tl } ,
+ T#1 .groups:n = { user , pre , tiandi } ,
+ }
}
-\use:x
- {
- \group_end:
- \keys_define:nn { zhnum / options } { \exp_not:o \l_tmpa_tl }
- }
+ \int_step_inline:nn { 12 }
+ {
+ \tl_build_put_right:Nx \l_@@_kv_tl
+ {
+ D#1 .tl_set:N = \exp_not:c { l_@@_dizhi_ #1 _tl } ,
+ D#1 .groups:n = { user , pre , tiandi } ,
+ }
+ }
+ \int_step_inline:nn { 60 }
+ {
+ \tl_build_put_right:Nx \l_@@_kv_tl
+ {
+ GZ#1 .tl_set:N = \exp_not:c { l_@@_ganzhi_ #1 _tl } ,
+ GZ#1 .groups:n = { user , pos , ganzhi } ,
+ }
+ }
+ \tl_build_end:N \l_@@_kv_tl
+ \exp_args:NNno \group_end:
+\keys_define:nn
+ { zhnum / options }
+ { \l_@@_kv_tl }
% \end{macrocode}
%
% \begin{macro}[int]
@@ -1417,24 +1536,24 @@ Copyright and Licence
% }
% 将配置文件中的中文数字保存到 \texttt{prop} 变量中。
% \begin{macrocode}
-\cs_new_protected:Npn \zhnum_set_digits_map:nn #1#2
- { \prop_put:Nnn \l_@@_cfg_map_prop {#1} {#2} }
+\cs_new_protected:Npn \zhnum_set_digits_map:nn #1
+ { \prop_put:Nnn \l_@@_cfg_map_prop {#1} }
\cs_new_protected:Npn \zhnum_set_digits_map:nnn #1#2#3
{
\prop_put_if_new:Nnn \l_@@_cfg_map_prop {#1} {#3}
\prop_put:Nnn \l_@@_cfg_map_var_prop {#1_#2} {#3}
}
-\cs_new_protected:Npn \zhnum_set_financial_map:nn #1#2
- { \prop_put:Nnn \l_@@_cfg_map_finan_prop {#1} {#2} }
+\cs_new_protected:Npn \zhnum_set_financial_map:nn #1
+ { \prop_put:Nnn \l_@@_cfg_map_finan_prop {#1} }
\cs_new_protected:Npn \zhnum_set_financial_map:nnn #1#2#3
{
\prop_put_if_new:Nnn \l_@@_cfg_map_finan_prop {#1} {#3}
\prop_put:Nnn \l_@@_cfg_map_var_prop { financial_#1_#2 } {#3}
}
-\cs_new_protected:Npn \zhnum_set_tiangan_map:nn #1#2
- { \prop_put:Nnn \l_@@_cfg_map_ganzhi_prop { tiangan_#1 } {#2} }
-\cs_new_protected:Npn \zhnum_set_dizhi_map:nn #1#2
- { \prop_put:Nnn \l_@@_cfg_map_ganzhi_prop { dizhi_#1 } {#2} }
+\cs_new_protected:Npn \zhnum_set_tiangan_map:nn #1
+ { \prop_put:Nnn \l_@@_cfg_map_ganzhi_prop { tiangan_#1 } }
+\cs_new_protected:Npn \zhnum_set_dizhi_map:nn #1
+ { \prop_put:Nnn \l_@@_cfg_map_ganzhi_prop { dizhi_#1 } }
\prop_new:N \l_@@_cfg_map_prop
\prop_new:N \l_@@_cfg_map_var_prop
\prop_new:N \l_@@_cfg_map_finan_prop
@@ -1448,136 +1567,270 @@ Copyright and Licence
% \zhnum_parse_config:,
% \zhnum_check_simp:nn,
% \zhnum_check_financial:nn,
-% \zhnum_set_zero:,
% \zhnum_set_week_day:
% }
% 将 \texttt{prop} 表转化到单独的 \texttt{tl} 变量。
% \begin{macrocode}
\cs_new_protected:Npn \zhnum_parse_config:
{
+ \tl_clear_new:N \l_@@_reset_tl
+ \tl_clear_new:N \l_@@_reset_simp_tl
+ \tl_clear_new:N \l_@@_reset_trad_tl
+ \tl_clear_new:N \l_@@_set_ancient_tl
+ \tl_clear_new:N \l_@@_set_normal_tl
+ \tl_clear_new:N \l_@@_reset_ancient_tl
+ \tl_clear_new:N \l_@@_reset_normal_tl
+ \tl_clear_new:N \l_@@_reset_financial_tl
\prop_map_function:NN \l_@@_cfg_map_prop \zhnum_check_simp:nn
- \prop_map_function:NN \l_@@_cfg_map_ganzhi_prop \zhnum_assgin_ganzhi:nn
- \zhnum_set_zero:
- \zhnum_set_week_day:
- \bool_if:NF \l_@@_reset_bool
- {
- \zhnum_assgin_const:
- \bool_set_true:N \l_@@_reset_bool
- }
+ \zhnum_set_ganzhi:
+ \zhnum_reset_all:
}
\cs_new_protected:Npn \zhnum_check_simp:nn #1#2
{
- \@@_check_simp_aux:nn {#2} {#1}
- \prop_get:NnNT \l_@@_cfg_map_finan_prop {#1} \l_tmpa_tl
- { \exp_args:No \@@_check_simp_aux:nn { \l_tmpa_tl } { financial_ #1 } }
+ \prop_get:NnNTF \l_@@_cfg_map_var_prop
+ { #1_ancient } \l_@@_ancient_tl
+ { \@@_add_reset_ancient:nN {#1} \l_@@_ancient_tl }
+ {
+ \@@_check_simp_aux:nn {#2} {#1}
+ \prop_get:NnNT \l_@@_cfg_map_finan_prop {#1} \l_@@_tmp_tl
+ {
+ \exp_args:No \@@_check_simp_aux:nn
+ { \l_@@_tmp_tl } { financial_ #1 }
+ \@@_add_reset_financial:n {#1}
+ }
+ }
}
\cs_new_protected:Npn \@@_check_simp_aux:nn #1#2
{
- \prop_get:NnNTF \l_@@_cfg_map_var_prop { #2 _trad } \l_tmpa_tl
+ \prop_get:NnNTF \l_@@_cfg_map_var_prop
+ { #2 _trad } \l_@@_trad_tl
{
- \prop_get:NnNF \l_@@_cfg_map_var_prop { #2 _simp } \l_tmpb_tl
- { \tl_set:Nn \l_tmpb_tl {#1} }
- \tl_set:cx { l_@@_ #2 _tl }
- {
- \exp_not:n { \bool_if:NTF \l_@@_simp_bool }
- { \exp_not:o \l_tmpb_tl } { \exp_not:o \l_tmpa_tl }
- }
+ \prop_get:NnNF \l_@@_cfg_map_var_prop
+ { #2 _simp } \l_@@_simp_tl
+ { \tl_set:Nn \l_@@_simp_tl {#1} }
+ \@@_add_reset_simp:nNN
+ {#2} \l_@@_simp_tl \l_@@_trad_tl
}
- { \tl_set:cn { l_@@_ #2 _tl } {#1} }
+ { \@@_add_reset:nn {#2} {#1} }
}
-\cs_new_protected:Npn \zhnum_assgin_const:
+\tl_new:N \l_@@_simp_tl
+\tl_new:N \l_@@_trad_tl
+\tl_new:N \l_@@_ancient_tl
+\cs_new_protected:Npn \@@_add_reset:nn #1#2
{
- \prop_map_function:NN \l_@@_cfg_map_prop \zhnum_check_financial:nn
- \zhnum_set_alias:
+ \tl_put_right:Nx \l_@@_reset_tl
+ {
+ \tl_set:Nn \exp_not:c { l_@@_ #1 _tl }
+ { \exp_not:n {#2} }
+ }
}
-\cs_new_protected:Npn \zhnum_check_financial:nn #1#2
+\cs_new_protected:Npn \@@_add_reset_simp:nNN #1#2#3
{
- \prop_get:NnNTF \l_@@_cfg_map_finan_prop {#1} \l_tmpa_tl
+ \tl_put_right:Nx \l_@@_reset_simp_tl
{
- \zhnum_assgin_const_tl:cx { c_@@_ #1 _tl }
- {
- \exp_not:n { \bool_if:NTF \l_@@_normal_bool }
- { \exp_not:c { l_@@_ #1 _tl } }
- { \exp_not:c { l_@@_financial_ #1 _tl } }
- }
+ \tl_set:Nn \exp_not:c { l_@@_ #1 _tl }
+ { \exp_not:o {#2} }
+ }
+ \tl_put_right:Nx \l_@@_reset_trad_tl
+ {
+ \tl_set:Nn \exp_not:c { l_@@_ #1 _tl }
+ { \exp_not:o {#3} }
+ }
+ }
+\cs_new_protected:Npn \@@_add_reset_financial:n #1
+ {
+ \tl_put_right:Nx \l_@@_set_normal_tl
+ {
+ \tl_set_eq:NN
+ \exp_not:c { l_@@_normal_ #1 _tl }
+ \exp_not:c { l_@@_ #1 _tl }
+ }
+ \tl_put_right:Nx \l_@@_reset_normal_tl
+ {
+ \tl_set_eq:NN
+ \exp_not:c { l_@@_ #1 _tl }
+ \exp_not:c { l_@@_normal_ #1 _tl }
}
+ \tl_put_right:Nx \l_@@_reset_financial_tl
{
- \zhnum_assgin_const_tl:cx
- { c_@@_ #1 _tl } { \exp_not:c { l_@@_ #1 _tl } }
+ \tl_set_eq:NN
+ \exp_not:c { l_@@_ #1 _tl }
+ \exp_not:c { l_@@_financial_ #1 _tl }
}
}
-\cs_new_protected:Npn \zhnum_set_zero:
+\cs_new_protected:Npn \@@_add_reset_ancient:nN #1#2
{
- \tl_set:cx { l_@@_0_tl }
+ \tl_put_right:Nx \l_@@_reset_ancient_tl
{
- \exp_not:n { \bool_if:NTF \l_@@_null_bool }
- { \exp_not:o \l_@@_null_tl } { \exp_not:v { l_@@_0_tl } }
+ \tl_set:Nn \exp_not:c { l_@@_ #1 _tl }
+ { \exp_not:o {#2} }
+ }
+ \tl_put_right:Nx \l_@@_set_ancient_tl
+ {
+ \tl_concat:NNN
+ \exp_not:c { l_@@_ #1 _tl }
+ \exp_not:c { l_@@_ \str_head:n {#1} _tl }
+ \exp_not:c { l_@@_ 1 \str_tail:n {#1} _tl }
}
}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[int]
+% {
+% \zhnum_set_week_day:,
+% \zhnum_reset_week_day:
+% }
+% \begin{macrocode}
\cs_new_protected:Npn \zhnum_set_week_day:
{
- \tl_set:Nx \l_@@_mon_tl
- { \exp_not:N \c_@@_weekday_tl \exp_not:v { l_@@_1_tl } }
- \tl_set:Nx \l_@@_tue_tl
- { \exp_not:N \c_@@_weekday_tl \exp_not:v { l_@@_2_tl } }
- \tl_set:Nx \l_@@_wed_tl
- { \exp_not:N \c_@@_weekday_tl \exp_not:v { l_@@_3_tl } }
- \tl_set:Nx \l_@@_thu_tl
- { \exp_not:N \c_@@_weekday_tl \exp_not:v { l_@@_4_tl } }
- \tl_set:Nx \l_@@_fri_tl
- { \exp_not:N \c_@@_weekday_tl \exp_not:v { l_@@_5_tl } }
- \tl_set:Nx \l_@@_sat_tl
- { \exp_not:N \c_@@_weekday_tl \exp_not:v { l_@@_6_tl } }
- \tl_set:Nx \l_@@_sun_tl
- { \exp_not:N \c_@@_weekday_tl \exp_not:o \l_@@_day_tl }
- }
-\clist_map_inline:nn { mon , tue , wed , thu , fri , sat , sun }
- { \tl_const:cx { c_@@_ #1 _tl } { \exp_not:c { l_@@_ #1 _tl } } }
-\cs_new_protected:Npn \zhnum_assgin_ganzhi:nn #1#2
+ \cs_set_protected:Npx \zhnum_reset_week_day:
+ {
+ \@@_set_week_day:nn { mon } { 1 }
+ \@@_set_week_day:nn { tue } { 2 }
+ \@@_set_week_day:nn { wed } { 3 }
+ \@@_set_week_day:nn { thu } { 4 }
+ \@@_set_week_day:nn { fri } { 5 }
+ \@@_set_week_day:nn { sat } { 6 }
+ \@@_set_week_day:nn { sun } { day }
+ }
+ }
+\cs_new_eq:NN \zhnum_reset_week_day: \prg_do_nothing:
+\cs_new:Npn \@@_set_week_day:nn #1#2
+ {
+ \tl_set:Nx \exp_not:c { l_@@_ #1 _tl }
+ {
+ \exp_not:N \exp_not:o { \exp_not:N \l_@@_weekday_tl }
+ \exp_not:N \exp_not:n { \exp_not:v { l_@@_ #2 _tl } }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[int]
+% {
+% \zhnum_set_ganzhi:,
+% \zhnum_reset_ganzhi:
+% }
+% \begin{macrocode}
+\cs_new_protected:Npn \zhnum_set_ganzhi:
+ {
+ \prop_map_function:NN
+ \l_@@_cfg_map_ganzhi_prop
+ \@@_add_reset:nn
+ }
+\cs_new_protected:Npn \@@_reset_ganzhi:nn #1#2
{ \tl_set:cn { l_@@_ #1 _tl } {#2} }
\cs_new:Npn \zhnum_zero_mod:nn #1#2
{ \exp_args:Nf \@@_zero_mod_aux:nn { \int_mod:nn {#1} {#2} } {#2} }
\cs_new:Npn \@@_zero_mod_aux:nn #1#2
{ \int_compare:nNnTF {#1} = \c_zero_int {#2} {#1} }
-\int_step_inline:nn { 60 }
+\tl_new:c { l_@@_dizhi_ 0 _tl }
+\tl_new:c { l_@@_ganzhi_ 0 _tl }
+\tl_new:c { l_@@_tiangan_ 0 _tl }
+\group_begin:
+\cs_set:Npn \@@_tmp:w #1
{
- \tl_const:cx { c_@@_ganzhi_ #1 _tl } { \exp_not:c { l_@@_ganzhi_ #1 _tl } }
- \tl_set:cx { l_@@_ganzhi_ #1 _tl }
- {
- \exp_not:c { l_@@_tiangan_ \zhnum_zero_mod:nn {#1} { 10 } _tl }
- \exp_not:c { l_@@_dizhi_ \zhnum_zero_mod:nn {#1} { 12 } _tl }
- }
+ \tl_concat:NNN
+ \exp_not:c { l_@@_ganzhi_ #1 _tl }
+ \exp_not:c { l_@@_tiangan_ \zhnum_zero_mod:nn {#1} { 10 } _tl }
+ \exp_not:c { l_@@_dizhi_ \zhnum_zero_mod:nn {#1} { 12 } _tl }
}
-\cs_new_eq:cc { c_@@_ganzhi_ 0 _tl } { c_@@_ganzhi_ 60 _tl }
-\cs_new_eq:NN \zhnum_assgin_const_tl:cx \tl_const:cx
-\AtEndOfPackage
+\cs_new_protected:Npx \zhnum_reset_ganzhi:
{
- \prop_map_inline:Nn \l_@@_cfg_map_ganzhi_prop
- { \tl_const:cx { c_@@_ #1 _tl } { \exp_not:c { l_@@_ #1 _tl } } }
- \cs_new_eq:cc { c_@@_tiangan_ 0 _tl } { c_@@_tiangan_ 10 _tl }
- \cs_new_eq:cc { c_@@_dizhi_ 0 _tl } { c_@@_dizhi_ 12 _tl }
- \cs_set_eq:NN \zhnum_assgin_const_tl:cx \tl_set:cx
+ \tl_set_eq:NN
+ \exp_not:c { l_@@_dizhi_ 0 _tl }
+ \exp_not:c { l_@@_dizhi_ 12 _tl }
+ \tl_set_eq:NN
+ \exp_not:c { l_@@_tiangan_ 0 _tl }
+ \exp_not:c { l_@@_tiangan_ 10 _tl }
+ \int_step_function:nN { 60 } \@@_tmp:w
+ \tl_set_eq:NN
+ \exp_not:c { l_@@_ganzhi_ 0 _tl }
+ \exp_not:c { l_@@_ganzhi_ 60 _tl }
}
+\group_end:
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\zhnum_set_alias:}
-% 一些易于使用的别名。
+% \begin{macro}[int]
+% {
+% \zhnum_reset_config:,
+% \zhnum_reset_all:,
+% \zhnum_reset_style:
+% }
% \begin{macrocode}
-\cs_new_eq:NN \zhnum_set_alias:NN \cs_new_eq:NN
-\cs_new_protected:Npx \zhnum_set_alias:
+\cs_new_protected:Npn \zhnum_reset_config:
+ { \zhnum_load_cfg:o { \l_@@_encoding_str } }
+\cs_new_protected:Npn \zhnum_reset_all:
+ {
+ \zhnum_reset_main:
+ \zhnum_reset_simp:
+ \zhnum_set_week_day:
+ \zhnum_reset_week_day:
+ \zhnum_reset_ganzhi:
+ \zhnum_reset_normal:
+ }
+\cs_new_protected:Npn \zhnum_reset_main:
+ {
+ \tl_use:N \l_@@_reset_tl
+ \tl_use:N \l_@@_set_normal_tl
+ \tl_concat:NNN
+ \l_@@_reset_normal_tl
+ \l_@@_reset_normal_tl
+ \c_@@_set_zero_tl
+ \tl_concat:NNN
+ \l_@@_reset_financial_tl
+ \l_@@_reset_financial_tl
+ \c_@@_set_zero_tl
+ \tl_concat:NNN
+ \l_@@_reset_financial_tl
+ \l_@@_reset_financial_tl
+ \l_@@_set_ancient_tl
+ }
+\tl_const:Nx \c_@@_set_zero_tl
{
- \zhnum_set_alias:NN \exp_not:N \c_@@_zero_tl
- \exp_not:c { c_@@_ 0 _tl }
- \zhnum_set_alias:NN \exp_not:N \c_@@_ten_tl
- \exp_not:c { c_@@_ 10 _tl }
- \zhnum_set_alias:NN \exp_not:N \c_@@_hundred_tl
- \exp_not:c { c_@@_ 100 _tl }
- \zhnum_set_alias:NN \exp_not:N \c_@@_thousand_tl
- \exp_not:c { c_@@_ 1000 _tl }
+ \tl_set_eq:NN
+ \exp_not:N \l_@@_zero_tl
+ \exp_not:c { l_@@_0_tl }
+ }
+\tl_new:N \l_@@_zero_tl
+\cs_new_protected:Npn \zhnum_reset_style:
+ {
+ \zhnum_reset_simp:
+ \zhnum_reset_normal:
+ }
+\cs_new_protected:Npn \zhnum_reset_simp:
+ {
+ \bool_if:NTF \l_@@_simp_bool
+ { \tl_use:N \l_@@_reset_simp_tl }
+ { \tl_use:N \l_@@_reset_trad_tl }
+ }
+\cs_new_protected:Npn \zhnum_reset_normal:
+ {
+ \bool_if:NTF \l_@@_normal_bool
+ {
+ \tl_use:N \l_@@_reset_normal_tl
+ \@@_reset_ancient:
+ \@@_reset_zero:
+ }
+ { \tl_use:N \l_@@_reset_financial_tl }
+ }
+\cs_new_protected:Npn \@@_reset_ancient:
+ {
+ \bool_if:NTF \l_@@_ancient_bool
+ { \tl_use:N \l_@@_reset_ancient_tl }
+ { \tl_use:N \l_@@_set_ancient_tl }
+ }
+\cs_new_protected:Npx \@@_reset_zero:
+ {
+ \exp_not:n { \bool_if:NT \l_@@_null_bool }
+ {
+ \tl_set_eq:NN
+ \exp_not:c { l_@@_0_tl }
+ \exp_not:N \l_@@_null_tl
+ }
}
-\AtEndOfPackage
- { \cs_set_eq:NN \zhnum_set_alias:NN \tl_set_eq:NN }
% \end{macrocode}
% \end{macro}
%
@@ -1587,38 +1840,49 @@ Copyright and Licence
\cs_new_protected:Npn \zhnum_load_cfg:n #1
{
\zhnum_set_cfg_name:Nn \l_@@_cfg_str {#1}
- \str_if_eq:NNF \l_@@_cfg_str \l_@@_last_cfg_str
- { \zhnum_update_cfg:n {#1} }
- \zhnum_parse_config:
+ \str_if_eq:NNTF \l_@@_cfg_str \l_@@_last_cfg_str
+ { \zhnum_reset_all: }
+ {
+ \zhnum_update_cfg:n {#1}
+ \zhnum_parse_config:
+ }
}
\cs_generate_variant:Nn \zhnum_load_cfg:n { o }
\cs_new_protected:Npn \zhnum_update_cfg:n #1
{
\prop_if_exist:cTF { g_@@_cfg_ \l_@@_cfg_str _prop }
- { \str_set_eq:NN \l_@@_last_cfg_str \l_@@_cfg_str }
+ { \@@_set_cfg_prop: }
{ \zhnum_input_cfg:n {#1} }
+ }
+\cs_new_protected:Npn \@@_set_cfg_prop:
+ {
+ \str_set_eq:NN \l_@@_last_cfg_str \l_@@_cfg_str
\@@_update_cfg_prop:N \prop_set_eq:Nc
}
\cs_new_protected:Npn \zhnum_input_cfg:n #1
{
- \file_if_exist:nTF { zhnumber - #1 .cfg }
+ \file_get_full_name:nNTF { zhnumber - #1 .cfg } \l_@@_cfg_file_tl
{
\bool_set_false:N \l_@@_reset_bool
\@@_update_cfg_prop:N \@@_prop_initial:Nn
\group_begin:
\zhnum_set_catcode:
- \file_input:n { zhnumber - #1 .cfg }
+ \exp_args:No \file_input:n { \l_@@_cfg_file_tl }
\@@_update_cfg_prop:N \@@_prop_gset_eq:Nn
\group_end:
+ \@@_set_cfg_prop:
}
{ \msg_error:nnx { zhnumber } { file-not-found } {#1} }
}
-\cs_new_protected:Npn \@@_update_cfg_prop:N #1
+\tl_new:N \l_@@_cfg_file_tl
+\cs_new_protected:Npn \@@_update_cfg_prop:N
+ { \exp_args:No \@@_update_cfg_prop_aux:nN { \l_@@_cfg_str } }
+\cs_new_protected:Npn \@@_update_cfg_prop_aux:nN #1#2
{
- #1 \l_@@_cfg_map_prop { g_@@_cfg_ \l_@@_cfg_str _prop }
- #1 \l_@@_cfg_map_var_prop { g_@@_cfg_var_ \l_@@_cfg_str _prop }
- #1 \l_@@_cfg_map_finan_prop { g_@@_cfg_finan_ \l_@@_cfg_str _prop }
- #1 \l_@@_cfg_map_ganzhi_prop { g_@@_cfg_ganzhi_ \l_@@_cfg_str _prop }
+ #2 \l_@@_cfg_map_prop { g_@@_cfg_ #1 _prop }
+ #2 \l_@@_cfg_map_var_prop { g_@@_cfg_var_ #1 _prop }
+ #2 \l_@@_cfg_map_finan_prop { g_@@_cfg_finan_ #1 _prop }
+ #2 \l_@@_cfg_map_ganzhi_prop { g_@@_cfg_ganzhi_ #1 _prop }
}
\cs_new_protected:Npn \@@_prop_initial:Nn #1#2
{
@@ -1639,23 +1903,18 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int,pTF]{\zhnum_if_unicode_engine:}
+% \begin{macro}[int]{\c_@@_unicode_engine_bool}
% 使用 \upTeX{} 的时候,也不必将汉字的首字符设置为活动字符。判断 |^^^^0021| 是否为
% 单个记号的办法对 \upTeX{} 不适用。
% \begin{macrocode}
-\bool_lazy_any:nTF
- {
- { \sys_if_engine_xetex_p: }
- { \sys_if_engine_luatex_p: }
- { \sys_if_engine_uptex_p: }
- }
+\bool_const:Nn \c_@@_unicode_engine_bool
{
- \cs_new_eq:NN \zhnum_if_unicode_engine_p: \c_true_bool
- \cs_new_eq:NN \zhnum_if_unicode_engine:TF \use_i:nn
- }
- {
- \cs_new_eq:NN \zhnum_if_unicode_engine_p: \c_false_bool
- \cs_new_eq:NN \zhnum_if_unicode_engine:TF \use_ii:nn
+ \bool_lazy_any_p:n
+ {
+ { \sys_if_engine_xetex_p: }
+ { \sys_if_engine_luatex_p: }
+ { \sys_if_engine_uptex_p: }
+ }
}
% \end{macrocode}
% \end{macro}
@@ -1668,49 +1927,59 @@ Copyright and Licence
% }
% 设置与恢复配置文件前后的 catcode。\pdfLaTeX{} 需要将汉字的首字节设置为活动字符。
% \begin{macrocode}
-\if_predicate:w \zhnum_if_unicode_engine_p:
- \cs_new_eq:NN \zhnum_set_catcode: \prg_do_nothing:
- \cs_new_protected:Npn \zhnum_set_cfg_name:Nn #1#2
- {
- \str_set:Nx \l_@@_encoding_str {#2}
- \str_set_eq:NN #1 \l_@@_encoding_str
- }
- \cs_new_eq:NN \zhnum_reset_config: \zhnum_parse_config:
-\else:
- \cs_new_protected:Npn \zhnum_set_catcode:
- { \bool_if:NT \l_@@_active_char_bool { \zhnum_set_active: } }
- \cs_new_protected:Npn \zhnum_set_active:
- {
- \str_case:onTF { \l_@@_encoding_str }
- {
- { gbk } { \int_set:Nn \l_@@_byte_min_int { "81 } }
- { big5 } { \int_set:Nn \l_@@_byte_min_int { "A1 } }
- }
- { \int_set:Nn \l_@@_byte_max_int { "FE } }
- {
- \int_set:Nn \l_@@_byte_min_int { "E0 }
- \int_set:Nn \l_@@_byte_max_int { "EF }
- }
- \int_step_function:nnN
- { \l_@@_byte_min_int }
- { \l_@@_byte_max_int } \char_set_catcode_active:n
- }
- \int_new:N \l_@@_byte_min_int
- \int_new:N \l_@@_byte_max_int
- \cs_new_protected:Npn \zhnum_set_cfg_name:Nn #1#2
- {
- \str_set:Nx \l_@@_encoding_str {#2}
- \str_set:Nx #1
- {
- \l_@@_encoding_str
- \bool_if:NT \l_@@_active_char_bool { _active }
- }
- }
- \cs_new_protected:Npn \zhnum_reset_config:
- { \zhnum_load_cfg:o { \l_@@_encoding_str } }
- \bool_new:N \l_@@_active_char_bool
- \bool_set_true:N \l_@@_active_char_bool
-\fi:
+\bool_if:NTF \c_@@_unicode_engine_bool
+ {
+ \cs_new_eq:NN \zhnum_set_catcode: \prg_do_nothing:
+ \cs_new_protected:Npn \zhnum_set_cfg_name:Nn #1#2
+ {
+ \str_set:Nx \l_@@_encoding_str {#2}
+ \str_set_eq:NN #1 \l_@@_encoding_str
+ }
+ }
+ {
+ \cs_new_protected:Npn \zhnum_set_catcode:
+ {
+ \bool_if:NTF \l_@@_active_char_bool
+ { \zhnum_set_active: }
+ { \zhnum_set_other: }
+ }
+ \cs_new_protected:Npx \zhnum_set_active:
+ {
+ \int_step_function:nnN
+ { 128 } { 255 } \char_set_catcode_active:n
+ }
+ \cs_new_protected:Npx \zhnum_set_other:
+ {
+ \int_step_function:nnN
+ { 128 } { 255 } \char_set_catcode_other:n
+ }
+ \cs_new_protected:Npn \zhnum_set_cfg_name:Nn #1#2
+ {
+ \str_set:Nx \l_@@_encoding_str {#2}
+ \str_set:Nx #1
+ {
+ \l_@@_encoding_str
+ \bool_if:NTF \l_@@_active_char_bool
+ { / active }
+ { / other }
+ }
+ }
+ \bool_new:N \l_@@_active_char_bool
+ \bool_set_true:N \l_@@_active_char_bool
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[int]{\zhnum_set_encoding:n}
+% 设置编码。
+% \begin{macrocode}
+\cs_new_protected:Npn \zhnum_set_encoding:n #1
+ {
+ \str_set:Nx \l_@@_encoding_str
+ { \str_lowercase:n {#1} }
+ \zhnum_load_cfg:o { \l_@@_encoding_str }
+ }
+\str_new:N \l_@@_encoding_str
% \end{macrocode}
% \end{macro}
%
@@ -1721,11 +1990,7 @@ Copyright and Licence
{
encoding .choices:nn =
{ UTF8 , GBK , Big5 }
- {
- \str_set:Nx \l_@@_encoding_str
- { \exp_args:No \str_lowercase:n { \l_keys_choice_tl } }
- \zhnum_load_cfg:o { \l_@@_encoding_str }
- } ,
+ { \exp_args:No \zhnum_set_encoding:n { \l_keys_choice_tl } } ,
encoding .default:n = { GBK } ,
encoding / Bg5 .meta:n = { encoding = Big5 } ,
encoding / unknown .code:n =
@@ -1749,12 +2014,14 @@ Copyright and Licence
style / Simplified .code:n = { \bool_set_true:N \l_@@_simp_bool } ,
style / Traditional .code:n = { \bool_set_false:N \l_@@_simp_bool } ,
style .default:n = { Normal , Simplified } ,
+ style .groups:n = { style } ,
null .bool_set:N = \l_@@_null_bool ,
+ null .groups:n = { style } ,
time .choice: ,
time / Chinese .code:n = { \bool_set_true:N \l_@@_time_bool } ,
time / Arabic .code:n = { \bool_set_false:N \l_@@_time_bool } ,
time .default:n = { Arabic } ,
- reset .code:n = { \zhnum_reset_config: } ,
+ reset .bool_set:N = \l_@@_reset_bool ,
activechar .bool_set:N = \l_@@_active_char_bool ,
ganzhi-cyclic .choice: ,
ganzhi-cyclic / true .code:n =
@@ -1764,7 +2031,9 @@ Copyright and Licence
ganzhi-cyclic .default:n = { true } ,
arabicsep .tl_set:N = \l_@@_arabic_sep_tl
}
-\str_new:N \l_@@_encoding_str
+\bool_new:N \l_@@_simp_bool
+\bool_new:N \l_@@_normal_bool
+\bool_new:N \l_@@_ancient_bool
\msg_new:nnnn { zhnumber } { encoding-invalid }
{ The~encoding~`#1'~is~invalid. }
{ Available~encodings~are~`UTF8',~`GBK'~and~`Big5'. }
@@ -1776,26 +2045,74 @@ Copyright and Licence
% \begin{macrocode}
\NewDocumentCommand \zhnumsetup { +m }
{
- \keys_set:nn { zhnum / options } {#1}
+ \zhnum_set:n {#1}
\tex_ignorespaces:D
}
+\cs_new_protected:Npn \zhnum_set:n #1
+ {
+ \bool_set_false:N \l_@@_reset_bool
+ \keys_set_filter:nnnN { zhnum / options }
+ { style , user } {#1} \l_@@_kv_tl
+ \tl_if_empty:NF \l_@@_kv_tl
+ { \@@_set_style: }
+ \bool_if:NT \l_@@_reset_bool
+ { \zhnum_reset_config: }
+ }
+\cs_new_protected:Npn \@@_set_style:
+ {
+ \keys_set_filter:nnoN { zhnum / options }
+ { user } { \l_@@_kv_tl } \l_@@_tmp_tl
+ \tl_if_empty:NTF \l_@@_tmp_tl
+ { \zhnum_reset_style: }
+ {
+ \tl_if_eq:NNF \l_@@_tmp_tl \l_@@_kv_tl
+ { \zhnum_reset_style: }
+ \bool_if:NF \l_@@_reset_bool
+ { \@@_set_user: }
+ }
+ }
+\cs_new_protected:Npn \@@_set_user:
+ {
+ \keys_set_filter:nnoN { zhnum / options }
+ { pre , pos } { \l_@@_tmp_tl } \l_@@_kv_tl
+ \tl_if_eq:NNF \l_@@_kv_tl \l_@@_tmp_tl
+ { \zhnum_reset_normal: }
+ \tl_if_empty:NF \l_@@_kv_tl
+ { \@@_set_pre_pos: }
+ }
+\cs_new_protected:Npn \@@_set_pre_pos:
+ {
+ \keys_set_filter:nnoN { zhnum / options }
+ { pos } { \l_@@_kv_tl } \l_@@_tmp_tl
+ \tl_if_eq:NNF \l_@@_tmp_tl \l_@@_kv_tl
+ {
+ \zhnum_reset_week_day:
+ \zhnum_reset_ganzhi:
+ }
+ \tl_if_empty:NF \l_@@_kv_tl
+ { \keys_set:no { zhnum / options } { \l_@@_kv_tl } }
+ }
+\cs_generate_variant:Nn \keys_set_filter:nnnN { nno }
% \end{macrocode}
% \end{macro}
%
% 初始化设置和执行宏包选项。
% \begin{macrocode}
-\keys_set:nn { zhnum / options } { style , time , arabicsep = { ~ } }
-\ProcessKeysOptions { zhnum / options }
+\keys_set:nn { zhnum / options }
+ { style , time , arabicsep = { ~ } }
+\cs_if_exist:NTF \ProcessKeyOptions
+ { \ProcessKeyOptions [ zhnum / options ] }
+ {
+ \RequirePackage { l3keys2e }
+ \ProcessKeysOptions { zhnum / options }
+ }
% \end{macrocode}
%
-% 如果没有选定编码,则根据引擎自动设置编码。
+% 如果没有选定编码,则选用 |UTF8|。
% \begin{macrocode}
-\str_if_empty:NT \l_@@_encoding_str
- {
- \zhnum_if_unicode_engine:TF
- { \keys_set:nn { zhnum / options } { encoding = UTF8 } }
- { \keys_set:nn { zhnum / options } { encoding = GBK } }
- }
+\str_if_empty:NTF \l_@@_encoding_str
+ { \zhnum_set_encoding:n { UTF8 } }
+ { \zhnum_reset_style: }
% \end{macrocode}
%
% \begin{macrocode}
@@ -1836,10 +2153,10 @@ Copyright and Licence
\zhnum_set_digits_map:nn { 10 } { 十 }
\zhnum_set_digits_map:nn { 100 } { 百 }
\zhnum_set_digits_map:nn { 1000 } { 千 }
-\zhnum_set_digits_map:nn { 20 } { 廿 }
-\zhnum_set_digits_map:nn { 30 } { 卅 }
-\zhnum_set_digits_map:nn { 40 } { 卌 }
-\zhnum_set_digits_map:nn { 200 } { 皕 }
+\zhnum_set_digits_map:nnn { 20 } { ancient } { 廿 }
+\zhnum_set_digits_map:nnn { 30 } { ancient } { 卅 }
+\zhnum_set_digits_map:nnn { 40 } { ancient } { 卌 }
+\zhnum_set_digits_map:nnn { 200 } { ancient } { 皕 }
%<*!big5>
\zhnum_set_digits_map:nnn { dot } { simp } { 点 }
\zhnum_set_digits_map:nnn { dot } { trad } { 點 }
diff --git a/macros/latex/contrib/zhnumber/zhnumber.pdf b/macros/latex/contrib/zhnumber/zhnumber.pdf
index 3010ea379d..fcc6d96796 100644
--- a/macros/latex/contrib/zhnumber/zhnumber.pdf
+++ b/macros/latex/contrib/zhnumber/zhnumber.pdf
Binary files differ