diff options
author | Karl Berry <karl@freefriends.org> | 2010-04-09 23:57:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-04-09 23:57:50 +0000 |
commit | bc760bf42782cd2acdebbd360ceca4a5609c658a (patch) | |
tree | 7bc3662ef867522c199595929dfe2d71bc15aecd /Master/texmf-dist/tex/latex | |
parent | b00d598c405e2f58e2be6d3511013787b40954dd (diff) |
modroman 1 (9apr10)
git-svn-id: svn://tug.org/texlive/trunk@17778 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/modroman/modroman.sty | 207 |
1 files changed, 178 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/latex/modroman/modroman.sty b/Master/texmf-dist/tex/latex/modroman/modroman.sty index 8da430821b3..1ec1fd077de 100644 --- a/Master/texmf-dist/tex/latex/modroman/modroman.sty +++ b/Master/texmf-dist/tex/latex/modroman/modroman.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 2003, 2004, 2008 by Yvon Henel, +%% 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 @@ -22,37 +22,186 @@ %% 1999/12/01 or later. %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\def\fileversion{v0.4} -\def\filedate{2008/05/03} -\def\fileinfo{fichier modroman.dtx par Le TeXnicien de surface} +\def\fileversion{v1} +\def\filedate{2010/04/09} +\def\fileinfo{fichier modroman par Le TeXnicien de surface} \ProvidesPackage{modroman} [\filedate\space\fileversion\space\fileinfo] -\DeclareOption{vpourv}{% - \@ifdefinable\modrom@actuelV{\def\modrom@actuelV{v}} -} -\DeclareOption{upourv}{\def\modrom@actuelV{u}} -\ExecuteOptions{vpourv} +\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 -\@ifdefinable\romt@mp{\newcount\romt@mp} -\@ifdefinable\modromannumeral{% - \def\modromannumeral{\afterassignment\modrom@naux \romt@mp=}} -\@ifdefinable\modrom@naux{% - \def\modrom@naux{\ifnum\romt@mp<10 - \modrom@ni{\romt@mp}\else\modrom@nii{\romt@mp}\fi\relax}} -\@ifdefinable\modrom@ni{% - \def\modrom@ni#1{\ifcase#1 \or i\or ij\or iij\or i\modrom@actuelV\or - \modrom@actuelV\or \modrom@actuelV j\or \modrom@actuelV ij\or - \modrom@actuelV iij\or ix\fi\relax}}% -\@ifdefinable\modrom@nii{% - \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}}}} -\@ifdefinable\modrom@nij{% - \def\modrom@nij#1{\ifcase#1 \or j\or ij\or iij\or i\modrom@actuelV\or - \modrom@actuelV\or \modrom@actuelV j\or \modrom@actuelV ij\or - \modrom@actuelV iij\or ix\fi\relax}} -\newcommand{\modroman}[1]{\expandafter\modromannumeral\value{#1}} +\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'. |