diff options
author | Karl Berry <karl@freefriends.org> | 2016-01-26 22:52:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-01-26 22:52:39 +0000 |
commit | 8d88e6714a570bf2b598132718ae2beb4641c80b (patch) | |
tree | 6d627fdd2263e73984a523aeaacd6b0aca1c358e /Master/texmf-dist/doc/latex/glossaries-extra/sample-initialisms.tex | |
parent | 9b9abe02f86c766295512f6699dac2b40de6968c (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-initialisms.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/glossaries-extra/sample-initialisms.tex | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-initialisms.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-initialisms.tex new file mode 100644 index 00000000000..612083ed554 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-initialisms.tex @@ -0,0 +1,58 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries-extra} + +\makeglossaries + +% set up the styles: +\setabbreviationstyle{long-short-sc} + +\setabbreviationstyle[initialism]{short-long} +\glssetcategoryattribute{initialism}{insertdots}{true} +\glssetcategoryattribute{initialism}{discardperiod}{true} + +% define the entries: + +\newabbreviation{html}{html}{hypertext markup language} + +\newabbreviation[category=initialism]{eg}{eg}{for example} +\newabbreviation[category=initialism]{si}{SI}{sample initials} + +\begin{document} +Abbreviations with dots \gls{eg} and \gls{si} and abbreviation +without dots \gls{html} and the end of the sentence. + +(Next use.) Abbreviations with dots \gls{eg} and \gls{si} and abbreviation +without dots \gls{html} and the end of the sentence. + +Plural: \glspl{si} and at the end of a sentence \glspl{si}. + +Test the space factors. (More visible if we switch to a monospaced +font.) + +\begin{ttfamily} +Initialisms in the middle \gls{eg} and \gls{si} of a sentence. + +Initialism at the end of a sentence \gls{eg}. +Initialism at the end of a sentence \gls{si}. +Another sentence. +\end{ttfamily} + +Compare with explicitly writing the text without \verb|\gls| +and judicious use of \verb*|\ | and \verb|\@|: + +\begin{ttfamily} +Initialisms in the middle e.g.\ and S.I. of a sentence. + +Initialism at the end of a sentence e.g. +Initialism at the end of a sentence S.I\@. +Another sentence. +\end{ttfamily} + +\printglossaries + +\end{document} |