| 1 |
% This file is public domain |
| 2 |
% If you want to use arara, you need the following directives: |
| 3 |
% arara: pdflatex: { synctex: on } |
| 4 |
% arara: makeglossaries |
| 5 |
% arara: pdflatex: { synctex: on } |
| 6 |
% arara: pdflatex: { synctex: on } |
| 7 |
% |
| 8 |
% Note that you will get a different result if you use |
| 9 |
% makeglossaries-lite or explicitly use makeindex for this example. See |
| 10 |
%http://mirrors.ctan.org/macros/latex/contrib/glossaries/glossaries-user.html#sampleSec |
| 11 |
\documentclass{report} |
| 12 |
|
| 13 |
\usepackage[plainpages=false,colorlinks]{hyperref} |
| 14 |
\usepackage[style=altlist,toc,counter=section]{glossaries} |
| 15 |
|
| 16 |
\makeglossaries |
| 17 |
|
| 18 |
\newglossaryentry{ident}{name=identity matrix, |
| 19 |
description=diagonal matrix with 1s along the leading diagonal, |
| 20 |
plural=identity matrices} |
| 21 |
|
| 22 |
\newglossaryentry{diag}{name=diagonal matrix, |
| 23 |
description=matrix whose only non-zero entries are along |
| 24 |
the leading diagonal, |
| 25 |
plural=diagonal matrices} |
| 26 |
|
| 27 |
\newglossaryentry{sing}{name=singular matrix, |
| 28 |
description=matrix with zero determinant, |
| 29 |
plural=singular matrices} |
| 30 |
|
| 31 |
\begin{document} |
| 32 |
|
| 33 |
\pagenumbering{roman} |
| 34 |
\tableofcontents |
| 35 |
|
| 36 |
\printglossaries |
| 37 |
|
| 38 |
\chapter{Introduction} |
| 39 |
\pagenumbering{arabic} |
| 40 |
This is a sample document illustrating the use of the |
| 41 |
\textsf{glossaries} package. |
| 42 |
|
| 43 |
\chapter{Diagonal matrices} |
| 44 |
|
| 45 |
A \gls[format=hyperit]{diag} is a matrix where all elements not on the |
| 46 |
leading diagonal are zero. This is the |
| 47 |
primary definition, so an italic font is used for the page number. |
| 48 |
|
| 49 |
\newpage |
| 50 |
\section{Identity matrix} |
| 51 |
The \gls[format=hyperit]{ident} is a \gls{diag} whose leading |
| 52 |
diagonal elements are all equal to 1. |
| 53 |
|
| 54 |
Here is another entry for a \gls{diag}. And this is the |
| 55 |
plural: \glspl{ident}. |
| 56 |
|
| 57 |
This adds an entry into the glossary with a bold number, but |
| 58 |
it doesn't create a hyperlink: \gls*[format=hyperbf]{ident}. |
| 59 |
|
| 60 |
\chapter{Singular Matrices} |
| 61 |
|
| 62 |
A \gls{sing} is a matrix with zero determinant. |
| 63 |
\Glspl{sing} are non-invertible. Possessive: |
| 64 |
a \gls{sing}['s] dimensions are not necessarily equal. |
| 65 |
|
| 66 |
Another \gls{ident} entry. |
| 67 |
|
| 68 |
\end{document} |