summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/stex/statements.sty
blob: 0ae7cda7c74a273bb357aacd64d7947ce52d9486 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
%%
%% 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}[2007/09/09 v0.9d Semantic Markup for Statements]
\newif\ifst@env\st@envfalse
\newif\ifst@id\st@idfalse
\newif\ifst@display\st@displayfalse
\DeclareOption{id}{\st@idtrue\st@envtrue}
\DeclareOption{env}{\st@envtrue}
\DeclareOption{display}{\st@displaytrue\st@envtrue}
\newif\ifstat@for\stat@forfalse
\newif\ifstat@from\stat@forfalse
\newif\ifstat@type\stat@typefalse
\newif\ifstat@title\stat@titlefalse
\newif\ifstat@continues\stat@continuesfalse
\DeclareOption{for}{\stat@fortrue\st@envtrue}
\DeclareOption{from}{\stat@fromtrue\st@envtrue}
\DeclareOption{type}{\stat@typetrue\st@envtrue}
\DeclareOption{title}{\stat@titletrue\st@envtrue}
\DeclareOption{continues}{\stat@continuestrue\st@envtrue}
\def\stattrue{\stat@fortrue\stat@fromtrue\stat@typetrue\stat@continuestrue}
\DeclareOption{draft}{\st@envtrue\st@idtrue\stat@fortrue\stat@fromtrue\typetrue\justtrue}
\DeclareOption{all}{\st@envtrue\stattrue\justtrue}
\ProcessOptions
\RequirePackage{omdoc}[2007/09/09]
\def\define@statement@env#1#2{
\newenvironment{#1}[1][]{\setkeys{stat}{##1}
\ifx\st@display\st@flow\else\stDMemph{#2}:\fi%
\@ifundefined{stat@title}{}%
{\space\ifx\st@display\st@flow\else(\fi\stDMemph{\stat@title}\ifx\st@display\st@flow:\else)\par\fi}\space%
\ifst@env\show@stat@keys{#1}\fi\csname st@#1@initialize\endcsname}
{\csname st@#1@terminate\endcsname}}
\newenvironment{assertion}[1][]{\setkeys{stat}{#1}
\ifx\st@display\st@flow\else{\stDMemph{\stat@type}:}\fi%
\@ifundefined{stat@title}{~}{~(\stDMemph{\stat@title})\par}%
\ifst@env\show@stat@keys{#1}\fi\em}{}
\newenvironment{simpleDef}[1][]{\setkeys{stat}{#1}
\ifx\st@display\st@flow\else{\stDMemph{Definition}:}\fi%
\@ifundefined{stat@title}{~}{~(\stDMemph{\stat@title})\par}%
\ifst@env\show@stat@keys{#1}\fi}{}
\newenvironment{PatternDef}[1][]{\setkeys{stat}{#1}
\ifx\st@display\st@flow\else{\stDMemph{Definition}:}\fi%
\@ifundefined{stat@title}{~}{~(\stDMemph{\stat@title})\par}%
\ifst@env\show@stat@keys{#1}\fi}{}
\newenvironment{PatternRule}[1]{#1$\colon=$}{}
\newenvironment{PatternCMP}{}{}
\newenvironment{RecDef}[1][]{\setkeys{stat}{#1}
\ifx\st@display\st@flow\else{\stDMemph{Definition}:}\fi%
\@ifundefined{stat@title}{~}{~(\stDMemph{\stat@title})\par}%
\ifst@env\show@stat@keys{#1}\fi}{}
\def\st@example@initialize{}\def\st@example@terminate{}
\define@statement@env{example}{Example}
\def\st@axiom@initialize{}\def\st@axiom@terminate{}
\define@statement@env{axiom}{Axiom}
\define@key{consymb}{type}{\def\consymb@type{#1}}
\define@key{consymb}{title}{\def\consymb@title{#1}}
\define@key{consymb}{name}{\def\consymb@name{#1}}
\def\consymb@type{Symbol}
\newenvironment{consymb}[1][]{\setkeys{consymb}{#1}
\ifx\st@display\st@flow\else{\stDMemph{\consymb@type} \consymb@name:}\fi%
\@ifundefined{consymb@title}{~}{~(\stDMemph{\consymb@title})\par}}{}
\newcommand{\symtype}[2]{Type (#1): #2}
\def\st@definition@initialize{%
\newcommand{\notatiendum}[2][]{\notemph{##2}}
\newcommand{\definiendum}[2][]{\defemph{##2}}}
\def\st@definition@terminate{}
\define@statement@env{definition}{Definition}
\def\notemph#1{{\bf{#1}}}
\def\st@notation@initialize{\newcommand{\notatiendum}[2][]{\notemph{##2}}}
\def\st@notation@terminate{}
\define@statement@env{notation}{Notation}
\def\termin{\@ifnextchar[{\@termin}{\@termin[]}}
\def\@termin[#1]#2{{\termemph{\index*{#2}}}}
\providecommand{\termemph}[1]{#1}
\providecommand{\defemph}[1]{{\bf{#1}}}
\providecommand{\stDMemph}[1]{{\bf{#1}}}
\endinput
%%
%% End of file `statements.sty'.