forked from mbg/uow-exam
-
Notifications
You must be signed in to change notification settings - Fork 2
/
fancyeq.sty
85 lines (73 loc) · 1.88 KB
/
fancyeq.sty
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
\ProvidesPackage{fancyeq}
\usepackage{amsmath}
%\usepackage{polytable}
\newcommand{\figrule}{\begin{center}\hrule\end{center}}
\newcommand{\lastexpr}[1]{&\quad #1}
\newcommand{\expr}[1]{\lastexpr{#1}\\}
\newcommand{\hinte}[2]{\qquad\text{\{\quad\ #2 \quad\}}\\}
\newcommand{\hint}[1]{\hinte{=}{#1}}
\newcommand{\set}[1]{\{\,#1\,\}}
\newcommand{\betared}{\underset{\beta}{\Rightarrow}}
\newcommand{\betaeqv}{\underset{\beta}{\Leftrightarrow}}
\newcommand{\haskellCaption}{}
\newcommand{\haskellLabel}{}
\newenvironment{haskell}[2]
{
\renewcommand{\haskellCaption}{#1}
\renewcommand{\haskellLabel}{#2}
\begin{figure}[h]
\figrule
\[
\begin{array}{ll}
}
{
\end{array}
\]
\caption{\haskellCaption}
\label{\haskellLabel}
\figrule
\end{figure}
}
\newcommand{\fancyfigCaption}{}
\newcommand{\fancyfigLabel}{}
\newenvironment{fancyeq}[3]
{
\renewcommand{\fancyfigCaption}{#1}
\renewcommand{\fancyfigLabel}{#2}
\begin{figure}[h]
\figrule
\[
\begin{array}{#3}
}
{
\end{array}
\]
\caption{\fancyfigCaption}
\label{\fancyfigLabel}
\figrule
\end{figure}
}
\newenvironment{fancyfig}[2]
{
\renewcommand{\fancyfigCaption}{#1}
\renewcommand{\fancyfigLabel}{#2}
\begin{figure}
\figrule
}
{
\caption{\fancyfigCaption}
\label{\fancyfigLabel}
\figrule
\end{figure}
}
\newcommand{\hseq}[1]{\begin{array}{lcl}#1\end{array}}
\newcommand{\hsdef}[1]{\begin{array}{l}#1\end{array}}
\newcommand{\hslist}[1]{[\mskip1.5mu #1 \mskip1.5mu]}
\newcommand{\bind}{\gg\!\!=}
\newcommand{\append}{\makebox[15pt]{+\kern-0.5ex+}}
\newcommand{\applicative}{<\!\!\!*\!\!\!>}
%\newenvironment{fancyfig}[2]
%{\begin{figure}[h]\vspace{5pt}
%\renewcommand{\fancyfigCaption}{#1}
%\renewcommand{\fancyfigLabel}{#2}}
%{\vspace{-17pt}\caption{\fancyfigCaption}\label{\fancyfigLabel}\end{figure}}