lexmin.cc: move some code around to prepare for new version
[barvinok.git] / doc / mydefs.sty
blobd5dbf72c1ba57b0a448e8347c80a2ddbdb7b6b44
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 \newcounter{ex}
73 \newenvironment{example}
74 {\refstepcounter{ex}
75 \begin{quote}\small\noindent{\bf Example \theex}}
76 {\end{quote}}
77 \numberwithin{theorem}{section}
79 \def\NN{\mathbb{N}}
80 \def\ZZ{\mathbb{Z}}
81 \def\QQ{\mathbb{Q}}
82 \def\RR{\mathbb{R}}
83 \def\CC{\mathbb{C}}
84 \def\lb{\left\{}
85 \def\rb{\right\}}
86 \def\nc{\nomenclature}
88 \def\convhull{\mathop{\rm conv}\nolimits}
89 \def\affhull{\mathop{\rm aff}\nolimits}
90 \def\linhull{\mathop{\rm lin}\nolimits}
91 \def\poshull{\mathop{\rm pos}\nolimits}
92 \def\lexmin{\mathop{\rm lexmin}}
93 \def\lexmax{\mathop{\rm lexmax}}
94 \def\dcone{\mathop{\rm dcone}\nolimits}
95 \def\rank{\mathop{\rm rank}\nolimits}
96 \def\Ker{\mathop{\rm Ker}\nolimits}
97 \def\Im{\mathop{\rm Im}\nolimits}
98 \def\argmax{\mathop{\rm argmax}}
100 \def\bold#1{{\bf #1}}
102 \providecommand{\abs}[1]{\left|#1\right|}
103 \providecommand{\norm}[1]{\left\lVert#1\right\rVert}
104 \providecommand{\floor}[1]{\left\lfloor#1\right\rfloor}
105 \providecommand{\ceil}[1]{\left\lceil#1\right\rceil}
106 \providecommand{\fractional}[1]{\left\{#1\right\}}
107 \providecommand{\Iverson}[1]{\left[#1\right]}
108 \DeclareMathOperator{\cone}{cone}
110 \def\sm#1{
111 \left[
112 \begin{matrix}
114 \end{matrix}
115 \right]
118 \def\VR{{\cal V}}
119 \def\sp#1#2{\langle\vec #1,\vec #2\rangle}
120 \def\sps#1#2{\langle #1, #2\rangle}
121 \def\T{{\scriptscriptstyle T}}
122 \def\f#1#2{f(#1; \vec #2)}
123 \def\ff#1#2{f(#1; #2)}
125 \def\indf#1{\left[#1\right]}
127 \def\LattE/{\ai[\tt]{LattE}}
128 \def\PolyLib/{\ai[\tt]{PolyLib}}
129 \def\Omegalib/{\ai[\tt]{Omega}}
130 \def\barvinok/{\ai[\tt]{barvinok}}
131 \def\psp/{piecewise step-poly\-no\-mi\-al}
132 \def\rgf/{rational generating function}
133 \def\vm#1{\underline{\vec #1}}
135 \newcommand{\R}{\ensuremath{{\mathcal R}}}
136 \newcommand{\reuse}[2]{\ensuremath{\textrm{\sf reuse}_{#1}^{#2}}}
137 \newcommand{\ADS}[2]{\ensuremath{\textrm{\sf ADS}_{#1}^{#2}}}
138 \newcommand{\BRD}[2]{\ensuremath{\textrm{\sf BRD}_{#1}^{#2}}}
139 \let\from\leftarrow
141 \def\vec#1{\mathchoice{\mbox{\boldmath$\displaystyle\bf#1$}}
142 {\mbox{\boldmath$\textstyle\bf#1$}}
143 {\mbox{\boldmath$\scriptstyle\bf#1$}}
144 {\mbox{\boldmath$\scriptscriptstyle\bf#1$}}}
146 \def\DP{\mbox{\sl DP\/}}
147 \def\DD{\mbox{\sl DD\/}}
148 \def\DF{\mbox{\sl DF\/}}
150 \def\Rd{R_{\rm d}}
151 \def\rd{r_{\rm d}}
153 \@ifpackageloaded{hyperref}{%
154 \def\eqdeclaration#1{, see Equation\nobreakspace(#1)}%
155 \def\pagedeclaration#1{, page\nobreakspace\hyperpage{#1}}%
156 \def\addcontentsline#1#2#3{% toc extension, type, tag
157 \begingroup
158 \let\label\@gobble
159 \let\textlatin\@firstofone
160 \ifx\@currentHref\@empty
161 \Hy@Warning{%
162 No destination for bookmark of \string\addcontentsline,%
163 \MessageBreak destination is added%
165 \phantomsection
167 \expandafter\ifx\csname toclevel@#2\endcsname\relax
168 \begingroup
169 \def\Hy@tempa{#1}%
170 \ifx\Hy@tempa\Hy@bookmarkstype
171 \Hy@WarningNoLine{bookmark level for unknown #2 defaults to 0}%
172 \else
173 \Hy@Info{bookmark level for unknown #2 defaults to 0}%
175 \endgroup
176 \expandafter\gdef\csname toclevel@#2\endcsname{0}%
178 \edef\Hy@toclevel{\csname toclevel@#2\endcsname}%
179 \Hy@writebookmark{\csname the#2\endcsname}%
180 {#3}%
181 {\@currentHref}%
182 {\Hy@toclevel}%
183 {#1}%
184 \ifHy@verbose
185 \typeout{pdftex: bookmark at \the\inputlineno:
186 {\csname the#2\endcsname}
187 {#3}
188 {\@currentHref}%
189 {\Hy@toclevel}%
190 {#1}%
193 \addtocontents{#1}{%
194 \protect\contentsline{#2}{#3}{\protect\hyperpage{\thepage}}{\@currentHref}%
196 \endgroup