%%
%% This is file `xistercian.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% xistercian.dtx  (with options: `pkg')
%% 
%% --------------------------------------------------------------
%% xistercian -- Cistercian numerals in LaTeX
%% E-mail: jspratte@yahoo.de
%% Released under the LaTeX Project Public License v1.3c or later
%% See http://www.latex-project.org/lppl.txt
%% --------------------------------------------------------------
%% 
%% Copyright (C) 2020-2021 Jonathan P. Spratte
%% 
%% This  work may be  distributed and/or  modified under  the conditions  of the
%% LaTeX Project Public License (LPPL),  either version 1.3c  of this license or
%% (at your option) any later version.  The latest version of this license is in
%% the file:
%% 
%%   http://www.latex-project.org/lppl.txt
%% 
%% This work is "maintained" (as per LPPL maintenance status) by
%%   Jonathan P. Spratte.
%% 
%% This work consists of the file  xistercian.dtx
%% and the derived files           xistercian.pdf
%%                                 xistercian.sty
%% 
\ProvidesPackage{xistercian}[2021-12-20 v1.2 Cistercian numerals in LaTeX]
\RequirePackage{pgf,expkv-opt}
\newcommand*\xister@th{.1ex}
\newcommand*\xister@tv{.18ex}
\newcommand*\xister@tdu{.1ex}
\newcommand*\xister@tdd{.18ex}
\newcommand*\xister@ts{}
\newcommand*\xister@x{.5em}
\newcommand*\xister@y{1.55ex}
\newcommand*\xister@bx{1.2}
\newcommand*\xister@by{}
\newcommand*\xister@bs{}
\newcommand*\xister@font{\normalfont}
\newcommand*\xister@five@dot{.09ex}
\newcommand*\xister@five@dash{}
\newcommand*\xister@six@dot{.09ex}
\newcommand*\xister@six@dash{}
\newcommand*\xister@share@div{/6}
\newcommand*\xister@share@mul{}
\newif\ifxister@dbg@
\newif\ifxister@five@triangle@\xister@five@triangle@true
\newif\ifxister@five@dot@
\newif\ifxister@six@dot@
\newif\ifxister@six@stroke@\xister@six@stroke@true
\newif\ifxister@nine@triangle@
\newdimen\xister@X
\newdimen\xister@Y
\newdimen\xister@XY@share
\newdimen\xister@Th
\newdimen\xister@Tv
\newdimen\xister@Tdu
\newdimen\xister@Tdd
\newdimen\xister@Ts
\newdimen\xister@TMPA
\newdimen\xister@TMPB
\newdimen\xister@Five@dot
\newdimen\xister@Six@dot
\ExplSyntaxOn
\int_step_inline:nn {9}
  {
    \expandafter\newsavebox\csname xister@digitbox@#1\endcsname
    \expandafter\newsavebox\csname xister@digitbox@#10\endcsname
    \expandafter\newsavebox\csname xister@digitbox@#100\endcsname
    \expandafter\newsavebox\csname xister@digitbox@#1000\endcsname
  }
\ExplSyntaxOff
\expandafter\newsavebox\csname xister@digitbox@0\endcsname
\let\xister@dbg@dim\@gobble
\let\xister@dbg@div\@gobble
\let\xister@dbg@float\@gobble
\ExplSyntaxOn
\cs_new_protected:Npn \xister@if@slash #1 { \tl_if_in:nnTF {#1} { / } }
\ExplSyntaxOff
\protected\long\def\xister@fraction#1/#2\xister@stop
  {%
    \edef\xister@share@mul{\unexpanded{#1}}%
    \xister@dbg@float{#1}%
    \edef\xister@share@div{/\unexpanded{#2}}%
    \xister@dbg@div{#2}%
  }
\protected\def\xister@build@vertical
  {%
    \let\xister@pgfsetcolor\pgfsetcolor
    \let\pgfsetcolor\@gobble
    \xister@setlengths
    \def\xister@sgn{-}%
    \xister@drawzero@vertical
    \xister@drawdigits@vertical{}{}{}%
    \xister@X=-\xister@X
    \xister@Y=-\xister@Y
    \def\xister@sgn{+}%
    \xister@drawdigits@vertical{000}{-}{-}%
    \xister@TMPA=\xister@Tdd
    \xister@Tdd=\xister@Tdu
    \xister@Tdu=\xister@TMPA
    \xister@X=-\xister@X
    \xister@drawdigits@vertical{00}{-}{}%
    \xister@X=-\xister@X
    \xister@Y=-\xister@Y
    \def\xister@sgn{-}%
    \xister@drawdigits@vertical{0}{}{-}%
    \let\pgfsetcolor\xister@pgfsetcolor
  }
\protected\def\xister@build@horizontal
  {%
    \let\xister@pgfsetcolor\pgfsetcolor
    \let\pgfsetcolor\@gobble
    \xister@setlengths
    \def\xister@sgn{-}%
    \xister@drawzero@horizontal
    \xister@drawdigits@horizontal{}{}{}%
    \xister@X=-\xister@X
    \xister@Y=-\xister@Y
    \def\xister@sgn{+}%
    \xister@drawdigits@horizontal{000}{-}{-}%
    \xister@TMPA=\xister@Tdd
    \xister@Tdd=\xister@Tdu
    \xister@Tdu=\xister@TMPA
    \xister@X=-\xister@X
    \xister@drawdigits@horizontal{0}{-}{}%
    \xister@X=-\xister@X
    \xister@Y=-\xister@Y
    \def\xister@sgn{-}%
    \xister@drawdigits@horizontal{00}{}{-}%
    \let\pgfsetcolor\xister@pgfsetcolor
  }
\let\xister@build\xister@build@vertical
\let\xister@build@v\xister@build@vertical
\let\xister@build@h\xister@build@horizontal
\protected\long\def\xister@add@fontfeature#1%
  {%
    \begingroup\expandafter\expandafter\expandafter\endgroup
    \expandafter\ifx
        \csname xister@add@fontfeature@\detokenize{#1}\endcsname
        \relax
      \PackageError{xistercian}{Unsupported font feature `\detokenize{#1}'.}{}%
    \else
      \csname xister@add@fontfeature@\detokenize{#1}\endcsname
    \fi
  }
\def\xister@fontfeatures{\unexpanded\expandafter{\f@size}/}
\ExplSyntaxOn
\AddToHook{begindocument/before}
  {
    \@ifpackageloaded { luacolor }
      {
        \exp_args:No \str_if_in:nnF \xister@fontfeatures { color }
          { \xister@add@fontfeature{color} }
      }
      {}
  }
\ExplSyntaxOff
\def\xister@tmp#1#2%
  {%
    \protected\expandafter\def\csname xister@add@fontfeature@#2\endcsname
      {%
        \edef\xister@fontfeatures
          {%
            \unexpanded\expandafter
              {\xister@fontfeatures\unexpanded\expandafter{#1}}/%
          }%
      }%
  }
\expandafter\xister@tmp\csname\@backslashchar color@.\endcsname{color}
\xister@tmp\f@encoding{encoding}
\xister@tmp\f@family  {family}
\xister@tmp\f@series  {series}
\xister@tmp\f@shape   {shape}
\xister@tmp\f@size    {size}
\ekvifdefinedset{xister}
  {\PackageError{xistercian}{keyval conflict detected. Aborting}{}\endinput}{}
\def\xister@tmp#1#2#3%
  {%
    \protected\long\ekvdef{xister}{#1}{#3}%
    \ekvletkv{xister}{#2}{xister}{#1}%
  }
\xister@tmp{wd}{width}{\edef\xister@x{\unexpanded{#1}}\xister@dbg@dim{#1}}
\xister@tmp{ht}{height}{\edef\xister@y{\unexpanded{#1}}\xister@dbg@dim{#1}}
\xister@tmp{bx}{bound-x}{\edef\xister@bx{\unexpanded{#1}}\xister@dbg@float{#1}}
\xister@tmp{by}{bound-y}{\edef\xister@by{\unexpanded{#1}}\xister@dbg@float{#1}}
\xister@tmp{bs}{baseline}{\edef\xister@bs{\unexpanded{#1}}\xister@dbg@float{#1}}
\xister@tmp{sv}{stroke-v}{\edef\xister@tv{\unexpanded{#1}}\xister@dbg@dim{#1}}
\xister@tmp{sh}{stroke-h}{\edef\xister@th{\unexpanded{#1}}\xister@dbg@dim{#1}}
\xister@tmp{sdu}{stroke-du}
  {\edef\xister@tdu{\unexpanded{#1}}\xister@dbg@dim{#1}}
\xister@tmp{sdd}{stroke-dd}
  {\edef\xister@tdd{\unexpanded{#1}}\xister@dbg@dim{#1}}
\xister@tmp{ss}{stroke-s}
  {%
    \edef\xister@ts{\unexpanded{#1}}%
    \unless\ifx\xister@ts\@empty\xister@dbg@dim{#1}\fi
  }
\xister@tmp{s}{strokes}
  {%
    \edef\xister@tv{\unexpanded{#1}}%
    \let\xister@th\xister@tv
    \let\xister@tdu\xister@tv
    \let\xister@tdd\xister@tv
    \let\xister@ts\xister@tv
    \xister@dbg@dim{#1}%
  }
\xister@tmp{f}{font}{\edef\xister@font{\unexpanded{#1}}}
\xister@tmp{o}{orientation}
  {%
    \begingroup\expandafter\expandafter\expandafter\endgroup
    \expandafter\ifx\csname xister@build@#1\endcsname\relax
      \PackageError{xister}%
        {Unaccepted orientation. Choices are horizontal/h or vertical/v}{}%
    \else
      \expandafter\let\expandafter\xister@build\csname xister@build@#1\endcsname
    \fi
  }
\xister@tmp{fr}{fraction}
  {%
    \xister@if@slash{#1}%
      {\xister@fraction#1\xister@stop}%
      {%
        \let\xister@share@div\@empty
        \edef\xister@share@mul{\unexpanded{#1}}%
        \xister@dbg@float{#1}%
      }%
  }
\xister@tmp{r}{redraw}
  {\let\xister@fontfeatures\@empty\ekvcsvloop\xister@add@fontfeature{#1}}
\xister@tmp{r+}{redraw+}{\ekvcsvloop\xister@add@fontfeature{#1}}
\ekvletkv{xister}{r +}{xister}{r+}
\ekvletkv{xister}{redraw +}{xister}{redraw+}
\protected\long\ekvdef{xister/5}{dot}
  {%
    \xister@five@triangle@false
    \xister@five@dot@true
    \edef\xister@five@dot{\unexpanded{#1}}%
    \xister@dbg@dim{#1}%
  }
\protected\long\ekvdef{xister/5}{dash}
  {%
    \xister@five@triangle@false
    \xister@five@dot@false
    \edef\xister@five@dash{\unexpanded{#1}}%
    \xister@dbg@float{#1}%
  }
\protected\ekvdefNoVal{xister/5}{triangle}{\xister@five@triangle@true}
\protected\ekvdefNoVal{xister/5}{dot}
  {%
    \xister@five@triangle@false
    \xister@five@dot@true
  }
\protected\ekvdefNoVal{xister/5}{dash}
  {%
    \xister@five@triangle@false
    \xister@five@dot@false
  }
\protected\ekvsetdef\xister@five@set{xister/5}
\ekvlet{xister}{5}\xister@five@set
\ekvlet{xister}{alternate-5}\xister@five@set
\let\xister@five@set\xister@undefined
\protected\long\ekvdef{xister/6}{dot}
  {%
    \xister@six@stroke@false
    \xister@six@dot@true
    \edef\xister@six@dot{\unexpanded{#1}}%
    \xister@dbg@dim{#1}%
  }
\protected\long\ekvdef{xister/6}{dash}
  {%
    \xister@six@stroke@false
    \xister@six@dot@false
    \edef\xister@six@dash{\unexpanded{#1}}%
    \xister@dbg@float{#1}%
  }
\protected\ekvdefNoVal{xister/6}{stroke}{\xister@six@stroke@true}
\protected\ekvdefNoVal{xister/6}{dot}
  {%
    \xister@six@stroke@false
    \xister@six@dot@true
  }
\protected\ekvdefNoVal{xister/6}{dash}
  {%
    \xister@six@stroke@false
    \xister@six@dot@false
  }
\protected\ekvsetdef\xister@six@set{xister/6}
\ekvlet{xister}{6}\xister@six@set
\ekvlet{xister}{alternate-6}\xister@six@set
\let\xister@six@set\xister@undefined
\protected\ekvdefNoVal{xister/9}{rectangle}{\xister@nine@triangle@false}
\protected\ekvdefNoVal{xister/9}{triangle}{\xister@nine@triangle@true}
\protected\ekvsetdef\xister@nine@set{xister/9}
\ekvlet{xister}{9}\xister@nine@set
\ekvlet{xister}{alternate-9}\xister@nine@set
\protected\ekvdefNoVal{xister}{horizontal}
  {%
    \let\xister@build\xister@build@horizontal
    \def\xister@x{.775em}%
    \def\xister@y{1.13ex}%
  }
\protected\ekvdefNoVal{xister}{vertical}
  {%
    \let\xister@build\xister@build@vertical
    \def\xister@x{.5em}%
    \def\xister@y{1.55ex}%
  }
\protected\ekvdefNoVal{xister}{debug}
  {%
    \xister@dbg@true
    \protected\long\def\xister@dbg@dim##1%
      {%
        \typeout
          {%
            Package xistercian Debug: Trying to use dimension
            `\unexpanded{##1}'.%
          }%
        \xister@TMPA=\dimexpr##1\relax
        \typeout{Package xistercian Debug: Done.}%
      }%
    \protected\long\def\xister@dbg@float##1%
      {%
        \typeout
          {Package xistercian Debug: Trying to use float `\unexpanded{##1}'.}%
        \xister@TMPA=##1\z@
        \typeout{Package xistercian Debug: Done.}%
      }%
    \protected\long\def\xister@dbg@div##1%
      {%
        \typeout
          {Package xistercian Debug: Trying to use divisor `\unexpanded{##1}'.}%
        \xister@TMPA=\dimexpr\z@/##1\relax
        \typeout{Package xistercian Debug: Done.}%
      }%
  }
\ekvoProcessLocalOptions{xister}
\protected\ekvdefNoVal{xister}{r!}{\cistercianredraw}
\protected\ekvdefNoVal{xister}{r} {\cistercianredrawlazy}
\ekvletkvNoVal{xister}{redraw} {xister}{r}
\ekvletkvNoVal{xister}{redraw!}{xister}{r!}
\ekvdefNoVal{xister}{debug}
  {\PackageError{xister}{`debug' is only available as a load time option}{}}
\protected\ekvsetdef\cisterciansetup{xister}
\protected\def\cistercianstyle
  {%
    \@ifstar
      {\xister@style\ekvifdefined{\long\ekvdef}}%
      {\xister@style\ekvifdefinedNoVal\ekvdefNoVal}%
  }
\protected\long\def\xister@style#1#2#3#4%
  {%
    #1{xister}{#3}%
      {\PackageError{xistercian}{Key `#3' already defined}{}}%
      {\protected#2{xister}{#3}{\cisterciansetup{#4}}}%
  }
\newcommand\cistercian[1]{\expandafter\@cistercian\csname c@#1\endcsname}
\newcommand\@cistercian[1]{\expandafter\cisterciannum\expandafter{\the#1}}
\edef\cisterciannum
  {%
    \unexpanded{\xister@texorpdf}%
    \unexpanded\expandafter
      {\csname cisterciannum \endcsname\cisterciannum@pdf}%
  }
\protected\expandafter\def\csname cisterciannum \endcsname#1{\xister@a#1@}
\def\cisterciannum@pdf#1{CISTER#1}
\newcommand\cisterciannumE[1]
  {\expandafter\cisterciannum\expandafter{\the\numexpr#1\relax}}
\protected\def\cistercianredraw
  {%
    \def\xister@last@font{\xister@last@font}%
    \xister@ensure@current
  }
\protected\def\cistercianredrawlazy{\def\xister@last@font{\xister@last@font}}
\def\xister@gobbletoat#1@{}
\def\xister@gobbletozero#10{}
\def\xister@gobblecopy0\rlap#1{}
\def\xister@done#1\xister@symbols{}
\let\xister@texorpdf\@firstoftwo
\AddToHook{package/hyperref/after}
  {%
    \ifdefined\texorpdfstring
      \def\xister@texorpdf{\texorpdfstring}%
    \fi
  }
\AddToHook{begindocument/before}
  {%
    \ifdefined\texorpdfstring
      \def\xister@texorpdf{\texorpdfstring}%
    \fi
  }
\def\xister@a#1%
  {%
    \leavevmode
    \xister@ensure@current
    \ifx-#1-\expandafter\xister@b
    \else\expandafter\xister@b\expandafter#1\fi
  }
\def\xister@b#1@%
  {%
    \if\relax\detokenize{#1}\relax
      \expandafter\xister@gobbletozero\the\numexpr\relax
      \xister@symbols0000@@@@%
      \expandafter\@gobbletwo
    \fi
    \@firstofone{\xister@c#1@@@@@@@@\relax#1@@@@}%
  }
\def\xister@c#1#2#3#4#5#6#7#8%
  {%
    \xister@gobbletoat
      #1\xister@d{}%
      #2\xister@d{000}%
      #3\xister@d{00}%
      #4\xister@d0%
      #5\xister@d{}%
      #6\xister@d{000}%
      #7\xister@d{00}%
      #8\xister@d0%
      @\xister@c
  }
\def\xister@d#1#2@\xister@c#3\relax{\xister@symbols#1}
\def\xister@symbols#1%
  {%
    \protected\def\xister@symbols##1##2##3##4%
      {%
        \xister@gobbletoat##1\xister@done @%
        \xister@gobbletozero##1\xister@gobblecopy0%
          \rlap{\copy\csname xister@digitbox@##1000\endcsname}%
        \xister@gobbletozero##2\xister@gobblecopy0%
          \rlap{\copy\csname xister@digitbox@##200\endcsname}%
        \xister@gobbletozero##3\xister@gobblecopy0%
          \rlap{\copy\csname xister@digitbox@##30\endcsname}%
        \xister@gobbletozero##4\xister@gobblecopy0%
          \rlap{\copy\csname xister@digitbox@##4\endcsname}%
        \copy#1%
        \xister@symbols
      }%
  }
\expandafter\xister@symbols\csname xister@digitbox@0\endcsname
\newcommand*\xister@clip@v[1]
  {%
    \pgfpathrectanglecorners
      {\pgfpoint{\dimexpr\ifdim\xister@X<\z@-\fi\xister@Ts\relax}{#1}}%
      {\pgfpoint\xister@X\xister@Y}%
    \pgfusepath{clip}%
  }
\newcommand*\xister@clip@h[1]
  {%
    \pgfpathrectanglecorners
      {\pgfpoint{#1}{-\dimexpr\ifdim\xister@Y<\z@-\fi\xister@Ts\relax}}%
      {\pgfpoint{-\xister@X}\xister@Y}%
    \pgfusepath{clip}%
  }
\newcommand\xister@drawdigits@vertical[3]
  {%
    \xister@XY@share=\dimexpr\xister@share@mul\xister@Y\xister@share@div\relax
    \xister@drawdigit{1#1}%
      {%
        \pgfsetlinewidth{2\xister@Th}%
        \xister@TMPA=\dimexpr\xister@Y\xister@sgn\xister@Th\relax
        \pgfpathmoveto{\pgfpoint\z@\xister@TMPA}%
        \pgfpathlineto{\pgfpoint\xister@X\xister@TMPA}%
      }%
    \xister@drawdigit{2#1}%
      {%
        \pgfsetlinewidth{2\xister@Th}%
        \xister@TMPA=\dimexpr\xister@XY@share+#2\xister@Th\relax
        \pgfpathmoveto{\pgfpoint\z@\xister@TMPA}%
        \pgfpathlineto{\pgfpoint\xister@X\xister@TMPA}%
      }%
    \xister@drawdigit{3#1}%
      {%
        \xister@TMPB=#3\dimexpr\xister@Ts-\xister@Tdd\relax
        \xister@clip@v\xister@XY@share
        \pgfsetlinewidth{2\xister@Tdd}%
        \pgfpathmoveto{\pgfpoint\xister@TMPB\xister@XY@share}%
        \pgfpathlineto{\pgfpoint\xister@TMPB\xister@Y}%
        \pgfpathlineto{\pgfpoint\xister@X\xister@XY@share}%
      }%
    \xister@drawdigit{4#1}%
      {%
        \xister@clip@v\z@
        \xister@TMPB=#3\dimexpr\xister@Ts-\xister@Tdu\relax
        \pgfsetlinewidth{2\xister@Tdu}%
        \pgfpathmoveto{\pgfpoint\xister@TMPB\xister@Y}%
        \pgfpathlineto{\pgfpoint\xister@TMPB\xister@XY@share}%
        \pgfpathlineto{\pgfpoint\xister@X\xister@Y}%
      }%
    \xister@drawdigit{5#1}%
      {%
        \ifxister@five@triangle@
          \xister@clip@v\z@
          \xister@TMPB=%
            #3\dimexpr\xister@Ts-\xister@Tdu\relax
          \pgfsetlinewidth{2\xister@Tdu}%
          \pgfpathmoveto{\pgfpoint\xister@TMPB\xister@Y}%
          \pgfpathlineto{\pgfpoint\xister@TMPB\xister@XY@share}%
          \pgfpathlineto{\pgfpoint\xister@X\xister@Y}%
          \pgfusepath{stroke,clip}%
          \pgfsetlinewidth{2\xister@Th}%
          \xister@TMPA=\dimexpr\xister@Y\xister@sgn\xister@Th\relax
          \pgfpathmoveto{\pgfpoint\z@\xister@TMPA}%
          \pgfpathlineto{\pgfpoint\xister@X\xister@TMPA}%
        \else\ifxister@five@dot@
          \pgfpathcircle
            {\pgfpoint{\dimexpr\xister@X-#3\xister@Five@dot\relax}%
                      {\dimexpr\xister@Y-#2\xister@Five@dot\relax}}%
            {\xister@Five@dot}%
          \pgfusepath{fill}%
        \else
          \xister@TMPB=\dimexpr\xister@X-#3\xister@Tv\relax
          \pgfsetlinewidth{2\xister@Tv}%
          \pgfpathmoveto{\pgfpoint\xister@TMPB\xister@Y}%
          \pgfpathlineto
            {%
              \pgfpoint
                \xister@TMPB
                {\dimexpr\xister@Y-#2\xister@five@dash\xister@Tv*2\relax}%
            }%
        \fi\fi
      }%
    \xister@drawdigit{6#1}%
      {%
        \pgfsetlinewidth{2\xister@Tv}%
        \xister@TMPB=\dimexpr\xister@X-#3\xister@Tv\relax
        \pgfpathmoveto{\pgfpoint\xister@TMPB\xister@Y}%
        \pgfpathlineto{\pgfpoint\xister@TMPB\xister@XY@share}%
      }%
    \xister@superimpose{7#1}%
      {%
        \rlap{\copy\csname xister@digitbox@1#1\endcsname}%
        \copy\csname xister@digitbox@6#1\endcsname
      }%
    \xister@superimpose{8#1}%
      {%
        \rlap{\copy\csname xister@digitbox@2#1\endcsname}%
        \copy\csname xister@digitbox@6#1\endcsname
      }%
    \ifxister@nine@triangle@
      \xister@drawdigit{9#1}%
        {%
          \xister@TMPA=.5\dimexpr\xister@XY@share+\xister@Y\relax
          \xister@TMPB=#3\dimexpr\xister@Ts-\xister@Tdd\relax
          \xister@clip@v\z@
          \pgfsetlinewidth{2\xister@Tdd}%
          \pgfpathmoveto{\pgfpoint\xister@TMPB\xister@XY@share}%
          \pgfpathlineto{\pgfpoint\xister@TMPB\xister@Y}%
          \pgfpathlineto{\pgfpoint\xister@X\xister@TMPA}%
          \pgfusepath{stroke}%
          \xister@TMPB=#3\dimexpr\xister@Ts-\xister@Tdu\relax
          \pgfsetlinewidth{2\xister@Tdu}%
          \pgfpathmoveto{\pgfpoint\xister@TMPB\xister@Y}%
          \pgfpathlineto{\pgfpoint\xister@TMPB\xister@XY@share}%
          \pgfpathlineto{\pgfpoint\xister@X\xister@TMPA}%
        }%
    \else
      \xister@superimpose{9#1}%
        {%
          \rlap{\copy\csname xister@digitbox@1#1\endcsname}%
          \rlap{\copy\csname xister@digitbox@2#1\endcsname}%
          \copy\csname xister@digitbox@6#1\endcsname
        }%
    \fi
    \unless\ifxister@six@stroke@
      \xister@drawdigit{6#1}%
        {%
          \ifxister@six@dot@
            \xister@TMPA=\dimexpr\xister@X-#3\xister@Six@dot\relax
            \pgfpathcircle
              {\pgfpoint\xister@TMPA
                        {\dimexpr\xister@Y-#2\xister@Six@dot\relax}}%
              {\xister@Six@dot}%
            \pgfpathcircle
              {\pgfpoint\xister@TMPA
                        {\dimexpr\xister@XY@share+#2\xister@Six@dot\relax}}%
              {\xister@Six@dot}%
            \pgfusepath{fill}%
          \else
            \xister@TMPB=\dimexpr\xister@X-#3\xister@Tv\relax
            \xister@TMPA=2\dimexpr#2\xister@six@dash\xister@Tv\relax
            \pgfsetlinewidth{2\xister@Tv}%
            \pgfpathmoveto{\pgfpoint\xister@TMPB\xister@Y}%
            \pgfpathlineto
              {\pgfpoint\xister@TMPB
                        {\dimexpr\xister@Y-\xister@TMPA\relax}}%
            \pgfpathmoveto{\pgfpoint\xister@TMPB\xister@XY@share}%
            \pgfpathlineto
              {\pgfpoint\xister@TMPB
                        {\dimexpr\xister@XY@share+\xister@TMPA\relax}}%
          \fi
        }%
    \fi
  }
\newcommand\xister@drawdigits@horizontal[3]
  {%
    \xister@XY@share=-\dimexpr\xister@share@mul\xister@X\xister@share@div\relax
    \xister@drawdigit{1#1}%
      {%
        \pgfsetlinewidth{2\xister@Tv}%
        \xister@TMPA=\dimexpr#3\xister@Tv-\xister@X\relax
        \pgfpathmoveto{\pgfpoint\xister@TMPA\z@}%
        \pgfpathlineto{\pgfpoint\xister@TMPA\xister@Y}%
      }%
    \xister@drawdigit{2#1}%
      {%
        \pgfsetlinewidth{2\xister@Tv}%
        \xister@TMPA=\dimexpr\xister@XY@share-#3\xister@Tv\relax
        \pgfpathmoveto{\pgfpoint\xister@TMPA\z@}%
        \pgfpathlineto{\pgfpoint\xister@TMPA\xister@Y}%
      }%
    \xister@drawdigit{3#1}%
      {%
        \xister@TMPB=#2\dimexpr\xister@Ts-\xister@Tdu\relax
        \xister@clip@h\xister@XY@share
        \pgfsetlinewidth{2\xister@Tdu}%
        \pgfpathmoveto{\pgfpoint\xister@XY@share\xister@TMPB}%
        \pgfpathlineto{\pgfpoint{-\xister@X}\xister@TMPB}%
        \pgfpathlineto{\pgfpoint\xister@XY@share\xister@Y}%
      }%
    \xister@drawdigit{4#1}%
      {%
        \xister@clip@h\z@
        \xister@TMPB=#2\dimexpr\xister@Ts-\xister@Tdd\relax
        \pgfsetlinewidth{2\xister@Tdd}%
        \pgfpathmoveto{\pgfpoint\xister@X\xister@TMPB}%
        \pgfpathlineto{\pgfpoint\xister@XY@share\xister@TMPB}%
        \pgfpathlineto{\pgfpoint{-\xister@X}\xister@Y}%
      }%
    \xister@drawdigit{5#1}%
      {%
        \ifxister@five@triangle@
          \xister@clip@h\z@
          \xister@TMPB=#2\dimexpr\xister@Ts-\xister@Tdd\relax
          \pgfsetlinewidth{2\xister@Tdd}%
          \pgfpathmoveto{\pgfpoint{-\xister@X}\xister@TMPB}%
          \pgfpathlineto{\pgfpoint\xister@XY@share\xister@TMPB}%
          \pgfpathlineto{\pgfpoint{-\xister@X}\xister@Y}%
          \pgfusepath{stroke,clip}%
          \pgfsetlinewidth{2\xister@Tv}%
          \xister@TMPA=\dimexpr#3\xister@Tv-\xister@X\relax
          \pgfpathmoveto{\pgfpoint\xister@TMPA\z@}%
          \pgfpathlineto{\pgfpoint\xister@TMPA\xister@Y}%
        \else\ifxister@five@dot@
          \pgfpathcircle
            {\pgfpoint{\dimexpr#3\xister@Five@dot-\xister@X\relax}%
                      {\dimexpr\xister@Y-#2\xister@Five@dot\relax}}%
            {\xister@Five@dot}%
          \pgfusepath{fill}%
        \else
          \pgfsetlinewidth{2\xister@Th}%
          \xister@TMPB=\dimexpr\xister@Y-#2\xister@Th\relax
          \pgfpathmoveto{\pgfpoint{-\xister@X}\xister@TMPB}%
          \pgfpathlineto
            {%
              \pgfpoint
                {\dimexpr#3\xister@five@dash\xister@Th*2-\xister@X\relax}%
                \xister@TMPB
            }%
        \fi\fi
      }%
    \xister@drawdigit{6#1}%
      {%
        \pgfsetlinewidth{2\xister@Th}%
        \xister@TMPB=\dimexpr\xister@Y-#2\xister@Th\relax
        \pgfpathmoveto{\pgfpoint{-\xister@X}\xister@TMPB}%
        \pgfpathlineto{\pgfpoint\xister@XY@share\xister@TMPB}%
      }%
    \xister@superimpose{7#1}%
      {%
        \rlap{\copy\csname xister@digitbox@1#1\endcsname}%
        \copy\csname xister@digitbox@6#1\endcsname
      }%
    \xister@superimpose{8#1}%
      {%
        \rlap{\copy\csname xister@digitbox@2#1\endcsname}%
        \copy\csname xister@digitbox@6#1\endcsname
      }%
    \ifxister@nine@triangle@
      \xister@drawdigit{9#1}%
        {%
          \xister@TMPA=.5\dimexpr\xister@XY@share-\xister@X\relax
          \xister@TMPB=#2\dimexpr\xister@Ts-\xister@Tdu\relax
          \xister@clip@h\z@
          \pgfsetlinewidth{2\xister@Tdu}%
          \pgfpathmoveto{\pgfpoint\xister@XY@share\xister@TMPB}%
          \pgfpathlineto{\pgfpoint{-\xister@X}\xister@TMPB}%
          \pgfpathlineto{\pgfpoint\xister@TMPA\xister@Y}%
          \pgfusepath{stroke}%
          \xister@TMPB=#2\dimexpr\xister@Ts-\xister@Tdd\relax
          \pgfsetlinewidth{2\xister@Tdd}%
          \pgfpathmoveto{\pgfpoint\xister@X\xister@TMPB}%
          \pgfpathlineto{\pgfpoint\xister@XY@share\xister@TMPB}%
          \pgfpathlineto{\pgfpoint\xister@TMPA\xister@Y}%
        }%
    \else
      \xister@superimpose{9#1}%
        {%
          \rlap{\copy\csname xister@digitbox@1#1\endcsname}%
          \rlap{\copy\csname xister@digitbox@2#1\endcsname}%
          \copy\csname xister@digitbox@6#1\endcsname
        }%
    \fi
    \unless\ifxister@six@stroke@
      \xister@drawdigit{6#1}%
        {%
          \ifxister@six@dot@
            \xister@TMPA=\dimexpr\xister@Y-#2\xister@Six@dot\relax
            \pgfpathcircle
              {\pgfpoint{\dimexpr#3\xister@Six@dot-\xister@X\relax}%
                        \xister@TMPA}%
              {\xister@Six@dot}%
            \pgfpathcircle
              {\pgfpoint{\dimexpr\xister@XY@share-#3\xister@Six@dot\relax}%
                        \xister@TMPA}%
              {\xister@Six@dot}%
            \pgfusepath{fill}%
          \else
            \pgfsetlinewidth{2\xister@Th}%
            \xister@TMPB=\dimexpr\xister@Y-#2\xister@Th\relax
            \xister@TMPA=2\dimexpr#3\xister@six@dash\xister@Th\relax
            \pgfpathmoveto{\pgfpoint{-\xister@X}\xister@TMPB}%
            \pgfpathlineto
              {\pgfpoint{\dimexpr\xister@TMPA-\xister@X\relax}%
                        \xister@TMPB}%
            \pgfpathmoveto{\pgfpoint\xister@XY@share\xister@TMPB}%
            \pgfpathlineto
              {\pgfpoint{\dimexpr\xister@XY@share-\xister@TMPA\relax}%
                        \xister@TMPB}%
          \fi
        }%
    \fi
  }
\newcommand\xister@drawdigit[2]
  {%
    \expandafter\setbox\csname xister@digitbox@#1\endcsname=\hbox
      {%
        \begin{pgfpicture}%
          \pgfpathrectanglecorners
            {\pgfpoint{-\xister@bx\xister@X}{-\xister@by\xister@Y}}%
            {\pgfpoint{\xister@bx\xister@X}{\xister@by\xister@Y}}%
          \pgfusepath{use as bounding box}%
          #2%
          \pgfusepath{stroke}%
          \pgfsetbaseline{\xister@sgn\xister@bs\xister@Y}%
        \end{pgfpicture}%
      }%
  }
\newcommand*\xister@drawzero@vertical
  {%
    \xister@drawdigit{0}%
      {%
        \pgfsetlinewidth{2\xister@Ts}%
        \pgfpathmoveto{\pgfpoint\z@{-\xister@Y}}%
        \pgfpathlineto{\pgfpoint\z@\xister@Y}%
      }%
  }
\newcommand*\xister@drawzero@horizontal
  {%
    \xister@drawdigit{0}%
      {%
        \pgfsetlinewidth{2\xister@Ts}%
        \pgfpathmoveto{\pgfpoint{-\xister@X}\z@}%
        \pgfpathlineto{\pgfpoint\xister@X\z@}%
      }%
  }
\newcommand\xister@superimpose[2]
  {\expandafter\setbox\csname xister@digitbox@#1\endcsname=\hbox{#2}}
\protected\def\xister@setlengths
  {%
    \begingroup
      \xister@font
      \edef\xister@tmp
        {%
          \endgroup
          \xister@X=\the\dimexpr.5\dimexpr\xister@x\relax\relax
          \xister@Y=\the\dimexpr.5\dimexpr\xister@y\relax\relax
          \xister@Th=\the\dimexpr.5\dimexpr\xister@th\relax\relax
          \xister@Tv=\the\dimexpr.5\dimexpr\xister@tv\relax\relax
          \xister@Tdu=\the\dimexpr.5\dimexpr\xister@tdu\relax\relax
          \xister@Tdd=\the\dimexpr.5\dimexpr\xister@tdd\relax\relax
          \xister@Five@dot=\the\dimexpr\xister@five@dot\relax
          \xister@Six@dot=\the\dimexpr\xister@six@dot\relax
          \ifx\xister@ts\@empty
            \xister@Ts=%
              \ifx\xister@build\xister@build@h\xister@Th\else\xister@Tv\fi
          \else
            \xister@Ts=\the\dimexpr.5\dimexpr\xister@ts\relax\relax
          \fi
        }%
    \xister@tmp
  }
\protected\edef\xister@ensure@current
  {%
    \unexpanded{\edef\xister@tmp{\xister@fontfeatures}}%
    \unexpanded{\unless\ifx\xister@tmp\xister@last@font}%
      \ifxister@dbg@
        \unexpanded
          {%
            \typeout
              {%
                Package xistercian Debug: Font changed. Building glyphs for
                \xister@tmp.
              }%
          }%
      \fi
    \unexpanded
      {%
          \let\xister@last@font\xister@tmp
          \xister@build
      }%
      \ifxister@dbg@
        \unexpanded{\typeout{Package xistercian Debug: Done.}}%
      \fi
    \unexpanded{\fi}%
  }
\AtBeginDocument{\xister@ensure@current}
%% 
%%
%% End of file `xistercian.sty'.
