%% %% This is file `romannum.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% romannum.dtx (with options: `usc') %% %% ----------------------------------------------------------------- %% Author: Peter Wilson, Herries Press %% Maintainer: Will Robertson (will dot robertson at latex-project dot org) %% Copyright 1999 -- 2004 Peter R. Wilson %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either %% version 1.3c of this license or (at your option) any %% later version: %% %% This work has the LPPL maintenance status "maintained". %% The Current Maintainer of this work is Will Robertson. %% %% This work consists of the files listed in the README file. %% ----------------------------------------------------------------- %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{romannum}[2009/09/03 v1.0b roman numerals] \RequirePackage{stdclsdv} \newif\ifrn@mYear \rn@mYearfalse \newif\ifrn@mDay \rn@mDayfalse \newif\ifrn@mday \rn@mdayfalse \DeclareOption{Section}{% \ifSCDchapter \renewcommand{\thechapter}{\Roman{chapter}} \renewcommand{\thesection}{\thechapter.\Roman{section}} \else \renewcommand{\thesection}{\Roman{section}} \fi \renewcommand{\thesubsection}{\thesection.\Roman{subsection}} \renewcommand{\thesubsubsection}{\thesubsection.\Roman{subsubsection}} \renewcommand{\theparagraph}{\thesubsubsection.\Roman{paragraph}} \renewcommand{\thesubparagraph}{\theparagraph.\Roman{subparagraph}} } \DeclareOption{section}{% \ifSCDchapter \renewcommand{\thechapter}{\roman{chapter}} \renewcommand{\thesection}{\thechapter.\roman{section}} \else \renewcommand{\thesection}{\roman{section}} \fi \renewcommand{\thesubsection}{\thesection.\roman{subsection}} \renewcommand{\thesubsubsection}{\thesubsection.\roman{subsubsection}} \renewcommand{\theparagraph}{\thesubsubsection.\roman{paragraph}} \renewcommand{\thesubparagraph}{\theparagraph.\roman{subparagraph}} } \DeclareOption{Equation}{% \ifSCDchapter \renewcommand{\theequation}% {\ifnum \c@chapter>\z@ \thechapter.\fi \Roman{equation}} \else \renewcommand{\theequation}{\Roman{equation}} \fi } \DeclareOption{equation}{% \ifSCDchapter \renewcommand{\theequation}% {\ifnum \c@chapter>\z@ \thechapter.\fi \roman{equation}} \else \renewcommand{\theequation}{\roman{equation}} \fi } \DeclareOption{Caption}{% \ifSCDchapter \renewcommand{\thefigure}% {\ifnum \c@chapter>\z@ \thechapter.\fi \Roman{figure}} \renewcommand{\thetable}% {\ifnum \c@chapter>\z@ \thechapter.\fi \Roman{table}} \else \renewcommand{\thefigure}{\Roman{figure}} \renewcommand{\thetable}{\Roman{table}} \fi } \DeclareOption{caption}{% \ifSCDchapter \renewcommand{\thefigure}% {\ifnum \c@chapter>\z@ \thechapter.\fi \roman{figure}} \renewcommand{\thetable}% {\ifnum \c@chapter>\z@ \thechapter.\fi \roman{table}} \else \renewcommand{\thefigure}{\roman{figure}} \renewcommand{\thetable}{\roman{table}} \fi } \DeclareOption{Footnote}{% \renewcommand{\thefootnote}{\Roman{footnote}} } \DeclareOption{footnote}{% \renewcommand{\thefootnote}{\roman{footnote}} } \DeclareOption{Enumerate}{% \renewcommand{\theenumi}{\Roman{enumi}} \renewcommand{\theenumiii}{\roman{enumiii}} } \DeclareOption{enumerate}{% \renewcommand{\theenumi}{\roman{enumi}} \renewcommand{\theenumiii}{\Roman{enumiii}} } \DeclareOption{Year}{\rn@mYeartrue} \DeclareOption{Day}{\rn@mDaytrue\rn@mYeartrue\rn@mdayfalse} \DeclareOption{day}{\rn@mDayfalse\rn@mYeartrue\rn@mdaytrue} \DeclareOption{Most}{% \ExecuteOptions{Section,Equation,Caption,Footnote,Enumerate} } \DeclareOption{most}{% \ExecuteOptions{section,equation,caption,footnote,enumerate} } \ProcessOptions\relax \ifrn@mYear \newcommand{\thern@myear}{\@Roman\year} \ifrn@mDay \newcommand{\thern@mday}{\@Roman\day} \else \ifrn@mday \newcommand{\thern@mday}{\@roman\day} \else \newcommand{\thern@mday}{\@arabic\day} \fi \fi \edef\today{\ifcase\month\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi \space\thern@mday, \thern@myear} \fi \newcommand{\romannum}[1]{% \ifnum#1<1 \ifnum#1=0 o% \else -\romannumeral -#1% \fi \else \romannumeral #1% \fi} \DeclareRobustCommand{\Romannum}[1]{\MakeUppercase{\romannum{#1}}} \AtBeginDocument{\pagenumbering{roman}} \endinput %% %% End of file `romannum.sty'.