barvinok 0.41.8
[barvinok.git] / doc / mydefs.sty
blob82db3e8c2e88dd4547f58de3ca113268d92d5cff
1 \usepackage{amsmath,amsfonts,amssymb,makeidx}
2 \usepackage{listings}
3 \usepackage{glosstex}
4 \usepackage{tikz}
5 \usetikzlibrary{fit,chains,positioning,calc,backgrounds,decorations}
6 \usetikzlibrary{decorations.pathmorphing}
8 \lstset{language=C,basicstyle=\tt,flexiblecolumns=false,captionpos=b}
10 \glxitemorderdefault{acr}{l}
12 \def\indac#1{%
13 \ac{#1}%
14 \expandafter\ifx\csname GLX@term@@#1\endcsname\relax%
15 \else%
16 \index{\csname GLX@term@@#1\endcsname\space%
17 (\csname GLX@term@#1\endcsname)}%
18 \fi}
20 \def\andindex{%
21 \@ifnextchar[{\@ndindex}%
22 {\@ndind@x}}
23 \def\@ndindex[#1]#2{%
24 {#1#2}\index{#2@{#1#2}}}
25 \def\@ndind@x#1{%
26 {#1\index{#1}}}
27 \def\defindex#1{%
28 {{\em #1}\index{#1|bold}}}
30 \let\ai=\andindex
32 \newcount\prefcount
33 \newcount\rpage
35 \def\pref#1{%
36 \global\advance\prefcount by 1%
37 \edef\foo{pref\the\prefcount}%
38 \label\foo%
39 \rpage=\simple@pageref\foo%
40 \advance\rpage by -\simple@pageref{#1}%
41 \ref{#1}%
42 \ifnum\rpage=0%
43 \else\ifnum\rpage=1%
44 \ on the previous page%
45 \else\ifnum\rpage=-1%
46 %\ on the next page%
47 \else%
48 \ on page~\pageref{#1}%
49 \fi\fi\fi%
52 \def\npref#1{%
53 \global\advance\prefcount by 1%
54 \edef\foo{pref\the\prefcount}%
55 \label\foo%
56 \rpage=\simple@pageref\foo%
57 \advance\rpage by -\simple@pageref{#1}%
58 \ref{#1}%
59 \ifnum\rpage=0%
60 \else\ifnum\rpage=1%
61 \ on the previous page%
62 \else\ifnum\rpage=-1%
63 %\ on the next page%
64 \else%
65 \ op bladzijde~\pageref{#1}%
66 \fi\fi\fi%
69 \def\sindex#1#2{\index{#2!#1|see{#1 #2}}}
70 \def\ssindex#1#2{\index{#2!#1|see{#1#2}}}
71 \def\tindex#1#2{\index{#2@{\tt #2}!{\tt #1::}|see{{\tt #1\discretionary{}{}{}::\discretionary{}{}{}#2}}}}
73 \newtheorem{theorem}{Theorem}
74 \newtheorem{definition}[theorem]{Definition}
75 \newtheorem{proposition}[theorem]{Proposition}
76 \newtheorem{lemma}[theorem]{Lemma}
77 \newtheorem{corollary}[theorem]{Corollary}
78 \newtheorem{example}[theorem]{Example}
79 \numberwithin{theorem}{section}
81 \let\c@equation\c@theorem
82 \let\c@figure\c@theorem
83 \renewcommand{\theequation}{\arabic{section}.\arabic{equation}}
84 \renewcommand{\thefigure}{\arabic{section}.\arabic{figure}}
86 \def\NN{\mathbb{N}}
87 \def\ZZ{\mathbb{Z}}
88 \def\QQ{\mathbb{Q}}
89 \def\RR{\mathbb{R}}
90 \def\CC{\mathbb{C}}
91 \def\lb{\left\{}
92 \def\rb{\right\}}
93 \def\nc{\nomenclature}
95 \def\convhull{\mathop{\rm conv}\nolimits}
96 \def\affhull{\mathop{\rm aff}\nolimits}
97 \def\linhull{\mathop{\rm lin}\nolimits}
98 \def\poshull{\mathop{\rm pos}\nolimits}
99 \def\inthull{\mathop{\rm int.hull}\nolimits}
100 \def\lexmin{\mathop{\rm lexmin}}
101 \def\lexmax{\mathop{\rm lexmax}}
102 \def\dcone{\mathop{\rm dcone}\nolimits}
103 \def\rank{\mathop{\rm rank}\nolimits}
104 \def\Ker{\mathop{\rm Ker}\nolimits}
105 \def\Im{\mathop{\rm Im}\nolimits}
106 \def\argmax{\mathop{\rm argmax}}
108 \def\bold#1{{\bf #1}}
110 \providecommand{\abs}[1]{\left|#1\right|}
111 \providecommand{\norm}[1]{\left\lVert#1\right\rVert}
112 \providecommand{\floor}[1]{\left\lfloor#1\right\rfloor}
113 \providecommand{\ceil}[1]{\left\lceil#1\right\rceil}
114 \providecommand{\fractional}[1]{\left\{#1\right\}}
115 \providecommand{\cractional}[1]{\left\{\left\{#1\right\}\right\}}
116 \providecommand{\Iverson}[1]{\left[#1\right]}
117 \DeclareMathOperator{\cone}{cone}
118 \DeclareMathOperator{\diag}{diag}
119 \DeclareMathOperator{\sgn}{sgn}
120 \DeclareMathOperator{\vol}{vol}
121 \DeclareMathOperator{\todd}{td}
122 \DeclareMathOperator{\Todd}{Todd}
123 \DeclareMathOperator{\width}{width}
125 \def\sm#1{
126 \left[
127 \begin{matrix}
129 \end{matrix}
130 \right]
133 \def\VR{{\cal V}}
134 \def\sp#1#2{\langle\vec #1,\vec #2\rangle}
135 \def\sps#1#2{\langle #1, #2\rangle}
136 \def\T{{\scriptscriptstyle T}}
137 \def\f#1#2{f(#1; \vec #2)}
138 \def\ff#1#2{f(#1; #2)}
140 \def\indf#1{\left[#1\right]}
142 \def\LattE/{\ai[\tt]{LattE}}
143 \def\LattEmk/{\ai[\tt]{LattE macchiato}}
144 \def\PolyLib/{\ai[\tt]{PolyLib}}
145 \def\isl/{\ai[\tt]{isl}}
146 \def\iscc/{\ai[\tt]{iscc}}
147 \def\barvinok/{\ai[\tt]{barvinok}}
148 \def\cloog/{\ai[\tt]{CLooG}}
149 \def\piplib/{\ai[\tt]{piplib}}
150 \def\psp/{piecewise step-poly\-no\-mi\-al}
151 \def\rgf/{rational generating function}
152 \def\vm#1{\underline{\vec #1}}
154 \newcommand{\R}{\ensuremath{{\mathcal R}}}
155 \newcommand{\reuse}[2]{\ensuremath{\textrm{\sf reuse}_{#1}^{#2}}}
156 \newcommand{\ADS}[2]{\ensuremath{\textrm{\sf ADS}_{#1}^{#2}}}
157 \newcommand{\BRD}[2]{\ensuremath{\textrm{\sf BRD}_{#1}^{#2}}}
158 \let\from\leftarrow
160 \def\vec#1{\mathchoice{\mbox{\boldmath$\displaystyle\bf#1$}}
161 {\mbox{\boldmath$\textstyle\bf#1$}}
162 {\mbox{\boldmath$\scriptstyle\bf#1$}}
163 {\mbox{\boldmath$\scriptscriptstyle\bf#1$}}}
165 \def\DP{\mbox{\sl DP\/}}
166 \def\DD{\mbox{\sl DD\/}}
167 \def\DF{\mbox{\sl DF\/}}
169 \def\Rd{R_{\rm d}}
170 \def\rd{r_{\rm d}}
172 \@ifpackageloaded{hyperref}{%
173 \def\eqdeclaration#1{, see Equation\nobreakspace(#1)}%
174 \def\pagedeclaration#1{, page\nobreakspace\hyperpage{#1}}%
175 \def\addcontentsline#1#2#3{% toc extension, type, tag
176 \begingroup
177 \let\label\@gobble
178 \let\textlatin\@firstofone
179 \ifx\@currentHref\@empty
180 \Hy@Warning{%
181 No destination for bookmark of \string\addcontentsline,%
182 \MessageBreak destination is added%
184 \phantomsection
186 \expandafter\ifx\csname toclevel@#2\endcsname\relax
187 \begingroup
188 \def\Hy@tempa{#1}%
189 \ifx\Hy@tempa\Hy@bookmarkstype
190 \Hy@WarningNoLine{bookmark level for unknown #2 defaults to 0}%
191 \else
192 \Hy@Info{bookmark level for unknown #2 defaults to 0}%
194 \endgroup
195 \expandafter\gdef\csname toclevel@#2\endcsname{0}%
197 \edef\Hy@toclevel{\csname toclevel@#2\endcsname}%
198 \Hy@writebookmark{\csname the#2\endcsname}%
199 {#3}%
200 {\@currentHref}%
201 {\Hy@toclevel}%
202 {#1}%
203 \ifHy@verbose
204 \typeout{pdftex: bookmark at \the\inputlineno:
205 {\csname the#2\endcsname}
206 {#3}
207 {\@currentHref}%
208 {\Hy@toclevel}%
209 {#1}%
212 \addtocontents{#1}{%
213 \protect\contentsline{#2}{#3}{\protect\hyperpage{\thepage}}{\@currentHref}%
215 \endgroup