%%
%% 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, 2008, 2010 by Yvon Henel,
%% dit Ğle TeXnicien de surfaceğ <le.texnicien.de.surface@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{v1}
\def\filedate{2010/04/09}
\def\fileinfo{fichier modroman par Le TeXnicien de surface}
\ProvidesPackage{modroman}
   [\filedate\space\fileversion\space\fileinfo]
\RequirePackage{ifthen}
\RequirePackage{etoolbox}
\newtoggle{M@DR@upourv}\togglefalse{M@DR@upourv}
\newtoggle{M@DR@ifinal}\togglefalse{M@DR@ifinal}
\newtoggle{M@DR@longrn}\togglefalse{M@DR@longrn}
\newtoggle{M@DR@majrn}\togglefalse{M@DR@majrn}
\newtoggle{M@DR@sansmod}\togglefalse{M@DR@sansmod}
\DeclareOption{vpourv}{\togglefalse{M@DR@upourv}}
\DeclareOption{upourv}{\toggletrue{M@DR@upourv}}
\DeclareOption{jfinal}{\togglefalse{M@DR@ifinal}}
\DeclareOption{ifinal}{\toggletrue{M@DR@ifinal}}
\DeclareOption{long}  {\toggletrue{M@DR@longrn}}
\DeclareOption{court} {\togglefalse{M@DR@longrn}}
\DeclareOption{maj}  {\toggletrue{M@DR@majrn}}
\DeclareOption{min} {\togglefalse{M@DR@majrn}}
\DeclareOption{sansmod}{\toggletrue{M@DR@sansmod}}
\DeclareOption*{\PackageError{modroman}{%
The option \CurrentOption\space is not known!\MessageBreak
}{%
The possible options are (the first is the default):\MessageBreak
``vpourv'' or ``upourv''\MessageBreak
``jfinal'' or ``ifinal''\MessageBreak
``court'' or ``long''\MessageBreak
``min'' or ``maj''\MessageBreak
``sansmod''.}}
\ExecuteOptions{vpourv,jfinal,court,min}
\ProcessOptions\relax
\nottoggle{M@DR@upourv}{%
  \iftoggle{M@DR@ifinal}{%
    \nottoggle{M@DR@longrn}{%
      \nottoggle{M@DR@majrn}{%
        \toggletrue{M@DR@sansmod}}{}}{}}{}}{}
\newcounter{M@DR@romt@mp}
\iftoggle{M@DR@upourv}{\newcommand*\M@DR@v{u}}{\newcommand*\M@DR@v{v}}
\iftoggle{M@DR@ifinal}{\newcommand*\M@DR@j{i}}{\newcommand*\M@DR@j{j}}
\newcommand*\M@DR@m{m}
\newcommand*\M@DR@d{d}
\newcommand*\M@DR@c{c}
\newcommand*\M@DR@l{l}
\newcommand*\M@DR@x{x}
\newcommand*\M@DR@i{i}
\newcommand*\M@DR@isol{i}
\newcommand*\RedefineMRmdclxvij[9][M@DR@***]{%
  \ifthenelse{\equal{#1}{M@DR@***}}%
    {\renewcommand*\M@DR@isol{#8}}%
    {\renewcommand*\M@DR@isol{#1}}%
  \renewcommand*\M@DR@m{#2}%
  \renewcommand*\M@DR@d{#3}%
  \renewcommand*\M@DR@c{#4}%
  \renewcommand*\M@DR@l{#5}%
  \renewcommand*\M@DR@x{#6}%
  \renewcommand*\M@DR@v{#7}%
  \renewcommand*\M@DR@i{#8}%
  \renewcommand*\M@DR@j{#9}}
\newcommand\shortroman[1]{%
  \expandafter\M@DR@shortmodromain\csname c@#1\endcsname}
\newcommand\M@DR@shortmodromain[1]{%
  \ifnum #1=1 \M@DR@isol\else
  \expandafter\M@DR@shmdromain\romannumeral #1@@\fi}
\def\M@DR@shmdromain#1#2{%
  \ifx#1@%
  \else
    \if#1v\M@DR@v
    \else
      \if#1i%
        \ifx#2@\M@DR@j\else\M@DR@i\fi
      \else\csuse{M@DR@#1}%
      \fi
    \fi
  \M@DR@shmdromainAux#2\fi}
\def\M@DR@shmdromainAux#1\fi{\fi\M@DR@shmdromain#1}
\newcommand\nbshortroman[1]{\M@DR@shortmodromain{#1}}
\newcommand\shortromannumeral{%
  \afterassignment\M@DR@shortmodrom@naux \c@M@DR@romt@mp=}
\def\M@DR@shortmodrom@naux{\M@DR@shortmodromain\c@M@DR@romt@mp}
\newcommand\longroman[1]{%
  \expandafter\M@DR@longmodromain\csname c@#1\endcsname}
\def\M@DR@longmodromain#1{%
  \ifnum#1=1 \M@DR@isol\else
  \expandafter\M@DR@Faire\romannumeral #1@\fi}
\def\M@DR@Faire#1{\ifx#1@\else\csuse{M@DR@Faire@#1}\fi}
\def\M@DR@Faireaux\fi{\fi\M@DR@Faire}
\def\M@DR@Faire@m\fi{\fi\M@DR@m\M@DR@Faire}
\def\M@DR@Faire@d\fi{\fi\M@DR@d\M@DR@Faire}
\def\M@DR@Faire@l\fi{\fi\M@DR@l\M@DR@Faire}
\def\M@DR@Faire@v\fi{\fi\M@DR@v\M@DR@Faire}
\def\M@DR@Faire@i\fi{\fi\M@DR@Faire@i@aux}
\def\M@DR@Faire@i@aux#1{%
  \ifx#1@\M@DR@j%
  \else\if#1x\M@DR@v\M@DR@i\M@DR@i\M@DR@i\M@DR@j%
    \else\if#1v\M@DR@i\M@DR@i\M@DR@i\M@DR@j%
      \else \M@DR@i\M@DR@Faire@i@auxaux\fi\fi
  \M@DR@Faireaux\fi}
\def\M@DR@Faire@i@auxaux\fi\fi\M@DR@Faireaux{\fi\fi \M@DR@Faire@i}
\def\M@DR@Faire@x\fi{\fi \M@DR@Faire@x@aux}
\def\M@DR@Faire@x@aux#1{%
  \ifx#1@\M@DR@x%
  \else
    \if#1c\M@DR@l\M@DR@x\M@DR@x\M@DR@x\M@DR@x
    \else
      \if#1l\M@DR@x\M@DR@x\M@DR@x\M@DR@x
      \else \M@DR@x\M@DR@FaireAuxAux#1\fi\fi
  \M@DR@Faireaux\fi}
\def\M@DR@FaireAuxAux#1\fi\fi\M@DR@Faireaux\fi{\fi\fi\fi\M@DR@Faire#1}
\def\M@DR@Faire@c\fi{\fi \M@DR@Faire@c@aux}
\def\M@DR@Faire@c@aux#1{%
  \ifx#1@\M@DR@c% FIN
  \else
    \if#1d\M@DR@c\M@DR@c\M@DR@c\M@DR@c
    \else
     \if#1m\M@DR@d\M@DR@c\M@DR@c\M@DR@c\M@DR@c
     \else \M@DR@c\M@DR@FaireAuxAux#1\fi\fi
  \M@DR@Faireaux\fi}
\newcommand\nblongroman[1]{\M@DR@longmodromain{#1}}
\newcommand\longromannumeral{%
  \afterassignment\M@DR@longmodrom@naux \c@M@DR@romt@mp=}
\def\M@DR@longmodrom@naux{\M@DR@longmodromain\c@M@DR@romt@mp}
\def\M@DR@LongRomain#1{%
  \ifnum#1=1 I\else
  \expandafter\M@DR@FAIRE\romannumeral #1@\fi}
\def\M@DR@FAIRE#1{\ifx#1@\else\csuse{M@DR@FAIRE#1}\fi}
\def\M@DR@FAIREaux\fi{\fi \M@DR@FAIRE}
\def\M@DR@FAIREm\fi{\fi M\M@DR@FAIRE}
\def\M@DR@FAIREd\fi{\fi D\M@DR@FAIRE}
\def\M@DR@FAIREl\fi{\fi L\M@DR@FAIRE}
\def\M@DR@FAIREv\fi{\fi V\M@DR@FAIRE}
\def\M@DR@FAIREi\fi{\fi \M@DR@FAIREIaux}
\def\M@DR@FAIREIaux#1{%
  \ifx#1@I% FIN
  \else\if#1xVIIII\else\if#1vIIII\else I\M@DR@FAIREAuxAux#1\fi\fi
  \M@DR@FAIREaux\fi}
\def\M@DR@FAIREx\fi{\fi \M@DR@FAIREXaux}
\def\M@DR@FAIREXaux#1{%
  \ifx#1@X% FIN
  \else\if#1cLXXXX\else\if#1lXXXX\else X\M@DR@FAIREAuxAux#1\fi\fi
  \M@DR@FAIREaux\fi}
\def\M@DR@FAIREAuxAux#1\fi\fi\M@DR@FAIREaux\fi{\fi\fi\fi\M@DR@FAIRE#1}
\def\M@DR@FAIREc\fi{\fi \M@DR@FAIRECaux}
\def\M@DR@FAIRECaux#1{%
  \ifx#1@C% FIN
  \else\if#1dCCCC\else\if#1mDCCCC\else C\M@DR@FAIREAuxAux#1\fi\fi
  \M@DR@FAIREaux\fi}
\newcommand\LongRoman[1]{%
  \expandafter\M@DR@LongRomain\csname c@#1\endcsname}
\newcommand\nbLongRoman[1]{\M@DR@LongRomain{#1}}
\newcommand\LongRomannumeral{%
  \afterassignment\M@DR@LongRom@naux \c@M@DR@romt@mp=}
\def\M@DR@LongRom@naux{\M@DR@LongRomain\c@M@DR@romt@mp}
\newcommand\nbroman[1]{\romannumeral #1\relax}
\newcommand\nbRoman[1]{\@Roman{#1}}
\providecommand\Romannumeral{%
  \afterassignment\M@DR@Rom@naux \c@M@DR@romt@mp=}
\def\M@DR@Rom@naux{\Roman{M@DR@romt@mp}}
\iftoggle{M@DR@sansmod}
{\let\modroman=\roman
  \let\modromannumeral=\romannumeral
  \let\nbmodroman=\nbroman}
{\iftoggle{M@DR@majrn}
  {\iftoggle{M@DR@longrn}
    {\let\modroman=\LongRoman
      \let\modromannumeral=\LongRomannumeral
      \let\nbmodroman=\nbLongRoman}
    {\let\modroman=\Roman
      \let\modromannumeral=\Romannumeral
      \let\nbmodroman=\nbRoman}}
  {\iftoggle{M@DR@longrn}
    {\let\modroman=\longroman
      \let\modromannumeral=\longromannumeral
      \let\nbmodroman=\nblongroman}
    {\let\modroman=\shortroman
      \let\modromannumeral=\shortromannumeral
      \let\nbmodroman=\nbshortroman}}}
\newcommand\printntimes[2]{{%
    \renewcommand\M@DR@m{#2}%
    \nblongroman{\numexpr 1000*#1}}}
\endinput
%%
%% End of file `modroman.sty'.
