add some iscc tests
[barvinok.git] / doc / mydefs.sty
blob49121ec9178f25c48b80826d4c1250a0a1c19d2c
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\Omegalib/{\ai[\tt]{Omega}}
146 \def\isl/{\ai[\tt]{isl}}
147 \def\iscc/{\ai[\tt]{iscc}}
148 \def\barvinok/{\ai[\tt]{barvinok}}
149 \def\cloog/{\ai[\tt]{CLooG}}
150 \def\piplib/{\ai[\tt]{piplib}}
151 \def\psp/{piecewise step-poly\-no\-mi\-al}
152 \def\rgf/{rational generating function}
153 \def\vm#1{\underline{\vec #1}}
155 \newcommand{\R}{\ensuremath{{\mathcal R}}}
156 \newcommand{\reuse}[2]{\ensuremath{\textrm{\sf reuse}_{#1}^{#2}}}
157 \newcommand{\ADS}[2]{\ensuremath{\textrm{\sf ADS}_{#1}^{#2}}}
158 \newcommand{\BRD}[2]{\ensuremath{\textrm{\sf BRD}_{#1}^{#2}}}
159 \let\from\leftarrow
161 \def\vec#1{\mathchoice{\mbox{\boldmath$\displaystyle\bf#1$}}
162 {\mbox{\boldmath$\textstyle\bf#1$}}
163 {\mbox{\boldmath$\scriptstyle\bf#1$}}
164 {\mbox{\boldmath$\scriptscriptstyle\bf#1$}}}
166 \def\DP{\mbox{\sl DP\/}}
167 \def\DD{\mbox{\sl DD\/}}
168 \def\DF{\mbox{\sl DF\/}}
170 \def\Rd{R_{\rm d}}
171 \def\rd{r_{\rm d}}
173 \@ifpackageloaded{hyperref}{%
174 \def\eqdeclaration#1{, see Equation\nobreakspace(#1)}%
175 \def\pagedeclaration#1{, page\nobreakspace\hyperpage{#1}}%
176 \def\addcontentsline#1#2#3{% toc extension, type, tag
177 \begingroup
178 \let\label\@gobble
179 \let\textlatin\@firstofone
180 \ifx\@currentHref\@empty
181 \Hy@Warning{%
182 No destination for bookmark of \string\addcontentsline,%
183 \MessageBreak destination is added%
185 \phantomsection
187 \expandafter\ifx\csname toclevel@#2\endcsname\relax
188 \begingroup
189 \def\Hy@tempa{#1}%
190 \ifx\Hy@tempa\Hy@bookmarkstype
191 \Hy@WarningNoLine{bookmark level for unknown #2 defaults to 0}%
192 \else
193 \Hy@Info{bookmark level for unknown #2 defaults to 0}%
195 \endgroup
196 \expandafter\gdef\csname toclevel@#2\endcsname{0}%
198 \edef\Hy@toclevel{\csname toclevel@#2\endcsname}%
199 \Hy@writebookmark{\csname the#2\endcsname}%
200 {#3}%
201 {\@currentHref}%
202 {\Hy@toclevel}%
203 {#1}%
204 \ifHy@verbose
205 \typeout{pdftex: bookmark at \the\inputlineno:
206 {\csname the#2\endcsname}
207 {#3}
208 {\@currentHref}%
209 {\Hy@toclevel}%
210 {#1}%
213 \addtocontents{#1}{%
214 \protect\contentsline{#2}{#3}{\protect\hyperpage{\thepage}}{\@currentHref}%
216 \endgroup