]> matita.cs.unibo.it Git - helm.git/blob - matita/components/binaries/matex/test/matex.sty
a37b0054574565b626a2af8ed5b6ea8f4e20ae5d
[helm.git] / matita / components / binaries / matex / test / matex.sty
1 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
2 \ProvidesPackage{matex}[2016/02/15 MaTeX Package]
3 \RequirePackage{xcolor}
4 \ExecuteOptions{}
5 \ProcessOptions*
6
7 \makeatletter
8
9 \definecolor{ma@black}{HTML}{000000}
10 \definecolor{ma@blue}{HTML}{00005F}
11 \definecolor{ma@purple}{HTML}{3F005F}
12
13 \newcommand*\ma@fwd{ma@black}
14 \newcommand*\ma@open{ma@blue}
15 \newcommand*\ma@exit{ma@blue}
16 \newcommand*\ma@prim{ma@purple}
17 \newcommand*\ma@qed{ma@blue}
18
19 \newcommand*\setlabel[1]{\protected@edef\@currentlabel{#1}}
20
21 \newcommand*\ObjLabel[1]{\label{obj:#1}}
22 \newcommand*\ObjRef[1]{\ref{obj:#1}}
23
24 \newcommand*\ma@setlabel[2]{\setlabel{#1}\ObjLabel{#2}}
25 \newcommand*\ma@thehead[2]{\textbf{#1 (#2)}\\}
26 \newcommand*\ma@theneck[1]{\textsl{#1}\\}
27
28 \newenvironment{axiom}[2]{\ma@setlabel{#1}{#2}\ma@thehead{Axiom}{#1}}{}
29 \newenvironment{declaration}[2]{\ma@setlabel{#1}{#2}\ma@thehead{Declaration}{#1}}{}
30 \newenvironment{definition}[2]{}{}
31 \newenvironment{proposition}[2]{\ma@setlabel{#1}{#2}\ma@thehead{Proposition}{#1}}{}
32 \newenvironment{proof}[2]{\ma@theneck{Proof}}{}
33 \newenvironment{ma@step}[1]{\color{#1}}{\\}
34
35 \newcommand*\ma@tmp{}
36 \newcommand*\ma@skip[4]{}
37 \newcommand*\ma@next[5]{\def\ma@tmp{#5}\ifx\ma@tmp\empty #4\let\ma@tmp=\ma@skip\else #1#2{#5}\let\ma@tmp=\ma@next\fi\ma@tmp #3#2#3#4}
38
39 \newcommand*\ma@space{ }
40 \newcommand*\ma@arg[1]{#1}
41
42 \newcommand*\PROP{PROP}
43 \newcommand*\CROP[1]{CROP}
44 \newcommand*\TYPE[1]{TYPE}
45 \newcommand*\LREF[2]{#1}
46 \newcommand*\GREF[2]{#1}
47 \newcommand*\ABBR[3]{(D #1 #2 #3) }
48 \newcommand*\ABST[2]{(I #1 #2) }
49 \newcommand*\PROD[2]{(P #1 #2) }
50 \newcommand*\APPL{(A)\ma@next\ma@space\ma@arg\ma@space\relax}
51 \newcommand*\CASE[3]{(C #1 #2 #3)\ma@next\ma@space\ma@arg\ma@space\relax}
52
53 \newcommand*\ma@with{ with }
54 \newcommand*\ma@comma{, }
55 \newcommand*\ma@stop{.\end{ma@step}}
56 \newcommand*\ma@head[4]{\def\ma@tmp{#4}%
57    \ifx\ma@tmp\empty\begin{ma@step}{#1}\textbf{#2}%
58    \else\begin{ma@step}{#3}\textbf{#4}%
59    \fi
60 }
61 \newcommand*\ma@tail{\ma@next\ma@with\ma@arg\ma@comma\ma@stop}
62
63 \newcommand*\EXIT[1]{\ma@head{}{}{\ma@exit}{end} of block #1\ma@stop}
64 \newcommand*\OPEN[3]{\ma@head{}{}{\ma@open}{#1} is this block #3\ma@stop}
65 \newcommand*\PRIM[3]{\ma@head{}{}{\ma@prim}{#1} will have type #3\ma@stop}
66 \newcommand*\DECL[3]{\ma@head{\ma@qed}{\_QED}{\ma@fwd}{#1} has type #3\\}
67 \newcommand*\BODY[1]{being #1\ma@stop}
68 \newcommand*\STEP[1]{by #1\ma@tail}
69 \newcommand*\DEST[1]{by cases on #1\ma@tail}
70
71 \makeatother
72
73 \endinput