]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/components/binaries/matex/test/matex.sty
made executable again
[helm.git] / matita / components / binaries / matex / test / matex.sty
index 7d6ae277e8b678f41181428b31e309b2ab5a6a1e..4bd7393eac9880abe63df85df516cba55b00ade7 100644 (file)
@@ -1,5 +1,5 @@
 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesPackage{matex}[2016/07/03 MaTeX Package]
+\ProvidesPackage{matex}[2017/02/27 MaTeX Package]
 \RequirePackage{xcolor}
 \RequirePackage[lcgreekalpha]{stix}
 \ExecuteOptions{}
@@ -9,6 +9,11 @@
 
 \makeatletter
 
+\newcommand*\ma@sort{\mathrm}
+\newcommand*\ma@gref{\mathrm}
+\newcommand*\ma@lref{\mathrm}
+\newcommand*\ma@decl{\mathbf}
+
 \definecolor{ma@black}{HTML}{000000}
 \definecolor{ma@blue}{HTML}{00005F}
 \definecolor{ma@purple}{HTML}{3F005F}
@@ -73,7 +78,7 @@
 \newenvironment{assumption}[2]{\ma@thehead{Assumption}{has type}{#1}{#2}$}{$\par}
 \newenvironment{axiom}[2]{\ma@thehead{Axiom}{states}{#1}{#2}$}{$\par}
 \newenvironment{declaration}[2]{\ma@thehead{Definition}{of type}{#1}{#2}$}{$\par}
-\newenvironment{definition}[2]{\ma@theneck{is defined as}$}{$\par}
+\newenvironment{definition}[2]{\ma@theneck{is defined as}$}{$.\par}
 \newenvironment{proposition}[2]{\ma@thehead{Proposition}{stating}{#1}{#2}$}{$\par}
 \newenvironment{proof}[2]{\ma@theneck{is proved by}}{\par}
 \newenvironment{ma@step}[1]{\color{#1}}{\par}
 \newcommand*\ma@bind{\ma@thop{}}
 \newcommand*\ma@skip[1]{}
 
-\newcommand*\PROP{\mathord\mathrm{PROP}}
-\newcommand*\CROP[1]{\mathord\mathrm{CROP}}
-\newcommand*\TYPE[1]{\mathord\mathrm{TYPE}}
-\newcommand*\LREF[2]{\ma@setoptlink{#1}{#2}}
-\newcommand*\GREF[2]{\ma@setoptlink{\mathrm{#1}}{#2}}
-\newcommand*\ABBR[4]{\ma@op\ma@setopttarget{#1}{#2}\ma@abbr #4\ma@cast #3\ma@cp\ma@bind}
-\newcommand*\ABST[3]{\ma@op\ma@setopttarget{#1}{#2}\ma@cast #3\ma@cp\ma@bind}
+\newcommand*\PROP{\mathord\ma@sort{PROP}}
+\newcommand*\CROP[1]{\mathord\ma@sort{CROP}}
+\newcommand*\TYPE[1]{\mathord\ma@sort{TYPE}}
+\newcommand*\LREF[2]{\ma@setoptlink{\ma@lref{#1}}{#2}}
+\newcommand*\GREF[2]{\ma@setoptlink{\ma@gref{#1}}{#2}}
+\newcommand*\ABBR[4]{\ma@op\ma@setopttarget{\ma@lref{#1}}{#2}\ma@abbr #4\ma@cast #3\ma@cp\ma@bind}
+\newcommand*\ABST[3]{\ma@op\ma@setopttarget{\ma@lref{#1}}{#2}\ma@cast #3\ma@cp\ma@bind}
 \newcommand*\PROD[3]{\def\ma@tmp{#2}%
    \ifx\ma@tmp\empty #3\ma@arrw\else
-   \ma@op\ma@prod\ma@setopttarget{#1}{#2}\ma@cast #3\ma@cp\ma@bind\fi
+   \ma@op\ma@prod\ma@setopttarget{\ma@lref{#1}}{#2}\ma@cast #3\ma@cp\ma@bind\fi
 }
 \newcommand*\FALL[3]{\def\ma@tmp{#2}%
    \ifx\ma@tmp\empty #3\ma@impl\else
-   \ma@op\ma@fall\ma@setopttarget{#1}{#2}\ma@cast #3\ma@cp\ma@bind\fi
+   \ma@op\ma@fall\ma@setopttarget{\ma@lref{#1}}{#2}\ma@cast #3\ma@cp\ma@bind\fi
 }
 \newcommand*\APPL[1]{#1\ma@args}
 \newcommand*\CASE[3]{#3\ma@case\ma@cases}
 \newcommand*\ma@comma{, }
 \newcommand*\ma@stop{.\end{ma@step}}
 \newcommand*\ma@head[6]{\def\ma@tmp{#5}%
-   \ifx\ma@tmp\empty\begin{ma@step}{#1}$\mathbf{\ma@setopttarget{#2}{#3}}$%
-   \else\begin{ma@step}{#4}$\mathbf{\ma@setopttarget{#5}{#6}}$%
+   \ifx\ma@tmp\empty\begin{ma@step}{#1}$\ma@setopttarget{\ma@decl{#2}}{#3}$%
+   \else\begin{ma@step}{#4}$\ma@setopttarget{\ma@decl{#5}}{#6}$%
    \fi
 }
 \newcommand*\ma@tail{\ma@list\ma@with\ma@term\ma@comma\ma@stop}
 \newcommand*\ma@type[1]{\def\ma@tmp{#1}%
-   \ifx\ma@tmp\empty\mathrm{(omitted)}\else #1\fi
+   \ifx\ma@tmp\empty\ma@gref{(omitted)}\else #1\fi
 }
 
 \newcommand*\EXIT[1]{\ma@head{\ma@exit}{end}{}{}{}{} of block #1\ma@stop}
 \newcommand*\OPEN[3]{\ma@head{}{}{}{\ma@open}{#1}{#2} is this block #3\ma@stop}
-\newcommand*\PRIM[3]{\ma@head{}{}{}{\ma@prim}{#1}{#2} will have type $\ma@type{#3}$\ma@stop}
-\newcommand*\DECL[3]{\ma@head{\ma@qed}{\_QED}{}{\ma@fwd}{#1}{#2} has type $\ma@type{#3}$\par}
+\newcommand*\PRIM[3]{\ma@head{}{}{}{\ma@prim}{#1}{#2} will have type: $\ma@type{#3}$\ma@stop}
+\newcommand*\DECL[3]{\ma@head{\ma@qed}{\_QED}{}{\ma@fwd}{#1}{#2} has type: $\ma@type{#3}$\par}
 \newcommand*\BODY[1]{being $#1$\ma@stop}
 \newcommand*\STEP[1]{by $#1$\ma@tail}
 \newcommand*\DEST[1]{by cases on $#1$\ma@tail}