texlive[61140] Master/texmf-dist: xistercian (24nov21)

commits+karl at tug.org commits+karl at tug.org
Wed Nov 24 22:29:09 CET 2021


Revision: 61140
          http://tug.org/svn/texlive?view=revision&revision=61140
Author:   karl
Date:     2021-11-24 22:29:09 +0100 (Wed, 24 Nov 2021)
Log Message:
-----------
xistercian (24nov21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/xistercian/README.md
    trunk/Master/texmf-dist/doc/latex/xistercian/xistercian.pdf
    trunk/Master/texmf-dist/source/latex/xistercian/xistercian.dtx
    trunk/Master/texmf-dist/tex/latex/xistercian/xistercian.sty

Modified: trunk/Master/texmf-dist/doc/latex/xistercian/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xistercian/README.md	2021-11-24 21:28:12 UTC (rev 61139)
+++ trunk/Master/texmf-dist/doc/latex/xistercian/README.md	2021-11-24 21:29:09 UTC (rev 61140)
@@ -1,7 +1,7 @@
 -------------------------------------------------------------------------------
 # xistercian -- Cistercian numerals in LaTeX
 
-Version 2021-07-17 v1.0
+Version 2021-11-23 v1.1
 
 Released under the LaTeX Project Public License v1.3c or later
 See http://www.latex-project.org/lppl.txt

Modified: trunk/Master/texmf-dist/doc/latex/xistercian/xistercian.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/xistercian/xistercian.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/xistercian/xistercian.dtx	2021-11-24 21:28:12 UTC (rev 61139)
+++ trunk/Master/texmf-dist/source/latex/xistercian/xistercian.dtx	2021-11-24 21:29:09 UTC (rev 61140)
@@ -55,7 +55,7 @@
 \fi
 %
 \IfFileExists{xistercian.sty}{\RequirePackage[debug]{xistercian}}{}
-\ProvidesFile{xistercian.dtx}[2021-07-17 v1.0.0 Cistercian numerals in LaTeX]
+\ProvidesFile{xistercian.dtx}[2021-11-23 v1.1 Cistercian numerals in LaTeX]
 \PassOptionsToPackage{full}{textcomp}
 \documentclass{l3doc}
 \RequirePackage[fulloldstyle,nott]{kpfonts}
@@ -131,7 +131,7 @@
     \noalign{\vskip1ex}
   }
 \AddToHook{bfseries}
-  {\cisterciansetup{sv=.27ex,sdd=.27ex,sh=.12ex,sdu=.12ex,wd=.5em}}
+  {\cisterciansetup{sv=.27ex,sdd=.27ex,sh=.12ex,sdu=.12ex,wd=.625em}}
 \AddToHook{mdseries}{\myrestoredefaults}
 \cisterciansetup{redraw+=series}
 \ExplSyntaxOff
@@ -138,7 +138,7 @@
 \begin{document}
   \title{The \pkg{xistercian} package}
   \author{Jonathan P. Spratte\thanks{\protect\randomize{jspratte at yahoo.de}}}
-  \date{2021-07-17 v1.0}
+  \date{2021-11-23 v1.1}
   \DocInput{xistercian.dtx}
 \end{document}
 %</driver>^^A=<<
@@ -245,9 +245,8 @@
 %   \end{syntax}
 %   Prints the \meta{integer} as a Cistercian numeral. The \meta{integer} has to
 %   be provided as a string containing only digits and optionally a single
-%   leading~|-| (spaces are ignored). This can handle integers of almost
-%   arbitrary size (well, an integer with more than $2147483647$ places will be
-%   an issue).
+%   leading~|-| (spaces are ignored). This can handle integers of arbitrary
+%   size.
 % \end{function}
 %
 % \begin{function}{\cisterciannumE}
@@ -290,7 +289,7 @@
 % \end{function}
 % For example, the key |horizontal| is equivalently defined to
 % \begin{verbatim}
-% \cistercianstyle{horizontal}{o=h,wd=0.62em,ht=1ex}
+% \cistercianstyle{horizontal}{o=h,wd=0.775em,ht=1.13ex}
 % \end{verbatim}
 %
 %
@@ -483,7 +482,8 @@
 %   \begin{syntax}
 %     horizontal
 %   \end{syntax}
-%   Same as setting |orientation = horizontal, width = 0.62em, height = 1ex|.
+%   Same as setting
+%   |orientation = horizontal, width = 0.775em, height = 1.13ex|.
 % \end{function}
 %
 % \begin{function}{vertical}
@@ -490,7 +490,7 @@
 %   \begin{syntax}
 %     vertical
 %   \end{syntax}
-%   Same as setting |orientation = vertical, width = 0.4em, height = 1.55ex|.
+%   Same as setting |orientation = vertical, width = 0.5em, height = 1.55ex|.
 % \end{function}
 %
 % \begin{function}{alternate-5,5}
@@ -612,12 +612,12 @@
 % \begin{verbatim}
 % \AddToHook{bfseries}
 %   {%
-%     \cisterciansetup{sv=.27ex,sdd=.27ex,sh=.15ex,sdu=.15ex,wd=.5em}%
+%     \cisterciansetup{sv=.27ex,sdd=.27ex,sh=.15ex,sdu=.15ex,wd=.625em}%
 %     \cistercianredrawlazy
 %   }
 % \AddToHook{mdseries}
 %   {%
-%     \cisterciansetup{sv=.18ex,sdd=.18ex,sh=.1ex,sdu=.1ex,wd=.4em}%
+%     \cisterciansetup{sv=.18ex,sdd=.18ex,sh=.1ex,sdu=.1ex,wd=.5em}%
 %     \cistercianredrawlazy
 %   }
 % This results in \cisterciannum{2} different \enquote{series}.\par
@@ -636,9 +636,9 @@
 % determine when to redraw:
 % \begin{verbatim}
 % \AddToHook{bfseries}
-%   {\cisterciansetup{sv=.27ex,sdd=.27ex,sh=.15ex,sdu=.15ex,wd=.5em}}
+%   {\cisterciansetup{sv=.27ex,sdd=.27ex,sh=.15ex,sdu=.15ex,wd=.625em}}
 % \AddToHook{mdseries}
-%   {\cisterciansetup{sv=.18ex,sdd=.18ex,sh=.1ex,sdu=.1ex,wd=.4em}}
+%   {\cisterciansetup{sv=.18ex,sdd=.18ex,sh=.1ex,sdu=.1ex,wd=.5em}}
 % \cisterciansetup{redraw+=series}
 % \end{verbatim}
 %
@@ -663,7 +663,7 @@
 \newcommand*\xister at tv{.18ex}
 \newcommand*\xister at tdu{.1ex}
 \newcommand*\xister at tdd{.18ex}
-\newcommand*\xister at x{.4em}
+\newcommand*\xister at x{.5em}
 \newcommand*\xister at y{1.55ex}
 \newcommand*\xister at bx{1.2}
 \newcommand*\xister at by{}
@@ -746,7 +746,7 @@
 %     \xister at build@h,\xister at build@horizontal,
 %     \xister at build@v,\xister at build@vertical
 %   }
-%   First we set the length registers to the correct size, than we draw the
+%   First we set the length registers to the correct size, then we draw the
 %   glyphs batch wise. We have to flip the $x$-direction for the tenths and
 %   thousands, and the $y$-direction for the hundreds and thousands. The macro
 %   |\xister at sgn| is used to set the baseline in the correct direction. We
@@ -866,7 +866,7 @@
           }%
       }%
   }
-\expandafter\xister at tmp\csname\string\color at .\endcsname{color}
+\expandafter\xister at tmp\csname\@backslashchar color at .\endcsname{color}
 \xister at tmp\f at encoding{encoding}
 \xister at tmp\f at family  {family}
 \xister at tmp\f at series  {series}
@@ -961,13 +961,13 @@
 \protected\ekvdefNoVal{xister}{horizontal}
   {%
     \let\xister at build\xister at build@horizontal
-    \def\xister at x{.62em}%
-    \def\xister at y{1ex}%
+    \def\xister at x{.775em}%
+    \def\xister at y{1.13ex}%
   }
 \protected\ekvdefNoVal{xister}{vertical}
   {%
     \let\xister at build\xister at build@vertical
-    \def\xister at x{.4em}%
+    \def\xister at x{.5em}%
     \def\xister at y{1.55ex}%
   }
 %    \end{macrocode}
@@ -1108,32 +1108,23 @@
 \def\xister at gobbletoat#1@{}
 \def\xister at gobbletozero#10{}
 \def\xister at gobblecopy0\rlap#1{}
-\def\xister at done#1\xister at symbols@{}
+\def\xister at done#1\xister at symbols{}
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}[internal]{\xister at count,\xister at count@done}
-%   A simple loop to count tokens. The loop delimiter is a single |@|. Should be
-%   used after |\numexpr|.
-%    \begin{macrocode}
-\def\xister at count#1{\xister at gobbletoat#1\xister at count@done @+1\xister at count}
-\def\xister at count@done @+1\xister at count{\relax @}
-%    \end{macrocode}
-% \end{macro}
-%
 % \begin{macro}[internal]{\xister at texorpdf}
 %    \begin{macrocode}
 \let\xister at texorpdf\@firstoftwo
-\AddToHook{package/after/hyperref}
+\AddToHook{package/hyperref/after}
   {%
     \ifdefined\texorpdfstring
-      \let\xister at texorpdf\texorpdfstring
+      \def\xister at texorpdf{\texorpdfstring}%
     \fi
   }
 \AddToHook{begindocument/before}
   {%
     \ifdefined\texorpdfstring
-      \let\xister at texorpdf\texorpdfstring
+      \def\xister at texorpdf{\texorpdfstring}%
     \fi
   }
 %    \end{macrocode}
@@ -1142,7 +1133,7 @@
 %
 % \subsubsection{Input Parsing}
 %
-% \begin{macro}[internal]{\xister at a,\xister at b,\xister at c}
+% \begin{macro}[internal]{\xister at a,\xister at b,\xister at c,\xister at d}
 %   First we have to make sure that we're in horizontal mode, else the |\rlap|s
 %   used to insert the glyphs will create havoc. We also need to ensure that the
 %   boxes contain the correct glyphs according to the current size and colour.
@@ -1157,29 +1148,44 @@
     \else\expandafter\xister at b\expandafter#1\fi
   }
 %    \end{macrocode}
-%   Next we count the number of decimal digits in the number we want to print,
-%   take that modulo $4$ (that's what's |4*((#1-2)/4)| is doing, thanks to Heiko
-%   Oberdiek and the code in \pkg{expl3}), and use the correct symbol creating
-%   macro. The |@@@@| serves as the end marker since each step (except the
-%   first) will grab four digits.
+%   Next we check whether the remaining number is empty. If that is the case we
+%   use |\the\numexpr\relax| to throw a missing number error and produce just a
+%   zero stem. Else we do a dry run over the input number to see how many
+%   leading zeros we must pad to get blocks of four. The two blocks of |@@@@|
+%   serve as end markers since each step of both \cs{xister at c} and
+%   \cs{xister at symbols} will grab four digits.
 %    \begin{macrocode}
 \def\xister at b#1@%
-  {\expandafter\xister at c\the\numexpr\xister at count#1@#1@@@@}
-\def\xister at c#1@%
-  {\csname xister at symbols@\romannumeral\numexpr#1-4*((#1-2)/4)\relax\endcsname}
+  {%
+    \if\relax\detokenize{#1}\relax
+      \expandafter\xister at gobbletozero\the\numexpr\relax
+      \xister at symbols0000@@@@%
+      \expandafter\@gobbletwo
+    \fi
+    \@firstofone{\xister at c#1@@@@\relax#1@@@@}%
+  }
+\def\xister at c#1#2#3#4%
+  {%
+    \xister at gobbletoat
+      #1\xister at d{}%
+      #2\xister at d{000}%
+      #3\xister at d{00}%
+      #4\xister at d0%
+      @\xister at c
+  }
+\def\xister at d#1#2@\xister at c#3\relax{\xister at symbols#1}
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}[internal]
-%   {\xister at symbols@,\xister at symbols@i,\xister at symbols@ii,\xister at symbols@iii}
+% \begin{macro}[internal]{\xister at symbols}
 %   When this loop is done all arguments will be |@|, but we only check the
 %   first here. We generate the symbols by overlaying up to five boxes, one for
 %   each decade plus the zero stem. Each digit might be skipped if it is $0$.
 %   Next grab the next four digits.
 %    \begin{macrocode}
-\def\xister at symbols@#1%
+\def\xister at symbols#1%
   {%
-    \protected\def\xister at symbols@##1##2##3##4%
+    \protected\def\xister at symbols##1##2##3##4%
       {%
         \xister at gobbletoat##1\xister at done @%
         \xister at gobbletozero##1\xister at gobblecopy0%
@@ -1191,18 +1197,11 @@
         \xister at gobbletozero##4\xister at gobblecopy0%
           \rlap{\copy\csname xister at digitbox@##4\endcsname}%
         \copy#1%
-        \xister at symbols@
+        \xister at symbols
       }%
   }
-\expandafter\xister at symbols@\csname xister at digitbox@0\endcsname
+\expandafter\xister at symbols\csname xister at digitbox@0\endcsname
 %    \end{macrocode}
-%   If there are less than four decimal digits inside the first Cistercian
-%   numeral we provide enough zeros to fill up the remainder.
-%    \begin{macrocode}
-\def\xister at symbols@i{\xister at symbols@000}
-\def\xister at symbols@ii{\xister at symbols@00}
-\def\xister at symbols@iii{\xister at symbols@0}
-%    \end{macrocode}
 % \end{macro}
 %
 %

Modified: trunk/Master/texmf-dist/tex/latex/xistercian/xistercian.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xistercian/xistercian.sty	2021-11-24 21:28:12 UTC (rev 61139)
+++ trunk/Master/texmf-dist/tex/latex/xistercian/xistercian.sty	2021-11-24 21:29:09 UTC (rev 61140)
@@ -34,7 +34,7 @@
 \newcommand*\xister at tv{.18ex}
 \newcommand*\xister at tdu{.1ex}
 \newcommand*\xister at tdd{.18ex}
-\newcommand*\xister at x{.4em}
+\newcommand*\xister at x{.5em}
 \newcommand*\xister at y{1.55ex}
 \newcommand*\xister at bx{1.2}
 \newcommand*\xister at by{}
@@ -162,7 +162,7 @@
           }%
       }%
   }
-\expandafter\xister at tmp\csname\string\color at .\endcsname{color}
+\expandafter\xister at tmp\csname\@backslashchar color at .\endcsname{color}
 \xister at tmp\f at encoding{encoding}
 \xister at tmp\f at family  {family}
 \xister at tmp\f at series  {series}
@@ -252,13 +252,13 @@
 \protected\ekvdefNoVal{xister}{horizontal}
   {%
     \let\xister at build\xister at build@horizontal
-    \def\xister at x{.62em}%
-    \def\xister at y{1ex}%
+    \def\xister at x{.775em}%
+    \def\xister at y{1.13ex}%
   }
 \protected\ekvdefNoVal{xister}{vertical}
   {%
     \let\xister at build\xister at build@vertical
-    \def\xister at x{.4em}%
+    \def\xister at x{.5em}%
     \def\xister at y{1.55ex}%
   }
 \protected\ekvdefNoVal{xister}{debug}
@@ -324,20 +324,18 @@
 \def\xister at gobbletoat#1@{}
 \def\xister at gobbletozero#10{}
 \def\xister at gobblecopy0\rlap#1{}
-\def\xister at done#1\xister at symbols@{}
-\def\xister at count#1{\xister at gobbletoat#1\xister at count@done @+1\xister at count}
-\def\xister at count@done @+1\xister at count{\relax @}
+\def\xister at done#1\xister at symbols{}
 \let\xister at texorpdf\@firstoftwo
-\AddToHook{package/after/hyperref}
+\AddToHook{package/hyperref/after}
   {%
     \ifdefined\texorpdfstring
-      \let\xister at texorpdf\texorpdfstring
+      \def\xister at texorpdf{\texorpdfstring}%
     \fi
   }
 \AddToHook{begindocument/before}
   {%
     \ifdefined\texorpdfstring
-      \let\xister at texorpdf\texorpdfstring
+      \def\xister at texorpdf{\texorpdfstring}%
     \fi
   }
 \def\xister at a#1%
@@ -348,12 +346,27 @@
     \else\expandafter\xister at b\expandafter#1\fi
   }
 \def\xister at b#1@%
-  {\expandafter\xister at c\the\numexpr\xister at count#1@#1@@@@}
-\def\xister at c#1@%
-  {\csname xister at symbols@\romannumeral\numexpr#1-4*((#1-2)/4)\relax\endcsname}
-\def\xister at symbols@#1%
   {%
-    \protected\def\xister at symbols@##1##2##3##4%
+    \if\relax\detokenize{#1}\relax
+      \expandafter\xister at gobbletozero\the\numexpr\relax
+      \xister at symbols0000@@@@%
+      \expandafter\@gobbletwo
+    \fi
+    \@firstofone{\xister at c#1@@@@\relax#1@@@@}%
+  }
+\def\xister at c#1#2#3#4%
+  {%
+    \xister at gobbletoat
+      #1\xister at d{}%
+      #2\xister at d{000}%
+      #3\xister at d{00}%
+      #4\xister at d0%
+      @\xister at c
+  }
+\def\xister at d#1#2@\xister at c#3\relax{\xister at symbols#1}
+\def\xister at symbols#1%
+  {%
+    \protected\def\xister at symbols##1##2##3##4%
       {%
         \xister at gobbletoat##1\xister at done @%
         \xister at gobbletozero##1\xister at gobblecopy0%
@@ -365,13 +378,10 @@
         \xister at gobbletozero##4\xister at gobblecopy0%
           \rlap{\copy\csname xister at digitbox@##4\endcsname}%
         \copy#1%
-        \xister at symbols@
+        \xister at symbols
       }%
   }
-\expandafter\xister at symbols@\csname xister at digitbox@0\endcsname
-\def\xister at symbols@i{\xister at symbols@000}
-\def\xister at symbols@ii{\xister at symbols@00}
-\def\xister at symbols@iii{\xister at symbols@0}
+\expandafter\xister at symbols\csname xister at digitbox@0\endcsname
 \newcommand*\xister at clip@v[1]
   {%
     \pgfpathrectanglecorners



More information about the tex-live-commits mailing list.