]> matita.cs.unibo.it Git - helm.git/blob - matita/components/binaries/matex/test/matex.sty
- matex: support for alpha-conversion completed
[helm.git] / matita / components / binaries / matex / test / matex.sty
1 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
2 \ProvidesPackage{matex}[2016/04/28 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*\neverindent{\setlength\parindent{0pt}}
20
21 %\newcommand*\setlabel[1]{\protected@edef\@currentlabel{#1}}
22 %\newcommand*\ObjLabel[1]{\label{obj:#1}\hypertarget{obj:#1}{}}
23 %\newcommand*\ObjRef[1]{\hyperlink{obj:#1}{\ref*{obj:#1}}}
24 %\newcommand*\ma@setlabel[2]{\setlabel{#1}\ObjLabel{#2}}
25
26 \newcommand*\ma@settarget[2]{\hypertarget{obj:#2}{}}
27 \newcommand*\ma@setlink[2]{\hyperlink{obj:#2}{#1}}
28
29 \newcommand*\ObjIncNode{}
30 \newcommand*\ObjNode{}
31
32 \newcommand*\ma@thehead[2]{\ObjIncNode\textbf{#1 \ObjNode(#2)}\neverindent\par}
33 \newcommand*\ma@theneck[1]{\textsl{#1}\neverindent\par}
34
35 \newenvironment{axiom}[2]{\ma@settarget{#1}{#2}\ma@thehead{Axiom}{#1}}{\par}
36 \newenvironment{declaration}[2]{\ma@settarget{#1}{#2}\ma@thehead{Declaration}{#1}}{\par}
37 \newenvironment{definition}[2]{}{\par}
38 \newenvironment{proposition}[2]{\ma@settarget{#1}{#2}\ma@thehead{Proposition}{#1}}{\par}
39 \newenvironment{proof}[2]{\ma@theneck{Proof}}{\par}
40 \newenvironment{ma@step}[1]{\color{#1}}{\par}
41
42 \newcommand*\ma@tmp{}
43 \newcommand*\ma@skip[4]{}
44 \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}
45
46 \newcommand*\ma@space{ }
47 \newcommand*\ma@arg[1]{#1}
48
49 \newcommand*\PROP{PROP}
50 \newcommand*\CROP[1]{CROP}
51 \newcommand*\TYPE[1]{TYPE}
52 \newcommand*\LREF[2]{#1}
53 \newcommand*\GREF[2]{\ma@setlink{#1}{#2}}
54 \newcommand*\ABBR[3]{(D #1 #2 #3) }
55 \newcommand*\ABST[2]{(I #1 #2) }
56 \newcommand*\PROD[2]{(P #1 #2) }
57 \newcommand*\APPL{(A)\ma@next\ma@space\ma@arg\ma@space\relax}
58 \newcommand*\CASE[3]{(C #1 #2 #3)\ma@next\ma@space\ma@arg\ma@space\relax}
59
60 \newcommand*\ma@with{ with }
61 \newcommand*\ma@comma{, }
62 \newcommand*\ma@stop{.\end{ma@step}}
63 \newcommand*\ma@head[4]{\def\ma@tmp{#4}%
64    \ifx\ma@tmp\empty\begin{ma@step}{#1}\textbf{#2}%
65    \else\begin{ma@step}{#3}\textbf{#4}%
66    \fi
67 }
68 \newcommand*\ma@tail{\ma@next\ma@with\ma@arg\ma@comma\ma@stop}
69
70 \newcommand*\EXIT[1]{\ma@head{}{}{\ma@exit}{end} of block #1\ma@stop}
71 \newcommand*\OPEN[3]{\ma@head{}{}{\ma@open}{#1} is this block #3\ma@stop}
72 \newcommand*\PRIM[3]{\ma@head{}{}{\ma@prim}{#1} will have type #3\ma@stop}
73 \newcommand*\DECL[3]{\ma@head{\ma@qed}{\_QED}{\ma@fwd}{#1} has type #3\par}
74 \newcommand*\BODY[1]{being #1\ma@stop}
75 \newcommand*\STEP[1]{by #1\ma@tail}
76 \newcommand*\DEST[1]{by cases on #1\ma@tail}
77
78 \makeatother
79
80 \endinput