summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/babel-greek/athnum.sty
blob: 420deb58cbadc2ce9be582c8da9ba9697fda6844 (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
%%
%% This is file `athnum.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% athnum.dtx  (with options: `package')
%% This is a generated file.
%% 
%% Copyright 1989-2008 Apostolos Syropoulos, Johannes L. Braams,  Guenter Milde,
%% and the authors listed elsewhere in this file. All rights reserved.
%% 
%% This file was generated from file(s) of the babel-greek package.
%% ----------------------------------------------------------------
%% 
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
%% 
%% This work has the LPPL maintenance status "maintained".
%% 
%% The Current Maintainer of this work is Günter Milde <milde@users.sf.net>.
%% 
%% Babel-greek is a contributed package providing support for the Greek
%% language and script via the Babel system (http://www.ctan.org/pkg/babel).
%% 
%% The list of derived (unpacked) files belonging to this work
%% and covered by LPPL is defined by the unpacking script (babel-greek.ins)
%% which is part of the package.
%% \CheckSum{125}
%% This is file `athnum.dtx'
%% (c) 1997-2007 Apostolos Syropoulos.
%% All rights reserved.
\NeedsTeXFormat{LaTeX2e}[1996/01/01]
\ProvidesPackage{athnum}[2003/08/24\space v1.1]
\typeout{Package: `athnum' v1.1\space <2003/08/24> (A. Syropoulos)}
\@ifpackagewith{babel}{greek}{}{%
   \@ifpackagewith{babel}{polutonikogreek}{}{%
     \PackageError{athnum}{%
     `greek' option of the `babel'\MessageBreak
      package hasn't been loaded}{%
      The commands provided by this package\MessageBreak
      are specially designed for greek language\MessageBreak
      typesetting with the `babel' package. Load\MessageBreak
      it with at least the `greek' option.}\relax
      }}
\DeclareTextCommand{\PiDelta}{LGR}{\char"02\relax}
\DeclareTextCommand{\PiEta}{LGR}{\char"03\relax}
\DeclareTextCommand{\PiChi}{LGR}{\char"04\relax}
\DeclareTextCommand{\PiMu}{LGR}{\char"05\relax}
\newcount\@ath@num
\DeclareRobustCommand*{\@@athnum}[1]{%
        \@ath@num#1\relax
        \ifnum\@ath@num<\@ne%
          \space%
          \PackageWarning{athnum}{%
          Illegal value (\the\@ath@num) for athenian numeral}%
        \else\ifnum\@ath@num>249999%
          \space%
          \PackageWarning{athnum}{%
          Illegal value (\the\@ath@num) for athenian numeral}%
        \else
            \@whilenum\@ath@num>49999\do{%
               \PiMu\advance\@ath@num-50000}%
            \@whilenum\@ath@num>9999\do{%
               M\advance\@ath@num-\@M}%
            \ifnum\@ath@num>4999%
               \PiChi\advance\@ath@num-5000%
            \fi\relax
            \@whilenum\@ath@num>999\do{%
               Q\advance\@ath@num-\@m}%
            \ifnum\@ath@num>499%
               \PiEta\advance\@ath@num-500%
            \fi\relax
            \@whilenum\@ath@num>99\do{%
               H\advance\@ath@num-100}%
            \ifnum\@ath@num>49%
               \PiDelta\advance\@ath@num-50%
            \fi\relax
            \@whilenum\@ath@num>9\do{%
               D\advance\@ath@num by-10}%
            \@whilenum\@ath@num>4\do{%
               P\advance\@ath@num-5}%
            \ifcase\@ath@num\or I\or II\or III\or IIII\fi%
   \fi\fi}
\def\@athnum#1{%
     \expandafter\@@athnum\expandafter{\the#1}}
\def\athnum#1{%
     \@ath@num#1\relax
     \@athnum{\@ath@num}}
\endinput
%%
%% End of file `athnum.sty'.