%% %% This is file `statements.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% statements.dtx (with options: `package') %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{statements}[2010/06/25 v1.0 Semantic Markup for Statements] \DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{omdoc}} \ProcessOptions \RequirePackage{omtext} \RequirePackage{modules} \RequirePackage[hyperref]{ntheorem} \theoremstyle{plain} \providecommand\STpresent[1]{#1} \def\define@statement@env#1{% \newenvironment{#1}[1][]{\metasetkeys{omtext}{##1}\sref@target% \ifx\omtext@display\st@flow\else% \ifx\omtext@title\@empty\begin{ST#1Env}\else\begin{ST#1Env}[\omtext@title]\fi% \ifx\sref@id\@empty\else\label{#1.\sref@id}\fi \csname st@#1@initialize\endcsname\fi \ifx\sref@id\@empty\sref@label@id{here}\else% \sref@label@id{\STpresent{\csname ST#1EnvKeyword\endcsname}~\@currentlabel}\fi} {\csname st@#1@terminate\endcsname\ifx\omtext@display\st@flow\else\end{ST#1Env}\fi}} \newenvironment{assertion}[1][]{\metasetkeys{omtext}{#1}\sref@target% \ifx\omtext@display\st@flow\else% \ifx\omtext@title\@empty\begin{ST\omtext@type AssEnv}% \else\begin{ST\omtext@type AssEnv}[\omtext@title]\fi\fi% \ifx\omtext@type\@empty\sref@label@id{here}\else% \sref@label@id{\STpresent{\csname ST\omtext@type AssEnvKeyword\endcsname}~\@currentlabel}\fi} {\ifx\omtext@display\st@flow\else\end{ST\omtext@type AssEnv}\fi} \def\st@theorem@kw{Theorem} \def\st@lemma@kw{Lemma} \def\st@proposition@kw{Proposition} \def\st@corollary@kw{Corollary} \def\st@conjecture@kw{Conjecture} \def\st@falseconjecture@kw{Conjecture (false)} \def\st@postulate@kw{Postulate} \def\st@obligation@kw{Obligation} \def\st@assumption@kw{Assumption} \def\st@observation@kw{Observation} \theorembodyfont{\itshape} \theoremheaderfont{\normalfont\bfseries} \newtheorem{STtheoremAssEnv}{\st@theorem@kw} \newtheorem{STlemmaAssEnv}[STtheoremAssEnv]{\st@lemma@kw} \newtheorem{STpropositionAssEnv}[STtheoremAssEnv]{\st@proposition@kw} \newtheorem{STcorollaryAssEnv}[STtheoremAssEnv]{\st@corollary@kw} \newtheorem{STconjectureAssEnv}[STtheoremAssEnv]{\st@conjecture@kw} \newtheorem{STfalseconjectureAssEnv}[STtheoremAssEnv]{\st@falseconjecture@kw} \newtheorem{STpostulateAssEnv}[STtheoremAssEnv]{\st@postulate@kw} \newtheorem{STobligationAssEnv}[STtheoremAssEnv]{\st@obligation@kw} \newtheorem{STassumptionAssEnv}[STtheoremAssEnv]{\st@assumption@kw} \newtheorem{STobservationAssEnv}[STtheoremAssEnv]{\st@observation@kw} \def\st@example@initialize{}\def\st@example@terminate{} \define@statement@env{example} \def\st@example@kw{Example} \theorembodyfont{\upshape} \newtheorem{STexampleEnv}[STtheoremAssEnv]{\st@example@kw} \def\st@axiom@initialize{}\def\st@axiom@terminate{} \define@statement@env{axiom} \def\st@axiom@kw{Axiom} \theorembodyfont{\upshape} \newtheorem{STaxiomEnv}[STtheoremAssEnv]{\st@axiom@kw} \srefaddidkey{symboldec} \addmetakey{symboldec}{functions} \addmetakey{symboldec}{role} \addmetakey*{symboldec}{title} \addmetakey{symboldec}{name} \addmetakey*{symboldec}{display} \def\symboldec@type{Symbol} \newenvironment{symboldec}[1][]{\metasetkeys{symboldec}{#1}\sref@target\st@indeftrue% \ifx\symboldec@display\st@flow\else{\stDMemph{\symboldec@type} \symboldec@name:}\fi% \ifx\symboldec@title\@empty~\else~(\stDMemph{\symboldec@title})\par\fi}{} \newcommand{\symtype}[2]{Type (#1): #2} \newif\ifst@indef\st@indeffalse \newenvironment{definition}[1][]{\metasetkeys{omtext}{#1}\sref@target\st@indeftrue% \ifx\omtext@display\st@flow\else% \ifx\omtext@title\@empty\begin{STdefinitionEnv}\else\begin{STdefinitionEnv}[\omtext@title]\fi\fi% \ifx\sref@id\@empty\sref@label@id{here}\else% \sref@label@id{\STpresent{\csname STdefinitionEnvKeyword\endcsname}~\@currentlabel}\fi} {\ifx\omtext@display\st@flow\else\end{STdefinitionEnv}\fi} \def\st@definition@kw{Definition} \theorembodyfont{\upshape} \newtheorem{STdefinitionEnv}[STtheoremAssEnv]{\st@definition@kw} \def\notemph#1{{\bf{#1}}} \def\st@notation@terminate{} \def\st@notation@initialize{} \define@statement@env{notation} \def\st@notation@kw{Notation} \theorembodyfont{\upshape} \newtheorem{STnotationEnv}[STtheoremAssEnv]{\st@notation@kw} \def\st@def@target#1#2{\def\@test{#1}% \ifst@indef% if we are in a definition or such \ifx\omtext@theory\@empty% if there is no theory attribute \@ifundefined{mod@id}% if we are not in a module {\PackageWarning{statements}{definiendum in unidentified module\MessageBreak \protect\definiendum, \protect\defin, \protect\twindef, \protect\atwindef\MessageBreak can only be referenced when called in a module with id key}}% {\ifx\@test\@empty% \expandafter\sref@target@ifh{sref@#2@\mod@id @target}{}\else% \expandafter\sref@target@ifh{sref@#1@\mod@id @target}{}\fi}% \else\expandafter\sref@target@ifh{sref@#1@\omtext@theory @target}{}\fi% \else\PackageError{statements}% {definiendum outside definition context\MessageBreak \protect\definiendum, \protect\defin, \protect\twindef, \protect\atwindef\MessageBreak do not make sense semantically outside a definition.\MessageBreak Consider wrapping the defining phrase in a \protect\inlinedef}% \fi} \newcommand{\definiendum}[2][]{\st@def@target{#1}{#2}\defemph{#2}} \newcommand{\notatiendum}[2][]{\notemph{#2}} \newcommand{\defin}[2][]{\definiendum[#1]{#2}\omdoc@index[#1]{#2}} \newcommand{\definalt}[3][]{\definiendum[#1]{#2}\omdoc@index[#1]{#3}} \newcommand{\twindef}[3][]{\st@def@target{#1}{#2-#3}\defemph{#2 #3}\@twin[#1]{#2}{#3}} \newcommand{\twindefalt}[4][]{\definiendum[#1]{#2}\@twin[#1]{#3}{#4}} \newcommand{\atwindef}[4][]{\st@def@target{#1}{#2-#3-#4}\defemph{#2 #3 #4}\@atwin[#1]{#2}{#3}{#4}} \newcommand{\atwindefalt}[5][]{\definiendum[#1]{#2}\@atwin[#1]{#3}{#4}{#5}} \newcommand{\inlineex}[2][]{\metasetkeys{omtext}{#1}\sref@target\sref@label@id{here}#2} \newcommand{\inlinedef}[2][]{\metasetkeys{omtext}{#1}\sref@target\sref@label@id{here}\st@indeftrue #2} \addmetakey[\mod@id]{termref}{cd} \addmetakey{termref}{cdbase} \addmetakey{termref}{name} \addmetakey{termref}{role} \def\termref@set#1#2{\def\termref@name{#2}\metasetkeys{termref}{#1}} \newcommand{\termref}[2][]{\metasetkeys{termref}{#1}\st@termref{#2}} \def\st@termref#1{\ifx\termref@name\@empty\def\termref@name{#1}\fi% \mod@termref\termref@cd\termref@name{#1}} \newcommand{\twinref}[3][]{\termref@set{#1}{#2-#3}\st@termref{#2 #3}} \newcommand{\atwinref}[4][]{\termref@set{#1}{#2-#3-#4}\st@termref{#2 #3 #4}} \newcommand{\termin}[2][]{\termref[#1]{#2}\index{#2}} \providecommand{\termemph}[1]{#1} \providecommand{\defemph}[1]{{\textbf{#1}}} \providecommand{\stDMemph}[1]{{\textbf{#1}}} \newcommand{\symref}[2]{\@nameuse{mod@symref@#1}{#2}} \endinput %% %% End of file `statements.sty'.