diff options
author | Karl Berry <karl@freefriends.org> | 2011-04-04 23:19:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-04-04 23:19:17 +0000 |
commit | d49526563e8a66d6774a086ad2a91fbf249b35b3 (patch) | |
tree | aecb9254e4f4db280b2f7ab8a9dc9f154fa08dd7 /Master/texmf-dist/doc/latex/glossaries/samples/samplexdy2.tex | |
parent | aeb22f958bf3b465bb5e3f085176c7fe0f2ef562 (diff) |
glossaries 3.0 (4apr11)
git-svn-id: svn://tug.org/texlive/trunk@21968 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/glossaries/samples/samplexdy2.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/glossaries/samples/samplexdy2.tex | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy2.tex b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy2.tex new file mode 100644 index 00000000000..d6d12d8087d --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy2.tex @@ -0,0 +1,66 @@ + % This file is public domain + % + % This is a sample document illustrating how to use the + % glossaries package with xindy. To create the document: + % + % pdflatex samplexdy2 + % makeglossaries samplexdy2 + % pdflatex samplexdy2 + % + % This sample file won't work with makeindex + % +\documentclass{report} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage[xindy,counter=section]{glossaries} + + % Set up somewhat eccentric section numbering system: + +\renewcommand*{\thesection}{[\thechapter]\arabic{section}} + +\renewcommand*{\theHsection}{\thepart.\thesection} +\renewcommand*{\thepart}{\Roman{part}} + +\GlsAddXdyLocation["roman-numbers-uppercase"]{section}{:sep "[" + "arabic-numbers" :sep "]" "arabic-numbers" +} + + % If part is 0, then \thepart will be empty, so add an extra + % case to catch this: + +\GlsAddXdyLocation{zero.section}{:sep "[" + "arabic-numbers" :sep "]" "arabic-numbers" +} + + % (Note that the above will stop xindy giving a warning, but the + % location hyper links will be invalid if no \part is used.) + +\makeglossaries + +\newglossaryentry{sample}{name=sample,description={an example}} +\newglossaryentry{sample2}{name=sample2,description={another example}} + +\begin{document} +This is a sample document illustrating Xindy specific commands in +the glossaries package. + +\part{First Part} + +\chapter{Sample Chapter} + +\section{First Section} + +\gls{sample}. \gls{sample2}. + +\section{Second Section} + +\gls{sample2}. + +\section{Third Section} + +\gls{sample}. \gls{sample2}. + +\printglossaries +\end{document} |