diff options
Diffstat (limited to 'macros/latex/contrib/glossaries/samples/sampleaccsupp.tex')
-rw-r--r-- | macros/latex/contrib/glossaries/samples/sampleaccsupp.tex | 84 |
1 files changed, 63 insertions, 21 deletions
diff --git a/macros/latex/contrib/glossaries/samples/sampleaccsupp.tex b/macros/latex/contrib/glossaries/samples/sampleaccsupp.tex index ad1eb7bef1..26708ca37c 100644 --- a/macros/latex/contrib/glossaries/samples/sampleaccsupp.tex +++ b/macros/latex/contrib/glossaries/samples/sampleaccsupp.tex @@ -3,42 +3,84 @@ % arara: pdflatex: { synctex: on } % arara: makeglossaries % arara: pdflatex: { synctex: on } +% +%http://mirrors.ctan.org/macros/latex/contrib/glossaries/glossaries-user.html#sampleaccsupp +% +% Note that this document isn't fully accessible as it's not tagged. +% See the accessibility or tagpdf packages for examples of how to tag the document. \documentclass[a4paper]{article} -\usepackage[margin=0.5in]{geometry} -\usepackage{booktabs} +\usepackage[includemp,marginpar=1.5in,textwidth=5in]{geometry} +\usepackage{graphicx} +% use debug=showaccsupp to show replacement text in the margin \usepackage[acronym]{glossaries-accsupp} \makeglossaries -\newglossaryentry{dr}{name=Dr,description={Doctor},access={Doctor}} +\setacronymstyle{long-short} -\newacronym[shortaccess=S V M]{svm}{svm}{support vector machine} +% These will use 'ActualText' rather than 'E' because the +% abbreviation is in the 'name' field. +\newglossaryentry{Doctor}{name=Dr,description={Doctor},access={Doctor}} +\newglossaryentry{Drive}{name={Dr.},description={Drive},access={Drive}, + plural={Drvs}} + +% These will use 'E' \newacronym{eg}{e.g.}{for example} -\newcommand*{\samplerow}[1]{% - \gls{#1} & \gls{#1} & \acrshort{#1} & \acrlong{#1}\\ - \glsreset{#1}\Gls{#1} & \Gls{#1} & \Acrshort{#1} & \Acrlong{#1}\\ - \glsreset{#1}\GLS{#1} & \GLS{#1} & \ACRshort{#1} & \ACRlong{#1}\\ +\newacronym[shortaccess={TiKZ ist kein Zeichenprogramm}] +{tikz}{Ti\emph{k}Z}{Ti\emph{k}Z ist \emph{kein} Zeichenprogramm} + + +% The symbol key needs to use 'ActualText' but the replacement text +% needs to be supplied as the hexadecimal character code. + +\newcommand{\glssymbolaccsupp}[2]{% + \glsaccessibility[method=hex,unicode]{ActualText}{#1}{#2}% +} + +\newglossaryentry{int}{name={int},description={integral}, + symbol={\ensuremath{\int}},symbolaccess={222B} +} + +% The user1 key needs to use 'Alt': +\newcommand{\glsuseriaccsupp}[2]{% + \glsaccessibility{Alt}{#1}{#2}% +} + +\newglossaryentry{sampleimage}{name={sample image}, + description={an example image}, +% \protect is needed unless \glsnoexpandfields has been used + user1={\protect\includegraphics[height=20pt]{example-image}}, + user1access={a boilerplate image used in examples} } \begin{document} -\begin{center} -\begin{tabular}{lllll} -\toprule -\bfseries First & \bfseries Next & \bfseries Short & \bfseries Long -\\\midrule -\samplerow{dr} -\midrule -\samplerow{eg} -\midrule -\samplerow{svm} -\bottomrule -\end{tabular} -\end{center} +\section{General Terms} + +Testing general terms that are really abbreviations. + +\gls{Doctor} Smith lives at 2, Blueberry \gls{Drive} + +\section{Symbols and Images} + +Symbol: \glssymbol{int} (\gls{int}). + +Image: \glsuseri{sampleimage} (\gls{sampleimage}). + +\section{Abbreviations} + +First use: \gls{eg}, \gls{tikz}. + +Next use: \gls{eg}, \gls{tikz}. + +Short: \acrshort{eg}, \acrshort{tikz}. + +Long: \acrlong{eg}, \acrlong{tikz}. +Full: \acrfull{eg}, \acrfull{tikz}. \printglossaries \end{document} |