diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-xetex.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-xetex.tex | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-xetex.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-xetex.tex new file mode 100644 index 00000000000..2ca31d13542 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-onthefly-xetex.tex @@ -0,0 +1,55 @@ +% arara: xelatex +% arara: makeglossaries +% arara: xelatex +\documentclass{article} + +\usepackage{fontspec} +\usepackage[xindy]{glossaries-extra} + +\makeglossaries + +\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 XeTeX makes life a bit easier for non-ASCII +characters. + +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} |