%%
%% This is file `omdoc.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% omdoc.dtx  (with options: `package')
%% 
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{omdoc}[2012/01/28 v1.0 OMDoc document Structure]
\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}}
\newif\if@chapter\@chapterfalse
\newif\if@part\@partfalse
\newcount\section@level\section@level=3
\newif\ifshow@ignores\show@ignoresfalse
\def\omdoc@class{article}
\DeclareOption{report}{\def\omdoc@class{report}\section@level=2}
\DeclareOption{book}{\def\omdoc@class{book}\section@level=1}
\DeclareOption{chapter}{\section@level=2\@chaptertrue}
\DeclareOption{part}{\section@level=1\@chaptertrue\@parttrue}
\DeclareOption{showignores}{\show@ignorestrue}
\DeclareOption{extrefs}{\PassOptionsToPackage{\CurrentOption}{sref}}
\ProcessOptions
\RequirePackage{sref}
\RequirePackage{xspace}
\RequirePackage{comment}
\def\level@section#1{\ifcase#1\or{part}\or{chapter}\or{section}\or{subsection}\or{subsubsection}\or{paragraph}\or{subparagraph}\fi}
\def\Level@Section#1{\ifcase#1\or{Part}\or{Chapter}\or{Section}\or{Subsection}\or{Subsubsection}\or{Paragraph}\or{Subparagraph}\fi}
\def\in@level@section#1{\ifcase#1\or{this document}\or{part}\or{chapter}\or{section}\or{subsection}\or{subsubsection}\or{paragraph}\or{subparagraph}\fi}
\def\In@Level@Section#1{\ifcase#1\or{This document}\or{Part}\or{Chapter}\or{Section}\or{Subsection}\or{Subsubsection}\or{Paragraph}\or{Subparagraph}\fi}
\def\currentsectionlevel{\in@level@section\section@level\xspace}
\def\CurrentSectionLevel{\In@Level@Section\section@level\xspace}
\srefaddidkey{omgroup}
\addmetakey{omgroup}{creators}
\addmetakey{omgroup}{date}
\addmetakey{omgroup}{contributors}
\addmetakey{omgroup}{type}
\addmetakey*{omgroup}{short}
\addmetakey*{omgroup}{display}
\def\at@begin@omgroup#1{}
\newenvironment{omgroup}[2][]% keys, title
{\metasetkeys{omgroup}{#1}\sref@target%
\ifx\omgroup@display\st@flow\noindent{\Large\textbf{#2}\\[.3ex]\noindent\ignorespaces}%
\else%
\if@part\ifnum\section@level=1\part{#2}\sref@label@id{Part \thepart}\fi\fi%
\if@chapter\ifnum\section@level=2\chapter{#2}\sref@label@id{Chapter \thechapter}\fi\fi%
\ifnum\section@level=3\section{#2}\sref@label@id{Section \thesection}\fi%
\ifnum\section@level=4\subsection{#2}\sref@label@id{Subsection \thesubsection}\fi%
\ifnum\section@level=5\subsubsection{#2}\sref@label@id{Subsubsection \thesubsubsection}\fi%
\ifnum\section@level=6\paragraph{#2}\sref@label@id{this paragraph}\fi%
\ifnum\section@level=7\subparagraph{#2}\sref@label@id{this subparagraph}\fi%
\at@begin@omgroup\section@level% for customization
\advance\section@level by 1%
\fi}{\advance\section@level by -1}
\providecommand\printindex{\IfFileExists{\jobname.ind}{\input{\jobname.ind}}{}}
\ifshow@ignores
\addmetakey{ignore}{type}
\addmetakey{ignore}{comment}
\newenvironment{ignore}[1][]
{\metasetkeys{ignore}{#1}\textless\ignore@type\textgreater\bgroup\itshape}
{\egroup\textless/\ignore@type\textgreater}
\renewenvironment{ignore}{}{}\else\excludecomment{ignore}\fi
\long\def\STRlabel#1#2{\STRlabeldef{#1}{#2}{#2}}
\def\STRcopy#1{\expandafter\ifx\csname STR@#1\endcsname\relax
\message{STR warning: reference #1 undefined!}
\else\csname STR@#1\endcsname\fi}
\newcommand{\STRsemantics}[3][]{#2\def\@test{#1}\ifx\@test\@empty\STRlabeldef{#1}{#2}\fi}
\def\STRlabeldef#1{\expandafter\gdef\csname STR@#1\endcsname}
\def\black#1{\textcolor{black}{#1}}
\def\gray#1{\textcolor{gray}{#1}}
\def\blue#1{\textcolor{blue}{#1}}
\def\red#1{\textcolor{red}{#1}}
\def\green#1{\textcolor{green}{#1}}
\def\cyan#1{\textcolor{cyan}{#1}}
\def\magenta#1{\textcolor{magenta}{#1}}
\def\brown#1{\textcolor{brown}{#1}}
\def\yellow#1{\textcolor{yellow}{#1}}
\def\orange#1{\textcolor{orange}{#1}}
\newcommand\hateq{\ensuremath{\hat=}\xspace}
\newcommand\hatequiv{\ensuremath{\hat\equiv}\xspace}
\newcommand\textleadsto{\ensuremath{\leadsto}\xspace}
\newcommand{\baseURI}[2][]{}
\endinput
%%
%% End of file `omdoc.sty'.
