Merge branch 'topcom'
[barvinok.git] / doc / mydefs.sty
blob565ad529b43ba3286eb1c9262f8c4d9ad94cf8f3
1 \usepackage{amsmath,amsfonts,amssymb,makeidx}
2 \usepackage{glosstex}
4 \glxitemorderdefault{acr}{l}
6 \def\indac#1{%
7 \ac{#1}%
8 \expandafter\ifx\csname GLX@term@@#1\endcsname\relax%
9 \else%
10 \index{\csname GLX@term@@#1\endcsname\space%
11 (\csname GLX@term@#1\endcsname)}%
12 \fi}
14 \def\andindex{%
15 \@ifnextchar[{\@ndindex}%
16 {\@ndind@x}}
17 \def\@ndindex[#1]#2{%
18 {#1#2}\index{#2@{#1#2}}}
19 \def\@ndind@x#1{%
20 {#1\index{#1}}}
21 \def\defindex#1{%
22 {{\em #1}\index{#1|bold}}}
24 \let\ai=\andindex
26 \newcount\prefcount
27 \newcount\rpage
29 \def\pref#1{%
30 \global\advance\prefcount by 1%
31 \edef\foo{pref\the\prefcount}%
32 \label\foo%
33 \rpage=\simple@pageref\foo%
34 \advance\rpage by -\simple@pageref{#1}%
35 \ref{#1}%
36 \ifnum\rpage=0%
37 \else\ifnum\rpage=1%
38 \ on the previous page%
39 \else\ifnum\rpage=-1%
40 %\ on the next page%
41 \else%
42 \ on page~\pageref{#1}%
43 \fi\fi\fi%
46 \def\npref#1{%
47 \global\advance\prefcount by 1%
48 \edef\foo{pref\the\prefcount}%
49 \label\foo%
50 \rpage=\simple@pageref\foo%
51 \advance\rpage by -\simple@pageref{#1}%
52 \ref{#1}%
53 \ifnum\rpage=0%
54 \else\ifnum\rpage=1%
55 \ on the previous page%
56 \else\ifnum\rpage=-1%
57 %\ on the next page%
58 \else%
59 \ op bladzijde~\pageref{#1}%
60 \fi\fi\fi%
63 \def\sindex#1#2{\index{#2!#1|see{#1 #2}}}
64 \def\ssindex#1#2{\index{#2!#1|see{#1#2}}}
65 \def\tindex#1#2{\index{#2@{\tt #2}!{\tt #1::}|see{{\tt #1\discretionary{}{}{}::\discretionary{}{}{}#2}}}}
67 \newtheorem{theorem}{Theorem}
68 \newtheorem{definition}[theorem]{Definition}
69 \newtheorem{proposition}[theorem]{Proposition}
70 \newtheorem{lemma}[theorem]{Lemma}
71 \newtheorem{corollary}[theorem]{Corollary}
72 \newtheorem{example}[theorem]{Example}
73 \numberwithin{theorem}{section}
75 \def\NN{\mathbb{N}}
76 \def\ZZ{\mathbb{Z}}
77 \def\QQ{\mathbb{Q}}
78 \def\RR{\mathbb{R}}
79 \def\CC{\mathbb{C}}
80 \def\lb{\left\{}
81 \def\rb{\right\}}
82 \def\nc{\nomenclature}
84 \def\convhull{\mathop{\rm conv}\nolimits}
85 \def\affhull{\mathop{\rm aff}\nolimits}
86 \def\linhull{\mathop{\rm lin}\nolimits}
87 \def\poshull{\mathop{\rm pos}\nolimits}
88 \def\lexmin{\mathop{\rm lexmin}}
89 \def\lexmax{\mathop{\rm lexmax}}
90 \def\dcone{\mathop{\rm dcone}\nolimits}
91 \def\rank{\mathop{\rm rank}\nolimits}
92 \def\Ker{\mathop{\rm Ker}\nolimits}
93 \def\Im{\mathop{\rm Im}\nolimits}
94 \def\argmax{\mathop{\rm argmax}}
96 \def\bold#1{{\bf #1}}
98 \providecommand{\abs}[1]{\left|#1\right|}
99 \providecommand{\norm}[1]{\left\lVert#1\right\rVert}
100 \providecommand{\floor}[1]{\left\lfloor#1\right\rfloor}
101 \providecommand{\ceil}[1]{\left\lceil#1\right\rceil}
102 \providecommand{\fractional}[1]{\left\{#1\right\}}
103 \providecommand{\cractional}[1]{\left\{\left\{#1\right\}\right\}}
104 \providecommand{\Iverson}[1]{\left[#1\right]}
105 \DeclareMathOperator{\cone}{cone}
106 \DeclareMathOperator{\diag}{diag}
107 \DeclareMathOperator{\sgn}{sgn}
108 \DeclareMathOperator{\vol}{vol}
109 \DeclareMathOperator{\todd}{td}
111 \def\sm#1{
112 \left[
113 \begin{matrix}
115 \end{matrix}
116 \right]
119 \def\VR{{\cal V}}
120 \def\sp#1#2{\langle\vec #1,\vec #2\rangle}
121 \def\sps#1#2{\langle #1, #2\rangle}
122 \def\T{{\scriptscriptstyle T}}
123 \def\f#1#2{f(#1; \vec #2)}
124 \def\ff#1#2{f(#1; #2)}
126 \def\indf#1{\left[#1\right]}
128 \def\LattE/{\ai[\tt]{LattE}}
129 \def\LattEmk/{\ai[\tt]{LattE macchiato}}
130 \def\PolyLib/{\ai[\tt]{PolyLib}}
131 \def\Omegalib/{\ai[\tt]{Omega}}
132 \def\barvinok/{\ai[\tt]{barvinok}}
133 \def\bernstein/{\ai[\tt]{bernstein}}
134 \def\piplib/{\ai[\tt]{piplib}}
135 \def\psp/{piecewise step-poly\-no\-mi\-al}
136 \def\rgf/{rational generating function}
137 \def\vm#1{\underline{\vec #1}}
139 \newcommand{\R}{\ensuremath{{\mathcal R}}}
140 \newcommand{\reuse}[2]{\ensuremath{\textrm{\sf reuse}_{#1}^{#2}}}
141 \newcommand{\ADS}[2]{\ensuremath{\textrm{\sf ADS}_{#1}^{#2}}}
142 \newcommand{\BRD}[2]{\ensuremath{\textrm{\sf BRD}_{#1}^{#2}}}
143 \let\from\leftarrow
145 \def\vec#1{\mathchoice{\mbox{\boldmath$\displaystyle\bf#1$}}
146 {\mbox{\boldmath$\textstyle\bf#1$}}
147 {\mbox{\boldmath$\scriptstyle\bf#1$}}
148 {\mbox{\boldmath$\scriptscriptstyle\bf#1$}}}
150 \def\DP{\mbox{\sl DP\/}}
151 \def\DD{\mbox{\sl DD\/}}
152 \def\DF{\mbox{\sl DF\/}}
154 \def\Rd{R_{\rm d}}
155 \def\rd{r_{\rm d}}
157 \@ifpackageloaded{hyperref}{%
158 \def\eqdeclaration#1{, see Equation\nobreakspace(#1)}%
159 \def\pagedeclaration#1{, page\nobreakspace\hyperpage{#1}}%
160 \def\addcontentsline#1#2#3{% toc extension, type, tag
161 \begingroup
162 \let\label\@gobble
163 \let\textlatin\@firstofone
164 \ifx\@currentHref\@empty
165 \Hy@Warning{%
166 No destination for bookmark of \string\addcontentsline,%
167 \MessageBreak destination is added%
169 \phantomsection
171 \expandafter\ifx\csname toclevel@#2\endcsname\relax
172 \begingroup
173 \def\Hy@tempa{#1}%
174 \ifx\Hy@tempa\Hy@bookmarkstype
175 \Hy@WarningNoLine{bookmark level for unknown #2 defaults to 0}%
176 \else
177 \Hy@Info{bookmark level for unknown #2 defaults to 0}%
179 \endgroup
180 \expandafter\gdef\csname toclevel@#2\endcsname{0}%
182 \edef\Hy@toclevel{\csname toclevel@#2\endcsname}%
183 \Hy@writebookmark{\csname the#2\endcsname}%
184 {#3}%
185 {\@currentHref}%
186 {\Hy@toclevel}%
187 {#1}%
188 \ifHy@verbose
189 \typeout{pdftex: bookmark at \the\inputlineno:
190 {\csname the#2\endcsname}
191 {#3}
192 {\@currentHref}%
193 {\Hy@toclevel}%
194 {#1}%
197 \addtocontents{#1}{%
198 \protect\contentsline{#2}{#3}{\protect\hyperpage{\thepage}}{\@currentHref}%
200 \endgroup