summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/stex/omdoc/omdoc.cls
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/stex/omdoc/omdoc.cls')
-rw-r--r--Master/texmf-dist/tex/latex/stex/omdoc/omdoc.cls40
1 files changed, 31 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/stex/omdoc/omdoc.cls b/Master/texmf-dist/tex/latex/stex/omdoc/omdoc.cls
index 6cb3c77a74b..76455b2bb4f 100644
--- a/Master/texmf-dist/tex/latex/stex/omdoc/omdoc.cls
+++ b/Master/texmf-dist/tex/latex/stex/omdoc/omdoc.cls
@@ -7,22 +7,44 @@
%% omdoc.dtx (with options: `cls')
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesClass{omdoc}[2012/01/28 v1.0 OMDoc Documents]
-\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}}
+\ProvidesClass{omdoc}[2016/04/07 v1.2 OMDoc Documents]
\def\omdoc@class{article}
-\DeclareOption{report}{\def\omdoc@class{report}\PassOptionsToPackage{\CurrentOption}{omdoc}}
-\DeclareOption{book}{\def\omdoc@class{book}\PassOptionsToPackage{\CurrentOption}{omdoc}}
-\DeclareOption{chapter}{\PassOptionsToPackage{\CurrentOption}{omdoc}}
-\DeclareOption{part}{\PassOptionsToPackage{\CurrentOption}{omdoc}}
-\DeclareOption{showignores}{\PassOptionsToPackage{\CurrentOption}{omdoc}}
-\DeclareOption{extrefs}{\PassOptionsToPackage{\CurrentOption}{sref}}
-\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
+\DeclareOption{report}{\def\omdoc@class{report}%
+ \PassOptionsToPackage{\CurrentOption}{omdoc}
+ \PassOptionsToPackage{\CurrentOption}{stex}}
+\newif\ifclass@book\class@bookfalse
+\DeclareOption{book}{\def\omdoc@class{book}\class@booktrue%
+ \PassOptionsToPackage{\CurrentOption}{omdoc}
+ \PassOptionsToPackage{\CurrentOption}{stex}}
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\omdoc@class}
+ \PassOptionsToPackage{\CurrentOption}{omdoc}
+ \PassOptionsToPackage{\CurrentOption}{stex}}
\ProcessOptions
\LoadClass{\omdoc@class}
+\RequirePackage{etoolbox}
\RequirePackage{omdoc}
+\RequirePackage{stex}
+\srefaddidkey{document}
+\newcommand\documentkeys[1]{\metasetkeys{document}{#1}}
\let\orig@document=\document
\srefaddidkey{document}
\renewcommand{\document}[1][]{\metasetkeys{document}{#1}\orig@document}
+\ifclass@book
+\renewenvironment{frontmatter}
+{\@frontmattertrue\cleardoublepage\@mainmatterfalse\pagenumbering{roman}}
+{\@frontmatterfalse\setcounter{page}{1}\pagenumbering{arabic}}
+\else
+\newenvironment{frontmatter}
+{\@frontmattertrue\pagenumbering{roman}}
+{\@frontmatterfalse\setcounter{page}{1}\pagenumbering{arabic}}
+\fi
+\ifclass@book
+\renewenvironment{backmatter}
+{\cleardoublepage\@mainmatterfalse\@backmattertrue}
+{\@backmatterfalse}
+\else
+\newenvironment{backmatter}{\@backmattertrue}{\@backmatterfalse}
+\fi
\endinput
%%
%% End of file `omdoc.cls'.