%\iffalse % glossaries.dtx generated using makedtx version 0.94b (c) Nicola Talbot % Command line args: % -macrocode "glossaries\.perl" % -macrocode ".*\.tex" % -macrocode ".*\.xdy" % -setambles "glossaries\.perl=>\nopreamble\nopostamble" % -setambles ".*\.tex=>\nopreamble\nopostamble" % -setambles ".*\.xdy=>\nopreamble\nopostamble" % -comment "glossaries\.perl" % -comment ".*\.tex" % -comment ".*\.xdy" % -src "glossaries.sty\Z=>glossaries.sty" % -src "mfirstuc.sty\Z=>mfirstuc.sty" % -src "(glossary-.+)\.(sty)\Z=>\1.\2" % -src "(glossaries-compatible-207)\.(sty)\Z=>\1.\2" % -src "(glossaries-accsupp)\.(sty)\Z=>\1.\2" % -src "(glossaries-babel)\.(sty)\Z=>\1.\2" % -src "(glossaries-polyglossia)\.(sty)\Z=>\1.\2" % -src "(glossaries-dictionary-.+)\.(dict)\Z=>\1.\2" % -src "(minimalgls\.tex)\Z=>\1" % -src "(sample.*\.tex)\Z=>\1" % -src "(samplexdy-mc.*\.xdy)\Z=>\1" % -src "(database.*\.tex)\Z=>\1" % -src "(glossaries\.perl)\Z=>\1" % -doc "glossaries-manual.tex" % -author "Nicola Talbot" % -codetitle "Main Package Code" % glossaries % Created on 2011/4/13 19:39 %\fi %\iffalse %<*package> %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z %% Digits \0\1\2\3\4\5\6\7\8\9 %% Exclamation \! Double quote \" Hash (number) \# %% Dollar \$ Percent \% Ampersand \& %% Acute accent \' Left paren \( Right paren \) %% Asterisk \* Plus \+ Comma \, %% Minus \- Point \. Solidus \/ %% Colon \: Semicolon \; Less than \< %% Equals \= Greater than \> Question mark \? %% Commercial at \@ Left bracket \[ Backslash \\ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} % %\fi % \iffalse % Doc-Source file to use with LaTeX2e % Copyright (C) 2011 Nicola Talbot, all rights reserved. % \fi % \iffalse %<*driver> \documentclass{nlctdoc} \iffalse glossaries-manual.tex is a stub file used by makedtx to create glossaries.dtx \fi \usepackage{alltt} \usepackage{pifont} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[colorlinks, bookmarks, hyperindex=false, pdfauthor={Nicola L.C. Talbot}, pdftitle={glossaries.sty: LaTeX2e Package to Assist Generating Glossaries}, pdfkeywords={LaTeX,package,glossary,acronyms}]{hyperref} \doxitem{Option}{option}{package options} \doxitem{GlsKey}{key}{glossary keys} \doxitem{Style}{style}{glossary styles} \doxitem{Counter}{counter}{glossary counters} \setcounter{IndexColumns}{2} \CheckSum{13130} \newcommand*{\ifirstuse}{\iterm{first use}} \newcommand*{\firstuse}{first use\ifirstuse} \newcommand*{\firstuseflag}{first use flag\ifirstuseflag} \newcommand*{\firstusetext}{first use text\ifirstusetext} \newcommand*{\ifirstuseflag}{\iterm{first use>flag}} \newcommand*{\ifirstusetext}{\iterm{first use>text}} \newcommand*{\istkey}[1]{\appfmt{#1}\index{makeindex=\appfmt{makeindex}>#1=\texttt{#1}|hyperpage}} \newcommand*{\locfmt}[1]{\texttt{#1}\SpecialMainIndex{#1}} \newcommand*{\mkidxspch}{\index{makeindex=\appfmt{makeindex}>special characters|hyperpage}} \newcommand*{\igloskey}[2][newglossaryentry]{\icsopt{#1}{#2}} \newcommand*{\gloskey}[2][newglossaryentry]{\csopt{#1}{#2}} \newcommand*{\glostyle}[1]{\textsf{#1}\index{glossary styles:>#1={\protect\ttfamily#1}|main}} \begin{document} \DocInput{glossaries.dtx} \end{document} % %\fi %\MakeShortVerb{"} %\DeleteShortVerb{\|} % % \title{Documented Code For glossaries v3.01} % \author{Nicola L.C. Talbot\\[10pt] %School of Computing Sciences\\ %University of East Anglia\\ %Norwich. Norfolk\\ %NR4 7TJ. United Kingdom.\\ %\url{http://theoval.cmp.uea.ac.uk/~nlct/}} % % \date{2011-04-12} % \maketitle % %This is the documented code for the \styfmt{glossaries} package. %This bundle comes with the following documentation: %\begin{description} %\item[\url{glossariesbegin.pdf}] %If you are a complete beginner, start with \qt{The glossaries %package: a guide for beginners}. % %\item[\url{glossary2glossaries.pdf}] %If you are moving over from the obsolete \sty{glossary} package, %read \qt{Upgrading from the glossary package to the %glossaries package}. % %\item[\url{glossaries-user.pdf}] %For the main user guide, read \qt{glossaries.sty v3.01: %\LaTeX2e\ Package to Assist Generating Glossaries}. % %\item[\url{mfirstuc-manual.pdf}] %The commands provided by the \sty{mfirstuc} package are briefly %described in \qt{mfirstuc.sty: uppercasing first letter}. % %\item[glossaries.pdf] %This document is for advanced users wishing to know more about the %inner workings of the \styfmt{glossaries} package. % %\item[INSTALL] Installation instructions. % %\item[CHANGES] Change log. % %\item[README] Package summary. % %\end{description} % %\clearpage %\tableofcontents % %\StopEventually{% % \clearpage\phantomsection % \addcontentsline{toc}{section}{Index}\PrintIndex % %} % % % %\section{Main Package Code} %\iffalse % \begin{macrocode} %<*glossaries.sty> % \end{macrocode} %\fi %\label{sec:code} % \subsection{Package Definition} % This package requires \LaTeXe. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{glossaries}[2011/04/12 v3.01 (NLCT)] % \end{macrocode} % Required packages: % \begin{macrocode} \RequirePackage{ifthen} \RequirePackage{xkeyval}[2006/11/18] \RequirePackage{mfirstuc} \RequirePackage{xfor} % \end{macrocode} %\changes{1.1}{2008 Feb 22}{amsgen now loaded (\cs{new@ifnextchar} needed)} % Need to use \cs{new@ifnextchar} instead of \cs{@ifnextchar} in % commands that have a final optional argument (such as \ics{gls}) % so require \isty{amsgen}. % Thanks to Morten~H\o gholm for suggesting this. (This has % replaced using the \sty{xspace} package.) % \begin{macrocode} \RequirePackage{amsgen} % \end{macrocode} %\changes{3.0}{2011/04/02}{etoolbox now loaded} % As from v3.0, now loading \sty{etoolbox}: % \begin{macrocode} \RequirePackage{etoolbox} % \end{macrocode} % % \subsection{Package Options}\label{sec:pkgopt} %\begin{option}{toc} % The \pkgopt{toc} package option will add the glossaries % to the table of contents. This is a boolean key, if the % value is omitted it is taken to be true. % \begin{macrocode} \define@boolkey{glossaries.sty}[gls]{toc}[true]{} % \end{macrocode} %\end{option} %\begin{option}{numberline} %\changes{1.1}{2008 Feb 22}{numberline option added} % The \pkgopt{numberline} package option adds \cs{numberline} to % \cs{addcontentsline}. Note that this option only has an effect % if used in with \pkgopt[true]{toc}. % \begin{macrocode} \define@boolkey{glossaries.sty}[gls]{numberline}[true]{} % \end{macrocode} %\end{option} % %\begin{macro}{\@@glossarysec} % The sectional unit used to start the glossary is stored in % \cs{@@glossarysec}. If chapters are defined, this % is initialised to \texttt{chapter}, otherwise it is % initialised to \texttt{section}. %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \ifcsundef{chapter}% {\newcommand*{\@@glossarysec}{section}}% {\newcommand*{\@@glossarysec}{chapter}} % \end{macrocode} %\end{macro} % %\begin{option}{section} % The \pkgopt{section} key can be used to set the sectional unit. % If no unit is specified, use \texttt{section} as the default. % The starred form of the named sectional unit will be used. % If you want some other way to start the glossary section (e.g.\ % a numbered section) you will have to redefined % \ics{glossarysection}. % \begin{macrocode} \define@choicekey{glossaries.sty}{section}{part,chapter,section,% subsection,subsubsection,paragraph,subparagraph}[section]{% \renewcommand*{\@@glossarysec}{#1}} % \end{macrocode} %\end{option} % % Determine whether or not to use numbered sections. %\begin{macro}{\@@glossarysecstar} % \begin{macrocode} \newcommand*{\@@glossarysecstar}{*} % \end{macrocode} %\end{macro} %\begin{macro}{\@@glossaryseclabel} % \begin{macrocode} \newcommand*{\@@glossaryseclabel}{} % \end{macrocode} %\end{macro} %\begin{macro}{\glsautoprefix} % Prefix to add before label if automatically generated: %\changes{1.14}{2008 June 17}{new} % \begin{macrocode} \newcommand*{\glsautoprefix}{} % \end{macrocode} %\end{macro} %\begin{option}{numberedsection} %\changes{1.1}{2008 Feb 22}{numberedsection package option added} % \begin{macrocode} \define@choicekey{glossaries.sty}{numberedsection}[\val\nr]{% false,nolabel,autolabel}[nolabel]{% \ifcase\nr\relax \renewcommand*{\@@glossarysecstar}{*}% \renewcommand*{\@@glossaryseclabel}{}% \or \renewcommand*{\@@glossarysecstar}{}% \renewcommand*{\@@glossaryseclabel}{}% \or \renewcommand*{\@@glossarysecstar}{}% \renewcommand*{\@@glossaryseclabel}{% \label{\glsautoprefix\@glo@type}}% \fi } % \end{macrocode} %\end{option} % % The default glossary style is stored in % \cs{@glossary@default@style}. This is initialised to % \texttt{list}. (The \glostyle{list} style is % defined in the accompanying \isty{glossary-list} package % described in \autoref{sec:code:styles}.) %\begin{macro}{\@glossary@default@style} % \begin{macrocode} \newcommand*{\@glossary@default@style}{list} % \end{macrocode} %\end{macro} % %\begin{option}{style} % The default glossary style can be changed using the \pkgopt{style} % package option. The value can be the name of any % defined glossary style. The glossary style is set at the beginning % of the document, so you can still use the \pkgopt{style} key to % set a style that is defined in another package. This package comes % with some predefined styles that are defined in % \autoref{sec:code:styles}. % \begin{macrocode} \define@key{glossaries.sty}{style}{% \renewcommand*{\@glossary@default@style}{#1}} % \end{macrocode} %\end{option} % % Each entry within a given glossary will have an associated % number list. By default, this refers to the page numbers on % which that entry has been used, but it can also refer to any counter % used in the document (such as the section or equation counters). % The default number list format displays the number list ``as is'': %\begin{macro}{\glossaryentrynumbers} % \begin{macrocode} \newcommand*{\glossaryentrynumbers}[1]{#1} % \end{macrocode} %\end{macro} %\begin{option}{nonumberlist} % Note that the entire number list for a given entry will be % passed to \cs{glossaryentrynumbers} so any font changes % will also be applied to the delimiters. % The \pkgopt{nonumberlist} package option suppresses the % number lists (this simply redefines % \cs{glossaryentrynumbers} to ignores its argument). % \begin{macrocode} \DeclareOptionX{nonumberlist}{% \renewcommand*{\glossaryentrynumbers}[1]{}} % \end{macrocode} %\end{option} % %\begin{macro}{\@glo@seeautonumberlist} % \begin{macrocode} \newcommand*\@glo@seeautonumberlist{} % \end{macrocode} %\end{macro} % %\begin{option}{seeautonumberlist} % Automatically activates number list for entries containing the % \gloskey{see} key. %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} \DeclareOptionX{seeautonumberlist}{% \renewcommand*{\@glo@seeautonumberlist}{% \def\@glo@prefix{\glsnextpages}% }% } % \end{macrocode} %\end{option} %\begin{macro}{\@gls@loadlong} %\changes{1.18}{2009 January 14}{new} % \begin{macrocode} \newcommand*{\@gls@loadlong}{\RequirePackage{glossary-long}} % \end{macrocode} %\end{macro} %\begin{option}{nolong} %\changes{1.18}{2009 January 14}{new} % This option prevents \isty{glossary-long} from being loaded. % This means that the glossary styles that use the % \env{longtable} environment will not be available. This option % is provided to reduce overhead caused by loading unrequired % packages. % \begin{macrocode} \DeclareOptionX{nolong}{\renewcommand*{\@gls@loadlong}{}} % \end{macrocode} %\end{option} % %\begin{macro}{\@gls@loadsuper} %\changes{1.18}{2009 January 14}{new} % The \isty{glossary-super} package isn't loaded if % \isty{supertabular} isn't installed. % \begin{macrocode} \IfFileExists{supertabular.sty}{% \newcommand*{\@gls@loadsuper}{\RequirePackage{glossary-super}}}{% \newcommand*{\@gls@loadsuper}{}} % \end{macrocode} %\end{macro} %\begin{option}{nosuper} %\changes{1.18}{2009 January 14}{new} % This option prevents \isty{glossary-super} from being loaded. % This means that the glossary styles that use the % \env{supertabular} environment will not be available. This option % is provided to reduce overhead caused by loading unrequired % packages. % \begin{macrocode} \DeclareOptionX{nosuper}{\renewcommand*{\@gls@loadsuper}{}} % \end{macrocode} %\end{option} % %\begin{macro}{\@gls@loadlist} %\changes{1.18}{2009 January 14}{new} % \begin{macrocode} \newcommand*{\@gls@loadlist}{\RequirePackage{glossary-list}} % \end{macrocode} %\end{macro} %\begin{option}{nolist} %\changes{1.18}{2009 January 14}{new} % This option prevents \isty{glossary-list} from being loaded % (to reduce overheads if required). Naturally, the styles defined % in \isty{glossary-list} will not be available if this option % is used. % \begin{macrocode} \DeclareOptionX{nolist}{\renewcommand*{\@gls@loadlist}{}} % \end{macrocode} %\end{option} % %\begin{macro}{\@gls@loadtree} %\changes{1.18}{2009 January 14}{new} % \begin{macrocode} \newcommand*{\@gls@loadtree}{\RequirePackage{glossary-tree}} % \end{macrocode} %\end{macro} %\begin{option}{notree} %\changes{1.18}{2009 January 14}{new} % This option prevents \isty{glossary-tree} from being loaded % (to reduce overheads if required). Naturally, the styles defined % in \isty{glossary-tree} will not be available if this option % is used. % \begin{macrocode} \DeclareOptionX{notree}{\renewcommand*{\@gls@loadtree}{}} % \end{macrocode} %\end{option} % %\begin{option}{nostyles} %\changes{1.18}{2009 January 14}{new} % Provide an option to suppress all the predefined styles (in the % event that the user has custom styles that are not dependent % on the predefined styles). % \begin{macrocode} \DeclareOptionX{nostyles}{% \renewcommand*{\@gls@loadlong}{}% \renewcommand*{\@gls@loadsuper}{}% \renewcommand*{\@gls@loadlist}{}% \renewcommand*{\@gls@loadtree}{}% \let\@glossary@default@style\relax } % \end{macrocode} %\end{option} % %\begin{option}{entrycounter} % Defines a counter that can be used in the standard glossary styles % to number each (main) entry. If true, this will define a counter called % \ctr{glossaryentry}. %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} \define@boolkey{glossaries.sty}[gls]{entrycounter}[true]{} \glsentrycounterfalse % \end{macrocode} %\end{option} % %\begin{option}{entrycounterwithin} % This option can be used to set a parent counter for % \ctr{glossaryentry}. This option automatically sets % \pkgopt[true]{entrycounter}. %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} \define@key{glossaries.sty}{counterwithin}{% \renewcommand*{\@gls@counterwithin}{#1}% \glsentrycountertrue } % \end{macrocode} %\end{option} %\begin{macro}{\@gls@counterwithin} %\changes{3.0}{2011/04/02}{new} % The default value is no parent counter: % \begin{macrocode} \newcommand*{\@gls@counterwithin}{} % \end{macrocode} %\end{macro} % %\begin{option}{subentrycounter} % Define a counter that can be used in the standard glossary styles % to number each level~1 entry. If true, this will define a counter called % \ctr{glossarysubentry}. %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} \define@boolkey{glossaries.sty}[gls]{subentrycounter}[true]{} \glssubentrycounterfalse % \end{macrocode} %\end{option} % %\begin{option}{sort} %\changes{3.0}{2011/04/02}{new} % Define the sort method: \pkgopt[standard]{sort} (default), % \pkgopt[def]{sort} (order of definition) or % \pkgopt[use]{sort} (order of use). % \begin{macrocode} \define@choicekey{glossaries.sty}{sort}{standard,def,use}{% \csname @gls@setupsort@#1\endcsname } % \end{macrocode} %\end{option} %\begin{macro}{\@gls@setupsort@standard} %\changes{3.0}{2011/04/02}{new} % Set up the macros for default sorting. % \begin{macrocode} \newcommand*{\@gls@setupsort@standard}{% % \end{macrocode} % Store entry information when it's defined. % \begin{macrocode} \def\do@glo@storeentry{\@glo@storeentry}% % \end{macrocode} % No count register required for standard sort. % \begin{macrocode} \def\@gls@defsortcount##1{}% % \end{macrocode} % Sort according to sort key (\cs{@glo@sort}) if provided otherwise % sort according to the entry's name (\cs{@glo@name}). % \begin{macrocode} \def\@gls@defsort##1##2{% \ifx\@glo@sort\@glsdefaultsort \let\@glo@sort\@glo@name \fi \@onelevel@sanitize\@glo@sort \expandafter\protected@xdef\csname glo@##2@sort\endcsname{\@glo@sort}% }% % \end{macrocode} % Don't need to do anything when the entry is used. % \begin{macrocode} \def\@gls@setsort##1{}% } % \end{macrocode} % Set standard sort as the default: % \begin{macrocode} \@gls@setupsort@standard % \end{macrocode} %\end{macro} % %\begin{macro}{\glssortnumberfmt} %\changes{3.0}{2011/04/02}{new} % Format the number used as the sort key by \pkgopt[def]{sort} and % \pkgopt[use]{sort}. Defaults to six digit numbering. % \begin{macrocode} \newcommand*\glssortnumberfmt[1]{% \ifnum#1<100000 0\fi \ifnum#1<10000 0\fi \ifnum#1<1000 0\fi \ifnum#1<100 0\fi \ifnum#1<10 0\fi \number#1% } % \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@setupsort@def} %\changes{3.0}{2011/04/02}{new} % Set up the macros for order of definition sorting. % \begin{macrocode} \newcommand*{\@gls@setupsort@def}{% % \end{macrocode} % Store entry information when it's defined. % \begin{macrocode} \def\do@glo@storeentry{\@glo@storeentry}% % \end{macrocode} % Defined count register associated with the glossary. % \begin{macrocode} \def\@gls@defsortcount##1{% \expandafter\global \expandafter\newcount\csname glossary@##1@sortcount\endcsname }% % \end{macrocode} % Increment count register associated with the glossary and use as % the sort key. % \begin{macrocode} \def\@gls@defsort##1##2{% \expandafter\global\expandafter \advance\csname glossary@##1@sortcount\endcsname by 1\relax \expandafter\protected@xdef\csname glo@##2@sort\endcsname{% \expandafter\glssortnumberfmt {\csname glossary@##1@sortcount\endcsname}}% }% % \end{macrocode} % Don't need to do anything when the entry is used. % \begin{macrocode} \def\@gls@setsort##1{}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@setupsort@use} %\changes{3.0}{2011/04/02}{new} % Set up the macros for order of use sorting. % \begin{macrocode} \newcommand*{\@gls@setupsort@use}{% % \end{macrocode} % Don't store entry information when it's defined. % \begin{macrocode} \let\do@glo@storeentry\@gobble % \end{macrocode} % Defined count register associated with the glossary. % \begin{macrocode} \def\@gls@defsortcount##1{% \expandafter\global \expandafter\newcount\csname glossary@##1@sortcount\endcsname }% % \end{macrocode} % Initialise the sort key to empty. % \begin{macrocode} \def\@gls@defsort##1##2{% \expandafter\gdef\csname glo@##2@sort\endcsname{}% }% % \end{macrocode} % If the sort key hasn't been set, increment the counter associated % with the glossary and set the sort key. % \begin{macrocode} \def\@gls@setsort##1{% % \end{macrocode} % Get the parent, if one exists % \begin{macrocode} \edef\@glo@parent{\csname glo@##1@parent\endcsname}% % \end{macrocode} % Set the information for the parent entry if not already done. % \begin{macrocode} \ifx\@glo@parent\@empty \else \expandafter\@gls@setsort\expandafter{\@glo@parent}% \fi % \end{macrocode} % Set index information for this entry % \begin{macrocode} \edef\@glo@type{\csname glo@##1@type\endcsname}% \edef\@gls@tmp{\csname glo@##1@sort\endcsname}% \ifx\@gls@tmp\@empty \expandafter\global\expandafter \advance\csname glossary@\@glo@type @sortcount\endcsname by 1\relax \expandafter\protected@xdef\csname glo@##1@sort\endcsname{% \expandafter\glssortnumberfmt {\csname glossary@\@glo@type @sortcount\endcsname}}% \@glo@storeentry{##1}% \fi }% } % \end{macrocode} %\end{macro} % %\begin{macro}{\glsdefmain} %\changes{2.01}{2009 May 30}{new} % Define the main glossary. This will be the first glossary to % be displayed when using \ics{printglossaries}. % \begin{macrocode} \newcommand*{\glsdefmain}{% \newglossary{main}{gls}{glo}{\glossaryname}% } % \end{macrocode} %\end{macro} % % Keep track of the default glossary. This is initialised to % the main glossary, but can be changed if for some reason % you want to make a secondary glossary the main glossary. This % affects any commands that can optionally take a glossary name % as an argument (or as the value of the % \gloskey{type}\igloskey[printglossary]{type} key in %a key-value list). This was mainly done so that % \ics{loadglsentries} can temporarily change % \cs{glsdefaulttype} while it loads a file containing % new glossary entries (see \autoref{sec:load}). %\begin{macro}{\glsdefaulttype} % \begin{macrocode} \newcommand*{\glsdefaulttype}{main} % \end{macrocode} %\end{macro} % Keep track of which glossary the acronyms are in. This is % initialised to \cs{glsdefaulttype}, but is changed by % the \pkgopt{acronym} package option. %\begin{macro}{\acronymtype} % \begin{macrocode} \newcommand*{\acronymtype}{\glsdefaulttype} % \end{macrocode} %\end{macro} % %\changes{2.01}{2009 May 30}{added nomain package option} % The \pkgopt{nomain} option suppress the creation of the main % glossary. % \begin{macrocode} \DeclareOptionX{nomain}{% \let\glsdefaulttype\relax \renewcommand*{\glsdefmain}{}% } % \end{macrocode} % %\begin{option}{acronym} % The \pkgopt{acronym} option sets an associated conditional % which is used in \autoref{sec:acronym} to determine whether % or not to define a separate glossary for acronyms. % \begin{macrocode} \define@boolkey{glossaries.sty}[gls]{acronym}[true]{% \DeclareAcronymList{acronym}% } % \end{macrocode} %\end{option} %\begin{macro}{\@glsacronymlists} %\changes{2.04}{2009 November 10}{new} % Comma-separated list of glossary labels indicating which % glossaries contain acronyms. Note that \ics{SetAcronymStyle} % must be used after adding labels to this macro. % \begin{macrocode} \newcommand*{\@glsacronymlists}{} % \end{macrocode} %\end{macro} %\begin{macro}{\@addtoacronynlists} % \begin{macrocode} \newcommand*{\@addtoacronymlists}[1]{% \ifx\@glsacronymlists\@empty \protected@xdef\@glsacronymlists{#1}% \else \protected@xdef\@glsacronymlists{\@glsacronymlists,#1}% \fi } % \end{macrocode} %\end{macro} %\begin{macro}{\DeclareAcronymList} %\changes{2.04}{2009 November 10}{new}% % Identifies the named glossary as a list of acronyms and adds % to the list. (Doesn't check if the glossary exists, but checks % if label already in list. Use \ics{SetAcronymStyle} after % identifying all the acronym lists.) % \begin{macrocode} \newcommand*{\DeclareAcronymList}[1]{% \glsIfListOfAcronyms{#1}{}{\@addtoacronymlists{#1}}% } % \end{macrocode} %\end{macro} %\begin{macro}{\glsIfListOfAcronyms} %\cs{glsIfListOfAcronyms}\marg{label}\marg{true part}\marg{false part}\\[10pt] % Determines if the glossary with the given label has been identified % as being a list of acronyms. % \begin{macrocode} \newcommand{\glsIfListOfAcronyms}[1]{% \edef\@do@gls@islistofacronyms{% \noexpand\@gls@islistofacronyms{#1}{\@glsacronymlists}}% \@do@gls@islistofacronyms } % \end{macrocode} % Internal command requires label and list to be expanded: % \begin{macrocode} \newcommand{\@gls@islistofacronyms}[4]{% \def\gls@islistofacronyms##1,#1,##2\end@gls@islistofacronyms{% \def\@before{##1}\def\@after{##2}}% \gls@islistofacronyms,#2,#1,\@nil\end@gls@islistofacronyms \ifx\@after\@nnil % \end{macrocode} % Not found % \begin{macrocode} #4% \else % \end{macrocode} % Found % \begin{macrocode} #3% \fi } % \end{macrocode} %\end{macro} %\begin{macro}{\if@glsisacronymlist} % Convenient boolean. % \begin{macrocode} \newif\if@glsisacronymlist % \end{macrocode} %\end{macro} %\begin{macro}{\gls@checkisacronymlist} % Sets the above boolean if argument is a label representing % a list of acronyms. % \begin{macrocode} \newcommand*{\gls@checkisacronymlist}[1]{% \glsIfListOfAcronyms{#1}% {\@glsisacronymlisttrue}{\@glsisacronymlistfalse}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\SetAcronymLists} %\changes{2.04}{2009 November 10}{new}% % Sets the ``list of acronyms'' list. Argument must be a % comma-separated list of glossary labels. (Doesn't check at this % point if the glossaries exists.) % \begin{macrocode} \newcommand*{\SetAcronymLists}[1]{% \renewcommand*{\@glsacronymlists}{#1}% } % \end{macrocode} %\end{macro} %\begin{option}{acronymlists} %\changes{2.04}{2009 November 10}{new}% % \begin{macrocode} \define@key{glossaries.sty}{acronymlists}{% \@addtoacronymlists{#1}% } % \end{macrocode} %\end{option} % % The default counter associated with the numbers in the glossary % is stored in \cs{glscounter}. This is initialised to the % page counter. This is used as the default counter when a % new glossary is defined, unless a different counter is specified % in the optional argument to \ics{newglossary} (see % \autoref{sec:newglos}). %\begin{macro}{\glscounter} % \begin{macrocode} \newcommand{\glscounter}{page} % \end{macrocode} %\end{macro} %\begin{option}{counter} % The \pkgopt{counter} option changes the default counter. (This % just redefines \cs{glscounter}.) % \begin{macrocode} \define@key{glossaries.sty}{counter}{% \renewcommand*{\glscounter}{#1}% } % \end{macrocode} %\end{option} % % The glossary keys whose values are written to another file (i.e.\ % \gloskey{sort}, \gloskey{name}, \gloskey{description} and % \gloskey{symbol}) need to be sanitized, otherwise fragile % commands would not be able to be used in % \ics{newglossaryentry}. However, strange results will occur % if you then use those fields in the document. As these fields % are not normally used in the document, but are by default only % used in the glossary, the default is to sanitize them. If however % you want to use these values in the document (either by redefining % commands like \ics{glsdisplay} or by using commands like % \ics{glsentrydesc}) you will have to switch off the % sanitization using the \pkgopt{sanitize} package option, but % you will then have to use \ics{protect} to protect fragile % commands when defining new glossary entries. % The \pkgopt{sanitize} option % takes a key-value list as its value, which can be used to % switch individual values on and off. For example: %\begin{verbatim} %\usepackage[sanitize={description,name,symbol=false}]{glossaries} %\end{verbatim} %will switch off the sanitization for the \gloskey{symbol} key, but % switch it on for the \gloskey{description} and \gloskey{name} keys. % This would mean that you can use fragile commands in the %description and name when defining a new glossary entry, but not % for the symbol. % % The default values are defined as: %\begin{macro}{\@gls@sanitizedesc} % \begin{macrocode} \newcommand*{\@gls@sanitizedesc}{\@onelevel@sanitize\@glo@desc} % \end{macrocode} %\end{macro} %\begin{macro}{\@gls@sanitizename} % \begin{macrocode} \newcommand*{\@gls@sanitizename}{\@onelevel@sanitize\@glo@name} % \end{macrocode} %\end{macro} %\begin{macro}{\@gls@sanitizesymbol} % \begin{macrocode} \newcommand*{\@gls@sanitizesymbol}{\@onelevel@sanitize\@glo@symbol} % \end{macrocode} %\end{macro} % (There is no equivalent for the \gloskey{sort} key, since that % is only provided for the benefit of \app{makeindex} or % \app{xindy}, and so will always be sanitized.) % % Before defining the \pkgopt{sanitize} package option, The % key-value list for the \pkgopt{sanitize} value needs to be defined. % These are all boolean keys. If they are not given a value, assume % \texttt{true}. % % Firstly the \gloskey{description}. If set, it will redefine % \cs{@gls@sanitizedesc} to use \cs{@onelevel@sanitize}, % otherwise \cs{@gls@sanitizedesc} will do nothing. % \begin{macrocode} \define@boolkey[gls]{sanitize}{description}[true]{% \ifgls@sanitize@description \renewcommand*{\@gls@sanitizedesc}{\@onelevel@sanitize\@glo@desc}% \else \renewcommand*{\@gls@sanitizedesc}{}% \fi } % \end{macrocode} % Similarly for the \gloskey{name} key: % \begin{macrocode} \define@boolkey[gls]{sanitize}{name}[true]{% \ifgls@sanitize@name \renewcommand*{\@gls@sanitizename}{\@onelevel@sanitize\@glo@name}% \else \renewcommand*{\@gls@sanitizename}{}% \fi} % \end{macrocode} % and for the \gloskey{symbol} key: % \begin{macrocode} \define@boolkey[gls]{sanitize}{symbol}[true]{% \ifgls@sanitize@symbol \renewcommand*{\@gls@sanitizesymbol}{% \@onelevel@sanitize\@glo@symbol}% \else \renewcommand*{\@gls@sanitizesymbol}{}% \fi} % \end{macrocode} % %\begin{option}{sanitize} % Now define the \pkgopt{sanitize} option. It can either take % a key-val list as its value, or it can take the keyword % \texttt{none}, which is equivalent to \texttt{description=false, % symbol=false, name=false}: % \begin{macrocode} \define@key{glossaries.sty}{sanitize}[description=true,symbol=true, name=true]{% \ifthenelse{\equal{#1}{none}}{% \renewcommand*{\@gls@sanitizedesc}{}% \renewcommand*{\@gls@sanitizename}{}% \renewcommand*{\@gls@sanitizesymbol}{}% }{\setkeys[gls]{sanitize}{#1}}% } % \end{macrocode} %\end{option} %\begin{option}{translate} %\changes{1.1}{2008 Feb 22}{translate option added} % Define \pkgopt{translate} option. If false don't set up % multi-lingual support. % \begin{macrocode} \define@boolkey{glossaries.sty}[gls]{translate}[true]{} % \end{macrocode} %\end{option} % Set the default value: % \begin{macrocode} \glstranslatefalse \@ifpackageloaded{translator}{\glstranslatetrue}{% \@ifpackageloaded{babel}{\glstranslatetrue}{% \@ifpackageloaded{polyglossia}{\glstranslatetrue}{}}} % \end{macrocode} % %\begin{option}{hyperfirst} %\changes{2.03}{2009 Sep 23}{new} % Set whether or not terms should have a hyperlink on first use. % \begin{macrocode} \define@boolkey{glossaries.sty}[gls]{hyperfirst}[true]{} \glshyperfirsttrue % \end{macrocode} %\end{option} % %\begin{option}{footnote} % Set the long form of the acronym in footnote on first use. % \begin{macrocode} \define@boolkey{glossaries.sty}[glsacr]{footnote}[true]{% \ifthenelse{\boolean{glsacrdescription}}{}% {\renewcommand*{\@gls@sanitizedesc}{}}% } % \end{macrocode} %\end{option} %\begin{option}{description} % Allow acronyms to have a description (needs to be set using % the \gloskey{description} key in the optional argument of % \ics{newacronym}). % \begin{macrocode} \define@boolkey{glossaries.sty}[glsacr]{description}[true]{% \renewcommand*{\@gls@sanitizesymbol}{}% } % \end{macrocode} %\end{option} %\begin{option}{smallcaps} % Define \ics{newacronym} to set the short form in small capitals. % \begin{macrocode} \define@boolkey{glossaries.sty}[glsacr]{smallcaps}[true]{% \renewcommand*{\@gls@sanitizesymbol}{}% } % \end{macrocode} %\end{option} %\begin{option}{smaller} % Define \ics{newacronym} to set the short form using \cs{smaller} % which obviously needs to be defined by loading the appropriate % package. % \begin{macrocode} \define@boolkey{glossaries.sty}[glsacr]{smaller}[true]{% \renewcommand*{\@gls@sanitizesymbol}{}% } % \end{macrocode} %\end{option} %\begin{option}{dua} % Define \ics{newacronym} to always use the long forms % (i.e.\ don't use acronyms) % \begin{macrocode} \define@boolkey{glossaries.sty}[glsacr]{dua}[true]{% \renewcommand*{\@gls@sanitizesymbol}{}% } % \end{macrocode} %\end{option} %\begin{option}{shotcuts} % Define acronym shortcuts. % \begin{macrocode} \define@boolkey{glossaries.sty}[glsacr]{shortcuts}[true]{} % \end{macrocode} %\end{option} % %\begin{macro}{\glsorder} % Stores the glossary ordering. This may either be \qt{word} % or \qt{letter}. This passes the relevant information to % \app{makeglossaries}. The default is word ordering. % \begin{macrocode} \newcommand*{\glsorder}{word} % \end{macrocode} %\end{macro} %\begin{macro}{\@glsorder} % The ordering information is written to the auxiliary file % for \app{makeglossaries}, so ignore the auxiliary % information. % \begin{macrocode} \newcommand*{\@glsorder}[1]{} % \end{macrocode} %\end{macro} % %\begin{option}{order} %\changes{1.17}{2008 December 26}{order package option added} % \begin{macrocode} \define@choicekey{glossaries.sty}{order}{word,letter}{% \def\glsorder{#1}} % \end{macrocode} %\end{option} % %\changes{1.17}{2008 December 26}{added xindy support} %\begin{macro}{\ifglsxindy} %\changes{1.17}{2008 December 26}{new} % Provide boolean to determine whether \app{xindy} or % \app{makeindex} will be used to sort the glossaries. % \begin{macrocode} \newif\ifglsxindy % \end{macrocode} %\end{macro} % The default is \app{makeindex}: % \begin{macrocode} \glsxindyfalse % \end{macrocode} % % Define package option to specify that \app{makeindex} will % be used to sort the glossaries: % \begin{macrocode} \DeclareOptionX{makeindex}{\glsxindyfalse} % \end{macrocode} % % The \pkgopt{xindy} package option may have a value which in % turn can be a key=value list. First define the keys for this % sub-list. The boolean "glsnumbers" determines whether to % automatically add the \texttt{glsnumbers} letter group. % \begin{macrocode} \define@boolkey[gls]{xindy}{glsnumbers}[true]{} \gls@xindy@glsnumberstrue % \end{macrocode} % %\begin{macro}{\@xdy@main@language} % Define what language to use for each glossary type (if a % language is not defined for a particular glossary type % the language specified for the main glossary is used.) % \begin{macrocode} \def\@xdy@main@language{\rootlanguagename}% % \end{macrocode} %\end{macro} % Define key to set the language % \begin{macrocode} \define@key[gls]{xindy}{language}{\def\@xdy@main@language{#1}} % \end{macrocode} % %\begin{macro}{\gls@codepage} % Define the code page. If \ics{inputencodingname} is defined % use that, otherwise have initialise with no codepage. %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \ifcsundef{inputencodingname}{% \def\gls@codepage{}}{% \def\gls@codepage{\inputencodingname} } % \end{macrocode} % Define a key to set the code page. % \begin{macrocode} \define@key[gls]{xindy}{codepage}{\def\gls@codepage{#1}} % \end{macrocode} %\end{macro} % % Define package option to specify that \app{xindy} will be % used to sort the glossaries: % \begin{macrocode} \define@key{glossaries.sty}{xindy}[]{% \glsxindytrue \setkeys[gls]{xindy}{#1}% } % \end{macrocode} % %\begin{option}{savewrites} %\changes{3.0}{2011/04/02}{new} % The \pkgopt{savewrites} package option is provided to save on % the number of write registers. % \begin{macrocode} \define@boolkey{glossaries.sty}[gls]{savewrites}[true]{} % \end{macrocode} %\end{option} % Set default: % \begin{macrocode} \glssavewritesfalse % \end{macrocode} % %\begin{macro}{\GlossariesWarning} % Prints a warning message. % \begin{macrocode} \newcommand*{\GlossariesWarning}[1]{% \PackageWarning{glossaries}{#1}% } % \end{macrocode} %\end{macro} %\begin{macro}{\GlossariesWarningNoLine} % Prints a warning message without the line number. % \begin{macrocode} \newcommand*{\GlossariesWarningNoLine}[1]{% \PackageWarningNoLine{glossaries}{#1}% } % \end{macrocode} %\end{macro} % Define package option to suppress warnings % \begin{macrocode} \DeclareOptionX{nowarn}{% \renewcommand*{\GlossariesWarning}[1]{}% \renewcommand*{\GlossariesWarningNoLine}[1]{}% } % \end{macrocode} %\begin{option}{compatible-2.07} %\changes{3.0}{2011/04/02}{compatible-2.07 option added} % \begin{macrocode} \define@boolkey{glossaries.sty}[gls]{compatible-2.07}[true]{} \csname glscompatible-2.07false\endcsname % \end{macrocode} %\end{option} % % % Process package options: % \begin{macrocode} \ProcessOptionsX % \end{macrocode} % If \isty{babel} package is loaded, check to see if % \isty{translator} is installed, but only if translation is % required. %\changes{2.02}{2009 July 13}{translate=false will prevent % automatic loading of translator package} % \begin{macrocode} \ifglstranslate \@ifpackageloaded{babel}{\IfFileExists{translator.sty}{% \RequirePackage{translator}}{}}{} \fi % \end{macrocode} % % If chapters are defined and the user has requested the % section counter as a package option, \cs{@chapter} will % be modified so % that it adds a \texttt{section.}\meta{n}\texttt{.0} target, % otherwise entries placed before the first section of a chapter % will have undefined links. % % The same problem will also occur if a lower sectional unit is % used, but this is less likely to happen. If it does, or if % you change \cs{glscounter} to "section" later, you % will have to specify a different counter for the entries % that give rise to a \texttt{name}"{"\meta{section-level}"."\meta{n}".0}" % non-existent warning (e.g. "\gls[counter=chapter]{label}"). %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \ifthenelse{\equal{\glscounter}{section}}% {% \ifcsundef{chapter}{}% {% \let\@gls@old@chapter\@chapter \def\@chapter[#1]#2{\@gls@old@chapter[{#1}]{#2}% \ifcsundef{hyperdef}{}{\hyperdef{section}{\thesection}{}}}% }% }% {} % \end{macrocode} % %\begin{macro}{\@gls@onlypremakeg} % Some commands only have an effect when used before % \ics{makeglossaries}. So define a list of commands that % should be disabled after \ics{makeglossaries} % \begin{macrocode} \newcommand*{\@gls@onlypremakeg}{} % \end{macrocode} %\end{macro} %\begin{macro}{\@onlypremakeg} % Adds the specified control sequence to the list of commands that % must be disabled after \ics{makeglossaries}. % \begin{macrocode} \newcommand*{\@onlypremakeg}[1]{% \ifx\@gls@onlypremakeg\@empty \def\@gls@onlypremakeg{#1}% \else \expandafter\toks@\expandafter{\@gls@onlypremakeg}% \edef\@gls@onlypremakeg{\the\toks@,\noexpand#1}% \fi} % \end{macrocode} %\end{macro} %\begin{macro}{\@disable@onlypremakeg} % Disable all commands listed in \cs{@gls@onlypremakeg} % \begin{macrocode} \newcommand*{\@disable@onlypremakeg}{% \@for\@thiscs:=\@gls@onlypremakeg\do{% \expandafter\@disable@premakecs\@thiscs% }} % \end{macrocode} %\end{macro} %\begin{macro}{\@disable@premakecs} % Disables the given command. % \begin{macrocode} \newcommand*{\@disable@premakecs}[1]{% \def#1{\PackageError{glossaries}{\string#1\space may only be used before \string\makeglossaries}{You can't use \string#1\space after \string\makeglossaries}}% } % \end{macrocode} %\end{macro} % %\subsection{Default values}\label{sec:predefinednames} % This section sets up default values that are used by this % package. Some of the names may already be defined (e.g.\ by % \isty{babel}) so \cs{providecommand} is used. % % Main glossary title: %\begin{macro}{\glossaryname} % \begin{macrocode} \providecommand*{\glossaryname}{Glossary} % \end{macrocode} %\end{macro} % The title for the "acronym" glossary type (which is defined if % \pkgopt{acronym} package option is used) is given by % \cs{acronymname}. If the \pkgopt{acronym} % package option is not used, \cs{acronymname} won't be used. %\begin{macro}{\acronymname} % \begin{macrocode} \providecommand*{\acronymname}{Acronyms} % \end{macrocode} %\end{macro} %\begin{macro}{\glssettoctitle} % Sets the TOC title for the given glossary. %\changes{1.15}{2008 August 15}{new} % \begin{macrocode} \newcommand*{\glssettoctitle}[1]{% \def\glossarytoctitle{\csname @glotype@#1@title\endcsname}} % \end{macrocode} %\end{macro} % % The following commands provide text for the headers used by % some of the tabular-like glossary % styles. Whether or not they get used in the glossary depends on % the glossary style. %\begin{macro}{\entryname} % \begin{macrocode} \providecommand*{\entryname}{Notation} % \end{macrocode} %\end{macro} %\begin{macro}{\descriptionname} % \begin{macrocode} \providecommand*{\descriptionname}{Description} % \end{macrocode} %\end{macro} %\begin{macro}{\symbolname} % \begin{macrocode} \providecommand*{\symbolname}{Symbol} % \end{macrocode} %\end{macro} %\begin{macro}{\pagelistname} % \begin{macrocode} \providecommand*{\pagelistname}{Page List} % \end{macrocode} %\end{macro} % Labels for \app{makeindex}'s symbol and number groups: %\begin{macro}{\glssymbolsgroupname} % \begin{macrocode} \providecommand*{\glssymbolsgroupname}{Symbols} % \end{macrocode} %\end{macro} %\begin{macro}{\glsnumbersgroupname} % \begin{macrocode} \providecommand*{\glsnumbersgroupname}{Numbers} % \end{macrocode} %\end{macro} %\begin{macro}{\glspluralsuffix} % The default plural is formed by appending \cs{glspluralsuffix} to % the singular form. % \begin{macrocode} \newcommand*{\glspluralsuffix}{s} % \end{macrocode} %\end{macro} %\begin{macro}{\seename} % \begin{macrocode} \providecommand*{\seename}{see} % \end{macrocode} %\end{macro} %\begin{macro}{\andname} % \begin{macrocode} \providecommand*{\andname}{\&} % \end{macrocode} %\end{macro} % Add multi-lingual support\changes{1.08}{2007 Oct 13}{Added % babel support}. Thanks to everyone who contributed to the % translations from both comp.text.tex and via email. %\begin{macro}{\addglossarytocaptions} % If using \isty{translator}, \ics{glossaryname} should be defined % in terms of \ics{translate}, but if babel is also loaded, it will % redefine \cs{glossaryname} whenever the language is set, so % override it. (Don't use \ics{addto} as \isty{polyglossia} doesn't % define it.) %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \newcommand*{\addglossarytocaptions}[1]{% \ifcsundef{captions#1}{}% {% \expandafter\let\expandafter\@gls@tmp\csname captions#1\endcsname \expandafter\toks@\expandafter{\@gls@tmp \renewcommand*{\glossaryname}{\translate{Glossary}}% }% \expandafter\edef\csname captions#1\endcsname{\the\toks@}% }% } % \end{macrocode} %\end{macro} % \begin{macrocode} \ifglstranslate % \end{macrocode} % If \isty{translator} is not install, used standard % \isty{babel} captions, otherwise load \isty{translator} % dictionary. %\changes{1.1}{2008 Feb 22}{Added support for translator package} %\changes{1.15}{2008 August 15}{Added 'glssettoctitle} % \begin{macrocode} \@ifpackageloaded{translator}{% \usedictionary{glossaries-dictionary}% \addglossarytocaptions{portuges}% \addglossarytocaptions{portuguese}% \addglossarytocaptions{brazil}% \addglossarytocaptions{brazilian}% \addglossarytocaptions{danish}% \addglossarytocaptions{dutch}% \addglossarytocaptions{afrikaans}% \addglossarytocaptions{english}% \addglossarytocaptions{UKenglish}% \addglossarytocaptions{USenglish}% \addglossarytocaptions{american}% \addglossarytocaptions{australian}% \addglossarytocaptions{british}% \addglossarytocaptions{canadian}% \addglossarytocaptions{newzealand}% \addglossarytocaptions{french}% \addglossarytocaptions{frenchb}% \addglossarytocaptions{francais}% \addglossarytocaptions{acadian}% \addglossarytocaptions{canadien}% \addglossarytocaptions{german}% \addglossarytocaptions{germanb}% \addglossarytocaptions{austrian}% \addglossarytocaptions{naustrian}% \addglossarytocaptions{ngerman}% \addglossarytocaptions{irish}% \addglossarytocaptions{italian}% \addglossarytocaptions{magyar}% \addglossarytocaptions{hungarian}% \addglossarytocaptions{polish}% \addglossarytocaptions{spanish}% \renewcommand*{\glssettoctitle}[1]{% \ifthenelse{\equal{#1}{main}}{% \translatelet{\glossarytoctitle}{Glossary}}{% \ifthenelse{\equal{#1}{acronym}}{% \translatelet{\glossarytoctitle}{Acronyms}}{% \def\glossarytoctitle{\csname @glotype@#1@title\endcsname}}}}% \renewcommand*{\glossaryname}{\translate{Glossary}}% \renewcommand*{\acronymname}{\translate{Acronyms}}% \renewcommand*{\entryname}{\translate{Notation (glossaries)}}% \renewcommand*{\descriptionname}{% \translate{Description (glossaries)}}% \renewcommand*{\symbolname}{\translate{Symbol (glossaries)}}% \renewcommand*{\pagelistname}{% \translate{Page List (glossaries)}}% \renewcommand*{\glssymbolsgroupname}{% \translate{Symbols (glossaries)}}% \renewcommand*{\glsnumbersgroupname}{% \translate{Numbers (glossaries)}}% }{% \@ifpackageloaded{babel}% {\RequirePackage{glossaries-babel}}% {% \@ifpackageloaded{polyglossia}{% \RequirePackage{glossaries-polyglossia}}{}% }} \fi % \end{macrocode} %\begin{macro}{\glspostdescription} % The description terminator is given by \cs{glspostdescription} % (except for the 3 and 4 column styles). This is a full stop % by default: % \begin{macrocode} \newcommand*{\glspostdescription}{.} % \end{macrocode} %\end{macro} % %\begin{macro}{\nopostdesc} % Provide a means to suppress description terminator for a given % entry. (Useful for entries with no description.) Has no % effect outside the glossaries. %\changes{1.17}{2008 December 26}{new} % \begin{macrocode} \newcommand*{\nopostdesc}{} % \end{macrocode} %\end{macro} %\begin{macro}{\@nopostdesc} % Suppress next description terminator. % \begin{macrocode} \newcommand*{\@nopostdesc}{% \let\org@glspostdescription\glspostdescription \def\glspostdescription{% \let\glspostdescription\org@glspostdescription}% } % \end{macrocode} %\end{macro} %\begin{macro}{\glspar} % Provide means of having a paragraph break in glossary entries % \begin{macrocode} \newcommand{\glspar}{\par} % \end{macrocode} %\end{macro} % %\begin{macro}{\setStyleFile} % Sets the style file. The relevent extension is appended. % \begin{macrocode} \ifglsxindy \newcommand{\setStyleFile}[1]{% \renewcommand{\istfilename}{#1.xdy}} \else \newcommand{\setStyleFile}[1]{% \renewcommand{\istfilename}{#1.ist}} \fi % \end{macrocode} % This command only has an effect prior to using % \ics{makeglossaries}. % \begin{macrocode} \@onlypremakeg\setStyleFile % \end{macrocode} %\end{macro} % % The name of the \app{makeindex} or \app{xindy} style file % is given by \cs{istfilename}. This file is % created by \ics{writeist} (which is used by % \ics{makeglossaries}) so % redefining this command will only have an effect if it is % done \emph{before} \cs{makeglossaries}. As from v1.17, use % \ics{setStyleFile} instead of directly redefining \cs{istfilename}. %\begin{macro}{\istfilename} %\changes{1.17}{2008 December 26}{added xindy support} % \begin{macrocode} \ifglsxindy \def\istfilename{\jobname.xdy} \else \def\istfilename{\jobname.ist} \fi % \end{macrocode} %\end{macro} % The \app{makeglossaries} Perl script picks up this name % from the auxiliary file. If the name ends with \filetype{.xdy} % it calls \app{xindy} otherwise it calls \app{makeindex}. % Since its not required by % \LaTeX, \cs{@istfilename} ignores its argument. %\begin{macro}{\@istfilename} % \begin{macrocode} \newcommand*{\@istfilename}[1]{} % \end{macrocode} %\end{macro} % % This command is the value of the \istkey{page\_compositor} % \app{makeindex} key. Again, any redefinition of this command % must take place \emph{before} \cs{writeist} otherwise it % will have no effect. As from 1.17, use \ics{glsSetCompositor} % instead of directly redefining \cs{glscompositor}. %\begin{macro}{\glscompositor} % \begin{macrocode} \newcommand*{\glscompositor}{.} % \end{macrocode} %\end{macro} %\begin{macro}{\glsSetCompositor} % Sets the compositor. % \begin{macrocode} \newcommand*{\glsSetCompositor}[1]{% \renewcommand*{\glscompositor}{#1}} % \end{macrocode} % Only use before \ics{makeglossaries} % \begin{macrocode} \@onlypremakeg\glsSetCompositor % \end{macrocode} %\end{macro} % % (The page compositor is usually defined as a dash when using % \app{makeindex}, but most of the standard counters used % by \LaTeX\ use a full stop as the compositor, which is why I % have used it as the default.) If \app{xindy} is used % \cs{glscompositor} only affects the \texttt{arabic-page-numbers} % location class. %\begin{macro}{\@glsAlphacompositor} % This is only used by \app{xindy}. It specifies the % compositor to use when location numbers are in the form % \meta{letter}\meta{compositor}\meta{number}. For example, % if \cs{@glsAlphacompositor} is set to ``.'' then it allows % locations such as A.1 whereas if \cs{@glsAlphacompositor} is % set to ``-'' then it allows locations such as A-1. % \begin{macrocode} \newcommand*{\@glsAlphacompositor}{\glscompositor} % \end{macrocode} %\end{macro} % %\begin{macro}{\glsSetAlphaCompositor} % Sets the alpha compositor. % \begin{macrocode} \ifglsxindy \newcommand*\glsSetAlphaCompositor[1]{% \renewcommand*\@glsAlphacompositor{#1}} \else \newcommand*\glsSetAlphaCompositor[1]{% \glsnoxindywarning\glsSetAlphaCompositor} \fi % \end{macrocode} % Can only be used before \ics{makeglossaries} % \begin{macrocode} \@onlypremakeg\glsSetAlphaCompositor % \end{macrocode} %\end{macro} % %\begin{macro}{\gls@suffixF} %\changes{1.17}{2008 December 26}{new} % Suffix to use for a two page list. This overrides the separator % and the closing page number if set to something other than % an empty macro. % \begin{macrocode} \newcommand*{\gls@suffixF}{} % \end{macrocode} %\end{macro} %\begin{macro}{\glsSetSuffixF} %\changes{1.17}{2008 December 26}{new} % Sets the suffix to use for a two page list. % \begin{macrocode} \newcommand*{\glsSetSuffixF}[1]{% \renewcommand*{\gls@suffixF}{#1}} % \end{macrocode} % Only has an effect when used before \ics{makeglossaries} % \begin{macrocode} \@onlypremakeg\glsSetSuffixF % \end{macrocode} %\end{macro} % %\begin{macro}{\gls@suffixFF} %\changes{1.17}{2008 December 26}{new} % Suffix to use for a three page list. This overrides the separator % and the closing page number if set to something other than % an empty macro. % \begin{macrocode} \newcommand*{\gls@suffixFF}{} % \end{macrocode} %\end{macro} %\begin{macro}{\glsSetSuffixFF} %\changes{1.17}{2008 December 26}{new} % Sets the suffix to use for a three page list. % \begin{macrocode} \newcommand*{\glsSetSuffixFF}[1]{% \renewcommand*{\gls@suffixFF}{#1}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\glsnumberformat} % The command \cs{glsnumberformat} indicates the default % format for the page numbers in the glossary. (Note that this % is not the same as \ics{glossaryentrynumbers}, but applies % to individual numbers or groups of numbers within an entry's % associated number list.) If hyperlinks are defined, it will use % \ics{glshypernumber}, otherwise it will simply display its % argument ``as is''. %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \ifcsundef{hyperlink}% {% \newcommand*{\glsnumberformat}[1]{#1}% }% {% \newcommand*{\glsnumberformat}[1]{\glshypernumber{#1}}% } % \end{macrocode} %\end{macro} % % Individual numbers in an entry's associated number list are % delimited using \cs{delimN} (which corresponds to the % \istkey{delim\_n} \app{makeindex} keyword). The default value % is a comma followed by a space. %\begin{macro}{\delimN} % \begin{macrocode} \newcommand{\delimN}{, } % \end{macrocode} %\end{macro} % A range of numbers within an entry's associated number list is % delimited using \cs{delimR} (which corresponds to the % \istkey{delim\_r} \app{makeindex} keyword). The default is % an en-dash. %\begin{macro}{\delimR} % \begin{macrocode} \newcommand{\delimR}{--} % \end{macrocode} %\end{macro} % % The glossary preamble is given by \cs{glossarypreamble}. This % will appear after the glossary sectioning command, and before the % \env{theglossary} environment. It is designed to allow the % user to add information pertaining to the glossary (e.g.\ ``page % numbers in italic indicate the primary definition'') therefore % \cs{glossarypremable} shouldn't be affected by the glossary % style. (So if you define your own glossary style, don't have it % change \cs{glossarypreamble}.) The preamble is empty by % default. If you have multiple glossaries, and you want a % different preamble for each glossary, you will need to use % \ics{printglossary} for each glossary type, instead of % \ics{printglossaries}, and redefine \cs{glossarypreamble} % before each \ics{printglossary}. %\begin{macro}{\glossarypreamble} % \begin{macrocode} \newcommand*{\glossarypreamble}{} % \end{macrocode} %\end{macro} % % The glossary postamble is given by \cs{glossarypostamble}. % This is provided to allow the user to % add something after the end of the \env{theglossary} % environment (again, this shouldn't be affected by the % glossary style). It is, of course, possible to simply add the % text after \ics{printglossary}, but if you only want the % postamble to appear after the first glossary, but not after % subsequent glossaries, you can do something like: %\begin{verbatim} %\renewcommand{\glossarypostamble}{For a complete list of terms %see \cite{blah}\gdef\glossarypreamble{}} %\end{verbatim} %\begin{macro}{\glossarypostamble} % \begin{macrocode} \newcommand*{\glossarypostamble}{} % \end{macrocode} %\end{macro} % %\begin{macro}{\glossarysection} % The sectioning command that starts a glossary is given by % \cs{glossarysection}. (This does not form part of the % glossary style, and so should not be changed by a glossary % style.) If \ics{phantomsection} % is defined, it uses \cs{\@p@glossarysection}, otherwise it % uses \cs{@glossarysection}. %\changes{1.05}{2007 Aug 10}{added '@mkboth to 'glossarysection} %\changes{2.02}{2009 July 13}{changed '@mkboth to 'glossarymark} %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \newcommand*{\glossarysection}[2][\@gls@title]{% \def\@gls@title{#2}% \ifcsundef{phantomsection}% {% \@glossarysection{#1}{#2}% }% {% \@p@glossarysection{#1}{#2}% }% \glossarymark{\glossarytoctitle}% } % \end{macrocode} %\end{macro} %\begin{macro}{\glossarymark} %\changes{2.02}{2009 July 13}{New} %\changes{2.03}{2009 Sep 23}{Added check to see if it's already %defined} % Sets the header mark for the glossary. Takes the glossary short % (TOC) title as the argument. %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \ifcsundef{glossarymark}% {% \newcommand{\glossarymark}[1]{\@mkboth{#1}{#1}} }% {% \GlossariesWarning{overriding \string\glossarymark}% \@ifclassloaded{memoir}% { \renewcommand{\glossarymark}[1]{% \markboth{\memUChead{#1}}{\memUChead{#1}}% } } { \renewcommand{\glossarymark}[1]{\@mkboth{#1}{#1}} } } % \end{macrocode} %\end{macro} % % The required sectional unit is given by \cs{@@glossarysec} % which was defined by the \pkgopt{section} package option. The % starred form of the command is chosen. If you don't want any sectional % command, you will need to redefine \cs{glossarysection}. % The sectional unit can be changed, if different sectional units % are required. %\begin{macro}{\setglossarysection} %\changes{1.1}{2008 Feb 22}{new} % \begin{macrocode} \newcommand*{\setglossarysection}[1]{% \setkeys{glossaries.sty}{section=#1}} % \end{macrocode} %\end{macro} % %The command \cs{@glossarysection} indicates how to start % the glossary section if \ics{phantomsection} is not defined. %\begin{macro}{\@glossarysection} %\changes{1.1}{2008 Feb 22}{numbered sections and auto label added} % \begin{macrocode} \newcommand*{\@glossarysection}[2]{% \ifx\@@glossarysecstar\@empty \csname\@@glossarysec\endcsname{#2}% \else \csname\@@glossarysec\endcsname*{#2}% \@gls@toc{#1}{\@@glossarysec}% \fi \@@glossaryseclabel} % \end{macrocode} %\end{macro} % % As \cs{@glossarysection}, but put in % \ics{phantomsection}, and swap where \cs{@gls@toc} goes. % If using chapters do a \cs{clearpage}. This ensures that % the hyper link from the table of contents leads to the line above % the heading, rather than the line below it. %\begin{macro}{\@p@glossarysection} %\changes{1.1}{2008 Feb 22}{numbered sections and auto label added} % \begin{macrocode} \newcommand*{\@p@glossarysection}[2]{% \glsclearpage \phantomsection \ifx\@@glossarysecstar\@empty \csname\@@glossarysec\endcsname{#2}% \else \@gls@toc{#1}{\@@glossarysec}% \csname\@@glossarysec\endcsname*{#2}% \fi \@@glossaryseclabel} % \end{macrocode} %\end{macro} % %\begin{macro}{\gls@doclearpage} %The \cs{gls@doclearpage} command is used to issue a % \cs{clearpage} (or \cs{cleardoublepage}) depending % on whether the glossary sectional unit is a chapter. If the % sectional unit is something else, do nothing. %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \newcommand*{\gls@doclearpage}{% \ifthenelse{\equal{\@@glossarysec}{chapter}}% {% \ifcsundef{cleardoublepage}{\clearpage}{\cleardoublepage}% }% {}% } % \end{macrocode} %\end{macro} %\begin{macro}{\glsclearpage} % This just calls \cs{gls@doclearpage}, but it makes it easier to % have a user command so that the user can override it. %\changes{1.19}{2009 Mar 2}{new} % \begin{macrocode} \newcommand*{\glsclearpage}{\gls@doclearpage} % \end{macrocode} %\end{macro} % % The glossary is added to the table of contents if glstoc flag set. % If it is set, \cs{@gls@toc} will add a line to the % \filetype{.toc} file, otherwise it will do nothing. % (The first argument to \cs{@gls@toc} is the title for the % table of contents, the second argument is the sectioning type.) %\begin{macro}{\@gls@toc} %\changes{1.1}{2008 Feb 22}{numberline added} % \begin{macrocode} \newcommand*{\@gls@toc}[2]{% \ifglstoc \ifglsnumberline \addcontentsline{toc}{#2}{\numberline{}#1}% \else \addcontentsline{toc}{#2}{#1}% \fi \fi} % \end{macrocode} %\end{macro} % %\subsection{Xindy} % This section defines commands that only have an effect if % \app{xindy} is used to sort the glossaries. %\begin{macro}{\glsnoxindywarning} % Issues a warning if \app{xindy} hasn't been specified. % These warnings can be suppressed by redefining % \cs{glsnoxindywarning} to ignore its argument % \begin{macrocode} \newcommand*{\glsnoxindywarning}[1]{% \GlossariesWarning{Not in xindy mode --- ignoring \string#1}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\@xdyattributes} % Define list of attributes (\cs{string} is used in case % the double quote character has been made active) % \begin{macrocode} \ifglsxindy \edef\@xdyattributes{\string"default\string"}% \fi % \end{macrocode} %\end{macro} %\begin{macro}{\@xdyattributelist} % Comma-separated list of attributes. %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} \ifglsxindy \edef\@xdyattributelist{}% \fi % \end{macrocode} %\end{macro} %\begin{macro}{\@xdylocref} % Define list of markup location references. % \begin{macrocode} \ifglsxindy \def\@xdylocref{} \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@ifinlist} %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} \newcommand*{\@gls@ifinlist}[4]{% \def\@do@ifinlist##1,#1,##2\end@doifinlist{% \def\@gls@listsuffix{##2}% \ifx\@gls@listsuffix\@empty #4% \else #3% \fi }% \@do@ifinlist,#2,#1,\end@doifinlist } % \end{macrocode} %\end{macro} % %\begin{macro}{\GlsAddXdyCounters} %\changes{3.0}{2011/04/02}{new} % Need to know all the counters that will be used in location % numbers for Xindy. Argument may be a single counter name or a % comma-separated list of counter names. % \begin{macrocode} \ifglsxindy \newcommand*{\@xdycounters}{\glscounter} \newcommand*\GlsAddXdyCounters[1]{% \@for\@gls@ctr:=#1\do{% % \end{macrocode} % Check if already in list before adding. % \begin{macrocode} \edef\@do@addcounter{% \noexpand\@gls@ifinlist{\@gls@ctr}{\@xdycounters}{}% {% \noexpand\edef\noexpand\@xdycounters{\@xdycounters,% \noexpand\@gls@ctr}% }% }% \@do@addcounter } } % \end{macrocode} % Only has an effect before \ics{writeist}: % \begin{macrocode} \@onlypremakeg\GlsAddXdyCounters \else \newcommand*\GlsAddXdyCounters[1]{% \glsnoxindywarning\GlsAddXdyAttribute } \fi % \end{macrocode} %\end{macro} %\begin{macro}{\@disabled@glsaddxdycounters} % Counters must all be identified before adding attributes. % \begin{macrocode} \newcommand*\@disabled@glsaddxdycounters{% \PackageError{glossaries}{\string\GlsAddXdyCounters\space can't be used after \string\GlsAddXdyAttribute}{Move all occurrences of \string\GlsAddXdyCounters\space before the first instance of \string\GlsAddXdyAttribute}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\GlsAddXdyAttribute} % Adds an attribute. % \begin{macrocode} \ifglsxindy % \end{macrocode} % First define internal command that adds an attribute for a given % counter (2nd argument is the counter): % \begin{macrocode} \newcommand*\@glsaddxdyattribute[2]{% % \end{macrocode} % Add to xindy attribute list % \begin{macrocode} \edef\@xdyattributes{\@xdyattributes ^^J \string"#1\string" ^^J \string"#2#1\string"}% % \end{macrocode} % Add to xindy markup location. % \begin{macrocode} \expandafter\toks@\expandafter{\@xdylocref}% \edef\@xdylocref{\the\toks@ ^^J% (markup-locref :open \string"\string~n% \expandafter\string\csname glsX#2X#1\endcsname \string" ^^J :close \string"\string" ^^J :attr \string"#2#1\string")}% % \end{macrocode} % Define associated attribute command % \cs{glsX}\meta{counter}"X"\meta{attribute}\marg{Hprefix}\marg{n} % \begin{macrocode} \expandafter\gdef\csname glsX#2X#1\endcsname##1##2{% \setentrycounter[##1]{#2}\csname #1\endcsname{##2}% }% } % \end{macrocode} % High-level command: % \begin{macrocode} \newcommand*\GlsAddXdyAttribute[1]{% % \end{macrocode} % Add to comma-separated attribute list % \begin{macrocode} \ifx\@xdyattributelist\@empty \edef\@xdyattributelist{#1}% \else \edef\@xdyattributelist{\@xdyattributelist,#1}% \fi % \end{macrocode} % Iterate through all specified counters and add counter-dependent % attributes: % \begin{macrocode} \@for\@this@counter:=\@xdycounters\do{% \protected@edef\gls@do@addxdyattribute{% \noexpand\@glsaddxdyattribute{#1}{\@this@counter}% } \gls@do@addxdyattribute }% % \end{macrocode} % All occurrences of \cs{GlsAddXdyCounters} must be used before this % command % \begin{macrocode} \let\GlsAddXdyCounters\@disabled@glsaddxdycounters } % \end{macrocode} % Only has an effect before \ics{writeist}: % \begin{macrocode} \@onlypremakeg\GlsAddXdyAttribute \else \newcommand*\GlsAddXdyAttribute[1]{% \glsnoxindywarning\GlsAddXdyAttribute} \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@addpredefinedattributes} % Add known attributes for all defined counters % \begin{macrocode} \ifglsxindy \newcommand*{\@gls@addpredefinedattributes}{% \GlsAddXdyAttribute{glsnumberformat} \GlsAddXdyAttribute{textrm} \GlsAddXdyAttribute{textsf} \GlsAddXdyAttribute{texttt} \GlsAddXdyAttribute{textbf} \GlsAddXdyAttribute{textmd} \GlsAddXdyAttribute{textit} \GlsAddXdyAttribute{textup} \GlsAddXdyAttribute{textsl} \GlsAddXdyAttribute{textsc} \GlsAddXdyAttribute{emph} \GlsAddXdyAttribute{glshypernumber} \GlsAddXdyAttribute{hyperrm} \GlsAddXdyAttribute{hypersf} \GlsAddXdyAttribute{hypertt} \GlsAddXdyAttribute{hyperbf} \GlsAddXdyAttribute{hypermd} \GlsAddXdyAttribute{hyperit} \GlsAddXdyAttribute{hyperup} \GlsAddXdyAttribute{hypersl} \GlsAddXdyAttribute{hypersc} \GlsAddXdyAttribute{hyperemph} } \else \let\@gls@addpredefinedattributes\relax \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\@xdyuseralphabets} % List of additional alphabets % \begin{macrocode} \def\@xdyuseralphabets{} % \end{macrocode} %\end{macro} %\begin{macro}{\GlsAddXdyAlphabet} % \cs{GlsAddXdyAlphabet}\marg{name}\marg{definition} % adds a new alphabet called \meta{name}. The definition % must use \app{xindy} syntax. % \begin{macrocode} \ifglsxindy \newcommand*{\GlsAddXdyAlphabet}[2]{% \edef\@xdyuseralphabets{% \@xdyuseralphabets ^^J (define-alphabet "#1" (#2))}} \else \newcommand*{\GlsAddXdyAlphabet}[2]{% \glsnoxindywarning\GlsAddXdyAlphabet} \fi % \end{macrocode} %\end{macro} % % This code is only required for xindy: % \begin{macrocode} \ifglsxindy % \end{macrocode} % %\begin{macro}{\@gls@xdy@locationlist} %\changes{3.0}{2011/04/02}{new} % List of predefined location names. % \begin{macrocode} \newcommand*{\@gls@xdy@locationlist}{% roman-page-numbers,% Roman-page-numbers,% arabic-page-numbers,% alpha-page-numbers,% Alpha-page-numbers,% Appendix-page-numbers,% arabic-section-numbers% } % \end{macrocode} %\end{macro} % Each location class \meta{name} has the format stored in % \cs{@gls@xdy@Lclass@}\meta{name}. Set up predefined % formats. % %\begin{macro}{\@gls@xdy@Lclass@roman-page-numbers} % Lower case Roman numerals (i, ii, \ldots). In the event that % \ics{roman} has been redefined to produce a fancy form of % roman numerals, attempt to work out how it will be written % to the output file. % \begin{macrocode} \protected@edef\@gls@roman{\@roman{0\string" \string"roman-numbers-lowercase\string" :sep \string"}}% \@onelevel@sanitize\@gls@roman \edef\@tmp{\string" \string"roman-numbers-lowercase\string" :sep \string"}% \@onelevel@sanitize\@tmp \ifx\@tmp\@gls@roman \expandafter \edef\csname @gls@xdy@Lclass@roman-page-numbers\endcsname{% \string"roman-numbers-lowercase\string"% }% \else \expandafter \edef\csname @gls@xdy@Lclass@roman-page-numbers\endcsname{ :sep \string"\@gls@roman\string"% }% \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@xdy@Lclass@Roman-page-numbers} % Upper case Roman numerals (I, II, \ldots). % \begin{macrocode} \expandafter\def\csname @gls@xdy@Lclass@Roman-page-numbers\endcsname{% \string"roman-numbers-uppercase\string"% }% % \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@xdy@Lclass@arabic-page-numbers} % Arabic numbers (1, 2, \ldots). % \begin{macrocode} \expandafter\def\csname @gls@xdy@Lclass@arabic-page-numbers\endcsname{% \string"arabic-numbers\string"% }% % \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@xdy@Lclass@alpha-page-numbers} % Lower case alphabetical (a, b, \ldots). % \begin{macrocode} \expandafter\def\csname @gls@xdy@Lclass@alpha-page-numbers\endcsname{% \string"alpha\string"% }% % \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@xdy@Lclass@Alpha-page-numbers} % Upper case alphabetical (A, B, \ldots). % \begin{macrocode} \expandafter\def\csname @gls@xdy@Lclass@Alpha-page-numbers\endcsname{% \string"ALPHA\string"% }% % \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@xdy@Lclass@Appendix-page-numbers} % Appendix style locations (e.g.\ A-1, A-2, \ldots, B-1, B-2, % \ldots). The separator is given by \ics{@glsAlphacompositor}. % \begin{macrocode} \expandafter\def\csname @gls@xdy@Lclass@Appendix-page-numbers\endcsname{% \string"ALPHA\string" :sep \string"\@glsAlphacompositor\string" \string"arabic-numbers\string"% } % \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@xdy@Lclass@arabic-section-numbers} % Section number style locations (e.g.\ 1.1, 1.2, \ldots). The % compositor is given by \ics{glscompositor}. % \begin{macrocode} \expandafter\def\csname @gls@xdy@Lclass@arabic-section-numbers\endcsname{% \string"arabic-numbers\string" :sep \string"\glscompositor\string" \string"arabic-numbers\string"% }% % \end{macrocode} %\end{macro} % %\begin{macro}{\@xdyuserlocationdefs} % List of additional location definitions % (separated by "^^J") % \begin{macrocode} \def\@xdyuserlocationdefs{} % \end{macrocode} %\end{macro} %\begin{macro}{\@xdyuserlocationnames} % List of additional user location names % \begin{macrocode} \def\@xdyuserlocationnames{} % \end{macrocode} %\end{macro} % % End of xindy-only block: % \begin{macrocode} \fi % \end{macrocode} % %\begin{macro}{\GlsAddXdyLocation} % \cs{GlsAddXdyLocation}\oarg{prefix-loc}\marg{name}\marg{definition} % Define a new location called \meta{name}. The definition % must use \app{xindy} syntax. (Note that this doesn't % check to see if the location is already defined. That is left % to \app{xindy} to complain about.) % \begin{macrocode} \ifglsxindy \newcommand*{\GlsAddXdyLocation}[3][]{% \def\@gls@tmp{#1}% \ifx\@gls@tmp\@empty \edef\@xdyuserlocationdefs{% \@xdyuserlocationdefs ^^J% (define-location-class \string"#2\string"^^J\space\space \space(:sep \string"{}\glsopenbrace\string" #3 :sep \string"\glsclosebrace\string")) }% \else \edef\@xdyuserlocationdefs{% \@xdyuserlocationdefs ^^J% (define-location-class \string"#2\string"^^J\space\space \space(:sep "\glsopenbrace" #1 :sep "\glsclosebrace\glsopenbrace" #3 :sep "\glsclosebrace")) }% \fi \edef\@xdyuserlocationnames{% \@xdyuserlocationnames^^J\space\space\space \string"#1\string"}% } % \end{macrocode} % Only has an effect before \ics{writeist}: % \begin{macrocode} \@onlypremakeg\GlsAddXdyLocation \else \newcommand*{\GlsAddXdyLocation}[2]{% \glsnoxindywarning\GlsAddXdyLocation} \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\@xdylocationclassorder} % Define location class order % \begin{macrocode} \ifglsxindy \edef\@xdylocationclassorder{^^J\space\space\space \string"roman-page-numbers\string"^^J\space\space\space \string"arabic-page-numbers\string"^^J\space\space\space \string"arabic-section-numbers\string"^^J\space\space\space \string"alpha-page-numbers\string"^^J\space\space\space \string"Roman-page-numbers\string"^^J\space\space\space \string"Alpha-page-numbers\string"^^J\space\space\space \string"Appendix-page-numbers\string" \@xdyuserlocationnames^^J\space\space\space \string"see\string" } \fi % \end{macrocode} %\end{macro} % Change the location order. %\begin{macro}{\GlsSetXdyLocationClassOrder} % \begin{macrocode} \ifglsxindy \newcommand*\GlsSetXdyLocationClassOrder[1]{% \def\@xdylocationclassorder{#1}} \else \newcommand*\GlsSetXdyLocationClassOrder[1]{% \glsnoxindywarning\GlsSetXdyLocationClassOrder} \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\@xdysortrules} % Define sort rules % \begin{macrocode} \ifglsxindy \def\@xdysortrules{} \fi % \end{macrocode} %\end{macro} %\begin{macro}{\GlsAddSortRule} % Add a sort rule % \begin{macrocode} \ifglsxindy \newcommand*\GlsAddSortRule[2]{% \expandafter\toks@\expandafter{\@xdysortrules}% \protected@edef\@xdysortrules{\the\toks@ ^^J (sort-rule \string"#1\string" \string"#2\string")}% } \else \newcommand*\GlsAddSortRule[2]{% \glsnoxindywarning\GlsAddSortRule} \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\@xdyrequiredstyles} % Define list of required styles (this should be a comma-separated % list of \app{xindy} styles) % \begin{macrocode} \ifglsxindy \def\@xdyrequiredstyles{tex} \fi % \end{macrocode} %\end{macro} %\begin{macro}{\GlsAddXdyStyle} % Add a \app{xindy} style to the list of required styles % \begin{macrocode} \ifglsxindy \newcommand*\GlsAddXdyStyle[1]{% \edef\@xdyrequiredstyles{\@xdyrequiredstyles,#1}}% \else \newcommand*\GlsAddXdyStyle[1]{% \glsnoxindywarning\GlsAddXdyStyle} \fi % \end{macrocode} %\end{macro} %\begin{macro}{\GlsSetXdyStyles} % Reset the list of required styles % \begin{macrocode} \ifglsxindy \newcommand*\GlsSetXdyStyles[1]{% \edef\@xdyrequiredstyles{#1}} \else \newcommand*\GlsSetXdyStyles[1]{% \glsnoxindywarning\GlsSetXdyStyles} \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\findrootlanguage} % The root language name is required by \app{xindy}. This % information is for \app{makeglossaries} to pass to % \app{xindy}. Since \ics{languagename} only stores the % regional dialect rather than the root language name, some % trickery is required to determine the root language. % \begin{macrocode} \ifglsxindy \@ifpackageloaded{babel}{% % \end{macrocode} % Need to parse \texttt{babel.sty} to determine the root language. % This code was provided by Enrico~Gregorio. % \begin{macrocode} \def\findrootlanguage{\begingroup \escapechar=-1\relax % \end{macrocode} % normalize \cs{languagename} to category 12 chars % \begin{macrocode} \edef\languagename{% \expandafter\string\csname\languagename\endcsname}% % \end{macrocode} % disable \texttt{babel.sty} useless commands % \begin{macrocode} \def\NeedsTeXFormat##1[##2]{}% \def\ProvidesPackage##1[##2]{}% \let\LdfInit\relax \def\languageattribute##1##2{}% % \end{macrocode} % change the meaning of \cs{DeclareOption} % \begin{macrocode} \def\DeclareOption##1##2{% % \end{macrocode} % at \cs{DeclareOption*} we end % \begin{macrocode} \ifx##1*\expandafter\endinput\else % \end{macrocode} % else we build a string with the first argument % \begin{macrocode} \edef\testlanguage{\expandafter\string\csname##1\endcsname}% % \end{macrocode} % if \cs{testlanguage} and \cs{languagename} are the same % we execute the second argument % \begin{macrocode} \ifx\testlanguage\languagename##2\fi \fi} % \end{macrocode} % almost all options of babel are \cs{input}"{"\meta{name}".ldf}" % \begin{macrocode} \def\input##1{\stripldf##1}% % \end{macrocode} % we put the root language name in \ics{rootlanguagename} % \begin{macrocode} \def\stripldf##1.ldf{\gdef\rootlanguagename{##1}}% % \end{macrocode} % now input babel.sty, using the primitive \cs{input} % \begin{macrocode} \@@input babel.sty \endgroup}% }{% % \end{macrocode} % \isty{babel} hasn't been loaded, so check if \isty{ngerman} has % been loaded % \begin{macrocode} \@ifpackageloaded{ngerman}{% \def\findrootlanguage{% \def\rootlanguagename{german}}% }{% % \end{macrocode} % Neither \sty{babel} nor \sty{ngerman} have been loaded, so % assume the root language is English % \begin{macrocode} \def\findrootlanguage{% \def\rootlanguagename{english}}% }% }% \fi % \end{macrocode} %\end{macro} %\begin{macro}{\rootlanguagename} % Set default root language to English. % \begin{macrocode} \def\rootlanguagename{english} % \end{macrocode} %\end{macro} % %\begin{macro}{\@xdylanguage} % The \app{xindy} language setting is required by % \app{makeglossaries}, so provide a command for % \app{makeglossaries} to pick up the information % from the auxiliary file. This command is not needed by the % \sty{glossaries} package, so define it to ignore its arguments. % \begin{macrocode} \def\@xdylanguage#1#2{} % \end{macrocode} %\end{macro} % %\begin{macro}{\GlsSetXdyLanguage} % Define a command that allows the user to set the language % for a given glossary type. The first argument indicates the % glossary type. If omitted the main glossary is assumed. % \begin{macrocode} \ifglsxindy \newcommand*\GlsSetXdyLanguage[2][\glsdefaulttype]{% \ifglossaryexists{#1}{% \expandafter\def\csname @xdy@#1@language\endcsname{#2}% }{% \PackageError{glossaries}{Can't set language type for glossary type `#1' --- no such glossary}{% You have specified a glossary type that doesn't exist}}} \else \newcommand*\GlsSetXdyLanguage[2][]{% \glsnoxindywarning\GlsSetXdyLanguage} \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@codepage} % The \app{xindy} codepage setting is required by % \app{makeglossaries}, so provide a command for % \app{makeglossaries} to pick up the information % from the auxiliary file. This command is not needed by the % \sty{glossaries} package, so define it to ignore its arguments. % \begin{macrocode} \def\@gls@codepage#1#2{} % \end{macrocode} %\end{macro} % %\begin{macro}{\GlsSetXdyCodePage} % Define command to set the code page. % \begin{macrocode} \ifglsxindy \newcommand*{\GlsSetXdyCodePage}[1]{% \renewcommand*{\gls@codepage}{#1}% } \else \newcommand*{\GlsSetXdyCodePage}[1]{% \glsnoxindywarning\GlsSetXdyCodePage} \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\@xdylettergroups} % Store letter group definitions. % \begin{macrocode} \ifglsxindy \ifgls@xindy@glsnumbers \def\@xdylettergroups{(define-letter-group \string"glsnumbers\string"^^J\space\space\space :prefixes (\string"0\string" \string"1\string" \string"2\string" \string"3\string" \string"4\string" \string"5\string" \string"6\string" \string"7\string" \string"8\string" \string"9\string")^^J\space\space\space :before \string"\@glsfirstletter\string")} \else \def\@xdylettergroups{} \fi \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\GlsAddLetterGroup} % Add a new letter group. The first argument is the name % of the letter group. The second argument is the \app{xindy} % code specifying prefixes and ordering. % \begin{macrocode} \newcommand*\GlsAddLetterGroup[2]{% \expandafter\toks@\expandafter{\@xdylettergroups}% \protected@edef\@xdylettergroups{\the\toks@^^J% (define-letter-group \string"#1\string"^^J\space\space\space#2)}% }% % \end{macrocode} %\end{macro} % %\subsection{Loops and conditionals} %\begin{macro}{\forallglossaries} % To iterate through all glossaries (or comma-separated list of % glossary names given in optional argument) use:\\[10pt] % \cs{forallglossaries}\oarg{glossary list}\marg{cmd}\marg{code}\\[10pt] % where \meta{cmd} is % a control sequence which will be set to the name of the % glossary in the current iteration. %\changes{2.01}{2009 May 30}{replaced \cs{ifthenelse} with \cs{ifx}} % \begin{macrocode} \newcommand*{\forallglossaries}[3][\@glo@types]{% \@for#2:=#1\do{\ifx#2\@empty\else#3\fi}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\forglsentries} % To iterate through all entries in a given glossary use:\\[10pt] %\cs{forglsentries}\oarg{type}\marg{cmd}\marg{code}\\[10pt] %where \meta{type} is the glossary label and \meta{cmd} is a % control sequence which will be set to the entry label in the % current iteration. %\changes{2.01}{2009 May 30}{replaced \cs{ifthenelse} with \cs{ifx}} % \begin{macrocode} \newcommand*{\forglsentries}[3][\glsdefaulttype]{% \edef\@@glo@list{\csname glolist@#1\endcsname}% \@for#2:=\@@glo@list\do{\ifx#2\@empty\else#3\fi}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\forallglsentries} % To iterate through all glossary entries over all glossaries listed % in the optional argument (the default is all glossaries) use:\\[10pt] % \cs{forallglsentries}\oarg{glossary list}\marg{cmd}\marg{code}\\[10pt] % Within \cs{forallglsentries}, the current glossary type % is given by \cs{@@this@glo@}. % \begin{macrocode} \newcommand*{\forallglsentries}[3][\@glo@types]{% \expandafter\forallglossaries\expandafter[#1]{\@@this@glo@}{% \forglsentries[\@@this@glo@]{#2}{#3}}} % \end{macrocode} %\end{macro} % %\begin{macro}{\ifglossaryexists} % To check to see if a glossary exists use:\\[10pt] %\cs{ifglossaryexists}\marg{type}\marg{true-text}\marg{false-text}\\[10pt] %where \meta{type} is the glossary's label. %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \newcommand{\ifglossaryexists}[3]{% \ifcsundef{@glotype@#1@out}{#3}{#2}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\ifglsentryexists} % To check to see if a glossary entry has been defined use:\\[10pt] % \cs{ifglsentryexists}\marg{label}\marg{true text}\marg{false text}\\[10pt] %where \meta{label} is the entry's label. %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \newcommand{\ifglsentryexists}[3]{% \ifcsundef{glo@#1@name}{#3}{#2}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\ifglsused} % To determine if given glossary entry has been % used in the document text yet use:\\[10pt] % \cs{ifglsused}\marg{label}\marg{true text}\marg{false text}\\[10pt] % where \meta{label} is the entry's label. % If true it will do \meta{true text} % otherwise it will do \meta{false text}. % \begin{macrocode} \newcommand*{\ifglsused}[3]{\ifthenelse{\boolean{glo@#1@flag}}{#2}{#3}} % \end{macrocode} %\end{macro} %The following two commands will cause an error if the given % condition fails: % %\begin{macro}{\glsdoifexists} %\cs{glsdoifexists}\marg{label}\marg{code}\par % Generate an error if entry specified by \meta{label} doesn't % exists, otherwise do \meta{code}. % \begin{macrocode} \newcommand{\glsdoifexists}[2]{% \ifglsentryexists{#1}{#2}{% \PackageError{glossaries}{Glossary entry `#1' has not been defined}{You need to define a glossary entry before you can use it.}}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\glsdoifnoexists} %\cs{glsdoifnoexists}\marg{label}\marg{code}\par % The opposite: only do second argument if the entry doesn't % exists. Generate an error message if it exists. % \begin{macrocode} \newcommand{\glsdoifnoexists}[2]{% \ifglsentryexists{#1}{% \PackageError{glossaries}{Glossary entry `#1' has already been defined}{}}{#2}% } % \end{macrocode} %\end{macro} % %\subsection{Defining new glossaries}\label{sec:newglos} % A comma-separated list of glossary names is stored % in \cs{@glo@types}. When a new glossary type % is created, its identifying name is added to this list. % This is used by commands that iterate through all glossaries % (such as \ics{makeglossaries} and \ics{printglossaries}). %\begin{macro}{\@glo@types} % \begin{macrocode} \newcommand*{\@glo@types}{,} % \end{macrocode} %\end{macro} % % A new glossary type is defined using \cs{newglossary}. % Syntax:\\[10pt]\cs{newglossary}\oarg{log-ext}\marg{name}\marg{in-ext}\marg{out-ext}% %\marg{title}\oarg{counter}\\[10pt]% % where \meta{log-ext} is the extension of the \app{makeindex} % transcript file, \meta{in-ext} is the extension of the glossary % input file (read in by \ics{printglossary} and created by % \app{makeindex}), \meta{out-ext} is the extension of the % glossary output file which is read in by \app{makeindex} % (lines are written to this file by the \ics{glossary} command), % \meta{title} is the title of the glossary that is used in % \ics{glossarysection} and % \meta{counter} is the default counter to be used by entries % belonging to this glossary. The \app{makeglossaries} Perl % script reads in the relevant extensions from the auxiliary file, % and passes the appropriate file names and switches to % \app{makeindex}. %\begin{macro}{\newglossary} % \begin{macrocode} \newcommand*{\newglossary}[5][glg]{% \ifglossaryexists{#2}{% \PackageError{glossaries}{Glossary type `#2' already exists}{% You can't define a new glossary called `#2' because it already exists}% }{% % \end{macrocode} % Check if default has been set % \begin{macrocode} \ifx\glsdefaulttype\relax \gdef\glsdefaulttype{#2}% \fi % \end{macrocode} % Add this to the list of glossary types: % \begin{macrocode} \toks@{#2}\edef\@glo@types{\@glo@types\the\toks@,}% % \end{macrocode} % Define a comma-separated list of labels for this glossary type, % so that all the entries for this glossary can be reset with a % single command. When a new entry is created, its label is added % to this list. % \begin{macrocode} \expandafter\gdef\csname glolist@#2\endcsname{,}% % \end{macrocode} % Store details of this new glossary type: % \begin{macrocode} \expandafter\def\csname @glotype@#2@in\endcsname{#3}% \expandafter\def\csname @glotype@#2@out\endcsname{#4}% \expandafter\def\csname @glotype@#2@title\endcsname{#5}% \protected@write\@auxout{}{\string\@newglossary{#2}{#1}{#3}{#4}}% % \end{macrocode} % How to display this entry in the document text (uses % \cs{glsdisplay} and \cs{glsdisplayfirst} by % default). These can be redefined by the user later if required % (see \ics{defglsdisplay} and \ics{defglsdisplayfirst}). These % may already have been defined if this has been specified as % a list of acronyms. %\changes{2.04}{2009 November 10}{added check to determine if % \cs{gls@\meta{type}@display} and \cs{gls@\meta{type}@displayfirst} % have been defined.} %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \ifcsundef{gls@#2@display}% {% \expandafter\gdef\csname gls@#2@display\endcsname{\glsdisplay}% }% {}% \ifcsundef{gls@#2@displayfirst}% {% \expandafter\gdef\csname gls@#2@displayfirst\endcsname{% \glsdisplayfirst }% }% {}% % \end{macrocode} % Define sort counter if required: %\changes{3.0}{2011/04/02}{added \cs{@gls@defsortcount}} % \begin{macrocode} \@gls@defsortcount{#2}% % \end{macrocode} % Find out if the final optional argument has been specified, and % use it to set the counter associated with this glossary. (Uses % \ics{glscounter} if no optional argument is present.) % \begin{macrocode} \@ifnextchar[{\@gls@setcounter{#2}}% {\@gls@setcounter{#2}[\glscounter]}}% } % \end{macrocode} %\end{macro} %\begin{macro}{\altnewglossary} %\changes{2.06}{2010 June 14}{new} % \begin{macrocode} \newcommand*{\altnewglossary}[3]{% \newglossary[#2-glg]{#1}{#2-gls}{#2-glo}{#3}% } % \end{macrocode} %\end{macro} % Only define new glossaries in the preamble: % \begin{macrocode} \@onlypreamble{\newglossary} % \end{macrocode} % Only define new glossaries before \ics{makeglossaries} % \begin{macrocode} \@onlypremakeg\newglossary % \end{macrocode} %\cs{@newglossary} is used to specify the file extensions % for the \app{makeindex} input, output and transcript files. % It is written to the auxiliary file by \ics{newglossary}. % Since it is not used by \LaTeX, \cs{@newglossary} simply % ignores its arguments. %\begin{macro}{\@newglossary} % \begin{macrocode} \newcommand*{\@newglossary}[4]{} % \end{macrocode} %\end{macro} % Store counter to be used for given glossary type (the first % argument is the glossary label, the second argument is the name % of the counter): %\begin{macro}{\@gls@setcounter} % \begin{macrocode} \def\@gls@setcounter#1[#2]{% \expandafter\def\csname @glotype@#1@counter\endcsname{#2}% % \end{macrocode} % Add counter to xindy list, if not already added: % \begin{macrocode} \ifglsxindy \GlsAddXdyCounters{#2}% \fi } % \end{macrocode} %\end{macro} % Get counter associated with given glossary (the argument is % the glossary label): %\begin{macro}{\@gls@getcounter} % \begin{macrocode} \newcommand*{\@gls@getcounter}[1]{% \csname @glotype@#1@counter\endcsname} % \end{macrocode} %\end{macro} % % Define the main glossary. This will be the first glossary to % be displayed when using \ics{printglossaries}. % \begin{macrocode} \glsdefmain % \end{macrocode} % %\subsection{Defining new entries}\label{sec:newentry} % New glossary entries are defined using \cs{newglossaryentry}. % This command requires a label and a key-value list that defines % the relevant information for that entry. The definition for these % keys follows. Note that the \gloskey{name}, % \gloskey{description} and \gloskey{symbol} keys will be % sanitized later, depending on the value of the package option % \pkgopt{sanitize} (this means that if some of the keys haven't % been defined, they can be constructed from the \gloskey{name} % and \gloskey{description} key before they are sanitized). % % %\begin{key}{name} %The \gloskey{name} key indicates the name % of the term being defined. This is how the term will appear in % the glossary. The \gloskey{name} key is required when defining % a new glossary entry. % \begin{macrocode} \define@key{glossentry}{name}{% \def\@glo@name{#1}% } % \end{macrocode} %\end{key} % %\begin{key}{description} % The \gloskey{description} key is usually only used in % the glossary, but can be made to appear in the text by redefining % \ics{glsdisplay} and \ics{glsdisplayfirst} (or % using \ics{defglsdisplay} and \ics{defglsdisplayfirst}), however, % you will have to disable the sanitize option (using the % \pkgopt{sanitize} package option, % "sanitize={description=false}", and protect fragile % commands). The \gloskey{description} key is required when % defining a new glossary entry. (Be careful not to make the % description too long, because \app{makeindex} has a limited % buffer. \cs{@glo@desc} is defined to be a short command % to discourage lengthy descriptions % for this reason. If you do have a very long description, or if % you require paragraph breaks, define a separate command that % contains the description, and use it as the value to the % \gloskey{description} key.) % \begin{macrocode} \define@key{glossentry}{description}{% \def\@glo@desc{#1}% } % \end{macrocode} %\end{key} %\begin{key}{descriptionplural} % \changes{1.12}{2008 Mar 8}{new} % \begin{macrocode} \define@key{glossentry}{descriptionplural}{% \def\@glo@descplural{#1}% } % \end{macrocode} %\end{key} % %\begin{key}{sort} % The \gloskey{sort} key needs to be sanitized here % (the sort key is provided for \app{makeindex}'s benefit, % not for use in the document). The \gloskey{sort} key is optional % when defining a new glossary entry. If omitted, the value % is given by \meta{name} \meta{description}. %\changes{1.18}{2009 January 14}{moved sanitization to 'newglossaryentry} % \begin{macrocode} \define@key{glossentry}{sort}{% \def\@glo@sort{#1}} % \end{macrocode} %\end{key} % %\begin{key}{text} % The \gloskey{text} key determines how the term should appear when % used in the document (i.e.\ outside of the glossary). If omitted, % the value of the \gloskey{name} key is used instead. % \begin{macrocode} \define@key{glossentry}{text}{% \def\@glo@text{#1}% } % \end{macrocode} %\end{key} % %\begin{key}{plural} % The \gloskey{plural} key determines how the plural form of the term % should be displayed in the document. If omitted, the plural is % constructed by appending \ics{glspluralsuffix} to the value of the % \gloskey{text} key. % \begin{macrocode} \define@key{glossentry}{plural}{% \def\@glo@plural{#1}% } % \end{macrocode} %\end{key} % %\begin{key}{first} % The \gloskey{first} key determines how the entry should be displayed % in the document when it is first used. If omitted, it is taken % to be the same as the value of the \gloskey{text} key. % \begin{macrocode} \define@key{glossentry}{first}{% \def\@glo@first{#1}% } % \end{macrocode} %\end{key} % %\begin{key}{firstplural} % The \gloskey{firstplural} key is used to set the plural form for % first use, in the event that the plural is required the first % time the term is used. If omitted, it is constructed by % appending \ics{glspluralsuffix} to the value of the \gloskey{first} key. % \begin{macrocode} \define@key{glossentry}{firstplural}{% \def\@glo@firstplural{#1}% } % \end{macrocode} %\end{key} % %\begin{key}{symbol} % The \gloskey{symbol} key is ignored by most of the predefined % glossary styles, and defaults to \cs{relax} if omitted. % It is provided for glossary styles that require an associated % symbol, as well as a name and description. To make this value % appear in the glossary, you need to redefine % \ics{glossaryentryfield} so that it uses its fourth parameter. % If you want this value to appear in the text when the term is used % by commands like \ics{gls}, you will need to change % \ics{glsdisplay} and \ics{glsdisplayfirst} (either % explicitly for all glossaries or via \ics{defglsdisplay} % and \ics{defglsdisplayfirst} for individual glossaries). % \begin{macrocode} \define@key{glossentry}{symbol}{% \def\@glo@symbol{#1}% } % \end{macrocode} %\end{key} %\begin{key}{symbolplural} % \changes{1.12}{2008 Mar 8}{new} % \begin{macrocode} \define@key{glossentry}{symbolplural}{% \def\@glo@symbolplural{#1}% } % \end{macrocode} %\end{key} % %\begin{key}{type} % The \gloskey{type} key specifies to which glossary this % entry belongs. If omitted, the default glossary is used. % \begin{macrocode} \define@key{glossentry}{type}{% \def\@glo@type{#1}} % \end{macrocode} %\end{key} % %\begin{key}{counter} % The \gloskey{counter} key specifies the name of the counter % associated with this glossary entry: %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \define@key{glossentry}{counter}{% \ifcsundef{c@#1}% {% \PackageError{glossaries}% {There is no counter called `#1'}% {% The counter key should have the name of a valid counter as its value% }% }% {% \def\@glo@counter{#1}% }% } % \end{macrocode} %\end{key} % %\begin{key}{see} % The \gloskey{see} key specifies a list of cross-references % \changes{1.17}{2008 December 26}{new} % \changes{3.0}{2011/04/02}{added \cs{@glo@seeautonumberlist}} % \begin{macrocode} \define@key{glossentry}{see}{% \def\@glo@see{#1}% \@glo@seeautonumberlist } % \end{macrocode} %\end{key} % %\begin{key}{parent} % The \gloskey{parent} key specifies the parent entry, if % required. % \changes{1.17}{2008 December 26}{new} % \begin{macrocode} \define@key{glossentry}{parent}{% \def\@glo@parent{#1}} % \end{macrocode} %\end{key} % %\begin{key}{nonumberlist} % The \gloskey{nonumberlist} key suppresses or activates the number list % for the given entry. % \changes{1.17}{2008 December 26}{new} %\changes{3.0}{2011/04/02}{now boolean} % \begin{macrocode} \define@choicekey{glossentry}{nonumberlist}[\val\nr]{true,false}[true]{% \ifcase\nr\relax \def\@glo@prefix{\glsnonextpages}% \else \def\@glo@prefix{\glsnextpages}% \fi } % \end{macrocode} %\end{key} % % Define some generic user keys. (6 ought to be enough!) %\begin{key}{user1} % \begin{macrocode} \define@key{glossentry}{user1}{% \def\@glo@useri{#1}% } % \end{macrocode} %\end{key} % %\begin{key}{user2} % \begin{macrocode} \define@key{glossentry}{user2}{% \def\@glo@userii{#1}% } % \end{macrocode} %\end{key} % %\begin{key}{user3} % \begin{macrocode} \define@key{glossentry}{user3}{% \def\@glo@useriii{#1}% } % \end{macrocode} %\end{key} % %\begin{key}{user4} % \begin{macrocode} \define@key{glossentry}{user4}{% \def\@glo@useriv{#1}% } % \end{macrocode} %\end{key} % %\begin{key}{user5} % \begin{macrocode} \define@key{glossentry}{user5}{% \def\@glo@userv{#1}% } % \end{macrocode} %\end{key} % %\begin{key}{user6} % \begin{macrocode} \define@key{glossentry}{user6}{% \def\@glo@uservi{#1}% } % \end{macrocode} %\end{key} % %\begin{key}{short} %\changes{3.0}{2011/04/02}{new} % This key is provided for use by \ics{newacronym}. It's not % designed for general purpose use, so isn't described in the user % manual. % \begin{macrocode} \define@key{glossentry}{short}{% \def\@glo@short{#1}% } % \end{macrocode} %\end{key} % %\begin{key}{shortplural} %\changes{3.0}{2011/04/02}{new} % This key is provided for use by \ics{newacronym}. % \begin{macrocode} \define@key{glossentry}{shortplural}{% \def\@glo@shortpl{#1}% } % \end{macrocode} %\end{key} % %\begin{key}{long} %\changes{3.0}{2011/04/02}{new} % This key is provided for use by \ics{newacronym}. % \begin{macrocode} \define@key{glossentry}{long}{% \def\@glo@long{#1}% } % \end{macrocode} %\end{key} % %\begin{key}{longplural} %\changes{3.0}{2011/04/02}{new} % This key is provided for use by \ics{newacronym}. % \begin{macrocode} \define@key{glossentry}{longplural}{% \def\@glo@longpl{#1}% } % \end{macrocode} %\end{key} % %\begin{macro}{\@glsnoname} % \changes{1.17}{2008 December 26}{new} % Define command to generate error if \gloskey{name} key is missing. % \begin{macrocode} \newcommand*{\@glsnoname}{% \PackageError{glossaries}{name key required in \string\newglossaryentry\space for entry `\@glo@label'}{You haven't specified the entry name}} % \end{macrocode} %\end{macro} %\begin{macro}{\@glsdefaultplural} % Define command to set default plural. % \changes{1.17}{2008 December 26}{new} % \begin{macrocode} \newcommand*{\@glsdefaultplural}{\@glo@text\glspluralsuffix} % \end{macrocode} %\end{macro} % %\begin{macro}{\@glsdefaultsort} % Define command to set default sort. % \changes{1.17}{2008 December 26}{new} % \begin{macrocode} \newcommand*{\@glsdefaultsort}{\@glo@name} % \end{macrocode} %\end{macro} % %\begin{macro}{\gls@level} % Register to increment entry levels. % \begin{macrocode} \newcount\gls@level % \end{macrocode} %\end{macro} % %\begin{macro}{\newglossaryentry} % Define \cs{newglossaryentry}% % \marg{label} \marg{key-val list}. % There are two required fields in \meta{key-val list}: % \gloskey{name} (or \gloskey{parent}) and % \gloskey{description}. (See above.) %\changes{3.0}{2011/04/02}{replaced \cs{DeclareRobustCommand} with %\cs{newrobustcmd}} % \begin{macrocode} \newrobustcmd{\newglossaryentry}[2]{% % \end{macrocode} % Check to see if this glossary entry has already been defined: % \begin{macrocode} \glsdoifnoexists{#1}{% % \end{macrocode} % Store label % \begin{macrocode} \def\@glo@label{#1}% % \end{macrocode} % Set up defaults. If the \gloskey{name} or \gloskey{description} % keys are omitted, an error will be generated. % \begin{macrocode} \let\@glo@name\@glsnoname % \end{macrocode} %\changes{1.08}{2007 Oct 13}{Fixed error message to say ``description %key'' rather than ``desc key''} % \begin{macrocode} \def\@glo@desc{\PackageError{glossaries}{description key required in \string\newglossaryentry\space for entry `\@glo@label'}{You haven't specified the entry description}}% % \end{macrocode} % \changes{1.12}{2008 Mar 8}{descriptionplural support added} % \begin{macrocode} \def\@glo@descplural{\@glo@desc}% % \end{macrocode} % \begin{macrocode} \def\@glo@type{\glsdefaulttype}% \def\@glo@symbol{\relax}% % \end{macrocode} % \changes{1.12}{2008 Mar 8}{symbolplural support added} % \begin{macrocode} \def\@glo@symbolplural{\@glo@symbol}% % \end{macrocode} % \begin{macrocode} \def\@glo@text{\@glo@name}% % \end{macrocode} % \begin{macrocode} \let\@glo@plural\@glsdefaultplural % \end{macrocode} % \changes{1.13}{2008 May 10}{Changed default first value} % Using \cs{let} instead of \cs{def} to make later comparison % avoid expansion issues. (Thanks to Ulrich~Diez for suggesting % this.) % \changes{1.16}{2008 August 27}{Changed def to let} % \begin{macrocode} \let\@glo@first\relax % \end{macrocode} % \changes{1.12}{2008 Mar 8}{Changed default first plural to be first % key with s appended (was text key with s appended)} % \changes{1.13}{2008 May 10}{Changed default firstplural value} % \begin{macrocode} \let\@glo@firstplural\relax % \end{macrocode} % Set the default sort: %\changes{1.05}{2007 Aug 10}{Changed the default value of the sort % key to just the value of the name key}% %\changes{1.18}{2009 January 14}{Changed default value of sort % to '@glsdefaultsort} % \begin{macrocode} \let\@glo@sort\@glsdefaultsort % \end{macrocode} % Set the default counter: % \begin{macrocode} \def\@glo@counter{\@gls@getcounter{\@glo@type}}% % \end{macrocode} %\changes{1.17}{2008 December 26}{added see key} % \begin{macrocode} \def\@glo@see{}% % \end{macrocode} %\changes{1.17}{2008 December 26}{added parent key} % \begin{macrocode} \def\@glo@parent{}% % \end{macrocode} %\changes{1.17}{2008 December 26}{added nonumberlist key} % \begin{macrocode} \def\@glo@prefix{}% % \end{macrocode} %\changes{2.04}{2009 November 10}{added user1-6 keys} % \begin{macrocode} \def\@glo@useri{}% \def\@glo@userii{}% \def\@glo@useriii{}% \def\@glo@useriv{}% \def\@glo@userv{}% \def\@glo@uservi{}% % \end{macrocode} %\changes{3.0}{2011/04/02}{added short and long keys} % \begin{macrocode} \def\@glo@short{}% \def\@glo@shortpl{}% \def\@glo@long{}% \def\@glo@longpl{}% % \end{macrocode} % Add start hook in case another package wants to add extra keys. % \begin{macrocode} \@newglossaryentryprehook % \end{macrocode} % Extract key-val information from third parameter: % \begin{macrocode} \setkeys{glossentry}{#2}% % \end{macrocode} % Check to see if this glossary type has been defined, if it has, % add this label to the relevant list, otherwise generate an error. %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \ifcsundef{glolist@\@glo@type}% {% \PackageError{glossaries}% {Glossary type '\@glo@type' has not been defined}% {You need to define a new glossary type, before making entries in it}% }% {% \protected@edef\@glolist@{\csname glolist@\@glo@type\endcsname}% \expandafter\xdef\csname glolist@\@glo@type\endcsname{\@glolist@{#1},}% }% % \end{macrocode} % Initialise level to 0. % \begin{macrocode} \gls@level=0\relax % \end{macrocode} % Has this entry been assigned a parent? % \begin{macrocode} \ifx\@glo@parent\@empty % \end{macrocode} % Doesn't have a parent. Set \cs{glo@}\meta{label}"@parent" to % empty. % \begin{macrocode} \expandafter\gdef\csname glo@#1@parent\endcsname{}% \else % \end{macrocode} % Has a parent. Check to ensure this entry isn't its own parent. % \begin{macrocode} \ifthenelse{\equal{#1}{\@glo@parent}}{% \PackageError{glossaries}{Entry `#1' can't be its own parent}{}% \def\@glo@parent{}% \expandafter\gdef\csname glo@#1@parent\endcsname{}% }{% % \end{macrocode} % Check the parent exists: % \begin{macrocode} \ifglsentryexists{\@glo@parent}{% % \end{macrocode} % Parent exists. Set \cs{glo@}\meta{label}"@parent". % \begin{macrocode} \expandafter\xdef\csname glo@#1@parent\endcsname{\@glo@parent}% % \end{macrocode} % Determine level. % \begin{macrocode} \gls@level=\csname glo@\@glo@parent @level\endcsname\relax \advance\gls@level by 1\relax % \end{macrocode} % If name hasn't been specified, use same as the parent name % \begin{macrocode} \ifx\@glo@name\@glsnoname \expandafter\let\expandafter\@glo@name \csname glo@\@glo@parent @name\endcsname % \end{macrocode} % If name and plural haven't been specified, use same as the parent % \begin{macrocode} \ifx\@glo@plural\@glsdefaultplural \expandafter\let\expandafter\@glo@plural \csname glo@\@glo@parent @plural\endcsname \fi \fi }{% % \end{macrocode} % Parent doesn't exist, so issue an error message and change this % entry to have no parent % \begin{macrocode} \PackageError{glossaries}{Invalid parent `\@glo@parent' for entry `#1' - parent doesn't exist}{Parent entries must be defined before their children}% \def\@glo@parent{}% \expandafter\gdef\csname glo@#1@parent\endcsname{}% }% }% \fi % \end{macrocode} % Set the level for this entry % \begin{macrocode} \expandafter\xdef\csname glo@#1@level\endcsname{\number\gls@level}% % \end{macrocode} % Check if \gloskey{first} and \gloskey{firstplural} have been use. % If \gloskey{firstplural} hasn't been specified, but \gloskey{first} % has been specified, then form \gloskey{firstplural} by appending % \cs{glspluralsuffix} to value of \gloskey{first} key, otherwise % obtain the value from the \gloskey{plural} key. % \changes{1.16}{2008 August 27}{Changed if to ifx} % This now uses \cs{ifx} instead of \cs{if} to avoid expansion % issues. (Thanks to Ulrich~Diez for suggesting this.) % \begin{macrocode} \ifx\relax\@glo@firstplural \ifx\relax\@glo@first \def\@glo@firstplural{\@glo@plural}% \def\@glo@first{\@glo@text}% \else \def\@glo@firstplural{\@glo@first\glspluralsuffix}% \fi \else \ifx\relax\@glo@first \def\@glo@first{\@glo@text}% \fi \fi % \end{macrocode} % Define commands associated with this entry: % \begin{macrocode} \expandafter \protected@xdef\csname glo@#1@text\endcsname{\@glo@text}% \expandafter \protected@xdef\csname glo@#1@plural\endcsname{\@glo@plural}% \expandafter \protected@xdef\csname glo@#1@first\endcsname{\@glo@first}% \expandafter \protected@xdef\csname glo@#1@firstpl\endcsname{\@glo@firstplural}% \expandafter \protected@xdef\csname glo@#1@type\endcsname{\@glo@type}% \expandafter \protected@xdef\csname glo@#1@counter\endcsname{\@glo@counter}% \expandafter \protected@xdef\csname glo@#1@useri\endcsname{\@glo@useri}% \expandafter \protected@xdef\csname glo@#1@userii\endcsname{\@glo@userii}% \expandafter \protected@xdef\csname glo@#1@useriii\endcsname{\@glo@useriii}% \expandafter \protected@xdef\csname glo@#1@useriv\endcsname{\@glo@useriv}% \expandafter \protected@xdef\csname glo@#1@userv\endcsname{\@glo@userv}% \expandafter \protected@xdef\csname glo@#1@uservi\endcsname{\@glo@uservi}% \expandafter \protected@xdef\csname glo@#1@short\endcsname{\@glo@short}% \expandafter \protected@xdef\csname glo@#1@shortpl\endcsname{\@glo@shortpl}% \expandafter \protected@xdef\csname glo@#1@long\endcsname{\@glo@long}% \expandafter \protected@xdef\csname glo@#1@longpl\endcsname{\@glo@longpl}% \@gls@sanitizename \expandafter\protected@xdef\csname glo@#1@name\endcsname{\@glo@name}% % \end{macrocode} % The smaller and smallcaps options set the description to % \cs{@glo@first}. Need to check for this, otherwise it won't get % expanded if the description gets sanitized. %\changes{1.15}{2008 August 15}{check for '@glo@first in description}% % \begin{macrocode} \def\@glo@@desc{\@glo@first}% \ifx\@glo@desc\@glo@@desc \let\@glo@desc\@glo@first \fi \@gls@sanitizedesc \expandafter\protected@xdef\csname glo@#1@desc\endcsname{\@glo@desc}% \expandafter\protected@xdef\csname glo@#1@descplural\endcsname{\@glo@descplural}% % \end{macrocode} %\changes{1.18}{2009 January 14}{moved sort sanitization to % 'newglossaryentry} %\changes{3.0}{2011/04/02}{added \cs{@gls@defsort}} % Set the sort key for this entry: % \begin{macrocode} \@gls@defsort{\@glo@type}{#1}% % \end{macrocode} %\changes{1.15}{2008 August 15}{check for '@glo@text in symbol}% % \begin{macrocode} \def\@glo@@symbol{\@glo@text}% \ifx\@glo@symbol\@glo@@symbol \let\@glo@symbol\@glo@text \fi \@gls@sanitizesymbol \expandafter\protected@xdef\csname glo@#1@symbol\endcsname{\@glo@symbol}% \expandafter\protected@xdef\csname glo@#1@symbolplural\endcsname{\@glo@symbolplural}% % \end{macrocode} % Define an associated boolean variable to determine whether this % entry has been used yet (needs to be defined globally): % \begin{macrocode} \expandafter\gdef\csname glo@#1@flagfalse\endcsname{% \expandafter\global\expandafter \let\csname ifglo@#1@flag\endcsname\iffalse}% \expandafter\gdef\csname glo@#1@flagtrue\endcsname{% \expandafter\global\expandafter \let\csname ifglo@#1@flag\endcsname\iftrue}% \csname glo@#1@flagfalse\endcsname % \end{macrocode} % Sort out any cross-referencing if required. % \begin{macrocode} \ifx\@glo@see\@empty \else \protected@edef\@do@glssee{% \noexpand\@gls@fixbraces\noexpand\@glo@list\@glo@see \noexpand\@nil \noexpand\expandafter\noexpand\@glssee\noexpand\@glo@list{#1}}% \@do@glssee \fi }% % \end{macrocode} % Determine and store main part of the entry's index format. %\changes{1.17}{2008 December 26}{Stored main part of entry % format when entry % is defined}% % \begin{macrocode} \do@glo@storeentry{#1}% % \end{macrocode} % Add end hook in case another package wants to add extra keys. % \begin{macrocode} \@newglossaryentryposthook } % \end{macrocode} %\changes{1.13}{2008 May 10}{Removed restriction on only using % 'newglossaryentry in the preamble} %\end{macro} %\begin{macro}{\@newglossaryentryprehook} % Allow extra information to be added to glossary entries: %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\@newglossaryentryprehook}{} % \end{macrocode} %\end{macro} %\begin{macro}{\@newglossaryentryposthook} % Allow extra information to be added to glossary entries: %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\@newglossaryentryposthook}{} % \end{macrocode} %\end{macro} %\begin{macro}{\@glossaryentryfield} % Indicate what command should be used to display each entry in % the glossary. (This enables the \sty{glossaries-accsupp} package % to use \cs{accsuppglossaryentryfield} instead.) %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \ifglsxindy \newcommand*{\@glossaryentryfield}{\string\\glossaryentryfield} \else \newcommand*{\@glossaryentryfield}{\string\glossaryentryfield} \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\@glossarysubentryfield} % Indicate what command should be used to display each subentry in % the glossary. (This enables the \sty{glossaries-accsupp} package % to use \cs{accsuppglossarysubentryfield} instead.) %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \ifglsxindy \newcommand*{\@glossarysubentryfield}{% \string\\glossarysubentryfield} \else \newcommand*{\@glossarysubentryfield}{% \string\glossarysubentryfield} \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\@glo@storeentry} %\changes{1.17}{2008 December 26}{new} % Determine the format to write the entry in the glossary % output (\filetype{.glo}) file. % The argument is the entry's label. % The result is stored in \cs{glo@}\meta{label}"@entry", where % \meta{label} is the entry's label. (This doesn't include % any formatting or location information.) % \begin{macrocode} \newcommand{\@glo@storeentry}[1]{% % \end{macrocode} % Get the sort string and escape any special characters % \begin{macrocode} \protected@edef\@glo@sort{\csname glo@#1@sort\endcsname}% \@gls@checkmkidxchars\@glo@sort % \end{macrocode} % Same again for the name string. % \begin{macrocode} \protected@edef\@@glo@name{\csname glo@#1@name\endcsname}% \@gls@checkmkidxchars\@@glo@name % \end{macrocode} % Add the font command. (The backslash needs to be escaped for % \app{xindy}.) % \begin{macrocode} \ifglsxindy \protected@edef\@glo@name{\string\\glsnamefont{\@@glo@name}}% \else \protected@edef\@glo@name{\string\glsnamefont{\@@glo@name}}% \fi % \end{macrocode} % Get the description string and escape any special characters % \begin{macrocode} \protected@edef\@glo@desc{\csname glo@#1@desc\endcsname}% \@gls@checkmkidxchars\@glo@desc % \end{macrocode} % Same again for the symbol % \begin{macrocode} \protected@edef\@glo@symbol{\csname glo@#1@symbol\endcsname}% \@gls@checkmkidxchars\@glo@symbol % \end{macrocode} % Escape any special characters in the prefix % \begin{macrocode} \@gls@checkmkidxchars\@glo@prefix % \end{macrocode} % Get the parent, if one exists % \begin{macrocode} \edef\@glo@parent{\csname glo@#1@parent\endcsname}% % \end{macrocode} % Write the information to the glossary file. % \begin{macrocode} \ifglsxindy % \end{macrocode} % Store using \app{xindy} syntax. % \begin{macrocode} \ifx\@glo@parent\@empty % \end{macrocode} % Entry doesn't have a parent % \begin{macrocode} \expandafter\protected@xdef\csname glo@#1@index\endcsname{% (\string"\@glo@sort\string" % \string"\@glo@prefix\@glossaryentryfield{#1}{\@glo@name }{\@glo@desc}{\@glo@symbol}\string") % }% \else % \end{macrocode} % Entry has a parent % \begin{macrocode} \expandafter\protected@xdef\csname glo@#1@index\endcsname{% \csname glo@\@glo@parent @index\endcsname (\string"\@glo@sort\string" % \string"\@glo@prefix\@glossarysubentryfield% {\csname glo@#1@level\endcsname}{#1}{\@glo@name }{\@glo@desc}{\@glo@symbol}\string") % }% \fi \else % \end{macrocode} % Store using \app{makeindex} syntax. % \begin{macrocode} \ifx\@glo@parent\@empty % \end{macrocode} % Sanitize \cs{@glo@prefix} % \begin{macrocode} \@onelevel@sanitize\@glo@prefix % \end{macrocode} % Entry doesn't have a parent % \begin{macrocode} \expandafter\protected@xdef\csname glo@#1@index\endcsname{% \@glo@sort\@gls@actualchar\@glo@prefix \@glossaryentryfield{#1}{\@glo@name}{\@glo@desc }{\@glo@symbol}% }% \else % \end{macrocode} % Entry has a parent % \begin{macrocode} \expandafter\protected@xdef\csname glo@#1@index\endcsname{% \csname glo@\@glo@parent @index\endcsname\@gls@levelchar \@glo@sort\@gls@actualchar\@glo@prefix \@glossarysubentryfield {\csname glo@#1@level\endcsname}{#1}{\@glo@name}{\@glo@desc }{\@glo@symbol}% }% \fi \fi } % \end{macrocode} %\end{macro} % %\subsection{Resetting and unsetting entry flags} % Each glossary entry is assigned a conditional of the form %\cs{ifglo@}\meta{label}\texttt{@flag} which determines % whether or not the entry has been used (see also % \ics{ifglsused} defined below). These flags can % be set and unset using the following macros: % % The command \cs{glsreset}\marg{label} can be used % to set the entry flag to indicate that it hasn't been used yet. The % required argument is the entry label. %\begin{macro}{\glsreset} % \begin{macrocode} \newcommand*{\glsreset}[1]{% \glsdoifexists{#1}{% \expandafter\global\csname glo@#1@flagfalse\endcsname}} % \end{macrocode} %\end{macro} % As above, but with only a local effect: %\begin{macro}{\glslocalreset} % \begin{macrocode} \newcommand*{\glslocalreset}[1]{% \glsdoifexists{#1}{% \expandafter\let\csname ifglo@#1@flag\endcsname\iffalse}} % \end{macrocode} %\end{macro} % The command \cs{glsunset}\marg{label} can be used to % set the entry flag to indicate that it has been used. The required % argument is the entry label. %\begin{macro}{\glsunset} % \begin{macrocode} \newcommand*{\glsunset}[1]{% \glsdoifexists{#1}{% \expandafter\global\csname glo@#1@flagtrue\endcsname}} % \end{macrocode} %\end{macro} % As above, but with only a local effect: %\begin{macro}{\glslocalunset} % \begin{macrocode} \newcommand*{\glslocalunset}[1]{% \glsdoifexists{#1}{% \expandafter\let\csname ifglo@#1@flag\endcsname\iftrue}} % \end{macrocode} %\end{macro} % Reset all entries for the named glossaries (supplied in a % comma-separated list). % Syntax: \cs{glsresetall}\oarg{glossary-list} %\begin{macro}{\glsresetall} % \begin{macrocode} \newcommand*{\glsresetall}[1][\@glo@types]{% \forallglsentries[#1]{\@glsentry}{% \glsreset{\@glsentry}}} % \end{macrocode} %\end{macro} % As above, but with only a local effect: %\begin{macro}{\glslocalresetall} % \begin{macrocode} \newcommand*{\glslocalresetall}[1][\@glo@types]{% \forallglsentries[#1]{\@glsentry}{% \glslocalreset{\@glsentry}}} % \end{macrocode} %\end{macro} % Unset all entries for the named glossaries (supplied in a % comma-separated list). % Syntax: \cs{glsunsetall}\oarg{glossary-list} %\begin{macro}{\glsunsetall} % \begin{macrocode} \newcommand*{\glsunsetall}[1][\@glo@types]{% \forallglsentries[#1]{\@glsentry}{% \glsunset{\@glsentry}}} % \end{macrocode} %\end{macro} % As above, but with only a local effect: %\begin{macro}{\glslocalunsetall} % \begin{macrocode} \newcommand*{\glslocalunsetall}[1][\@glo@types]{% \forallglsentries[#1]{\@glsentry}{% \glslocalunset{\@glsentry}}} % \end{macrocode} %\end{macro} % % \subsection{Loading files containing glossary entries} %\label{sec:load} % Glossary entries can be defined in an external file. % These external files can contain \ics{newglossaryentry} % and \ics{newacronym} commands.\footnote{and any other valid %\LaTeX\ code that can be used in the preamble.}\\[10pt] % \cs{loadglsentries}\oarg{type}\marg{filename}\\[10pt] % This command will input the file using \cs{input}. % The optional argument specifies to which glossary the % entries should be assigned if they haven't used the \gloskey{type} % key. If the optional argument is not specified, the default % glossary is used. Only those entries used in the document (via % \ics{glslink}, \ics{gls}, \ics{glspl} and uppercase % variants or \ics{glsadd} and \ics{glsaddall} % will appear in the glossary). The mandatory argument is % the filename (with or without .tex extension). %\begin{macro}{\loadglsentries} % \begin{macrocode} \newcommand*{\loadglsentries}[2][\@gls@default]{% \let\@gls@default\glsdefaulttype \def\glsdefaulttype{#1}\input{#2}% \let\glsdefaulttype\@gls@default} % \end{macrocode} %\end{macro} % \cs{loadglsentries} can only be used in the preamble: % \begin{macrocode} \@onlypreamble{\loadglsentries} % \end{macrocode} % %\subsection{Using glossary entries in the text} %\label{sec:code:glslink} % % Any term that has been defined using \ics{newglossaryentry} % (or \ics{newacronym}) can be displayed in the text % (i.e.\ outside of the glossary) using % one of the commands defined in this section. Unless you use % \ics{glslink}, the way the term appears in the text is % determined by \ics{glsdisplayfirst} (if it is the first % time the term has been used) or \ics{glsdisplay} (for % subsequent use). Any formatting commands (such as \cs{textbf} % is governed by \ics{glstextformat}. By default this just % displays the \term{link text} ``as is''. %\changes{1.04}{2007 Aug 3}{Added 'glstextformat}% %\begin{macro}{\glstextformat} % \begin{macrocode} \newcommand*{\glstextformat}[1]{#1} % \end{macrocode} %\end{macro} % % The first time an entry is used, the way in which it is % displayed is governed by \cs{glsdisplayfirst}. This % takes four parameters: \verb|#1| will be the value % of the entry's \gloskey{first} or \gloskey{firstplural} key, % \verb|#2| will be the value of the entry's \gloskey{description} % key, \verb|#3| will be the value of the entry's \gloskey{symbol} % key and \verb|#4| is additional text supplied by the final optional % argument to commands like \ics{gls} and \ics{glspl}. % The default is to display the first parameter followed by the % additional text. %\begin{macro}{\glsdisplayfirst} % \begin{macrocode} \newcommand*{\glsdisplayfirst}[4]{#1#4} % \end{macrocode} %\end{macro} % % After the first use, the entry is displayed according to % the format of \cs{glsdisplay}. Again, it takes four % parameters: \verb|#1| will be the value of the % entry's \gloskey{text} or \gloskey{plural} key, % \verb|#2| will be the value of the entry's \gloskey{description} % key, \verb|#3| will be the value of the entry's \gloskey{symbol} % key and \verb|#4| is additional text supplied by the final optional % argument to commands like \ics{gls} and \ics{glspl}. %\begin{macro}{\glsdisplay} % \begin{macrocode} \newcommand*{\glsdisplay}[4]{#1#4} % \end{macrocode} %\end{macro} % % When a new glossary is created it uses \cs{glsdisplayfirst} % and \cs{glsdisplay} as the default way of displaying its % entry in the text. This can be changed for the entries belonging % to an individual glossary using % \ics{defglsdisplay} and \ics{defglsdisplayfirst}. %\\[10pt] % \cs{defglsdisplay}\oarg{type}\marg{definition}\\[10pt]% % The glossary type is given by \meta{type} (the default glossary % if omitted) and % \meta{definition} should have at most \verb|#1|, \verb|#2|, % \verb|#3| and \verb|#4|. These represent the same arguments % as those described for \ics{glsdisplay}. %\begin{macro}{\defglsdisplay} % \begin{macrocode} \newcommand*{\defglsdisplay}[2][\glsdefaulttype]{% \expandafter\def\csname gls@#1@display\endcsname##1##2##3##4{#2}} % \end{macrocode} %\end{macro} %\vskip5pt % \cs{defglsdisplayfirst}\oarg{type}\marg{definition}\\[10pt]% % The glossary type is given by \meta{type} (the default glossary % if omitted) and % \meta{definition} should have at most \verb|#1|, \verb|#2|, % \verb|#3| and \verb|#4|. These represent the same arguments % as those described for \ics{glsdisplayfirst}. %\begin{macro}{\defglsdisplayfirst} % \begin{macrocode} \newcommand*{\defglsdisplayfirst}[2][\glsdefaulttype]{% \expandafter\def\csname gls@#1@displayfirst\endcsname##1##2##3##4{#2}} % \end{macrocode} %\end{macro} % %\subsubsection{Links to glossary entries} % The links to glossary entries all have a first optional % argument that can be used to change the format and counter % of the associated entry number. Except for \cs{glslink}, % the commands like \cs{gls} have a final optional % argument that can be used to insert additional text in the % link (this will usually be appended, but can be redefined using % \ics{defglsdisplay} and \ics{defglsdisplayfirst}). % It goes against the \LaTeX\ norm to have an optional % argument after the mandatory arguments, but it makes more % sense to write, say, \verb|\gls{label}['s]| rather than, say, % \verb|\gls[append='s]{label}|. Since these control sequences % are defined to include the final square bracket, spaces % will be ignored after them. This is likely to lead to % confusion as most users would not expect, say, "\gls{"\meta{label}"}" % to ignore following spaces, so \cs{new@ifnextchar} from the % \isty{amsgen} package is required. % % The following keys can be used in the first optional % argument. The \gloskey[glslink]{counter} key checks that the % value is the name of a valid counter. %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \define@key{glslink}{counter}{% \ifcsundef{c@#1}% {% \PackageError{glossaries}% {There is no counter called `#1'}% {% The counter key should have the name of a valid counter as its value% }% }% {% \def\@gls@counter{#1}% }% } % \end{macrocode} % The value of the \gloskey[glslink]{format} key should be the name of a % command (without the initial backslash) that has a single mandatory % argument which can be used to format the associated entry % number. % \begin{macrocode} \define@key{glslink}{format}{% \def\@glsnumberformat{#1}} % \end{macrocode} % The \gloskey[glslink]{hyper} key is a boolean key, it can either have the % value true or false, and indicates whether or not to make a % hyperlink to the relevant glossary entry. If hyper is false, an % entry will still be made in the glossary, but the given text % won't be a hyperlink. % \begin{macrocode} \define@boolkey{glslink}{hyper}[true]{} % \end{macrocode} % %Syntax:\\[10pt] % \cs{glslink}\oarg{options}\marg{label}\marg{text} %\\[10pt] % Display \meta{text} in the document, and add the entry information % for \meta{label} into the relevant glossary. The optional % argument should be a key value list using the \texttt{glslink} % keys defined above. % % There is also a starred version:\\[10pt] % \cs{glslink*}\oarg{options}\marg{label}\marg{text}\\[10pt] % which is equivalent to % \cs{glslink}"[hyper=false,"\meta{options}"]"\marg{label}\marg{text} % % First determine whether or not we are using the starred version: %\begin{macro}{\glslink} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\glslink}{% \@ifstar\@sgls@link\@gls@@link} % \end{macrocode} %\end{macro} %\begin{macro}{\@sgls@link} % The starred version of \cs{glslink} calls the unstarred version % with hyperlinks disabled. % \begin{macrocode} \newcommand*{\@sgls@link}[1][]{\@gls@@link[hyper=false,#1]} % \end{macrocode} %\end{macro} %\begin{macro}{\@gls@@link} %\changes{2.03}{2009 Sep 23}{new} % The unstarred version of \cs{glslink} checks for the existance % of the term. The main part of the business is in \cs{@gls@link} % which shouldn't check if the term is defined as it's called by % \cs{gls} etc which also perform that check. % \begin{macrocode} \newcommand*{\@gls@@link}[3][]{% \ifglsentryexists{#2}% {% \@gls@link[#1]{#2}{#3}% }{% \PackageError{glossaries}{Glossary entry `#2' has not been defined}{You need to define a glossary entry before you can use it.}% % \end{macrocode} % Display the specified text. (The entry doesn't exist so % there's nothing to link it to.) % \begin{macrocode} \glstextformat{#3}% }% } % \end{macrocode} %\end{macro} %\begin{macro}{\@gls@link} %\changes{1.07}{2007 Sep 13}{fixed bug caused by \cs{theglsentrycounter} setting the page number too soon} %\changes{1.15}{2008 August 15}{added 'glslabel} % \begin{macrocode} \def\@gls@link[#1]#2#3{% % \end{macrocode} %\changes{2.03}{2009 Sep 23}{Moved entry existence check to % avoid } %\changes{2.03}{2009 Sep 23}{added \cs{leavevmode}} % Inserting \cs{leavevmode} suggested by Donald~Arseneau (avoids % problem with tabularx). % \begin{macrocode} \leavevmode \def\glslabel{#2}% \def\@glsnumberformat{glsnumberformat}% \edef\@gls@counter{\csname glo@#2@counter\endcsname}% \KV@glslink@hypertrue \setkeys{glslink}{#1}% % \end{macrocode} % Store the entry's counter in \cs{theglsentrycounter} %\changes{3.0}{2011/04/02}{added \cs{@gls@saveentrycounter}} % \begin{macrocode} \@gls@saveentrycounter % \end{macrocode} %\changes{3.0}{2011/04/02}{added \cs{@gls@setsort}} % Define sort key if necessary: % \begin{macrocode} \@gls@setsort{#2}% % \end{macrocode} %\changes{2.01}{2009 May 30}{moved \cs{@do@wrglossary} before term is displayed % to prevent unwanted whatsit} % \begin{macrocode} \@do@wrglossary{#2}% \ifKV@glslink@hyper \@glslink{glo:#2}{\glstextformat{#3}}% \else \glstextformat{#3}\relax \fi } % \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@saveentrycounter} %\changes{3.0}{2011/04/02}{new} % Need to check if using \ctr{equation} counter in \env{align} % environment: % \begin{macrocode} \newcommand*{\@gls@saveentrycounter}{% \def\@gls@Hcounter{}% % \end{macrocode} % Are we using \ctr{equation} counter? % \begin{macrocode} \ifthenelse{\equal{\@gls@counter}{equation}}% { % \end{macrocode} % If we in \env{align} environment, \cs{xatlevel@} will be defined. % (Can't test for \cs{@currenvir} as may be inside an inner % environment.) % \begin{macrocode} \ifcsundef{xatlevel@}% {% \edef\theglsentrycounter{\expandafter\noexpand \csname the\@gls@counter\endcsname}% }% {% \ifx\xatlevel@\@empty \edef\theglsentrycounter{\expandafter\noexpand \csname the\@gls@counter\endcsname}% \else \savecounters@ \advance\c@equation by 1\relax \edef\theglsentrycounter{\csname the\@gls@counter\endcsname}% % \end{macrocode} % Check if hyperref version of this counter % \begin{macrocode} \ifcsundef{theH\@gls@counter}% {% \def\@gls@Hcounter{\theglsentrycounter}% }% {% \def\@gls@Hcounter{\csname theH\@gls@counter\endcsname}% }% \protected@edef\theHglsentrycounter{\@gls@Hcounter}% \restorecounters@ \fi }% }% {% % \end{macrocode} % Not using \ctr{equation} counter so no special measures: % \begin{macrocode} \edef\theglsentrycounter{\expandafter\noexpand \csname the\@gls@counter\endcsname}% }% % \end{macrocode} % Check if hyperref version of this counter % \begin{macrocode} \ifx\@gls@Hcounter\@empty \ifcsundef{theH\@gls@counter}% {% \def\theHglsentrycounter{\theglsentrycounter}% }% {% \protected@edef\theHglsentrycounter{\expandafter\noexpand \csname theH\@gls@counter\endcsname}% }% \fi } % \end{macrocode} %\end{macro} % %\changes{1.01}{2007 May 17}{Added range facility in format key}% %\begin{macro}{\@set@glo@numformat} % Set the formatting information in the format required by % \app{makeindex}. The first argument is the format specified % by the user (via the format key), the second argument is the % name of the counter used to indicate the location, the third % argument is a control sequence which stores the required format % and the fourth argument (new to v3.0) is the hyper-prefix. %\changes{3.0}{2010/03/31}{added 4th argument} % \begin{macrocode} \def\@set@glo@numformat#1#2#3#4{% \expandafter\@glo@check@mkidxrangechar#3\@nil \protected@edef#1{% \@glo@prefix setentrycounter[#4]{#2}% \expandafter\string\csname\@glo@suffix\endcsname }% \@gls@checkmkidxchars#1% } % \end{macrocode} %\end{macro} % Check to see if the given string starts with a ( or ). If it % does set \cs{@glo@prefix} to the starting character, % and \cs{@glo@suffix} to the rest (or "glsnumberformat" % if there is nothing else), % otherwise set \cs{@glo@prefix} to nothing and % \cs{@glo@suffix} to all of it. % \begin{macrocode} \def\@glo@check@mkidxrangechar#1#2\@nil{% \if#1(\relax \def\@glo@prefix{(}% \if\relax#2\relax \def\@glo@suffix{glsnumberformat}% \else \def\@glo@suffix{#2}% \fi \else \if#1)\relax \def\@glo@prefix{)}% \if\relax#2\relax \def\@glo@suffix{glsnumberformat}% \else \def\@glo@suffix{#2}% \fi \else \def\@glo@prefix{}\def\@glo@suffix{#1#2}% \fi \fi} % \end{macrocode} % %\begin{macro}{\@gls@escbsdq} % Escape backslashes and double quote marks. The argument must be % a control sequence. % \begin{macrocode} \newcommand*{\@gls@escbsdq}[1]{% \def\@gls@checkedmkidx{}% \let\gls@xdystring=#1\relax \@onelevel@sanitize\gls@xdystring \edef\do@gls@xdycheckbackslash{% \noexpand\@gls@xdycheckbackslash\gls@xdystring\noexpand\@nil \@backslashchar\@backslashchar\noexpand\null}% \do@gls@xdycheckbackslash \expandafter\@gls@updatechecked\@gls@checkedmkidx{\gls@xdystring}% \def\@gls@checkedmkidx{}% \expandafter\@gls@xdycheckquote\gls@xdystring\@nil""\null \expandafter\@gls@updatechecked\@gls@checkedmkidx{\gls@xdystring}% \let#1=\gls@xdystring } % \end{macrocode} %\end{macro} % Catch special characters\mkidxspch (argument must be a % control sequence): %\begin{macro}{\@gls@checkmkidxchars} % \begin{macrocode} \newcommand{\@gls@checkmkidxchars}[1]{% \ifglsxindy \@gls@escbsdq{#1}% \else \def\@gls@checkedmkidx{}% \expandafter\@gls@checkquote#1\@nil""\null \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% \def\@gls@checkedmkidx{}% \expandafter\@gls@checkescquote#1\@nil\"\"\null \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% \def\@gls@checkedmkidx{}% \expandafter\@gls@checkescactual#1\@nil\?\?\null \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% \def\@gls@checkedmkidx{}% \expandafter\@gls@checkactual#1\@nil??\null \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% \def\@gls@checkedmkidx{}% \expandafter\@gls@checkbar#1\@nil||\null \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% \def\@gls@checkedmkidx{}% \expandafter\@gls@checkescbar#1\@nil\|\|\null \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% \def\@gls@checkedmkidx{}% \expandafter\@gls@checklevel#1\@nil!!\null \expandafter\@gls@updatechecked\@gls@checkedmkidx{#1}% \fi } % \end{macrocode} %\end{macro} % Update the control sequence and strip trailing \cs{@nil}: %\begin{macro}{\@gls@updatechecked} % \begin{macrocode} \def\@gls@updatechecked#1\@nil#2{\def#2{#1}} % \end{macrocode} %\end{macro} %\begin{macro}{\@gls@tmpb} %\changes{1.1}{2008 Feb 22}{changed \cs{toksdef} to \cs{newtoks}} % Define temporary token % \begin{macrocode} \newtoks\@gls@tmpb % \end{macrocode} %\end{macro} %\begin{macro}{\@gls@checkquote} % Replace \verb|"| with \verb|""| since \verb|"| is a makeindex % special character\mkidxspch. % \begin{macrocode} \def\@gls@checkquote#1"#2"#3\null{% \@gls@tmpb=\expandafter{\@gls@checkedmkidx}% \toks@={#1}% \ifx\null#2\null \ifx\null#3\null \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% \def\@@gls@checkquote{\relax}% \else \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ \@gls@quotechar\@gls@quotechar\@gls@quotechar\@gls@quotechar}% \def\@@gls@checkquote{\@gls@checkquote#3\null}% \fi \else \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ \@gls@quotechar\@gls@quotechar}% \ifx\null#3\null \def\@@gls@checkquote{\@gls@checkquote#2""\null}% \else \def\@@gls@checkquote{\@gls@checkquote#2"#3\null}% \fi \fi \@@gls@checkquote} % \end{macrocode} %\end{macro} %\begin{macro}{\@gls@checkescquote} % Do the same for \verb|\"|: % \begin{macrocode} \def\@gls@checkescquote#1\"#2\"#3\null{% \@gls@tmpb=\expandafter{\@gls@checkedmkidx}% \toks@={#1}% \ifx\null#2\null \ifx\null#3\null \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% \def\@@gls@checkescquote{\relax}% \else \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ \@gls@quotechar\string\"\@gls@quotechar \@gls@quotechar\string\"\@gls@quotechar}% \def\@@gls@checkescquote{\@gls@checkescquote#3\null}% \fi \else \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ \@gls@quotechar\string\"\@gls@quotechar}% \ifx\null#3\null \def\@@gls@checkescquote{\@gls@checkescquote#2\"\"\null}% \else \def\@@gls@checkescquote{\@gls@checkescquote#2\"#3\null}% \fi \fi \@@gls@checkescquote} % \end{macrocode} %\end{macro} %\begin{macro}{\@gls@checkescactual} % Similarly for \verb|\?| (which is replaces @ as % \app{makeindex}'s special character): % \begin{macrocode} \def\@gls@checkescactual#1\?#2\?#3\null{% \@gls@tmpb=\expandafter{\@gls@checkedmkidx}% \toks@={#1}% \ifx\null#2\null \ifx\null#3\null \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% \def\@@gls@checkescactual{\relax}% \else \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ \@gls@quotechar\string\"\@gls@actualchar \@gls@quotechar\string\"\@gls@actualchar}% \def\@@gls@checkescactual{\@gls@checkescactual#3\null}% \fi \else \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ \@gls@quotechar\string\"\@gls@actualchar}% \ifx\null#3\null \def\@@gls@checkescactual{\@gls@checkescactual#2\?\?\null}% \else \def\@@gls@checkescactual{\@gls@checkescactual#2\?#3\null}% \fi \fi \@@gls@checkescactual} % \end{macrocode} %\end{macro} %\begin{macro}{\@gls@checkescbar} % Similarly for \verb"\|": % \begin{macrocode} \def\@gls@checkescbar#1\|#2\|#3\null{% \@gls@tmpb=\expandafter{\@gls@checkedmkidx}% \toks@={#1}% \ifx\null#2\null \ifx\null#3\null \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% \def\@@gls@checkescbar{\relax}% \else \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ \@gls@quotechar\string\"\@gls@encapchar \@gls@quotechar\string\"\@gls@encapchar}% \def\@@gls@checkescbar{\@gls@checkescbar#3\null}% \fi \else \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ \@gls@quotechar\string\"\@gls@encapchar}% \ifx\null#3\null \def\@@gls@checkescbar{\@gls@checkescbar#2\|\|\null}% \else \def\@@gls@checkescbar{\@gls@checkescbar#2\|#3\null}% \fi \fi \@@gls@checkescbar} % \end{macrocode} %\end{macro} %\begin{macro}{\@gls@checkesclevel} % Similarly for \verb"\!": % \begin{macrocode} \def\@gls@checkesclevel#1\!#2\!#3\null{% \@gls@tmpb=\expandafter{\@gls@checkedmkidx}% \toks@={#1}% \ifx\null#2\null \ifx\null#3\null \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% \def\@@gls@checkesclevel{\relax}% \else \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ \@gls@quotechar\string\"\@gls@levelchar \@gls@quotechar\string\"\@gls@levelchar}% \def\@@gls@checkesclevel{\@gls@checkesclevel#3\null}% \fi \else \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ \@gls@quotechar\string\"\@gls@levelchar}% \ifx\null#3\null \def\@@gls@checkesclevel{\@gls@checkesclevel#2\!\!\null}% \else \def\@@gls@checkesclevel{\@gls@checkesclevel#2\!#3\null}% \fi \fi \@@gls@checkesclevel} % \end{macrocode} %\end{macro} %\begin{macro}{\@gls@checkbar} % and for \verb"|": % \begin{macrocode} \def\@gls@checkbar#1|#2|#3\null{% \@gls@tmpb=\expandafter{\@gls@checkedmkidx}% \toks@={#1}% \ifx\null#2\null \ifx\null#3\null \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% \def\@@gls@checkbar{\relax}% \else \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ \@gls@quotechar\@gls@encapchar\@gls@quotechar\@gls@encapchar}% \def\@@gls@checkbar{\@gls@checkbar#3\null}% \fi \else \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ \@gls@quotechar\@gls@encapchar}% \ifx\null#3\null \def\@@gls@checkbar{\@gls@checkbar#2||\null}% \else \def\@@gls@checkbar{\@gls@checkbar#2|#3\null}% \fi \fi \@@gls@checkbar} % \end{macrocode} %\end{macro} %\begin{macro}{\@gls@checklevel} % and for \verb"!": % \begin{macrocode} \def\@gls@checklevel#1!#2!#3\null{% \@gls@tmpb=\expandafter{\@gls@checkedmkidx}% \toks@={#1}% \ifx\null#2\null \ifx\null#3\null \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% \def\@@gls@checklevel{\relax}% \else \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ \@gls@quotechar\@gls@levelchar\@gls@quotechar\@gls@levelchar}% \def\@@gls@checklevel{\@gls@checklevel#3\null}% \fi \else \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ \@gls@quotechar\@gls@levelchar}% \ifx\null#3\null \def\@@gls@checklevel{\@gls@checklevel#2!!\null}% \else \def\@@gls@checklevel{\@gls@checklevel#2!#3\null}% \fi \fi \@@gls@checklevel} % \end{macrocode} %\end{macro} %\begin{macro}{\@gls@checkactual} % and for \verb"?": % \begin{macrocode} \def\@gls@checkactual#1?#2?#3\null{% \@gls@tmpb=\expandafter{\@gls@checkedmkidx}% \toks@={#1}% \ifx\null#2\null \ifx\null#3\null \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% \def\@@gls@checkactual{\relax}% \else \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ \@gls@quotechar\@gls@actualchar\@gls@quotechar\@gls@actualchar}% \def\@@gls@checkactual{\@gls@checkactual#3\null}% \fi \else \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ \@gls@quotechar\@gls@actualchar}% \ifx\null#3\null \def\@@gls@checkactual{\@gls@checkactual#2??\null}% \else \def\@@gls@checkactual{\@gls@checkactual#2?#3\null}% \fi \fi \@@gls@checkactual} % \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@xdycheckquote} % As before but for use with \app{xindy} % \begin{macrocode} \def\@gls@xdycheckquote#1"#2"#3\null{% \@gls@tmpb=\expandafter{\@gls@checkedmkidx}% \toks@={#1}% \ifx\null#2\null \ifx\null#3\null \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}% \def\@@gls@xdycheckquote{\relax}% \else \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ \string\"\string\"}% \def\@@gls@xdycheckquote{\@gls@xdycheckquote#3\null}% \fi \else \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@ \string\"}% \ifx\null#3\null \def\@@gls@xdycheckquote{\@gls@xdycheckquote#2""\null}% \else \def\@@gls@xdycheckquote{\@gls@xdycheckquote#2"#3\null}% \fi \fi \@@gls@xdycheckquote } % \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@xdycheckbackslash} % Need to escape all backslashes for \app{xindy}. % Define command that will define \cs{@gls@xdycheckbackslash} % \begin{macrocode} \edef\def@gls@xdycheckbackslash{% \noexpand\def\noexpand\@gls@xdycheckbackslash##1\@backslashchar ##2\@backslashchar##3\noexpand\null{% \noexpand\@gls@tmpb=\noexpand\expandafter {\noexpand\@gls@checkedmkidx}% \noexpand\toks@={##1}% \noexpand\ifx\noexpand\null##2\noexpand\null \noexpand\ifx\noexpand\null##3\noexpand\null \noexpand\edef\noexpand\@gls@checkedmkidx{% \noexpand\the\noexpand\@gls@tmpb\noexpand\the\noexpand\toks@}% \noexpand\def\noexpand\@@gls@xdycheckbackslash{\relax}% \noexpand\else \noexpand\edef\noexpand\@gls@checkedmkidx{% \noexpand\the\noexpand\@gls@tmpb\noexpand\the\noexpand\toks@ \@backslashchar\@backslashchar\@backslashchar\@backslashchar}% \noexpand\def\noexpand\@@gls@xdycheckbackslash{% \noexpand\@gls@xdycheckbackslash##3\noexpand\null}% \noexpand\fi \noexpand\else \noexpand\edef\noexpand\@gls@checkedmkidx{% \noexpand\the\noexpand\@gls@tmpb\noexpand\the\noexpand\toks@ \@backslashchar\@backslashchar}% \noexpand\ifx\noexpand\null##3\noexpand\null \noexpand\def\noexpand\@@gls@xdycheckbackslash{% \noexpand\@gls@xdycheckbackslash##2\@backslashchar \@backslashchar\noexpand\null}% \noexpand\else \noexpand\def\noexpand\@@gls@xdycheckbackslash{% \noexpand\@gls@xdycheckbackslash##2\@backslashchar ##3\noexpand\null}% \noexpand\fi \noexpand\fi \noexpand\@@gls@xdycheckbackslash }% } % \end{macrocode} % Now go ahead and define \cs{@gls@xdycheckbackslash} % \begin{macrocode} \def@gls@xdycheckbackslash % \end{macrocode} %\end{macro} % %\begin{macro}{\@glslink} % If \ics{hyperlink} is not defined \cs{@glslink} % ignores its first argument and just does the second argument, % otherwise it is equivalent to \ics{hyperlink}. %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \ifcsundef{hyperlink}% {% \gdef\@glslink#1#2{#2}% }% {% \gdef\@glslink#1#2{\hyperlink{#1}{#2}}% } % \end{macrocode} %\end{macro} %\changes{1.12}{2008 Mar 8}{added check for 'hypertarget separate % to 'hyperlink (memoir defines 'hyperlink but not 'hypertarget)} %\begin{macro}{\@glstarget} % If \ics{hypertarget} is not defined, \cs{@glstarget} % ignores its first argument and just does the second argument, % otherwise it is equivalent to \ics{hypertarget}. %\changes{1.16}{2008 August 27}{raised the hypertarget so the target text doesn't % scroll off the top of the page} % \begin{macrocode} \newlength\gls@tmplen \ifcsundef{hypertarget}% {% \gdef\@glstarget#1#2{#2}% }% {% \gdef\@glstarget#1#2{% \settoheight{\gls@tmplen}{#2}% \raisebox{\gls@tmplen}{\hypertarget{#1}{}}#2% }% } % \end{macrocode} %\end{macro} % % Glossary hyperlinks can be disabled using \cs{glsdisablehyper} % (effect can be localised): %\begin{macro}{\glsdisablehyper} % \begin{macrocode} \newcommand{\glsdisablehyper}{% \renewcommand*\@glslink[2]{##2}% \renewcommand*\@glstarget[2]{##2}} % \end{macrocode} %\end{macro} % Glossary hyperlinks can be enabled using \cs{glsenablehyper} % (effect can be localised): %\begin{macro}{\glsenablehyper} % \begin{macrocode} \newcommand{\glsenablehyper}{% \renewcommand*\@glslink[2]{\hyperlink{##1}{##2}}% \renewcommand*\@glstarget[2]{% \settoheight{\gls@tmplen}{##2}% \raisebox{\gls@tmplen}{\hypertarget{##1}{}}##2}} % \end{macrocode} %\end{macro} % %Syntax:\\[10pt] % \cs{gls}\oarg{options}\marg{label}\oarg{insert text}\\[10pt] % Link to glossary entry using singular form. The link text % is taken from the value of the \gloskey{text} or \gloskey{first} % keys used when the entry was defined. % % The first optional argument is a key-value list, the same as % \ics{glslink}\igloskey[glslink]{hyper}\igloskey[glslink]{format}\igloskey[glslink]{counter}, % the mandatory argument is the entry label. % After the mandatory argument, there is another optional argument % to insert extra text in the link text (the location of the inserted % text is governed by \ics{glsdisplay} and % \ics{glsdisplayfirst}). As with \cs{glslink} % there is a starred version which is the same as the unstarred % version but with the \gloskey[glslink]{hyper} key set to \texttt{false}. % (Additional options can also be specified % in the first optional argument.) % % First determine if we are using the starred form: %\begin{macro}{\gls} % \begin{macrocode} \newrobustcmd*{\gls}{\@ifstar\@sgls\@gls} % \end{macrocode} %\end{macro} % Define the starred form: %\begin{macro}{\@sgls} % \begin{macrocode} \newcommand*{\@sgls}[1][]{\@gls[hyper=false,#1]} % \end{macrocode} %\end{macro} % Defined the un-starred form. Need to determine if there is % a final optional argument %\begin{macro}{\@gls} % \begin{macrocode} \newcommand*{\@gls}[2][]{% \new@ifnextchar[{\@gls@{#1}{#2}}{\@gls@{#1}{#2}[]}} % \end{macrocode} %\end{macro} %\begin{macro}{\@gls@} % Read in the final optional argument: % \begin{macrocode} \def\@gls@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} \def\@gls@link@opts{#1}% \def\@gls@link@label{#2}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \ifglsused{#2}% {% \def\@glo@text{% \csname gls@\@glo@type @display\endcsname {\glsentrytext{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{#3}}% }% {% \def\@glo@text{% \csname gls@\@glo@type @displayfirst\endcsname {\glsentryfirst{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{#3}}% }% % \end{macrocode} % Call \cs{@gls@link}. % If \pkgopt{footnote} package option has been used and the glossary % type is \cs{acronymtype}, suppress % hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} % package option is used. %\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to %checking if footnote option has been used} %\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} %\changes{2.04}{2009 November 10}{Changed test to check if glossary type %has been identified as a list of acronyms} % \begin{macrocode} \ifglsused{#2}{% \@gls@link[#1]{#2}{\@glo@text}% }{% \gls@checkisacronymlist\@glo@type \ifthenelse{\(\boolean{@glsisacronymlist}\AND \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{% \@gls@link[#1,hyper=false]{#2}{\@glo@text}% }{% \@gls@link[#1]{#2}{\@glo@text}% }% }% % \end{macrocode} % Indicate that this entry has now been used % \begin{macrocode} \glsunset{#2}}% } % \end{macrocode} %\end{macro} % % \cs{Gls} behaves like \cs{gls}, but the first letter % of the link text is converted to uppercase (note that if the % first letter has an accent, the accented letter will need to % be grouped when you define the entry). It is mainly intended % for terms that start a sentence: %\begin{macro}{\Gls} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Gls}{\@ifstar\@sGls\@Gls} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGls}[1][]{\@Gls[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@Gls}[2][]{% \new@ifnextchar[{\@Gls@{#1}{#2}}{\@Gls@{#1}{#2}[]}} % \end{macrocode} %\begin{macro}{\@Gls@} % Read in the final optional argument: % \begin{macrocode} \def\@Gls@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} \def\@gls@link@opts{#1}% \def\@gls@link@label{#2}% \def\glslabel{#2}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \ifglsused{#2}% {% \protected@edef\@glo@text{% \csname gls@\@glo@type @display\endcsname {\glsentrytext{#2}}{\glsentrydesc{#2}}% {\glsentrysymbol{#2}}{#3}}% }% {% \protected@edef\@glo@text{% \csname gls@\@glo@type @displayfirst\endcsname {\glsentryfirst{#2}}{\glsentrydesc{#2}}% {\glsentrysymbol{#2}}{#3}}% }% % \end{macrocode} % Call \cs{@gls@link} % If \pkgopt{footnote} package option has been used and the glossary % type is \cs{acronymtype}, suppress % hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} % package option is used. %\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to %checking if footnote option has been used} %\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} %\changes{2.04}{2009 November 10}{Changed test to check if glossary type %has been identified as a list of acronyms} % \begin{macrocode} \ifglsused{#2}{% \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}}% }{% \gls@checkisacronymlist\@glo@type \ifthenelse{\(\boolean{@glsisacronymlist}\AND \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{% \@gls@link[#1,hyper=false]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}}% }{% \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}}% }% }% % \end{macrocode} % Indicate that this entry has now been used % \begin{macrocode} \glsunset{#2}}% } % \end{macrocode} %\end{macro} % % \cs{GLS} behaves like \ics{gls}, but the link % text is converted to uppercase: %\changes{3.01}{2011/04/12}{made robust} %\begin{macro}{\GLS} % \begin{macrocode} \newrobustcmd*{\GLS}{\@ifstar\@sGLS\@GLS} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGLS}[1][]{\@GLS[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@GLS}[2][]{% \new@ifnextchar[{\@GLS@{#1}{#2}}{\@GLS@{#1}{#2}[]}} % \end{macrocode} %\begin{macro}{\@GLS@} % Read in the final optional argument: % \begin{macrocode} \def\@GLS@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} \def\@gls@link@opts{#1}% \def\@gls@link@label{#2}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}). % \begin{macrocode} \ifglsused{#2}{\def\@glo@text{% \csname gls@\@glo@type @display\endcsname {\glsentrytext{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{#3}}}{% \def\@glo@text{% \csname gls@\@glo@type @displayfirst\endcsname {\glsentryfirst{#2}}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{#3}}}% % \end{macrocode} % Call \cs{@gls@link} % If \pkgopt{footnote} package option has been used and the glossary % type is \cs{acronymtype}, suppress % hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} % package option is used. %\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to %checking if footnote option has been used} %\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} %\changes{2.04}{2009 November 10}{Changed test to check if glossary type %has been identified as a list of acronyms} % \begin{macrocode} \ifglsused{#2}{% \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% }{% \gls@checkisacronymlist\@glo@type \ifthenelse{\(\boolean{@glsisacronymlist}\AND \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{% \@gls@link[#1,hyper=false]{#2}{\MakeUppercase{\@glo@text}}% }{% \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% }% }% % \end{macrocode} % Indicate that this entry has now been used % \begin{macrocode} \glsunset{#2}}% } % \end{macrocode} %\end{macro} % % \cs{glspl} behaves in the same way as \ics{gls} except % it uses the plural form. %\begin{macro}{\glspl} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\glspl}{\@ifstar\@sglspl\@glspl} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sglspl}[1][]{\@glspl[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@glspl}[2][]{% \new@ifnextchar[{\@glspl@{#1}{#2}}{\@glspl@{#1}{#2}[]}} % \end{macrocode} %\begin{macro}{\@glspl@} % Read in the final optional argument: % \begin{macrocode} \def\@glspl@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} \def\@gls@link@opts{#1}% \def\@gls@link@label{#2}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) %\changes{1.12}{2008 Mar 8}{now uses 'glsentrydescplural and % 'glsentrysymbolplural instead of 'glsentrydesc and 'glsentrysymbol} % \begin{macrocode} \ifglsused{#2}% {% \def\@glo@text{% \csname gls@\@glo@type @display\endcsname {\glsentryplural{#2}}{\glsentrydescplural{#2}}% {\glsentrysymbolplural{#2}}{#3}}% }% {% \def\@glo@text{% \csname gls@\@glo@type @displayfirst\endcsname {\glsentryfirstplural{#2}}{\glsentrydescplural{#2}}% {\glsentrysymbolplural{#2}}{#3}}% }% % \end{macrocode} % Call \cs{@gls@link}. % If \pkgopt{footnote} package option has been used and the glossary % type is \cs{acronymtype}, suppress % hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} % package option is used. %\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to %checking if footnote option has been used} %\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} %\changes{2.04}{2009 November 10}{Changed test to check if glossary type %has been identified as a list of acronyms} % \begin{macrocode} \ifglsused{#2}{% \@gls@link[#1]{#2}{\@glo@text}% }{% \gls@checkisacronymlist\@glo@type \ifthenelse{\(\boolean{@glsisacronymlist}\AND \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{% \@gls@link[#1,hyper=false]{#2}{\@glo@text}% }{% \@gls@link[#1]{#2}{\@glo@text}% }% }% % \end{macrocode} % Indicate that this entry has now been used % \begin{macrocode} \glsunset{#2}}% } % \end{macrocode} %\end{macro} % % \cs{Glspl} behaves in the same way as \ics{glspl}, except % that the first letter of the link text is converted to uppercase % (as with \ics{Gls}, if the first letter has an accent, it % will need to be grouped). %\begin{macro}{\Glspl} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Glspl}{\@ifstar\@sGlspl\@Glspl} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGlspl}[1][]{\@Glspl[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@Glspl}[2][]{% \new@ifnextchar[{\@Glspl@{#1}{#2}}{\@Glspl@{#1}{#2}[]}} % \end{macrocode} %\begin{macro}{\@Glspl@} % Read in the final optional argument: % \begin{macrocode} \def\@Glspl@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} \def\@gls@link@opts{#1}% \def\@gls@link@label{#2}% \def\glslabel{#2}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}). This needs to be expanded so that the % \cs{@glo@text} can be passed to \cs{xmakefirstuc}. %\changes{1.12}{2008 Mar 8}{now uses 'glsentrydescplural and % 'glsentrysymbolplural instead of 'glsentrydesc and 'glsentrysymbol} % \begin{macrocode} \ifglsused{#2}% {% \protected@edef\@glo@text{% \csname gls@\@glo@type @display\endcsname {\glsentryplural{#2}}{\glsentrydescplural{#2}}% {\glsentrysymbolplural{#2}}{#3}}% }% {% \protected@edef\@glo@text{% \csname gls@\@glo@type @displayfirst\endcsname {\glsentryfirstplural{#2}}{\glsentrydescplural{#2}}% {\glsentrysymbolplural{#2}}{#3}}% }% % \end{macrocode} % Call \cs{@gls@link}. % If \pkgopt{footnote} package option has been used and the glossary % type is \cs{acronymtype}, suppress % hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} % package option is used. %\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to %checking if footnote option has been used} %\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} %\changes{2.04}{2009 November 10}{Changed test to check if glossary type %has been identified as a list of acronyms} % \begin{macrocode} \ifglsused{#2}{% \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}}% }{% \gls@checkisacronymlist\@glo@type \ifthenelse{\(\boolean{@glsisacronymlist}\AND \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{% \@gls@link[#1,hyper=false]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}}% }{% \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}}% }% }% % \end{macrocode} % Indicate that this entry has now been used % \begin{macrocode} \glsunset{#2}}% } % \end{macrocode} %\end{macro} % % \cs{GLSpl} behaves like \ics{glspl} except that all the % link text is converted to uppercase. %\begin{macro}{\GLSpl} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\GLSpl}{\@ifstar\@sGLSpl\@GLSpl} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGLSpl}[1][]{\@GLSpl[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@GLSpl}[2][]{% \new@ifnextchar[{\@GLSpl@{#1}{#2}}{\@GLSpl@{#1}{#2}[]}} % \end{macrocode} %\begin{macro}{\@GLSpl} % Read in the final optional argument: % \begin{macrocode} \def\@GLSpl@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} \def\@gls@link@opts{#1}% \def\@gls@link@label{#2}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) %\changes{1.12}{2008 Mar 8}{now uses 'glsentrydescplural and % 'glsentrysymbolplural instead of 'glsentrydesc and 'glsentrysymbol} % \begin{macrocode} \ifglsused{#2}{\def\@glo@text{% \csname gls@\@glo@type @display\endcsname {\glsentryplural{#2}}{\glsentrydescplural{#2}}{% \glsentrysymbolplural{#2}}{#3}}}{% \def\@glo@text{% \csname gls@\@glo@type @displayfirst\endcsname {\glsentryfirstplural{#2}}{\glsentrydescplural{#2}}{% \glsentrysymbolplural{#2}}{#3}}}% % \end{macrocode} % Call \cs{@gls@link}. % If \pkgopt{footnote} package option has been used and the glossary % type is \cs{acronymtype}, suppress % hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} % package option is used. %\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to %checking if footnote option has been used} %\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} %\changes{2.04}{2009 November 10}{Changed test to check if glossary type %has been identified as a list of acronyms} % \begin{macrocode} \ifglsused{#2}{% \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% }{% \gls@checkisacronymlist\@glo@type \ifthenelse{\(\boolean{@glsisacronymlist}\AND \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}{% \@gls@link[#1,hyper=false]{#2}{\MakeUppercase{\@glo@text}}% }{% \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% }% }% % \end{macrocode} % Indicate that this entry has now been used % \begin{macrocode} \glsunset{#2}}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\glsdisp} %\changes{1.19}{2009 Mar 2}{new} %\cs{glsdisp}\oarg{options}\marg{label}\marg{text} % This is like \cs{gls} except that the link text is provided. % This differs from \cs{glslink} in that it uses % \cs{glsdisplay} or \cs{glsdisplayfirst} and unsets the first use % flag. % % First determine if we are using the starred form: % \begin{macrocode} \newrobustcmd*{\glsdisp}{\@ifstar\@sglsdisp\@glsdisp} % \end{macrocode} %\end{macro} % Define the starred form: %\begin{macro}{\@sgls} % \begin{macrocode} \newcommand*{\@sglsdisp}[1][]{\@glsdisp[hyper=false,#1]} % \end{macrocode} %\end{macro} % Defined the un-starred form. %\begin{macro}{\@glsdisp} % \begin{macrocode} \newcommand*{\@glsdisp}[3][]{% \glsdoifexists{#2}{% % \end{macrocode} %\changes{2.05}{2010 Feb 6}{Added closing brace. Patch provided by Sergiu Dotenco} % \begin{macrocode} \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} \def\@gls@link@opts{#1}% \def\@gls@link@label{#2}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \ifglsused{#2}% {% \def\@glo@text{% \csname gls@\@glo@type @display\endcsname {#3}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{}}% }% {% \def\@glo@text{% \csname gls@\@glo@type @displayfirst\endcsname {#3}{\glsentrydesc{#2}}{\glsentrysymbol{#2}}{}}% }% % \end{macrocode} % Call \cs{@gls@link}. % If \pkgopt{footnote} package option has been used and the glossary % type is \cs{acronymtype}, suppress % hyperlink for first use. Likewise if the \pkgopt[false]{hyperfirst} % package option is used. %\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to %checking if footnote option has been used} %\changes{2.03}{2009 Sep 23}{Added check for hyperfirst} %\changes{2.04}{2009 November 10}{Changed test to check if glossary type %has been identified as a list of acronyms} % \begin{macrocode} \ifglsused{#2}% {% \@gls@link[#1]{#2}{\@glo@text}% }% {% \gls@checkisacronymlist\@glo@type \ifthenelse{\(\boolean{@glsisacronymlist}\AND \boolean{glsacrfootnote}\) \OR \NOT\boolean{glshyperfirst}}% {% \@gls@link[#1,hyper=false]{#2}{\@glo@text}% }% {% \@gls@link[#1]{#2}{\@glo@text}% }% }% % \end{macrocode} % Indicate that this entry has now been used %\changes{2.05}{2010 Feb 6}{Removed spurious brace. Patch provided by Sergiu Dotenco} % \begin{macrocode} \glsunset{#2}% }% } % \end{macrocode} %\end{macro} % % \cs{glstext} behaves like \ics{gls} except it always uses the value % given by the \gloskey{text} key and it doesn't mark the entry as % used. %\begin{macro}{\glstext} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\glstext}{\@ifstar\@sglstext\@glstext} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sglstext}[1][]{\@glstext[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@glstext}[2][]{% \new@ifnextchar[{\@glstext@{#1}{#2}}{\@glstext@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@glstext@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('glstext shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentrytext{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % % \cs{GLStext} behaves like \cs{glstext} except the text is converted % to uppercase. %\begin{macro}{\GLStext} % \begin{macrocode} \newrobustcmd*{\GLStext}{\@ifstar\@sGLStext\@GLStext} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGLStext}[1][]{\@GLStext[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@GLStext}[2][]{% \new@ifnextchar[{\@GLStext@{#1}{#2}}{\@GLStext@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@GLStext@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('GLStext shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentrytext{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % % \cs{Glstext} behaves like \cs{glstext} except that the first letter % of the text is converted to uppercase. %\begin{macro}{\Glstext} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Glstext}{\@ifstar\@sGlstext\@Glstext} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGlstext}[1][]{\@Glstext[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@Glstext}[2][]{% \new@ifnextchar[{\@Glstext@{#1}{#2}}{\@Glstext@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@Glstext@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('Glstext shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentrytext{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % % \cs{glsfirst} behaves like \ics{gls} except it always uses the value % given by the \gloskey{first} key and it doesn't mark the entry as % used. %\begin{macro}{\glsfirst} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\glsfirst}{\@ifstar\@sglsfirst\@glsfirst} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sglsfirst}[1][]{\@glsfirst[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@glsfirst}[2][]{% \new@ifnextchar[{\@glsfirst@{#1}{#2}}{\@glsfirst@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@glsfirst@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('glsfirst shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentryfirst{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % % \cs{Glsfirst} behaves like \ics{glsfirst} except it displays the % first letter in uppercase. %\begin{macro}{\Glsfirst} % \begin{macrocode} \newrobustcmd*{\Glsfirst}{\@ifstar\@sGlsfirst\@Glsfirst} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGlsfirst}[1][]{\@Glsfirst[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@Glsfirst}[2][]{% \new@ifnextchar[{\@Glsfirst@{#1}{#2}}{\@Glsfirst@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@Glsfirst@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('Glsfirst shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentryfirst{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % % \cs{GLSfirst} behaves like \ics{Glsfirst} except it displays the % text in uppercase. %\begin{macro}{\GLSfirst} % \begin{macrocode} \newrobustcmd*{\GLSfirst}{\@ifstar\@sGLSfirst\@GLSfirst} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGLSfirst}[1][]{\@GLSfirst[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@GLSfirst}[2][]{% \new@ifnextchar[{\@GLSfirst@{#1}{#2}}{\@GLSfirst@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@GLSfirst@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('GLSfirst shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentryfirst{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % % \cs{glsplural} behaves like \ics{gls} except it always uses the value % given by the \gloskey{plural} key and it doesn't mark the entry as % used. %\begin{macro}{\glsplural} % \begin{macrocode} \newrobustcmd*{\glsplural}{\@ifstar\@sglsplural\@glsplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sglsplural}[1][]{\@glsplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@glsplural}[2][]{% \new@ifnextchar[{\@glsplural@{#1}{#2}}{\@glsplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@glsplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('glsplural shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentryplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % % \cs{Glsplural} behaves like \ics{glsplural} except that the first % letter is converted to uppercase. %\begin{macro}{\Glsplural} % \begin{macrocode} \newrobustcmd*{\Glsplural}{\@ifstar\@sGlsplural\@Glsplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGlsplural}[1][]{\@Glsplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@Glsplural}[2][]{% \new@ifnextchar[{\@Glsplural@{#1}{#2}}{\@Glsplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@Glsplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('Glsplural shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentryplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % % \cs{GLSplural} behaves like \ics{glsplural} except that the % text is converted to uppercase. %\begin{macro}{\GLSplural} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\GLSplural}{\@ifstar\@sGLSplural\@GLSplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGLSplural}[1][]{\@GLSplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@GLSplural}[2][]{% \new@ifnextchar[{\@GLSplural@{#1}{#2}}{\@GLSplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@GLSplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('GLSplural shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentryplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % % \cs{glsfirstplural} behaves like \ics{gls} except it always uses the value % given by the \gloskey{firstplural} key and it doesn't mark the entry as % used. %\begin{macro}{\glsfirstplural} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\glsfirstplural}{\@ifstar\@sglsfirstplural\@glsfirstplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sglsfirstplural}[1][]{\@glsfirstplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@glsfirstplural}[2][]{% \new@ifnextchar[{\@glsfirstplural@{#1}{#2}}{\@glsfirstplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@glsfirstplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('glsfirstplural shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentryfirstplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % % \cs{Glsfirstplural} behaves like \ics{glsfirstplural} except that the % first letter is converted to uppercase. %\begin{macro}{\Glsfirstplural} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsfirstplural}{\@ifstar\@sGlsfirstplural\@Glsfirstplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGlsfirstplural}[1][]{\@Glsfirstplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@Glsfirstplural}[2][]{% \new@ifnextchar[{\@Glsfirstplural@{#1}{#2}}{\@Glsfirstplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@Glsfirstplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('Glsfirstplural shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentryfirstplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % % \cs{GLSfirstplural} behaves like \ics{glsfirstplural} except that the % link text is converted to uppercase. %\begin{macro}{\GLSfirstplural} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\GLSfirstplural}{\@ifstar\@sGLSfirstplural\@GLSfirstplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGLSfirstplural}[1][]{\@GLSfirstplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@GLSfirstplural}[2][]{% \new@ifnextchar[{\@GLSfirstplural@{#1}{#2}}{\@GLSfirstplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@GLSfirstplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('GLSfirstplural shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentryfirstplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % % \cs{glsname} behaves like \ics{gls} except it always uses the value % given by the \gloskey{name} key and it doesn't mark the entry as % used. %\begin{macro}{\glsname} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\glsname}{\@ifstar\@sglsname\@glsname} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sglsname}[1][]{\@glsname[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@glsname}[2][]{% \new@ifnextchar[{\@glsname@{#1}{#2}}{\@glsname@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@glsname@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('glsname shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentryname{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % % \cs{Glsname} behaves like \ics{glsname} except that the % first letter is converted to uppercase. %\begin{macro}{\Glsname} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsname}{\@ifstar\@sGlsname\@Glsname} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGlsname}[1][]{\@Glsname[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@Glsname}[2][]{% \new@ifnextchar[{\@Glsname@{#1}{#2}}{\@Glsname@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@Glsname@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('glsname shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentryname{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % % \cs{GLSname} behaves like \ics{glsname} except that the % link text is converted to uppercase. %\begin{macro}{\GLSname} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\GLSname}{\@ifstar\@sGLSname\@GLSname} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGLSname}[1][]{\@GLSname[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@GLSname}[2][]{% \new@ifnextchar[{\@GLSname@{#1}{#2}}{\@GLSname@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@GLSname@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('GLSname shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentryname{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % % \cs{glsdesc} behaves like \ics{gls} except it always uses the value % given by the \gloskey{description} key and it doesn't mark the entry % as used. %\begin{macro}{\glsdesc} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\glsdesc}{\@ifstar\@sglsdesc\@glsdesc} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sglsdesc}[1][]{\@glsdesc[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@glsdesc}[2][]{% \new@ifnextchar[{\@glsdesc@{#1}{#2}}{\@glsdesc@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@glsdesc@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('glsdesc shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentrydesc{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % % \cs{Glsdesc} behaves like \ics{glsdesc} except that the % first letter is converted to uppercase. %\begin{macro}{\Glsdesc} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsdesc}{\@ifstar\@sGlsdesc\@Glsdesc} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGlsdesc}[1][]{\@Glsdesc[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@Glsdesc}[2][]{% \new@ifnextchar[{\@Glsdesc@{#1}{#2}}{\@Glsdesc@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@Glsdesc@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('Glsdesc shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentrydesc{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % % \cs{GLSdesc} behaves like \ics{glsdesc} except that the % link text is converted to uppercase. %\begin{macro}{\GLSdesc} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\GLSdesc}{\@ifstar\@sGLSdesc\@GLSdesc} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGLSdesc}[1][]{\@GLSdesc[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@GLSdesc}[2][]{% \new@ifnextchar[{\@GLSdesc@{#1}{#2}}{\@GLSdesc@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@GLSdesc@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('GLSdesc shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentrydesc{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % % \cs{glsdescplural} behaves like \ics{gls} except it always uses the value % given by the \gloskey{descriptionplural} key and it doesn't mark the entry % as used. %\begin{macro}{\glsdescplural} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\glsdescplural}{\@ifstar\@sglsdescplural\@glsdescplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sglsdescplural}[1][]{\@glsdescplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@glsdescplural}[2][]{% \new@ifnextchar[{\@glsdescplural@{#1}{#2}}{\@glsdescplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@glsdescplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentrydescplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % % \cs{Glsdescplural} behaves like \ics{glsdescplural} except that the % first letter is converted to uppercase. %\begin{macro}{\Glsdescplural} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsdescplural}{\@ifstar\@sGlsdescplural\@Glsdescplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGlsdescplural}[1][]{\@Glsdescplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@Glsdescplural}[2][]{% \new@ifnextchar[{\@Glsdescplural@{#1}{#2}}{\@Glsdescplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@Glsdescplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentrydescplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % % \cs{GLSdescplural} behaves like \ics{glsdescplural} except that the % link text is converted to uppercase. %\begin{macro}{\GLSdescplural} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\GLSdescplural}{\@ifstar\@sGLSdescplural\@GLSdescplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGLSdescplural}[1][]{\@GLSdescplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@GLSdescplural}[2][]{% \new@ifnextchar[{\@GLSdescplural@{#1}{#2}}{\@GLSdescplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@GLSdescplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentrydescplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % % \cs{glssymbol} behaves like \ics{gls} except it always uses the value % given by the \gloskey{symbol} key and it doesn't mark the entry as % used. %\begin{macro}{\glssymbol} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\glssymbol}{\@ifstar\@sglssymbol\@glssymbol} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sglssymbol}[1][]{\@glssymbol[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@glssymbol}[2][]{% \new@ifnextchar[{\@glssymbol@{#1}{#2}}{\@glssymbol@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@glssymbol@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('glssymbol shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentrysymbol{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % % \cs{Glssymbol} behaves like \ics{glssymbol} except that the % first letter is converted to uppercase. %\begin{macro}{\Glssymbol} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Glssymbol}{\@ifstar\@sGlssymbol\@Glssymbol} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGlssymbol}[1][]{\@Glssymbol[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@Glssymbol}[2][]{% \new@ifnextchar[{\@Glssymbol@{#1}{#2}}{\@Glssymbol@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@Glssymbol@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('Glssymbol shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentrysymbol{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % % \cs{GLSsymbol} behaves like \ics{glssymbol} except that the % link text is converted to uppercase. %\begin{macro}{\GLSsymbol} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\GLSsymbol}{\@ifstar\@sGLSsymbol\@GLSsymbol} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGLSsymbol}[1][]{\@GLSsymbol[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@GLSsymbol}[2][]{% \new@ifnextchar[{\@GLSsymbol@{#1}{#2}}{\@GLSsymbol@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@GLSsymbol@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('GLSsymbol shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentrysymbol{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % % \cs{glssymbolplural} behaves like \ics{gls} except it always uses the value % given by the \gloskey{symbolplural} key and it doesn't mark the entry as % used. %\begin{macro}{\glssymbolplural} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\glssymbolplural}{\@ifstar\@sglssymbolplural\@glssymbolplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sglssymbolplural}[1][]{\@glssymbolplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@glssymbolplural}[2][]{% \new@ifnextchar[{\@glssymbolplural@{#1}{#2}}{\@glssymbolplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@glssymbolplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \changes{1.12}{2008 Mar 8}{fixed bug ('glssymbolplural shouldn't use % 'gls@\meta{type}@display)} % \begin{macrocode} \protected@edef\@glo@text{\glsentrysymbolplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % % \cs{Glssymbolplural} behaves like \ics{glssymbolplural} except that the % first letter is converted to uppercase. %\begin{macro}{\Glssymbolplural} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Glssymbolplural}{\@ifstar\@sGlssymbolplural\@Glssymbolplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGlssymbolplural}[1][]{\@Glssymbolplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@Glssymbolplural}[2][]{% \new@ifnextchar[{\@Glssymbolplural@{#1}{#2}}{\@Glssymbolplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@Glssymbolplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentrysymbolplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % % \cs{GLSsymbolplural} behaves like \ics{glssymbolplural} except that the % link text is converted to uppercase. %\begin{macro}{\GLSsymbolplural} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\GLSsymbolplural}{\@ifstar\@sGLSsymbolplural\@GLSsymbolplural} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGLSsymbolplural}[1][]{\@GLSsymbolplural[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@GLSsymbolplural}[2][]{% \new@ifnextchar[{\@GLSsymbolplural@{#1}{#2}}{\@GLSsymbolplural@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@GLSsymbolplural@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentrysymbolplural{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \changes{1.13}{2008 May 10}{fixed bug that ignores 3rd parameter} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % % \cs{glsuseri} behaves like \ics{gls} except it always uses the value % given by the \gloskey{user1} key and it doesn't mark the entry % as used. %\begin{macro}{\glsuseri} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\glsuseri}{\@ifstar\@sglsuseri\@glsuseri} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sglsuseri}[1][]{\@glsuseri[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@glsuseri}[2][]{% \new@ifnextchar[{\@glsuseri@{#1}{#2}}{\@glsuseri@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@glsuseri@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryuseri{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % % \cs{Glsuseri} behaves like \ics{glsuseri} except that the % first letter is converted to uppercase. %\begin{macro}{\Glsuseri} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsuseri}{\@ifstar\@sGlsuseri\@Glsuseri} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGlsuseri}[1][]{\@Glsuseri[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@Glsuseri}[2][]{% \new@ifnextchar[{\@Glsuseri@{#1}{#2}}{\@Glsuseri@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@Glsuseri@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryuseri{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % % \cs{GLSuseri} behaves like \ics{glsuseri} except that the % link text is converted to uppercase. %\begin{macro}{\GLSuseri} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\GLSuseri}{\@ifstar\@sGLSuseri\@GLSuseri} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGLSuseri}[1][]{\@GLSuseri[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@GLSuseri}[2][]{% \new@ifnextchar[{\@GLSuseri@{#1}{#2}}{\@GLSuseri@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@GLSuseri@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryuseri{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % % \cs{glsuserii} behaves like \ics{gls} except it always uses the value % given by the \gloskey{user2} key and it doesn't mark the entry % as used. %\begin{macro}{\glsuserii} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\glsuserii}{\@ifstar\@sglsuserii\@glsuserii} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sglsuserii}[1][]{\@glsuserii[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@glsuserii}[2][]{% \new@ifnextchar[{\@glsuserii@{#1}{#2}}{\@glsuserii@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@glsuserii@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryuserii{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % % \cs{Glsuserii} behaves like \ics{glsuserii} except that the % first letter is converted to uppercase. %\begin{macro}{\Glsuserii} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsuserii}{\@ifstar\@sGlsuserii\@Glsuserii} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGlsuserii}[1][]{\@Glsuserii[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@Glsuserii}[2][]{% \new@ifnextchar[{\@Glsuserii@{#1}{#2}}{\@Glsuserii@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@Glsuserii@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryuserii{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % % \cs{GLSuserii} behaves like \ics{glsuserii} except that the % link text is converted to uppercase. %\begin{macro}{\GLSuserii} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\GLSuserii}{\@ifstar\@sGLSuserii\@GLSuserii} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGLSuserii}[1][]{\@GLSuserii[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@GLSuserii}[2][]{% \new@ifnextchar[{\@GLSuserii@{#1}{#2}}{\@GLSuserii@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@GLSuserii@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryuserii{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % % \cs{glsuseriii} behaves like \ics{gls} except it always uses the value % given by the \gloskey{user3} key and it doesn't mark the entry % as used. %\begin{macro}{\glsuseriii} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\glsuseriii}{\@ifstar\@sglsuseriii\@glsuseriii} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sglsuseriii}[1][]{\@glsuseriii[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@glsuseriii}[2][]{% \new@ifnextchar[{\@glsuseriii@{#1}{#2}}{\@glsuseriii@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@glsuseriii@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryuseriii{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % % \cs{Glsuseriii} behaves like \ics{glsuseriii} except that the % first letter is converted to uppercase. %\begin{macro}{\Glsuseriii} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsuseriii}{\@ifstar\@sGlsuseriii\@Glsuseriii} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGlsuseriii}[1][]{\@Glsuseriii[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@Glsuseriii}[2][]{% \new@ifnextchar[{\@Glsuseriii@{#1}{#2}}{\@Glsuseriii@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@Glsuseriii@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryuseriii{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % % \cs{GLSuseriii} behaves like \ics{glsuseriii} except that the % link text is converted to uppercase. %\begin{macro}{\GLSuseriii} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\GLSuseriii}{\@ifstar\@sGLSuseriii\@GLSuseriii} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGLSuseriii}[1][]{\@GLSuseriii[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@GLSuseriii}[2][]{% \new@ifnextchar[{\@GLSuseriii@{#1}{#2}}{\@GLSuseriii@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@GLSuseriii@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryuseriii{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % % \cs{glsuseriv} behaves like \ics{gls} except it always uses the value % given by the \gloskey{user4} key and it doesn't mark the entry % as used. %\begin{macro}{\glsuseriv} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\glsuseriv}{\@ifstar\@sglsuseriv\@glsuseriv} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sglsuseriv}[1][]{\@glsuseriv[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@glsuseriv}[2][]{% \new@ifnextchar[{\@glsuseriv@{#1}{#2}}{\@glsuseriv@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@glsuseriv@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryuseriv{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % % \cs{Glsuseriv} behaves like \ics{glsuseriv} except that the % first letter is converted to uppercase. %\begin{macro}{\Glsuseriv} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsuseriv}{\@ifstar\@sGlsuseriv\@Glsuseriv} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGlsuseriv}[1][]{\@Glsuseriv[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@Glsuseriv}[2][]{% \new@ifnextchar[{\@Glsuseriv@{#1}{#2}}{\@Glsuseriv@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@Glsuseriv@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryuseriv{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % % \cs{GLSuseriv} behaves like \ics{glsuseriv} except that the % link text is converted to uppercase. %\begin{macro}{\GLSuseriv} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\GLSuseriv}{\@ifstar\@sGLSuseriv\@GLSuseriv} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGLSuseriv}[1][]{\@GLSuseriv[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@GLSuseriv}[2][]{% \new@ifnextchar[{\@GLSuseriv@{#1}{#2}}{\@GLSuseriv@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@GLSuseriv@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryuseriv{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % % \cs{glsuserv} behaves like \ics{gls} except it always uses the value % given by the \gloskey{user5} key and it doesn't mark the entry % as used. %\begin{macro}{\glsuserv} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\glsuserv}{\@ifstar\@sglsuserv\@glsuserv} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sglsuserv}[1][]{\@glsuserv[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@glsuserv}[2][]{% \new@ifnextchar[{\@glsuserv@{#1}{#2}}{\@glsuserv@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@glsuserv@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryuserv{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % % \cs{Glsuserv} behaves like \ics{glsuserv} except that the % first letter is converted to uppercase. %\begin{macro}{\Glsuserv} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsuserv}{\@ifstar\@sGlsuserv\@Glsuserv} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGlsuserv}[1][]{\@Glsuserv[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@Glsuserv}[2][]{% \new@ifnextchar[{\@Glsuserv@{#1}{#2}}{\@Glsuserv@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@Glsuserv@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryuserv{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % % \cs{GLSuserv} behaves like \ics{glsuserv} except that the % link text is converted to uppercase. %\begin{macro}{\GLSuserv} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\GLSuserv}{\@ifstar\@sGLSuserv\@GLSuserv} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGLSuserv}[1][]{\@GLSuserv[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@GLSuserv}[2][]{% \new@ifnextchar[{\@GLSuserv@{#1}{#2}}{\@GLSuserv@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@GLSuserv@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryuserv{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % % \cs{glsuservi} behaves like \ics{gls} except it always uses the value % given by the \gloskey{user6} key and it doesn't mark the entry % as used. %\begin{macro}{\glsuservi} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\glsuservi}{\@ifstar\@sglsuservi\@glsuservi} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sglsuservi}[1][]{\@glsuservi[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@glsuservi}[2][]{% \new@ifnextchar[{\@glsuservi@{#1}{#2}}{\@glsuservi@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@glsuservi@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryuservi{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % % \cs{Glsuservi} behaves like \ics{glsuservi} except that the % first letter is converted to uppercase. %\begin{macro}{\Glsuservi} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Glsuservi}{\@ifstar\@sGlsuservi\@Glsuservi} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGlsuservi}[1][]{\@Glsuservi[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@Glsuservi}[2][]{% \new@ifnextchar[{\@Glsuservi@{#1}{#2}}{\@Glsuservi@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@Glsuservi@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryuservi{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}#3}% }% } % \end{macrocode} % % \cs{GLSuservi} behaves like \ics{glsuservi} except that the % link text is converted to uppercase. %\begin{macro}{\GLSuservi} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\GLSuservi}{\@ifstar\@sGLSuservi\@GLSuservi} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\@sGLSuservi}[1][]{\@GLSuservi[hyper=false,#1]} % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\@GLSuservi}[2][]{% \new@ifnextchar[{\@GLSuservi@{#1}{#2}}{\@GLSuservi@{#1}{#2}[]}} % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@GLSuservi@#1#2[#3]{% \glsdoifexists{#2}{\edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryuservi{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % % Now deal with acronym related keys. First the short form: %\begin{macro}{\acrshort} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\acrshort}{\@ifstar\s@acrshort\ns@acrshort} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\s@acrshort}[2][]{% \new@ifnextchar[{\@acrshort{hyper=false,#1}{#2}}% {\@acrshort{hyper=false,#1}{#2}[]}% } % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\ns@acrshort}[2][]{% \new@ifnextchar[{\@acrshort{#1}{#2}}{\@acrshort{#1}{#2}[]}% } % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@acrshort#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryshort{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\acronymfont{\@glo@text}#3}% }% } % \end{macrocode} % %\begin{macro}{\Acrshort} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Acrshort}{\@ifstar\s@Acrshort\ns@Acrshort} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\s@Acrshort}[2][]{% \new@ifnextchar[{\@Acrshort{hyper=false,#1}{#2}}% {\@Acrshort{hyper=false,#1}{#2}[]}% } % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\ns@Acrshort}[2][]{% \new@ifnextchar[{\@Acrshort{#1}{#2}}{\@Acrshort{#1}{#2}[]}% } % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@Acrshort#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryshort{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}% {% \acronymfont{\expandafter\makefirstuc\expandafter{\@glo@text}}#3% }% }% } % \end{macrocode} % %\begin{macro}{\ACRshort} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\ACRshort}{\@ifstar\s@ACRshort\ns@ACRshort} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\s@ACRshort}[2][]{% \new@ifnextchar[{\@ACRshort{hyper=false,#1}{#2}}% {\@ACRshort{hyper=false,#1}{#2}[]}% } % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\ns@ACRshort}[2][]{% \new@ifnextchar[{\@ACRshort{#1}{#2}}{\@ACRshort{#1}{#2}[]}% } % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@ACRshort#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryshort{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\acronymfont{\MakeUppercase{\@glo@text#3}}}% }% } % \end{macrocode} % % Short plural: %\begin{macro}{\acrshortpl} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\acrshortpl}{\@ifstar\s@acrshortpl\ns@acrshortpl} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\s@acrshortpl}[2][]{% \new@ifnextchar[{\@acrshortpl{hyper=false,#1}{#2}}% {\@acrshortpl{hyper=false,#1}{#2}[]}% } % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\ns@acrshortpl}[2][]{% \new@ifnextchar[{\@acrshortpl{#1}{#2}}{\@acrshortpl{#1}{#2}[]}% } % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@acrshortpl#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryshortpl{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\acronymfont{\@glo@text}#3}% }% } % \end{macrocode} % %\begin{macro}{\Acrshortpl} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Acrshortpl}{\@ifstar\s@Acrshortpl\ns@Acrshortpl} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\s@Acrshortpl}[2][]{% \new@ifnextchar[{\@Acrshortpl{hyper=false,#1}{#2}}% {\@Acrshortpl{hyper=false,#1}{#2}[]}% } % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\ns@Acrshortpl}[2][]{% \new@ifnextchar[{\@Acrshortpl{#1}{#2}}{\@Acrshortpl{#1}{#2}[]}% } % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@Acrshortpl#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryshortpl{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}% {% \acronymfont{\expandafter\makefirstuc\expandafter{\@glo@text}}#3% }% }% } % \end{macrocode} % %\begin{macro}{\ACRshortpl} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\ACRshortpl}{\@ifstar\s@ACRshortpl\ns@ACRshortpl} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\s@ACRshortpl}[2][]{% \new@ifnextchar[{\@ACRshortpl{hyper=false,#1}{#2}}% {\@ACRshortpl{hyper=false,#1}{#2}[]}% } % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\ns@ACRshortpl}[2][]{% \new@ifnextchar[{\@ACRshortpl{#1}{#2}}{\@ACRshortpl{#1}{#2}[]}% } % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@ACRshortpl#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentryshortpl{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\acronymfont{\MakeUppercase{\@glo@text#3}}}% }% } % \end{macrocode} % %\begin{macro}{\acrlong} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\acrlong}{\@ifstar\s@acrlong\ns@acrlong} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\s@acrlong}[2][]{% \new@ifnextchar[{\@acrlong{hyper=false,#1}{#2}}% {\@acrlong{hyper=false,#1}{#2}[]}% } % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\ns@acrlong}[2][]{% \new@ifnextchar[{\@acrlong{#1}{#2}}{\@acrlong{#1}{#2}[]}% } % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@acrlong#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentrylong{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % %\begin{macro}{\Acrlong} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Acrlong}{\@ifstar\s@Acrlong\ns@Acrlong} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\s@Acrlong}[2][]{% \new@ifnextchar[{\@Acrlong{hyper=false,#1}{#2}}% {\@Acrlong{hyper=false,#1}{#2}[]}% } % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\ns@Acrlong}[2][]{% \new@ifnextchar[{\@Acrlong{#1}{#2}}{\@Acrlong{#1}{#2}[]}% } % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@Acrlong#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentrylong{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}% {% \expandafter\makefirstuc\expandafter{\@glo@text}#3% }% }% } % \end{macrocode} % %\begin{macro}{\ACRlong} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\ACRlong}{\@ifstar\s@ACRlong\ns@ACRlong} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\s@ACRlong}[2][]{% \new@ifnextchar[{\@ACRlong{hyper=false,#1}{#2}}% {\@ACRlong{hyper=false,#1}{#2}[]}% } % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\ns@ACRlong}[2][]{% \new@ifnextchar[{\@ACRlong{#1}{#2}}{\@ACRlong{#1}{#2}[]}% } % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@ACRlong#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentrylong{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % % Short plural: %\begin{macro}{\acrlongpl} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\acrlongpl}{\@ifstar\s@acrlongpl\ns@acrlongpl} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\s@acrlongpl}[2][]{% \new@ifnextchar[{\@acrlongpl{hyper=false,#1}{#2}}% {\@acrlongpl{hyper=false,#1}{#2}[]}% } % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\ns@acrlongpl}[2][]{% \new@ifnextchar[{\@acrlongpl{#1}{#2}}{\@acrlongpl{#1}{#2}[]}% } % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@acrlongpl#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentrylongpl{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} % %\begin{macro}{\Acrlongpl} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Acrlongpl}{\@ifstar\s@Acrlongpl\ns@Acrlongpl} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\s@Acrlongpl}[2][]{% \new@ifnextchar[{\@Acrlongpl{hyper=false#1}{#2}}% {\@Acrlongpl{hyper=false,#1}{#2}[]}% } % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\ns@Acrlongpl}[2][]{% \new@ifnextchar[{\@Acrlongpl{#1}{#2}}{\@Acrlongpl{#1}{#2}[]}% } % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@Acrlongpl#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentrylongpl{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}% {% \expandafter\makefirstuc\expandafter{\@glo@text}#3% }% }% } % \end{macrocode} % %\begin{macro}{\ACRlongpl} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\ACRlongpl}{\@ifstar\s@ACRlongpl\ns@ACRlongpl} % \end{macrocode} %\end{macro} % Define the starred form: % \begin{macrocode} \newcommand*{\s@ACRlongpl}[2][]{% \new@ifnextchar[{\@ACRlongpl{hyper=false,#1}{#2}}% {\@ACRlongpl{hyper=false,#1}{#2}[]}% } % \end{macrocode} % Defined the un-starred form. Need to determine if there is % a final optional argument % \begin{macrocode} \newcommand*{\ns@ACRlongpl}[2][]{% \new@ifnextchar[{\@ACRlongpl{#1}{#2}}{\@ACRlongpl{#1}{#2}[]}% } % \end{macrocode} % Read in the final optional argument: % \begin{macrocode} \def\@ACRlongpl#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \protected@edef\@glo@text{\glsentrylongpl{#2}}% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text#3}}% }% } % \end{macrocode} % % \subsubsection{Displaying entry details without adding % information to the glossary} %\label{sec:code:glsnolink} % % These commands merely display entry information without adding % entries in the associated file or having hyperlinks. % % Get the entry name (as specified by the \gloskey{name} key % when the entry was defined). The argument % is the label associated with the entry. Note that unless you % used \texttt{name=false} in the \pkgopt{sanitize} package option % you may get unexpected results if the \gloskey{name} key contains % any commands. %\begin{macro}{\glsentryname} % \begin{macrocode} \newcommand*{\glsentryname}[1]{\csname glo@#1@name\endcsname} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryname} % \begin{macrocode} \newcommand*{\Glsentryname}[1]{% \protected@edef\@glo@text{\csname glo@#1@name\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} % \end{macrocode} %\end{macro} % % Get the entry description (as specified by the % \gloskey{description} when the entry was defined). The argument % is the label associated with the entry. Note that unless you % used \texttt{description=false} in the \pkgopt{sanitize} package % option you may get unexpected results if the \gloskey{description} % key contained any commands. %\begin{macro}{\glsentrydesc} % \begin{macrocode} \newcommand*{\glsentrydesc}[1]{\csname glo@#1@desc\endcsname} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentrydesc} % \begin{macrocode} \newcommand*{\Glsentrydesc}[1]{% \protected@edef\@glo@text{\csname glo@#1@desc\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} % \end{macrocode} %\end{macro} % Plural form: %\begin{macro}{\glsentrydescplural} %\changes{1.12}{2008 Mar 8}{New} % \begin{macrocode} \newcommand*{\glsentrydescplural}[1]{% \csname glo@#1@descplural\endcsname} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentrydescplural} %\changes{1.12}{2008 Mar 8}{New} % \begin{macrocode} \newcommand*{\Glsentrydescplural}[1]{% \protected@edef\@glo@text{\csname glo@#1@descplural\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} % \end{macrocode} %\end{macro} % % Get the entry text, as specified by the \gloskey{text} key when % the entry was defined. The argument % is the label associated with the entry: %\begin{macro}{\glsentrytext} % \begin{macrocode} \newcommand*{\glsentrytext}[1]{\csname glo@#1@text\endcsname} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentrytext} % \begin{macrocode} \newcommand*{\Glsentrytext}[1]{% \protected@edef\@glo@text{\csname glo@#1@text\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} % \end{macrocode} %\end{macro} % % Get the plural form: %\begin{macro}{\glsentryplural} % \begin{macrocode} \newcommand*{\glsentryplural}[1]{\csname glo@#1@plural\endcsname} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryplural} % \begin{macrocode} \newcommand*{\Glsentryplural}[1]{% \protected@edef\@glo@text{\csname glo@#1@plural\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} % \end{macrocode} %\end{macro} % % Get the symbol associated with this entry. The argument % is the label associated with the entry. Note that unless you % used \texttt{symbol=false} in the \pkgopt{sanitize} package % option you may get unexpected results if the \gloskey{symbol} % key contained any commands. %\begin{macro}{\glsentrysymbol} % \begin{macrocode} \newcommand*{\glsentrysymbol}[1]{\csname glo@#1@symbol\endcsname} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentrysymbol} % \begin{macrocode} \newcommand*{\Glsentrysymbol}[1]{% \protected@edef\@glo@text{\csname glo@#1@symbol\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} % \end{macrocode} %\end{macro} % Plural form: %\begin{macro}{\glsentrysymbolplural} %\changes{1.12}{2008 Mar 8}{New} % \begin{macrocode} \newcommand*{\glsentrysymbolplural}[1]{% \csname glo@#1@symbolplural\endcsname} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentrysymbolplural} %\changes{1.12}{2008 Mar 8}{New} % \begin{macrocode} \newcommand*{\Glsentrysymbolplural}[1]{% \protected@edef\@glo@text{\csname glo@#1@symbolplural\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} % \end{macrocode} %\end{macro} % % Get the entry text to be used when the entry is first used in % the document (as specified by the \gloskey{first} key when % the entry was defined). %\begin{macro}{\glsentryfirst} % \begin{macrocode} \newcommand*{\glsentryfirst}[1]{\csname glo@#1@first\endcsname} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryfirst} % \begin{macrocode} \newcommand*{\Glsentryfirst}[1]{% \protected@edef\@glo@text{\csname glo@#1@first\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} % \end{macrocode} %\end{macro} % % Get the plural form (as specified by the \gloskey{firstplural} % key when the entry was defined). %\begin{macro}{\glsentryfirstplural} % \begin{macrocode} \newcommand*{\glsentryfirstplural}[1]{% \csname glo@#1@firstpl\endcsname} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryfirstplural} % \begin{macrocode} \newcommand*{\Glsentryfirstplural}[1]{% \protected@edef\@glo@text{\csname glo@#1@firstpl\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} % \end{macrocode} %\end{macro} % % Display the glossary type with which this entry is associated % (as specified by the \gloskey{type} key used when the entry was % defined) %\begin{macro}{\glsentrytype} % \begin{macrocode} \newcommand*{\glsentrytype}[1]{\csname glo@#1@type\endcsname} % \end{macrocode} %\end{macro} % % Display the sort text used for this entry. Note that the % \gloskey{sort} key is sanitize, so unexpected results may % occur if the \gloskey{sort} key contained commands. %\begin{macro}{\glsentrysort} % \begin{macrocode} \newcommand*{\glsentrysort}[1]{\csname glo@#1@sort\endcsname} % \end{macrocode} %\end{macro} % %\begin{macro}{\glsentryuseri} % Get the first user key (as specified by the % \gloskey{user1} when the entry was defined). The argument % is the label associated with the entry. %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\glsentryuseri}[1]{\csname glo@#1@useri\endcsname} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryuseri} %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\Glsentryuseri}[1]{% \protected@edef\@glo@text{\csname glo@#1@useri\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} % \end{macrocode} %\end{macro} % %\begin{macro}{\glsentryuserii} % Get the second user key (as specified by the % \gloskey{user2} when the entry was defined). The argument % is the label associated with the entry. %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\glsentryuserii}[1]{\csname glo@#1@userii\endcsname} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryuserii} %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\Glsentryuserii}[1]{% \protected@edef\@glo@text{\csname glo@#1@userii\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} % \end{macrocode} %\end{macro} % %\begin{macro}{\glsentryuseriii} % Get the third user key (as specified by the % \gloskey{user3} when the entry was defined). The argument % is the label associated with the entry. %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\glsentryuseriii}[1]{\csname glo@#1@useriii\endcsname} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryuseriii} %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\Glsentryuseriii}[1]{% \protected@edef\@glo@text{\csname glo@#1@useriii\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} % \end{macrocode} %\end{macro} % %\begin{macro}{\glsentryuseriv} % Get the fourth user key (as specified by the % \gloskey{user4} when the entry was defined). The argument % is the label associated with the entry. %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\glsentryuseriv}[1]{\csname glo@#1@useriv\endcsname} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryuseriv} %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\Glsentryuseriv}[1]{% \protected@edef\@glo@text{\csname glo@#1@useriv\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} % \end{macrocode} %\end{macro} % %\begin{macro}{\glsentryuserv} % Get the fifth user key (as specified by the % \gloskey{user5} when the entry was defined). The argument % is the label associated with the entry. %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\glsentryuserv}[1]{\csname glo@#1@userv\endcsname} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryuserv} %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\Glsentryuserv}[1]{% \protected@edef\@glo@text{\csname glo@#1@userv\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} % \end{macrocode} %\end{macro} % %\begin{macro}{\glsentryuservi} % Get the sixth user key (as specified by the % \gloskey{user6} when the entry was defined). The argument % is the label associated with the entry. %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\glsentryuservi}[1]{\csname glo@#1@uservi\endcsname} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryuservi} %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\Glsentryuservi}[1]{% \protected@edef\@glo@text{\csname glo@#1@uservi\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} % \end{macrocode} %\end{macro} % %\begin{macro}{\glsentryshort} % Get the short key (as specified by the % \gloskey{short} the entry was defined). The argument % is the label associated with the entry. %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} \newcommand*{\glsentryshort}[1]{\csname glo@#1@short\endcsname} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryshort} %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} \newcommand*{\Glsentryshort}[1]{% \protected@edef\@glo@text{\csname glo@#1@short\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} % \end{macrocode} %\end{macro} % %\begin{macro}{\glsentryshortpl} % Get the short plural key (as specified by the % \gloskey{shortplural} the entry was defined). The argument % is the label associated with the entry. %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} \newcommand*{\glsentryshortpl}[1]{\csname glo@#1@shortpl\endcsname} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryshortpl} %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} \newcommand*{\Glsentryshortpl}[1]{% \protected@edef\@glo@text{\csname glo@#1@shortpl\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} % \end{macrocode} %\end{macro} % %\begin{macro}{\glsentrylong} % Get the long key (as specified by the % \gloskey{long} the entry was defined). The argument % is the label associated with the entry. %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} \newcommand*{\glsentrylong}[1]{\csname glo@#1@long\endcsname} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentrylong} %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} \newcommand*{\Glsentrylong}[1]{% \protected@edef\@glo@text{\csname glo@#1@long\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} % \end{macrocode} %\end{macro} % %\begin{macro}{\glsentrylongpl} % Get the long plural key (as specified by the % \gloskey{longplural} the entry was defined). The argument % is the label associated with the entry. %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} \newcommand*{\glsentrylongpl}[1]{\csname glo@#1@longpl\endcsname} % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentrylongpl} %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} \newcommand*{\Glsentrylongpl}[1]{% \protected@edef\@glo@text{\csname glo@#1@longpl\endcsname}% \expandafter\makefirstuc\expandafter{\@glo@text}} % \end{macrocode} %\end{macro} % % Short cut macros to access full form: %\begin{macro}{\glsentryfull} % \begin{macrocode} \newcommand*{\glsentryfull}[1]{% \glsentrylong{#1}\space(\glsentryshort{#1})% } % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryfull} % \begin{macrocode} \newcommand*{\Glsentryfull}[1]{% \Glsentrylong{#1}\space(\glsentryshortpl{#1})% } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentryfullpl} % \begin{macrocode} \newcommand*{\glsentryfullpl}[1]{% \glsentrylongpl{#1}\space(\glsentryshort{#1})% } % \end{macrocode} %\end{macro} %\begin{macro}{\Glsentryfullpl} % \begin{macrocode} \newcommand*{\Glsentryfullpl}[1]{% \Glsentrylongpl{#1}\space(\glsentryshortpl{#1})% } % \end{macrocode} %\end{macro} % %\begin{macro}{\glshyperlink} % Provide a hyperlink to a glossary entry without adding information % to the glossary file. The entry needs to be added using a % command like \ics{glslink} or \ics{glsadd} to ensure that % the target is defined. The first (optional) argument specifies % the link text. The entry name is used by default. The second % argument is the entry label. %\changes{1.17}{2008 December 26}{new} %\changes{3.0}{2011/04/02}{changed default from \cs{glsentryname} %to \cs{glsentrytext}} % \begin{macrocode} \newcommand*{\glshyperlink}[2][\glsentrytext{\@glo@label}]{% \def\@glo@label{#2}% \@glslink{glo:#2}{#1}} % \end{macrocode} %\end{macro} % %\subsection{Adding an entry to the glossary without generating % text} % The following keys are provided for \cs{glsadd} and % \cs{glsaddall}: % \begin{macrocode} \define@key{glossadd}{counter}{\def\@gls@counter{#1}} % \end{macrocode} %\changes{2.07}{2010 Jul 10}{glssadd format key stored in \cs{@glsnumberformat} %(was mistakenly stored in \cs{@glo@format})} % \begin{macrocode} \define@key{glossadd}{format}{\def\@glsnumberformat{#1}} % \end{macrocode} % This key is only used by \cs{glsaddall}: % \begin{macrocode} \define@key{glossadd}{types}{\def\@glo@type{#1}} % \end{macrocode} %\vskip5pt %\cs{glsadd}\oarg{options}\marg{label}\\[10pt] % Add a term to the glossary without generating any link text. % The optional argument indicates which counter to use, % and how to format it (using a key-value list) % the second argument is the entry label. Note that \meta{options} % only has two keys: \gloskey[glsadd]{counter} and \gloskey[glsadd]{format} (the \gloskey[glsaddall]{types} key will be ignored). %\begin{macro}{\glsadd} %\changes{1.07}{2007 Sep 13}{fixed bug caused by \cs{theglsentrycounter} setting the page number too soon} %\changes{2.04}{2009 November 10}{fixed bug that ignored counter} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\glsadd}[2][]{% \glsdoifexists{#2}% {% \def\@glsnumberformat{glsnumberformat}% \edef\@gls@counter{\csname glo@#2@counter\endcsname}% \setkeys{glossadd}{#1}% % \end{macrocode} % Store the entry's counter in \cs{theglsentrycounter} %\changes{3.0}{2011/04/02}{added \cs{@gls@saveentrycounter}} % \begin{macrocode} \@gls@saveentrycounter \@do@wrglossary{#2}% }% } % \end{macrocode} %\end{macro} %\vskip5pt %\cs{glsaddall}\oarg{glossary list}\\[10pt] % Add all terms defined for the listed glossaries (without displaying % any text). If \gloskey[glsaddall]{types} key is omitted, apply to all % glossary types. %\begin{macro}{\glsaddall} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\glsaddall}[1][]{% \edef\@glo@type{\@glo@types}% \setkeys{glossadd}{#1}% \forallglsentries[\@glo@type]{\@glo@entry}{% \glsadd[#1]{\@glo@entry}}% } % \end{macrocode} %\end{macro} % %\subsection{Creating associated files} % The \cs{writeist} command creates the associated % customized \filetype{.ist} \app{makeindex} style file. % While defining this command, some characters have their % catcodes temporarily changed to ensure they get written to % the \filetype{.ist} file correctly. The \app{makeindex} % actual character (usually "@") is redefined to be a "?", to allow % internal commands to be written to the glossary file output file. % % The special characters\mkidxspch\ are stored in \cs{@gls@actualchar}, % \cs{@gls@encapchar}, \cs{@glsl@levelchar} and % \cs{@gls@quotechar} to make them easier to use later, % but don't change these values, because the characters are % encoded in the command definitions that are used to escape % the special characters (which means that the user no longer % needs to worry about \app{makeindex} special characters). % % The symbols and numbers label for group headings are hardwired into % the \filetype{.ist} file as \texttt{glssymbols} and % \texttt{glsnumbers}, the group titles can be translated % (so that \ics{glssymbolsgroupname} replaces \texttt{glssymbols} % and \ics{glsnumbersgroupname} replaces \texttt{glsnumbers}) % using the command \ics{glsgetgrouptitle} which is % defined in \isty{glossary-hypernav}. This is done to prevent % any problem characters in \ics{glssymbolsgroupname} % and \ics{glsnumbersgroupname} from breaking hyperlinks. % %\begin{macro}{\glsopenbrace} % Define \cs{glsopenbrace} to make it easier to write an opening % brace to a file. % \begin{macrocode} \edef\glsopenbrace{\expandafter\@gobble\string\{} % \end{macrocode} %\end{macro} %\begin{macro}{\glsclosebrace} % Define \cs{glsclosebrace} to make it easier to write an opening % brace to a file. % \begin{macrocode} \edef\glsclosebrace{\expandafter\@gobble\string\}} % \end{macrocode} %\end{macro} %\begin{macro}{\glsquote} % Define command that makes it easier to write quote marks to % a file in the event that the double quote character has been % made active. % \begin{macrocode} \edef\glsquote#1{\string"#1\string"} % \end{macrocode} %\end{macro} % %\begin{macro}{\@glsfirstletter} % Define the first letter to come after the digits 0,\ldots,9. % Only required for \app{xindy}. % \begin{macrocode} \ifglsxindy \newcommand*{\@glsfirstletter}{A} \fi % \end{macrocode} %\end{macro} %\begin{macro}{\GlsSetXdyFirstLetterAfterDigits} % Sets the first letter to come after the digits 0,\ldots,9. % \begin{macrocode} \ifglsxindy \newcommand*{\GlsSetXdyFirstLetterAfterDigits}[1]{% \renewcommand*{\@glsfirstletter}{#1}} \else \newcommand*{\GlsSetXdyFirstLetterAfterDigits}[1]{% \glsnoxindywarning\GlsSetXdyFirstLetterAfterDigits} \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\@glsminrange} % Define the minimum number of successive location references % to merge into a range. % \begin{macrocode} \newcommand*{\@glsminrange}{2} % \end{macrocode} %\end{macro} %\begin{macro}{\GlsSetXdyMinRangeLength} % Set the minimum range length. The value must either be "none" % or a positive integer. The \sty{glossaries} package doesn't % check if the argument is valid, that is left to \app{xindy}. % \begin{macrocode} \ifglsxindy \newcommand*{\GlsSetXdyMinRangeLength}[1]{% \renewcommand*{\@glsminrange}{#1}} \else \newcommand*{\GlsSetXdyMinRangeLength}[1]{% \glsnoxindywarning\GlsSetXdyMinRangeLength} \fi % \end{macrocode} %\end{macro} %\begin{macro}{\writeist} %\changes{1.17}{2008 December 26}{added xindy support} %\changes{1.01}{2007 May 17}{Added spaces after 'delimN and 'delimR in ist file}% %\changes{3.0}{2011/04/02}{modified to support new format} % \begin{macrocode} \ifglsxindy % \end{macrocode} % Code to use if \app{xindy} is required. % \begin{macrocode} \def\writeist{% % \end{macrocode} % Update attributes list % \begin{macrocode} \@gls@addpredefinedattributes % \end{macrocode} % Open the file. % \begin{macrocode} \openout\glswrite=\istfilename % \end{macrocode} % Write header comment at the start of the file % \begin{macrocode} \write\glswrite{;; xindy style file created by the glossaries package}% \write\glswrite{;; for document '\jobname' on \the\year-\the\month-\the\day}% % \end{macrocode} % Specify the required styles % \begin{macrocode} \write\glswrite{^^J; required styles^^J} \@for\@xdystyle:=\@xdyrequiredstyles\do{% \ifx\@xdystyle\@empty \else \protected@write\glswrite{}{(require \string"\@xdystyle.xdy\string")}% \fi }% % \end{macrocode} % List the allowed attributes (possible values used by the % \gloskey{format} key) % \begin{macrocode} \write\glswrite{^^J% ; list of allowed attributes (number formats)^^J}% \write\glswrite{(define-attributes ((\@xdyattributes)))}% % \end{macrocode} % Define any additional alphabets % \begin{macrocode} \write\glswrite{^^J; user defined alphabets^^J}% \write\glswrite{\@xdyuseralphabets}% % \end{macrocode} % Define location classes. % \begin{macrocode} \write\glswrite{^^J; location class definitions^^J}% % \end{macrocode} % As from version 3.0, locations are now specified as % \marg{Hprefix}\marg{number}, so need to add all possible % combinations of location types. % \begin{macrocode} \@for\@gls@classI:=\@gls@xdy@locationlist\do{% % \end{macrocode} % Case were \meta{Hprefix} is empty: % \begin{macrocode} \protected@write\glswrite{}{(define-location-class \string"\@gls@classI\string"^^J\space\space\space ( :sep "{}{" \csname @gls@xdy@Lclass@\@gls@classI\endcsname\space :sep "}" ) ^^J\space\space\space :min-range-length \@glsminrange^^J% ) }% % \end{macrocode} % Nested iteration over all classes: % \begin{macrocode} {% \@for\@gls@classII:=\@gls@xdy@locationlist\do{% \protected@write\glswrite{}{(define-location-class \string"\@gls@classII-\@gls@classI\string" ^^J\space\space\space ( :sep "{" \csname @gls@xdy@Lclass@\@gls@classII\endcsname\space :sep "}{" \csname @gls@xdy@Lclass@\@gls@classI\endcsname\space :sep "}" ) ^^J\space\space\space :min-range-length \@glsminrange^^J% ) }% }% }% }% % \end{macrocode} % User defined location classes (needs checking for new location format). % \begin{macrocode} \write\glswrite{^^J; user defined location classes}% \write\glswrite{\@xdyuserlocationdefs}% % \end{macrocode} % Cross-reference class. (The unverified option is used as the % cross-references are supplied using the list of labels along with % the optional argument for \ics{glsseeformat} which % \app{xindy} won't recognise.) % \begin{macrocode} \write\glswrite{^^J; define cross-reference class^^J}% \write\glswrite{(define-crossref-class \string"see\string" :unverified )}% % \end{macrocode} % Define how cross-references should be displayed. This adds an % empty set of braces after the cross-referencing information % allowing for the final argument of \cs{glsseeformat} which % gets ignored. (When using \app{makeindex} this final argument % contains the location information which is not required.) % \begin{macrocode} \write\glswrite{(markup-crossref-list :class \string"see\string"^^J\space\space\space :open \string"\string\glsseeformat\string" :close \string"{}\string")}% % \end{macrocode} % List the order to sort the classes. % \begin{macrocode} \write\glswrite{^^J; define the order of the location classes}% \write\glswrite{(define-location-class-order (\@xdylocationclassorder))}% % \end{macrocode} % Specify what to write to the start and end of the glossary file. % \begin{macrocode} \write\glswrite{^^J; define the glossary markup^^J}% % \end{macrocode} %\changes{3.0}{2011/04/02}{added xindy-only macro definitions to %glossary open tag} % \begin{macrocode} \write\glswrite{(markup-index^^J\space\space\space :open \string"\string \glossarysection[\string\glossarytoctitle]{\string \glossarytitle}\string\glossarypreamble}% % \end{macrocode} % Add all the xindy-only macro definitions (needed to prevent errors % in the event that the user changes from \pkgopt{xindy} to % \pkgopt{makeindex}) % \begin{macrocode} \@for\@this@ctr:=\@xdycounters\do{% {% \@for\@this@attr:=\@xdyattributelist\do{% \protected@write\glswrite{}{\string\providecommand*% \expandafter\string \csname glsX\@this@ctr X\@this@attr\endcsname[2]% {% \string\setentrycounter [\expandafter\@gobble\string\#1]{\@this@ctr}% \expandafter\string \csname\@this@attr\endcsname {\expandafter\@gobble\string\#2}% }% }% }% }% }% % \end{macrocode} % Add the end part of the open tag and the rest of the markup-index % information: % \begin{macrocode} \write\glswrite{% \string\begin {theglossary}\string\glossaryheader\string~n\string" ^^J\space \space\space:close \string"\expandafter\@gobble \string\%\string~n\string \end{theglossary}\string\glossarypostamble \string~n\string" ^^J\space\space\space :tree)}% % \end{macrocode} % Specify what to put between letter groups % \begin{macrocode} \write\glswrite{(markup-letter-group-list :sep \string"\string\glsgroupskip\string~n\string")}% % \end{macrocode} % Specify what to put between entries % \begin{macrocode} \write\glswrite{(markup-indexentry :open \string"\string\relax \string\glsresetentrylist \string~n\string")}% % \end{macrocode} % Specify how to format entries % \begin{macrocode} \write\glswrite{(markup-locclass-list :open \string"\glsopenbrace\string\glossaryentrynumbers \glsopenbrace\string\relax\space \string"^^J\space\space\space :sep \string", \string" :close \string"\glsclosebrace\glsclosebrace\string")}% % \end{macrocode} % Specify how to separate location numbers % \begin{macrocode} \write\glswrite{(markup-locref-list :sep \string"\string\delimN\space\string")}% % \end{macrocode} % Specify how to indicate location ranges % \begin{macrocode} \write\glswrite{(markup-range :sep \string"\string\delimR\space\string")}% % \end{macrocode} % Specify 2-page and 3-page suffixes, if defined. % First, the values must be sanitized to write them explicity. % \begin{macrocode} \@onelevel@sanitize\gls@suffixF \@onelevel@sanitize\gls@suffixFF % \end{macrocode} % \begin{macrocode} \ifx\gls@suffixF\@empty \else \write\glswrite{(markup-range :close "\gls@suffixF" :length 1 :ignore-end)}% \fi \ifx\gls@suffixFF\@empty \else \write\glswrite{(markup-range :close "\gls@suffixFF" :length 2 :ignore-end)}% \fi % \end{macrocode} % Specify how to format locations. % \begin{macrocode} \write\glswrite{^^J; define format to use for locations^^J}% \write\glswrite{\@xdylocref}% % \end{macrocode} % Specify how to separate letter groups. % \begin{macrocode} \write\glswrite{^^J; define letter group list format^^J}% \write\glswrite{(markup-letter-group-list :sep \string"\string\glsgroupskip\string~n\string")}% % \end{macrocode} % Define letter group headings. % \begin{macrocode} \write\glswrite{^^J; letter group headings^^J}% \write\glswrite{(markup-letter-group :open-head \string"\string\glsgroupheading \glsopenbrace\string"^^J\space\space\space :close-head \string"\glsclosebrace\string")}% % \end{macrocode} % Define additional letter groups. % \begin{macrocode} \write\glswrite{^^J; additional letter groups^^J}% \write\glswrite{\@xdylettergroups}% % \end{macrocode} % Define additional sort rules % \begin{macrocode} \write\glswrite{^^J; additional sort rules^^J} \write\glswrite{\@xdysortrules}% % \end{macrocode} % Close the style file % \begin{macrocode} \closeout\glswrite % \end{macrocode} % Suppress any further calls. % \begin{macrocode} \let\writeist\relax } \else % \end{macrocode} % Code to use if \app{makeindex} is required. %\changes{2.01}{2009 May 30}{removed item\_02 - no such makeindex key} % \begin{macrocode} \edef\@gls@actualchar{\string?} \edef\@gls@encapchar{\string|} \edef\@gls@levelchar{\string!} \edef\@gls@quotechar{\string"} \def\writeist{\relax \openout\glswrite=\istfilename \write\glswrite{\expandafter\@gobble\string\% makeindex style file created by the glossaries package} \write\glswrite{\expandafter\@gobble\string\% for document '\jobname' on \the\year-\the\month-\the\day} \write\glswrite{actual '\@gls@actualchar'} \write\glswrite{encap '\@gls@encapchar'} \write\glswrite{level '\@gls@levelchar'} \write\glswrite{quote '\@gls@quotechar'} \write\glswrite{keyword \string"\string\\glossaryentry\string"} \write\glswrite{preamble \string"\string\\glossarysection[\string \\glossarytoctitle]{\string\\glossarytitle}\string \\glossarypreamble\string\n\string\\begin{theglossary}\string \\glossaryheader\string\n\string"} \write\glswrite{postamble \string"\string\%\string\n\string \\end{theglossary}\string\\glossarypostamble\string\n \string"} \write\glswrite{group_skip \string"\string\\glsgroupskip\string\n \string"} \write\glswrite{item_0 \string"\string\%\string\n\string"} \write\glswrite{item_1 \string"\string\%\string\n\string"} \write\glswrite{item_2 \string"\string\%\string\n\string"} \write\glswrite{item_01 \string"\string\%\string\n\string"} \write\glswrite{item_x1 \string"\string\\relax \string\\glsresetentrylist\string\n \string"} \write\glswrite{item_12 \string"\string\%\string\n\string"} \write\glswrite{item_x2 \string"\string\\relax \string\\glsresetentrylist\string\n \string"} % \end{macrocode} %\changes{2.05}{2010 Feb 6}{Added \cs{string} before opening % and closing braces. Patch provided by Segiu Dotenco} % \begin{macrocode} \write\glswrite{delim_0 \string"\string\{\string \\glossaryentrynumbers\string\{\string\\relax \string"} \write\glswrite{delim_1 \string"\string\{\string \\glossaryentrynumbers\string\{\string\\relax \string"} \write\glswrite{delim_2 \string"\string\{\string \\glossaryentrynumbers\string\{\string\\relax \string"} \write\glswrite{delim_t \string"\string\}\string\}\string"} \write\glswrite{delim_n \string"\string\\delimN \string"} \write\glswrite{delim_r \string"\string\\delimR \string"} \write\glswrite{headings_flag 1} \write\glswrite{heading_prefix \string"\string\\glsgroupheading\string\{\string"} \write\glswrite{heading_suffix \string"\string\}\string\\relax \string\\glsresetentrylist \string"} \write\glswrite{symhead_positive \string"glssymbols\string"} \write\glswrite{numhead_positive \string"glsnumbers\string"} \write\glswrite{page_compositor \string"\glscompositor\string"} \@gls@escbsdq\gls@suffixF \@gls@escbsdq\gls@suffixFF \ifx\gls@suffixF\@empty \else \write\glswrite{suffix_2p \string"\gls@suffixF\string"} \fi \ifx\gls@suffixFF\@empty \else \write\glswrite{suffix_3p \string"\gls@suffixFF\string"} \fi \closeout\glswrite \let\writeist\relax } \fi % \end{macrocode} %\end{macro} % %The command \cs{noist} will suppress the creation of % the \filetype{.ist} file. Obviously you need to use this % command before \cs{writeist} to have any effect. %\begin{macro}{\noist} % \begin{macrocode} \newcommand{\noist}{% % \end{macrocode} % Update attributes list % \begin{macrocode} \@gls@addpredefinedattributes \let\writeist\relax } % \end{macrocode} %\end{macro} % % \cs{@makeglossary} is an internal command that takes an % argument indicating the glossary type. This command will % create the glossary file required by \app{makeindex} for the % given glossary type, using the extension supplied by the % \meta{out-ext} parameter used in \ics{newglossary} % (and it will also activate the \ics{glossary} command, % and create the customized \filetype{.ist} \app{makeindex} % style file). % % Note that you can't use \cs{@makeglossary} for only some of the % defined glossaries. You either need to have a \cs{makeglossary} % for all glossaries or none (otherwise you will end up with a % situation where \TeX\ is trying to write to a non-existant % file). The relevant glossary must be % defined prior to using \cs{@makeglossary}. %\begin{macro}{\@makeglossary} % \begin{macrocode} \newcommand*{\@makeglossary}[1]{% \ifglossaryexists{#1}% {% % \end{macrocode} % Only create a new write if \pkgopt[false]{savewrites} otherwise % create a token to collect the information. %\changes{3.0}{2010 Jul 12}{Added check for \pkgopt{savewrites}} % \begin{macrocode} \ifglssavewrites \expandafter\newtoks\csname glo@#1@filetok\endcsname \else \expandafter\newwrite\csname glo@#1@file\endcsname \expandafter\@glsopenfile\csname glo@#1@file\endcsname{#1}% \fi \@gls@renewglossary \writeist }% {% \PackageError{glossaries}% {Glossary type `#1' not defined}% {New glossaries must be defined before using \string\makeglossary}% }% } % \end{macrocode} %\end{macro} % %\begin{macro}{\@glsopenfile} % Open write file associated with the given glossary. % \begin{macrocode} \newcommand*{\@glsopenfile}[2]{% \immediate\openout#1=\jobname.\csname @glotype@#2@out\endcsname \PackageInfo{glossaries}{Writing glossary file \jobname.\csname @glotype@#2@out\endcsname}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\warn@nomakeglossaries} % Issue warning that \cs{makeglossaries} hasn't been used. % \begin{macrocode} \newcommand*{\warn@nomakeglossaries}{% \GlossariesWarningNoLine{\string\makeglossaries\space hasn't been used,^^Jthe glossaries will not be updated}% } % \end{macrocode} %\end{macro} % % \cs{makeglossaries} will use \cs{@makeglossary} % for each glossary type that has been defined. New glossaries % need to be defined before using \cs{makeglossary}, so % have \cs{makeglossaries} redefine \cs{newglossary} % to prevent it being used afterwards. %\begin{macro}{\makeglossaries} % \begin{macrocode} \newcommand*{\makeglossaries}{% % \end{macrocode} % Write the name of the style file to the aux file % (needed by \app{makeglossaries}) % \begin{macrocode} \protected@write\@auxout{}{\string\@istfilename{\istfilename}}% \protected@write\@auxout{}{\string\@glsorder{\glsorder}} % \end{macrocode} % Iterate through each glossary type and activate it. % \begin{macrocode} \@for\@glo@type:=\@glo@types\do{% \ifthenelse{\equal{\@glo@type}{}}{}{% \@makeglossary{\@glo@type}}% }% % \end{macrocode} % New glossaries must be created before \cs{makeglossaries} % so disable \ics{newglossary}. % \begin{macrocode} \renewcommand*\newglossary[4][]{% \PackageError{glossaries}{New glossaries must be created before \string\makeglossaries}{You need to move \string\makeglossaries\space after all your \string\newglossary\space commands}}% % \end{macrocode} % Any subsequence instances of this command should have no effect % \begin{macrocode} \let\@makeglossary\relax \let\makeglossary\relax \let\makeglossaries\relax % \end{macrocode} % Disable all commands that have no effect after \cs{makeglossaries} % \begin{macrocode} \@disable@onlypremakeg % \end{macrocode} % Suppress warning about no \cs{makeglossaries} % \begin{macrocode} \let\warn@nomakeglossaries\relax } % \end{macrocode} %\end{macro} % % The \cs{makeglossary} command is redefined to be % identical to \cs{makeglossaries}. (This is done to % reinforce the message that you must either use % \cs{@makeglossary} for all the glossaries or for none % of them.) %\begin{macro}{\makeglossary} % \begin{macrocode} \let\makeglossary\makeglossaries % \end{macrocode} %\end{macro} % % If \ics{makeglossaries} hasn't been used, issue a warning. % Also issue a warning if neither \ics{printglossaries} nor % \ics{printglossary} have been used. % \begin{macrocode} \AtEndDocument{% \warn@nomakeglossaries \warn@noprintglossary } % \end{macrocode} % %\subsection{Writing information to associated files} % % %\begin{macro}{\glswrite} % The write used for style file also used for all other output files % if \pkgopt[true]{savewrites}. % \begin{macrocode} \newwrite\glswrite % \end{macrocode} %\end{macro} %\begin{macro}{\istfile} %\changes{3.0}{2011/04/02}{deprecated} % Deprecated. % \begin{macrocode} \def\istfile{\glswrite} % \end{macrocode} %\end{macro} % % At the end of the document, the files should be created if % \pkgopt[true]{savewrites}. % \begin{macrocode} \AtEndDocument{% \glswritefiles } % \end{macrocode} %\begin{macro}{\glswritefiles} % Only write the files if \pkgopt[true]{savewrites} % \begin{macrocode} \ifglssavewrites \newcommand*{\glswritefiles}{% % \end{macrocode} % Iterate through all the glossaries %\changes{3.01}{2011/04/12}{added check for empty glossaries} % \begin{macrocode} \forallglossaries{\@glo@type}{% \edef\gls@tmp{\expandafter\the\csname glo@\@glo@type @filetok\endcsname}% \ifx\gls@tmp\@empty \ifx\@glo@type\glsdefaulttype \GlossariesWarningNoLine{Glossary `\@glo@type' has no entries.^^JRemember to use package option `nomain' if you don't want to^^Juse the main glossary}% \else \GlossariesWarningNoLine{Glossary `\@glo@type' has no entries}% \fi \else \@glsopenfile{\glswrite}{\@glo@type}% \immediate\write\glswrite{% \expandafter\the\csname glo@\@glo@type @filetok\endcsname}% \immediate\closeout\glswrite \fi }% } \else \let\glswritefiles\relax \fi % \end{macrocode} %\end{macro} % % The \cs{glossary} command is redefined so that it takes an % optional argument \meta{type} to specify the glossary type (use % \cs{glsdefaulttype} glossary by default). % This shouldn't be used at user level % as \cs{glslink} sets the correct format. The associated % number should be stored in \cs{theglsentrycounter} % before using \cs{glossary}. %\begin{macro}{\glossary} % \begin{macrocode} \renewcommand*{\glossary}[1][\glsdefaulttype]{% \@glossary[#1]} % \end{macrocode} %\end{macro} % % Define internal \cs{@glossary} to ignore its argument. % This gets redefined in \cs{@makeglossary}. This is % defined to just \cs{index} as \cls{memoir} changes the definition of % \cs{@index}. (Thanks to Dan Luecking for pointing this out.) %\begin{macro}{\@glossary} %\changes{1.17}{2008 December 26}{changed definition to use %\cs{index} instead of \cs{@index}} % \begin{macrocode} \def\@glossary[#1]{\index} % \end{macrocode} %\end{macro} % This is a convenience command to set \cs{@glossary}. % It is used by \cs{@makeglossary} and then redefined to % do nothing, as it only needs to be done once. %\begin{macro}{\@gls@renewglossary} % \begin{macrocode} \newcommand{\@gls@renewglossary}{% \gdef\@glossary[##1]{\@bsphack\begingroup\@wrglossary{##1}}% \let\@gls@renewglossary\@empty } % \end{macrocode} %\end{macro} % The \cs{@wrglossary} command is redefined to have % two arguments. The first argument is the glossary type, % the second argument is the glossary entry % (the format of which is set in \cs{glslink}). %\begin{macro}{\@wrglossary} %\changes{1.17}{2008 December 26}{modified to allow for xindy support} %\changes{3.0}{2010 Jul 12}{modified to take into account %\pkgopt{savewrites}} % \begin{macrocode} \renewcommand*{\@wrglossary}[2]{% \ifglssavewrites \protected@edef\@gls@tmp{\the\csname glo@#1@filetok\endcsname#2}% \expandafter\global\expandafter\csname glo@#1@filetok\endcsname \expandafter{\@gls@tmp^^J}% \else \expandafter\protected@write\csname glo@#1@file\endcsname{}{#2}% \fi \endgroup\@esphack } % \end{macrocode} %\end{macro} % %\begin{macro}{\@do@wrglossary} %\changes{1.17}{2008 December 26}{new} % Write the glossary entry in the appropriate format. % (Need to set \cs{@glsnumberformat} and \cs{@gls@counter} prior to use.) % The argument is the entry's label. %\changes{3.0}{2011/04/02}{modified to use new format} % \begin{macrocode} \newcommand{\@do@wrglossary}[1]{% % \end{macrocode} % Get the location and escape any special characters % \begin{macrocode} \protected@edef\@glslocref{\theglsentrycounter}% \@gls@checkmkidxchars\@glslocref % \end{macrocode} % Check if the hyper-location is the same as the location and set % the hyper prefix. %\changes{3.0}{2011/04/02}{added check for hyper location prefix} % \begin{macrocode} \expandafter\ifx\theHglsentrycounter\theglsentrycounter \def\@glo@counterprefix{}% \else \protected@edef\@glsHlocref{\theHglsentrycounter}% \@gls@checkmkidxchars\@glsHlocref \edef\@do@gls@getcounterprefix{\noexpand\@gls@getcounterprefix {\@glslocref}{\@glsHlocref}% }% \@do@gls@getcounterprefix \fi % \end{macrocode} % Determine whether to use \app{xindy} or \app{makeindex} % syntax % \begin{macrocode} \ifglsxindy % \end{macrocode} % Need to determine if the formatting information starts with % a ( or ) indicating a range. % \begin{macrocode} \expandafter\@glo@check@mkidxrangechar\@glsnumberformat\@nil \def\@glo@range{}% \expandafter\if\@glo@prefix(\relax \def\@glo@range{:open-range}% \else \expandafter\if\@glo@prefix)\relax \def\@glo@range{:close-range}% \fi \fi % \end{macrocode} % Write to the glossary file using \app{xindy} syntax. % \begin{macrocode} \glossary[\csname glo@#1@type\endcsname]{% (indexentry :tkey (\csname glo@#1@index\endcsname) :locref \string"{\@glo@counterprefix}{\@glslocref}\string" % :attr \string"\@gls@counter\@glo@suffix\string" \@glo@range ) }% \else % \end{macrocode} % Convert the format information into the format required for % \app{makeindex} % \begin{macrocode} \@set@glo@numformat{\@glo@numfmt}{\@gls@counter}{\@glsnumberformat}% {\@glo@counterprefix}% % \end{macrocode} % Write to the glossary file using \app{makeindex} syntax. % \begin{macrocode} \glossary[\csname glo@#1@type\endcsname]{% \string\glossaryentry{\csname glo@#1@index\endcsname \@gls@encapchar\@glo@numfmt}{\theglsentrycounter}}% \fi } % \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@getcounterprefix} % Get the prefix that needs to be prepended to counter in order to % get the hyper counter. (For example, with the standard % \cls{article} class and \sty{hyperref}, \ics{theequation} needs to % be prefixed with \meta{section num}|.| to get the equivalent % \ics{theHequation}.) NB this assumes that the prefix ends with a % dot, which is the standard. (Otherwise it makes the xindy location % classes more complicated.) % \begin{macrocode} \newcommand*\@gls@getcounterprefix[2]{% \edef\@gls@thisloc{#1}\edef\@gls@thisHloc{#2}% \ifx\@gls@thisloc\@gls@thisHloc \def\@glo@counterprefix{}% \else \def\@gls@get@counterprefix##1.#1##2\end@getprefix{% \def\@glo@tmp{##2}% \ifx\@glo@tmp\@empty \def\@glo@counterprefix{}% \else \def\@glo@counterprefix{##1}% \fi }% \@gls@get@counterprefix#2.#1\end@getprefix \fi } % \end{macrocode} %\end{macro} % %\subsection{Glossary Entry Cross-References} %\begin{macro}{\@do@seeglossary} %\changes{1.17}{2008 December 26}{new} % Write the glossary entry with a cross reference. % The first argument is the entry's label, the second must be in % the form \oarg{tag}\marg{list}, where \meta{tag} is a tag % such as ``see'' and \meta{list} is a list of labels. %\changes{3.0}{2011/04/02}{Sanitize and escape cross-referencing %information} % \begin{macrocode} \newcommand{\@do@seeglossary}[2]{% \def\@gls@xref{#2}% \@onelevel@sanitize\@gls@xref \@gls@checkmkidxchars\@gls@xref \ifglsxindy \glossary[\csname glo@#1@type\endcsname]{% (indexentry :tkey (\csname glo@#1@index\endcsname) :xref (\string"\@gls@xref\string") :attr \string"see\string" ) }% \else \glossary[\csname glo@#1@type\endcsname]{% \string\glossaryentry{\csname glo@#1@index\endcsname \@gls@encapchar glsseeformat\@gls@xref}{Z}}% \fi } % \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@fixbraces} % If no optional argument is specified, list needs to be enclosed % in a set of braces. % \begin{macrocode} \def\@gls@fixbraces#1#2#3\@nil{% \ifx#2[\relax \def#1{#2#3}% \else \def#1{{#2#3}}% \fi } % \end{macrocode} %\end{macro} %\begin{macro}{\glssee} %\cs{glssee}\marg{label}\marg{cross-ref list} %\changes{1.17}{2008 December 26}{new} % \begin{macrocode} \newcommand*{\glssee}[3][\seename]{% \@do@seeglossary{#2}{[#1]{#3}}} \newcommand*{\@glssee}[3][\seename]{% \glssee[#1]{#3}{#2}} % \end{macrocode} %\end{macro} % %\begin{macro}{\glsseeformat} %\changes{1.17}{2008 December 26}{new} % The first argument specifies what tag to use (e.g.\ ``see''), % the second argument is a comma-separated list of labels. % The final argument (the location) is ignored. % \begin{macrocode} \newcommand*{\glsseeformat}[3][\seename]{\emph{#1} \glsseelist{#2}} % \end{macrocode} %\end{macro} %\begin{macro}{\glsseelist} %\cs{glsseelist}\marg{list} formats list of entry labels. % \begin{macrocode} \newcommand*{\glsseelist}[1]{% % \end{macrocode} % If there is only one item in the list, set the last separator % to do nothing. % \begin{macrocode} \let\@gls@dolast\relax % \end{macrocode} % Don't display separator on the first iteration of the loop % \begin{macrocode} \let\@gls@donext\relax % \end{macrocode} % Iterate through the labels % \begin{macrocode} \@for\@gls@thislabel:=#1\do{% % \end{macrocode} % Check if on last iteration of loop % \begin{macrocode} \ifx\@xfor@nextelement\@nnil \@gls@dolast \else \@gls@donext \fi % \end{macrocode} % display the entry for this label % \begin{macrocode} \glsseeitem{\@gls@thislabel}% % \end{macrocode} % Update separators % \begin{macrocode} \let\@gls@dolast\glsseelastsep \let\@gls@donext\glsseesep }% } % \end{macrocode} %\end{macro} % %\begin{macro}{\glsseelastsep} % Separator to use between penultimate and ultimate entries in a % cross-referencing list. % \begin{macrocode} \newcommand*{\glsseelastsep}{\space\andname\space} % \end{macrocode} %\end{macro} %\begin{macro}{\glsseesep} % Separator to use between entires in a cross-referencing list. % \begin{macrocode} \newcommand*{\glsseesep}{, } % \end{macrocode} %\end{macro} %\begin{macro}{\glsseeitem} %\cs{glsseeitem}\marg{label} formats individual entry in a % cross-referencing list. %\changes{3.0}{2011/04/02}{hyperlink uses \cs{glsseeitemformat} instead %of \cs{glsentryname}} % \begin{macrocode} \newcommand*{\glsseeitem}[1]{\glshyperlink[\glsseeitemformat{#1}]{#1}} % \end{macrocode} %\end{macro} %\begin{macro}{\glsseeitemformat} %\changes{3.0}{2011/04/02}{new} % As from v3.0, default is to use \ics{glsentrytext} instead of % \ics{glsentryname}. (To avoid problems with the \gloskey{name} key being % sanitized.) % \begin{macrocode} \newcommand*{\glsseeitemformat}[1]{\glsentrytext{#1}} % \end{macrocode} %\end{macro} % % \subsection{Displaying the glossary}\label{sec:code:printglos} % An individual glossary is displayed in the text using % \cs{printglossary}\oarg{key-val list}. If the % \gloskey[printglossary]{type} key is omitted, the default glossary is displayed. % The optional argument can be used to specify an alternative % glossary, and can also be used to set the style, title and % entry in the table of contents. Available keys are defined below. % %\begin{macro}{\warn@noprintglossary} % Warn the user if they have forgotten \ics{printglossaries} % or \ics{printglossary}. (Will be suppressed if there is at % least one occurance of \ics{printglossary}. There is no check % to ensure that there is a \ics{printglossary} for each defined % glossary.) % \begin{macrocode} \def\warn@noprintglossary{\GlossariesWarningNoLine{No \string\printglossary\space or \string\printglossaries\space found.^^JThis document will not have a glossary}} % \end{macrocode} %\end{macro} % %\begin{macro}{\printglossary} %\changes{1.17}{2008 December 26}{added print language to aux file} %\changes{1.15}{2008 August 15}{changed the way the TOC title is set} %\changes{1.17}{2008 December 26}{added check to determine if 'printglossary is already % defined} % The TOC title needs to be processed in a different manner % to the main title in case the \sty{translator} and \sty{hyperref} packages % are both being used. %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \ifcsundef{printglossary}{}% {% % \end{macrocode} % If \cs{printglossary} is already defined, issue a warning % and undefine it. % \begin{macrocode} \GlossariesWarning{Overriding \string\printglossary}% \undef\printglossary } % \end{macrocode} % \cs{printglossary} has an optional argument. The default % value is to set the glossary type to the main glossary. % \begin{macrocode} \newcommand*{\printglossary}[1][type=\glsdefaulttype]{% % \end{macrocode} % If \app{xindy} is being used, need to find the root language % for \app{makeglossaries} to pass to \app{xindy}. % \begin{macrocode} \ifglsxindy\findrootlanguage\fi % \end{macrocode} % Set up defaults. % \begin{macrocode} \def\@glo@type{\glsdefaulttype}% \def\glossarytitle{\csname @glotype@\@glo@type @title\endcsname}% \let\org@glossarytitle\glossarytitle \def\@glossarystyle{}% \def\gls@dotoctitle{\glssettoctitle{\@glo@type}}% % \end{macrocode} % Store current value of \ics{glossaryentrynumbers}. (This may % be changed via the optional argument) % \begin{macrocode} \let\@org@glossaryentrynumbers\glossaryentrynumbers % \end{macrocode} % Localise the effects of the optional argument % \begin{macrocode} \bgroup % \end{macrocode} % Determine settings specified in the optional argument. % \begin{macrocode} \setkeys{printgloss}{#1}% % \end{macrocode} % If title has been set, but toctitle hasn't, make toctitle the same % as given title (rather than the title used when the glossary was % defined) %\changes{3.0}{2011/04/02}{make toctitle default to title} % \begin{macrocode} \ifx\glossarytitle\org@glossarytitle \else \expandafter\let\csname @glotype@\@glo@type @title\endcsname \glossarytitle \fi % \end{macrocode} % Allow a high-level user command to indicate the current glossary %\changes{3.0}{2011/04/02}{added \cs{currentglossary}} % \begin{macrocode} \let\currentglossary\@glo@type % \end{macrocode} %Enable individual number lists to be suppressed. % \begin{macrocode} \let\org@glossaryentrynumbers\glossaryentrynumbers \let\glsnonextpages\@glsnonextpages % \end{macrocode} % Enable individual number list to be activated: %\changes{3.0}{2011/04/02}{added \cs{glsnextpages}} % \begin{macrocode} \let\glsnextpages\@glsnextpages % \end{macrocode} % Enable suppression of description terminators. % \begin{macrocode} \let\nopostdesc\@nopostdesc % \end{macrocode} % Set up the entry for the TOC % \begin{macrocode} \gls@dotoctitle % \end{macrocode} % Set the glossary style % \begin{macrocode} \@glossarystyle % \end{macrocode} % Some macros may end up being expanded into internals in the % glossary, so need to make @ a letter. % \begin{macrocode} \makeatletter % \end{macrocode} % Input the glossary file, if it exists. % \begin{macrocode} \@input@{\jobname.\csname @glotype@\@glo@type @in\endcsname}% % \end{macrocode} % If the glossary file doesn't exist, do \cs{null}. (This ensures % that the page is shipped out and all write commands are done.) % This might produce an empty page, but at this point the document % isn't complete, so it shouldn't matter. % \begin{macrocode} \IfFileExists{\jobname.\csname @glotype@\@glo@type @in\endcsname}{}% {\null}% % \end{macrocode} % If \app{xindy} is being used, need to write the language % dependent information to the \filetype{.aux} file for % \app{makeglossaries}. %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \ifglsxindy \ifcsundef{@xdy@\@glo@type @language}% {% \protected@write\@auxout{}{% \string\@xdylanguage{\@glo@type}{\@xdy@main@language}}% }% {% \protected@write\@auxout{}{% \string\@xdylanguage{\@glo@type}{\csname @xdy@\@glo@type @language\endcsname}}% }% \protected@write\@auxout{}{% \string\@gls@codepage{\@glo@type}{\gls@codepage}}% \fi \egroup % \end{macrocode} % Reset \ics{glossaryentrynumbers} % \begin{macrocode} \global\let\glossaryentrynumbers\@org@glossaryentrynumbers % \end{macrocode} % Suppress warning about no \ics{printglossary} %\changes{2.02}{2007 July 13}{suppressed warning globally rather than locally} % \begin{macrocode} \global\let\warn@noprintglossary\relax } % \end{macrocode} %\end{macro} % % The \cs{printglossaries} command will do \cs{printglossary} % for each glossary type that has been defined. It is better % to use \cs{printglossaries} rather than individual % \cs{printglossary} commands to ensure that you don't forget % any new glossaries you may have created. It also makes it easier to % chop and change the value of the \pkgopt{acronym} package option. % However, if you want to list the glossaries in a different order, % or if you want to set the title or table of contents entry, or % if you want to use different glossary styles for each glossary, you % will need to use \cs{printglossary} explicitly for each % glossary type. %\begin{macro}{\printglossaries} % \begin{macrocode} \newcommand*{\printglossaries}{% \forallglossaries{\@@glo@type}{\printglossary[type=\@@glo@type]}} % \end{macrocode} %\end{macro} % The keys that can be used in the optional argument to % \ics{printglossary} are as follows: % The \gloskey[printglossary]{type} key sets the glossary type. % \begin{macrocode} \define@key{printgloss}{type}{\def\@glo@type{#1}} % \end{macrocode} % The \gloskey[printglossary]{title} key sets the title used in the glossary section % header. This overrides the title used in \ics{newglossary}. % \begin{macrocode} \define@key{printgloss}{title}{\def\glossarytitle{#1}} % \end{macrocode} % The \gloskey[printglossary]{toctitle} sets the text used for the relevant entry % in the table of contents. % \begin{macrocode} \define@key{printgloss}{toctitle}{\def\glossarytoctitle{#1}% \let\gls@dotoctitle\relax } % \end{macrocode} % The \gloskey[printglossary]{style} key sets the glossary style (but only for % the given glossary). %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \define@key{printgloss}{style}{% \ifcsundef{@glsstyle@#1}% {% \PackageError{glossaries}% {Glossary style `#1' undefined}{}% }% {% \def\@glossarystyle{\csname @glsstyle@#1\endcsname}% }% } % \end{macrocode} % \changes{1.14}{2008 June 17}{added numberedsection key to 'printglossary} % The \gloskey[printglossary]{numberedsection} key determines if this % glossary should be in a numbered section. % \begin{macrocode} \define@choicekey{printgloss}{numberedsection}[\val\nr]{% false,nolabel,autolabel}[nolabel]{% \ifcase\nr\relax \renewcommand*{\@@glossarysecstar}{*}% \renewcommand*{\@@glossaryseclabel}{}% \or \renewcommand*{\@@glossarysecstar}{}% \renewcommand*{\@@glossaryseclabel}{}% \or \renewcommand*{\@@glossarysecstar}{}% \renewcommand*{\@@glossaryseclabel}{\label{\glsautoprefix\@glo@type}}% \fi} % \end{macrocode} % \changes{1.14}{2008 June 17}{added nonumberlist key to 'printglossary} % The \gloskey[printglossary]{nonumberlist} key determines if this % glossary should have a number list. % \begin{macrocode} \define@boolkey{printgloss}[gls]{nonumberlist}[true]{% \ifglsnonumberlist \def\glossaryentrynumbers##1{}% \else \def\glossaryentrynumbers##1{##1}% \fi} % \end{macrocode} % %\begin{macro}{\@glsnonextpages} %\changes{1.17}{2008 December 26}{new}% % Suppresses the next number list only. Global assignments required % as it may not occur in the same level of grouping as the % next numberlist. (For example, if \cs{glsnonextpages} is place % in the entry's description and 3 column tabular style glossary % is used.) \cs{org@glossaryentrynumbers} needs to be set at % the start of each glossary, in the event that % \ics{glossaryentrynumber} is redefined. % \begin{macrocode} \newcommand*{\@glsnonextpages}{% \gdef\glossaryentrynumbers##1{% \glsresetentrylist}} % \end{macrocode} %\end{macro} %\begin{macro}{\@glsnextpages} %\changes{3.0}{2011/04/02}{new}% % Activate the next number list only. Global assignments required % as it may not occur in the same level of grouping as the % next numberlist. (For example, if \cs{glsnextpages} is place % in the entry's description and 3 column tabular style glossary % is used.) \cs{org@glossaryentrynumbers} needs to be set at % the start of each glossary, in the event that % \ics{glossaryentrynumber} is redefined. % \begin{macrocode} \newcommand*{\@glsnextpages}{% \gdef\glossaryentrynumbers##1{% ##1\glsresetentrylist}} % \end{macrocode} %\end{macro} %\begin{macro}{\glsresetentrylist} % Resets \cs{glossaryentrynumbers} % \begin{macrocode} \newcommand*{\glsresetentrylist}{% \global\let\glossaryentrynumbers\org@glossaryentrynumbers} % \end{macrocode} %\end{macro} % % %\begin{macro}{\glsnonextpages} % Outside of \cs{printglossary} this does nothing. % \begin{macrocode} \newcommand*{\glsnonextpages}{} % \end{macrocode} %\end{macro} % %\begin{macro}{\glsnextpages} % Outside of \cs{printglossary} this does nothing. % \begin{macrocode} \newcommand*{\glsnextpages}{} % \end{macrocode} %\end{macro} % %\begin{counter}{glossaryentry} %\changes{3.0}{2011/04/02}{new} % If the \pkgopt{entrycounter} package option has been used, define % a counter to number each level~0 entry. % \begin{macrocode} \ifglsentrycounter \ifx\@gls@counterwithin\@empty \newcounter{glossaryentry} \else \newcounter{glossaryentry}[\@gls@counterwithin] \fi \def\theHglossaryentry{\currentglossary.\theglossaryentry} \fi % \end{macrocode} %\end{counter} % %\begin{counter}{glossarysubentry} %\changes{3.0}{2011/04/02}{new} % If the \pkgopt{subentrycounter} package option has been used, define % a counter to number each level~1 entry. % \begin{macrocode} \ifglssubentrycounter \ifglsentrycounter \newcounter{glossarysubentry}[glossaryentry] \else \newcounter{glossarysubentry} \fi \def\theHglossarysubentry{\currentglssubentry.\theglossarysubentry} \fi % \end{macrocode} %\end{counter} % %\begin{macro}{\glsresetsubentrycounter} %\changes{3.0}{2011/04/02}{new} % Resets the \ctr{glossarysubentry} counter. % \begin{macrocode} \ifglssubentrycounter \newcommand*{\glsresetsubentrycounter}{% \setcounter{glossarysubentry}{0}% } \else \newcommand*{\glsresetsubentrycounter}{} \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\glsstepentry} %\changes{3.0}{2011/04/02}{new} % Advance the \ctr{glossaryentry} counter if in use. The argument is % the label associated with the entry. % \begin{macrocode} \ifglsentrycounter \newcommand*{\glsstepentry}[1]{% \refstepcounter{glossaryentry}% \label{glsentry-#1}% } \else \newcommand*{\glsstepentry}[1]{} \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\glsstepsubentry} %\changes{3.0}{2011/04/02}{new} % Advance the \ctr{glossarysubentry} counter if in use. The argument is % the label associated with the subentry. % \begin{macrocode} \ifglssubentrycounter \newcommand*{\glsstepsubentry}[1]{% \def\currentglssubentry{#1}% \refstepcounter{glossarysubentry}% \label{glsentry-#1}% } \else \newcommand*{\glsstepsubentry}[1]{} \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\glsrefentry} %\changes{3.0}{2011/04/02}{new} % Reference the entry or sub-entry counter if in use, otherwise just do % \ics{gls}. % \begin{macrocode} \ifglsentrycounter \newcommand*{\glsrefentry}[1]{\ref{glsentry-#1}} \else \ifglssubentrycounter \newcommand*{\glsrefentry}[1]{\ref{glsentry-#1}} \else \newcommand*{\glsrefentry}[1]{\gls{#1}} \fi \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\glsentrycounterlabel} %\changes{3.0}{2011/04/02}{new} % Defines how to display the \ctr{glossaryentry} counter. % \begin{macrocode} \ifglsentrycounter \newcommand*{\glsentrycounterlabel}{\theglossaryentry.\space} \else \newcommand*{\glsentrycounterlabel}{} \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\glssubentrycounterlabel} %\changes{3.0}{2011/04/02}{new} % Defines how to display the \ctr{glossarysubentry} counter. % \begin{macrocode} \ifglssubentrycounter \newcommand*{\glssubentrycounterlabel}{\theglossarysubentry)\space} \else \newcommand*{\glssubentrycounterlabel}{} \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\glsentryitem} % Step and display \ctr{glossaryentry} counter, if appropriate. %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} \ifglsentrycounter \newcommand*{\glsentryitem}[1]{% \glsstepentry{#1}\glsentrycounterlabel } \else \newcommand*{\glsentryitem}[1]{\glsresetsubentrycounter} \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\glssubentryitem} % Step and display \ctr{glossarysubentry} counter, if appropriate. %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} \ifglssubentrycounter \newcommand*{\glssubentryitem}[1]{% \glsstepsubentry{#1}\glssubentrycounterlabel } \else \newcommand*{\glssubentryitem}[1]{} \fi % \end{macrocode} %\end{macro} % %\begin{environment}{theglossary} % If the \env{theglossary} environment has % already been defined, a warning will be issued. % This environment should be redefined by glossary styles. %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \ifcsundef{theglossary}% {% \newenvironment{theglossary}{}{}% }% {% \GlossariesWarning{overriding `theglossary' environment}% \renewenvironment{theglossary}{}{}% } % \end{macrocode} %\end{environment} % % The glossary header is given by \cs{glossaryheader}. % This forms part of the glossary style, and % must indicate what should appear immediately after the start of the % \env{theglossary} environment. (For example, if the glossary % uses a tabular-like environment, it may be used to set the % header row.) Note that if you don't want a header row, the glossary % style must redefine \cs{glossaryheader} to do nothing. %\begin{macro}{\glossaryheader} % \begin{macrocode} \newcommand*{\glossaryheader}{} % \end{macrocode} %\end{macro} % %\begin{macro}{\glstarget} %\changes{1.18}{2009 January 14}{new} %\cs{glstarget}\marg{label}\marg{name}\\[10pt] % Provide user interface to \cs{@glstarget} to make it easier to % modify the glossary style in the document. % \begin{macrocode} \newcommand*{\glstarget}[2]{\@glstarget{glo:#1}{#2}} % \end{macrocode} %\end{macro} % %\begin{macro}{\glossaryentryfield} % \cs{glossaryentryfield}\marg{label}\marg{name}\marg{description}\marg{symbol}\marg{page-list}\\[10pt] % This command governs how each entry row should be formatted % in the glossary. Glossary styles need to redefine this command. % Most of the predefined styles ignore \meta{symbol}. % \begin{macrocode} \newcommand*{\glossaryentryfield}[5]{% \noindent\textbf{\glstarget{#1}{#2}} #4 #3. #5\par} % \end{macrocode} %\end{macro} %\begin{macro}{\glossaryentryfield} % \cs{glossarysubentryfield}\marg{level}\marg{label}\marg{name}\marg{description}\marg{symbol}\marg{page-list}\\[10pt] % This command governs how each subentry should be formatted % in the glossary. Glossary styles need to redefine this command. % Most of the predefined styles ignore \meta{symbol}. The first % argument is a number indicating the level. (The level should % be greater than or equal to 1.) % \begin{macrocode} \newcommand*{\glossarysubentryfield}[6]{% \glstarget{#2}{\strut}#4. #6\par} % \end{macrocode} %\end{macro} % % Within each glossary, the entries form distinct groups % which are determined by the first character of the \gloskey{sort} % key. When using \app{makeindex}, there will be a maximum of 28 groups: symbols, numbers, % and the 26 alphabetical groups A, \ldots, Z\@. If you use % \app{xindy} the groups will depend on whatever alphabet % is used. This is determined by the language or custom % alphabets can be created in the \app{xindy} style file. % The command \cs{glsgroupskip} % specifies what to do between glossary groups. Glossary styles % must redefine this command. (Note that \cs{glsgroupskip} % only occurs between groups, not at the start or end of the % glossary.) %\begin{macro}{\glsgroupskip} % \begin{macrocode} \newcommand*{\glsgroupskip}{} % \end{macrocode} %\end{macro} % % Each of the 28 glossary groups described above is preceded by a % group heading. % This is formatted by the command \cs{glsgroupheading} % which takes one argument which is the \emph{label} assigned to that % group (not the title). The corresponding labels are: \texttt{glssymbols}, % \texttt{glsnumbers}, \texttt{A}, \ldots, \texttt{Z}. % Glossary styles must redefined this command. (In between groups, % \cs{glsgroupheading} comes immediately after \cs{glsgroupskip}.) %\begin{macro}{\glsgroupheading} % \begin{macrocode} \newcommand*{\glsgroupheading}[1]{} % \end{macrocode} %\end{macro} % It is possible to ``trick'' \app{makeindex} into % treating entries as though they belong to the same group, % even if the terms don't start with the same letter, by % modifying the \gloskey{sort} key. For example, all entries % belonging to one % group could be defined so that the \gloskey{sort} key starts with an % "a", while entries belonging to another group could be defined % so that the \gloskey{sort} key starts with a "b", and so on. If % you want each group to have a heading, you would then need to % modify the translation control sequences \cs{glsgetgrouptitle} % and \cs{glsgetgrouplabel} so that the label is translated % into the required title (and vice-versa). %\\[10pt] %\cs{glsgetgrouptitle}\marg{label}\\[10pt] % This command produces the title for the glossary group % whose label is given by \meta{label}. By default, the group % labelled \texttt{glssymbols} produces % \ics{glssymbolsgroupname}, the group labelled % \texttt{glsnumbers} produces \ics{glsnumbersgroupname} % and all the other groups simply produce their label. % As mentioned above, the group labels are: \texttt{glssymbols}, \texttt{glsnumbers}, % \texttt{A}, \ldots, \texttt{Z}\@. If you want to redefine % the group titles, you will need to redefine this command. %\begin{macro}{\glsgetgrouptitle} %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \newcommand*{\glsgetgrouptitle}[1]{% \ifcsundef{#1groupname}{#1}{\csname #1groupname\endcsname}% } % \end{macrocode} %\end{macro} %\vskip5pt %\cs{glsgetgrouplabel}\marg{title}\\[10pt] %This command does the reverse to the previous command. The % argument is the group title, and it produces the group label. % Note that if you redefine \cs{glsgetgrouptitle}, you % will also need to redefine \cs{glsgetgrouplabel}. %\begin{macro}{\glsgetgrouplabel} % \begin{macrocode} \newcommand*{\glsgetgrouplabel}[1]{% \ifthenelse{\equals{#1}{\glssymbolsgroupname}}{glssymbols}{% \ifthenelse{\equals{#1}{\glsnumbersgroupname}}{glsnumbers}{#1}}} % \end{macrocode} %\end{macro} % % The command \cs{setentrycounter} sets the entry's % associated counter (required by % \cs{glshypernumber} etc.) \ics{glslink} and % \ics{glsadd} encode the % \ics{glossary} argument so that the relevant counter is % set prior to the formatting command. %\begin{macro}{\setentrycounter} %\changes{3.0}{2011/04/02}{added optional argument} % \begin{macrocode} \newcommand*{\setentrycounter}[2][]{% \def\@glo@counterprefix{#1}% \ifx\@glo@counterprefix\@empty \def\@glo@counterprefix{.}% \else \def\@glo@counterprefix{.#1.}% \fi \def\glsentrycounter{#2}% } % \end{macrocode} %\end{macro} % % The current glossary style can be set using % \cs{glossarystyle}\marg{style}. %\begin{macro}{\glossarystyle} %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \newcommand*{\glossarystyle}[1]{% \ifcsundef{@glsstyle@#1}% {% \PackageError{glossaries}{Glossary style `#1' undefined}{}% }% {% \csname @glsstyle@#1\endcsname }% } % \end{macrocode} %\end{macro} % %\begin{macro}{\newglossarystyle} % New glossary styles can be defined using:\\[10pt] % \cs{newglossarystyle}\marg{name}\marg{definition}\\[10pt] % The \meta{definition} argument should redefine % \env{theglossary}, \ics{glossaryheader}, % \ics{glsgroupheading}, \ics{glossaryentryfield} and % \ics{glsgroupskip} (see \autoref{sec:code:styles} for the % definitions of predefined styles). Glossary styles should not % redefine \ics{glossarypreamble} and % \ics{glossarypostamble}, as % the user should be able to switch between styles without affecting % the pre- and postambles. %\changes{1.17}{2008 December 26}{made 'newglossarystyle long} %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \newcommand{\newglossarystyle}[2]{% \ifcsundef{@glsstyle@#1}% {% \expandafter\def\csname @glsstyle@#1\endcsname{#2}% }% {% \PackageError{glossaries}{Glossary style `#1' is already defined}{}% }% } % \end{macrocode} %\end{macro} % % Glossary entries are encoded so that the second argument % to \ics{glossaryentryfield} is always specified as % \cs{glsnamefont}\marg{name}. This allows the % user to change the font used to display the name term % without having to redefine \ics{glossaryentryfield}. % The default uses the surrounding font, so in the list type % styles (which place the name in the optional argument to % \ics{item}) the name will appear in bold. %\begin{macro}{\glsnamefont} % \begin{macrocode} \newcommand*{\glsnamefont}[1]{#1} % \end{macrocode} %\end{macro} % % Each glossary entry has an associated number list (usually page % numbers) that indicate where in the document the entry has been % used. The format for these number lists can be changed using the % \gloskey[glslink]{format}\igloskey[glsadd]{format} key in commands like \ics{glslink}. % The default format is given by \cs{glshypernumber}. This takes % a single argument which may be a single number, a number range % or a number list. The number ranges are delimited with % \ics{delimR}, the number lists are delimited with % \ics{delimN}. % % If the document doesn't have hyperlinks, the numbers can be % displayed just as they are, but if the document supports % hyperlinks, the numbers should link to the relevant location. % This means extracting the individual numbers from the list or % ranges. The \isty{hyperref} package does this with the % \ics{hyperpage} command, but this is encoded for comma and % dash delimiters and only for the page counter, but this code needs % to be more general. So I have adapted the code used in the % \isty{hyperref} package. %\begin{macro}{\glshypernumber} %\changes{1.17}{2008 December 26}{modified to allow material % to be attached to location} %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \ifcsundef{hyperlink}% {% \def\glshypernumber#1{#1}% }% {% \def\glshypernumber#1{\@glshypernumber#1\nohyperpage{}\@nil} } % \end{macrocode} %\end{macro} % %\begin{macro}{\@glshypernumber} % This code was provided by Heiko~Oberdiek to allow material % to be attached to the location. %\changes{1.17}{2008 December 26}{new} % \begin{macrocode} \def\@glshypernumber#1\nohyperpage#2#3\@nil{% \ifx\\#1\\% \else \@delimR#1\delimR\delimR\\% \fi \ifx\\#2\\% \else #2% \fi \ifx\\#3\\% \else \@glshypernumber#3\@nil \fi } % \end{macrocode} %\end{macro} % \cs{@delimR} displays a range of numbers for the counter % whose name is given by % \cs{@gls@counter} (which must be set prior to using % \cs{glshypernumber}). %\begin{macro}{\@delimR} % \begin{macrocode} \def\@delimR#1\delimR #2\delimR #3\\{% \ifx\\#2\\% \@delimN{#1}% \else \@gls@numberlink{#1}\delimR\@gls@numberlink{#2}% \fi} % \end{macrocode} %\end{macro} % \cs{@delimN} displays a list of individual numbers, % instead of a range: %\begin{macro}{\@delimN} % \begin{macrocode} \def\@delimN#1{\@@delimN#1\delimN \delimN\\} \def\@@delimN#1\delimN #2\delimN#3\\{% \ifx\\#3\\% \@gls@numberlink{#1}% \else \@gls@numberlink{#1}\delimN\@gls@numberlink{#2}% \fi } % \end{macrocode} %\end{macro} % The following code is modified from hyperref's % \cs{HyInd@pagelink} where % the name of the counter being used is given by % \cs{@gls@counter}. % \begin{macrocode} \def\@gls@numberlink#1{% \begingroup \toks@={}% \@gls@removespaces#1 \@nil \endgroup} % \end{macrocode} % \begin{macrocode} \def\@gls@removespaces#1 #2\@nil{% \toks@=\expandafter{\the\toks@#1}% \ifx\\#2\\% \edef\x{\the\toks@}% \ifx\x\empty \else % \end{macrocode} %\changes{3.0}{2011/04/02}{added prefix to hyperlink} % \begin{macrocode} \hyperlink{\glsentrycounter\@glo@counterprefix\the\toks@}% {\the\toks@}% \fi \else \@gls@ReturnAfterFi{% \@gls@removespaces#2\@nil }% \fi } \long\def\@gls@ReturnAfterFi#1\fi{\fi#1} % \end{macrocode} % % The following commands will switch to the % appropriate font, and create a hyperlink, if hyperlinks are % supported. If hyperlinks are not supported, they will just % display their argument in the appropriate font. %\begin{macro}{\hyperrm} % \begin{macrocode} \newcommand*{\hyperrm}[1]{\textrm{\glshypernumber{#1}}} % \end{macrocode} %\end{macro} %\begin{macro}{\hypersf} % \begin{macrocode} \newcommand*{\hypersf}[1]{\textsf{\glshypernumber{#1}}} % \end{macrocode} %\end{macro} %\begin{macro}{\hypertt} % \begin{macrocode} \newcommand*{\hypertt}[1]{\texttt{\glshypernumber{#1}}} % \end{macrocode} %\end{macro} %\begin{macro}{\hyperbf} % \begin{macrocode} \newcommand*{\hyperbf}[1]{\textbf{\glshypernumber{#1}}} % \end{macrocode} %\end{macro} %\begin{macro}{\hypermd} % \begin{macrocode} \newcommand*{\hypermd}[1]{\textmd{\glshypernumber{#1}}} % \end{macrocode} %\end{macro} %\begin{macro}{\hyperit} % \begin{macrocode} \newcommand*{\hyperit}[1]{\textit{\glshypernumber{#1}}} % \end{macrocode} %\end{macro} %\begin{macro}{\hypersl} % \begin{macrocode} \newcommand*{\hypersl}[1]{\textsl{\glshypernumber{#1}}} % \end{macrocode} %\end{macro} %\begin{macro}{\hyperup} % \begin{macrocode} \newcommand*{\hyperup}[1]{\textup{\glshypernumber{#1}}} % \end{macrocode} %\end{macro} %\begin{macro}{\hypersc} % \begin{macrocode} \newcommand*{\hypersc}[1]{\textsc{\glshypernumber{#1}}} % \end{macrocode} %\end{macro} %\begin{macro}{\hyperemph} % \begin{macrocode} \newcommand*{\hyperemph}[1]{\emph{\glshypernumber{#1}}} % \end{macrocode} %\end{macro} % %\subsection{Acronyms}\label{sec:acronym} %If the \pkgopt{acronym} package option is used, a % new glossary called "acronym" is created % \begin{macrocode} \ifglsacronym \newglossary[alg]{acronym}{acr}{acn}{\acronymname} % \end{macrocode} %and \ics{acronymtype} is set to the name of this new glossary. % \begin{macrocode} \renewcommand*{\acronymtype}{acronym} \fi % \end{macrocode} %\begin{macro}{\oldacronym} %\cs{oldacronym}\oarg{label}\marg{abbrv}\marg{long}\marg{key-val list}\\[10pt] % This emulates the way the old \isty{glossary} package defined % acronyms. It is equivalent to \ics{newacronym}\oarg{key-val % list}\marg{label}\marg{abbrv}\marg{long} and it additionally % defines the command \cs{}\meta{label} which is equivalent to % \cs{gls}\marg{label} (thus \meta{label} must only contain % alphabetical characters). If \meta{label} is omitted, \meta{abbrv} % is used. This only emulates the syntax of the old \isty{glossary} % package. The way the acronyms appear in the list of acronyms is % determined by the definition of \ics{newacronym} and the % glossary style. % % Note that \cs{}\meta{label} can't have an optional % argument if the \isty{xspace} package is loaded. If % \isty{xspace} hasn't been loaded then you can do % \cs{}\meta{label}\oarg{insert} but you can't do % \cs{}\meta{label}\oarg{key-val list}. For example if you define the % acronym svm, then you can do "\svm['s]" but you can't do % "\svm[format=textbf]". If the \isty{xspace} package is loaded, % "\svm['s]" will appear as "svm ['s]" which is unlikely to be % the desired result. In this case, you will need to use % \cs{gls} explicitly, e.g.\ "\gls{svm}['s]". Note that it is % up to the user to load \isty{xspace} if desired. %\changes{1.18}{2009 January 14}{new} %\changes{3.0}{2011/04/02}{replaced \cs{@ifundefined} with %\cs{ifcsundef}} % \begin{macrocode} \newcommand{\oldacronym}[4][\gls@label]{% \def\gls@label{#2}% \newacronym[#4]{#1}{#2}{#3}% \ifcsundef{xspace}% {% \expandafter\edef\csname#1\endcsname{% \noexpand\@ifstar{\noexpand\Gls{#1}}{\noexpand\gls{#1}}% }% }% {% \expandafter\edef\csname#1\endcsname{% \noexpand\@ifstar{\noexpand\Gls{#1}\noexpand\xspace}{% \noexpand\gls{#1}\noexpand\xspace}% }% }% } % \end{macrocode} %\end{macro} %\vskip5pt % \cs{newacronym}\oarg{key-val list}\marg{label}\marg{abbrev}\marg{long}\\[10pt] % This is a quick way of defining acronyms, all it does % is call \ics{newglossaryentry} with the appropriate % values. It sets the % glossary type to \ics{acronymtype} which will be % "acronym" if the package option \pkgopt{acronym} has % been used, otherwise it will be the default glossary. % Since \cs{newacronym} merely calls \ics{newglossaryentry}, % the acronym is treated like any other glossary entry. % % If you prefer a different format, you % can redefine \cs{newacronym} as required. The optional % argument can be used to override any of the settings. % % This is just a stub. It's redefined by commands like % \cs{SetDefaultAcronymStyle}. %\begin{macro}{\newacronym} % \begin{macrocode} \newcommand{\newacronym}[4][]{} % \end{macrocode} %\changes{1.13}{2008 May 10}{Removed restriction on only using % 'newacronym in the preamble} %\end{macro} % Set up some convenient short cuts. These need to be changed if % \cs{newacronym} is changed (or if the \gloskey{description} key % is changed). % %\begin{macro}{\acrpluralsuffix} %\changes{1.13}{2008 May 10}{New} % Plural suffix used by \cs{newacronym}. This just defaults to % \cs{glspluralsuffix} but is changed to include \cs{textup} % if the smallcaps option is used, so that the suffix doesn't appear % in small caps as it doesn't look right. For example, % \textsc{abcs} looks as though the ``s'' is part of the acronym, but % \textsc{abc}s looks as though the ``s'' is a plural suffix. Since % the entire text \texttt{abcs} is set in \cs{textsc}, \cs{textup} % is need to cancel it out. % \begin{macrocode} \newcommand*{\acrpluralsuffix}{\glspluralsuffix} % \end{macrocode} %\end{macro} % % The following are defined for compatibility with version 2.07 and % earlier. %\begin{macro}{\glsshortkey} % \begin{macrocode} \newcommand*{\glsshortkey}{short} % \end{macrocode} %\end{macro} %\begin{macro}{\glsshortpluralkey} % \begin{macrocode} \newcommand*{\glsshortpluralkey}{shortplural} % \end{macrocode} %\end{macro} %\begin{macro}{\glslongkey} % \begin{macrocode} \newcommand*{\glslongkey}{long} % \end{macrocode} %\end{macro} %\begin{macro}{\glslongpluralkey} % \begin{macrocode} \newcommand*{\glslongpluralkey}{longplural} % \end{macrocode} %\end{macro} % %\begin{macro}{\acrfull} % Full form of the acronym. %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\acrfull}{% \@ifstar\s@acrfull\ns@acrfull } % \end{macrocode} %\changes{3.0}{2011/04/02}{added starred version} % \begin{macrocode} \newcommand*\s@acrfull[2][]{% \new@ifnextchar[{\@acrfull{hyper=false,#1}{#2}}% {\@acrfull{hyper=false,#1}{#2}[]}% } \newcommand*\ns@acrfull[2][]{% \new@ifnextchar[{\@acrfull{#1}{#2}}% {\@acrfull{#1}{#2}[]}% } % \end{macrocode} % Low-level macro: % \begin{macrocode} \def\@acrfull#1#2[#3]{% \acrlinkfullformat{\@acrlong}{\@acrshort}{#1}{#2}{#3}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\acrlinkfullformat} % Format for full links like \ics{acrfull}. Syntax: % \cs{acrlinkfullformat}\marg{long cs}\marg{short % cs}\marg{options}\marg{label}\marg{insert} % \begin{macrocode} \newcommand{\acrlinkfullformat}[5]{% \acrfullformat{#1{#3}{#4}[#5]}{#2{#3}{#4}[]}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\acrfullformat} % Default full form is \meta{long} \parg{short}. %\changes{3.01}{2011/04/12}{removed \cs{acronymfont} as it should %already be set in the second argument.} % \begin{macrocode} \newcommand{\acrfullformat}[2]{#1\space(#2)} % \end{macrocode} %\end{macro} % % Default format for full acronym %\begin{macro}{\Acrfull} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Acrfull}{% \@ifstar\s@Acrfull\ns@Acrfull } % \end{macrocode} %\changes{3.0}{2011/04/02}{added starred version} % \begin{macrocode} \newcommand*\s@Acrfull[2][]{% \new@ifnextchar[{\@Acrfull{hyper=false,#1}{#2}}% {\@Acrfull{hyper=false,#1}{#2}[]}% } \newcommand*\ns@Acrfull[2][]{% \new@ifnextchar[{\@Acrfull{#1}{#2}}% {\@Acrfull{#1}{#2}[]}% } % \end{macrocode} % Low-level macro: % \begin{macrocode} \def\@Acrfull#1#2[#3]{% \acrlinkfullformat{\@Acrlong}{\@acrshort}{#1}{#2}{#3}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\ACRfull} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\ACRfull}{% \@ifstar\s@ACRfull\ns@ACRfull } % \end{macrocode} %\changes{3.0}{2011/04/02}{added starred version} % \begin{macrocode} \newcommand*\s@ACRfull[2][]{% \new@ifnextchar[{\@ACRfull{hyper=false,#1}{#2}}% {\@ACRfull{hyper=false,#1}{#2}[]}% } \newcommand*\ns@ACRfull[2][]{% \new@ifnextchar[{\@ACRfull{#1}{#2}}% {\@ACRfull{#1}{#2}[]}% } % \end{macrocode} % Low-level macro: % \begin{macrocode} \def\@ACRfull#1#2[#3]{% \acrlinkfullformat{\@ACRlong}{\@ACRshort}{#1}{#2}{#3}% } % \end{macrocode} %\end{macro} % % Plural: %\begin{macro}{\acrfullpl} %\changes{1.13}{2008 May 10}{new} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\acrfullpl}{% \@ifstar\s@acrfullpl\ns@acrfullpl } % \end{macrocode} %\changes{3.0}{2011/04/02}{added starred version} % \begin{macrocode} \newcommand*\s@acrfullpl[2][]{% \new@ifnextchar[{\@acrfullpl{hyper=false,#1}{#2}}% {\@acrfullpl{hyper=false,#1}{#2}[]}% } \newcommand*\ns@acrfullpl[2][]{% \new@ifnextchar[{\@acrfullpl{#1}{#2}}% {\@acrfullpl{#1}{#2}[]}% } % \end{macrocode} % Low-level macro: % \begin{macrocode} \def\@acrfullpl#1#2[#3]{% \acrlinkfullformat{\@acrlongpl}{\@acrshortpl}{#1}{#2}{#3}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\Acrfullpl} %\changes{1.13}{2008 May 10}{new} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\Acrfullpl}{% \@ifstar\s@Acrfullpl\ns@Acrfullpl } % \end{macrocode} %\changes{3.0}{2011/04/02}{added starred version} % \begin{macrocode} \newcommand*\s@Acrfullpl[2][]{% \new@ifnextchar[{\@Acrfullpl{hyper=false,#1}{#2}}% {\@Acrfullpl{hyper=false,#1}{#2}[]}% } \newcommand*\ns@Acrfullpl[2][]{% \new@ifnextchar[{\@Acrfullpl{#1}{#2}}% {\@Acrfullpl{#1}{#2}[]}% } % \end{macrocode} % Low-level macro: % \begin{macrocode} \def\@Acrfullpl#1#2[#3]{% \acrlinkfullformat{\@Acrlongpl}{\@acrshortpl}{#1}{#2}{#3}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\ACRfullpl} %\changes{1.13}{2008 May 10}{new} %\changes{3.01}{2011/04/12}{made robust} % \begin{macrocode} \newrobustcmd*{\ACRfullpl}{% \@ifstar\s@ACRfullpl\ns@ACRfullpl } % \end{macrocode} %\changes{3.0}{2011/04/02}{added starred version} % \begin{macrocode} \newcommand*\s@ACRfullpl[2][]{% \new@ifnextchar[{\@ACRfullpl{hyper=false,#1}{#2}}% {\@ACRfullpl{hyper=false,#1}{#2}[]}% } \newcommand*\ns@ACRfullpl[2][]{% \new@ifnextchar[{\@ACRfullpl{#1}{#2}}% {\@ACRfullpl{#1}{#2}[]}% } % \end{macrocode} % Low-level macro: % \begin{macrocode} \def\@ACRfullpl#1#2[#3]{% \acrlinkfullformat{\@ACRlongpl}{\@ACRshortpl}{#1}{#2}{#3}% } % \end{macrocode} %\end{macro} % %\subsection{Predefined acronym styles} %\begin{macro}{\acronymfont} %This is only used with the additional acronym styles: % \begin{macrocode} \newcommand{\acronymfont}[1]{#1} % \end{macrocode} %\end{macro} %\begin{macro}{\firstacronymfont} %This is only used with the additional acronym styles: %\changes{1.14}{2008 June 17}{new} % \begin{macrocode} \newcommand{\firstacronymfont}[1]{\acronymfont{#1}} % \end{macrocode} %\end{macro} %\begin{macro}{\acrnameformat} % The styles that allow an additional description use % \cs{acrnameformat}\marg{short}\marg{long} to determine what % information is displayed in the name. % \begin{macrocode} \newcommand*{\acrnameformat}[2]{\acronymfont{#1}} % \end{macrocode} %\end{macro} % % Define some tokens used by \cs{newacronym}: %\begin{macro}{\glskeylisttok} % \begin{macrocode} \newtoks\glskeylisttok % \end{macrocode} %\end{macro} %\begin{macro}{\glslabeltok} % \begin{macrocode} \newtoks\glslabeltok % \end{macrocode} %\end{macro} %\begin{macro}{\glsshorttok} % \begin{macrocode} \newtoks\glsshorttok % \end{macrocode} %\end{macro} %\begin{macro}{\glslongtok} % \begin{macrocode} \newtoks\glslongtok % \end{macrocode} %\end{macro} %\begin{macro}{\newacronymhook} % Provide a hook for \cs{newacronym}: % \begin{macrocode} \newcommand*{\newacronymhook}{} % \end{macrocode} %\end{macro} %\begin{macro}{\SetDefaultAcronymDisplayStyle} % Sets the default acronym display style for given glossary. %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\SetDefaultAcronymDisplayStyle}[1]{% \defglsdisplay[#1]{##1##4}% \defglsdisplayfirst[#1]{##1##4}% } % \end{macrocode} %\end{macro} %\begin{macro}{\DefaultNewAcronymDef} % Sets up the acronym definition for the default style. % The information is provided by the tokens \cs{glslabeltok}, % \cs{glsshorttok}, \cs{glslongtok} and \cs{glskeylisttok}. % \begin{macrocode} \newcommand*{\DefaultNewAcronymDef}{% \edef\@do@newglossaryentry{% \noexpand\newglossaryentry{\the\glslabeltok}% {% type=\acronymtype,% name={\the\glsshorttok},% sort={\the\glsshorttok},% text={\the\glsshorttok},% first={\acrfullformat{\the\glslongtok}{\the\glsshorttok}},% plural={\the\glsshorttok\noexpand\acrpluralsuffix},% firstplural={\acrfullformat{\noexpand\@glo@longpl}% {\noexpand\@glo@shortpl}},% short={\the\glsshorttok},% shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% long={\the\glslongtok},% longplural={\the\glslongtok\noexpand\acrpluralsuffix},% description={\the\glslongtok},% descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},% % \end{macrocode} % Remaining options specified by the user: % \begin{macrocode} \the\glskeylisttok }% }% \@do@newglossaryentry } % \end{macrocode} %\end{macro} %\begin{macro}{\SetDefaultAcronymStyle} %\changes{2.04}{2009 November 10}{new} % Set up the default acronym style: % \begin{macrocode} \newcommand*{\SetDefaultAcronymStyle}{% % \end{macrocode} % Set the display style: % \begin{macrocode} \@for\@gls@type:=\@glsacronymlists\do{% \SetDefaultAcronymDisplayStyle{\@gls@type}% }% % \end{macrocode} % Set up the definition of \cs{newacronym}: % \begin{macrocode} \renewcommand{\newacronym}[4][]{% % \end{macrocode} % If user is just using the main glossary and hasn't identified it % as a list of acronyms, then update. (This is done to ensure % backwards compatibility with versions prior to 2.04). % \begin{macrocode} \ifx\@glsacronymlists\@empty \def\@glo@type{\acronymtype}% \setkeys{glossentry}{##1}% \DeclareAcronymList{\@glo@type}% \SetDefaultAcronymDisplayStyle{\@glo@type}% \fi \glskeylisttok{##1}% \glslabeltok{##2}% \glsshorttok{##3}% \glslongtok{##4}% \newacronymhook \DefaultNewAcronymDef }% \renewcommand*{\acrpluralsuffix}{\glspluralsuffix}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\acrfootnote} %\changes{3.0}{2011/04/02}{new} % Used by the footnote acronym styles. % \begin{macrocode} \newcommand*{\acrfootnote}[3]{\acrlinkfootnote{#1}{#2}{#3}} % \end{macrocode} %\end{macro} %\begin{macro}{\acrlinkfootnote} %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} \newcommand*{\acrlinkfootnote}[3]{% \footnote{\glslink[#1]{#2}{#3}}% } % \end{macrocode} %\end{macro} %\begin{macro}{\acrnolinkfootnote} %\changes{3.0}{2011/04/02}{new} % \begin{macrocode} \newcommand*{\acrnolinkfootnote}[3]{% \footnote{#3}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\SetDescriptionFootnoteAcronymDisplayStyle} % Sets the acronym display style for given glossary for the % description and footnote combination. %\changes{2.04}{2009 November 10}{new} %\changes{3.0}{2011/04/02}{expanded options link options} % \begin{macrocode} \newcommand*{\SetDescriptionFootnoteAcronymDisplayStyle}[1]{% \defglsdisplayfirst[#1]{% \firstacronymfont{##1}##4% \expandafter\protect\expandafter\acrfootnote\expandafter {\@gls@link@opts}{\@gls@link@label}{##3} }% \defglsdisplay[#1]{\acronymfont{##1}##4}% } % \end{macrocode} %\end{macro} %\begin{macro}{\DescriptionFootnoteNewAcronymDef} % \begin{macrocode} \newcommand*{\DescriptionFootnoteNewAcronymDef}{% \edef\@do@newglossaryentry{% \noexpand\newglossaryentry{\the\glslabeltok}% {% type=\acronymtype,% name={\noexpand\acronymfont{\the\glsshorttok}},% sort={\the\glsshorttok},% text={\the\glsshorttok},% plural={\the\glsshorttok\noexpand\acrpluralsuffix},% short={\the\glsshorttok},% shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% long={\the\glslongtok},% longplural={\the\glslongtok\noexpand\acrpluralsuffix},% symbol={\the\glslongtok},% symbolplural={\the\glslongtok\noexpand\acrpluralsuffix},% \the\glskeylisttok }% }% \@do@newglossaryentry } % \end{macrocode} %\end{macro} %\begin{macro}{\SetDescriptionFootnoteAcronymStyle} % If a description and footnote are both required, store the long form % in the \gloskey{symbol} key. Store the short form in \gloskey{text} % key. Note that since the long form is stored in the symbol key, % if you want the long form to appear in the list of acronyms, you % need to use a glossary style that displays the symbol key. % \begin{macrocode} \newcommand*{\SetDescriptionFootnoteAcronymStyle}{% \renewcommand{\newacronym}[4][]{% \ifx\@glsacronymlists\@empty \def\@glo@type{\acronymtype}% \setkeys{glossentry}{##1}% \DeclareAcronymList{\@glo@type}% \SetDescriptionFootnoteAcronymDisplayStyle{\@glo@type}% \fi \glskeylisttok{##1}% \glslabeltok{##2}% \glsshorttok{##3}% \glslongtok{##4}% \newacronymhook \DescriptionFootnoteNewAcronymDef }% % \end{macrocode} % % If \pkgopt{footnote} package option is specified, set the first % use to append the long form (stored in \gloskey{symbol}) as a % footnote. %\changes{1.12}{2008 Mar 8}{Added 'protect before 'footnote % and 'glslink} % \begin{macrocode} \@for\@gls@type:=\@glsacronymlists\do{% \SetDescriptionFootnoteAcronymDisplayStyle{\@gls@type}% }% % \end{macrocode} % Redefine \ics{acronymfont} if small caps required. The plural suffix % is set in an upright font so that it remains in normal lower case, % otherwise it looks as though it's part of the acronym. %\changes{1.19}{2009 Mar 2}{changed 'acronymfont to use 'textsmaller instead %of 'smaller} % \begin{macrocode} \ifglsacrsmallcaps \renewcommand*{\acronymfont}[1]{\textsc{##1}}% \renewcommand*{\acrpluralsuffix}{% \textup{\glspluralsuffix}}% \else \ifglsacrsmaller \renewcommand*{\acronymfont}[1]{\textsmaller{##1}}% \fi \fi % \end{macrocode} % Check for package option clash % \begin{macrocode} \ifglsacrdua \PackageError{glossaries}{Option clash: `footnote' and `dua' can't both be set}{}% \fi }% % \end{macrocode} %\end{macro} % %\begin{macro}{\SetDescriptionDUAAcronymDisplayStyle} % Sets the acronym display style for given glossary with % description and dua combination. %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\SetDescriptionDUAAcronymDisplayStyle}[1]{% \defglsdisplay[#1]{##1##4}% \defglsdisplayfirst[#1]{##1##4}% } % \end{macrocode} %\end{macro} %\begin{macro}{\DescriptionDUANewAcronymDef} % \begin{macrocode} \newcommand*{\DescriptionDUANewAcronymDef}{% \edef\@do@newglossaryentry{% \noexpand\newglossaryentry{\the\glslabeltok}% {% type=\acronymtype,% name={\the\glslongtok},% sort={\the\glslongtok}, text={\the\glslongtok},% plural={\the\glslongtok\noexpand\acrpluralsuffix},% short={\the\glsshorttok},% shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% long={\the\glslongtok},% longplural={\the\glslongtok\noexpand\acrpluralsuffix},% symbol={\the\glsshorttok},% symbolplural={\the\glsshorttok\noexpand\acrpluralsuffix},% \the\glskeylisttok }% }% \@do@newglossaryentry } % \end{macrocode} %\end{macro} %\begin{macro}{\SetDescriptionDUAAcronymStyle} % Description, don't use acronym and no footnote. % Note that the short form is stored in the \gloskey{symbol} key, % so if the short form needs to be displayed in the glossary, % use a style the displays the symbol. % \begin{macrocode} \newcommand*{\SetDescriptionDUAAcronymStyle}{% \ifglsacrsmallcaps \PackageError{glossaries}{Option clash: `smallcaps' and `dua' can't both be set}{}% \else \ifglsacrsmaller \PackageError{glossaries}{Option clash: `smaller' and `dua' can't both be set}{}% \fi \fi \renewcommand{\newacronym}[4][]{% \ifx\@glsacronymlists\@empty \def\@glo@type{\acronymtype}% \setkeys{glossentry}{##1}% \DeclareAcronymList{\@glo@type}% \SetDescriptionDUAAcronymDisplayStyle{\@glo@type}% \fi \glskeylisttok{##1}% \glslabeltok{##2}% \glsshorttok{##3}% \glslongtok{##4}% \newacronymhook \DescriptionDUANewAcronymDef }% % \end{macrocode} % Set display. % \begin{macrocode} \@for\@gls@type:=\@glsacronymlists\do{% \SetDescriptionDUAAcronymDisplayStyle{\@gls@type}% }% }% % \end{macrocode} %\end{macro} % %\begin{macro}{\SetDescriptionAcronymDisplayStyle} % Sets the acronym display style for given glossary using % the description setting (but not \pkgopt{footnote} or \pkgopt{dua}). %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\SetDescriptionAcronymDisplayStyle}[1]{% \defglsdisplayfirst[#1]{% ##1##4 (\firstacronymfont{##3})}% \defglsdisplay[#1]{\acronymfont{##1}##4}% } % \end{macrocode} %\end{macro} %\begin{macro}{\DescriptionNewAcronymDef} % \begin{macrocode} \newcommand*{\DescriptionNewAcronymDef}{% \edef\@do@newglossaryentry{% \noexpand\newglossaryentry{\the\glslabeltok}% {% type=\acronymtype,% name={\noexpand \acrnameformat{\the\glsshorttok}{\the\glslongtok}},% sort={\the\glsshorttok},% first={\the\glslongtok},% firstplural={\the\glslongtok\noexpand\acrpluralsuffix},% text={\the\glsshorttok},% plural={\the\glsshorttok\noexpand\acrpluralsuffix},% short={\the\glsshorttok},% shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% long={\the\glslongtok},% longplural={\the\glslongtok\noexpand\acrpluralsuffix},% symbol={\noexpand\@glo@text},% symbolplural={\noexpand\@glo@plural},% \the\glskeylisttok}% }% \@do@newglossaryentry } % \end{macrocode} %\end{macro} %\begin{macro}{\SetDescriptionAcronymStyle} % Option \pkgopt{description} is used, but not \pkgopt{dua} % or \pkgopt{footnote}. % Store long form in \gloskey{first} key % and short form in \gloskey{text} and \gloskey{symbol} key. % The name is stored using \ics{acrnameformat} to allow the % user to override the way the name is displayed in the % list of acronyms. % \begin{macrocode} \newcommand*{\SetDescriptionAcronymStyle}{% \renewcommand{\newacronym}[4][]{% \ifx\@glsacronymlists\@empty \def\@glo@type{\acronymtype}% \setkeys{glossentry}{##1}% \DeclareAcronymList{\@glo@type}% \SetDescriptionAcronymDisplayStyle{\@glo@type}% \fi \glskeylisttok{##1}% \glslabeltok{##2}% \glsshorttok{##3}% \glslongtok{##4}% \newacronymhook \DescriptionNewAcronymDef }% % \end{macrocode} % Set display. % \begin{macrocode} \@for\@gls@type:=\@glsacronymlists\do{% \SetDescriptionAcronymDisplayStyle{\@gls@type}% }% % \end{macrocode} % Redefine \ics{acronymfont} if small caps required. The plural suffix % is set in an upright font so that it remains in normal lower case, % otherwise it looks as though it's part of the acronym. %\changes{1.19}{2009 Mar 2}{changed 'acronymfont to use 'textsmaller instead %of 'smaller} % \begin{macrocode} \ifglsacrsmallcaps \renewcommand{\acronymfont}[1]{\textsc{##1}} \renewcommand*{\acrpluralsuffix}{% \textup{\glspluralsuffix}}% \else \ifglsacrsmaller \renewcommand*{\acronymfont}[1]{\textsmaller{##1}}% \fi \fi }% % \end{macrocode} %\end{macro} % %\begin{macro}{\SetFootnoteAcronymDisplayStyle} % Sets the acronym display style for given glossary with % footnote setting (but not \pkgopt{description} or \pkgopt{dua}). %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\SetFootnoteAcronymDisplayStyle}[1]{% \defglsdisplayfirst[#1]{% \firstacronymfont{##1}##4% \expandafter\protect\expandafter\acrfootnote\expandafter {\@gls@link@opts}{\@gls@link@label}{##2}% }% \defglsdisplay[#1]{\acronymfont{##1}##4}% } % \end{macrocode} %\end{macro} %\begin{macro}{\FootnoteNewAcronymDef} % \begin{macrocode} \newcommand*{\FootnoteNewAcronymDef}{% \edef\@do@newglossaryentry{% \noexpand\newglossaryentry{\the\glslabeltok}% {% type=\acronymtype,% name={\noexpand\acronymfont{\the\glsshorttok}},% sort={\the\glsshorttok},% text={\the\glsshorttok},% plural={\the\glsshorttok\noexpand\acrpluralsuffix},% short={\the\glsshorttok},% shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% long={\the\glslongtok},% longplural={\the\glslongtok\noexpand\acrpluralsuffix},% description={\the\glslongtok},% descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},% \the\glskeylisttok }% }% \@do@newglossaryentry } % \end{macrocode} %\end{macro} %\begin{macro}{\SetFootnoteAcronymStyle} % If \pkgopt{footnote} package option is specified, set the first % use to append the long form (stored in \gloskey{description}) as a % footnote. % Use the \gloskey{description} key to store the long form. % \begin{macrocode} \newcommand*{\SetFootnoteAcronymStyle}{% \renewcommand{\newacronym}[4][]{% \ifx\@glsacronymlists\@empty \def\@glo@type{\acronymtype}% \setkeys{glossentry}{##1}% \DeclareAcronymList{\@glo@type}% \SetFootnoteAcronymDisplayStyle{\@glo@type}% \fi \glskeylisttok{##1}% \glslabeltok{##2}% \glsshorttok{##3}% \glslongtok{##4}% \newacronymhook \FootnoteNewAcronymDef }% % \end{macrocode} % Set display %\changes{1.12}{2008 Mar 8}{Added 'protect before 'footnote and % 'glslink} % \begin{macrocode} \@for\@gls@type:=\@glsacronymlists\do{% \SetFootnoteAcronymDisplayStyle{\@gls@type}% }% % \end{macrocode} % Redefine \ics{acronymfont} if small caps required. The plural suffix % is set in an upright font so that it remains in normal lower case, % otherwise it looks as though it's part of the acronym. %\changes{1.19}{2009 Mar 2}{changed 'acronymfont to use 'textsmaller instead %of 'smaller} % \begin{macrocode} \ifglsacrsmallcaps \renewcommand*{\acronymfont}[1]{\textsc{##1}}% \renewcommand*{\acrpluralsuffix}{% \textup{\glspluralsuffix}}% \else \ifglsacrsmaller \renewcommand*{\acronymfont}[1]{\textsmaller{##1}}% \fi \fi % \end{macrocode} % Check for option clash % \begin{macrocode} \ifglsacrdua \PackageError{glossaries}{Option clash: `footnote' and `dua' can't both be set}{}% \fi }% % \end{macrocode} %\end{macro} % %\begin{macro}{\SetSmallAcronymDisplayStyle} % Sets the acronym display style for given glossary where neither % footnote nor description is required, but smallcaps or smaller % specified. %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\SetSmallAcronymDisplayStyle}[1]{% \defglsdisplayfirst[#1]{##1##4 (\firstacronymfont{##3})} \defglsdisplay[#1]{\acronymfont{##1}##4}% } % \end{macrocode} %\end{macro} %\begin{macro}{\SmallNewAcronymDef} % \begin{macrocode} \newcommand*{\SmallNewAcronymDef}{% \edef\@do@newglossaryentry{% \noexpand\newglossaryentry{\the\glslabeltok}% {% type=\acronymtype,% name={\noexpand\acronymfont{\the\glsshorttok}},% sort={\the\glsshorttok},% text={\noexpand\@glo@symbol},% plural={\noexpand\@glo@symbolplural},% first={\the\glslongtok},% firstplural={\the\glslongtok\noexpand\acrpluralsuffix},% short={\the\glsshorttok},% shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% long={\the\glslongtok},% longplural={\the\glslongtok\noexpand\acrpluralsuffix},% description={\noexpand\@glo@first},% descriptionplural={\noexpand\@glo@firstplural},% symbol={\the\glsshorttok},% symbolplural={\the\glsshorttok\noexpand\acrpluralsuffix},% \the\glskeylisttok }% }% \@do@newglossaryentry } % \end{macrocode} %\end{macro} %\begin{macro}{\SetSmallAcronymStyle} % Neither footnote nor description required, but smallcaps or % smaller specified. % Use the \gloskey{symbol} key to store the short form and % \gloskey{first} to store the long form. % \begin{macrocode} \newcommand*{\SetSmallAcronymStyle}{% \renewcommand{\newacronym}[4][]{% \ifx\@glsacronymlists\@empty \def\@glo@type{\acronymtype}% \setkeys{glossentry}{##1}% \DeclareAcronymList{\@glo@type}% \SetSmallAcronymDisplayStyle{\@glo@type}% \fi \glskeylisttok{##1}% \glslabeltok{##2}% \glsshorttok{##3}% \glslongtok{##4}% \newacronymhook \SmallNewAcronymDef }% % \end{macrocode} % Change the display since \gloskey{first} only contains long form. % \begin{macrocode} \@for\@gls@type:=\@glsacronymlists\do{% \SetSmallAcronymDisplayStyle{\@gls@type}% }% % \end{macrocode} % Redefine \ics{acronymfont} if small caps required. The plural suffix % is set in an upright font so that it remains in normal lower case, % otherwise it looks as though it's part of the acronym. %\changes{1.19}{2009 Mar 2}{changed 'acronymfont to use 'textsmaller instead %of 'smaller} % \begin{macrocode} \ifglsacrsmallcaps \renewcommand*{\acronymfont}[1]{\textsc{##1}} \renewcommand*{\acrpluralsuffix}{% \textup{\glspluralsuffix}}% \else \renewcommand*{\acronymfont}[1]{\textsmaller{##1}} \fi % \end{macrocode} % check for option clash % \begin{macrocode} \ifglsacrdua \ifglsacrsmallcaps \PackageError{glossaries}{Option clash: `smallcaps' and `dua' can't both be set}{}% \else \PackageError{glossaries}{Option clash: `smaller' and `dua' can't both be set}{}% \fi \fi }% % \end{macrocode} %\end{macro} % %\begin{macro}{\SetDUADisplayStyle} % Sets the acronym display style for given glossary with dua % setting. %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\SetDUADisplayStyle}[1]{% \defglsdisplay[#1]{##1##4}% \defglsdisplayfirst[#1]{##1##4}% } % \end{macrocode} %\end{macro} %\begin{macro}{\DUANewAcronymDef} % \begin{macrocode} \newcommand*{\DUANewAcronymDef}{% \edef\@do@newglossaryentry{% \noexpand\newglossaryentry{\the\glslabeltok}% {% type=\acronymtype,% name={\the\glsshorttok},% text={\the\glslongtok},% plural={\the\glslongtok\noexpand\acrpluralsuffix},% short={\the\glsshorttok},% shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% long={\the\glslongtok},% longplural={\the\glslongtok\noexpand\acrpluralsuffix},% description={\the\glslongtok},% symbol={\the\glsshorttok},% symbolplural={\the\glsshorttok\noexpand\acrpluralsuffix},% \the\glskeylisttok }% }% \@do@newglossaryentry } % \end{macrocode} %\end{macro} %\begin{macro}{\SetDUAStyle} % Always expand acronyms. % \begin{macrocode} \newcommand*{\SetDUAStyle}{% \renewcommand{\newacronym}[4][]{% \ifx\@glsacronymlists\@empty \def\@glo@type{\acronymtype}% \setkeys{glossentry}{##1}% \DeclareAcronymList{\@glo@type}% \SetDUADisplayStyle{\@glo@type}% \fi \glskeylisttok{##1}% \glslabeltok{##2}% \glsshorttok{##3}% \glslongtok{##4}% \newacronymhook \DUANewAcronymDef }% % \end{macrocode} % Set the display % \begin{macrocode} \@for\@gls@type:=\@glsacronymlists\do{% \SetDUADisplayStyle{\@gls@type}% }% } % \end{macrocode} %\end{macro} % %\begin{macro}{\SetAcronymStyle} % \begin{macrocode} \newcommand*{\SetAcronymStyle}{% \SetDefaultAcronymStyle \ifglsacrdescription \ifglsacrfootnote \SetDescriptionFootnoteAcronymStyle \else \ifglsacrdua \SetDescriptionDUAAcronymStyle \else \SetDescriptionAcronymStyle \fi \fi \else \ifglsacrfootnote \SetFootnoteAcronymStyle \else \ifthenelse{\boolean{glsacrsmallcaps}\OR \boolean{glsacrsmaller}}% {% \SetSmallAcronymStyle }% {% \ifglsacrdua \SetDUAStyle \fi }% \fi \fi } % \end{macrocode} % Set the acronym style according to the package options % \begin{macrocode} \SetAcronymStyle % \end{macrocode} %\end{macro} % % Allow user to define their own custom acronyms. % (For compatibility with versions before v3.0, the short form is % stored in the user1 key, the plural short form is stored in the % user2 key, the long form is stored in the user3 key and the % plural long form is stored in the user4 key.) Defaults to % displaying only the acronym with the long form as the description. %\begin{macro}{\SetCustomDisplayStyle} % Sets the acronym display style. %\changes{2.06}{2010 June 14}{new} % \begin{macrocode} \newcommand*{\SetCustomDisplayStyle}[1]{% \defglsdisplay[#1]{##1##4}% \defglsdisplayfirst[#1]{##1##4}% } % \end{macrocode} %\end{macro} %\begin{macro}{\CustomAcronymFields} %\changes{2.06}{2010 June 14}{new} % \begin{macrocode} \newcommand*{\CustomAcronymFields}{% name={\the\glsshorttok},% description={\the\glslongtok},% first={\noexpand\acrfullformat{\the\glslongtok}{\the\glsshorttok}},% firstplural={\noexpand\acrfullformat {\the\glslongtok\noexpand\acrpluralsuffix}{\the\glsshorttok}}% text={\the\glsshorttok},% plural={\the\glsshorttok\noexpand\acrpluralsuffix}% } % \end{macrocode} %\end{macro} %\begin{macro}{\CustomNewAcronymDef} %\changes{2.06}{2010 June 14}{new} % \begin{macrocode} \newcommand*{\CustomNewAcronymDef}{% \protected@edef\@do@newglossaryentry{% \noexpand\newglossaryentry{\the\glslabeltok}% {% type=\acronymtype,% short={\the\glsshorttok},% shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% long={\the\glslongtok},% longplural={\the\glslongtok\noexpand\acrpluralsuffix},% user1={\the\glsshorttok},% user2={\the\glsshorttok\noexpand\acrpluralsuffix},% user3={\the\glslongtok},% user4={\the\glslongtok\noexpand\acrpluralsuffix},% \CustomAcronymFields,% \the\glskeylisttok }% }% \@do@newglossaryentry } % \end{macrocode} %\end{macro} %\begin{macro}{\SetCustomStyle} %\changes{2.06}{2010 June 14}{new} % \begin{macrocode} \newcommand*{\SetCustomStyle}{% \renewcommand{\newacronym}[4][]{% \ifx\@glsacronymlists\@empty \def\@glo@type{\acronymtype}% \setkeys{glossentry}{##1}% \DeclareAcronymList{\@glo@type}% \SetCustomDisplayStyle{\@glo@type}% \fi \glskeylisttok{##1}% \glslabeltok{##2}% \glsshorttok{##3}% \glslongtok{##4}% \newacronymhook \CustomNewAcronymDef }% % \end{macrocode} % Set the display % \begin{macrocode} \@for\@gls@type:=\@glsacronymlists\do{% \SetCustomDisplayStyle{\@gls@type}% }% } % \end{macrocode} %\end{macro} % % %\begin{macro}{\DefineAcronymSynonyms} %\changes{2.04}{2009 November 10}{new} % \begin{macrocode} \newcommand*{\DefineAcronymSynonyms}{% % \end{macrocode} %\end{macro} % Short form %\begin{macro}{\acs} % \begin{macrocode} \let\acs\acrshort % \end{macrocode} %\end{macro} % First letter uppercase short form %\begin{macro}{\Acs} % \begin{macrocode} \let\Acs\Acrshort % \end{macrocode} %\end{macro} % Plural short form %\begin{macro}{\acsp} % \begin{macrocode} \let\acsp\acrshortpl % \end{macrocode} %\end{macro} % First letter uppercase plural short form %\begin{macro}{\Acsp} % \begin{macrocode} \let\Acsp\Acrshortpl % \end{macrocode} %\end{macro} % Long form %\begin{macro}{\acl} % \begin{macrocode} \let\acl\acrlong % \end{macrocode} %\end{macro} % Plural long form %\begin{macro}{\aclp} % \begin{macrocode} \let\aclp\acrlongpl % \end{macrocode} %\end{macro} % First letter upper case long form %\begin{macro}{\Acl} % \begin{macrocode} \let\Acl\Acrlong % \end{macrocode} %\end{macro} % First letter upper case plural long form %\begin{macro}{\Aclp} % \begin{macrocode} \let\Aclp\Acrlongpl % \end{macrocode} %\end{macro} % Full form %\begin{macro}{\acf} % \begin{macrocode} \let\acf\acrfull % \end{macrocode} %\end{macro} % Plural full form %\begin{macro}{\acfp} % \begin{macrocode} \let\acfp\acrfullpl % \end{macrocode} %\end{macro} % First letter upper case full form %\begin{macro}{\Acf} % \begin{macrocode} \let\Acf\Acrfull % \end{macrocode} %\end{macro} % First letter upper case plural full form %\begin{macro}{\Acfp} % \begin{macrocode} \let\Acfp\Acrfullpl % \end{macrocode} %\end{macro} % Standard form %\begin{macro}{\ac} % \begin{macrocode} \let\ac\gls % \end{macrocode} %\end{macro} % First upper case standard form %\begin{macro}{\Ac} % \begin{macrocode} \let\Ac\Gls % \end{macrocode} %\end{macro} % Standard plural form %\begin{macro}{\acp} % \begin{macrocode} \let\acp\glspl % \end{macrocode} %\end{macro} % Standard first letter upper case plural form %\begin{macro}{\Acp} % \begin{macrocode} \let\Acp\Glspl % \end{macrocode} %\end{macro} % \begin{macrocode} } % \end{macrocode} % Define synonyms if required % \begin{macrocode} \ifglsacrshortcuts \DefineAcronymSynonyms \fi % \end{macrocode} % % \subsection{Predefined Glossary Styles}\label{sec:code:styles} % The \sty{glossaries} bundle comes with some predefined glossary % styles. These need to be loaded now for the \pkgopt{style} option % to use them. % % First, the glossary hyper-navigation commands need to be loaded. % \begin{macrocode} \RequirePackage{glossary-hypernav} % \end{macrocode} % The styles that use list-like environments. These are not loaded % if the \pkgopt{nolist} option is used: % \begin{macrocode} \@gls@loadlist % \end{macrocode} % The styles that use the \env{longtable} environment. These are % not loaded if the \pkgopt{nolong} package option is used. % \begin{macrocode} \@gls@loadlong % \end{macrocode} % The styles that use the \env{supertabular} environment. These are % not loaded if the \pkgopt{nosuper} package option is used or if % the \isty{supertabular} package isn't installed. % \begin{macrocode} \@gls@loadsuper % \end{macrocode} % The tree-like styles. These are not loaded if the \pkgopt{notree} % package option is used. % \begin{macrocode} \@gls@loadtree % \end{macrocode} % The default glossary style is set according to the \pkgopt{style} package % option, but can be overridden by \ics{glossarystyle}. The % required style must be defined at this point. % \begin{macrocode} \ifx\@glossary@default@style\relax \else \glossarystyle{\@glossary@default@style} \fi % \end{macrocode} % %\subsection{Debugging Commands} % %\begin{macro}{\showgloparent} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showgloparent}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showgloparent}[1]{% \expandafter\show\csname glo@#1@parent\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglolevel} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglolevel}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showglolevel}[1]{% \expandafter\show\csname glo@#1@level\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglotext} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglotext}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showglotext}[1]{% \expandafter\show\csname glo@#1@text\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showgloplural} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showgloplural}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showgloplural}[1]{% \expandafter\show\csname glo@#1@plural\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglofirst} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglofirst}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showglofirst}[1]{% \expandafter\show\csname glo@#1@first\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglofirstpl} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglofirstpl}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showglofirstpl}[1]{% \expandafter\show\csname glo@#1@firstpl\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglotype} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglotype}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showglotype}[1]{% \expandafter\show\csname glo@#1@type\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglocounter} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglocounter}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showglocounter}[1]{% \expandafter\show\csname glo@#1@counter\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglouseri} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglouseri}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showglouseri}[1]{% \expandafter\show\csname glo@#1@useri\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglouserii} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglouserii}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showglouserii}[1]{% \expandafter\show\csname glo@#1@userii\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglouseriii} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglouseriii}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showglouseriii}[1]{% \expandafter\show\csname glo@#1@useriii\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglouseriv} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglouseriv}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showglouseriv}[1]{% \expandafter\show\csname glo@#1@useriv\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglouserv} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglouserv}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showglouserv}[1]{% \expandafter\show\csname glo@#1@userv\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglouservi} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglouservi}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showglouservi}[1]{% \expandafter\show\csname glo@#1@uservi\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showgloname} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showgloname}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showgloname}[1]{% \expandafter\show\csname glo@#1@name\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglodesc} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglodesc}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showglodesc}[1]{% \expandafter\show\csname glo@#1@desc\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglodescplural} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglodescplural}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showglodescplural}[1]{% \expandafter\show\csname glo@#1@descplural\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglosort} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglosort}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showglosort}[1]{% \expandafter\show\csname glo@#1@sort\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglosymbol} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglosymbol}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showglosymbol}[1]{% \expandafter\show\csname glo@#1@symbol\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglosymbolplural} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglosymbolplural}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showglosymbolplural}[1]{% \expandafter\show\csname glo@#1@symbolplural\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showgloindex} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showgloindex}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showgloindex}[1]{% \expandafter\show\csname glo@#1@index\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showgloflag} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showgloflag}\marg{label} %\end{definition} % \begin{macrocode} \newcommand*{\showgloflag}[1]{% \expandafter\show\csname ifglo@#1@flag\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showacronymlists} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showacronymlists} %\end{definition} % Show list of glossaries that have been flagged as a list of % acronyms. % \begin{macrocode} \newcommand*{\showacronymlists}{% \show\@glsacronymlists } % \end{macrocode} %\end{macro} %\begin{macro}{\showglossaries} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglossaries} %\end{definition} % Show list of defined glossaries. % \begin{macrocode} \newcommand*{\showglossaries}{% \show\@glo@types } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglossaryin} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglossaryin}\marg{glossary-label} %\end{definition} % Show the `in' extension for the given glossary. % \begin{macrocode} \newcommand*{\showglossaryin}[1]{% \expandafter\show\csname @glotype@#1@in\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglossaryout} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglossaryout}\marg{glossary-label} %\end{definition} % Show the `out' extension for the given glossary. % \begin{macrocode} \newcommand*{\showglossaryout}[1]{% \expandafter\show\csname @glotype@#1@out\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglossarytitle} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglossarytitle}\marg{glossary-label} %\end{definition} % Show the title for the given glossary. % \begin{macrocode} \newcommand*{\showglossarytitle}[1]{% \expandafter\show\csname @glotype@#1@title\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglossarycounter} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglossarycounter}\marg{glossary-label} %\end{definition} % Show the counter for the given glossary. % \begin{macrocode} \newcommand*{\showglossarycounter}[1]{% \expandafter\show\csname @glotype@#1@counter\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\showglossaryentries} %\changes{3.0}{2011/04/02}{new} %\begin{definition} %\cs{showglossaryentries}\marg{glossary-label} %\end{definition} % Show the list of entry labels for the given glossary. % \begin{macrocode} \newcommand*{\showglossaryentries}[1]{% \expandafter\show\csname @glolist@#1\endcsname } % \end{macrocode} %\end{macro} % %\subsection{Compatibility with version 2.07 and below} % % In order to fix some bugs in v3.0, it was necessary to change the % way information is written to the \filetype{glo} file, which also meant % a change in the format of the Xindy style file. The compatibility % option is meant for documents that use a customised Xindy style % file with \ics{noist}. With the compatibility option, hopefully % \app{xindy} will still be able to process the old document, but % the bugs will remain. The issues in versions 2.07 and below: %\begin{itemize} % \item With \pkgopt{xindy}, the counter used by the entry was % hard-coded into the Xindy style file. This meant that you couldn't % use the \gloskey[glslink]{counter} to swap counters. % \item With both \pkgopt{xindy} and \pkgopt{makeindex}, if used % with \sty{hyperref} and \cs{theH}\meta{counter} was different to % \cs{thecounter}, the link in the location number would be % undefined. %\end{itemize} % \begin{macrocode} \csname ifglscompatible-2.07\endcsname \RequirePackage{glossaries-compatible-207} \fi % \end{macrocode} %\iffalse % \begin{macrocode} % % \end{macrocode} %\fi %\iffalse % \begin{macrocode} %<*mfirstuc.sty> % \end{macrocode} %\fi %\section{Mfirstuc Documented Code} %\label{sec:code:mfirstuc} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{mfirstuc}[2011/04/02 v1.05 (NLCT)] % \end{macrocode} %\begin{macro}{\makefirstuc} % Syntax:\\ % \cs{makefirstuc}\marg{text}\\ % Makes the first letter uppercase, but will % skip initial control sequences if they are followed by a group % and make the first thing in the group uppercase, unless the group % is empty. % Thus \verb|\makefirstuc{abc}| will produce: Abc, % \verb|\makefirstuc{\ae bc}| will produce: \AE bc, but % \verb|\makefirstuc{\emph{abc}}| will produce \emph{Abc}. % This is required by \ics{Gls} and \ics{Glspl}. % \begin{macrocode} \newif\if@glscs \newtoks\@glsmfirst \newtoks\@glsmrest \def\makefirstuc#1{% \def\gls@argi{#1}% \ifx\gls@argi\@empty % \end{macrocode} % If the argument is empty, do nothing. % \begin{macrocode} \else % \end{macrocode} %\changes{1.03}{2008/12/22}{changed 'protected@edef to 'def} % \begin{macrocode} \def\@gls@tmp{\ #1}% \@onelevel@sanitize\@gls@tmp \expandafter\@gls@checkcs\@gls@tmp\relax\relax \if@glscs \@gls@getbody #1{}\@nil \ifx\@gls@rest\@empty \glsmakefirstuc{#1}% \else \expandafter\@gls@split\@gls@rest\@nil \ifx\@gls@first\@empty \glsmakefirstuc{#1}% \else \expandafter\@glsmfirst\expandafter{\@gls@first}% \expandafter\@glsmrest\expandafter{\@gls@rest}% \edef\@gls@domfirstuc{\noexpand\@gls@body {\noexpand\glsmakefirstuc\the\@glsmfirst}% \the\@glsmrest}% \@gls@domfirstuc \fi \fi \else \glsmakefirstuc{#1}% \fi \fi } % \end{macrocode} %\end{macro} % Put first argument in \cs{@gls@first} and second argument in % \cs{@gls@rest}: % \begin{macrocode} \def\@gls@split#1#2\@nil{% \def\@gls@first{#1}\def\@gls@rest{#2}% } % \end{macrocode} % \begin{macrocode} \def\@gls@checkcs#1 #2#3\relax{% \def\@gls@argi{#1}\def\@gls@argii{#2}% \ifx\@gls@argi\@gls@argii \@glscstrue \else \@glscsfalse \fi } % \end{macrocode} % Make first thing upper case: % \begin{macrocode} \def\@gls@makefirstuc#1{\MakeUppercase #1} % \end{macrocode} %\begin{macro}{\glsmakefirstuc} %\changes{1.05}{2011/04/02}{new} % Provide a user command to make it easier to customise. % \begin{macrocode} \newcommand*{\glsmakefirstuc}[1]{\@gls@makefirstuc{#1}} % \end{macrocode} %\end{macro} % % Get the first grouped argument and stores in \cs{@gls@body}. % \begin{macrocode} \def\@gls@getbody#1#{\def\@gls@body{#1}\@gls@gobbletonil} % \end{macrocode} % Scoup up everything to \cs{@nil} and store in \cs{@gls@rest}: % \begin{macrocode} \def\@gls@gobbletonil#1\@nil{\def\@gls@rest{#1}} % \end{macrocode} % %\begin{macro}{\xmakefirstuc} % Expand argument once before applying \cs{makefirstuc} % (added v1.01). % \begin{macrocode} \newcommand*{\xmakefirstuc}[1]{% \expandafter\makefirstuc\expandafter{#1}} % \end{macrocode} %\end{macro} %\section{Glossary Styles} %\iffalse % \begin{macrocode} % % \end{macrocode} %\fi %\iffalse % \begin{macrocode} %<*glossary-hypernav.sty> % \end{macrocode} %\fi % \subsection{Glossary hyper-navigation definitions (glossary-hypernav package)} %\label{sec:code:hypernav} % Package Definition: % \begin{macrocode} \ProvidesPackage{glossary-hypernav}[2007/07/04 v1.01 (NLCT)] % \end{macrocode} % % The commands defined in this package are provided to % help navigate around the groups within a glossary % (see \autoref{sec:code:printglos}.) % \ics{printglossary} (and \ics{printglossaries}) % set \cs{@glo@type} to the label of the current % glossary. This is used to create a unique hypertarget in % the event of multiple glossaries. %\\[10pt] % \cs{glsnavhyperlink}\oarg{type}\marg{label}\marg{text}\\[10pt] % This command makes \meta{text} a hyperlink to the glossary group % whose label is given by \meta{label} for the glossary given % by \meta{type}. %\begin{macro}{\glsnavhyperlink} %\changes{1.14}{2008 June 17}{changed 'edef to 'protected@edef} %\changes{1.17}{2008 December 26}{replaced 'hyperlink to '@glslink} % \begin{macrocode} \newcommand*{\glsnavhyperlink}[3][\@glo@type]{% \edef\gls@grplabel{#2}\protected@edef\@gls@grptitle{#3}% \@glslink{glsn:#1@#2}{#3}} % \end{macrocode} %\end{macro} %\vskip5pt % \cs{glsnavhypertarget}\oarg{type}\marg{label}\marg{text}\\[10pt] % This command makes \meta{text} a hypertarget for the glossary group % whose label is given by \meta{label} in the glossary given % by \meta{type}. If \meta{type} is omitted, \cs{@glo@type} is % used which is set by \ics{printglossary} to the current % glossary label. %\begin{macro}{\glsnavhypertarget} %\changes{1.14}{2008 June 17}{added write to aux file} %\changes{1.15}{2008 August 15}{added check if rerun required} %\changes{1.17}{2008 December 26}{replaced 'hypertarget to '@glstarget} % \begin{macrocode} \newcommand*{\glsnavhypertarget}[3][\@glo@type]{% % \end{macrocode} % Add this group to the aux file for re-run check. % \begin{macrocode} \protected@write\@auxout{}{\string\@gls@hypergroup{#1}{#2}}% % \end{macrocode} % Add the target. % \begin{macrocode} \@glstarget{glsn:#1@#2}{#3}% % \end{macrocode} % Check list of know groups to determine if a re-run is required. % \begin{macrocode} \expandafter\let \expandafter\@gls@list\csname @gls@hypergrouplist@#1\endcsname % \end{macrocode} % Iterate through list and terminate loop if this group is found. % \begin{macrocode} \@for\@gls@elem:=\@gls@list\do{% \ifthenelse{\equal{\@gls@elem}{#2}}{\@endfortrue}{}}% % \end{macrocode} % Check if list terminated prematurely. % \begin{macrocode} \if@endfor \else % \end{macrocode} % This group was not included in the list, so issue a warning. % \begin{macrocode} \GlossariesWarningNoLine{Navigation panel for glossary type `#1'^^Jmissing group `#2'}% \gdef\gls@hypergrouprerun{% \GlossariesWarningNoLine{Navigation panel has changed. Rerun LaTeX}}% \fi } % \end{macrocode} %\end{macro} %\begin{macro}{\gls@hypergrouprerun} % Give a warning at the end if re-run required %\changes{1.15}{2008 August 15}{new} % \begin{macrocode} \let\gls@hypergrouprerun\relax \AtEndDocument{\gls@hypergrouprerun} % \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@hypergroup} % This adds to (or creates) the command \cs{@gls@hypergrouplist@}\meta{glossary type} % which lists all groups for a given glossary, so that % the navigation bar only contains those groups that are present. % However it requires at least 2 runs to ensure the information is % up-to-date. %\changes{1.14}{2008 June 17}{new} % \begin{macrocode} \newcommand*{\@gls@hypergroup}[2]{% \@ifundefined{@gls@hypergrouplist@#1}{% \expandafter\xdef\csname @gls@hypergrouplist@#1\endcsname{#2}% }{% \expandafter\let\expandafter\@gls@tmp \csname @gls@hypergrouplist@#1\endcsname \expandafter\xdef\csname @gls@hypergrouplist@#1\endcsname{% \@gls@tmp,#2}% }% } % \end{macrocode} %\end{macro} % % The \cs{glsnavigation} command displays a simple glossary % group navigation. % The symbol and number elements are defined separately, % so that they can be suppressed if need be. Note that this % command will produce a link to all 28 groups, but some groups % may not be defined if there are groups that do not contain any % terms, in which case you will get an undefined hyperlink warning. % Now for the whole navigation bit: %\begin{macro}{\glsnavigation} % \changes{1.14}{2008 June 2008}{changed to only use labels for % groups that are present} % \begin{macrocode} \newcommand*{\glsnavigation}{% \def\@gls@between{}% \@ifundefined{@gls@hypergrouplist@\@glo@type}{% \def\@gls@list{}% }{% \expandafter\let\expandafter\@gls@list \csname @gls@hypergrouplist@\@glo@type\endcsname }% \@for\@gls@tmp:=\@gls@list\do{% \@gls@between \glsnavhyperlink{\@gls@tmp}{\glsgetgrouptitle{\@gls@tmp}}% \let\@gls@between\glshypernavsep% }% } % \end{macrocode} %\end{macro} %\begin{macro}{\glshypernavsep} % Separator for the hyper navigation bar. % \begin{macrocode} \newcommand*{\glshypernavsep}{\space\textbar\space} % \end{macrocode} %\end{macro} % The \cs{glssymbolnav} produces a simple navigation set of % links for just the symbol and number groups. This used to be used at % the start of \cs{glsnavigation}. This command is no longer needed. %\begin{macro}{\glssymbolnav} % \begin{macrocode} \newcommand*{\glssymbolnav}{% \glsnavhyperlink{glssymbols}{\glsgetgrouptitle{glssymbols}}% \glshypernavsep \glsnavhyperlink{glsnumbers}{\glsgetgrouptitle{glsnumbers}}% \glshypernavsep } % \end{macrocode} %\end{macro} %\iffalse % \begin{macrocode} % % \end{macrocode} %\fi %\iffalse % \begin{macrocode} %<*glossary-list.sty> % \end{macrocode} %\fi % \subsection{List Style (glossary-list.sty)} % The \isty{glossary-list} style file defines glossary styles % that use the \env{description} environment. Note that since % the entry name is placed in the optional argument to the % \ics{item} command, it will appear in a bold font by % default. % \begin{macrocode} \ProvidesPackage{glossary-list}[2011/03/28 v3.0 (NLCT)] % \end{macrocode} %\begin{style}{list} % The \glostyle{list} glossary style % uses the \env{description} environment. The group separator % \ics{glsgroupskip} is redefined as \cs{indexspace} % which produces a gap between groups. The glossary heading % and the group headings do nothing. Sub-entries immediately % follow the main entry without the sub-entry name. This style % does not use the entry's symbol. This is used as the default % style for the \sty{glossaries} package. % \begin{macrocode} \newglossarystyle{list}{% % \end{macrocode} % Use \env{description} environment: % \begin{macrocode} \renewenvironment{theglossary}% {\begin{description}}{\end{description}}% % \end{macrocode} % No header at the start of the environment: % \begin{macrocode} \renewcommand*{\glossaryheader}{}% % \end{macrocode} % No group headings: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} % Main (level 0) entries start a new item in the list: % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% \item[\glsentryitem{##1}\glstarget{##1}{##2}] ##3\glspostdescription\space ##5}% % \end{macrocode} % Sub-entries continue on the same line: % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% \glssubentryitem{##2}% \glstarget{##2}{\strut}##4\glspostdescription\space ##6.}% % \end{macrocode} % Add vertical space between groups: % \begin{macrocode} \renewcommand*{\glsgroupskip}{\indexspace}% } % \end{macrocode} %\end{style} % %\begin{style}{listgroup} % The \glostyle{listgroup} style is like the \glostyle{list} % style, but the glossary groups have headings. %\changes{1.08}{2007 Oct 13}{changed listgroup style to use \cs{glsgetgrouptitle}} % \begin{macrocode} \newglossarystyle{listgroup}{% % \end{macrocode} % Base it on the \glostyle{list} style: % \begin{macrocode} \glossarystyle{list}% % \end{macrocode} % Each group has a heading: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{\item[\glsgetgrouptitle{##1}]}} % \end{macrocode} %\end{style} % %\begin{style}{listhypergroup} % The \glostyle{listhypergroup} style is like the \glostyle{listgroup} % style, but has a set of links to the groups at the % start of the glossary. % \begin{macrocode} \newglossarystyle{listhypergroup}{% % \end{macrocode} % Base it on the \glostyle{list} style: % \begin{macrocode} \glossarystyle{list}% % \end{macrocode} % Add navigation links at the start of the environment: % \begin{macrocode} \renewcommand*{\glossaryheader}{% \item[\glsnavigation]}% % \end{macrocode} % Each group has a heading with a hypertarget: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{% \item[\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}]}} % \end{macrocode} %\end{style} % %\begin{style}{altlist} % The \glostyle{altlist} glossary style is like the \glostyle{list} % style, but places the description on a new line. Sub-entries % follow in separate paragraphs without the sub-entry name. This % style does not use the entry's symbol. % \begin{macrocode} \newglossarystyle{altlist}{% % \end{macrocode} % Base it on the \glostyle{list} style: % \begin{macrocode} \glossarystyle{list}% % \end{macrocode} % Main (level 0) entries start a new item in the list with a % line break after the entry name: % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% \item[\glsentryitem{##1}\glstarget{##1}{##2}]\mbox{}\newline ##3\glspostdescription\space ##5}% % \end{macrocode} % Sub-entries start a new paragraph: % \begin{macrocode} \renewcommand{\glossarysubentryfield}[6]{% \par \glssubentryitem{##2}% \glstarget{##2}{\strut}##4\glspostdescription\space ##6}% } % \end{macrocode} %\end{style} %\begin{style}{altlistgroup} % The \glostyle{altlistgroup} glossary style is like the % \glostyle{altlist} style, but the glossary groups have headings. %\changes{1.08}{2007 Oct 13}{changed altlistgroup style to use \cs{glsgetgrouptitle}} % \begin{macrocode} \newglossarystyle{altlistgroup}{% % \end{macrocode} % Base it on the \glostyle{altlist} style: % \begin{macrocode} \glossarystyle{altlist}% % \end{macrocode} % Each group has a heading: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{\item[\glsgetgrouptitle{##1}]}} % \end{macrocode} %\end{style} % %\begin{style}{altlisthypergroup} % The \glostyle{altlisthypergroup} glossary style is like the % \glostyle{altlistgroup} style, but has a % set of links to the groups at the start of the glossary. % \begin{macrocode} \newglossarystyle{altlisthypergroup}{% % \end{macrocode} % Base it on the \glostyle{altlist} style: % \begin{macrocode} \glossarystyle{altlist}% % \end{macrocode} % Add navigation links at the start of the environment: % \begin{macrocode} \renewcommand*{\glossaryheader}{% \item[\glsnavigation]}% % \end{macrocode} % Each group has a heading with a hypertarget: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{% \item[\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}]}} % \end{macrocode} %\end{style} % %\begin{style}{listdotted} % The \glostyle{listdotted} glossary style was supplied by % Axel~Menzel. I've modified it slightly so that the distance from % the start of the name to the end of the dotted line is specified % by \cs{glslistdottedwidth}. % Note that this style ignores the page numbers as well as the % symbol. Sub-entries are displayed in the same way as top-level % entries. % \begin{macrocode} \newglossarystyle{listdotted}{% % \end{macrocode} % Base it on the \glostyle{list} style: % \begin{macrocode} \glossarystyle{list}% % \end{macrocode} % Each main (level 0) entry starts a new item: % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% \item[]\makebox[\glslistdottedwidth][l]{% \glsentryitem{##1}\glstarget{##1}{##2}% \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}##3}% % \end{macrocode} % Sub entries have the same format as main entries: % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% \item[]\makebox[\glslistdottedwidth][l]{% \glssubentryitem{##2}% \glstarget{##2}{##3}% \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}##4}% } % \end{macrocode} %\end{style} %\begin{macro}{\glslistdottedwidth} %\changes{2.01}{2009 May 30}{changed \cs{linewidth} to \cs{hsize}} % \begin{macrocode} \newlength\glslistdottedwidth \setlength{\glslistdottedwidth}{.5\hsize} % \end{macrocode} %\end{macro} % %\begin{style}{sublistdotted} % This style is similar to the glostyle{listdotted} style, except % that the main entries just have the name displayed. % \begin{macrocode} \newglossarystyle{sublistdotted}{% % \end{macrocode} % Base it on the \glostyle{listdotted} style: % \begin{macrocode} \glossarystyle{listdotted}% % \end{macrocode} % Main (level 0) entries just display the name: % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% \item[\glsentryitem{##1}\glstarget{##1}{##2}]}% } % \end{macrocode} %\end{style} %\iffalse % \begin{macrocode} % % \end{macrocode} %\fi %\iffalse % \begin{macrocode} %<*glossary-long.sty> % \end{macrocode} %\fi % \subsection{Glossary Styles using longtable (the glossary-long % package)} % The glossary styles defined in the \isty{glossary-long} package % used the \env{longtable} environment in the glossary. % \begin{macrocode} \ProvidesPackage{glossary-long}[2011/03/28 v3.0 (NLCT)] % \end{macrocode} % Requires the \isty{longtable} package: % \begin{macrocode} \RequirePackage{longtable} % \end{macrocode} %\begin{macro}{\glsdescwidth} % This is a length that governs the width of the description column. % (There's a chance that the user may specify \pkgopt{nolong} % and then load \isty{glossary-long} later, in which case % \cs{glsdescwidth} may have already been defined by % \isty{glossary-super}. The same goes for \cs{glspagelistwidth}.) %\changes{2.01}{2009 May 30}{changed \cs{linewidth} to \cs{hsize}} % \begin{macrocode} \@ifundefined{glsdescwidth}{% \newlength\glsdescwidth \setlength{\glsdescwidth}{0.6\hsize} }{} % \end{macrocode} %\end{macro} % %\begin{macro}{\glspagelistwidth} % This is a length that governs the width of the page list column. %\changes{2.01}{2009 May 30}{changed \cs{linewidth} to \cs{hsize}} % \begin{macrocode} \@ifundefined{glspagelistwidth}{% \newlength\glspagelistwidth \setlength{\glspagelistwidth}{0.1\hsize} }{} % \end{macrocode} %\end{macro} % %\begin{style}{long} % The \glostyle{long} glossary style command which % uses the \env{longtable} environment: % \begin{macrocode} \newglossarystyle{long}{% % \end{macrocode} % Use \env{longtable} with two columns: % \begin{macrocode} \renewenvironment{theglossary}% {\begin{longtable}{lp{\glsdescwidth}}}% {\end{longtable}}% % \end{macrocode} % Do nothing at the start of the environment: % \begin{macrocode} \renewcommand*{\glossaryheader}{}% % \end{macrocode} % No heading between groups: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} % Main (level 0) entries displayed in a row: % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}% % \end{macrocode} % Sub entries displayed on the following row without the name: % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% & \glssubentryitem{##2}% \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} \renewcommand*{\glsgroupskip}{ & \\}% } % \end{macrocode} %\end{style} % %\begin{style}{longborder} % The \glostyle{longborder} style is like the above, but with horizontal and % vertical lines: % \begin{macrocode} \newglossarystyle{longborder}{% % \end{macrocode} % Base it on the glostyle{long} style: % \begin{macrocode} \glossarystyle{long}% % \end{macrocode} % Use \env{longtable} with two columns with vertical lines % between each column: % \begin{macrocode} \renewenvironment{theglossary}{% \begin{longtable}{|l|p{\glsdescwidth}|}}{\end{longtable}}% % \end{macrocode} % Place horizontal lines at the head and foot of the table: % \begin{macrocode} \renewcommand*{\glossaryheader}{\hline\endhead\hline\endfoot}% } % \end{macrocode} %\end{style} % %\begin{style}{longheader} % The \glostyle{longheader} style is like the % \glostyle{long} style but with a header: % \begin{macrocode} \newglossarystyle{longheader}{% % \end{macrocode} % Base it on the glostyle{long} style: % \begin{macrocode} \glossarystyle{long}% % \end{macrocode} % Set the table's header: % \begin{macrocode} \renewcommand*{\glossaryheader}{% \bfseries \entryname & \bfseries \descriptionname\\\endhead}% } % \end{macrocode} %\end{style} % %\begin{style}{longheaderborder} % The \glostyle{longheaderborder} style is % like the \glostyle{long} style but with a header and border: % \begin{macrocode} \newglossarystyle{longheaderborder}{% % \end{macrocode} % Base it on the glostyle{longborder} style: % \begin{macrocode} \glossarystyle{longborder}% % \end{macrocode} % Set the table's header and add horizontal line to table's foot: % \begin{macrocode} \renewcommand*{\glossaryheader}{% \hline\bfseries \entryname & \bfseries \descriptionname\\\hline \endhead \hline\endfoot}% } % \end{macrocode} %\end{style} % %\begin{style}{long3col} % The \glostyle{long3col} style is like \glostyle{long} but with 3 columns % \begin{macrocode} \newglossarystyle{long3col}{% % \end{macrocode} % Use a \env{longtable} with 3 columns: % \begin{macrocode} \renewenvironment{theglossary}% {\begin{longtable}{lp{\glsdescwidth}p{\glspagelistwidth}}}% {\end{longtable}}% % \end{macrocode} % No table header: % \begin{macrocode} \renewcommand*{\glossaryheader}{}% % \end{macrocode} % No headings between groups: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} % Main (level 0) entries on a row (name in first column, % description in second column, page list in last column): % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\\}% % \end{macrocode} % Sub-entries on a separate row (no name, description in % second column, page list in third column): % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% & \glssubentryitem{##2}% \glstarget{##2}{\strut}##4 & ##6\\}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} \renewcommand*{\glsgroupskip}{ & &\\}% } % \end{macrocode} %\end{style} % %\begin{style}{long3colborder} % The \glostyle{long3colborder} style is like the % \glostyle{long3col} style but with a border: % \begin{macrocode} \newglossarystyle{long3colborder}{% % \end{macrocode} % Base it on the glostyle{long3col} style: % \begin{macrocode} \glossarystyle{long3col}% % \end{macrocode} % Use a \env{longtable} with 3 columns with vertical lines % around them: % \begin{macrocode} \renewenvironment{theglossary}% {\begin{longtable}{|l|p{\glsdescwidth}|p{\glspagelistwidth}|}}% {\end{longtable}}% % \end{macrocode} % Place horizontal lines at the head and foot of the table: % \begin{macrocode} \renewcommand*{\glossaryheader}{\hline\endhead\hline\endfoot}% } % \end{macrocode} %\end{style} % %\begin{style}{long3colheader} % The \glostyle{long3colheader} style is like \glostyle{long3col} but with a header row: % \begin{macrocode} \newglossarystyle{long3colheader}{% % \end{macrocode} % Base it on the glostyle{long3col} style: % \begin{macrocode} \glossarystyle{long3col}% % \end{macrocode} % Set the table's header: % \begin{macrocode} \renewcommand*{\glossaryheader}{% \bfseries\entryname&\bfseries\descriptionname& \bfseries\pagelistname\\\endhead}% } % \end{macrocode} %\end{style} % %\begin{style}{long3colheaderborder} % The \glostyle{long3colheaderborder} style is like the above but with a border % \begin{macrocode} \newglossarystyle{long3colheaderborder}{% % \end{macrocode} % Base it on the glostyle{long3colborder} style: % \begin{macrocode} \glossarystyle{long3colborder}% % \end{macrocode} % Set the table's header and add horizontal line at table's foot: % \begin{macrocode} \renewcommand*{\glossaryheader}{% \hline \bfseries\entryname&\bfseries\descriptionname& \bfseries\pagelistname\\\hline\endhead \hline\endfoot}% } % \end{macrocode} %\end{style} % %\begin{style}{long4col} % The \glostyle{long4col} style has four columns where the third % column contains the value of the associated \gloskey{symbol} key. % \begin{macrocode} \newglossarystyle{long4col}{% % \end{macrocode} % Use a \env{longtable} with 4 columns: % \begin{macrocode} \renewenvironment{theglossary}% {\begin{longtable}{llll}}% {\end{longtable}}% % \end{macrocode} % No table header: % \begin{macrocode} \renewcommand*{\glossaryheader}{}% % \end{macrocode} % No group headings: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} % Main (level 0) entries on a single row (name in first column, % description in second column, symbol in third column, page list % in last column): % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\\}% % \end{macrocode} % Sub entries on a single row with no name (description in second % column, symbol in third column, page list in last column): % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% & \glssubentryitem{##2}% \glstarget{##2}{\strut}##4 & ##5 & ##6\\}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} \renewcommand*{\glsgroupskip}{ & & &\\}% } % \end{macrocode} %\end{style} % %\begin{style}{long4colheader} % The \glostyle{long4colheader} style is like \glostyle{long4col} % but with a header row. % \begin{macrocode} \newglossarystyle{long4colheader}{% % \end{macrocode} % Base it on the glostyle{long4col} style: % \begin{macrocode} \glossarystyle{long4col}% % \end{macrocode} % Table has a header: % \begin{macrocode} \renewcommand*{\glossaryheader}{% \bfseries\entryname&\bfseries\descriptionname& \bfseries \symbolname& \bfseries\pagelistname\\\endhead}% } % \end{macrocode} %\end{style} % %\begin{style}{long4colborder} % The \glostyle{long4colborder} style is like \glostyle{long4col} % but with a border. % \begin{macrocode} \newglossarystyle{long4colborder}{% % \end{macrocode} % Base it on the glostyle{long4col} style: % \begin{macrocode} \glossarystyle{long4col}% % \end{macrocode} % Use a \env{longtable} with 4 columns surrounded by vertical % lines: % \begin{macrocode} \renewenvironment{theglossary}% {\begin{longtable}{|l|l|l|l|}}% {\end{longtable}}% % \end{macrocode} % Add horizontal lines to the head and foot of the table: % \begin{macrocode} \renewcommand*{\glossaryheader}{\hline\endhead\hline\endfoot}% } % \end{macrocode} %\end{style} % %\begin{style}{long4colheaderborder} % The \glostyle{long4colheaderborder} style is like the above but % with a border. % \begin{macrocode} \newglossarystyle{long4colheaderborder}{% % \end{macrocode} % Base it on the glostyle{long4col} style: % \begin{macrocode} \glossarystyle{long4col}% % \end{macrocode} % Use a \env{longtable} with 4 columns surrounded by vertical % lines: % \begin{macrocode} \renewenvironment{theglossary}% {\begin{longtable}{|l|l|l|l|}}% {\end{longtable}}% % \end{macrocode} % Add table header and horizontal line at the table's foot: % \begin{macrocode} \renewcommand*{\glossaryheader}{% \hline\bfseries\entryname&\bfseries\descriptionname& \bfseries \symbolname& \bfseries\pagelistname\\\hline\endhead\hline\endfoot}% } % \end{macrocode} %\end{style} % %\begin{style}{altlong4col} % The \glostyle{altlong4col} style is like the \glostyle{long4col} % style but can have multiline descriptions and page lists. % \begin{macrocode} \newglossarystyle{altlong4col}{% % \end{macrocode} % Base it on the glostyle{long4col} style: % \begin{macrocode} \glossarystyle{long4col}% % \end{macrocode} % Use a \env{longtable} with 4 columns where the second and % last columns may have multiple lines in each row: % \begin{macrocode} \renewenvironment{theglossary}% {\begin{longtable}{lp{\glsdescwidth}lp{\glspagelistwidth}}}% {\end{longtable}}% } % \end{macrocode} %\end{style} % %\begin{style}{altlong4colheader} % The \glostyle{altlong4colheader} style is like % \glostyle{altlong4col} but with a header row. % \begin{macrocode} \newglossarystyle{altlong4colheader}{% % \end{macrocode} % Base it on the glostyle{long4colheader} style: % \begin{macrocode} \glossarystyle{long4colheader}% % \end{macrocode} % Use a \env{longtable} with 4 columns where the second and % last columns may have multiple lines in each row: % \begin{macrocode} \renewenvironment{theglossary}% {\begin{longtable}{lp{\glsdescwidth}lp{\glspagelistwidth}}}% {\end{longtable}}% } % \end{macrocode} %\end{style} % %\begin{style}{altlong4colborder} % The \glostyle{altlong4colborder} style is like % \glostyle{altlong4col} but with a border. % \begin{macrocode} \newglossarystyle{altlong4colborder}{% % \end{macrocode} % Base it on the glostyle{long4colborder} style: % \begin{macrocode} \glossarystyle{long4colborder}% % \end{macrocode} % Use a \env{longtable} with 4 columns where the second and % last columns may have multiple lines in each row: % \begin{macrocode} \renewenvironment{theglossary}% {\begin{longtable}{|l|p{\glsdescwidth}|l|p{\glspagelistwidth}|}}% {\end{longtable}}% } % \end{macrocode} %\end{style} % %\begin{style}{altlong4colheaderborder} % The \glostyle{altlong4colheaderborder} style is like the above but % with a header as well as a border. % \begin{macrocode} \newglossarystyle{altlong4colheaderborder}{% % \end{macrocode} % Base it on the glostyle{long4colheaderborder} style: % \begin{macrocode} \glossarystyle{long4colheaderborder}% % \end{macrocode} % Use a \env{longtable} with 4 columns where the second and % last columns may have multiple lines in each row: % \begin{macrocode} \renewenvironment{theglossary}% {\begin{longtable}{|l|p{\glsdescwidth}|l|p{\glspagelistwidth}|}}% {\end{longtable}}% } % \end{macrocode} %\end{style} %\iffalse % \begin{macrocode} % % \end{macrocode} %\fi %\iffalse % \begin{macrocode} %<*glossary-longragged.sty> % \end{macrocode} %\fi % \subsection{Glossary Styles using longtable (the glossary-longragged % package)} % The glossary styles defined in the \isty{glossary-longragged} package % used the \env{longtable} environment in the glossary and use % ragged right formatting for the multiline columns. % \begin{macrocode} \ProvidesPackage{glossary-longragged}[2011/03/28 v3.0 (NLCT)] % \end{macrocode} % Requires the \isty{array} package: % \begin{macrocode} \RequirePackage{array} % \end{macrocode} % Requires the \isty{longtable} package: % \begin{macrocode} \RequirePackage{longtable} % \end{macrocode} %\begin{macro}{\glsdescwidth} % This is a length that governs the width of the description column. % This may have already been defined. % \begin{macrocode} \@ifundefined{glsdescwidth}{% \newlength\glsdescwidth \setlength{\glsdescwidth}{0.6\hsize} }{} % \end{macrocode} %\end{macro} % %\begin{macro}{\glspagelistwidth} % This is a length that governs the width of the page list column. % This may already have been defined. % \begin{macrocode} \@ifundefined{glspagelistwidth}{% \newlength\glspagelistwidth \setlength{\glspagelistwidth}{0.1\hsize} }{} % \end{macrocode} %\end{macro} % %\begin{style}{longragged} % The \glostyle{longragged} glossary style is like the % \glostyle{long} but uses ragged right formatting for the % description column. % \begin{macrocode} \newglossarystyle{longragged}{% % \end{macrocode} % Use \env{longtable} with two columns: % \begin{macrocode} \renewenvironment{theglossary}% {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}}}% {\end{longtable}}% % \end{macrocode} % Do nothing at the start of the environment: % \begin{macrocode} \renewcommand*{\glossaryheader}{}% % \end{macrocode} % No heading between groups: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} % Main (level 0) entries displayed in a row: % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5% \tabularnewline}% % \end{macrocode} % Sub entries displayed on the following row without the name: % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% & \glssubentryitem{##2}% \glstarget{##2}{\strut}##4\glspostdescription\space ##6% \tabularnewline}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} \renewcommand*{\glsgroupskip}{ & \tabularnewline}% } % \end{macrocode} %\end{style} % %\begin{style}{longraggedborder} % The \glostyle{longraggedborder} style is like the above, but with horizontal and % vertical lines: % \begin{macrocode} \newglossarystyle{longraggedborder}{% % \end{macrocode} % Base it on the glostyle{longragged} style: % \begin{macrocode} \glossarystyle{longragged}% % \end{macrocode} % Use \env{longtable} with two columns with vertical lines % between each column: % \begin{macrocode} \renewenvironment{theglossary}{% \begin{longtable}{|l|>{\raggedright}p{\glsdescwidth}|}}% {\end{longtable}}% % \end{macrocode} % Place horizontal lines at the head and foot of the table: % \begin{macrocode} \renewcommand*{\glossaryheader}{\hline\endhead\hline\endfoot}% } % \end{macrocode} %\end{style} % %\begin{style}{longraggedheader} % The \glostyle{longraggedheader} style is like the % \glostyle{longragged} style but with a header: % \begin{macrocode} \newglossarystyle{longraggedheader}{% % \end{macrocode} % Base it on the glostyle{longragged} style: % \begin{macrocode} \glossarystyle{longragged}% % \end{macrocode} % Set the table's header: % \begin{macrocode} \renewcommand*{\glossaryheader}{% \bfseries \entryname & \bfseries \descriptionname \tabularnewline\endhead}% } % \end{macrocode} %\end{style} % %\begin{style}{longraggedheaderborder} % The \glostyle{longraggedheaderborder} style is % like the \glostyle{longragged} style but with a header and border: % \begin{macrocode} \newglossarystyle{longraggedheaderborder}{% % \end{macrocode} % Base it on the glostyle{longraggedborder} style: % \begin{macrocode} \glossarystyle{longraggedborder}% % \end{macrocode} % Set the table's header and add horizontal line to table's foot: % \begin{macrocode} \renewcommand*{\glossaryheader}{% \hline\bfseries \entryname & \bfseries \descriptionname \tabularnewline\hline \endhead \hline\endfoot}% } % \end{macrocode} %\end{style} % %\begin{style}{longragged3col} % The \glostyle{longragged3col} style is like \glostyle{longragged} but with 3 columns % \begin{macrocode} \newglossarystyle{longragged3col}{% % \end{macrocode} % Use a \env{longtable} with 3 columns: % \begin{macrocode} \renewenvironment{theglossary}% {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}% >{\raggedright}p{\glspagelistwidth}}}% {\end{longtable}}% % \end{macrocode} % No table header: % \begin{macrocode} \renewcommand*{\glossaryheader}{}% % \end{macrocode} % No headings between groups: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} % Main (level 0) entries on a row (name in first column, % description in second column, page list in last column): % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\tabularnewline}% % \end{macrocode} % Sub-entries on a separate row (no name, description in % second column, page list in third column): % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% & \glssubentryitem{##2}% \glstarget{##2}{\strut}##4 & ##6\tabularnewline}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} \renewcommand*{\glsgroupskip}{ & &\tabularnewline}% } % \end{macrocode} %\end{style} % %\begin{style}{longragged3colborder} % The \glostyle{longragged3colborder} style is like the % \glostyle{longragged3col} style but with a border: % \begin{macrocode} \newglossarystyle{longragged3colborder}{% % \end{macrocode} % Base it on the glostyle{longragged3col} style: % \begin{macrocode} \glossarystyle{longragged3col}% % \end{macrocode} % Use a \env{longtable} with 3 columns with vertical lines % around them: % \begin{macrocode} \renewenvironment{theglossary}% {\begin{longtable}{|l|>{\raggedright}p{\glsdescwidth}|% >{\raggedright}p{\glspagelistwidth}|}}% {\end{longtable}}% % \end{macrocode} % Place horizontal lines at the head and foot of the table: % \begin{macrocode} \renewcommand*{\glossaryheader}{\hline\endhead\hline\endfoot}% } % \end{macrocode} %\end{style} % %\begin{style}{longragged3colheader} % The \glostyle{longragged3colheader} style is like \glostyle{longragged3col} but with a header row: % \begin{macrocode} \newglossarystyle{longragged3colheader}{% % \end{macrocode} % Base it on the glostyle{longragged3col} style: % \begin{macrocode} \glossarystyle{longragged3col}% % \end{macrocode} % Set the table's header: % \begin{macrocode} \renewcommand*{\glossaryheader}{% \bfseries\entryname&\bfseries\descriptionname& \bfseries\pagelistname\tabularnewline\endhead}% } % \end{macrocode} %\end{style} % %\begin{style}{longragged3colheaderborder} % The \glostyle{longragged3colheaderborder} style is like the above but with a border % \begin{macrocode} \newglossarystyle{longragged3colheaderborder}{% % \end{macrocode} % Base it on the glostyle{longragged3colborder} style: % \begin{macrocode} \glossarystyle{longragged3colborder}% % \end{macrocode} % Set the table's header and add horizontal line at table's foot: % \begin{macrocode} \renewcommand*{\glossaryheader}{% \hline \bfseries\entryname&\bfseries\descriptionname& \bfseries\pagelistname\tabularnewline\hline\endhead \hline\endfoot}% } % \end{macrocode} %\end{style} % %\begin{style}{altlongragged4col} % The \glostyle{altlongragged4col} style is like the \glostyle{altlong4col} % style defined in the \isty{glossary-long} package, except that % ragged right formatting is used for the description and page list % columns. % \begin{macrocode} \newglossarystyle{altlongragged4col}{% % \end{macrocode} % Use a \env{longtable} with 4 columns where the second and % last columns may have multiple lines in each row: % \begin{macrocode} \renewenvironment{theglossary}% {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}l% >{\raggedright}p{\glspagelistwidth}}}% {\end{longtable}}% % \end{macrocode} % No table header: % \begin{macrocode} \renewcommand*{\glossaryheader}{}% % \end{macrocode} % No group headings: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} % Main (level 0) entries on a single row (name in first column, % description in second column, symbol in third column, page list % in last column): % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\tabularnewline}% % \end{macrocode} % Sub entries on a single row with no name (description in second % column, symbol in third column, page list in last column): % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% & \glssubentryitem{##2}% \glstarget{##2}{\strut}##4 & ##5 & ##6\tabularnewline}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} \renewcommand*{\glsgroupskip}{ & & &\tabularnewline}% } % \end{macrocode} %\end{style} % %\begin{style}{altlongragged4colheader} % The \glostyle{altlongragged4colheader} style is like % \glostyle{altlongragged4col} but with a header row. % \begin{macrocode} \newglossarystyle{altlongragged4colheader}{% % \end{macrocode} % Base it on the glostyle{altlongragged4col} style: % \begin{macrocode} \glossarystyle{altlongragged4col}% % \end{macrocode} % Use a \env{longtable} with 4 columns where the second and % last columns may have multiple lines in each row: % \begin{macrocode} \renewenvironment{theglossary}% {\begin{longtable}{l>{\raggedright}p{\glsdescwidth}l% >{\raggedright}p{\glspagelistwidth}}}% {\end{longtable}}% % \end{macrocode} % Table has a header: % \begin{macrocode} \renewcommand*{\glossaryheader}{% \bfseries\entryname&\bfseries\descriptionname& \bfseries \symbolname& \bfseries\pagelistname\tabularnewline\endhead}% } % \end{macrocode} %\end{style} % %\begin{style}{altlongragged4colborder} % The \glostyle{altlongragged4colborder} style is like % \glostyle{altlongragged4col} but with a border. % \begin{macrocode} \newglossarystyle{altlongragged4colborder}{% % \end{macrocode} % Base it on the glostyle{altlongragged4col} style: % \begin{macrocode} \glossarystyle{altlongragged4col}% % \end{macrocode} % Use a \env{longtable} with 4 columns where the second and % last columns may have multiple lines in each row: % \begin{macrocode} \renewenvironment{theglossary}% {\begin{longtable}{|l|>{\raggedright}p{\glsdescwidth}|l|% >{\raggedright}p{\glspagelistwidth}|}}% {\end{longtable}}% % \end{macrocode} % Add horizontal lines to the head and foot of the table: % \begin{macrocode} \renewcommand*{\glossaryheader}{\hline\endhead\hline\endfoot}% } % \end{macrocode} %\end{style} % %\begin{style}{altlongragged4colheaderborder} % The \glostyle{altlongragged4colheaderborder} style is like the above but % with a header as well as a border. % \begin{macrocode} \newglossarystyle{altlongragged4colheaderborder}{% % \end{macrocode} % Base it on the glostyle{altlongragged4col} style: % \begin{macrocode} \glossarystyle{altlongragged4col}% % \end{macrocode} % Use a \env{longtable} with 4 columns where the second and % last columns may have multiple lines in each row: % \begin{macrocode} \renewenvironment{theglossary}% {\begin{longtable}{|l|>{\raggedright}p{\glsdescwidth}|l|% >{\raggedright}p{\glspagelistwidth}|}}% {\end{longtable}}% % \end{macrocode} % Add table header and horizontal line at the table's foot: % \begin{macrocode} \renewcommand*{\glossaryheader}{% \hline\bfseries\entryname&\bfseries\descriptionname& \bfseries \symbolname& \bfseries\pagelistname\tabularnewline\hline\endhead \hline\endfoot}% } % \end{macrocode} %\end{style} %\iffalse % \begin{macrocode} % % \end{macrocode} %\fi %\iffalse % \begin{macrocode} %<*glossary-super.sty> % \end{macrocode} %\fi % \subsection{Glossary Styles using supertabular environment (glossary-super package)} % The glossary styles defined in the \isty{glossary-super} package % use the \env{supertabular} environment. % \begin{macrocode} \ProvidesPackage{glossary-super}[2011/03/28 v3.0 (NLCT)] % \end{macrocode} % Requires the \isty{supertabular} package: % \begin{macrocode} \RequirePackage{supertabular} % \end{macrocode} %\begin{macro}{\glsdescwidth} % This is a length that governs the width of the description column. % This may already have been defined if \isty{glossary-long} % has been loaded.\changes{2.01}{2009 May 30}{changed \cs{linewidth} % to \cs{hsize}} % \begin{macrocode} \@ifundefined{glsdescwidth}{% \newlength\glsdescwidth \setlength{\glsdescwidth}{0.6\hsize} }{} % \end{macrocode} %\end{macro} % %\begin{macro}{\glspagelistwidth} % This is a length that governs the width of the page list column. % This may already have been defined if \isty{glossary-long} % has been loaded.\changes{2.01}{2009 May 30}{changed \cs{linewidth} % to \cs{hsize}} % \begin{macrocode} \@ifundefined{glspagelistwidth}{% \newlength\glspagelistwidth \setlength{\glspagelistwidth}{0.1\hsize} }{} % \end{macrocode} %\end{macro} % %\begin{style}{super} % The \glostyle{super} glossary style uses the % \env{supertabular} environment % (it uses lengths defined in the \isty{glossary-long} package.) % \begin{macrocode} \newglossarystyle{super}{% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % two columns and no head or tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{}\tabletail{}% \begin{supertabular}{lp{\glsdescwidth}}}% {\end{supertabular}}% % \end{macrocode} % Do nothing at the start of the table: % \begin{macrocode} \renewcommand*{\glossaryheader}{}% % \end{macrocode} % No group headings: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} % Main (level 0) entries put in a row (name in first column, % description and page list in second column): % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}% % \end{macrocode} % Sub entries put in a row (no name, description and page list % in second column): % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% & \glssubentryitem{##2}% \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} \renewcommand*{\glsgroupskip}{ & \\}% } % \end{macrocode} %\end{style} % %\begin{style}{superborder} % The \glostyle{superborder} style is like the above, but with % horizontal and vertical lines: % \begin{macrocode} \newglossarystyle{superborder}{% % \end{macrocode} % Base it on the glostyle{super} style: % \begin{macrocode} \glossarystyle{super}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % two columns and a horizontal line in the head and tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\hline}\tabletail{\hline}% \begin{supertabular}{|l|p{\glsdescwidth}|}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{superheader} % The \glostyle{superheader} style is like the % \glostyle{super} style, but with a header: % \begin{macrocode} \newglossarystyle{superheader}{% % \end{macrocode} % Base it on the glostyle{super} style: % \begin{macrocode} \glossarystyle{super}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % two columns, a header and no tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\bfseries \entryname & \bfseries \descriptionname\\}% \tabletail{}% \begin{supertabular}{lp{\glsdescwidth}}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{superheaderborder} % The \glostyle{superheaderborder} style is like % the \glostyle{super} style but with a header and border: % \begin{macrocode} \newglossarystyle{superheaderborder}{% % \end{macrocode} % Base it on the glostyle{super} style: % \begin{macrocode} \glossarystyle{super}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % two columns, a header and horizontal lines above and below the % table: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\hline\bfseries \entryname & \bfseries \descriptionname\\\hline}% \tabletail{\hline} \begin{supertabular}{|l|p{\glsdescwidth}|}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{super3col} % The \glostyle{super3col} style is like the \glostyle{super} % style, but with 3 columns: % \begin{macrocode} \newglossarystyle{super3col}{% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % three columns and no head or tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{}\tabletail{}% \begin{supertabular}{lp{\glsdescwidth}p{\glspagelistwidth}}}% {\end{supertabular}}% % \end{macrocode} % Do nothing at the start of the table: % \begin{macrocode} \renewcommand*{\glossaryheader}{}% % \end{macrocode} % No group headings: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} % Main (level 0) entries on a row (name in first column, % description in second column, page list in last column): % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\\}% % \end{macrocode} % Sub entries on a row (no name, description in second column, % page list in last column): % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% & \glssubentryitem{##2}% \glstarget{##2}{\strut}##4 & ##6\\}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} \renewcommand*{\glsgroupskip}{ & &\\}% } % \end{macrocode} %\end{style} % %\begin{style}{super3colborder} % The \glostyle{super3colborder} style is like the % \glostyle{super3col} style, but with a border: % \begin{macrocode} \newglossarystyle{super3colborder}{% % \end{macrocode} % Base it on the glostyle{super3col} style: % \begin{macrocode} \glossarystyle{super3col}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % three columns and a horizontal line in the head and tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\hline}\tabletail{\hline}% \begin{supertabular}{|l|p{\glsdescwidth}|p{\glspagelistwidth}|}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{super3colheader} % The \glostyle{super3colheader} style is like % the \glostyle{super3col} style but with a header row: % \begin{macrocode} \newglossarystyle{super3colheader}{% % \end{macrocode} % Base it on the glostyle{super3col} style: % \begin{macrocode} \glossarystyle{super3col}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % three columns, a header and no tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\bfseries\entryname&\bfseries\descriptionname& \bfseries\pagelistname\\}\tabletail{}% \begin{supertabular}{lp{\glsdescwidth}p{\glspagelistwidth}}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{super3colheaderborder} % The \glostyle{super3colheaderborder} style is like % the \glostyle{super3col} style but with a header and border: % \begin{macrocode} \newglossarystyle{super3colheaderborder}{% % \end{macrocode} % Base it on the glostyle{super3colborder} style: % \begin{macrocode} \glossarystyle{super3colborder}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % three columns, a header with horizontal lines and a horizontal % line in the tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\hline \bfseries\entryname&\bfseries\descriptionname& \bfseries\pagelistname\\\hline}% \tabletail{\hline}% \begin{supertabular}{|l|p{\glsdescwidth}|p{\glspagelistwidth}|}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{super4col} % The \glostyle{super4col} glossary style has four columns, % where the third column contains the value of the % corresponding \gloskey{symbol} key used when that entry % was defined. % \begin{macrocode} \newglossarystyle{super4col}{% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % four columns and no head or tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{}\tabletail{}% \begin{supertabular}{llll}}{% \end{supertabular}}% % \end{macrocode} % Do nothing at the start of the table: % \begin{macrocode} \renewcommand*{\glossaryheader}{}% % \end{macrocode} % No group headings: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} % Main (level 0) entries on a row with the name in the first % column, description in second column, symbol in third column % and page list in last column: % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\\}% % \end{macrocode} % Sub entries on a row with no name, the description in the second % column, symbol in third column and page list in last column: % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% & \glssubentryitem{##2}% \glstarget{##2}{\strut}##4 & ##5 & ##6\\}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} \renewcommand*{\glsgroupskip}{ & & &\\}% } % \end{macrocode} %\end{style} % %\begin{style}{super4colheader} % The \glostyle{super4colheader} style is like % the \glostyle{super4col} but with a header row. % \begin{macrocode} \newglossarystyle{super4colheader}{% % \end{macrocode} % Base it on the glostyle{super4col} style: % \begin{macrocode} \glossarystyle{super4col}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % four columns, a header and no tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\bfseries\entryname&\bfseries\descriptionname& \bfseries\symbolname & \bfseries\pagelistname\\}% \tabletail{}% \begin{supertabular}{llll}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{super4colborder} % The \glostyle{super4colborder} style is like % the \glostyle{super4col} but with a border. % \begin{macrocode} \newglossarystyle{super4colborder}{% % \end{macrocode} % Base it on the glostyle{super4col} style: % \begin{macrocode} \glossarystyle{super4col}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % four columns and a horizontal line in the head and tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\hline}\tabletail{\hline}% \begin{supertabular}{|l|l|l|l|}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{super4colheaderborder} % The \glostyle{super4colheaderborder} style is like % the \glostyle{super4col} but with a header and border. % \begin{macrocode} \newglossarystyle{super4colheaderborder}{% % \end{macrocode} % Base it on the glostyle{super4col} style: % \begin{macrocode} \glossarystyle{super4col}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % four columns and a header bordered by horizontal lines and % a horizontal line in the tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\hline\bfseries\entryname&\bfseries\descriptionname& \bfseries\symbolname & \bfseries\pagelistname\\\hline}\tabletail{\hline}% \begin{supertabular}{|l|l|l|l|}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{altsuper4col} % The \glostyle{altsuper4col} glossary style is like % \glostyle{super4col} but has provision for multiline descriptions. % \begin{macrocode} \newglossarystyle{altsuper4col}{% % \end{macrocode} % Base it on the glostyle{super4col} style: % \begin{macrocode} \glossarystyle{super4col}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % four columns and no head or tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{}\tabletail{}% \begin{supertabular}{lp{\glsdescwidth}lp{\glspagelistwidth}}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{altsuper4colheader} % The \glostyle{altsuper4colheader} style is like % the \glostyle{altsuper4col} but with a header row. % \begin{macrocode} \newglossarystyle{altsuper4colheader}{% % \end{macrocode} % Base it on the glostyle{super4colheader} style: % \begin{macrocode} \glossarystyle{super4colheader}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % four columns, a header and no tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\bfseries\entryname&\bfseries\descriptionname& \bfseries\symbolname & \bfseries\pagelistname\\}\tabletail{}% \begin{supertabular}{lp{\glsdescwidth}lp{\glspagelistwidth}}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{altsuper4colborder} % The \glostyle{altsuper4colborder} style is like % the \glostyle{altsuper4col} but with a border. % \begin{macrocode} \newglossarystyle{altsuper4colborder}{% % \end{macrocode} % Base it on the glostyle{super4colborder} style: % \begin{macrocode} \glossarystyle{super4colborder}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % four columns and a horizontal line in the head and tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\hline}\tabletail{\hline}% \begin{supertabular}% {|l|p{\glsdescwidth}|l|p{\glspagelistwidth}|}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{altsuper4colheaderborder} % The \glostyle{altsuper4colheaderborder} style is like % the \glostyle{altsuper4col} but with a header and border. % \begin{macrocode} \newglossarystyle{altsuper4colheaderborder}{% % \end{macrocode} % Base it on the glostyle{super4colheaderborder} style: % \begin{macrocode} \glossarystyle{super4colheaderborder}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % four columns and a header bordered by horizontal lines and % a horizontal line in the tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\hline \bfseries\entryname & \bfseries\descriptionname & \bfseries\symbolname & \bfseries\pagelistname\\\hline}% \tabletail{\hline}% \begin{supertabular}% {|l|p{\glsdescwidth}|l|p{\glspagelistwidth}|}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} %\iffalse % \begin{macrocode} % % \end{macrocode} %\fi %\iffalse % \begin{macrocode} %<*glossary-superragged.sty> % \end{macrocode} %\fi % \subsection{Glossary Styles using supertabular environment (glossary-superragged package)} % The glossary styles defined in the \isty{glossary-superragged} % package use the \env{supertabular} environment. These styles % are like those provided by the \isty{glossary-super} package, % except that the multiline columns have ragged right justification. % \begin{macrocode} \ProvidesPackage{glossary-superragged}[2011/03/28 v3.0 (NLCT)] % \end{macrocode} % Requires the \isty{array} package: % \begin{macrocode} \RequirePackage{array} % \end{macrocode} % Requires the \isty{supertabular} package: % \begin{macrocode} \RequirePackage{supertabular} % \end{macrocode} %\begin{macro}{\glsdescwidth} % This is a length that governs the width of the description column. % This may already have been defined. % \begin{macrocode} \@ifundefined{glsdescwidth}{% \newlength\glsdescwidth \setlength{\glsdescwidth}{0.6\hsize} }{} % \end{macrocode} %\end{macro} % %\begin{macro}{\glspagelistwidth} % This is a length that governs the width of the page list column. % This may already have been defined. % \begin{macrocode} \@ifundefined{glspagelistwidth}{% \newlength\glspagelistwidth \setlength{\glspagelistwidth}{0.1\hsize} }{} % \end{macrocode} %\end{macro} % %\begin{style}{superragged} % The \glostyle{superragged} glossary style uses the % \env{supertabular} environment. % \begin{macrocode} \newglossarystyle{superragged}{% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % two columns and no head or tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{}\tabletail{}% \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}}}% {\end{supertabular}}% % \end{macrocode} % Do nothing at the start of the table: % \begin{macrocode} \renewcommand*{\glossaryheader}{}% % \end{macrocode} % No group headings: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} % Main (level 0) entries put in a row (name in first column, % description and page list in second column): % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5% \tabularnewline}% % \end{macrocode} % Sub entries put in a row (no name, description and page list % in second column): % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% & \glssubentryitem{##2}% \glstarget{##2}{\strut}##4\glspostdescription\space ##6% \tabularnewline}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} \renewcommand*{\glsgroupskip}{ & \tabularnewline}% } % \end{macrocode} %\end{style} % %\begin{style}{superraggedborder} % The \glostyle{superraggedborder} style is like the above, but with % horizontal and vertical lines: % \begin{macrocode} \newglossarystyle{superraggedborder}{% % \end{macrocode} % Base it on the glostyle{superragged} style: % \begin{macrocode} \glossarystyle{superragged}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % two columns and a horizontal line in the head and tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\hline}\tabletail{\hline}% \begin{supertabular}{|l|>{\raggedright}p{\glsdescwidth}|}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{superraggedheader} % The \glostyle{superraggedheader} style is like the % \glostyle{super} style, but with a header: % \begin{macrocode} \newglossarystyle{superraggedheader}{% % \end{macrocode} % Base it on the glostyle{superragged} style: % \begin{macrocode} \glossarystyle{superragged}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % two columns, a header and no tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\bfseries \entryname & \bfseries \descriptionname \tabularnewline}% \tabletail{}% \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{superraggedheaderborder} % The \glostyle{superraggedheaderborder} style is like % the \glostyle{superragged} style but with a header and border: % \begin{macrocode} \newglossarystyle{superraggedheaderborder}{% % \end{macrocode} % Base it on the glostyle{super} style: % \begin{macrocode} \glossarystyle{superragged}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % two columns, a header and horizontal lines above and below the % table: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\hline\bfseries \entryname & \bfseries \descriptionname\tabularnewline\hline}% \tabletail{\hline} \begin{supertabular}{|l|>{\raggedright}p{\glsdescwidth}|}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{superragged3col} % The \glostyle{superragged3col} style is like the \glostyle{superragged} % style, but with 3 columns: % \begin{macrocode} \newglossarystyle{superragged3col}{% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % three columns and no head or tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{}\tabletail{}% \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}% >{\raggedright}p{\glspagelistwidth}}}% {\end{supertabular}}% % \end{macrocode} % Do nothing at the start of the table: % \begin{macrocode} \renewcommand*{\glossaryheader}{}% % \end{macrocode} % No group headings: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} % Main (level 0) entries on a row (name in first column, % description in second column, page list in last column): % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##5\tabularnewline}% % \end{macrocode} % Sub entries on a row (no name, description in second column, % page list in last column): % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% & \glssubentryitem{##2}% \glstarget{##2}{\strut}##4 & ##6\tabularnewline}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} \renewcommand*{\glsgroupskip}{ & &\tabularnewline}% } % \end{macrocode} %\end{style} % %\begin{style}{superragged3colborder} % The \glostyle{superragged3colborder} style is like the % \glostyle{superragged3col} style, but with a border: % \begin{macrocode} \newglossarystyle{superragged3colborder}{% % \end{macrocode} % Base it on the glostyle{superragged3col} style: % \begin{macrocode} \glossarystyle{superragged3col}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % three columns and a horizontal line in the head and tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\hline}\tabletail{\hline}% \begin{supertabular}{|l|>{\raggedright}p{\glsdescwidth}|% >{\raggedright}p{\glspagelistwidth}|}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{superragged3colheader} % The \glostyle{superragged3colheader} style is like % the \glostyle{superragged3col} style but with a header row: % \begin{macrocode} \newglossarystyle{superragged3colheader}{% % \end{macrocode} % Base it on the glostyle{superragged3col} style: % \begin{macrocode} \glossarystyle{superragged3col}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % three columns, a header and no tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\bfseries\entryname&\bfseries\descriptionname& \bfseries\pagelistname\tabularnewline}\tabletail{}% \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}% >{\raggedright}p{\glspagelistwidth}}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{superraggedright3colheaderborder} % The \glostyle{superragged3colheaderborder} style is like % the \glostyle{superragged3col} style but with a header and border: % \begin{macrocode} \newglossarystyle{superragged3colheaderborder}{% % \end{macrocode} % Base it on the glostyle{superragged3colborder} style: % \begin{macrocode} \glossarystyle{superragged3colborder}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % three columns, a header with horizontal lines and a horizontal % line in the tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\hline \bfseries\entryname&\bfseries\descriptionname& \bfseries\pagelistname\tabularnewline\hline}% \tabletail{\hline}% \begin{supertabular}{|l|>{\raggedright}p{\glsdescwidth}|% >{\raggedright}p{\glspagelistwidth}|}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{altsuperragged4col} % The \glostyle{altsuperragged4col} glossary style is like % \glostyle{altsuper4col} style in the \isty{glossary-super} % package but uses ragged right formatting in the description % and page list columns. % \begin{macrocode} \newglossarystyle{altsuperragged4col}{% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % four columns and no head or tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{}\tabletail{}% \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}l% >{\raggedright}p{\glspagelistwidth}}}% {\end{supertabular}}% % \end{macrocode} % Do nothing at the start of the table: % \begin{macrocode} \renewcommand*{\glossaryheader}{}% % \end{macrocode} % No group headings: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} % Main (level 0) entries on a row with the name in the first % column, description in second column, symbol in third column % and page list in last column: % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% \glsentryitem{##1}\glstarget{##1}{##2} & ##3 & ##4 & ##5\tabularnewline}% % \end{macrocode} % Sub entries on a row with no name, the description in the second% column, symbol in third column and page list in last column: % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% & \glssubentryitem{##2}% \glstarget{##2}{\strut}##4 & ##5 & ##6\tabularnewline}% % \end{macrocode} % Blank row between groups: % \begin{macrocode} \renewcommand*{\glsgroupskip}{ & & &\tabularnewline}% } % \end{macrocode} %\end{style} % %\begin{style}{altsuperragged4colheader} % The \glostyle{altsuperragged4colheader} style is like % the \glostyle{altsuperragged4col} style but with a header row. % \begin{macrocode} \newglossarystyle{altsuperragged4colheader}{% % \end{macrocode} % Base it on the glostyle{altsuperragged4col} style: % \begin{macrocode} \glossarystyle{altsuperragged4col}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % four columns, a header and no tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\bfseries\entryname&\bfseries\descriptionname& \bfseries\symbolname & \bfseries\pagelistname\tabularnewline}\tabletail{}% \begin{supertabular}{l>{\raggedright}p{\glsdescwidth}l% >{\raggedright}p{\glspagelistwidth}}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{altsuperragged4colborder} % The \glostyle{altsuperragged4colborder} style is like % the \glostyle{altsuperragged4col} style but with a border. % \begin{macrocode} \newglossarystyle{altsuperragged4colborder}{% % \end{macrocode} % Base it on the glostyle{altsuperragged4col} style: % \begin{macrocode} \glossarystyle{altsuper4col}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % four columns and a horizontal line in the head and tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\hline}\tabletail{\hline}% \begin{supertabular}% {|l|>{\raggedright}p{\glsdescwidth}|l|% >{\raggedright}p{\glspagelistwidth}|}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} % %\begin{style}{altsuperragged4colheaderborder} % The \glostyle{altsuperragged4colheaderborder} style is like % the \glostyle{altsuperragged4col} style but with a header and border. % \begin{macrocode} \newglossarystyle{altsuperragged4colheaderborder}{% % \end{macrocode} % Base it on the glostyle{altsuperragged4col} style: % \begin{macrocode} \glossarystyle{altsuperragged4col}% % \end{macrocode} % Put the glossary in a \env{supertabular} environment with % four columns and a header bordered by horizontal lines and % a horizontal line in the tail: % \begin{macrocode} \renewenvironment{theglossary}% {\tablehead{\hline \bfseries\entryname & \bfseries\descriptionname & \bfseries\symbolname & \bfseries\pagelistname\tabularnewline\hline}% \tabletail{\hline}% \begin{supertabular}% {|l|>{\raggedright}p{\glsdescwidth}|l|% >{\raggedright}p{\glspagelistwidth}|}}% {\end{supertabular}}% } % \end{macrocode} %\end{style} %\iffalse % \begin{macrocode} % % \end{macrocode} %\fi %\iffalse % \begin{macrocode} %<*glossary-tree.sty> % \end{macrocode} %\fi %\subsection{Tree Styles (glossary-tree.sty)} % The \isty{glossary-tree} style file defines glossary styles % that have a tree-like structure. These are designed for % hierarchical glossaries. % \begin{macrocode} \ProvidesPackage{glossary-tree}[2011/03/28 v3.0 (NLCT)] % \end{macrocode} % %\begin{style}{index} % The \glostyle{index} glossary style % is similar in style to the way indices are usually typeset % using \cs{item}, \cs{subitem} and \cs{subsubitem}. % The entry name is % set in bold. If an entry has a symbol, it is placed in % brackets after the name. Then the description is displayed, % followed by the number list. This style allows up to three % levels. % \begin{macrocode} \newglossarystyle{index}{% % \end{macrocode} % Set the paragraph indentation and skip and define \ics{item} % to be the same as that used by \env{theindex}: % \begin{macrocode} \renewenvironment{theglossary}% {\setlength{\parindent}{0pt}% \setlength{\parskip}{0pt plus 0.3pt}% \let\item\@idxitem}% {}% % \end{macrocode} % Do nothing at the start of the environment: % \begin{macrocode} \renewcommand*{\glossaryheader}{}% % \end{macrocode} % No group headers: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} % Main (level 0) entry starts a new item with the name in bold % followed by the symbol in brackets (if it exists), the description % and the page list. % \begin{macrocode} \renewcommand*{\glossaryentryfield}[5]{% \item\glsentryitem{##1}\textbf{\glstarget{##1}{##2}}% \ifx\relax##4\relax \else \space(##4)% \fi \space ##3\glspostdescription \space ##5}% % \end{macrocode} % Sub entries: level 1 entries use \ics{subitem}, levels greater % than~1 use \ics{subsubitem}. The level ("##1") shouldn't be 0, % as that's catered by \cs{glossaryentryfield}, but for completeness, % if the level is 0, \ics{item} is used. The name is put in bold, % followed by the symbol in brackets (if it exists), the description % and the page list. % \begin{macrocode} \renewcommand*{\glossarysubentryfield}[6]{% \ifcase##1\relax % level 0 \item \or % level 1 \subitem \glssubentryitem{##2}% \else % all other levels \subsubitem \fi \textbf{\glstarget{##2}{##3}}% \ifx\relax##5\relax \else \space(##5)% \fi \space##4\glspostdescription\space ##6}% % \end{macrocode} % Vertical gap between groups is the same as that used by indices: % \begin{macrocode} \renewcommand*{\glsgroupskip}{\indexspace}} % \end{macrocode} %\end{style} % %\begin{style}{indexgroup} % The \glostyle{indexgroup} style is like the \glostyle{index} % style but has headings. % \begin{macrocode} \newglossarystyle{indexgroup}{% % \end{macrocode} % Base it on the glostyle{index} style: % \begin{macrocode} \glossarystyle{index}% % \end{macrocode} % Add a heading for each group. This puts the group's title in % bold followed by a vertical gap. % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{% \item\textbf{\glsgetgrouptitle{##1}}\indexspace}% } % \end{macrocode} %\end{style} % %\begin{style}{indexhypergroup} % The \glostyle{indexhypergroup} style is like the % \glostyle{indexgroup} style but has hyper navigation. % \begin{macrocode} \newglossarystyle{indexhypergroup}{% % \end{macrocode} % Base it on the glostyle{index} style: % \begin{macrocode} \glossarystyle{index}% % \end{macrocode} % Put navigation links to the groups at the start of the glossary: % \begin{macrocode} \renewcommand*{\glossaryheader}{% \item\textbf{\glsnavigation}\indexspace}% % \end{macrocode} % Add a heading for each group (with a target). The group's title is % in bold followed by a vertical gap. % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{% \item\textbf{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}% \indexspace}% } % \end{macrocode} %\end{style} % %\begin{style}{tree} % The \glostyle{tree} glossary style % is similar in style to the \glostyle{index} style, but % can have arbitrary levels. % \begin{macrocode} \newglossarystyle{tree}{% % \end{macrocode} % Set the paragraph indentation and skip: % \begin{macrocode} \renewenvironment{theglossary}% {\setlength{\parindent}{0pt}% \setlength{\parskip}{0pt plus 0.3pt}}% {}% % \end{macrocode} % Do nothing at the start of the \env{theglossary} environment: % \begin{macrocode} \renewcommand*{\glossaryheader}{}% % \end{macrocode} % No group headings: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} % Main (level 0) entries: name in bold, followed by symbol in % brackets (if it exists), the description and the page list: % \begin{macrocode} \renewcommand{\glossaryentryfield}[5]{% \hangindent0pt\relax \parindent0pt\relax \glsentryitem{##1}\textbf{\glstarget{##1}{##2}}% \ifx\relax##4\relax \else \space(##4)% \fi \space ##3\glspostdescription \space ##5\par}% % \end{macrocode} % Sub entries: level \meta{n} is indented by \meta{n} times % \ics{glstreeindent}. The name is in bold, followed by the % symbol in brackets (if it exists), the description and the % page list. % \begin{macrocode} \renewcommand{\glossarysubentryfield}[6]{% \hangindent##1\glstreeindent\relax \parindent##1\glstreeindent\relax \ifnum##1=1\relax \glssubentryitem{##2}% \fi \textbf{\glstarget{##2}{##3}}% \ifx\relax##5\relax \else \space(##5)% \fi \space##4\glspostdescription\space ##6\par}% % \end{macrocode} % Vertical gap between groups is the same as that used by % indices: % \begin{macrocode} \renewcommand*{\glsgroupskip}{\indexspace}} % \end{macrocode} %\end{style} % %\begin{style}{treegroup} % Like the \glostyle{tree} style but the glossary groups have % headings. % \begin{macrocode} \newglossarystyle{treegroup}{% % \end{macrocode} % Base it on the glostyle{tree} style: % \begin{macrocode} \glossarystyle{tree}% % \end{macrocode} % Each group has a heading (in bold) followed by a vertical gap): % \begin{macrocode} \renewcommand{\glsgroupheading}[1]{\par \noindent\textbf{\glsgetgrouptitle{##1}}\par\indexspace}% } % \end{macrocode} %\end{style} % %\begin{style}{treehypergroup} % The \glostyle{treehypergroup} style is like the \glostyle{treegroup} % style, but has a set of links to the groups at the % start of the glossary. % \begin{macrocode} \newglossarystyle{treehypergroup}{% % \end{macrocode} % Base it on the glostyle{tree} style: % \begin{macrocode} \glossarystyle{tree}% % \end{macrocode} % Put navigation links to the groups at the start of the % \env{theglossary} environment: % \begin{macrocode} \renewcommand*{\glossaryheader}{% \par\noindent\textbf{\glsnavigation}\par\indexspace}% % \end{macrocode} % Each group has a heading (in bold with a target) followed by a % vertical gap): % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{% \par\noindent \textbf{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par \indexspace}% } % \end{macrocode} %\end{style} % %\begin{macro}{\glstreeindent} % Length governing left indent for each level of the \glostyle{tree} % style. % \begin{macrocode} \newlength\glstreeindent \setlength{\glstreeindent}{10pt} % \end{macrocode} %\end{macro} % %\begin{style}{treenoname} % The \glostyle{treenoname} glossary style % is like the \glostyle{tree} style, but % doesn't print the name or symbol for sub-levels. % \begin{macrocode} \newglossarystyle{treenoname}{% % \end{macrocode} % Set the paragraph indentation and skip: % \begin{macrocode} \renewenvironment{theglossary}% {\setlength{\parindent}{0pt}% \setlength{\parskip}{0pt plus 0.3pt}}% {}% % \end{macrocode} % No header: % \begin{macrocode} \renewcommand*{\glossaryheader}{}% % \end{macrocode} % No group headings: % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} % Main (level 0) entries: the name is in bold, followed by the % symbol in brackets (if it exists), the description and the % page list. % \begin{macrocode} \renewcommand{\glossaryentryfield}[5]{% \hangindent0pt\relax \parindent0pt\relax \glsentryitem{##1}\textbf{\glstarget{##1}{##2}}% \ifx\relax##4\relax \else \space(##4)% \fi \space ##3\glspostdescription \space ##5\par}% % \end{macrocode} % Sub entries: level \meta{n} is indented by \meta{n} times % \ics{glstreeindent}. The name and symbol are omitted. The % description followed by the page list are displayed. % \begin{macrocode} \renewcommand{\glossarysubentryfield}[6]{% \hangindent##1\glstreeindent\relax \parindent##1\glstreeindent\relax \ifnum##1=1\relax \glssubentryitem{##2}% \fi \glstarget{##2}{\strut}% ##4\glspostdescription\space ##6\par}% % \end{macrocode} % Vertical gap between groups is the same as that used by indices: % \begin{macrocode} \renewcommand*{\glsgroupskip}{\indexspace}% } % \end{macrocode} %\end{style} % %\begin{style}{treenonamegroup} % Like the \glostyle{treenoname} style but the glossary groups have % headings. % \begin{macrocode} \newglossarystyle{treenonamegroup}{% % \end{macrocode} % Base it on the glostyle{treenoname} style: % \begin{macrocode} \glossarystyle{treenoname}% % \end{macrocode} % Give each group a heading: % \begin{macrocode} \renewcommand{\glsgroupheading}[1]{\par \noindent\textbf{\glsgetgrouptitle{##1}}\par\indexspace}% } % \end{macrocode} %\end{style} % %\begin{style}{treenonamehypergroup} % The \glostyle{treenonamehypergroup} style is like the \glostyle{treenonamegroup} % style, but has a set of links to the groups at the % start of the glossary. % \begin{macrocode} \newglossarystyle{treenonamehypergroup}{% % \end{macrocode} % Base it on the glostyle{treenoname} style: % \begin{macrocode} \glossarystyle{treenoname}% % \end{macrocode} % Put navigation links to the groups at the start of the % \env{theglossary} environment: % \begin{macrocode} \renewcommand*{\glossaryheader}{% \par\noindent\textbf{\glsnavigation}\par\indexspace}% % \end{macrocode} % Each group has a heading (in bold with a target) followed by a % vertical gap): % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{% \par\noindent \textbf{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par \indexspace}% } % \end{macrocode} %\end{style} % %\begin{macro}{\glssetwidest} % \cs{glssetwidest}\oarg{level}\marg{text} sets the widest % text for the given level. It is used by the % \glostyle{alttree} glossary styles to determine the % indentation of each level. % \begin{macrocode} \newcommand*{\glssetwidest}[2][0]{% \expandafter\def\csname @glswidestname\romannumeral#1\endcsname{% #2}% } % \end{macrocode} %\end{macro} %\begin{macro}{\@glswidestname} % Initialise \cs{@glswidestname}. % \begin{macrocode} \newcommand*{\@glswidestname}{} % \end{macrocode} %\end{macro} % %\begin{style}{alttree} % The \glostyle{alttree} glossary style % is similar in style to the \glostyle{tree} style, but % the indentation is obtained from the width of % \cs{@glswidestname} which is set using \cs{glssetwidest}. % \begin{macrocode} \newglossarystyle{alttree}{% % \end{macrocode} % Redefine \env{theglossary} environment. % \begin{macrocode} \renewenvironment{theglossary}% {\def\@gls@prevlevel{-1}% \mbox{}\par}% {\par}% % \end{macrocode} % Set the header and group headers to nothing. % \begin{macrocode} \renewcommand*{\glossaryheader}{}% \renewcommand*{\glsgroupheading}[1]{}% % \end{macrocode} % Redefine the way that the level~0 entries are displayed. % \begin{macrocode} \renewcommand{\glossaryentryfield}[5]{% % \end{macrocode} % If the level hasn't changed, keep the same settings, otherwise % change \cs{glstreeindent} accordingly. % \begin{macrocode} \ifnum\@gls@prevlevel=0\relax \else % \end{macrocode} % Find out how big the indentation should be by measuring the % widest entry. % \begin{macrocode} \settowidth{\glstreeindent}{\textbf{\@glswidestname\space}}% % \end{macrocode} % Set the hangindent and paragraph indent. % \begin{macrocode} \hangindent\glstreeindent \parindent\glstreeindent \fi % \end{macrocode} % Put the name to the left of the paragraph block. % \begin{macrocode} \makebox[0pt][r]{\makebox[\glstreeindent][l]{% \glsentryitem{##1}\textbf{\glstarget{##1}{##2}}}}% % \end{macrocode} % If the symbol is missing, ignore it, otherwise put it in % brackets. % \begin{macrocode} \ifx\relax##4\relax \else (##4)\space \fi % \end{macrocode} % Do the description followed by the description terminator and % location list. % \begin{macrocode} ##3\glspostdescription \space ##5\par % \end{macrocode} % Set the previous level to 0. % \begin{macrocode} \def\@gls@prevlevel{0}% }% % \end{macrocode} % Redefine the way sub-entries are displayed. % \begin{macrocode} \renewcommand{\glossarysubentryfield}[6]{% % \end{macrocode} % Increment and display the sub-entry counter if this is a level~1 % entry and the sub-entry counter is in use. % \begin{macrocode} \ifnum##1=1\relax \glssubentryitem{##2}% \fi % \end{macrocode} % If the level hasn't changed, keep the same settings, otherwise % adjust \cs{glstreeindent} accordingly. % \begin{macrocode} \ifnum\@gls@prevlevel=##1\relax \else % \end{macrocode} % Compute the widest entry for this level, or for level~0 if not % defined for this level. Store in \cs{gls@tmplen} % \begin{macrocode} \@ifundefined{@glswidestname\romannumeral##1}{% \settowidth{\gls@tmplen}{\textbf{\@glswidestname\space}}}{% \settowidth{\gls@tmplen}{\textbf{% \csname @glswidestname\romannumeral##1\endcsname\space}}}% % \end{macrocode} % Determine if going up or down a level % \begin{macrocode} \ifnum\@gls@prevlevel<##1\relax % \end{macrocode} % Depth has increased, so add the width of the widest entry to % \cs{glstreeindent}. % \begin{macrocode} \setlength\glstreeindent\gls@tmplen \addtolength\glstreeindent\parindent \parindent\glstreeindent \else % \end{macrocode} % Depth has decreased, so subtract width of the widest entry % from the previous level to \cs{glstreeindent}. First % determine the width of the widest entry for the previous level % and store in \cs{glstreeindent}. % \begin{macrocode} \@ifundefined{@glswidestname\romannumeral\@gls@prevlevel}{% \settowidth{\glstreeindent}{\textbf{% \@glswidestname\space}}}{% \settowidth{\glstreeindent}{\textbf{% \csname @glswidestname\romannumeral\@gls@prevlevel \endcsname\space}}}% % \end{macrocode} % Subtract this length from the previous level's paragraph indent % and set to \cs{glstreeindent}. % \begin{macrocode} \addtolength\parindent{-\glstreeindent}% \setlength\glstreeindent\parindent \fi \fi % \end{macrocode} % Set the hanging indentation. % \begin{macrocode} \hangindent\glstreeindent % \end{macrocode} % Put the name to the left of the paragraph block % \begin{macrocode} \makebox[0pt][r]{\makebox[\gls@tmplen][l]{% \textbf{\glstarget{##2}{##3}}}}% % \end{macrocode} % If the symbol is missing, ignore it, otherwise put it in % brackets. % \begin{macrocode} \ifx##5\relax\relax \else (##5)\space \fi % \end{macrocode} % Do the description followed by the description terminator and % location list. % \begin{macrocode} ##4\glspostdescription\space ##6\par % \end{macrocode} % Set the previous level macro to the current level. % \begin{macrocode} \def\@gls@prevlevel{##1}% }% % \end{macrocode} % Vertical gap between groups is the same as that used by indices: % \begin{macrocode} \renewcommand*{\glsgroupskip}{\indexspace}% } % \end{macrocode} %\end{style} % %\begin{style}{alttreegroup} % Like the \glostyle{alttree} style but the glossary groups have % headings. % \begin{macrocode} \newglossarystyle{alttreegroup}{% % \end{macrocode} % Base it on the glostyle{alttree} style: % \begin{macrocode} \glossarystyle{alttree}% % \end{macrocode} % Give each group a heading. % \begin{macrocode} \renewcommand{\glsgroupheading}[1]{\par \def\@gls@prevlevel{-1}% \hangindent0pt\relax \parindent0pt\relax \textbf{\glsgetgrouptitle{##1}}\par\indexspace}% } % \end{macrocode} %\end{style} % %\begin{style}{alttreehypergroup} % The \glostyle{alttreehypergroup} style is like the % \glostyle{alttreegroup} style, but has a set of links to the % groups at the start of the glossary. % \begin{macrocode} \newglossarystyle{alttreehypergroup}{% % \end{macrocode} % Base it on the glostyle{alttree} style: % \begin{macrocode} \glossarystyle{alttree}% % \end{macrocode} % Put the navigation links in the header % \begin{macrocode} \renewcommand*{\glossaryheader}{% \par \def\@gls@prevlevel{-1}% \hangindent0pt\relax \parindent0pt\relax \textbf{\glsnavigation}\par\indexspace}% % \end{macrocode} % Put a hypertarget at the start of each group % \begin{macrocode} \renewcommand*{\glsgroupheading}[1]{% \par \def\@gls@prevlevel{-1}% \hangindent0pt\relax \parindent0pt\relax \textbf{\glsnavhypertarget{##1}{\glsgetgrouptitle{##1}}}\par \indexspace}} % \end{macrocode} %\end{style} % %\iffalse % \begin{macrocode} % % \end{macrocode} %\fi %\iffalse % \begin{macrocode} %<*glossaries-compatible-207.sty> % \end{macrocode} %\fi %\section{glossaries-compatible-207} % Provides compatibility with version 2.07 and below. This uses % original \sty{glossaries} xindy and makeindex formatting, so can % be used with old documents that had customized style files, but % hyperlinks may not work properly. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{glossaries-compatible-207}[2011/04/02 v1.0 (NLCT)] % \end{macrocode} %\begin{macro}{\GlsAddXdyAttribute} % Adds an attribute in old format. % \begin{macrocode} \ifglsxindy \renewcommand*\GlsAddXdyAttribute[1]{% \edef\@xdyattributes{\@xdyattributes ^^J \string"#1\string"}% \expandafter\toks@\expandafter{\@xdylocref}% \edef\@xdylocref{\the\toks@ ^^J% (markup-locref :open \string"\string~n\string\setentrycounter {\noexpand\glscounter}% \expandafter\string\csname#1\endcsname \expandafter\@gobble\string\{\string" ^^J :close \string"\expandafter\@gobble\string\}\string" ^^J :attr \string"#1\string")}} % \end{macrocode} % Only has an effect before \ics{writeist}: % \begin{macrocode} \fi % \end{macrocode} %\end{macro} %\begin{macro}{\GlsAddXdyCounters} % \begin{macrocode} \renewcommand*\GlsAddXdyCounters[1]{% \GlossariesWarning{\string\GlsAddXdyCounters\space not available in compatibility mode.}% } % \end{macrocode} %\end{macro} % Add predefined attributes % \begin{macrocode} \GlsAddXdyAttribute{glsnumberformat} \GlsAddXdyAttribute{textrm} \GlsAddXdyAttribute{textsf} \GlsAddXdyAttribute{texttt} \GlsAddXdyAttribute{textbf} \GlsAddXdyAttribute{textmd} \GlsAddXdyAttribute{textit} \GlsAddXdyAttribute{textup} \GlsAddXdyAttribute{textsl} \GlsAddXdyAttribute{textsc} \GlsAddXdyAttribute{emph} \GlsAddXdyAttribute{glshypernumber} \GlsAddXdyAttribute{hyperrm} \GlsAddXdyAttribute{hypersf} \GlsAddXdyAttribute{hypertt} \GlsAddXdyAttribute{hyperbf} \GlsAddXdyAttribute{hypermd} \GlsAddXdyAttribute{hyperit} \GlsAddXdyAttribute{hyperup} \GlsAddXdyAttribute{hypersl} \GlsAddXdyAttribute{hypersc} \GlsAddXdyAttribute{hyperemph} % \end{macrocode} % %\begin{macro}{\GlsAddXdyLocation} % Restore v2.07 definition: % \begin{macrocode} \ifglsxindy \renewcommand*{\GlsAddXdyLocation}[2]{% \edef\@xdyuserlocationdefs{% \@xdyuserlocationdefs ^^J% (define-location-class \string"#1\string"^^J\space\space \space(#2)) }% \edef\@xdyuserlocationnames{% \@xdyuserlocationnames^^J\space\space\space \string"#1\string"}% } \fi % \end{macrocode} %\end{macro} % %\begin{macro}{\@do@wrglossary} % \begin{macrocode} \renewcommand{\@do@wrglossary}[1]{% % \end{macrocode} % Determine whether to use \app{xindy} or \app{makeindex} % syntax % \begin{macrocode} \ifglsxindy % \end{macrocode} % Need to determine if the formatting information starts with % a ( or ) indicating a range. % \begin{macrocode} \expandafter\@glo@check@mkidxrangechar\@glsnumberformat\@nil \def\@glo@range{}% \expandafter\if\@glo@prefix(\relax \def\@glo@range{:open-range}% \else \expandafter\if\@glo@prefix)\relax \def\@glo@range{:close-range}% \fi \fi % \end{macrocode} % Get the location and escape any special characters % \begin{macrocode} \protected@edef\@glslocref{\theglsentrycounter}% \@gls@checkmkidxchars\@glslocref % \end{macrocode} % Write to the glossary file using \app{xindy} syntax. % \begin{macrocode} \glossary[\csname glo@#1@type\endcsname]{% (indexentry :tkey (\csname glo@#1@index\endcsname) :locref \string"\@glslocref\string" % :attr \string"\@glo@suffix\string" \@glo@range ) }% \else % \end{macrocode} % Convert the format information into the format required for % \app{makeindex} % \begin{macrocode} \@set@glo@numformat\@glo@numfmt\@gls@counter\@glsnumberformat % \end{macrocode} % Write to the glossary file using \app{makeindex} syntax. % \begin{macrocode} \glossary[\csname glo@#1@type\endcsname]{% \string\glossaryentry{\csname glo@#1@index\endcsname \@gls@encapchar\@glo@numfmt}{\theglsentrycounter}}% \fi } % \end{macrocode} %\end{macro} %\begin{macro}{\@set@glo@numformat} % Only had 3 arguments in v2.07 % \begin{macrocode} \def\@set@glo@numformat#1#2#3{% \expandafter\@glo@check@mkidxrangechar#3\@nil \protected@edef#1{% \@glo@prefix setentrycounter[]{#2}% \expandafter\string\csname\@glo@suffix\endcsname }% \@gls@checkmkidxchars#1% } % \end{macrocode} %\end{macro} % %\begin{macro}{\writeist} % Redefine \cs{writeist} back to the way it was in v2.07, but change % \cs{istfile} to \cs{glswrite}. % \begin{macrocode} \ifglsxindy \def\writeist{% \openout\glswrite=\istfilename \write\glswrite{;; xindy style file created by the glossaries package in compatible-2.07 mode}% \write\glswrite{;; for document '\jobname' on \the\year-\the\month-\the\day}% \write\glswrite{^^J; required styles^^J} \@for\@xdystyle:=\@xdyrequiredstyles\do{% \ifx\@xdystyle\@empty \else \protected@write\glswrite{}{(require \string"\@xdystyle.xdy\string")}% \fi }% \write\glswrite{^^J% ; list of allowed attributes (number formats)^^J}% \write\glswrite{(define-attributes ((\@xdyattributes)))}% \write\glswrite{^^J; user defined alphabets^^J}% \write\glswrite{\@xdyuseralphabets}% \write\glswrite{^^J; location class definitions^^J}% \protected@edef\@gls@roman{\@roman{0\string" \string"roman-numbers-lowercase\string" :sep \string"}}% \@onelevel@sanitize\@gls@roman \edef\@tmp{\string" \string"roman-numbers-lowercase\string" :sep \string"}% \@onelevel@sanitize\@tmp \ifx\@tmp\@gls@roman \write\glswrite{(define-location-class \string"roman-page-numbers\string"^^J\space\space\space (\string"roman-numbers-lowercase\string") :min-range-length \@glsminrange)}% \else \write\glswrite{(define-location-class \string"roman-page-numbers\string"^^J\space\space\space (:sep "\@gls@roman") :min-range-length \@glsminrange)}% \fi \write\glswrite{(define-location-class \string"Roman-page-numbers\string"^^J\space\space\space (\string"roman-numbers-uppercase\string") :min-range-length \@glsminrange)}% \write\glswrite{(define-location-class \string"arabic-page-numbers\string"^^J\space\space\space (\string"arabic-numbers\string") :min-range-length \@glsminrange)}% \write\glswrite{(define-location-class \string"alpha-page-numbers\string"^^J\space\space\space (\string"alpha\string") :min-range-length \@glsminrange)}% \write\glswrite{(define-location-class \string"Alpha-page-numbers\string"^^J\space\space\space (\string"ALPHA\string") :min-range-length \@glsminrange)}% \write\glswrite{(define-location-class \string"Appendix-page-numbers\string"^^J\space\space\space (\string"ALPHA\string" :sep \string"\@glsAlphacompositor\string" \string"arabic-numbers\string") :min-range-length \@glsminrange)}% \write\glswrite{(define-location-class \string"arabic-section-numbers\string"^^J\space\space\space (\string"arabic-numbers\string" :sep \string"\glscompositor\string" \string"arabic-numbers\string") :min-range-length \@glsminrange)}% \write\glswrite{^^J; user defined location classes}% \write\glswrite{\@xdyuserlocationdefs}% \write\glswrite{^^J; define cross-reference class^^J}% \write\glswrite{(define-crossref-class \string"see\string" :unverified )}% \write\glswrite{(markup-crossref-list :class \string"see\string"^^J\space\space\space :open \string"\string\glsseeformat\string" :close \string"{}\string")}% \write\glswrite{^^J; define the order of the location classes}% \write\glswrite{(define-location-class-order (\@xdylocationclassorder))}% \write\glswrite{^^J; define the glossary markup^^J}% \write\glswrite{(markup-index^^J\space\space\space :open \string"\string \glossarysection[\string\glossarytoctitle]{\string \glossarytitle}\string\glossarypreamble\string~n\string\begin {theglossary}\string\glossaryheader\string~n\string" ^^J\space \space\space:close \string"\expandafter\@gobble \string\%\string~n\string \end{theglossary}\string\glossarypostamble \string~n\string" ^^J\space\space\space :tree)}% \write\glswrite{(markup-letter-group-list :sep \string"\string\glsgroupskip\string~n\string")}% \write\glswrite{(markup-indexentry :open \string"\string\relax \string\glsresetentrylist \string~n\string")}% \write\glswrite{(markup-locclass-list :open \string"\glsopenbrace\string\glossaryentrynumbers \glsopenbrace\string\relax\space \string"^^J\space\space\space :sep \string", \string" :close \string"\glsclosebrace\glsclosebrace\string")}% \write\glswrite{(markup-locref-list :sep \string"\string\delimN\space\string")}% \write\glswrite{(markup-range :sep \string"\string\delimR\space\string")}% \@onelevel@sanitize\gls@suffixF \@onelevel@sanitize\gls@suffixFF \ifx\gls@suffixF\@empty \else \write\glswrite{(markup-range :close "\gls@suffixF" :length 1 :ignore-end)}% \fi \ifx\gls@suffixFF\@empty \else \write\glswrite{(markup-range :close "\gls@suffixFF" :length 2 :ignore-end)}% \fi \write\glswrite{^^J; define format to use for locations^^J}% \write\glswrite{\@xdylocref}% \write\glswrite{^^J; define letter group list format^^J}% \write\glswrite{(markup-letter-group-list :sep \string"\string\glsgroupskip\string~n\string")}% \write\glswrite{^^J; letter group headings^^J}% \write\glswrite{(markup-letter-group :open-head \string"\string\glsgroupheading \glsopenbrace\string"^^J\space\space\space :close-head \string"\glsclosebrace\string")}% \write\glswrite{^^J; additional letter groups^^J}% \write\glswrite{\@xdylettergroups}% \write\glswrite{^^J; additional sort rules^^J} \write\glswrite{\@xdysortrules}% \noist} \else \edef\@gls@actualchar{\string?} \edef\@gls@encapchar{\string|} \edef\@gls@levelchar{\string!} \edef\@gls@quotechar{\string"} \def\writeist{\relax \openout\glswrite=\istfilename \write\glswrite{\expandafter\@gobble\string\% makeindex style file created by the glossaries package} \write\glswrite{\expandafter\@gobble\string\% for document '\jobname' on \the\year-\the\month-\the\day} \write\glswrite{actual '\@gls@actualchar'} \write\glswrite{encap '\@gls@encapchar'} \write\glswrite{level '\@gls@levelchar'} \write\glswrite{quote '\@gls@quotechar'} \write\glswrite{keyword \string"\string\\glossaryentry\string"} \write\glswrite{preamble \string"\string\\glossarysection[\string \\glossarytoctitle]{\string\\glossarytitle}\string \\glossarypreamble\string\n\string\\begin{theglossary}\string \\glossaryheader\string\n\string"} \write\glswrite{postamble \string"\string\%\string\n\string \\end{theglossary}\string\\glossarypostamble\string\n \string"} \write\glswrite{group_skip \string"\string\\glsgroupskip\string\n \string"} \write\glswrite{item_0 \string"\string\%\string\n\string"} \write\glswrite{item_1 \string"\string\%\string\n\string"} \write\glswrite{item_2 \string"\string\%\string\n\string"} \write\glswrite{item_01 \string"\string\%\string\n\string"} \write\glswrite{item_x1 \string"\string\\relax \string\\glsresetentrylist\string\n \string"} \write\glswrite{item_12 \string"\string\%\string\n\string"} \write\glswrite{item_x2 \string"\string\\relax \string\\glsresetentrylist\string\n \string"} \write\glswrite{delim_0 \string"\string\{\string \\glossaryentrynumbers\string\{\string\\relax \string"} \write\glswrite{delim_1 \string"\string\{\string \\glossaryentrynumbers\string\{\string\\relax \string"} \write\glswrite{delim_2 \string"\string\{\string \\glossaryentrynumbers\string\{\string\\relax \string"} \write\glswrite{delim_t \string"\string\}\string\}\string"} \write\glswrite{delim_n \string"\string\\delimN \string"} \write\glswrite{delim_r \string"\string\\delimR \string"} \write\glswrite{headings_flag 1} \write\glswrite{heading_prefix \string"\string\\glsgroupheading\string\{\string"} \write\glswrite{heading_suffix \string"\string\}\string\\relax \string\\glsresetentrylist \string"} \write\glswrite{symhead_positive \string"glssymbols\string"} \write\glswrite{numhead_positive \string"glsnumbers\string"} \write\glswrite{page_compositor \string"\glscompositor\string"} \@gls@escbsdq\gls@suffixF \@gls@escbsdq\gls@suffixFF \ifx\gls@suffixF\@empty \else \write\glswrite{suffix_2p \string"\gls@suffixF\string"} \fi \ifx\gls@suffixFF\@empty \else \write\glswrite{suffix_3p \string"\gls@suffixFF\string"} \fi \noist } \fi % \end{macrocode} %\end{macro} %\begin{macro}{\noist} % \begin{macrocode} \renewcommand*{\noist}{\let\writeist\relax} % \end{macrocode} %\end{macro} %\iffalse % \begin{macrocode} % % \end{macrocode} %\fi %\iffalse % \begin{macrocode} %<*glossaries-accsupp.sty> % \end{macrocode} %\fi %\section{Accessibility Support (glossaries-accsupp Code)} %\label{sec:code:accsupp} % The \isty{glossaries-accsupp} package is experimental. It is % intended to provide a means of using the PDF accessibilty support % in glossary entries. See the \isty{accsupp} documentation for % further details about accessibility support. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} % \end{macrocode} % Package version number now in line with main glossaries package number % but will only be updated when \texttt{glossaries-accsupp.sty} is % modified. % \begin{macrocode} \ProvidesPackage{glossaries-accsupp}[2011/04/02 v3.0 (NLCT) Experimental glossaries accessibility] % \end{macrocode} % Pass all options to \sty{glossaries}: % \begin{macrocode} \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{glossaries}} % \end{macrocode} % Process options: % \begin{macrocode} \ProcessOptions % \end{macrocode} % Required packages: % \begin{macrocode} \RequirePackage{glossaries} \RequirePackage{accsupp} % \end{macrocode} % %\subsection{Defining Replacement Text} % The version 0.1 stored the replacement text in the % \gloskey{symbol} key. This has been changed to use the % new keys defined here. Example of use: %\begin{verbatim} %\newglossaryentry{dr}{name=Dr,description={},access={Doctor}} %\end{verbatim} %\begin{key}{access} % The replacement text corresponding to the \gloskey{name} key: % \begin{macrocode} \define@key{glossentry}{access}{% \def\@glo@access{#1}% } % \end{macrocode} %\end{key} %\begin{key}{textaccess} % The replacement text corresponding to the \gloskey{text} key: % \begin{macrocode} \define@key{glossentry}{textaccess}{% \def\@glo@textaccess{#1}% } % \end{macrocode} %\end{key} %\begin{key}{firstaccess} % The replacement text corresponding to the \gloskey{first} key: % \begin{macrocode} \define@key{glossentry}{firstaccess}{% \def\@glo@firstaccess{#1}% } % \end{macrocode} %\end{key} %\begin{key}{pluralaccess} % The replacement text corresponding to the \gloskey{plural} key: % \begin{macrocode} \define@key{glossentry}{pluralaccess}{% \def\@glo@pluralaccess{#1}% } % \end{macrocode} %\end{key} %\begin{key}{firstpluralaccess} % The replacement text corresponding to the \gloskey{firstplural} key: % \begin{macrocode} \define@key{glossentry}{firstpluralaccess}{% \def\@glo@firstpluralaccess{#1}% } % \end{macrocode} %\end{key} %\begin{key}{symbolaccess} % The replacement text corresponding to the \gloskey{symbol} key: % \begin{macrocode} \define@key{glossentry}{symbolaccess}{% \def\@glo@symbolaccess{#1}% } % \end{macrocode} %\end{key} %\begin{key}{symbolpluralaccess} % The replacement text corresponding to the \gloskey{symbolplural} key: % \begin{macrocode} \define@key{glossentry}{symbolpluralaccess}{% \def\@glo@symbolpluralaccess{#1}% } % \end{macrocode} %\end{key} %\begin{key}{descriptionaccess} % The replacement text corresponding to the \gloskey{description} key: % \begin{macrocode} \define@key{glossentry}{descriptionaccess}{% \def\@glo@descaccess{#1}% } % \end{macrocode} %\end{key} %\begin{key}{descriptionpluralaccess} % The replacement text corresponding to the \gloskey{descriptionplural} key: % \begin{macrocode} \define@key{glossentry}{descriptionpluralaccess}{% \def\@glo@descpluralaccess{#1}% } % \end{macrocode} %\end{key} %\begin{key}{shortaccess} % The replacement text corresponding to the \gloskey{short} key: % \begin{macrocode} \define@key{glossentry}{shortaccess}{% \def\@glo@shortaccess{#1}% } % \end{macrocode} %\end{key} %\begin{key}{shortpluralaccess} % The replacement text corresponding to the \gloskey{shortplural} key: % \begin{macrocode} \define@key{glossentry}{shortpluralaccess}{% \def\@glo@shortpluralaccess{#1}% } % \end{macrocode} %\end{key} %\begin{key}{longaccess} % The replacement text corresponding to the \gloskey{long} key: % \begin{macrocode} \define@key{glossentry}{longaccess}{% \def\@glo@longaccess{#1}% } % \end{macrocode} %\end{key} %\begin{key}{longpluralaccess} % The replacement text corresponding to the \gloskey{longplural} key: % \begin{macrocode} \define@key{glossentry}{longpluralaccess}{% \def\@glo@longpluralaccess{#1}% } % \end{macrocode} %\end{key} % There are no equivalent keys for the \gloskey{user1}\ldots %\gloskey{user6} keys. The replacement text would have to be % explicitly put in the value, e.g., % "user1={\glsaccsupp{inches}{in}}". % %\begin{macro}{\@gls@noaccess} % Indicates that no replacement text has been provided. % \begin{macrocode} \def\@gls@noaccess{\relax} % \end{macrocode} %\end{macro} % % Add to the start hook (the \gloskey{access} key is initialised to % the value of the \gloskey{symbol} key at the start for backwards % compatibility): % \begin{macrocode} \let\@gls@oldnewglossaryentryprehook\@newglossaryentryprehook \renewcommand*{\@newglossaryentryprehook}{% \@gls@oldnewglossaryentryprehook \def\@glo@access{\@glo@symbol}% % \end{macrocode} % Initialise the other keys: % \begin{macrocode} \def\@glo@textaccess{\@glo@access}% \def\@glo@firstaccess{\@glo@access}% \def\@glo@pluralaccess{\@glo@textaccess}% \def\@glo@firstpluralaccess{\@glo@pluralaccess}% \def\@glo@symbolaccess{\relax}% \def\@glo@symbolpluralaccess{\@glo@symbolaccess}% \def\@glo@descaccess{\relax}% \def\@glo@descpluralaccess{\@glo@descaccess}% \def\@glo@shortaccess{\relax}% \def\@glo@shortpluralaccess{\@glo@shortaccess}% \def\@glo@longaccess{\relax}% \def\@glo@longpluralaccess{\@glo@longaccess}% } % \end{macrocode} % Add to the end hook: % \begin{macrocode} \let\@gls@oldnewglossaryentryposthook\@newglossaryentryposthook \renewcommand*{\@newglossaryentryposthook}{% \@gls@oldnewglossaryentryposthook % \end{macrocode} % Store the access information: % \begin{macrocode} \expandafter \protected@xdef\csname glo@\@glo@label @access\endcsname{% \@glo@access}% \expandafter \protected@xdef\csname glo@\@glo@label @textaccess\endcsname{% \@glo@textaccess}% \expandafter \protected@xdef\csname glo@\@glo@label @firstaccess\endcsname{% \@glo@firstaccess}% \expandafter \protected@xdef\csname glo@\@glo@label @pluralaccess\endcsname{% \@glo@pluralaccess}% \expandafter \protected@xdef\csname glo@\@glo@label @firstpluralaccess\endcsname{% \@glo@firstpluralaccess}% \expandafter \protected@xdef\csname glo@\@glo@label @symbolaccess\endcsname{% \@glo@symbolaccess}% \expandafter \protected@xdef\csname glo@\@glo@label @symbolpluralaccess\endcsname{% \@glo@symbolpluralaccess}% \expandafter \protected@xdef\csname glo@\@glo@label @descaccess\endcsname{% \@glo@descaccess}% \expandafter \protected@xdef\csname glo@\@glo@label @descpluralaccess\endcsname{% \@glo@descpluralaccess}% \expandafter \protected@xdef\csname glo@\@glo@label @shortaccess\endcsname{% \@glo@shortaccess}% \expandafter \protected@xdef\csname glo@\@glo@label @shortpluralaccess\endcsname{% \@glo@shortpluralaccess}% \expandafter \protected@xdef\csname glo@\@glo@label @longaccess\endcsname{% \@glo@longaccess}% \expandafter \protected@xdef\csname glo@\@glo@label @longpluralaccess\endcsname{% \@glo@longpluralaccess}% } % \end{macrocode} % %\subsection{Accessing Replacement Text} %\begin{macro}{\glsentryaccess} % Get the value of the \gloskey{access} key for the entry with % the given label: % \begin{macrocode} \newcommand*{\glsentryaccess}[1]{% \csname glo@#1@access\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentrytextaccess} % Get the value of the \gloskey{textaccess} key for the entry with % the given label: % \begin{macrocode} \newcommand*{\glsentrytextaccess}[1]{% \csname glo@#1@textaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentryfirstaccess} % Get the value of the \gloskey{firstaccess} key for the entry with % the given label: % \begin{macrocode} \newcommand*{\glsentryfirstaccess}[1]{% \csname glo@#1@firstaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentrypluralaccess} % Get the value of the \gloskey{pluralaccess} key for the entry with % the given label: % \begin{macrocode} \newcommand*{\glsentrypluralaccess}[1]{% \csname glo@#1@pluralaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentryfirstpluralaccess} % Get the value of the \gloskey{firstpluralaccess} key for the entry with % the given label: % \begin{macrocode} \newcommand*{\glsentryfirstpluralaccess}[1]{% \csname glo@#1@firstpluralaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentrysymbolaccess} % Get the value of the \gloskey{symbolaccess} key for the entry with % the given label: % \begin{macrocode} \newcommand*{\glsentrysymbolaccess}[1]{% \csname glo@#1@symbolaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentrysymbolpluralaccess} % Get the value of the \gloskey{symbolpluralaccess} key for the entry with % the given label: % \begin{macrocode} \newcommand*{\glsentrysymbolpluralaccess}[1]{% \csname glo@#1@symbolpluralaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentrydescaccess} % Get the value of the \gloskey{descriptionaccess} key for the entry with % the given label: % \begin{macrocode} \newcommand*{\glsentrydescaccess}[1]{% \csname glo@#1@descaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentrydescpluralaccess} % Get the value of the \gloskey{descriptionpluralaccess} key for the entry with % the given label: % \begin{macrocode} \newcommand*{\glsentrydescpluralaccess}[1]{% \csname glo@#1@descaccess\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\glsentryshortaccess} % Get the value of the \gloskey{shortaccess} key for the entry with % the given label: % \begin{macrocode} \newcommand*{\glsentryshortaccess}[1]{% \csname glo@#1@shortaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentryshortpluralaccess} % Get the value of the \gloskey{shortpluralaccess} key for the entry with % the given label: % \begin{macrocode} \newcommand*{\glsentryshortpluralaccess}[1]{% \csname glo@#1@shortpluralaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentrylongaccess} % Get the value of the \gloskey{longaccess} key for the entry with % the given label: % \begin{macrocode} \newcommand*{\glsentrylongaccess}[1]{% \csname glo@#1@longaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\glsentrylongpluralaccess} % Get the value of the \gloskey{longpluralaccess} key for the entry with % the given label: % \begin{macrocode} \newcommand*{\glsentrylongpluralaccess}[1]{% \csname glo@#1@longpluralaccess\endcsname } % \end{macrocode} %\end{macro} % %\begin{macro}{\glsaccsupp} %\cs{glsaccsupp}\marg{replacement text}\marg{text}\\[10pt] % This can be redefined to use "E" or "Alt" instead of % "ActualText". (I don't have the software to test the "E" or % "Alt" options.) % \begin{macrocode} \newcommand*{\glsaccsupp}[2]{% \BeginAccSupp{ActualText=#1}#2\EndAccSupp{}% } % \end{macrocode} %\end{macro} %\begin{macro}{\xglsaccsupp} % Fully expands replacement text before calling \cs{glsaccsupp} % \begin{macrocode} \newcommand*{\xglsaccsupp}[2]{% \protected@edef\@gls@replacementtext{#1}% \expandafter\glsaccsupp\expandafter{\@gls@replacementtext}{#2}% } % \end{macrocode} %\end{macro} % %\begin{macro}{\glsnameaccessdisplay} % Displays the first argument with the accessibility text for % the entry with the label given by the second argument (if set). % \begin{macrocode} \DeclareRobustCommand*{\glsnameaccessdisplay}[2]{% \protected@edef\@glo@access{\glsentryaccess{#2}}% \ifx\@glo@access\@gls@noaccess #1% \else \xglsaccsupp{\@glo@access}{#1}% \fi } % \end{macrocode} %\end{macro} %\begin{macro}{\glstextaccessdisplay} % As above but for the \gloskey{textaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glstextaccessdisplay}[2]{% \protected@edef\@glo@access{\glsentrytextaccess{#2}}% \ifx\@glo@access\@gls@noaccess #1% \else \xglsaccsupp{\@glo@access}{#1}% \fi } % \end{macrocode} %\end{macro} %\begin{macro}{\glspluralaccessdisplay} % As above but for the \gloskey{pluralaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glspluralaccessdisplay}[2]{% \protected@edef\@glo@access{\glsentrypluralaccess{#2}}% \ifx\@glo@access\@gls@noaccess #1% \else \xglsaccsupp{\@glo@access}{#1}% \fi } % \end{macrocode} %\end{macro} %\begin{macro}{\glsfirstaccessdisplay} % As above but for the \gloskey{firstaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glsfirstaccessdisplay}[2]{% \protected@edef\@glo@access{\glsentryfirstaccess{#2}}% \ifx\@glo@access\@gls@noaccess #1% \else \xglsaccsupp{\@glo@access}{#1}% \fi } % \end{macrocode} %\end{macro} %\begin{macro}{\glsfirstpluralaccessdisplay} % As above but for the \gloskey{firstpluralaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glsfirstpluralaccessdisplay}[2]{% \protected@edef\@glo@access{\glsentryfirstpluralaccess{#2}}% \ifx\@glo@access\@gls@noaccess #1% \else \xglsaccsupp{\@glo@access}{#1}% \fi } % \end{macrocode} %\end{macro} %\begin{macro}{\glssymbolaccessdisplay} % As above but for the \gloskey{symbolaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glssymbolaccessdisplay}[2]{% \protected@edef\@glo@access{\glsentrysymbolaccess{#2}}% \ifx\@glo@access\@gls@noaccess #1% \else \xglsaccsupp{\@glo@access}{#1}% \fi } % \end{macrocode} %\end{macro} %\begin{macro}{\glssymbolpluralaccessdisplay} % As above but for the \gloskey{symbolpluralaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glssymbolpluralaccessdisplay}[2]{% \protected@edef\@glo@access{\glsentrysymbolpluralaccess{#2}}% \ifx\@glo@access\@gls@noaccess #1% \else \xglsaccsupp{\@glo@access}{#1}% \fi } % \end{macrocode} %\end{macro} %\begin{macro}{\glsdescriptionaccessdisplay} % As above but for the \gloskey{descriptionaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glsdescriptionaccessdisplay}[2]{% \protected@edef\@glo@access{\glsentrydescaccess{#2}}% \ifx\@glo@access\@gls@noaccess #1% \else \xglsaccsupp{\@glo@access}{#1}% \fi } % \end{macrocode} %\end{macro} %\begin{macro}{\glsdescriptionpluralaccessdisplay} % As above but for the \gloskey{descriptionpluralaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glsdescriptionpluralaccessdisplay}[2]{% \protected@edef\@glo@access{\glsentrydescpluralaccess{#2}}% \ifx\@glo@access\@gls@noaccess #1% \else \xglsaccsupp{\@glo@access}{#1}% \fi } % \end{macrocode} %\end{macro} %\begin{macro}{\glsshortaccessdisplay} % As above but for the \gloskey{shortaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glsshortaccessdisplay}[2]{% \protected@edef\@glo@access{\glsentryshortaccess{#2}}% \ifx\@glo@access\@gls@noaccess #1% \else \xglsaccsupp{\@glo@access}{#1}% \fi } % \end{macrocode} %\end{macro} % %\begin{macro}{\glsshortpluralaccessdisplay} % As above but for the \gloskey{shortpluralaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glsshortpluralaccessdisplay}[2]{% \protected@edef\@glo@access{\glsentryshortpluralaccess{#2}}% \ifx\@glo@access\@gls@noaccess #1% \else \xglsaccsupp{\@glo@access}{#1}% \fi } % \end{macrocode} %\end{macro} %\begin{macro}{\glslongaccessdisplay} % As above but for the \gloskey{longaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glslongaccessdisplay}[2]{% \protected@edef\@glo@access{\glsentrylongaccess{#2}}% \ifx\@glo@access\@gls@noaccess #1% \else \xglsaccsupp{\@glo@access}{#1}% \fi } % \end{macrocode} %\end{macro} % %\begin{macro}{\glslongpluralaccessdisplay} % As above but for the \gloskey{longpluralaccess} replacement text. % \begin{macrocode} \DeclareRobustCommand*{\glslongpluralaccessdisplay}[2]{% \protected@edef\@glo@access{\glsentrylongpluralaccess{#2}}% \ifx\@glo@access\@gls@noaccess #1% \else \xglsaccsupp{\@glo@access}{#1}% \fi } % \end{macrocode} %\end{macro} % %\begin{macro}{\glsaccessdisplay} % Gets the replacement text corresponding to the named key given % by the first argument and calls the appropriate command % defined above. % \begin{macrocode} \DeclareRobustCommand*{\glsaccessdisplay}[3]{% \@ifundefined{gls#1accessdisplay}% {% \PackageError{glossaries-accsupp}{No accessibility support for key `#1'}{}% }% {% \csname gls#1accessdisplay\endcsname{#2}{#3}% }% } % \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@} % Redefine \cs{@gls@} to change the way the link text is defined % \begin{macrocode} \def\@gls@#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} \def\@gls@link@opts{#1}% \def\@gls@link@label{#2}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}). This is no longer expanded. % \begin{macrocode} \ifglsused{#2}% {% \def\@glo@text{\csname gls@\@glo@type @display\endcsname {\glstextaccessdisplay{\glsentrytext{#2}}{#2}}% {\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}}% {\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}}% {#3}}% }% {% \def\@glo@text{\csname gls@\@glo@type @displayfirst\endcsname {\glsfirstaccessdisplay{\glsentryfirst{#2}}{#2}}% {\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}}% {\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}}% {#3}}% }% % \end{macrocode} % Call \cs{@gls@link}. % If \pkgopt{footnote} package option has been used, suppress % hyperlink for first use. % \begin{macrocode} \ifglsused{#2}% {% \@gls@link[#1]{#2}{\@glo@text}% }% {% \gls@checkisacronymlist\@glo@type \ifthenelse{\(\boolean{@glsisacronymlist}\AND \boolean{glsacrfootnote}\) \OR\NOT\boolean{glshyperfirst}}% {% \@gls@link[#1,hyper=false]{#2}{\@glo@text}% }% {% \@gls@link[#1]{#2}{\@glo@text}% }% }% % \end{macrocode} % Indicate that this entry has now been used % \begin{macrocode} \glsunset{#2}% }% } % \end{macrocode} %\end{macro} % %\begin{macro}{\@Gls@} % \begin{macrocode} \def\@Gls@#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} \def\@gls@link@opts{#1}% \def\@gls@link@label{#2}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}). The first character of the entry text is % converted to uppercase before passing to % \cs{gls@}\meta{type}"@display" or % \cs{gls@}\meta{type}"@displayfirst" % \begin{macrocode} \ifglsused{#2}% {% \def\@glo@text{\csname gls@\@glo@type @display\endcsname {\glstextaccessdisplay{\Glsentrytext{#2}}{#2}}% {\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}}% {\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}}% {#3}}% }% {% \def\@glo@text{\csname gls@\@glo@type @displayfirst\endcsname {\glsfirstaccessdisplay{\Glsentryfirst{#2}}{#2}}% {\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}}% {\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}}% {#3}}% }% % \end{macrocode} % Call \cs{@gls@link}. % If \pkgopt{footnote} package option has been used, suppress % hyperlink for first use. % \begin{macrocode} \ifglsused{#2}% {% \@gls@link[#1]{#2}{\@glo@text}% }% {% \gls@checkisacronymlist\@glo@type \ifthenelse{\(\boolean{@glsisacronymlist}\AND \boolean{glsacrfootnote}\) \OR\NOT\boolean{glshyperfirst}}% {% \@gls@link[#1,hyper=false]{#2}{\@glo@text}% }% {% \@gls@link[#1]{#2}{\@glo@text}% }% }% % \end{macrocode} % Indicate that this entry has now been used % \begin{macrocode} \glsunset{#2}% }% } % \end{macrocode} %\end{macro} % %\begin{macro}{\@GLS@} % \begin{macrocode} \def\@GLS@#1#2[#3]{% \glsdoifexists{#2}{% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} \def\@gls@link@opts{#1}% \def\@gls@link@label{#2}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}). % \begin{macrocode} \ifglsused{#2}% {% \def\@glo@text{\csname gls@\@glo@type @display\endcsname {\glstextaccessdisplay{\glsentrytext{#2}}{#2}}% {\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}}% {\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}}% {#3}}% }% {% \edef\@glo@text{\csname gls@\@glo@type @displayfirst\endcsname {\glsfirstaccessdisplay{\glsentryfirst{#2}}{#2}}% {\glsdescriptionaccessdisplay{\glsentrydesc{#2}}{#2}}% {\glssymbolaccessdisplay{\glsentrysymbol{#2}}{#2}}% {#3}}% }% % \end{macrocode} % Call \cs{@gls@link} % If \pkgopt{footnote} package option has been used, suppress % hyperlink for first use. %\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to %checking if footnote option has been used} % \begin{macrocode} \ifglsused{#2}% {% \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% }% {% \gls@checkisacronymlist\@glo@type \ifthenelse{\(\boolean{@glsisacronymlist}\AND \boolean{glsacrfootnote}\) \OR\NOT\boolean{glshyperfirst}}{% \@gls@link[#1,hyper=false]{#2}{\MakeUppercase{\@glo@text}}% }% {% \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% }% }% % \end{macrocode} % Indicate that this entry has now been used % \begin{macrocode} \glsunset{#2}% }% } % \end{macrocode} %\end{macro} % %\begin{macro}{\@gls@pl@} % \begin{macrocode} \def\@glspl@#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} \def\@gls@link@opts{#1}% \def\@gls@link@label{#2}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \ifglsused{#2}% {% \def\@glo@text{\csname gls@\@glo@type @display\endcsname {\glspluralaccessdisplay{\glsentryplural{#2}}{#2}}% {\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}}% {\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}}% {#3}}% }% {% \def\@glo@text{\csname gls@\@glo@type @displayfirst\endcsname {\glsfirstpluralaccessdisplay{\glsentryfirstplural{#2}}{#2}}% {\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}}% {\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}}% {#3}}% }% % \end{macrocode} % Call \cs{@gls@link} % If \pkgopt{footnote} package option has been used, suppress % hyperlink for first use. %\changes{1.16}{2008 August 27}{Test glossary type is 'acronymtype in addition to %checking if footnote option has been used} % \begin{macrocode} \ifglsused{#2}% {% \@gls@link[#1]{#2}{\@glo@text}% }% {% \gls@checkisacronymlist\@glo@type \ifthenelse{\(\boolean{@glsisacronymlist}\AND \boolean{glsacrfootnote}\) \OR\NOT\boolean{glshyperfirst}}% {% \@gls@link[#1,hyper=false]{#2}{\@glo@text}% }% {% \@gls@link[#1]{#2}{\@glo@text}% }% }% % \end{macrocode} % Indicate that this entry has now been used % \begin{macrocode} \glsunset{#2}% }% } % \end{macrocode} %\end{macro} % %\begin{macro}{\@Glspl@} % \begin{macrocode} \def\@Glspl@#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} \def\@gls@link@opts{#1}% \def\@gls@link@label{#2}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}). % \begin{macrocode} \ifglsused{#2}% {% \def\@glo@text{\csname gls@\@glo@type @display\endcsname {\glspluralaccessdisplay{\Glsentryplural{#2}}{#2}}% {\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}}% {\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}}% {#3}}% }% {% \def\@glo@text{\csname gls@\@glo@type @displayfirst\endcsname {\glsfirstpluralaccessdisplay{\Glsentryfirstplural{#2}}{#2}}% {\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}}% {\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}}% {#3}}% }% % \end{macrocode} % Call \cs{@gls@link} % If \pkgopt{footnote} package option has been used, suppress % hyperlink for first use. % \begin{macrocode} \ifglsused{#2}% {% \@gls@link[#1]{#2}{\@glo@text}% }% {% \ifthenelse{\equal{\@glo@type}{\acronymtype}\and \boolean{glsacrfootnote}}% {% \@gls@link[#1,hyper=false]{#2}{\@glo@text}% }% {% \@gls@link[#1]{#2}{\@glo@text}% }% }% % \end{macrocode} % Indicate that this entry has now been used % \begin{macrocode} \glsunset{#2}% }% } % \end{macrocode} %\end{macro} % %\begin{macro}{\@GLSpl@} % \begin{macrocode} \def\@GLSpl@#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Save options in \cs{@gls@link@opts} and label in \cs{@gls@link@label} % \begin{macrocode} \def\@gls@link@opts{#1}% \def\@gls@link@label{#2}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \ifglsused{#2}% {% \def\@glo@text{\csname gls@\@glo@type @display\endcsname {\glspluralaccessdisplay{\glsentryplural{#2}}{#2}}% {\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}}% {\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}}% {#3}}% }% {% \def\@glo@text{\csname gls@\@glo@type @displayfirst\endcsname {\glsfirstpluralaccessdisplay{\glsentryfirstplural{#2}}{#2}}% {\glsdescriptionpluralaccessdisplay{\glsentrydescplural{#2}}{#2}}% {\glssymbolpluralaccessdisplay{\glsentrysymbolplural{#2}}{#2}}% {#3}}% }% % \end{macrocode} % Call \cs{@gls@link} % If \pkgopt{footnote} package option has been used, suppress % hyperlink for first use. % \begin{macrocode} \ifglsused{#2}% {% \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% }% {% \gls@checkisacronymlist\@glo@type \ifthenelse{\(\boolean{@glsisacronymlist}\AND \boolean{glsacrfootnote}\)\OR\NOT\boolean{glshyperfirst}}% {% \@gls@link[#1,hyper=false]{#2}{\MakeUppercase{\@glo@text}}% }% {% \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% }% }% % \end{macrocode} % Indicate that this entry has now been used % \begin{macrocode} \glsunset{#2}% }% } % \end{macrocode} %\end{macro} % %\begin{macro}{\@acrshort} % \begin{macrocode} \def\@acrshort#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \def\@glo@text{% \glsshortaccessdisplay{\glsentryshort{#2}}{#2}% }% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\acronymfont{\@glo@text}#3}% }% } % \end{macrocode} %\end{macro} % %\begin{macro}{\@Acrshort} % \begin{macrocode} \def\@Acrshort#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \def\@glo@text{% \glsshortaccessdisplay{\Glsentryshort{#2}}{#2}% }% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\acronymfont{\@glo@text}#3}% }% } % \end{macrocode} %\end{macro} % %\begin{macro}{\@ACRshort} % \begin{macrocode} \def\@ACRshort#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \def\@glo@text{% \glsshortaccessdisplay{\MakeUppercase{\glsentryshort{#2}}}{#2}% }% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\acronymfont{\@glo@text#3}}% }% } % \end{macrocode} %\end{macro} % %\begin{macro}{\@acrlong} % \begin{macrocode} \def\@acrlong#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \def\@glo@text{% \glslongaccessdisplay{\glsentrylong{#2}}{#2}% }% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} %\end{macro} % %\begin{macro}{\@Acrlong} % \begin{macrocode} \def\@Acrlong#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \def\@glo@text{% \glslongaccessdisplay{\Glsentrylong{#2}}{#2}% }% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} %\end{macro} % %\begin{macro}{\@ACRlong} % \begin{macrocode} \def\@ACRlong#1#2[#3]{% \glsdoifexists{#2}% {% \edef\@glo@type{\glsentrytype{#2}}% % \end{macrocode} % Determine what the link text should be (this is stored in % \cs{@glo@text}) % \begin{macrocode} \def\@glo@text{% \glslongaccessdisplay{\MakeUppercase{\glsentrylong{#2}}}{#2}% }% % \end{macrocode} % Call \cs{@gls@link} % \begin{macrocode} \@gls@link[#1]{#2}{\@glo@text#3}% }% } % \end{macrocode} %\end{macro} % %\subsection{Displaying the Glossary} % Entries within the glossary or list of acronyms are now formatted % via \cs{accsuppglossaryentryfield} and % \cs{accsuppglossarysubentryfield}. %\begin{macro}{\@glossaryentryfield} % \begin{macrocode} \ifglsxindy \renewcommand*{\@glossaryentryfield}{% \string\\accsuppglossaryentryfield} \else \renewcommand*{\@glossaryentryfield}{% \string\accsuppglossaryentryfield} \fi % \end{macrocode} %\end{macro} %\begin{macro}{\@glossarysubentryfield} % \begin{macrocode} \ifglsxindy \renewcommand*{\@glossarysubentryfield}{% \string\\accsuppglossarysubentryfield} \else \renewcommand*{\@glossarysubentryfield}{% \string\accsuppglossarysubentryfield} \fi % \end{macrocode} %\end{macro} %\begin{macro}{\accsuppglossaryentryfield} % \begin{macrocode} \newcommand*{\accsuppglossaryentryfield}[5]{% \glossaryentryfield{#1}% {\glsnameaccessdisplay{#2}{#1}}% {\glsdescriptionaccessdisplay{#3}{#1}}% {\glssymbolaccessdisplay{#4}{#1}}{#5}% } % \end{macrocode} %\end{macro} %\begin{macro}{\accsuppglossarysubentryfield} % \begin{macrocode} \newcommand*{\accsuppglossarysubentryfield}[6]{% \glossaryentryfield{#1}{#2}% {\glsnameaccessdisplay{#3}{#2}}% {\glsdescriptionaccessdisplay{#4}{#2}}% {\glssymbolaccessdisplay{#5}{#2}}{#6}% } % \end{macrocode} %\end{macro} % %\subsection{Acronyms} % Use \cs{newacronymhook} to modify the key list to set % the access text to the long version by default. % \begin{macrocode} \renewcommand*{\newacronymhook}{% \edef\@gls@keylist{shortaccess=\the\glslongtok,% \the\glskeylisttok}% \expandafter\glskeylisttok\expandafter{\@gls@keylist}% } % \end{macrocode} %\begin{macro}{\DefaultNewAcronymDef} % Modify default style to use access text: % \begin{macrocode} \renewcommand*{\DefaultNewAcronymDef}{% \edef\@do@newglossaryentry{% \noexpand\newglossaryentry{\the\glslabeltok}% {% type=\acronymtype,% name={\the\glsshorttok},% description={\the\glslongtok},% descriptionaccess=\relax, text={\the\glsshorttok},% access={\noexpand\@glo@textaccess},% sort={\the\glsshorttok},% short={\the\glsshorttok},% shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% shortaccess={\the\glslongtok},% long={\the\glslongtok},% longplural={\the\glslongtok\noexpand\acrpluralsuffix},% descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},% first={\noexpand\glslongaccessdisplay {\the\glslongtok}{\the\glslabeltok}\space (\noexpand\glsshortaccessdisplay {\the\glsshorttok}{\the\glslabeltok})},% plural={\the\glsshorttok\acrpluralsuffix},% firstplural={\noexpand\glslongpluralaccessdisplay {\noexpand\@glo@longpl}{\the\glslabeltok}\space (\noexpand\glsshortpluralaccessdisplay {\noexpand\@glo@shortpl}{\the\glslabeltok})},% firstaccess=\relax, firstpluralaccess=\relax, textaccess={\noexpand\@glo@shortaccess},% \the\glskeylisttok }% }% \@do@newglossaryentry } % \end{macrocode} %\end{macro} %\begin{macro}{\DescriptionFootnoteNewAcronymDef} % \begin{macrocode} \renewcommand*{\DescriptionFootnoteNewAcronymDef}{% \edef\@do@newglossaryentry{% \noexpand\newglossaryentry{\the\glslabeltok}% {% type=\acronymtype,% name={\noexpand\acronymfont{\the\glsshorttok}},% sort={\the\glsshorttok},% text={\the\glsshorttok},% short={\the\glsshorttok},% shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% shortaccess={\the\glslongtok},% long={\the\glslongtok},% longplural={\the\glslongtok\noexpand\acrpluralsuffix},% access={\noexpand\@glo@textaccess},% plural={\the\glsshorttok\noexpand\acrpluralsuffix},% symbol={\the\glslongtok},% symbolplural={\the\glslongtok\noexpand\acrpluralsuffix},% firstpluralaccess=\relax, textaccess={\noexpand\@glo@shortaccess},% \the\glskeylisttok }% }% \@do@newglossaryentry } % \end{macrocode} %\end{macro} %\begin{macro}{\DescriptionNewAcronymDef} % \begin{macrocode} \renewcommand*{\DescriptionNewAcronymDef}{% \edef\@do@newglossaryentry{% \noexpand\newglossaryentry{\the\glslabeltok}% {% type=\acronymtype,% name={\noexpand \acrnameformat{\the\glsshorttok}{\the\glslongtok}},% access={\noexpand\@glo@textaccess},% sort={\the\glsshorttok},% short={\the\glsshorttok},% shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% shortaccess={\the\glslongtok},% long={\the\glslongtok},% longplural={\the\glslongtok\noexpand\acrpluralsuffix},% first={\the\glslongtok},% firstaccess=\relax, firstplural={\the\glslongtok\noexpand\acrpluralsuffix},% text={\the\glsshorttok},% textaccess={\the\glslongtok},% plural={\the\glsshorttok\noexpand\acrpluralsuffix},% symbol={\noexpand\@glo@text},% symbolaccess={\noexpand\@glo@textaccess},% symbolplural={\noexpand\@glo@plural},% firstpluralaccess=\relax, textaccess={\noexpand\@glo@shortaccess},% \the\glskeylisttok}% }% \@do@newglossaryentry } % \end{macrocode} %\end{macro} %\begin{macro}{\FootnoteNewAcronymDef} % \begin{macrocode} \renewcommand*{\FootnoteNewAcronymDef}{% \edef\@do@newglossaryentry{% \noexpand\newglossaryentry{\the\glslabeltok}% {% type=\acronymtype,% name={\noexpand\acronymfont{\the\glsshorttok}},% sort={\the\glsshorttok},% text={\the\glsshorttok},% textaccess={\the\glslongtok},% access={\noexpand\@glo@textaccess},% plural={\the\glsshorttok\noexpand\acrpluralsuffix},% short={\the\glsshorttok},% shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% long={\the\glslongtok},% longplural={\the\glslongtok\noexpand\acrpluralsuffix},% description={\the\glslongtok},% descriptionplural={\the\glslongtok\noexpand\acrpluralsuffix},% \the\glskeylisttok }% }% \@do@newglossaryentry } % \end{macrocode} %\end{macro} %\begin{macro}{\SmallNewAcronymDef} % \begin{macrocode} \renewcommand*{\SmallNewAcronymDef}{% \edef\@do@newglossaryentry{% \noexpand\newglossaryentry{\the\glslabeltok}% {% type=\acronymtype,% name={\noexpand\acronymfont{\the\glsshorttok}},% access={\noexpand\@glo@symbolaccess},% sort={\the\glsshorttok},% short={\the\glsshorttok},% shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},% shortaccess={\the\glslongtok},% long={\the\glslongtok},% longplural={\the\glslongtok\noexpand\acrpluralsuffix},% text={\noexpand\@glo@short},% textaccess={\noexpand\@glo@shortaccess},% plural={\noexpand\@glo@shortpl},% first={\the\glslongtok},% firstaccess=\relax, firstplural={\the\glslongtok\noexpand\acrpluralsuffix},% description={\noexpand\@glo@first},% descriptionplural={\noexpand\@glo@firstplural},% symbol={\the\glsshorttok},% symbolaccess={\the\glslongtok},% symbolplural={\the\glsshorttok\noexpand\acrpluralsuffix},% \the\glskeylisttok }% }% \@do@newglossaryentry } % \end{macrocode} %\end{macro} % % The following are kept for compatibility with versions before % 3.0: %\begin{macro}{\glsshortaccesskey} % \begin{macrocode} \newcommand*{\glsshortaccesskey}{\glsshortkey access}% % \end{macrocode} %\end{macro} %\begin{macro}{\glsshortpluralaccesskey} % \begin{macrocode} \newcommand*{\glsshortpluralaccesskey}{\glsshortpluralkey access}% % \end{macrocode} %\end{macro} %\begin{macro}{\glslongaccesskey} % \begin{macrocode} \newcommand*{\glslongaccesskey}{\glslongkey access}% % \end{macrocode} %\end{macro} %\begin{macro}{\glslongpluralaccesskey} % \begin{macrocode} \newcommand*{\glslongpluralaccesskey}{\glslongpluralkey access}% % \end{macrocode} %\end{macro} %\subsection{Debugging Commands} % %\begin{macro}{\showglonameaccess} % \begin{macrocode} \newcommand*{\showglonameaccess}[1]{% \expandafter\show\csname glo@#1@textaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglotextaccess} % \begin{macrocode} \newcommand*{\showglotextaccess}[1]{% \expandafter\show\csname glo@#1@textaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglopluralaccess} % \begin{macrocode} \newcommand*{\showglopluralaccess}[1]{% \expandafter\show\csname glo@#1@pluralaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglofirstaccess} % \begin{macrocode} \newcommand*{\showglofirstaccess}[1]{% \expandafter\show\csname glo@#1@firstaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglofirstpluralaccess} % \begin{macrocode} \newcommand*{\showglofirstpluralaccess}[1]{% \expandafter\show\csname glo@#1@firstpluralaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglosymbolaccess} % \begin{macrocode} \newcommand*{\showglosymbolaccess}[1]{% \expandafter\show\csname glo@#1@symbolaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglosymbolpluralaccess} % \begin{macrocode} \newcommand*{\showglosymbolpluralaccess}[1]{% \expandafter\show\csname glo@#1@symbolpluralaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglodescaccess} % \begin{macrocode} \newcommand*{\showglodescaccess}[1]{% \expandafter\show\csname glo@#1@descaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglodescpluralaccess} % \begin{macrocode} \newcommand*{\showglodescpluralaccess}[1]{% \expandafter\show\csname glo@#1@descpluralaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showgloshortaccess} % \begin{macrocode} \newcommand*{\showgloshortaccess}[1]{% \expandafter\show\csname glo@#1@shortaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showgloshortpluralaccess} % \begin{macrocode} \newcommand*{\showgloshortpluralaccess}[1]{% \expandafter\show\csname glo@#1@shortpluralaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglolongaccess} % \begin{macrocode} \newcommand*{\showglolongaccess}[1]{% \expandafter\show\csname glo@#1@longaccess\endcsname } % \end{macrocode} %\end{macro} %\begin{macro}{\showglolongpluralaccess} % \begin{macrocode} \newcommand*{\showglolongpluralaccess}[1]{% \expandafter\show\csname glo@#1@longpluralaccess\endcsname } % \end{macrocode} %\end{macro} %\iffalse % \begin{macrocode} % % \end{macrocode} %\fi %\iffalse % \begin{macrocode} %<*glossaries-babel.sty> % \end{macrocode} %\fi %\section{Multi-Lingual Support} % Many thanks to everyone who contributed to the translations both % via email and on comp.text.tex. %\subsection{Babel Captions} % Define \isty{babel} captions if multi-lingual % support is required, but the \isty{translator} package is not loaded. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{glossaries-babel}[2009/04/16 v1.2 (NLCT)] % \end{macrocode} % English: % \begin{macrocode} \@ifundefined{captionsenglish}{}{% \addto\captionsenglish{% \renewcommand*{\glossaryname}{Glossary}% \renewcommand*{\acronymname}{Acronyms}% \renewcommand*{\entryname}{Notation}% \renewcommand*{\descriptionname}{Description}% \renewcommand*{\symbolname}{Symbol}% \renewcommand*{\pagelistname}{Page List}% \renewcommand*{\glssymbolsgroupname}{Symbols}% \renewcommand*{\glsnumbersgroupname}{Numbers}% }% } \@ifundefined{captionsamerican}{}{% \addto\captionsamerican{% \renewcommand*{\glossaryname}{Glossary}% \renewcommand*{\acronymname}{Acronyms}% \renewcommand*{\entryname}{Notation}% \renewcommand*{\descriptionname}{Description}% \renewcommand*{\symbolname}{Symbol}% \renewcommand*{\pagelistname}{Page List}% \renewcommand*{\glssymbolsgroupname}{Symbols}% \renewcommand*{\glsnumbersgroupname}{Numbers}% }% } \@ifundefined{captionsaustralian}{}{% \addto\captionsaustralian{% \renewcommand*{\glossaryname}{Glossary}% \renewcommand*{\acronymname}{Acronyms}% \renewcommand*{\entryname}{Notation}% \renewcommand*{\descriptionname}{Description}% \renewcommand*{\symbolname}{Symbol}% \renewcommand*{\pagelistname}{Page List}% \renewcommand*{\glssymbolsgroupname}{Symbols}% \renewcommand*{\glsnumbersgroupname}{Numbers}% }% } \@ifundefined{captionsbritish}{}{% \addto\captionsbritish{% \renewcommand*{\glossaryname}{Glossary}% \renewcommand*{\acronymname}{Acronyms}% \renewcommand*{\entryname}{Notation}% \renewcommand*{\descriptionname}{Description}% \renewcommand*{\symbolname}{Symbol}% \renewcommand*{\pagelistname}{Page List}% \renewcommand*{\glssymbolsgroupname}{Symbols}% \renewcommand*{\glsnumbersgroupname}{Numbers}% }}% \@ifundefined{captionscanadian}{}{% \addto\captionscanadian{% \renewcommand*{\glossaryname}{Glossary}% \renewcommand*{\acronymname}{Acronyms}% \renewcommand*{\entryname}{Notation}% \renewcommand*{\descriptionname}{Description}% \renewcommand*{\symbolname}{Symbol}% \renewcommand*{\pagelistname}{Page List}% \renewcommand*{\glssymbolsgroupname}{Symbols}% \renewcommand*{\glsnumbersgroupname}{Numbers}% }% } \@ifundefined{captionsnewzealand}{}{% \addto\captionsnewzealand{% \renewcommand*{\glossaryname}{Glossary}% \renewcommand*{\acronymname}{Acronyms}% \renewcommand*{\entryname}{Notation}% \renewcommand*{\descriptionname}{Description}% \renewcommand*{\symbolname}{Symbol}% \renewcommand*{\pagelistname}{Page List}% \renewcommand*{\glssymbolsgroupname}{Symbols}% \renewcommand*{\glsnumbersgroupname}{Numbers}% }% } \@ifundefined{captionsUKenglish}{}{% \addto\captionsUKenglish{% \renewcommand*{\glossaryname}{Glossary}% \renewcommand*{\acronymname}{Acronyms}% \renewcommand*{\entryname}{Notation}% \renewcommand*{\descriptionname}{Description}% \renewcommand*{\symbolname}{Symbol}% \renewcommand*{\pagelistname}{Page List}% \renewcommand*{\glssymbolsgroupname}{Symbols}% \renewcommand*{\glsnumbersgroupname}{Numbers}% }% } \@ifundefined{captionsUSenglish}{}{% \addto\captionsUSenglish{% \renewcommand*{\glossaryname}{Glossary}% \renewcommand*{\acronymname}{Acronyms}% \renewcommand*{\entryname}{Notation}% \renewcommand*{\descriptionname}{Description}% \renewcommand*{\symbolname}{Symbol}% \renewcommand*{\pagelistname}{Page List}% \renewcommand*{\glssymbolsgroupname}{Symbols}% \renewcommand*{\glsnumbersgroupname}{Numbers}% }% } % \end{macrocode} % German (quite a few variations were suggested for German; % I settled on the following): % \begin{macrocode} \@ifundefined{captionsgerman}{}{% \addto\captionsgerman{% \renewcommand*{\glossaryname}{Glossar}% \renewcommand*{\acronymname}{Akronyme}% \renewcommand*{\entryname}{Bezeichnung}% \renewcommand*{\descriptionname}{Beschreibung}% \renewcommand*{\symbolname}{Symbol}% \renewcommand*{\pagelistname}{Seiten}% \renewcommand*{\glssymbolsgroupname}{Symbole}% \renewcommand*{\glsnumbersgroupname}{Zahlen}} } % \end{macrocode} % ngerman is identical to German: %\changes{1.2}{2009 April 16}{fixed bug in ngerman captions} % \begin{macrocode} \@ifundefined{captionsngerman}{}{% \addto\captionsngerman{% \renewcommand*{\glossaryname}{Glossar}% \renewcommand*{\acronymname}{Akronyme}% \renewcommand*{\entryname}{Bezeichnung}% \renewcommand*{\descriptionname}{Beschreibung}% \renewcommand*{\symbolname}{Symbol}% \renewcommand*{\pagelistname}{Seiten}% \renewcommand*{\glssymbolsgroupname}{Symbole}% \renewcommand*{\glsnumbersgroupname}{Zahlen}} } % \end{macrocode} % Italian: % \begin{macrocode} \@ifundefined{captionsitalian}{}{% \addto\captionsitalian{% \renewcommand*{\glossaryname}{Glossario}% \renewcommand*{\acronymname}{Acronimi}% \renewcommand*{\entryname}{Nomenclatura}% \renewcommand*{\descriptionname}{Descrizione}% \renewcommand*{\symbolname}{Simbolo}% \renewcommand*{\pagelistname}{Elenco delle pagine}% \renewcommand*{\glssymbolsgroupname}{Simboli}% \renewcommand*{\glsnumbersgroupname}{Numeri}} } % \end{macrocode} % Dutch: % \begin{macrocode} \@ifundefined{captionsdutch}{}{% \addto\captionsdutch{% \renewcommand*{\glossaryname}{Woordenlijst}% \renewcommand*{\acronymname}{Acroniemen}% \renewcommand*{\entryname}{Benaming}% \renewcommand*{\descriptionname}{Beschrijving}% \renewcommand*{\symbolname}{Symbool}% \renewcommand*{\pagelistname}{Pagina's}% \renewcommand*{\glssymbolsgroupname}{Symbolen}% \renewcommand*{\glsnumbersgroupname}{Cijfers}} } % \end{macrocode} % Spanish: % \begin{macrocode} \@ifundefined{captionsspanish}{}{% \addto\captionsspanish{% \renewcommand*{\glossaryname}{Glosario}% \renewcommand*{\acronymname}{Siglas}% \renewcommand*{\entryname}{Entrada}% \renewcommand*{\descriptionname}{Descripci\'on}% \renewcommand*{\symbolname}{S\'{\i}mbolo}% \renewcommand*{\pagelistname}{Lista de p\'aginas}% \renewcommand*{\glssymbolsgroupname}{S\'{\i}mbolos}% \renewcommand*{\glsnumbersgroupname}{N\'umeros}} } % \end{macrocode} % French: % \begin{macrocode} \@ifundefined{captionsfrench}{}{% \addto\captionsfrench{% \renewcommand*{\glossaryname}{Glossaire}% \renewcommand*{\acronymname}{Acronymes}% \renewcommand*{\entryname}{Terme}% \renewcommand*{\descriptionname}{Description}% \renewcommand*{\symbolname}{Symbole}% \renewcommand*{\pagelistname}{Pages}% \renewcommand*{\glssymbolsgroupname}{Symboles}% \renewcommand*{\glsnumbersgroupname}{Nombres}} } \@ifundefined{captionsfrenchb}{}{% \addto\captionsfrenchb{% \renewcommand*{\glossaryname}{Glossaire}% \renewcommand*{\acronymname}{Acronymes}% \renewcommand*{\entryname}{Terme}% \renewcommand*{\descriptionname}{Description}% \renewcommand*{\symbolname}{Symbole}% \renewcommand*{\pagelistname}{Pages}% \renewcommand*{\glssymbolsgroupname}{Symboles}% \renewcommand*{\glsnumbersgroupname}{Nombres}} } \@ifundefined{captionsfrancais}{}{% \addto\captionsfrancais{% \renewcommand*{\glossaryname}{Glossaire}% \renewcommand*{\acronymname}{Acronymes}% \renewcommand*{\entryname}{Terme}% \renewcommand*{\descriptionname}{Description}% \renewcommand*{\symbolname}{Symbole}% \renewcommand*{\pagelistname}{Pages}% \renewcommand*{\glssymbolsgroupname}{Symboles}% \renewcommand*{\glsnumbersgroupname}{Nombres}} } % \end{macrocode} % Danish: % \begin{macrocode} \@ifundefined{captionsdanish}{}{% \addto\captionsdanish{% \renewcommand*{\glossaryname}{Ordliste}% \renewcommand*{\acronymname}{Akronymer}% \renewcommand*{\entryname}{Symbolforklaring}% \renewcommand*{\descriptionname}{Beskrivelse}% \renewcommand*{\symbolname}{Symbol}% \renewcommand*{\pagelistname}{Side}% \renewcommand*{\glssymbolsgroupname}{Symboler}% \renewcommand*{\glsnumbersgroupname}{Tal}} } % \end{macrocode} % Irish: % \begin{macrocode} \@ifundefined{captionsirish}{}{% \addto\captionsirish{% \renewcommand*{\glossaryname}{Gluais}% \renewcommand*{\acronymname}{Acrainmneacha}% % \end{macrocode} % wasn't sure whether to go for N\'ota (Note), Ciall (`Meaning', % `sense') or Br\'{\i} (`Meaning'). In the end I chose Ciall. % \begin{macrocode} \renewcommand*{\entryname}{Ciall}% \renewcommand*{\descriptionname}{Tuairisc}% % \end{macrocode} % Again, not sure whether to use Comhartha/Comhartha\'{\i} or % Siombail/Siombaile, so have chosen the former. % \begin{macrocode} \renewcommand*{\symbolname}{Comhartha}% \renewcommand*{\glssymbolsgroupname}{Comhartha\'{\i}}% \renewcommand*{\pagelistname}{Leathanaigh}% \renewcommand*{\glsnumbersgroupname}{Uimhreacha}} } % \end{macrocode} % Hungarian: % \begin{macrocode} \@ifundefined{captionsmagyar}{}{% \addto\captionsmagyar{% \renewcommand*{\glossaryname}{Sz\'ojegyz\'ek}% \renewcommand*{\acronymname}{Bet\H uszavak}% \renewcommand*{\entryname}{Kifejez\'es}% \renewcommand*{\descriptionname}{Magyar\'azat}% \renewcommand*{\symbolname}{Jel\"ol\'es}% \renewcommand*{\pagelistname}{Oldalsz\'am}% \renewcommand*{\glssymbolsgroupname}{Jelek}% \renewcommand*{\glsnumbersgroupname}{Sz\'amjegyek}% } } \@ifundefined{captionshungarian}{}{% \addto\captionshungarian{% \renewcommand*{\glossaryname}{Sz\'ojegyz\'ek}% \renewcommand*{\acronymname}{Bet\H uszavak}% \renewcommand*{\entryname}{Kifejez\'es}% \renewcommand*{\descriptionname}{Magyar\'azat}% \renewcommand*{\symbolname}{Jel\"ol\'es}% \renewcommand*{\pagelistname}{Oldalsz\'am}% \renewcommand*{\glssymbolsgroupname}{Jelek}% \renewcommand*{\glsnumbersgroupname}{Sz\'amjegyek}% } } % \end{macrocode} % Polish % \changes{1.13}{2008 May 10}{Add Polish support} % \begin{macrocode} \@ifundefined{captionspolish}{}{% \addto\captionspolish{% \renewcommand*{\glossaryname}{S{\l}ownik termin\'ow}% \renewcommand*{\acronymname}{Skr\'ot}% \renewcommand*{\entryname}{Termin}% \renewcommand*{\descriptionname}{Opis}% \renewcommand*{\symbolname}{Symbol}% \renewcommand*{\pagelistname}{Strony}% \renewcommand*{\glssymbolsgroupname}{Symbole}% \renewcommand*{\glsnumbersgroupname}{Liczby}} } % \end{macrocode} % Brazilian %\changes{1.17}{2008 December 11}{Added Brazilian support} % \begin{macrocode} \@ifundefined{captionsbrazil}{}{% \addto\captionsbrazil{% \renewcommand*{\glossaryname}{Gloss\'ario}% \renewcommand*{\acronymname}{Siglas}% \renewcommand*{\entryname}{Nota\c c\~ao}% \renewcommand*{\descriptionname}{Descri\c c\~ao}% \renewcommand*{\symbolname}{S\'imbolo}% \renewcommand*{\pagelistname}{Lista de P\'aginas}% \renewcommand*{\glssymbolsgroupname}{S\'imbolos}% \renewcommand*{\glsnumbersgroupname}{N\'umeros}% }% } % \end{macrocode} %\iffalse % \begin{macrocode} % % \end{macrocode} %\fi %\iffalse % \begin{macrocode} %<*glossaries-polyglossia.sty> % \end{macrocode} %\fi %\subsection{Polyglossia Captions} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{glossaries-polyglossia}[2009/11/09 v1.0 (NLCT)] % \end{macrocode} % English: % \begin{macrocode} \@ifundefined{captionsenglish}{}{% \expandafter\toks@\expandafter{\captionsenglish \renewcommand*{\glossaryname}{\textenglish{Glossary}}% \renewcommand*{\acronymname}{\textenglish{Acronyms}}% \renewcommand*{\entryname}{\textenglish{Notation}}% \renewcommand*{\descriptionname}{\textenglish{Description}}% \renewcommand*{\symbolname}{\textenglish{Symbol}}% \renewcommand*{\pagelistname}{\textenglish{Page List}}% \renewcommand*{\glssymbolsgroupname}{\textenglish{Symbols}}% \renewcommand*{\glsnumbersgroupname}{\textenglish{Numbers}}% }% \edef\captionsenglish{\the\toks@}% } % \end{macrocode} % German: % \begin{macrocode} \@ifundefined{captionsgerman}{}{% \expandafter\toks@\expandafter{\captionsgerman \renewcommand*{\glossaryname}{\textgerman{Glossar}}% \renewcommand*{\acronymname}{\textgerman{Akronyme}}% \renewcommand*{\entryname}{\textgerman{Bezeichnung}}% \renewcommand*{\descriptionname}{\textgerman{Beschreibung}}% \renewcommand*{\symbolname}{\textgerman{Symbol}}% \renewcommand*{\pagelistname}{\textgerman{Seiten}}% \renewcommand*{\glssymbolsgroupname}{\textgerman{Symbole}}% \renewcommand*{\glsnumbersgroupname}{\textgerman{Zahlen}}% }% \edef\captionsgerman{\the\toks@}% } % \end{macrocode} % Italian: % \begin{macrocode} \@ifundefined{captionsitalian}{}{% \expandafter\toks@\expandafter{\captionsitalian \renewcommand*{\glossaryname}{\textitalian{Glossario}}% \renewcommand*{\acronymname}{\textitalian{Acronimi}}% \renewcommand*{\entryname}{\textitalian{Nomenclatura}}% \renewcommand*{\descriptionname}{\textitalian{Descrizione}}% \renewcommand*{\symbolname}{\textitalian{Simbolo}}% \renewcommand*{\pagelistname}{\textitalian{Elenco delle pagine}}% \renewcommand*{\glssymbolsgroupname}{\textitalian{Simboli}}% \renewcommand*{\glsnumbersgroupname}{\textitalian{Numeri}}% }% \edef\captionsitalian{\the\toks@}% } % \end{macrocode} % Dutch: % \begin{macrocode} \@ifundefined{captionsdutch}{}{% \expandafter\toks@\expandafter{\captionsdutch \renewcommand*{\glossaryname}{\textdutch{Woordenlijst}}% \renewcommand*{\acronymname}{\textdutch{Acroniemen}}% \renewcommand*{\entryname}{\textdutch{Benaming}}% \renewcommand*{\descriptionname}{\textdutch{Beschrijving}}% \renewcommand*{\symbolname}{\textdutch{Symbool}}% \renewcommand*{\pagelistname}{\textdutch{Pagina's}}% \renewcommand*{\glssymbolsgroupname}{\textdutch{Symbolen}}% \renewcommand*{\glsnumbersgroupname}{\textdutch{Cijfers}}% }% \edef\captionsdutch{\the\toks@}% } % \end{macrocode} % Spanish: % \begin{macrocode} \@ifundefined{captionsspanish}{}{% \expandafter\toks@\expandafter{\captionsspanish \renewcommand*{\glossaryname}{\textspanish{Glosario}}% \renewcommand*{\acronymname}{\textspanish{Siglas}}% \renewcommand*{\entryname}{\textspanish{Entrada}}% \renewcommand*{\descriptionname}{\textspanish{Descripci\'on}}% \renewcommand*{\symbolname}{\textspanish{S\'{\i}mbolo}}% \renewcommand*{\pagelistname}{\textspanish{Lista de p\'aginas}}% \renewcommand*{\glssymbolsgroupname}{\textspanish{S\'{\i}mbolos}}% \renewcommand*{\glsnumbersgroupname}{\textspanish{N\'umeros}}% }% \edef\captionsspanish{\the\toks@}% } % \end{macrocode} % French: % \begin{macrocode} \@ifundefined{captionsfrench}{}{% \expandafter\toks@\expandafter{\captionsfrench \renewcommand*{\glossaryname}{\textfrench{Glossaire}}% \renewcommand*{\acronymname}{\textfrench{Acronymes}}% \renewcommand*{\entryname}{\textfrench{Terme}}% \renewcommand*{\descriptionname}{\textfrench{Description}}% \renewcommand*{\symbolname}{\textfrench{Symbole}}% \renewcommand*{\pagelistname}{\textfrench{Pages}}% \renewcommand*{\glssymbolsgroupname}{\textfrench{Symboles}}% \renewcommand*{\glsnumbersgroupname}{\textfrench{Nombres}}% }% \edef\captionsfrench{\the\toks@}% } % \end{macrocode} % Danish: % \begin{macrocode} \@ifundefined{captionsdanish}{}{% \expandafter\toks@\expandafter{\captionsdanish \renewcommand*{\glossaryname}{\textdanish{Ordliste}}% \renewcommand*{\acronymname}{\textdanish{Akronymer}}% \renewcommand*{\entryname}{\textdanish{Symbolforklaring}}% \renewcommand*{\descriptionname}{\textdanish{Beskrivelse}}% \renewcommand*{\symbolname}{\textdanish{Symbol}}% \renewcommand*{\pagelistname}{\textdanish{Side}}% \renewcommand*{\glssymbolsgroupname}{\textdanish{Symboler}}% \renewcommand*{\glsnumbersgroupname}{\textdanish{Tal}}% }% \edef\captionsdanish{\the\toks@}% } % \end{macrocode} % Irish: % \begin{macrocode} \@ifundefined{captionsirish}{}{% \expandafter\toks@\expandafter{\captionsirish \renewcommand*{\glossaryname}{\textirish{Gluais}}% \renewcommand*{\acronymname}{\textirish{Acrainmneacha}}% \renewcommand*{\entryname}{\textirish{Ciall}}% \renewcommand*{\descriptionname}{\textirish{Tuairisc}}% \renewcommand*{\symbolname}{\textirish{Comhartha}}% \renewcommand*{\glssymbolsgroupname}{\textirish{Comhartha\'{\i}}}% \renewcommand*{\pagelistname}{\textirish{Leathanaigh}}% \renewcommand*{\glsnumbersgroupname}{\textirish{Uimhreacha}}% }% \edef\captionsirish{\the\toks@}% } % \end{macrocode} % Hungarian: % \begin{macrocode} \@ifundefined{captionsmagyar}{}{% \expandafter\toks@\expandafter{\captionsmagyar \renewcommand*{\glossaryname}{\textmagyar{Sz\'ojegyz\'ek}}% \renewcommand*{\acronymname}{\textmagyar{Bet\H uszavak}}% \renewcommand*{\entryname}{\textmagyar{Kifejez\'es}}% \renewcommand*{\descriptionname}{\textmagyar{Magyar\'azat}}% \renewcommand*{\symbolname}{\textmagyar{Jel\"ol\'es}}% \renewcommand*{\pagelistname}{\textmagyar{Oldalsz\'am}}% \renewcommand*{\glssymbolsgroupname}{\textmagyar{Jelek}}% \renewcommand*{\glsnumbersgroupname}{\textmagyar{Sz\'amjegyek}}% }% \edef\captionsmagyar{\the\toks@}% } % \end{macrocode} % Polish % \changes{1.13}{2008 May 10}{Add Polish support} % \begin{macrocode} \@ifundefined{captionspolish}{}{% \expandafter\toks@\expandafter{\captionspolish \renewcommand*{\glossaryname}{\textpolish{S{\l}ownik termin\'ow}}% \renewcommand*{\acronymname}{\textpolish{Skr\'ot}}% \renewcommand*{\entryname}{\textpolish{Termin}}% \renewcommand*{\descriptionname}{\textpolish{Opis}}% \renewcommand*{\symbolname}{\textpolish{Symbol}}% \renewcommand*{\pagelistname}{\textpolish{Strony}}% \renewcommand*{\glssymbolsgroupname}{\textpolish{Symbole}}% \renewcommand*{\glsnumbersgroupname}{\textpolish{Liczby}}% }% \edef\captionspolish{\the\toks@}% } % \end{macrocode} % Portugues % \begin{macrocode} \@ifundefined{captionsportuges}{}{% \expandafter\toks@\expandafter{\captionsportuges \renewcommand*{\glossaryname}{\textportuges{Gloss\'ario}}% \renewcommand*{\acronymname}{\textportuges{Siglas}}% \renewcommand*{\entryname}{\textportuges{Nota\c c\~ao}}% \renewcommand*{\descriptionname}{\textportuges{Descri\c c\~ao}}% \renewcommand*{\symbolname}{\textportuges{S\'imbolo}}% \renewcommand*{\pagelistname}{\textportuges{Lista de P\'aginas}}% \renewcommand*{\glssymbolsgroupname}{\textportuges{S\'imbolos}}% \renewcommand*{\glsnumbersgroupname}{\textportuges{N\'umeros}}% }% \edef\captionsportuges{\the\toks@}% } % \end{macrocode} %\iffalse % \begin{macrocode} % % \end{macrocode} %\fi %\iffalse % \begin{macrocode} %<*glossaries-dictionary-Brazilian.dict> % \end{macrocode} %\fi %\subsection{Brazilian Dictionary} % This is a dictionary file provided by Thiago de~Melo for % use with the \isty{translator} package. %\changes{1.17}{2008 November 17}{added Brazilian dictionary} %\changes{2.02}{2009 July 13}{Changed Brazil to Brazilian} % \begin{macrocode} \ProvidesDictionary{glossaries-dictionary}{Brazilian} % \end{macrocode} % Provide Brazilian translations: % \begin{macrocode} \providetranslation{Glossary}{Gloss\'ario} \providetranslation{Acronyms}{Siglas} \providetranslation{Notation (glossaries)}{Nota\c c\~ao} \providetranslation{Description (glossaries)}{Descri\c c\~ao} \providetranslation{Symbol (glossaries)}{S\'imbolo} \providetranslation{Page List (glossaries)}{Lista de P\'aginas} \providetranslation{Symbols (glossaries)}{S\'imbolos} \providetranslation{Numbers (glossaries)}{N\'umeros} % \end{macrocode} %\iffalse % \begin{macrocode} % % \end{macrocode} %\fi %\iffalse % \begin{macrocode} %<*glossaries-dictionary-Danish.dict> % \end{macrocode} %\fi %\subsection{Danish Dictionary} % This is a dictionary file provided for use with the \isty{translator} % package. % \begin{macrocode} \ProvidesDictionary{glossaries-dictionary}{Danish} % \end{macrocode} % Provide Danish translations: % \begin{macrocode} \providetranslation{Glossary}{Ordliste} \providetranslation{Acronyms}{Akronymer} \providetranslation{Notation (glossaries)}{Symbolforklaring} \providetranslation{Description (glossaries)}{Beskrivelse} \providetranslation{Symbol (glossaries)}{Symbol} \providetranslation{Page List (glossaries)}{Side} \providetranslation{Symbols (glossaries)}{Symboler} \providetranslation{Numbers (glossaries)}{Tal} % \end{macrocode} %\iffalse % \begin{macrocode} % % \end{macrocode} %\fi %\iffalse % \begin{macrocode} %<*glossaries-dictionary-Dutch.dict> % \end{macrocode} %\fi %\subsection{Dutch Dictionary} % This is a dictionary file provided for use with the \isty{translator} % package. % \begin{macrocode} \ProvidesDictionary{glossaries-dictionary}{Dutch} % \end{macrocode} % Provide Dutch translations: % \begin{macrocode} \providetranslation{Glossary}{Woordenlijst} \providetranslation{Acronyms}{Acroniemen} \providetranslation{Notation (glossaries)}{Benaming} \providetranslation{Description (glossaries)}{Beschrijving} \providetranslation{Symbol (glossaries)}{Symbool} \providetranslation{Page List (glossaries)}{Pagina's} \providetranslation{Symbols (glossaries)}{Symbolen} \providetranslation{Numbers (glossaries)}{Cijfers} % \end{macrocode} %\iffalse % \begin{macrocode} % % \end{macrocode} %\fi %\iffalse % \begin{macrocode} %<*glossaries-dictionary-English.dict> % \end{macrocode} %\fi %\subsection{English Dictionary} % This is a dictionary file provided for use with the \isty{translator} % package. % \begin{macrocode} \ProvidesDictionary{glossaries-dictionary}{English} % \end{macrocode} % Provide English translations: % \begin{macrocode} \providetranslation{Glossary}{Glossary} \providetranslation{Acronyms}{Acronyms} \providetranslation{Notation (glossaries)}{Notation} \providetranslation{Description (glossaries)}{Description} \providetranslation{Symbol (glossaries)}{Symbol} \providetranslation{Page List (glossaries)}{Page List} \providetranslation{Symbols (glossaries)}{Symbols} \providetranslation{Numbers (glossaries)}{Numbers} % \end{macrocode} %\iffalse % \begin{macrocode} % % \end{macrocode} %\fi %\iffalse % \begin{macrocode} %<*glossaries-dictionary-French.dict> % \end{macrocode} %\fi %\subsection{French Dictionary} % This is a dictionary file provided for use with the \isty{translator} % package. % \begin{macrocode} \ProvidesDictionary{glossaries-dictionary}{French} % \end{macrocode} % Provide French translations: % \begin{macrocode} \providetranslation{Glossary}{Glossaire} \providetranslation{Acronyms}{Acronymes} \providetranslation{Notation (glossaries)}{Terme} \providetranslation{Description (glossaries)}{Description} \providetranslation{Symbol (glossaries)}{Symbole} \providetranslation{Page List (glossaries)}{Pages} \providetranslation{Symbols (glossaries)}{Symboles} \providetranslation{Numbers (glossaries)}{Nombres} % \end{macrocode} %\iffalse % \begin{macrocode} % % \end{macrocode} %\fi %\iffalse % \begin{macrocode} %<*glossaries-dictionary-German.dict> % \end{macrocode} %\fi %\subsection{German Dictionary} % This is a dictionary file provided for use with the \isty{translator} % package. % \begin{macrocode} \ProvidesDictionary{glossaries-dictionary}{German} % \end{macrocode} % Provide German translations (quite a few variations were suggested % for German; I settled on the following): % \begin{macrocode} \providetranslation{Glossary}{Glossar} \providetranslation{Acronyms}{Akronyme} \providetranslation{Notation (glossaries)}{Bezeichnung} \providetranslation{Description (glossaries)}{Beschreibung} \providetranslation{Symbol (glossaries)}{Symbol} \providetranslation{Page List (glossaries)}{Seiten} \providetranslation{Symbols (glossaries)}{Symbole} \providetranslation{Numbers (glossaries)}{Zahlen} % \end{macrocode} %\iffalse % \begin{macrocode} % % \end{macrocode} %\fi %\iffalse % \begin{macrocode} %<*glossaries-dictionary-Irish.dict> % \end{macrocode} %\fi %\subsection{Irish Dictionary} % This is a dictionary file provided for use with the \isty{translator} % package. % \begin{macrocode} \ProvidesDictionary{glossaries-dictionary}{Irish} % \end{macrocode} % Provide Irish translations: % \begin