15.07.2013 Views

glossaries.sty: LaTeX2e Package to Assist Generating ... - CTAN

glossaries.sty: LaTeX2e Package to Assist Generating ... - CTAN

glossaries.sty: LaTeX2e Package to Assist Generating ... - CTAN

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

\@gls@nohyperlist<br />

DeclareNoHyperList<br />

nohypertypes<br />

\@gls@sanitizedesc<br />

\@gls@sanitizename<br />

gls@sanitizesymbol<br />

246 \newcommand*{\@gls@nohyperlist}{}<br />

247 \newcommand*{\GlsDeclareNoHyperList}[1]{%<br />

248 \ifdefempty\@gls@nohyperlist<br />

249 {%<br />

250 \renewcommand*{\@gls@nohyperlist}{#1}%<br />

251 }%<br />

252 {%<br />

253 \app<strong>to</strong>\@gls@nohyperlist{,#1}%<br />

254 }%<br />

255 }<br />

256 \define@key{<strong>glossaries</strong>.<strong>sty</strong>}{nohypertypes}{%<br />

257 \GlsDeclareNoHyperList{#1}%<br />

258 }<br />

The glossary keys whose values are written <strong>to</strong> another file (i.e. sort, name, description<br />

and symbol) need <strong>to</strong> be sanitized, otherwise fragile commands would<br />

not be able <strong>to</strong> be used in \newglossaryentry. However, strange results will<br />

occur if you then use those fields in the document. As these fields are not<br />

normally used in the document, but are by default only used in the glossary,<br />

the default is <strong>to</strong> sanitize them. If however you want <strong>to</strong> use these values in the<br />

document (either by redefining commands like \glsdisplay or by using commands<br />

like \glsentrydesc) you will have <strong>to</strong> switch off the sanitization using<br />

the sanitize package option, but you will then have <strong>to</strong> use \protect <strong>to</strong> protect<br />

fragile commands when defining new glossary entries. The sanitize option<br />

takes a key-value list as its value, which can be used <strong>to</strong> switch individual values<br />

on and off. For example:<br />

\usepackage[sanitize={description,name,symbol=false}]{<strong>glossaries</strong>}<br />

will switch off the sanitization for the symbol key, but switch it on for the description<br />

and name keys. This would mean that you can use fragile commands<br />

in the description and name when defining a new glossary entry, but not for<br />

the symbol.<br />

The default values are defined as:<br />

259 \newcommand*{\@gls@sanitizedesc}{\@onelevel@sanitize\@glo@desc}<br />

260 \newcommand*{\@gls@sanitizename}{\@onelevel@sanitize\@glo@name}<br />

261 \newcommand*{\@gls@sanitizesymbol}{\@onelevel@sanitize\@glo@symbol}<br />

14

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!