summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/modroman/modroman.sty
blob: 4a01d70aa973446bbed5e8700e062a7fd1d34b56 (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
%%
%% This is file `modroman.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% modroman.dtx  (with options: `package')
%% 
%% This is a generated file.
%% 
%% Copyright (C) 2003, 2004 by Y. Henel, le TeXnicien de surface
%% <Yvon.Henel@wanadoo.fr>
%% 
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.2 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.2 or later is part of all distributions of LaTeX version
%% 1999/12/01 or later.
%% 
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\def\fileversion{v0.3}
\def\filedate{2004/05/19}
\def\fileinfo{fichier modroman.dtx par Le TeXnicien de surface}
\ProvidesPackage{modroman}
   [\filedate\space\fileversion\space\fileinfo]
\newif\if@upourv
\DeclareOption{upourv}{\@upourvtrue}
\DeclareOption{vpourv}{\@upourvfalse}
\DeclareOption{defaut}{\@upourvfalse}
\ExecuteOptions{defaut}
\ProcessOptions\relax
\newcount\romt@mp
\def\modromannumeral{\afterassignment\modrom@naux \romt@mp=}
\def\modrom@naux{\ifnum\romt@mp<10
  \modrom@ni{\romt@mp}\else\modrom@nii{\romt@mp}\fi\relax}
\if@upourv
\def\modrom@ni#1{\ifcase#1 \or i\or ij\or iij\or iu\or
  u\or uj\or uij\or uiij\or ix\fi\relax}\else
\def\modrom@ni#1{\ifcase#1 \or i\or ij\or iij\or iv\or
  v\or vj\or vij\or viij\or ix\fi\relax}\fi
\def\modrom@nii#1{{\count0 =#1\count1 =\count0 %
    \divide\count0 by 10 \multiply\count0 by 10 %
    \advance \count1 by -\count0 %
    \romannumeral\count0\modrom@nij{\count1}%
  }}
\if@upourv
\def\modrom@nij#1{\ifcase#1 \or j\or ij\or iij\or iu\or
  u\or uj\or uij\or uiij\or ix\fi\relax}\else
\def\modrom@nij#1{\ifcase#1 \or j\or ij\or iij\or iv\or
  v\or vj\or vij\or viij\or ix\fi\relax}\fi
\newcommand{\modroman}[1]{\expandafter\modromannumeral\value{#1}}
\endinput
%%
%% End of file `modroman.sty'.