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-accsupp.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-accsupp.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/glossaries-extra/sample-accsupp.tex | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-accsupp.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-accsupp.tex new file mode 100644 index 00000000000..5ff870ab85f --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-accsupp.tex @@ -0,0 +1,105 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage[T1]{fontenc} +\usepackage{cmap} + +\usepackage[accsupp,% use glossaries-accsupp + %nonumberlist,% suppress location list in glossary + nopostdot=false% insert dot after description in glossary +]{glossaries-extra} + +\makeglossaries + +% Change the format of the location lists: +\renewcommand{\GlsXtrFormatLocationList}[1]{Page list: #1.} + +% Default uses "ActualText" instead of "E". Redefine if required. +% Support in PDF viewers is variable. +%\renewcommand*{\glsaccsupp}[2]{% +% \BeginAccSupp{E=#1}#2\EndAccSupp{}% +%} + +\newabbreviation + [% add accessibility information: + %shortaccess={specific learning difference},% short access + %access={specific learning difference},% name access + textaccess={specific learning difference},% text access + ] + {spld}{SpLD}{specific learning difference} + +% \ensuremath is required in the following as the +% accessibility support clashes with math-mode. + +% The firstaccess key defaults to the access key if omitted. +% This means that on first use if firstaccess hasn't been +% set but access has been set it will use the access text +% that's used for the name field in the glossary (not the +% value of the textaccess field). If this is inappropriate +% you need to explicitly add the firstaccess key. + +\newglossaryentry{R}{name={\ensuremath{\Re}}, + access={set of real numbers symbol},% name access + textaccess={set of real numbers},% text access + %firstaccess={set of real numbers},% first access + description={set of real numbers}} + +\newglossaryentry{in}{name={\ensuremath{\in}}, + access={is element of set symbol},% name access + textaccess={in},% text access + %firstaccess={in},% first access + description={is an element of}} + +\begin{document} +This is a sample document testing the accsupp option. +If your PDF viewer doesn't provide a text-to-speech facility +try copying the text on this page and pasting to a text file +to see the difference. + +\section{An Abbreviation} + +First use: \gls{spld}. +Next use: \gls{spld}. + +Access text: \glsentrytextaccess{spld}. + +Access short: \glsentryshortaccess{spld}. + +If the access field isn't set in the above, no replacement text +is used in the corresponding \verb|\glstext|, \verb|\glsaccesstext| etc commands. + +Text field: \glstext{spld} (\glsaccesstext{spld}). +Short field: \glsxtrshort{spld} (\glsaccessshort{spld}). + +\section{A Symbol} + +First use: \gls{R}. Next use: \gls{R}. +Text field: \glstext{R}. Name field: \glsname{R}. + +First use: \gls{in}. Next use: \gls{in}. +Text field: \glstext{in}. Name field: \glsname{in}. + +Now test in math-mode: +\[ +x \gls{in} \gls{R} +\] + +The ``firstaccess'' field is used on first use. If this hasn't +been set the ``access'' field is used instead. The ``textaccess'' +field is used on subsequent use. If this hasn't been set the +``access'' field is used instead. The ``access'' field is used +for the entry name in the glossary list. + +Access field: \glsentryaccess{R}. +First Access field: \glsentryfirstaccess{R}. +Text Access field: \glsentrytextaccess{R}. + +Access field: \glsentryaccess{in}. +First Access field: \glsentryfirstaccess{in}. +Text Access field: \glsentrytextaccess{in}. + +\printglossaries + +\end{document} |