summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-utf8.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-01-26 22:52:39 +0000
committerKarl Berry <karl@freefriends.org>2016-01-26 22:52:39 +0000
commit8d88e6714a570bf2b598132718ae2beb4641c80b (patch)
tree6d627fdd2263e73984a523aeaacd6b0aca1c358e /Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-utf8.tex
parent9b9abe02f86c766295512f6699dac2b40de6968c (diff)
glossaries-extra (24jan15)
git-svn-id: svn://tug.org/texlive/trunk@39487 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-utf8.tex')
-rw-r--r--Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-utf8.tex60
1 files changed, 60 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-utf8.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-utf8.tex
new file mode 100644
index 00000000000..51b91b2530e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-utf8.tex
@@ -0,0 +1,60 @@
+% arara: pdflatex
+% arara: makeglossaries
+% arara: pdflatex
+\documentclass{article}
+
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage[xindy]{glossaries-extra}
+
+\makeglossaries
+
+% The starred version will attempt to allow UTF8 characters
+% in the label, but this may fail!
+\GlsXtrEnableOnTheFly*
+
+\begin{document}
+This is a \glsxtr{sample} document illustrating on-the-fly
+simultaneous \glsxtr{definition} and \glsxtr{usage}
+for \glsxtr[format=textbf][plural=glossaries]{glossary}
+\glsxtrpl[][plural=entries]{entry}. This has
+drawbacks and it's really much better to define entries in the
+\glsxtr{preamble}, but you may find it useful for simple
+indexing.
+
+\newpage
+
+\Glsxtr{preamble} \glsxtrpl{definition} are much better,
+but here is a \glsxtr{sample} of what you can do.
+
+\newpage
+The \glsxtrpl{glossary} must come at the end of the document
+with this usage.
+
+\newpage
+Commands can't occur in the label. The ``name'' key has to be
+used instead, but the starred version of
+\verb|\GlsXtrEnableOnTheFly| attempts to allow non-ASCII
+characters in the label, but this may break some commands,
+so take care!
+
+The \glsxtr{naïve}
+\glsxtr[][plural={phœnixes}]{phœnix} sent
+off its \glsxtr{résumé} covered in
+\glsxtr{pâté} from the \glsxtr{soirée}.
+
+Terms that contain commands must have the ``name'' set and the
+command removed from the label
+\glsxtr[][name={\emph{e.g.}}]{eg} like this, but
+really it's much better to define the entry in the preamble
+and use the standard \verb|\gls| instead.
+
+\newpage
+The previous page presupposes the existence of
+\glsxtrpl{phœnix}.
+
+\newpage
+
+\printglossaries
+
+\end{document}