%%
%% This is file `omtext.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% omtext.dtx  (with options: `package')
%% 
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{omtext}[2016/04/06 v1.1 OMDoc Text Fragments]
\newif\if@omtext@mh@\@omtext@mh@false
\DeclareOption{mh}{\@omtext@mh@true
\PassOptionsToPackage{\CurrentOption}{modules}}
\newif\ifindex\indextrue
\DeclareOption{noindex}{\indexfalse}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{modules}}
\ProcessOptions
\ifindex\makeindex\fi
\if@omtext@mh@\RequirePackage{omtext-mh}\fi
\RequirePackage{xspace}
\RequirePackage{modules}
\RequirePackage{comment}
\RequirePackage{mdframed}
\RequirePackage{latexsym}
\srefaddidkey{omtext}
\addmetakey[]{omtext}{functions}
\addmetakey*{omtext}{display}
\addmetakey{omtext}{for}
\addmetakey{omtext}{from}
\addmetakey{omtext}{type}
\addmetakey*{omtext}{title}
\addmetakey*{omtext}{start}
\addmetakey{omtext}{theory}
\addmetakey{omtext}{continues}
\addmetakey{omtext}{verbalizes}
\addmetakey{omtext}{subject}
\define@key{omtext}{require}{\requiremodules{#1}{sms}}
\define@key{omtext}{module}{\message{module: #1}\importmodule{#1}\def\omtext@theory{#1}}
\def\st@flow{flow}
\newif\if@in@omtext\@in@omtextfalse
\def\omtext@pre@skip{\smallskip}
\def\omtext@post@skip{}
\providecommand{\stDMemph}[1]{\textbf{#1}}
\newenvironment{omtext}[1][]{\@in@omtexttrue%
\bgroup\metasetkeys{omtext}{#1}\sref@label@id{this paragraph}%
\def\lec##1{\@lec{##1}}%
\ifx\omtext@display\st@flow\else\omtext@pre@skip\par\noindent%
\ifx\omtext@title\@empty%
\ifx\omtext@start\@empty\else\stDMemph{\omtext@start}\xspace\fi%
\else\stDMemph{\omtext@title}:\xspace%
\ifx\omtext@start\@empty\else\omtext@start\xspace\fi%
\fi% omtext@title empty
\fi% omtext@display=flow
\ignorespaces}
{\egroup\omtext@post@skip\@in@omtextfalse}
\srefaddidkey{phrase}
\addmetakey{phrase}{style}
\addmetakey{phrase}{class}
\addmetakey{phrase}{index}
\addmetakey{phrase}{verbalizes}
\addmetakey{phrase}{type}
\addmetakey{phrase}{only}
\newcommand\phrase[2][]{\metasetkeys{phrase}{#1}%
\ifx\prhase@only\@empty\only<\phrase@only>{#2}\else #2\fi}
\providecommand\textsubscript[1]{\ensuremath{_{#1}}}
\newcommand\corefs[2]{#1\textsubscript{#2}}
\newcommand\coreft[2]{#1\textsuperscript{#2}}
\newcommand\nlex[1]{\green{\sl{#1}}}
\newcommand\nlcex[1]{*\green{\sl{#1}}}
\def\@sinlinequote#1{``{\sl{#1}}''}
\def\@@sinlinequote#1#2{\@sinlinequote{#2}~#1}
\newcommand\sinlinequote[2][]
{\def\@opt{#1}\ifx\@opt\@empty\@sinlinequote{#2}\else\@@sinlinequote\@opt{#2}\fi}
\newcommand\vdec[1]{#1}
\newcommand\vids[2][]{#2}
\newcommand\vrest[2][]{#2}
\def\begin@sblockquote{\begin{quote}\sl}
\def\end@sblockquote{\end{quote}}
\def\begin@@sblockquote#1{\begin@sblockquote}
\def\end@@sblockquote#1{\def\@@lec##1{{\rm ##1}}\@lec{#1}\end@sblockquote}
\newenvironment{sblockquote}[1][]
  {\def\@opt{#1}\ifx\@opt\@empty\begin@sblockquote\else\begin@@sblockquote\@opt\fi}
  {\ifx\@opt\@empty\end@sblockquote\else\end@@sblockquote\@opt\fi}
\newenvironment{sboxquote}[1][]
{\def\@@src{#1}\begin{mdframed}[leftmargin=.5cm,rightmargin=.5cm]}
{\@lec{\rm\@@src}\end{mdframed}}
\providecommand{\@@lec}[1]{(#1)}
\def\@lec#1{\strut\hfil\strut\null\nobreak\hfill\@@lec{#1}}
\def\lec#1{\@lec{#1}\par}
\newcommand\mygraphics[2][]{\includegraphics[#1]{#2}}
\newcommand\mycgraphics[2][]{\begin{center}\mygraphics[#1]{#2}\end{center}}
\newcommand\mybgraphics[2][]{\fbox{\mygraphics[#1]{#2}}}
\newcommand\mycbgraphics[2][]{\begin{center}\fbox{\mygraphics[#1]{#2}}\end{center}}
\addmetakey{omdoc@index}{at}
\addmetakey[false]{omdoc@index}{loadmodules}[true]
\newcommand\omdoc@indexi[2][]{\ifindex%
\metasetkeys{omdoc@index}{#1}%
\@bsphack\begingroup\@sanitize%
\protected@write\@indexfile{}{\string\indexentry%
{\ifx\omdoc@index@at\@empty\else\omdoc@index@at @\fi%
\ifx\omdoc@index@loadmodules\@true%
\string\withusedmodules{\@ifundefined{mod@id}\used@modules\mod@id}{#2}%
\else #2\fi% loadmodules
}{\thepage}}%
\endgroup\@esphack\fi}%ifindex
\newcommand\omdoc@indexii[3][]{\ifindex%
\metasetkeys{omdoc@index}{#1}%
\@bsphack\begingroup\@sanitize%
\protected@write\@indexfile{}{\string\indexentry%
{\ifx\omdoc@index@at\@empty\else\omdoc@index@at @\fi%
\ifx\omdoc@index@loadmodules\@true%
\string\withusedmodules{\@ifundefined{mod@id}\used@modules\mod@id}{#2}!%
\string\withusedmodules{\@ifundefined{mod@id}\used@modules\mod@id}{#3}%
\else #2!#3\fi% loadmodules
}{\thepage}}%
\endgroup\@esphack\fi}%ifindex
\newcommand\omdoc@indexiii[4][]{\ifindex%
\metasetkeys{omdoc@index}{#1}%
\@bsphack\begingroup\@sanitize%
\protected@write\@indexfile{}{\string\indexentry%
{\ifx\omdoc@index@at\@empty\else\omdoc@index@at @\fi%
\ifx\omdoc@index@loadmodules\@true%
\string\withusedmodules{\@ifundefined{mod@id}\used@modules\mod@id}{#2}!%
\string\withusedmodules{\@ifundefined{mod@id}\used@modules\mod@id}{#3}!%
\string\withusedmodules{\@ifundefined{mod@id}\used@modules\mod@id}{#4}%
\else #2!#3\fi% loadmodules
}{\thepage}}%
\endgroup\@esphack\fi}%ifindex
\newcommand\indexalt[3][]{{#2}\omdoc@indexi[#1]{#3}}               % word in text and index
\newcommand\indextoo[2][]{{#2}\omdoc@indexi[#1]{#2}}               % word in text and index
\newcommand\@twin[3][]{\omdoc@indexii[#1]{#2}{#3}\omdoc@indexii[#1]{#3}{#2}}
\newcommand\twinalt[4][]{#2\@twin[#1]{#3}{#4}}
\newcommand\twintoo[3][]{{#2 #3}\@twin[#1]{#2}{#3}} % and use the word compound too
\newcommand\@atwin[4][]{\omdoc@indexiii[#1]{#2}{#3}{#4}\omdoc@indexii[#1]{#3}{#2 (#4)}}
\newcommand\atwinalt[5][]{#2\@atwin[#1]{#3}{#4}{#4}}
\newcommand\atwintoo[4][]{{#2 #3 #4}\@atwin[#1]{#2}{#3}{#4}}         % and use it too
\newcommand\hateq{\ensuremath{\hat=}\xspace}
\newcommand\hatequiv{\ensuremath{\hat\equiv}\xspace}
\@ifundefined{ergo}%
{\newcommand\ergo{\ensuremath{\leadsto}\xspace}}%
{\renewcommand\ergo{\ensuremath{\leadsto}\xspace}}%
\newcommand{\reflect@squig}[2]{\reflectbox{$\m@th#1\rightsquigarrow$}}%
\newcommand\ogre{\ensuremath{\mathrel{\mathpalette\reflect@squig\relax}}\xspace}%
\endinput
%%
%% End of file `omtext.sty'.
