Debian Codegraph @

texmf-dist/doc/latex/glossaries/samples/sampleEqPg.tex

raw
1 % This file is public domain
2 %
3 % To ensure that the page numbers are up-to-date:
4 %
5 % latex sampleEqPg
6 % makeglossaries sampleEqPg
7 % latex sampleEqPg
8 % makeglossaries sampleEqPg
9 % latex sampleEqPg
10 %
11 % The extra makeglossaries run is required because adding the
12 % glossary in the second LaTeX run shifts the page numbers on
13 % which means that the glossary needs to be updated again.
14 % (Note that this problem is avoided if the page numbering is
15 % reset after the glossary. For example, if the glossary has
16 % roman numbering and the subsequent pages have arabic numbering)
17 %
18 % If you want to use arara, you need the following directives:
19 % arara: pdflatex: { synctex: on }
20 % arara: makeglossaries
21 % arara: pdflatex: { synctex: on }
22 % arara: makeglossaries
23 % arara: pdflatex: { synctex: on }
24 %
25 %http://mirrors.ctan.org/macros/latex/contrib/glossaries/glossaries-user.html#sampleEgPg
26 \documentclass[a4paper,12pt]{report}
27
28 \usepackage{amsmath}
29 \usepackage[colorlinks]{hyperref}
30 \usepackage[style=long3colheader,toc,
31 counter=equation]{glossaries}
32
33 \newcommand{\erf}{\operatorname{erf}}
34 \newcommand{\erfc}{\operatorname{erfc}}
35
36 % redefine the way hyperref creates the target for equations
37 % so that the glossary links to equation numbers work
38
39 \renewcommand*\theHequation{\thechapter.\arabic{equation}}
40
41 \renewcommand{\glossaryname}{Index of Special Functions and Notations}
42
43 \renewcommand{\glossarypreamble}{Numbers in italic indicate the equation number,
44 numbers in bold indicate page numbers where the main definition occurs.\par}
45
46 % set the glossary number style to italic
47 % hyperit is used instead of textit because
48 % the hyperref package is being used.
49 \renewcommand{\glsnumberformat}[1]{\hyperit{#1}}
50
51 % 1st column heading
52 \renewcommand{\entryname}{Notation}
53
54 % 2nd column heading
55 \renewcommand{\descriptionname}{Function Name}
56
57 % 3rd column heading
58 \renewcommand{\pagelistname}{}
59
60 % Redefine header row so that it
61 % adds a blank row after the title row
62 \renewcommand{\glossaryheader}{\bfseries\entryname &
63 \bfseries\descriptionname&\bfseries\pagelistname\\
64 & & \\\endhead}
65
66 % Define glossary entries
67
68 \newglossaryentry{Gamma}{name=\ensuremath{\Gamma(z)},
69 description=Gamma function,sort=Gamma}
70
71 \newglossaryentry{gamma}{name=\ensuremath{\gamma(\alpha,x)},
72 description=Lower incomplete gamma function,sort=gamma1}
73
74 \newglossaryentry{iGamma}{name=\ensuremath{\Gamma(\alpha,x)},
75 description=Upper incomplete gamma function,sort=Gamma2}
76
77 \newglossaryentry{psi}{name=\ensuremath{\psi(x)},
78 description=Psi function,sort=psi}
79
80 \newglossaryentry{erf}{name=\ensuremath{\erf(x)},
81 description=Error function,sort=erf}
82
83 \newglossaryentry{erfc}{name=\ensuremath{\erfc(x)},
84 description=Complementary error function,sort=erfc}
85
86 \newglossaryentry{B}{name=\ensuremath{B(x,y)},
87 description=Beta function,sort=B}
88
89 \newglossaryentry{Bx}{name=\ensuremath{B_x(p,q)},
90 description=Incomplete beta function,sort=Bx}
91
92 \newglossaryentry{Tn}{name=\ensuremath{T_n(x)},
93 description=Chebyshev's polynomials of the first kind,
94 sort=Tn}
95
96 \newglossaryentry{Un}{name=\ensuremath{U_n(x)},
97 description=Chebyshev's polynomials of the second kind,
98 sort=Un}
99
100 \newglossaryentry{Hn}{name=\ensuremath{H_n(x)},
101 description=Hermite polynomials,sort=Hn}
102
103 \newglossaryentry{Ln}{name=\ensuremath{L_n^\alpha(x)},
104 description=Laguerre polynomials,sort=Lna}
105
106 \newglossaryentry{Znu}{name=\ensuremath{Z_\nu(z)},
107 description=Bessel functions,sort=Z}
108
109 \newglossaryentry{Phi}{name=\ensuremath{\Phi(\alpha,\gamma;z)},
110 description=confluent hypergeometric function,sort=Pagz}
111
112 \newglossaryentry{knu}{name=\ensuremath{k_\nu(x)},
113 description=Bateman's function,sort=kv}
114
115 \newglossaryentry{Dp}{name=\ensuremath{D_p(z)},
116 description=Parabolic cylinder functions,sort=Dp}
117
118 \newglossaryentry{F}{name=\ensuremath{F(\phi,k)},
119 description=Elliptical integral of the first kind,sort=Fpk}
120
121 \newglossaryentry{C}{name=\ensuremath{C},
122 description=Euler's constant,sort=C}
123
124 \newglossaryentry{G}{name=\ensuremath{G},
125 description=Catalan's constant,sort=G}
126
127 \makeglossaries
128
129 \pagestyle{headings}
130
131 \begin{document}
132
133 \title{Sample Document Using Interchangable Numbering}
134 \author{Nicola Talbot}
135 \maketitle
136
137 \begin{abstract}
138 This is a sample document illustrating the use of the \textsf{glossaries}
139 package. The functions here have been taken from ``Tables of
140 Integrals, Series, and Products'' by I.S.~Gradshteyn and I.M~Ryzhik.
141
142 The glossary lists both page numbers and equation numbers.
143 Since the majority of the entries use the equation number,
144 \texttt{counter=equation} was used as a package option.
145 Note that this example will only work where the
146 page number and equation number compositor is the same. So
147 it won't work if, say, the page numbers are of the form
148 2-4 and the equation numbers are of the form 4.6.
149 As most of the glossary entries should have an italic
150 format, it is easiest to set the default format to
151 italic.
152
153 \end{abstract}
154
155 \tableofcontents
156
157 \printglossary[toctitle={Special Functions}]
158
159 \chapter{Gamma Functions}
160
161 The \glslink[format=hyperbf,counter=page]{Gamma}{gamma function} is
162 defined as
163 \begin{equation}
164 \gls{Gamma} = \int_{0}^{\infty}e^{-t}t^{z-1}\,dt
165 \end{equation}
166
167 \begin{equation}
168 \glslink{Gamma}{\Gamma(x+1)} = x\Gamma(x)
169 \end{equation}
170
171 \begin{equation}
172 \gls{gamma} = \int_0^x e^{-t}t^{\alpha-1}\,dt
173 \end{equation}
174
175 \begin{equation}
176 \gls{iGamma} = \int_x^\infty e^{-t}t^{\alpha-1}\,dt
177 \end{equation}
178
179 \newpage
180
181 \begin{equation}
182 \glslink{Gamma}{\Gamma(\alpha)} =
183 \Gamma(\alpha, x) + \gamma(\alpha, x)
184 \end{equation}
185
186 \begin{equation}
187 \gls{psi} = \frac{d}{dx}\ln\Gamma(x)
188 \end{equation}
189
190 \chapter{Error Functions}
191
192 The \glslink[format=hyperbf,counter=page]{erf}{error function} is defined as:
193 \begin{equation}
194 \gls{erf} = \frac{2}{\surd\pi}\int_0^x e^{-t^2}\,dt
195 \end{equation}
196
197 \begin{equation}
198 \gls{erfc} = 1 - \erf(x)
199 \end{equation}
200
201 \chapter{Beta Function}
202
203 \begin{equation}
204 \gls{B} = 2\int_0^1 t^{x-1}(1-t^2)^{y-1}\,dt
205 \end{equation}
206 Alternatively:
207 \begin{equation}
208 \gls{B} = 2\int_0^{\frac\pi2}\sin^{2x-1}\phi\cos^{2y-1}\phi\,d\phi
209 \end{equation}
210
211 \begin{equation}
212 \gls{B} = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)} = B(y,x)
213 \end{equation}
214
215 \begin{equation}
216 \gls{Bx} = \int_0^x t^{p-1}(1-t)^{q-1}\,dt
217 \end{equation}
218
219 \chapter{Chebyshev's polynomials}
220
221 \begin{equation}
222 \gls{Tn} = \cos(n\arccos x)
223 \end{equation}
224
225 \begin{equation}
226 \gls{Un} = \frac{\sin[(n+1)\arccos x]}{\sin[\arccos x]}
227 \end{equation}
228
229 \chapter{Hermite polynomials}
230
231 \begin{equation}
232 \gls{Hn} = (-1)^n e^{x^2} \frac{d^n}{dx^n}(e^{-x^2})
233 \end{equation}
234
235 \chapter{Laguerre polynomials}
236
237 \begin{equation}
238 \gls{Ln} = \frac{1}{n!}e^x x^{-\alpha}
239 \frac{d^n}{dx^n}(e^{-x}x^{n+\alpha})
240 \end{equation}
241
242 \chapter{Bessel Functions}
243
244 Bessel functions $Z_\nu(z)$ are solutions of
245 \begin{equation}
246 \frac{d^2\glslink{Znu}{Z_\nu}}{dz^2} + \frac{1}{z}\,\frac{dZ_\nu}{dz} +
247 \left(
248 1-\frac{\nu^2}{z^2}Z_\nu = 0
249 \right)
250 \end{equation}
251
252 \chapter{Confluent hypergeometric function}
253
254 \begin{equation}
255 \gls{Phi} = 1 + \frac{\alpha}{\gamma}\,\frac{z}{1!}
256 + \frac{\alpha(\alpha+1)}{\gamma(\gamma+1)}\,\frac{z^2}{2!}
257 +\frac{\alpha(\alpha+1)(\alpha+2)}
258 {\gamma(\gamma+1)(\gamma+2)}
259 \,\frac{z^3}{3!}
260 + \cdots
261 \end{equation}
262
263 \begin{equation}
264 \gls{knu} = \frac{2}{\pi}\int_0^{\pi/2}
265 \cos(x \tan\theta - \nu\theta)\,d\theta
266 \end{equation}
267
268 \chapter{Parabolic cylinder functions}
269
270 \begin{equation}
271 \gls{Dp} = 2^{\frac{p}{2}}e^{-\frac{z^2}{4}}
272 \left\{
273 \frac{\surd\pi}{\Gamma\left(\frac{1-p}{2}\right)}
274 \Phi\left(-\frac{p}{2},\frac{1}{2};\frac{z^2}{2}\right)
275 -\frac{\sqrt{2\pi}z}{\Gamma\left(-\frac{p}{2}\right)}
276 \Phi\left(\frac{1-p}{2},\frac{3}{2};\frac{z^2}{2}\right)
277 \right\}
278 \end{equation}
279
280 \chapter{Elliptical Integral of the First Kind}
281
282 \begin{equation}
283 \gls{F} = \int_0^\phi
284 \frac{d\alpha}{\sqrt{1-k^2\sin^2\alpha}}
285 \end{equation}
286
287 \chapter{Constants}
288
289 \begin{equation}
290 \gls{C} = 0.577\,215\,664\,901\ldots
291 \end{equation}
292
293 \begin{equation}
294 \gls{G} = 0.915\,965\,594\ldots
295 \end{equation}
296
297 \end{document}