-
Notifications
You must be signed in to change notification settings - Fork 13
/
macro.tex
204 lines (171 loc) · 6.36 KB
/
macro.tex
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
% Colors
\definecolor{potcolor}{RGB}{0,62,90}
% Formatting
\newcommand{\code}[1]{\texttt{#1}}
\newcommand{\codeit}[1]{\code{\textit{#1}}}
\newcommand{\const}[1]{\texttt{#1}}
\newcommand{\pred}[1]{\texttt{#1}}
\newcommand{\var}[1]{\texttt{#1}}
% Logic programs
\newcommand{\alt}[1]{\ensuremath{\mathbf{#1}}}
\newcommand{\ground}[1]{\ensuremath{\mathit{ground}(#1)}}
\newcommand{\vars}[1]{\ensuremath{\mathit{var}(#1)}}
\newcommand{\head}[1]{\ensuremath{\mathit{head}(#1)}}
\newcommand{\pbody}[1]{\ensuremath{\mathit{body}^+(#1)}}
\newcommand{\nbody}[1]{\ensuremath{\mathit{body}^-(#1)}}
\newcommand{\binders}[2]{\ensuremath{\mathit{bind}(#1)}}
\newcommand{\atom}[1]{\ensuremath{\mathit{atom}(#1)}}
\newcommand{\reduct}[2]{\ensuremath{#1^{#2}}}
% Systems
\newcommand{\acthex}{\sysfont{acthex}}
\newcommand{\adsolver}{\sysfont{adsolver}}
\newcommand{\anaconda}{\sysfont{anaconda}}
\newcommand{\anthem}{\sysfont{anthem}}
\newcommand{\asparagus}{\sysfont{asparagus}}
\newcommand{\aspartame}{\sysfont{aspartame}}
\newcommand{\aspcud}{\sysfont{aspcud}}
\newcommand{\aspic}{\sysfont{aspic}}
\newcommand{\aspmt}{\sysfont{aspmt}}
\newcommand{\asprin}{\sysfont{asprin}}
\newcommand{\assat}{\sysfont{assat}}
\newcommand{\berkmin}{\sysfont{berkmin}}
\newcommand{\chasp}{\sysfont{chasp}}
\newcommand{\chuffed}{\sysfont{chuffed}}
\newcommand{\claspar}{\sysfont{claspar}}
\newcommand{\claspD}{\sysfont{claspD}}
\newcommand{\claspfolio}{\sysfont{claspfolio}}
\newcommand{\claspre}{\sysfont{claspre}}
\newcommand{\clasp}{\sysfont{clasp}}
\newcommand{\clingcon}{\sysfont{clingcon}}
\newcommand{\clingo}{\sysfont{clingo}}
\newcommand{\cmodels}{\sysfont{cmodels}}
\newcommand{\coala}{\sysfont{coala}}
\newcommand{\conda}{\sysfont{conda}}
\newcommand{\cplex}{\sysfont{cplex}}
\newcommand{\dflat}{\sysfont{dflat}}
\newcommand{\dingo}{\sysfont{dingo}}
\newcommand{\dlvhex}{\sysfont{dlvhex}}
\newcommand{\dlv}{\sysfont{dlv}}
\newcommand{\ezcsp}{\sysfont{ezcsp}}
\newcommand{\ezsmt}{\sysfont{ezsmt}}
\newcommand{\fastdownward}{\sysfont{fastdownward}}
\newcommand{\ftolp}{\sysfont{f2lp}}
\newcommand{\gasp}{\sysfont{gasp}}
\newcommand{\gecode}{\sysfont{gecode}}
\newcommand{\gfd}{\sysfont{g12fd}}
\newcommand{\gidl}{\sysfont{gidl}}
\newcommand{\gnt}{\sysfont{gnt}}
\newcommand{\gringo}{\sysfont{gringo}}
\newcommand{\iclingo}{\sysfont{iclingo}}
\newcommand{\idp}{\sysfont{idp}}
\newcommand{\inca}{\sysfont{inca}}
\newcommand{\jdlv}{\sysfont{jdlv}}
\newcommand{\lctocasp}{\sysfont{lc2casp}}
\newcommand{\lparse}{\sysfont{lparse}}
\newcommand{\lpsolve}{\sysfont{lpsolve}}
\newcommand{\lptodiff}{\sysfont{lp2diff}}
\newcommand{\lptosat}{\sysfont{lp2sat}}
\newcommand{\mchaff}{\sysfont{mchaff}}
\newcommand{\measp}{\sysfont{measp}}
\newcommand{\metasp}{\sysfont{metasp}}
\newcommand{\mingo}{\sysfont{mingo}}
\newcommand{\miniconda}{\sysfont{miniconda}}
\newcommand{\minisatid}{\sysfont{minisatid}}
\newcommand{\minisat}{\sysfont{minisat}}
\newcommand{\minizinc}{\sysfont{minizinc}}
\newcommand{\mznfzn}{\sysfont{mzn2fzn}}
\newcommand{\nomorepp}{\sysfont{nomore++}}
\newcommand{\oclingo}{\sysfont{oclingo}}
\newcommand{\omiga}{\sysfont{omiga}}
\newcommand{\picatsat}{\sysfont{picatsat}}
\newcommand{\picat}{\sysfont{picat}}
\newcommand{\piclasp}{\sysfont{piclasp}}
\newcommand{\picosat}{\sysfont{picosat}}
\newcommand{\plasp}{\sysfont{plasp}}
\newcommand{\quontroller}{\sysfont{quontroller}}
\newcommand{\reify}{\sysfont{reify}}
\newcommand{\rosoclingo}{\sysfont{rosoclingo}}
\newcommand{\sag}{\sysfont{sag}}
\newcommand{\satz}{\sysfont{satz}}
\newcommand{\siege}{\sysfont{siege}}
\newcommand{\smac}{\sysfont{smac}}
\newcommand{\smodelscc}{\sysfont{smodels$_{\!cc}$}}
\newcommand{\smodelsr}{\sysfont{smodels}$_r$}
\newcommand{\smodels}{\sysfont{smodels}}
\newcommand{\sugar}{\sysfont{sugar}}
\newcommand{\sysfont}{\textit}
\newcommand{\teaspoon}{\sysfont{teaspoon}}
\newcommand{\unclasp}{\sysfont{unclasp}}
\newcommand{\wasp}{\sysfont{wasp}}
\newcommand{\zchaff}{\sysfont{zchaff}}
\newcommand{\zzz}{\sysfont{z3}}
\newcommand{\clingoM}[1]{\clingo{\small\textnormal{[}\textsc{#1}\textnormal{]}}}
\newcommand{\ASPm}[1]{ASP\raisebox{.7pt}{[\textsc{#1}]}}
\newcommand{\flatzinc}{\sysfont{FlatZinc}}
\newcommand{\aspif}{\sysfont{aspif}}
\newcommand{\python}{Python}
\newcommand{\lua}{Lua}
\newcommand{\cpp}{C++}
\newcommand{\C}{C}
\newcommand{\java}{Java}
\newcommand{\haskell}{Haskell}
% Environments
\theoremstyle{definition}
\newtheorem{texample}{Example}[section]
\newtheorem{tnote}{Remark}[section]
\newenvironment{note}{\begin{tnote}}{\hfill$\blacksquare$\end{tnote}}
\newenvironment{example}{\begin{texample}}{\hfill$\blacksquare$\end{texample}}
% Listings
\lstset{numbers=left,numberblanklines=false,basicstyle=\ttfamily,xleftmargin=5ex}
\lstdefinelanguage{GringoPython}%
{morekeywords={script,and,break,class,continue,def,del,elif,else,%
except,finally,for,from,global,if,import,in,is,lambda,not,%
or,pass,print,raise,return,try,while},%
sensitive=true,%
morecomment=[l]\#,%
morestring=[b]',%
morestring=[b]",%
morecomment=[s]{'''}{'''},%
morecomment=[s]{"""}{"""}%
}%
\lstdefinelanguage{GringoLua}%
{morekeywords={end,script,function,for,if,local,require,print,and,or,not,else,return,then},%
sensitive=true,%
morecomment=[l]{--},%
morecomment=[l]\#,%
morestring=[b]',%
morestring=[b]",%
morecomment=[s]{--[[}{--]]}%
}%
\newcommand{\Sim}{{\raise.17ex\hbox{\ensuremath{\scriptstyle\sim}}}}
\lstset{literate={~}{{\raise.17ex\hbox{$\scriptstyle\sim$}}}1}
% Margin Labels
\newlength{\marginlabelsize}
\setlength{\marginlabelsize}{\marginparwidth}
\addtolength{\marginlabelsize}{-2\fboxsep}
\addtolength{\marginlabelsize}{-2\fboxrule}
\newcommand{\marginlabel}[1]{\marginpar{\fbox{\parbox[t]{\marginlabelsize}{\footnotesize #1}}}}
% Headers and Footers
\pagestyle{fancy}
\renewcommand{\sectionmark}[1]{\markright{\thesection\quad #1}{}}
\renewcommand{\subsectionmark}[1]{\markright{\thesubsection\quad #1}{}}
\fancyhf{}
\fancyhead[R]{\thepage}
\fancyhead[L]{\textit{\nouppercase{\rightmark}}}
\headheight13.59999pt
% Railroad Diagrams
\setlength\railboxheight{11pt}
\setlength\railboxskip{16pt}
\setlength\railnamesep{-2pt}
\sloppy
% Other
% this macro is kinda ugly but the only way I found to workaround warnings
\def\attach{\textattachfile[color=1 0 0]}
\makeatletter
\newcommand{\gobblecomma}[1]{\@gobble{#1}\ignorespaces}
\makeatother
\def\SVNREVISION{$LastChangedRevision: 9329 $}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "guide"
%%% End: