summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/grnumalt/grnumalt.sty
blob: f4bedad8b275ff2e75127d585f362ad33cbf012c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
%%
%% This is file `grnumalt.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% grnumalt.dtx  (with options: `package')
%% 
%%   This is a generated file.
%%   Copyright 1997 Apostolos Syropoulos
%% 
%% You are NOT ALLOWED to change this file.
%% 
%% \CheckSum{134}
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%% This is file `grnumalt.dtx'
%% (c) 1997 Apostolos Syropoulos.
%% All rights reserved.
\ProvidesPackage{grnumalt}[1997/09/19\space v1.1]
\typeout{Package: `grnumalt' v1.0\space <1997/09/19> (AS)}
\newdimen\@boxW \newdimen\@boxH
\DeclareRobustCommand{\PiIt}[1]{%
    \settowidth{\@boxW}{#1}%
    \settoheight{\@boxH}{#1}%
    \addtolength{\@boxW}{0.8pt}
    \vbox{%
    \hrule width\@boxW\hbox{%
          \vrule height\@boxH\mbox{#1}%
          \vrule height\@boxH}}\kern.5pt}
\newcount\@ath@num
\DeclareRobustCommand{\athnum}[1]{%
        \ifmmode
          \errhelp{^^J This macro has been defined to work^^J
                     *only* in non-math mode. It is definitely^^J
                     sure that you are  using it in math mode.^^J}%
          \errmessage{^^JYou can't use macro atheniannumeral^^J
                        in math mode.^^J}%
        \else\@ath@num#1\relax
        \ifnum\@ath@num=\z@%
          \space%
          \PackageWarning{grnumalt}{%
           Illegal value (\the\@ath@num) for athenian numeral}%
        \else\ifnum\@ath@num<\z@%
          \space%
          \PackageWarning{grnumalt}{%
          Illegal value (\the\@ath@num) for athenian numeral}%
        \else$
            \loop\ifnum\@ath@num>49999
               \PiIt{$\mathrm{M}$}
               \advance\@ath@num-50000
            \repeat
            \loop\ifnum\@ath@num>9999
            \mathrm{M}\advance\@ath@num-\@M
            \repeat
            \ifnum\@ath@num>4999
               \PiIt{$\mathrm{X}$}
               \advance\@ath@num-5000
            \fi
            \loop\ifnum\@ath@num>999
            \mathrm{X}\advance\@ath@num-\@m
            \repeat
            \ifnum\@ath@num>499
               \PiIt{$\mathrm{H}$}
               \advance\@ath@num-500
            \fi
            \loop\ifnum\@ath@num>99
            \mathrm{H}\advance\@ath@num-100
            \repeat
            \ifnum\@ath@num>49
               \PiIt{$\Delta$}
               \advance\@ath@num-50
            \fi
            \loop\ifnum\@ath@num>9
            \Delta\advance\@ath@num by-10
            \repeat
            \ifnum\@ath@num>4
               \Pi
               \advance\@ath@num-5
            \fi
            \ifcase\@ath@num
               \or\mathrm{I}
               \or\mathrm{II}
               \or\mathrm{III}
               \or\mathrm{IIII}
            \fi$
   \fi\fi\fi}
\let\@athnum\athnum
\endinput
%%
%% End of file `grnumalt.sty'.