diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/glossaries/glossariesbegin.html')
-rw-r--r-- | Master/texmf-dist/doc/latex/glossaries/glossariesbegin.html | 2221 |
1 files changed, 1752 insertions, 469 deletions
diff --git a/Master/texmf-dist/doc/latex/glossaries/glossariesbegin.html b/Master/texmf-dist/doc/latex/glossaries/glossariesbegin.html index 6bc51a6a310..5f6142320e7 100644 --- a/Master/texmf-dist/doc/latex/glossaries/glossariesbegin.html +++ b/Master/texmf-dist/doc/latex/glossaries/glossariesbegin.html @@ -1,5 +1,4 @@ -<a - id="top"></a><?xml version="1.0" encoding="utf-8" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!--http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd--> @@ -11,7 +10,7 @@ <meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)" /> <!-- xhtml,fn-in,css-in,uni-html4,utf8 --> <meta name="src" content="glossariesbegin.tex" /> -<meta name="date" content="2014-01-20 17:22:00" /> +<meta name="date" content="2014-03-07 17:43:00" /> <style type="text/css"> <!-- @@ -22,6 +21,7 @@ .cmr-12{font-size:120%;} .cmr-9{font-size:90%;} .cmbx-9{font-size:90%; font-weight: bold;} +.cmbx-9{ font-weight: bold;} .cmss-9{font-size:90%; font-family: sans-serif;} .cmss-9{ font-family: sans-serif;} .cmtt-10{font-family: monospace;} @@ -29,11 +29,14 @@ .cmtt-10{font-family: monospace;} .cmss-10{ font-family: sans-serif;} .cmss-10{ font-family: sans-serif;} +.cmitt-10{font-family: monospace; font-style: italic;} +.cmti-10{ font-style: italic;} .cmtt-9{font-size:90%;font-family: monospace;} .cmtt-9{font-family: monospace;} .cmtt-9{font-family: monospace;} -.cmti-10{ font-style: italic;} -.cmitt-10{font-family: monospace; font-style: italic;} +.cmbx-10{ font-weight: bold;} +.cmbx-10{ font-weight: bold;} +.cmsy-9{font-size:90%;} p.noindent { text-indent: 0em } td p.noindent { text-indent: 0em; margin-top:0em; } p.nopar { text-indent: 0em; } @@ -142,7 +145,43 @@ div.thanks{text-align:left; margin-left:10%; font-size:85%; font-style:italic; } .quotation {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; } .abstract p {margin-left:5%; margin-right:5%;} div.abstract {width:100%;} +.alltt P { margin-bottom : 0em; margin-top : 0em; } +.alltt { margin-bottom : 1em; margin-top : 1em; } +div.tabular, div.center div.tabular {text-align: center; margin-top:0.5em; margin-bottom:0.5em; } +table.tabular td p{margin-top:0em;} +table.tabular {margin-left: auto; margin-right: auto;} +td p:first-child{ margin-top:0em; } +td p:last-child{ margin-bottom:0em; } +div.td00{ margin-left:0pt; margin-right:0pt; } +div.td01{ margin-left:0pt; margin-right:5pt; } +div.td10{ margin-left:5pt; margin-right:0pt; } +div.td11{ margin-left:5pt; margin-right:5pt; } +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +td.td00{ padding-left:0pt; padding-right:0pt; } +td.td01{ padding-left:0pt; padding-right:5pt; } +td.td10{ padding-left:5pt; padding-right:0pt; } +td.td11{ padding-left:5pt; padding-right:5pt; } +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +.hline hr, .cline hr{ height : 1px; margin:0px; } +div.array {text-align:center;} +.equation td{text-align:center; } +.equation-star td{text-align:center; } +table.equation-star { width:100%; } +table.equation { width:100%; } +table.align, table.alignat, table.xalignat, table.xxalignat, table.flalign {width:100%; margin-left:5%; white-space: nowrap;} +table.align-star, table.alignat-star, table.xalignat-star, table.flalign-star {margin-left:auto; margin-right:auto; white-space: nowrap;} +td.align-label { width:5%; text-align:center; } +td.align-odd { text-align:right; padding-right:0.3em;} +td.align-even { text-align:left; padding-right:0.6em;} +table.multline, table.multline-star {width:100%;} +td.gather {text-align:center; } +table.gather {width:100%;} +div.gather-star {text-align:center;} +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +div.longtable{text-align:center;} +.supertabular {text-align:center} div.important { border : solid red; } +div.verbatim { font-family: monospace; white-space: nowrap; text-align:left; clear:both; padding-top: 2ex; padding-bottom: 2ex;} /* end css.sty */ @@ -150,7 +189,8 @@ div.important { border : solid red; } </style> </head><body > - <div class="maketitle"> + <div class="maketitle"><a + id="top"></a> @@ -159,27 +199,30 @@ div.important { border : solid red; } <h2 class="titleHead">The glossaries package: a guide for beginners</h2> -<div class="author" ><span + <div class="author" ><span class="cmr-12">Nicola L.C. Talbot</span></div><br /> <div class="date" ><span -class="cmr-12">2014-01-20</span></div> +class="cmr-12">2014-03-06</span></div> </div> <div class="abstract" > <div class="center" > -<!--l. 26--><p class="noindent" > -</p><!--l. 26--><p class="noindent" ><span +<!--l. 45--><p class="noindent" > +</p><!--l. 45--><p class="noindent" ><span class="cmbx-9">Abstract</span></p></div> - <!--l. 27--><p class="indent" > <span + <!--l. 46--><p class="indent" > <span class="cmr-9">This document is a brief guide to the </span><span class="cmss-9">glossaries </span><span -class="cmr-9">package for beginners who</span> +class="cmr-9">package for beginners</span> <span -class="cmr-9">find the size of the main user manual daunting and, as such, it only covers</span> +class="cmr-9">who find the size of the main user manual daunting and, as such, it only</span> <span -class="cmr-9">the basics. For more advanced topics, see the </span><a +class="cmr-9">covers the basics. For brevity some options to the commands described here</span> + <span +class="cmr-9">are omitted. For a</span><span +class="cmr-9"> more detailed guide, see the </span><a href="glossaries-user.html" ><span class="cmr-9">main user manual</span></a><span class="cmr-9">.</span> @@ -189,622 +232,1862 @@ class="cmr-9">.</span> id="x1-1000"></a>Contents</h3> <div class="tableofcontents"> <span class="sectionToc" >1 <a -href="#x1-20001" id="QQ2-1-2">What Do I Need?</a></span> +href="#sec:defterm" id="QQ2-1-2">Defining Terms</a></span> <br /> <span class="sectionToc" >2 <a -href="#x1-30002" id="QQ2-1-3">Getting Started</a></span> +href="#sec:useterm" id="QQ2-1-3">Using Entries</a></span> <br /> <span class="sectionToc" >3 <a -href="#x1-40003" id="QQ2-1-4">Defining a Term or Symbol</a></span> +href="#sec:acronyms" id="QQ2-1-4">Acronyms</a></span> <br /> <span class="sectionToc" >4 <a -href="#x1-50004" id="QQ2-1-5">Using a Term</a></span> +href="#sec:printglossaries" id="QQ2-1-5">Displaying a List of Entries</a></span> <br /> <span class="sectionToc" >5 <a -href="#x1-60005" id="QQ2-1-6">Acronyms</a></span> +href="#sec:glosstyle" id="QQ2-1-7">Customising the Glossary</a></span> <br /> <span class="sectionToc" >6 <a -href="#x1-70006" id="QQ2-1-7">Displaying the Glossary or List of Acronyms</a></span> +href="#sec:multigloss" id="QQ2-1-8">Multiple Glossaries</a></span> +<br /> <span class="sectionToc" >7 <a +href="#sec:hyperref" id="QQ2-1-9">glossaries and hyperref</a></span> +<br /> <span class="sectionToc" >8 <a +href="#sec:xr" id="QQ2-1-10">Cross-References</a></span> +<br /> <span class="sectionToc" >9 <a +href="#sec:moreinfo" id="QQ2-1-11">Further Information</a></span> </div> -<!--l. 35--><p class="noindent" > +<!--l. 55--><p class="noindent" > </p> -<!--l. 35--><p class="noindent" ><a +<!--l. 55--><p class="noindent" ><a href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">1 </span> <a - id="x1-20001"></a>What Do I Need?</h3> -<!--l. 38--><p class="noindent" >You need to have the <span -class="cmss-10">glossaries </span>package installed. This and all dependent packages are -contained in both the TeX Live and MikTeX distributions. Use your distribution’s -update manager to ensure you have an up-to-date version. These packages can also be -downloaded from CTAN if you don’t have them installed. See <a -href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=installthings" >“Installing things on a -(La)TeX System”</a> for further assistance. -</p><!--l. 46--><p class="indent" > In addition, you need an indexing application. The <span -class="cmss-10">glossaries</span><a - id="dx1-2001"></a> package is configured to -use either <span -class="cmtt-10">makeindex</span><a - id="dx1-2002"></a> or <span -class="cmtt-10">xindy</span><a - id="dx1-2003"></a>. <span -class="cmtt-10">Makeindex</span><a - id="dx1-2004"></a> should be available on all <span class="TEX">T<span -class="E">E</span>X</span> systems. It’s -possible you may not have <span -class="cmtt-10">xindy</span><a - id="dx1-2005"></a> installed, but it can be downloaded from the <a -href="http://www.xindy.org/" >xindy -home page</a>. MiKTeX users may find the <a -href="http://www.latex-community.org/forum/viewtopic.php?f=51&t=5383" >Xindy for MiKTeX</a> thread on the LaTeX -Community Forum helpful. -</p><!--l. 54--><p class="indent" > The <span + id="sec:defterm"></a>Defining Terms</h3> +<!--l. 58--><p class="noindent" >When you use the <span class="cmss-10">glossaries</span><a - id="dx1-2006"></a> package provides a helper Perl script called <span -class="cmtt-10">makeglossaries</span><a - id="dx1-2007"></a> which -will act as an interface to <span -class="cmtt-10">makeindex</span><a - id="dx1-2008"></a> or <span -class="cmtt-10">xindy</span><a - id="dx1-2009"></a>. If you want to use <span -class="cmtt-10">makeglossaries</span><a - id="dx1-2010"></a> or + id="dx1-2001"></a> package, you need to define glossary entries in the +document preamble. These entries could be a word, phrase, acronym or symbol. +They’re usually accompanied by a description, which could be a short sentence or an +in-depth explanation that spans multiple paragraphs. The simplest method of defining +an entry is to use: +</p><!--l. 65--><p class="indent" > <hr><div title="Definition"></p><div class="alltt"> +<div class="obeylines-v"> +<span +class="cmtt-10">\newglossaryentry{</span><span +class="cmmi-10"><</span><span +class="cmitt-10">label</span><span +class="cmmi-10">></span><span +class="cmtt-10">}</span> +<br /><span class="verb"><span +class="cmtt-10">{</span></span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> name={</span><span +class="cmmi-10"><</span><span +class="cmitt-10">name</span><span +class="cmmi-10">></span><span +class="cmtt-10">},</span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> description={</span><span +class="cmmi-10"><</span><span +class="cmitt-10">description</span><span +class="cmmi-10">></span><span +class="cmtt-10">},</span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> </span><span +class="cmmi-10"><</span><span +class="cmitt-10">other</span><span +class="cmitt-10"> options</span><span +class="cmmi-10">></span> +<br /><span class="verb"><span +class="cmtt-10">}</span></span> +</div> +</div> </div><hr> +<!--l. 73--><p class="noindent" > +where <span +class="cmmi-10"><</span><span +class="cmti-10">label</span><span +class="cmmi-10">> </span>is a unique label that identifies this entry. (Don’t include the angle +brackets <span +class="cmmi-10">< ></span>. They just indicate the parts of the code you need to change when you +use this command in your document.) As with similar labelling commands, such as <span -class="cmtt-10">xindy</span><a - id="dx1-2011"></a>, you need to have Perl installed. If you don’t have Perl installed, you can still use +class="cmtt-10">\label </span>or <span +class="cmtt-10">\bibitem</span>, the label should not contain active characters, so just use <span +class="cmtt-10">a</span>, …, <span +class="cmtt-10">z</span>, <span -class="cmss-10">glossaries </span>but you can only use it with <span -class="cmtt-10">makeindex</span><a - id="dx1-2012"></a>. -</p><!--l. 61--><p class="noindent" > -</p> -<!--l. 61--><p class="noindent" ><a -href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">2 </span> <a - id="x1-30002"></a>Getting Started</h3> -<!--l. 64--><p class="noindent" >The most obvious things to do is to remember to load the <span -class="cmss-10">glossaries</span><a - id="dx1-3001"></a> package: +class="cmtt-10">A</span>, …, <span +class="cmtt-10">Z</span>, <span +class="cmtt-10">0</span>, …, <span +class="cmtt-10">9</span>. You may also be able to use some punctuation characters, unless they +have been made active (for example, via <span +class="cmss-10">babel</span><a + id="dx1-2002"></a>’s shorthand activation.) The +<span +class="cmmi-10"><</span><span +class="cmti-10">name</span><span +class="cmmi-10">> </span>is the word, phrase or symbol you are defining, and <span +class="cmmi-10"><</span><span +class="cmti-10">description</span><span +class="cmmi-10">> </span>is the +description. +</p><!--l. 86--><p class="indent" > This command is a “short” command, which means that <span +class="cmmi-10"><</span><span +class="cmti-10">description</span><span +class="cmmi-10">> </span>can’t +contain a paragraph break. If you have a long description, you can instead +use: +</p><!--l. 90--><p class="indent" > <hr><div title="Definition"></p><div class="alltt"> +<div class="obeylines-v"> +<span +class="cmtt-10">\longnewglossaryentry{</span><span +class="cmmi-10"><</span><span +class="cmitt-10">label</span><span +class="cmmi-10">></span><span +class="cmtt-10">}</span> +<br /><span class="verb"><span +class="cmtt-10">{</span></span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> name={</span><span +class="cmmi-10"><</span><span +class="cmitt-10">name</span><span +class="cmmi-10">></span><span +class="cmtt-10">},</span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> </span><span +class="cmmi-10"><</span><span +class="cmitt-10">other</span><span +class="cmitt-10"> options</span><span +class="cmmi-10">></span> +<br /><span class="verb"><span +class="cmtt-10">}</span></span> +<br /><span +class="cmtt-10">{</span><span +class="cmmi-10"><</span><span +class="cmitt-10">description</span><span +class="cmmi-10">></span><span +class="cmtt-10">}</span> +</div> +</div> </div><hr> +<!--l. 98--><p class="noindent" > -</p> - <div class="verbatim" id="verbatim-1"> -\usepackage{glossaries} +</p><!--l. 100--><p class="indent" > Examples: + </p><ol class="enumerate1" > + <li + class="enumerate" id="x1-2004x1">Define the term “set” with the label <span +class="cmtt-10">set</span>: + + + + <div class="verbatim" id="verbatim-1"> + \newglossaryentry{set} +  <br />{ +  <br />  name={set}, +  <br />  description={a collection of objects} +  <br />} </div> -<!--l. 68--><p class="nopar" > -</p><!--l. 69--><p class="indent" > <div class="important" title="Important Note"> Note that the <span -class="cmss-10">glossaries </span>package must be loaded <span -class="cmti-10">after </span>the <span -class="cmss-10">hyperref</span><a - id="dx1-3002"></a> package -(contrary to the general advice that <span -class="cmss-10">hyperref</span><a - id="dx1-3003"></a> should be loaded last). The <span -class="cmss-10">glossaries</span><a - id="dx1-3004"></a> -package should also be loaded after <span -class="cmss-10">html</span><a - id="dx1-3005"></a>, <span -class="cmss-10">inputenc</span><a - id="dx1-3006"></a>, <span -class="cmss-10">babel</span><a - id="dx1-3007"></a> and <span -class="cmss-10">ngerman</span><a - id="dx1-3008"></a>. If you are using -<span -class="cmss-10">babel</span><a - id="dx1-3009"></a> I recommend you use the <span -class="cmss-10">glossaries</span><a - id="dx1-3010"></a> package option <span -class="cmss-10">translate=babel</span><a - id="dx1-3011"></a>: + <!--l. 109--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-2006x2">Define the symbol <span +class="cmsy-10">∅ </span>with the label <span +class="cmtt-10">emptyset</span>: -</p> - <div class="verbatim" id="verbatim-2"> -\usepackage{babel} - <br />\usepackage[translate=babel]{glossaries} + <div class="verbatim" id="verbatim-2"> + \newglossaryentry{emptyset} +  <br />{ +  <br />  name={\ensuremath{\emptyset}}, +  <br />  description={the empty set} +  <br />} </div> -<!--l. 80--><p class="nopar" > </div> -</p><!--l. 81--><p class="noindent" > -</p><!--l. 83--><p class="indent" > If you want to use <span -class="cmtt-10">xindy</span><a - id="dx1-3012"></a> rather than <span -class="cmtt-10">makeindex</span><a - id="dx1-3013"></a> to sort the glossaries, you need to -specify this in the package options: + <!--l. 119--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-2008x3">Define the phrase “Fish Age” with the label <span +class="cmtt-10">fishage</span>: -</p> - <div class="verbatim" id="verbatim-3"> -\usepackage[xindy]{glossaries} + <div class="verbatim" id="verbatim-3"> + \longnewglossaryentry{fishage} +  <br />{name={Fish Age}} +  <br />{% +  <br />  A common name for the Devonian geologic period +  <br />  spanning from the end of the Silurian Period to +  <br />  the beginning of the Carboniferous Period. +  <br /><br />  This age was known for its remarkable variety of +  <br />  fish species. +  <br />} </div> -<!--l. 87--><p class="nopar" > Other package options are described in <a -href="glossaries-user.html#sec:pkgopts" >Package Options</a> in the main <span -class="cmss-10">glossaries</span><a - id="dx1-3014"></a> user -manual. -</p><!--l. 92--><p class="indent" > Next, you need to enable the creation of the various external files that are required -by the indexing application. This is done using: -</p><!--l. 95--><p class="indent" > <hr><div title="Definition"><span -class="cmtt-10">\makeglossaries </span></div><hr> -</p><!--l. 96--><p class="noindent" > -</p><!--l. 98--><p class="indent" > <div class="important" title="Important Note"> <span -class="cmti-10">Don’t </span>attempt to input any of these external files in your document. </div> -</p><!--l. 100--><p class="noindent" > -</p><!--l. 102--><p class="noindent" > -</p> -<!--l. 102--><p class="noindent" ><a -href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">3 </span> <a - id="x1-40003"></a>Defining a Term or Symbol</h3> -<!--l. 105--><p class="noindent" >You must define terms or symbols before you can use them in the document. This is -best done in the preamble. Each term is defined using: -</p><!--l. 109--><p class="indent" > <hr><div title="Definition"><span -class="cmtt-10">\newglossaryentry{</span><span + <!--l. 134--><p class="nopar" > (The percent character discards the end of line character that would otherwise + cause an unwanted space to appear at the start of the description.) + </p></li> + <li + class="enumerate" id="x1-2010x4">Take care if the first letter is an extended Latin or non-Latin character (either + specified via a command such as <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">\’e</span></span></span> or explicitly via the <span +class="cmss-10">inputenc</span><a + id="dx1-2011"></a> package such + as <span +class="cmtt-10">é</span>). This first letter must be placed in a group: + + + + <div class="verbatim" id="verbatim-4"> + \newglossaryentry{elite} +  <br />{ +  <br />  name={{\’e}lite}, +  <br />  description={select group or class} +  <br />} +</div> + <!--l. 150--><p class="nopar" > or </p><div class="alltt"> + <div class="obeylines-v"> + <span class="verb"><span +class="cmtt-10">\newglossaryentry{elite}</span></span> + <br /><span class="verb"><span +class="cmtt-10">{</span></span> + <br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> name=</span><span class="verb"><span +class="cmtt-10">{{</span></span><span +class="cmtt-10">é</span><span class="verb"><span +class="cmtt-10">}lite}</span></span><span +class="cmtt-10">,</span> + <br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> description=</span><span class="verb"><span +class="cmtt-10">{select</span><span +class="cmtt-10"> group</span><span +class="cmtt-10"> or</span><span +class="cmtt-10"> class}</span></span> + <br /><span class="verb"><span +class="cmtt-10">}</span></span> +</div> + </div></li></ol> +<!--l. 161--><p class="indent" > Acronyms or abbreviations can be defined using +</p><!--l. 163--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\newacronym{</span><span class="cmmi-10"><</span><span class="cmitt-10">label</span><span class="cmmi-10">></span><span class="cmtt-10">}{</span><span class="cmmi-10"><</span><span -class="cmitt-10">settings</span><span +class="cmitt-10">short</span><span +class="cmmi-10">></span><span +class="cmtt-10">}{</span><span +class="cmmi-10"><</span><span +class="cmitt-10">long</span><span class="cmmi-10">></span><span class="cmtt-10">} </span></div><hr> -</p><!--l. 110--><p class="noindent" > +</p><!--l. 164--><p class="noindent" > where <span class="cmmi-10"><</span><span class="cmti-10">label</span><span -class="cmmi-10">> </span>is a unique label used to identify the term. The second argument, +class="cmmi-10">> </span>is the label (as with the <span +class="cmtt-10">\newglossaryentry </span>and the <span +class="cmtt-10">\longnewglossaryentry </span>commands), <span class="cmmi-10"><</span><span -class="cmti-10">settings</span><span -class="cmmi-10">></span>, is a key=value comma separated list that is used to set the required -information for the term. A full list of available keys can be found in <a -href="glossaries-user.html#sec:newglosentry" >Defining Glossary -Entries</a> in the main <span -class="cmss-10">glossaries</span><a - id="dx1-4001"></a> user manual. The principle keys are <span -class="cmss-10">name</span><a - id="dx1-4002"></a> and +class="cmti-10">short</span><span +class="cmmi-10">> </span>is the abbreviation or acronym and <span -class="cmss-10">description</span><a - id="dx1-4003"></a>. -</p><!--l. 120--><p class="indent" > For example, to define the term “electrolyte”: - - - -</p> - <div class="verbatim" id="verbatim-4"> -\newglossaryentry{electrolyte}{name=electrolyte, - <br />description={solution able to conduct electric current}} -</div> -<!--l. 124--><p class="nopar" > In the above example, the label and the name happen to be the same. In the next -example, the name contains a ligature but the label doesn’t: +class="cmmi-10"><</span><span +class="cmti-10">long</span><span +class="cmmi-10">> </span>is the long form. For example: </p> <div class="verbatim" id="verbatim-5"> -\newglossaryentry{oesophagus}{name=\oe sophagus, - <br />description={canal from mouth to stomach}, - <br />plural=\oe sophagi} -</div> -<!--l. 132--><p class="nopar" > In this case the label is <span -class="cmtt-10">oesophagus</span>. Note that in this case, the plural has to be -specified using the <span -class="cmss-10">plural</span><a - id="dx1-4004"></a> key since it isn’t formed by simply appending the letter -“s”. -</p><!--l. 137--><p class="indent" > <div class="important" title="Important Note"> If you want to define all your terms in a separate file <span -class="cmti-10">don’t </span>use <span -class="cmtt-10">\include</span><a - id="dx1-4005"></a> to input -the file. You can use <span -class="cmtt-10">\input</span><a - id="dx1-4006"></a> but it’s better to use <span -class="cmtt-10">\loadglsentries</span><a - id="dx1-4007"></a>. (See <a -href="glossaries-user.html#sec:loadglsentries" >Loading -Entries From a File</a>.) </div> -</p><!--l. 143--><p class="noindent" > -</p><!--l. 145--><p class="indent" > When you define terms, it is important to remember that they will be sorted by an -external application that doesn’t interpret <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span -class="E">E</span>X</span></span> commands. <span -class="cmtt-10">xindy</span><a - id="dx1-4008"></a> is a little more -<span class="TEX">T<span -class="E">E</span>X</span>-aware than <span -class="cmtt-10">makeindex</span><a - id="dx1-4009"></a>, but for this example they will both mis-sort -<span class="obeylines-h"><span class="verb"><span -class="cmtt-10">\oe</span><span -class="cmtt-10"> sophagus</span></span></span>. Xindy will ignore the <span class="obeylines-h"><span class="verb"><span -class="cmtt-10">\oe␣</span></span></span> part and will sort it according to <span -class="cmtt-10">sophagus</span>, -so it will be placed with the terms starting with an “s”. <span -class="cmtt-10">makeindex</span><a - id="dx1-4010"></a>, on the other hand, -will sort it according to <span class="obeylines-h"><span class="verb"><span -class="cmtt-10">\oe␣sophagus</span></span></span> which starts with a symbol (the backslash), so it -will end up in the symbol group. You therefore need to specify how to sort the -term: +\newacronym{svm}{svm}{support vector machine} +</div> +<!--l. 170--><p class="nopar" > This defines a glossary entry with the label <span +class="cmtt-10">svm</span>. By default, the <span +class="cmmi-10"><</span><span +class="cmti-10">name</span><span +class="cmmi-10">> </span>is set to +<span +class="cmmi-10"><</span><span +class="cmti-10">short</span><span +class="cmmi-10">> </span>(“svm” in the above example) and the <span +class="cmmi-10"><</span><span +class="cmti-10">description</span><span +class="cmmi-10">> </span>is set to <span +class="cmmi-10"><</span><span +class="cmti-10">long</span><span +class="cmmi-10">></span> +(“support vector machine” in the above example). If, instead, you want to +be able to specify your own description you can do this using the optional +argument: </p> <div class="verbatim" id="verbatim-6"> -\newglossaryentry{oesophagus}{name=\oe sophagus, - <br />description={canal from mouth to stomach}, - <br />plural=\oe sophagi, - <br />sort=oesophagus} +\newacronym + <br /> [description={statistical pattern recognition technique}] + <br /> {svm}{svm}{support vector machine} </div> -<!--l. 160--><p class="nopar" > Note, however, that if you use the <span -class="cmss-10">inputenc</span><a - id="dx1-4011"></a> package and <span -class="cmtt-10">xindy</span><a - id="dx1-4012"></a>, you can use the -encoded character <span -class="cmtt-10">œ </span>rather than <span -class="cmtt-10">\oe </span>and <span -class="cmtt-10">xindy</span><a - id="dx1-4013"></a> will sort it correctly: +<!--l. 181--><p class="nopar" > +</p><!--l. 183--><p class="indent" > There are other keys you can use when you define an entry. For example, the <span +class="cmtt-10">name</span> +key used above indicates how the term should appear in the list of entries (glossary). If +the term should appear differently when you reference it in the document, you need to +use the <span +class="cmtt-10">text </span>key as well. +</p><!--l. 189--><p class="indent" > For example: </p> <div class="verbatim" id="verbatim-7"> -\newglossaryentry{oesophagus}{name=œsophagus, - <br />description={canal from mouth to stomach}, - <br />plural=œsophagi} +\newglossaryentry{latinalph} + <br />{ + <br />  name={Latin Alphabet}, + <br />  text={Latin alphabet}, + <br />  description={alphabet consisting of the letters + <br />  a, \ldots, z, A, \ldots, Z} + <br />} </div> -<!--l. 168--><p class="nopar" > -</p><!--l. 170--><p class="indent" > If the name starts with an accented character, the first character must be -grouped: +<!--l. 198--><p class="nopar" > This will appear in the text as “Latin alphabet” but will be listed in the glossary as +“Latin Alphabet”. +</p><!--l. 202--><p class="indent" > Another commonly used key is <span +class="cmtt-10">plural </span>for specifying the plural of the term. This +defaults to the value of the <span +class="cmtt-10">text </span>key with an “s” appended, but if this is incorrect, just +use the <span +class="cmtt-10">plural </span>key to override it: </p> <div class="verbatim" id="verbatim-8"> -\newglossaryentry{elite}{name={\’e}lite, - <br />description={select group of people}, - <br />sort=elite} +\newglossaryentry{oesophagus} + <br />{ + <br />  name={{\oe}sophagus}, + <br />  plural={{\oe}sophagi}, + <br />  description={canal from mouth to stomach} + <br />} </div> -<!--l. 176--><p class="nopar" > or +<!--l. 213--><p class="nopar" > (Remember from earlier that the initial ligature <span +class="cmtt-10">\oe </span>needs to be grouped.) +</p><!--l. 217--><p class="indent" > The plural forms for acronyms can be specified using the <span +class="cmtt-10">longplural </span>and +<span +class="cmtt-10">shortplural </span>keys. For example: </p> <div class="verbatim" id="verbatim-9"> -\newglossaryentry{elite}{name={é}lite, - <br />description={select group of people}} +\newacronym + <br /> [longplural={diagonal matrices}] + <br /> {dm}{DM}{diagonal matrix} </div> -<!--l. 181--><p class="nopar" > -</p><!--l. 183--><p class="indent" > The name can also be a symbol, but you will also need to specify the sort key. For -example: +<!--l. 223--><p class="nopar" > If omitted, the defaults are again obtained by appending an “s” to the singular +versions. +</p><!--l. 227--><p class="indent" > It’s also possible to have both a name and a corresponding symbol. Just use the +<span +class="cmtt-10">name </span>key for the name and the <span +class="cmtt-10">symbol </span>key for the symbol. For example: </p> <div class="verbatim" id="verbatim-10"> -\newglossaryentry{pi}{name={\ensuremath{\pi}}, - <br />description={ratio of circumference of circle to its - <br />diameter},sort=pi} +\newglossaryentry{emptyset} + <br />{ + <br />  name={empty set}, + <br />  symbol={\ensuremath{\emptyset}}, + <br />  description={the set containing no elements} + <br />} </div> -<!--l. 189--><p class="nopar" > It’s also possible to have a name and a symbol. For example: - - - -</p> - <div class="verbatim" id="verbatim-11"> -\newglossaryentry{set}{name=set, - <br />description={a collection of objects}, - <br />symbol={\ensuremath{\mathcal{S}}}} -</div> -<!--l. 195--><p class="nopar" > Note, however, that not all glossary styles display the symbol in the glossary. -</p><!--l. 199--><p class="noindent" > +<!--l. 237--><p class="nopar" > +</p><!--l. 239--><p class="noindent" > </p> -<!--l. 199--><p class="noindent" ><a -href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">4 </span> <a - id="x1-50004"></a>Using a Term</h3> -<!--l. 202--><p class="noindent" >Once you have defined a term, you can use it in the document. The <span -class="cmss-10">glossaries</span><a - id="dx1-5001"></a> -package provides a number of commands that are described in <a -href="glossaries-user.html#sec:glslink" >Links to Glossary -Entries</a> in the main <span -class="cmss-10">glossaries</span><a - id="dx1-5002"></a> user manual. Here, I shall just cover the main -commands: -</p><!--l. 208--><p class="indent" > <hr><div title="Definition"><span +<!--l. 239--><p class="noindent" ><a +href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">2 </span> <a + id="sec:useterm"></a>Using Entries</h3> +<!--l. 242--><p class="noindent" >Once you have defined your entries, as described above, you can reference them in your +document. There are a number of commands to do this, but the most common one +is: +</p><!--l. 246--><p class="indent" > <hr><div title="Definition"><span class="cmtt-10">\gls{</span><span class="cmmi-10"><</span><span class="cmitt-10">label</span><span class="cmmi-10">></span><span class="cmtt-10">} </span></div><hr> -</p><!--l. 209--><p class="noindent" > -This prints the term associated with <span +</p><!--l. 247--><p class="noindent" > +where <span class="cmmi-10"><</span><span class="cmti-10">label</span><span -class="cmmi-10">></span>. Using the example in the previous -section, <span class="obeylines-h"><span class="verb"><span -class="cmtt-10">\gls{oesophagus}</span></span></span> will display œsophagus. If the <span -class="cmss-10">hyperref</span><a - id="dx1-5003"></a> package has also -been loaded, the term will also be hyperlinked to the relevant entry in the -glossary. -</p><!--l. 216--><p class="indent" > <hr><div title="Definition"><span +class="cmmi-10">> </span>is the label you assigned to the entry when you defined it. For example, +<span class="obeylines-h"><span class="verb"><span +class="cmtt-10">\gls{fishage}</span></span></span> will display “Fish Age” in the text (given the definition from the +previous section). +</p><!--l. 252--><p class="indent" > If the entry was defined as an acronym (using <span +class="cmtt-10">\newacronym </span>described above), then +<span +class="cmtt-10">\gls </span>will display the full form the first time it’s used and just the short form on +subsequent use. For example, <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">\gls{svm}</span></span></span> will display “support vector machine (svm)” +the first time it’s used, but the next occurrence of <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">\gls{svm}</span></span></span> will just display +“svm”. +</p><!--l. 259--><p class="indent" > If you want the plural form, you can use: +</p><!--l. 261--><p class="indent" > <hr><div title="Definition"><span class="cmtt-10">\glspl{</span><span class="cmmi-10"><</span><span class="cmitt-10">label</span><span class="cmmi-10">></span><span class="cmtt-10">} </span></div><hr> -</p><!--l. 217--><p class="noindent" > -This prints the plural of the term associated with <span +</p><!--l. 262--><p class="noindent" > +instead of <span +class="cmtt-10">\gls{</span><span class="cmmi-10"><</span><span class="cmti-10">label</span><span -class="cmmi-10">></span>, so <span class="obeylines-h"><span class="verb"><span -class="cmtt-10">\glspl{oesophagus}</span></span></span> will -display œsophagi. Again, the text will be a hyperlink to the relevant entry in the -glossary, if hyperlinks are defined. -</p><!--l. 223--><p class="indent" > There are also versions that convert the first character to upper case if you need to -start a sentence with a term: -</p><!--l. 226--><p class="indent" > <hr><div title="Definition"><span +class="cmmi-10">></span><span +class="cmtt-10">}</span>. For example, <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">\glspl{set}</span></span></span> displays “sets”. +</p><!--l. 266--><p class="indent" > If the term appears at the start of a sentence, you can convert the first letter to +upper case using: +</p><!--l. 269--><p class="indent" > <hr><div title="Definition"><span class="cmtt-10">\Gls{</span><span class="cmmi-10"><</span><span class="cmitt-10">label</span><span class="cmmi-10">></span><span class="cmtt-10">} </span></div><hr> -</p><!--l. 227--><p class="noindent" > -and -</p><!--l. 230--><p class="indent" > <hr><div title="Definition"><span +</p><!--l. 270--><p class="noindent" > +for the singular form or +</p><!--l. 273--><p class="indent" > <hr><div title="Definition"><span class="cmtt-10">\Glspl{</span><span class="cmmi-10"><</span><span class="cmitt-10">label</span><span class="cmmi-10">></span><span class="cmtt-10">} </span></div><hr> -</p><!--l. 231--><p class="noindent" > -For example: +</p><!--l. 274--><p class="noindent" > +for the plural form. For example: </p> - <div class="verbatim" id="verbatim-12"> -\Glspl{electrolyte} usually exist as solutions of salts, - <br />bases or acids. + <div class="verbatim" id="verbatim-11"> +\Glspl{set} are collections. </div> -<!--l. 236--><p class="nopar" > -</p><!--l. 238--><p class="indent" > Note that these commands all have two optional arguments that aren’t discussed -here, but they are described in <a -href="glossaries-user.html#sec:glslink" >Links to Glossary Entries</a> in the main <span -class="cmss-10">glossaries</span><a - id="dx1-5004"></a> user -manual. -</p><!--l. 243--><p class="indent" > <div class="important" title="Important Note"> Don’t use these commands in moving arguments, such as those used by <span -class="cmtt-10">\chapter</span>, -<span -class="cmtt-10">\section </span>and <span -class="cmtt-10">\caption</span>. </div> -</p><!--l. 246--><p class="noindent" > -You can, instead, use commands such as -</p><!--l. 249--><p class="indent" > <hr><div title="Definition"><span -class="cmtt-10">\glsentrytext{</span><span +<!--l. 278--><p class="nopar" > produces “Sets are collections”. +</p><!--l. 281--><p class="indent" > If you’ve specified a symbol using the <span +class="cmtt-10">symbol </span>key, you can display it using: +</p><!--l. 284--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\glssymbol{</span><span class="cmmi-10"><</span><span class="cmitt-10">label</span><span class="cmmi-10">></span><span class="cmtt-10">} </span></div><hr> -</p><!--l. 250--><p class="noindent" > -See <a -href="glossaries-user.html#sec:glsnolink" >Using Glossary Terms Without Links</a> in the main <span -class="cmss-10">glossaries</span><a - id="dx1-5005"></a> user manual. -</p><!--l. 254--><p class="noindent" > +</p><!--l. 285--><p class="noindent" > +</p><!--l. 287--><p class="noindent" > </p> -<!--l. 254--><p class="noindent" ><a -href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">5 </span> <a - id="x1-60005"></a>Acronyms</h3> -<!--l. 257--><p class="noindent" >The <span +<!--l. 287--><p class="noindent" ><a +href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">3 </span> <a + id="sec:acronyms"></a>Acronyms</h3> +<!--l. 290--><p class="noindent" >Recall from above, the first time you use an acronym with <span +class="cmtt-10">\gls</span>, it’s full form is +displayed but subsequent uses display only the short form. By default, the first use +displays <span +class="cmmi-10"><</span><span +class="cmti-10">long</span><span +class="cmmi-10">> </span>(<span +class="cmmi-10"><</span><span +class="cmti-10">short</span><span +class="cmmi-10">></span>). That is, the long form is displayed followed by the short +form in parentheses. You can change this first-use format with: +</p><!--l. 297--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\setacronymstyle{</span><span +class="cmmi-10"><</span><span +class="cmitt-10">style name</span><span +class="cmmi-10">></span><span +class="cmtt-10">} </span></div><hr> +</p><!--l. 298--><p class="noindent" > +(This must be used before you start defining your acronyms with <span +class="cmtt-10">\newacronym</span>.) There +are a number of predefined styles listed in <a +href="glossaries-user.html#sec:predefinedacrstyles" >Predefined Acronym Styles</a> in the main +<span class="cmss-10">glossaries</span><a - id="dx1-6001"></a> package also allows you to define acronyms. By default, acronyms will be -added to the main glossary, but if you use the <span -class="cmss-10">acronym</span><a - id="dx1-6002"></a> package option, acronyms will -be placed in a separate list of acronyms: + id="dx1-4001"></a> user manual. Here are a few examples: + </p><ol class="enumerate1" > + <li + class="enumerate" id="x1-4003x1"><span +class="cmmi-10"><</span><span +class="cmti-10">short</span><span +class="cmmi-10">> </span>(<span +class="cmmi-10"><</span><span +class="cmti-10">long</span><span +class="cmmi-10">></span>) -</p> - <div class="verbatim" id="verbatim-13"> -\usepackage[acronym]{glossaries} + <div class="verbatim" id="verbatim-12"> + \setacronymstyle{short-long} </div> -<!--l. 263--><p class="nopar" > -</p><!--l. 265--><p class="indent" > Acronyms must be defined before use and are defined using: -</p><!--l. 267--><p class="indent" > <hr><div title="Definition"><span -class="cmtt-10">\newacronym{</span><span + <!--l. 308--><p class="nopar" > This displays the short form followed by the long form in parentheses. + </p></li> + <li + class="enumerate" id="x1-4005x2"><span class="cmmi-10"><</span><span -class="cmitt-10">label</span><span -class="cmmi-10">></span><span -class="cmtt-10">}{</span><span +class="cmti-10">long</span><span +class="cmmi-10">> </span>(<span +class="cmtt-10">\textsc{</span><span class="cmmi-10"><</span><span -class="cmitt-10">abbrv</span><span +class="cmti-10">short</span><span class="cmmi-10">></span><span -class="cmtt-10">}{</span><span +class="cmtt-10">}</span>) + + + + <div class="verbatim" id="verbatim-13"> + \setacronymstyle{long-short-sc} +</div> + <!--l. 315--><p class="nopar" > This is like the default style but the short form is displayed in small caps. + Remember that when you use <span +class="cmtt-10">\textsc{</span><span class="cmmi-10"><</span><span -class="cmitt-10">full</span><span +class="cmti-10">text</span><span class="cmmi-10">></span><span -class="cmtt-10">} </span></div><hr> -</p><!--l. 268--><p class="noindent" > -where <span +class="cmtt-10">} </span>to generate small capitals, you + must specify <span class="cmmi-10"><</span><span -class="cmti-10">label</span><span -class="cmmi-10">> </span>is the label identifying the acronym, <span +class="cmti-10">text</span><span +class="cmmi-10">> </span>in lower case, so the short form of the acronym should be + defined in lower case. For example: + + + +</p> + <div class="verbatim" id="verbatim-14"> + \newacronym{svm}{svm}{support vector machine} +</div> + <!--l. 322--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-4007x3"><span class="cmmi-10"><</span><span -class="cmti-10">abbrv</span><span -class="cmmi-10">> </span>is the abbreviated form -and <span +class="cmti-10">long</span><span +class="cmmi-10">> </span>(<span +class="cmtt-10">\textsmaller{</span><span class="cmmi-10"><</span><span -class="cmti-10">full</span><span -class="cmmi-10">> </span>is the fully expanded text. For example: +class="cmti-10">short</span><span +class="cmmi-10">></span><span +class="cmtt-10">}</span>) + + + + <div class="verbatim" id="verbatim-15"> + \setacronymstyle{long-short-sm} +</div> + <!--l. 327--><p class="nopar" > This is similar to the previous style but uses <span +class="cmtt-10">\textsmaller </span>to format the short + form. Remember to load the <span +class="cmss-10">relsize</span><a + id="dx1-4008"></a> package, which defines <span +class="cmtt-10">\textsmaller</span>, if you + want to use this style. The short form now needs to be defined in upper + case: </p> - <div class="verbatim" id="verbatim-14"> -\newacronym{label}{svm}{support vector machine} + <div class="verbatim" id="verbatim-16"> + \newacronym{svm}{SVM}{support vector machine} </div> -<!--l. 274--><p class="nopar" > -</p><!--l. 276--><p class="indent" > Once the acronym is defined, it can be used in the same way as any other glossary -term with commands such as <span -class="cmtt-10">\gls </span>and <span -class="cmtt-10">\glspl</span>. On first use, the default will display -<span + <!--l. 334--><p class="nopar" > +</p> + </li></ol> +<!--l. 338--><p class="noindent" > +</p> +<!--l. 338--><p class="noindent" ><a +href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">4 </span> <a + id="sec:printglossaries"></a>Displaying a List of Entries</h3> +<!--l. 341--><p class="noindent" >Suppose you now want to display a list of all the entries you’ve referenced in your +document. This is where things start to get complicated and a lot of new users get +bewildered. You have three options: +</p><!--l. 346--><p class="indent" > + </p><dl class="description"><dt class="description"> + </dt><dd +class="description"><a + id="option1"></a><span +class="cmbx-10">Option</span><span +class="cmbx-10"> 1</span>: + <!--l. 349--><p class="noindent" >This is the simplest option but it’s slow and if you want a sorted list, it + doesn’t work for non-Latin alphabets. + </p><!--l. 352--><p class="noindent" > + </p><ol class="enumerate1" > + <li + class="enumerate" id="x1-5002x1">Add <span +class="cmtt-10">\makenoidxglossaries </span>to your preamble (before you start + defining your entries, as described in <a +href="#sec:defterm"><span +class="cmsy-10">§</span>1 </a><a +href="#sec:defterm">Defining Terms<!--tex4ht:ref: sec:defterm --></a>). + </li> + <li + class="enumerate" id="x1-5004x2">Put + <!--l. 359--><p class="noindent" ><hr><div title="Definition"><span +class="cmtt-10">\printnoidxglossary[sort=</span><span class="cmmi-10"><</span><span -class="cmti-10">full</span><span -class="cmmi-10">> </span>(<span +class="cmitt-10">order</span><span +class="cmmi-10">></span><span +class="cmtt-10">,</span><span class="cmmi-10"><</span><span -class="cmti-10">abbrv</span><span -class="cmmi-10">></span>). On subsequent use, only the abbreviation will appear. For -example: +class="cmitt-10">other options</span><span +class="cmmi-10">></span><span +class="cmtt-10">] </span></div><hr> + </p><!--l. 360--><p class="noindent" > + where you want your list of entries to appear. The sort <span +class="cmmi-10"><</span><span +class="cmti-10">order</span><span +class="cmmi-10">> </span>may be one + of: <span +class="cmtt-10">word </span>(word ordering), <span +class="cmtt-10">letter </span>(letter ordering), <span +class="cmtt-10">case </span>(case-sensitive + letter ordering), <span +class="cmtt-10">def </span>(in order of definition) or <span +class="cmtt-10">use </span>(in order of + use). + </p></li> + <li + class="enumerate" id="x1-5006x3">Run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> twice on your document. (As you would do to make a table of + contents appear.) For example, click twice on the “typeset” or “build” or + “PDF<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span>” button in your editor.</li></ol> + + + + </dd><dt class="description"> + </dt><dd +class="description"><a + id="option2"></a><span +class="cmbx-10">Option</span><span +class="cmbx-10"> 2</span>: + <!--l. 374--><p class="noindent" >This option uses an application called <span +class="cmtt-10">makeindex </span>to sort the entries. This + application comes with all modern <span class="TEX">T<span +class="E">E</span>X</span> distributions, but it’s hard-coded for the + non-extended Latin alphabet. This process involves making <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> write the + glossary information to a temporary file which <span +class="cmtt-10">makeindex </span>reads. Then <span +class="cmtt-10">makeindex</span> + writes a new file containing the code to typeset the glossary. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> then reads + this file on the next run. + </p><!--l. 382--><p class="noindent" > + </p><ol class="enumerate1" > + <li + class="enumerate" id="x1-5008x1">Add <span +class="cmtt-10">\makeglossaries </span>to your preamble (before you start defining your + entries). + </li> + <li + class="enumerate" id="x1-5010x2">Put + <!--l. 388--><p class="noindent" ><hr><div title="Definition"><span +class="cmtt-10">\printglossary[</span><span +class="cmmi-10"><</span><span +class="cmitt-10">options</span><span +class="cmmi-10">></span><span +class="cmtt-10">] </span></div><hr> + </p><!--l. 389--><p class="noindent" > + where you want your list of entries (glossary) to appear. + </p></li> + <li + class="enumerate" id="x1-5012x3">Run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> on your document. This creates files with the extensions <span +class="cmtt-10">.glo</span> + and <span +class="cmtt-10">.ist </span>(for example, if your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> document is called <span +class="cmtt-10">myDoc.tex</span>, then + you’ll have two extra files called <span +class="cmtt-10">myDoc.glo </span>and <span +class="cmtt-10">myDoc.ist</span>). If you look at + your document at this point, you won’t see the glossary as it hasn’t been + created yet. + </li> + <li + class="enumerate" id="x1-5014x4">Run <span +class="cmtt-10">makeindex </span>with the <span +class="cmtt-10">.glo </span>file as the input file and the <span +class="cmtt-10">.ist </span>file as the + style so that it creates an output file with the extension <span +class="cmtt-10">.gls</span>. If you have + access to a terminal or a command prompt (for example, the MSDOS + command prompt for Windows users or the bash console for Unix-like users) + then you need to run the command: + + + + <div class="verbatim" id="verbatim-17"> + makeindex -s myDoc.ist -o myDoc.gls myDoc.glo +</div> + <!--l. 407--><p class="nopar" > (Replace <span +class="cmtt-10">myDoc </span>with the base name of your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> document file. Avoid + spaces in the file name.) If you don’t know how to use the command + prompt, then you can probably access <span +class="cmtt-10">makeindex </span>via your text editor, + but each editor has a different method of doing this, so I can’t + give a general description. You will have to check your editor’s + manual. + </p><!--l. 415--><p class="noindent" >The default sort is word order (“sea lion” comes before “seal”). If you want + letter ordering you need to add the <span +class="cmtt-10">-l </span>switch: </p> - <div class="verbatim" id="verbatim-15"> -A \gls{svm} was implemented. + <div class="verbatim" id="verbatim-18"> + makeindex -l -s myDoc.ist -o myDoc.gls myDoc.glo </div> -<!--l. 283--><p class="nopar" > If this is the first time this term has been used, the above would produce: -<spacer type=vertical size=10><span class="obeylines-h"> - <br />A support vector machine (svm) was implemented. - <br /><spacer type=vertical size=10></span> -otherwise it would produce: <spacer type=vertical size=10><span class="obeylines-h"> - <br />A svm was implemented. - <br /><spacer type=vertical size=10></span> -If you prefer a different way of displaying the acronyms (for example, putting the long -form in a footnote on first use) it’s possible to change the acronym style. For further -details, see <a -href="glossaries-user.html#sec:acronyms" >Acronyms</a> in the main <span + <!--l. 420--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-5016x5">Once you have successfully completed the previous step, you can now run + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> on your document again.</li></ol> + </dd><dt class="description"> + </dt><dd +class="description"><a + id="option3"></a><span +class="cmbx-10">Option</span><span +class="cmbx-10"> 3</span>: + <!--l. 428--><p class="noindent" >This option uses an application called <span +class="cmtt-10">xindy </span>to sort the entries. This application + is more flexible than <span +class="cmtt-10">makeindex </span>and is able to sort extended Latin or non-Latin + alphabets. It comes with <span class="TEX">T<span +class="E">E</span>X</span> Live but not with MiK<span class="TEX">T<span +class="E">E</span>X</span>. Since <span +class="cmtt-10">xindy </span>is a Perl + script, if you are using MiK<span class="TEX">T<span +class="E">E</span>X</span> you will not only need to install <span +class="cmtt-10">xindy</span>, you + will also need to install Perl. In a similar way to <a +href="#option2">Option 2</a>, this option + involves making <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> write the glossary information to a temporary + file which <span +class="cmtt-10">xindy </span>reads. Then <span +class="cmtt-10">xindy </span>writes a new file containing the + code to typeset the glossary. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> then reads this file on the next + run. + </p><!--l. 440--><p class="noindent" > + </p><ol class="enumerate1" > + <li + class="enumerate" id="x1-5018x1">Add the <span +class="cmtt-10">xindy </span>option to the <span class="cmss-10">glossaries</span><a - id="dx1-6003"></a> user manual. -</p><!--l. 299--><p class="indent" > You can reset an acronym so that the next use fully expands it again using: -</p><!--l. 302--><p class="indent" > <hr><div title="Definition"><span -class="cmtt-10">\glsreset{</span><span + id="dx1-5019"></a> package option list: + + + + <div class="verbatim" id="verbatim-19"> + \usepackage[xindy]{glossaries} +</div> + <!--l. 445--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-5021x2">Add <span +class="cmtt-10">\makeglossaries </span>to your preamble (before you start defining your + entries). + </li> + <li + class="enumerate" id="x1-5023x3">Put + <!--l. 452--><p class="noindent" ><hr><div title="Definition"><span +class="cmtt-10">\printglossary[</span><span class="cmmi-10"><</span><span -class="cmitt-10">label</span><span +class="cmitt-10">options</span><span class="cmmi-10">></span><span -class="cmtt-10">} </span></div><hr> -</p><!--l. 303--><p class="noindent" > -or you can reset all acronyms using -</p><!--l. 306--><p class="indent" > <hr><div title="Definition"><span -class="cmtt-10">\glsresetall </span></div><hr> -</p><!--l. 307--><p class="noindent" > -For further details on resetting and unsetting acronyms, see <a -href="glossaries-user.html#sec:glsunset" >Unsetting and Resetting -Entry Flags</a> in the main <span +class="cmtt-10">] </span></div><hr> + </p><!--l. 453--><p class="noindent" > + where you want your list of entries (glossary) to appear. + </p></li> + <li + class="enumerate" id="x1-5025x4">Run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> on your document. This creates files with the extensions <span +class="cmtt-10">.glo</span> + and <span +class="cmtt-10">.xdy </span>(for example, if your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> document is called <span +class="cmtt-10">myDoc.tex</span>, then + you’ll have two extra files called <span +class="cmtt-10">myDoc.glo </span>and <span +class="cmtt-10">myDoc.xdy</span>). If you look at + your document at this point, you won’t see the glossary as it hasn’t been + created yet. + </li> + <li + class="enumerate" id="x1-5027x5">Run <span +class="cmtt-10">xindy </span>with the <span +class="cmtt-10">.glo </span>file as the input file and the <span +class="cmtt-10">.xdy </span>file as + a module so that it creates an output file with the extension <span +class="cmtt-10">.gls</span>. + You also need to set the language name and input encoding. If you + have access to a terminal or a command prompt (for example, the + MSDOS command prompt for Windows users or the bash console for + Unix-like users) then you need to run the command (all on one + line): + + + + <div class="verbatim" id="verbatim-20"> + xindy  -L english -C utf8 -I xindy -M myDoc +  <br />-t myDoc.glg -o myDoc.gls myDoc.glo +</div> + <!--l. 474--><p class="nopar" > (Replace <span +class="cmtt-10">myDoc </span>with the base name of your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> document file. Avoid + spaces in the file name. If necessary, also replace <span +class="cmtt-10">english </span>with the name of + your language and <span +class="cmtt-10">utf8 </span>with your input encoding.) If you don’t know how to + use the command prompt, then you can probably access <span +class="cmtt-10">xindy </span>via your text + editor, but each editor has a different method of doing this, so I can’t + give a general description. You will have to check your editor’s + manual. + </p><!--l. 484--><p class="noindent" >The default sort is word order (“sea lion” comes before “seal”). If you + want letter ordering you need to add the <span +class="cmtt-10">order=letter </span>package + option: + + + +</p> + <div class="verbatim" id="verbatim-21"> + \usepackage[xindy,order=letter]{glossaries} +</div> + <!--l. 489--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-5029x6">Once you have successfully completed the previous step, you can now run + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> on your document again. + </li></ol> + </dd></dl> +<!--l. 498--><p class="indent" > For Options <a +href="#option2">2</a> and <a +href="#option3">3</a>, it can be difficult to remember all the parameters required for +<span +class="cmtt-10">makeindex </span>or <span +class="cmtt-10">xindy</span>, so the <span class="cmss-10">glossaries</span><a - id="dx1-6004"></a> user manual. -</p><!--l. 313--><p class="noindent" > + id="dx1-5030"></a> package provides a script called <span +class="cmtt-10">makeglossaries</span> +that reads the <span +class="cmtt-10">.aux </span>file to determine what settings you have used and will then run +<span +class="cmtt-10">makeindex </span>or <span +class="cmtt-10">xindy</span>. Again, this is a command line application and can be run in +a terminal or command prompt. For example, if your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> document is in the file +<span +class="cmtt-10">myDoc.tex</span>, then run: + + + </p> -<!--l. 313--><p class="noindent" ><a -href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">6 </span> <a - id="x1-70006"></a>Displaying the Glossary or List of Acronyms</h3> -<!--l. 316--><p class="noindent" >In order to display the sorted list of terms, you first need to use -</p><!--l. 319--><p class="indent" > <hr><div title="Definition"><span -class="cmtt-10">\printglossaries </span></div><hr> -</p><!--l. 320--><p class="noindent" > -at the place where you want the glossary and list of acronyms to appear. Note that + <div class="verbatim" id="verbatim-22"> +makeglossaries myDoc +</div> +<!--l. 509--><p class="nopar" > (Replace <span +class="cmtt-10">myDoc </span>with the base name of your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> document file. Avoid +spaces in the file name.) If you don’t know how to use the command prompt, +you can probably access <span +class="cmtt-10">makeglossaries </span>via your text editor. Check your +editor’s manual for advice. If you are using <span +class="cmtt-10">arara </span>then you can just use the +directives: + + + +</p> + <div class="verbatim" id="verbatim-23"> + arara: pdflatex + <br /> arara: makeglossaries + <br /> arara: pdflatex +</div> +<!--l. 519--><p class="nopar" > +</p><!--l. 521--><p class="indent" > The <span +class="cmtt-10">makeglossaries </span>script is written in Perl, so you need a Perl interpreter +installed. If you are using a Unix-like operating system then you most likely have one +installed. If you are using Windows with the <span class="TEX">T<span +class="E">E</span>X</span> Live distribution, then you can use +the Perl interpreter that comes with <span class="TEX">T<span +class="E">E</span>X</span> Live. If you are using Windows and +MiK<span class="TEX">T<span +class="E">E</span>X</span> then you need to install a Perl distribution for Windows. If you are using +<a +href="#option3">Option 3</a>, then you need to do this anyway as <span +class="cmtt-10">xindy </span>is also written in Perl. If +you are using <a +href="#option2">Option 2</a> and can’t work out how to install Perl (or for some +reason don’t want to install it) then just use <span +class="cmtt-10">makeindex </span>directly, as described +above. +</p><!--l. 533--><p class="indent" > When sorting the entries, the string comparisons are made according to each entry’s +<span +class="cmtt-10">sort </span>key. If this is omitted, the <span +class="cmtt-10">name </span>key is used. For example, recall the earlier +definition: + + + +</p> + <div class="verbatim" id="verbatim-24"> +\newglossaryentry{elite} + <br />{ + <br />  name={{\’e}lite}, + <br />  description={select group or class} + <br />} +</div> +<!--l. 543--><p class="nopar" > No <span +class="cmtt-10">sort </span>key was used, so it’s set to the same as the <span +class="cmtt-10">name </span>key: <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">{\’e}lite</span></span></span>. How this is +interpreted depends on which option you have used: + </p><dl class="description"><dt class="description"> +<a +href="#option1"><span +class="cmbx-10">Option</span><span +class="cmbx-10"> 1</span></a><span +class="cmbx-10">:</span> </dt><dd +class="description">By default, the accent command will be stripped so the sort value + will be <span +class="cmtt-10">elite</span>. This will put the entry in the “E” letter group. If you use + the <span +class="cmss-10">sanitizesort=true</span><a + id="dx1-5031"></a> package option, the sort value will be interpreted as the + sequence of characters: <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">\</span></span></span> <span +class="cmtt-10">’ e l i t </span>and <span +class="cmtt-10">e</span>. This will place this entry before + the “A” letter group since it starts with a symbol. + </dd><dt class="description"> +<a +href="#option2"><span +class="cmbx-10">Option</span><span +class="cmbx-10"> 2</span></a><span +class="cmbx-10">:</span> </dt><dd +class="description">The sort key will be interpreted the sequence of characters: <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">{</span></span></span> <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">\</span></span></span> <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">’</span></span></span> <span +class="cmtt-10">e </span><span class="obeylines-h"><span class="verb"><span +class="cmtt-10">}</span></span></span> + <span +class="cmtt-10">l i t </span>and <span +class="cmtt-10">e</span>. The first character is an opening curly brace <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">{</span></span></span> so <span +class="cmtt-10">makeindex</span> + will put this entry in the “symbols” group. + </dd><dt class="description"> +<a +href="#option3"><span +class="cmbx-10">Option</span><span +class="cmbx-10"> 3</span></a><span +class="cmbx-10">:</span> </dt><dd +class="description"><span +class="cmtt-10">xindy </span>disregards <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> commands so it sorts on <span +class="cmtt-10">elite</span>, which puts + this entry in the “E” group.</dd></dl> +<!--l. 567--><p class="indent" > If the <span +class="cmss-10">inputenc</span><a + id="dx1-5032"></a> package is used and the entry is defined as: </p><div class="alltt"> +<div class="obeylines-v"> +<span class="verb"><span +class="cmtt-10">\newglossaryentry{elite}</span></span> +<br /><span class="verb"><span +class="cmtt-10">{</span></span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> name=</span><span class="verb"><span +class="cmtt-10">{{</span></span><span +class="cmtt-10">é</span><span class="verb"><span +class="cmtt-10">}lite},</span></span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> description=</span><span class="verb"><span +class="cmtt-10">{select</span><span +class="cmtt-10"> group</span><span +class="cmtt-10"> or</span><span +class="cmtt-10"> class}</span></span> +<br /><span class="verb"><span +class="cmtt-10">}</span></span> +</div> +</div> then: + <dl class="description"><dt class="description"> +<a +href="#option1"><span +class="cmbx-10">Option</span><span +class="cmbx-10"> 1</span></a><span +class="cmbx-10">:</span> </dt><dd +class="description">By default the sort value will be interpreted as <span +class="cmtt-10">elite </span>so the entry will + be put in the “E” letter group. If you use the <span +class="cmss-10">sanitizesort=true</span><a + id="dx1-5033"></a> package option, + the sort value will be interpreted as <span +class="cmtt-10">é</span><span +class="cmtt-10">lite </span>where é has been sanitized (so + it’s no longer an active character) which will put this entry before the “A” + letter group. + + + + </dd><dt class="description"> +<a +href="#option2"><span +class="cmbx-10">Option</span><span +class="cmbx-10"> 2</span></a><span +class="cmbx-10">:</span> </dt><dd +class="description"><span +class="cmtt-10">makeindex </span>doesn’t recognise <span +class="cmtt-10">é</span> as a letter so it will be put in the + symbols group. + </dd><dt class="description"> +<a +href="#option3"><span +class="cmbx-10">Option</span><span +class="cmbx-10"> 3</span></a><span +class="cmbx-10">:</span> </dt><dd +class="description"><span +class="cmtt-10">xindy </span>will correctly recognise the sort value <span +class="cmtt-10">é</span><span +class="cmtt-10">lite </span>and will place it + in whatever letter group is appropriate for the given language setting. (In + English, this would just be the “E” letter group.)</dd></dl> +<!--l. 593--><p class="indent" > Therefore if you have extended Latin or non-Latin characters, your best option is to +use <span +class="cmtt-10">xindy </span>(<a +href="#option3">Option 3</a>) with the <span +class="cmss-10">inputenc</span><a + id="dx1-5034"></a> package. If you use <span +class="cmtt-10">makeindex </span>(<a +href="#option2">Option 2</a>) you +need to specify the <span +class="cmtt-10">sort </span>key like this: + + + +</p> + <div class="verbatim" id="verbatim-25"> +\newglossaryentry{elite} + <br />{ + <br />  name={{\’e}lite}, + <br />  sort={elite}, + <br />  description={select group or class} + <br />} +</div> +<!--l. 604--><p class="nopar" > If you use <a +href="#option1">Option 1</a>, you may or may not need to use the <span +class="cmtt-10">sort </span>key, but you will need +to be careful about fragile commands in the <span +class="cmtt-10">name </span>key if you don’t set the <span +class="cmtt-10">sort</span> +key. +</p><!--l. 609--><p class="indent" > <a +href="#x1-50351">Table 1</a> summarises the pros and cons of three options described above. +</p> + <div class="table"> + + + +<!--l. 612--><p class="indent" > <a + id="x1-50351"></a></p><hr class="float" /><div class="float" +> + + + + <div class="caption" +><span class="id">Table 1: </span><span +class="content">Glossary Options: Pros and Cons</span></div><!--tex4ht:label?: x1-50351 --> +<div class="tabular"> <table id="TBL-2" class="tabular" +cellspacing="0" cellpadding="0" +><colgroup id="TBL-2-1g"><col +id="TBL-2-1" /><col +id="TBL-2-2" /><col +id="TBL-2-3" /><col +id="TBL-2-4" /></colgroup><tr + style="vertical-align:baseline;" id="TBL-2-1-"><td style="white-space:wrap; text-align:left;" id="TBL-2-1-1" +class="td11"> <!--l. 618--><p class="noindent" > </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-1-2" +class="td11"> <a +href="#option1"><span +class="cmbx-10">Option</span><span +class="cmbx-10"> 1</span></a> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-1-3" +class="td11"> <a +href="#option2"><span +class="cmbx-10">Option</span><span +class="cmbx-10"> 2</span></a> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-1-4" +class="td11"> <a +href="#option3"><span +class="cmbx-10">Option</span><span +class="cmbx-10"> 3</span></a> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-2-"><td style="white-space:wrap; text-align:left;" id="TBL-2-2-1" +class="td11"> <!--l. 619--><p class="noindent" >Requires + an + external + application? </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-2-2" +class="td11"> <span +class="pzdr-">✘ </span></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-2-3" +class="td11"> <span +class="pzdr-">✔ </span></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-2-4" +class="td11"> <span +class="pzdr-">✔ </span></td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-3-"><td style="white-space:wrap; text-align:left;" id="TBL-2-3-1" +class="td11"> <!--l. 621--><p class="noindent" >Requires + Perl? </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-3-2" +class="td11"> <span +class="pzdr-">✘ </span></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-3-3" +class="td11"> <span +class="pzdr-">✘ </span></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-3-4" +class="td11"> <span +class="pzdr-">✔ </span></td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-4-"><td style="white-space:wrap; text-align:left;" id="TBL-2-4-1" +class="td11"> <!--l. 623--><p class="noindent" >Can + sort + extended + Latin + or + non-Latin + alphabets? </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-4-2" +class="td11"> <span +class="pzdr-">✘</span><sup class="textsuperscript"><span +class="cmsy-9">†</span></sup> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-4-3" +class="td11"> <span +class="pzdr-">✘ </span></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-4-4" +class="td11"> <span +class="pzdr-">✔ </span></td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-5-"><td style="white-space:wrap; text-align:left;" id="TBL-2-5-1" +class="td11"> <!--l. 626--><p class="noindent" >Efficient + sort + algorithm? </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-5-2" +class="td11"> <span +class="pzdr-">✘ </span></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-5-3" +class="td11"> <span +class="pzdr-">✔ </span></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-5-4" +class="td11"> <span +class="pzdr-">✔ </span></td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-6-"><td style="white-space:wrap; text-align:left;" id="TBL-2-6-1" +class="td11"> <!--l. 628--><p class="noindent" >Can + form + ranges + in + the + location + lists? </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-6-2" +class="td11"> <span +class="pzdr-">✘ </span></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-6-3" +class="td11"> <span +class="pzdr-">✔ </span></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-6-4" +class="td11"> <span +class="pzdr-">✔ </span></td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-7-"><td style="white-space:wrap; text-align:left;" id="TBL-2-7-1" +class="td11"> <!--l. 630--><p class="noindent" >Can + have + non-standard + locations? </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-7-2" +class="td11"> <span +class="pzdr-">✔ </span></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-7-3" +class="td11"> <span +class="pzdr-">✘ </span></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-7-4" +class="td11"> <span +class="pzdr-">✔ </span></td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-8-"><td style="white-space:wrap; text-align:left;" id="TBL-2-8-1" +class="td11"> <!--l. 632--><p class="noindent" ><span +class="cmtt-10">\newglossaryentry</span><a + id="dx1-5036"></a> + restricted + to + preamble? </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-8-2" +class="td11"> <span +class="pzdr-">✔ </span></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-8-3" +class="td11"> <span +class="pzdr-">✘ </span></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-8-4" +class="td11"> <span +class="pzdr-">✘ </span></td> +</tr></table></div> +<!--l. 636--><p class="noindent" ><sup class="textsuperscript"><span +class="cmsy-9">†</span></sup> Strips standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> accents so, for example, <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">\AA</span></span></span> is treated the same as +A. + + + +</p> + </div><hr class="endfloat" /> + </div> +<!--l. 640--><p class="noindent" ><a +href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">5 </span> <a + id="sec:glosstyle"></a>Customising the Glossary</h3> +<!--l. 643--><p class="noindent" >The default glossary style uses the <span +class="cmtt-10">description </span>environment to display the entry list. +Each entry name is set in the optional argument of <span +class="cmtt-10">\item </span>which means that it will +typically be displayed in bold. You can switch to medium weight by redefining <span -class="cmtt-10">\printglossaries </span>won’t produce any text the first time you create your document, -as an external indexing application needs to be used to sort and collate the -entries. Creating the completed document is therefore <span -class="cmti-10">at least </span>a three step -process. -</p><!--l. 328--><p class="indent" > Suppose your document is called <span -class="cmtt-10">myDoc.tex</span>, then you need to: +class="cmtt-10">\glsnamefont</span>: + + + +</p> + <div class="verbatim" id="verbatim-26"> +\renewcommand*{\glsnamefont}[1]{\textmd{#1}} +</div> +<!--l. 650--><p class="nopar" > +</p><!--l. 652--><p class="indent" > By default, a full stop is appended to the description. To prevent this from +happening use the <span +class="cmtt-10">nopostdot </span>package option: + + + +</p> + <div class="verbatim" id="verbatim-27"> +\usepackage[nopostdot]{glossaries} +</div> +<!--l. 656--><p class="nopar" > +</p><!--l. 658--><p class="indent" > By default, a location list is displayed for each entry. This refers to the document +locations (for example, the page number) where the entry has been referenced. If you +use Options <a +href="#option2">2</a> or <a +href="#option3">3</a> described in <a +href="#sec:printglossaries"><span +class="cmsy-10">§</span>4 </a><a +href="#sec:printglossaries">Displaying a List of Entries<!--tex4ht:ref: sec:printglossaries --></a> location ranges will be +compressed. For example, if an entry was used on pages 1, 2 and 3, with Options <a +href="#option2">2</a> +or <a +href="#option3">3</a> the location list will appear as 1–3, but with <a +href="#option1">Option 1</a> it will appear as 1, 2, 3. If +you don’t want the locations displayed you can hide them using the <span +class="cmtt-10">nonumberlist</span> +package option: + + + +</p> + <div class="verbatim" id="verbatim-28"> +\usepackage[nonumberlist]{glossaries} +</div> +<!--l. 668--><p class="nopar" > +</p><!--l. 670--><p class="indent" > Entries are grouped according to the first letter of each entry’s <span +class="cmtt-10">sort </span>key. By default +a vertical gap is placed between letter groups. You can suppress this with the +<span +class="cmtt-10">nogroupskip </span>package option: + + + +</p> + <div class="verbatim" id="verbatim-29"> +\usepackage[nogroupskip]{glossaries} +</div> +<!--l. 676--><p class="nopar" > +</p><!--l. 678--><p class="indent" > If the default style doesn’t suit your document, you can change the style +using: +</p><!--l. 681--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\setglossarystyle{</span><span +class="cmmi-10"><</span><span +class="cmitt-10">style name</span><span +class="cmmi-10">></span><span +class="cmtt-10">} </span></div><hr> +</p><!--l. 682--><p class="noindent" > +There are a number of predefined styles. Glossaries can vary from a list of symbols +with a terse description to a list of words or phrases with descriptions that span +multiple paragraphs, so there’s no “one style fits all” solution. You need to choose +a style that suits your document. +</p><!--l. 689--><p class="indent" > Examples: </p><ol class="enumerate1" > <li - class="enumerate" id="x1-7002x1">Build/<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span -class="E">E</span>X</span></span> your document, either by clicking on an appropriate button in - your front-end/text editor or by typing the following at a terminal/command - prompt: + class="enumerate" id="x1-6002x1">You have entries where the name is a symbol and the description is a brief phrase + or short sentence. Try one of the “mcol” styles defined in the <span +class="cmss-10">glossary-mcols</span><a + id="dx1-6003"></a> + package. For example: - <div class="verbatim" id="verbatim-16"> - latex myDoc + <div class="verbatim" id="verbatim-30"> + \usepackage[nogroupskip,nopostdot]{glossaries} +  <br />\usepackage{glossary-mcols} +  <br />\setglossarystyle{mcolindex} </div> - <!--l. 336--><p class="nopar" > + <!--l. 698--><p class="nopar" > </p></li> <li - class="enumerate" id="x1-7004x2">Run the indexing application on the external file(s) created by the <span + class="enumerate" id="x1-6005x2">You have entries where the name is a word or phrase and the description spans + multiple paragraphs. Try one of the “altlist” styles. For example: + + + + <div class="verbatim" id="verbatim-31"> + \usepackage[nopostdot]{glossaries} +  <br />\setglossarystyle{altlist} +</div> + <!--l. 706--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-6007x3">You have entries where the name is a single word, the description is + brief, and an associated symbol has been set. Use one of the styles that + display the symbol (not all of them do). For example, one of the tabular + styles: + + + + <div class="verbatim" id="verbatim-32"> + \usepackage[nopostdot,nonumberlist]{glossaries} +  <br />\setglossarystyle{long4col} +</div> + <!--l. 715--><p class="nopar" > or one of the “tree” styles: + + + +</p> + <div class="verbatim" id="verbatim-33"> + \usepackage[nopostdot,nonumberlist]{glossaries} +  <br />\setglossarystyle{tree} +</div> + <!--l. 720--><p class="nopar" ></p></li></ol> +<!--l. 723--><p class="indent" > If your glossary consists of a list of acronyms and you also want to specify +a description as well as the long form, then you need to use an acronym style that +will suit the glossary style. For example, use the <span +class="cmtt-10">long-short-desc </span>acronym +style: + + + +</p> + <div class="verbatim" id="verbatim-34"> +\setacronymstyle{long-short-desc} +</div> +<!--l. 729--><p class="nopar" > Define the acronyms with a description: + + + +</p> + <div class="verbatim" id="verbatim-35"> +\newacronym + <br /> [description={statistical pattern recognition technique}] + <br /> {svm}{svm}{support vector machine} +</div> +<!--l. 735--><p class="nopar" > Choose a glossary style that suits wide entry names: + + + +</p> + <div class="verbatim" id="verbatim-36"> +\setglossarystyle{altlist} +</div> +<!--l. 739--><p class="nopar" > +</p><!--l. 741--><p class="noindent" > +</p> +<!--l. 741--><p class="noindent" ><a +href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">6 </span> <a + id="sec:multigloss"></a>Multiple Glossaries</h3> +<!--l. 744--><p class="noindent" >The <span class="cmss-10">glossaries</span><a - id="dx1-7005"></a> - package. If you have used the <span -class="cmss-10">xindy</span><a - id="dx1-7006"></a> package option, you must use <span -class="cmtt-10">xindy</span><a - id="dx1-7007"></a>, - otherwise you must use <span -class="cmtt-10">makeindex</span><a - id="dx1-7008"></a>. The <span + id="dx1-7001"></a> package predefines a default <span +class="cmtt-10">main </span>glossary. When you define an entry +(using one of the commands described in <a +href="#sec:defterm"><span +class="cmsy-10">§</span>1 </a><a +href="#sec:defterm">Defining Terms<!--tex4ht:ref: sec:defterm --></a>), that entry is +automatically assigned to the default glossary, unless you indicate otherwise using the +<span +class="cmtt-10">type </span>key. However you first need to make sure the desired glossary has been defined. +This is done using: +</p><!--l. 751--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\newglossary[</span><span +class="cmmi-10"><</span><span +class="cmitt-10">glg</span><span +class="cmmi-10">></span><span +class="cmtt-10">]{</span><span +class="cmmi-10"><</span><span +class="cmitt-10">label</span><span +class="cmmi-10">></span><span +class="cmtt-10">}{</span><span +class="cmmi-10"><</span><span +class="cmitt-10">gls</span><span +class="cmmi-10">></span><span +class="cmtt-10">}{</span><span +class="cmmi-10"><</span><span +class="cmitt-10">glo</span><span +class="cmmi-10">></span><span +class="cmtt-10">}{</span><span +class="cmmi-10"><</span><span +class="cmitt-10">title</span><span +class="cmmi-10">></span><span +class="cmtt-10">} </span></div><hr> +</p><!--l. 752--><p class="noindent" > +The <span +class="cmmi-10"><</span><span +class="cmti-10">label</span><span +class="cmmi-10">> </span>is a label that uniquely identifies this new glossary. As with other types of +identifying labels, be careful not to use active characters in <span +class="cmmi-10"><</span><span +class="cmti-10">label</span><span +class="cmmi-10">></span>. The final +argument <span +class="cmmi-10"><</span><span +class="cmti-10">title</span><span +class="cmmi-10">> </span>is the section or chapter heading used by <span +class="cmtt-10">\printglossary </span>or +<span +class="cmtt-10">\printnoidxglossary</span>. The other arguments indicate the file extensions used +by <span +class="cmtt-10">makeindex</span>/<span +class="cmtt-10">xindy </span>(described in <a +href="#sec:printglossaries"><span +class="cmsy-10">§</span>4 </a><a +href="#sec:printglossaries">Displaying a List of Entries<!--tex4ht:ref: sec:printglossaries --></a>). If you +use <a +href="#option1">Option 1</a> described above, the <span +class="cmmi-10"><</span><span +class="cmti-10">glg</span><span +class="cmmi-10">></span>, <span +class="cmmi-10"><</span><span +class="cmti-10">gls</span><span +class="cmmi-10">> </span>and <span +class="cmmi-10"><</span><span +class="cmti-10">glo</span><span +class="cmmi-10">> </span>arguments are +ignored. In the case of Options <a +href="#option2">2</a> or <a +href="#option3">3</a>, all glossary definitions must come before +<span +class="cmtt-10">\makeglossaries</span>. +</p><!--l. 765--><p class="indent" > Since it’s quite common for documents to have both a list of terms and a list of +acronyms, the <span class="cmss-10">glossaries</span><a - id="dx1-7009"></a> package comes with a - convenient Perl wrapper that calls the appropriate indexing application the - required number of times with the required options. If you have Perl installed, all - you need to do is type - - - - <div class="verbatim" id="verbatim-17"> - makeglossaries myDoc -</div> - <!--l. 347--><p class="nopar" > in a terminal or command prompt. If you are using a front-end (such as WinEdt - or TeXnicCenter) and you want it to automatically run makeglossaries - when you build your document, you will need to consult the front-end’s - documentation. - </p><!--l. 353--><p class="noindent" >If you don’t have Perl installed, you will need to call <span -class="cmtt-10">makeindex</span><a - id="dx1-7010"></a> or <span -class="cmtt-10">xindy</span><a - id="dx1-7011"></a> - explicitly. This is more complicated and is described in <a -href="glossaries-user.html#sec:makeglossaries" >Generating the Associated - Glossary Files</a> in the main <span + id="dx1-7002"></a> package provides the package option <span +class="cmtt-10">acronyms</span>, which is +a convenient shortcut for + + + +</p> + <div class="verbatim" id="verbatim-37"> +\newglossary[alg]{acronym}{acr}{acn}{\acronymname} +</div> +<!--l. 770--><p class="nopar" > It also changes the behaviour of <span +class="cmtt-10">\newacronym </span>so that acronyms are automatically put +in the list of acronyms instead of the main glossary. +</p><!--l. 775--><p class="indent" > For example, suppose you want a main glossary for terms, a list of acronyms and +a list of notation: + + + +</p> + <div class="verbatim" id="verbatim-38"> +\usepackage[acronyms]{glossaries} + <br />\newglossary[nlg]{notation}{not}{ntn}{Notation} +</div> +<!--l. 780--><p class="nopar" > After <span +class="cmtt-10">\makeglossaries </span>(or <span +class="cmtt-10">\makenoidxglossaries</span>) you can define the entries. For +example: + + + +</p> + <div class="verbatim" id="verbatim-39"> +\newglossaryentry{gls:set} + <br />{% This entry goes in the ‘main’ glossary + <br />  name=set, + <br />  description={A collection of distinct objects} + <br />} + <br /> This entry goes in the ‘acronym’ glossary: + <br />\newacronym{svm}{svm}{support vector machine} + <br />\newglossaryentry{not:set} + <br />{% This entry goes in the ‘notation’ glossary: + <br />  type=notation, + <br />  name={\ensuremath{\mathcal{S}}}, + <br />  description={A set}, + <br />  sort={S}} +</div> +<!--l. 799--><p class="nopar" > or if you don’t like using <span +class="cmtt-10">\ensuremath</span>: + + + +</p> + <div class="verbatim" id="verbatim-40"> +\newglossaryentry{not:set} + <br />{% This entry goes in the ‘notation’ glossary: + <br />  type=notation, + <br />  name={$\mathcal{S}$}, + <br />  text={\mathcal{S}}, + <br />  description={A set}, + <br />  sort={S}} +</div> +<!--l. 809--><p class="nopar" > +</p><!--l. 811--><p class="indent" > Each glossary is displayed using: +</p><!--l. 813--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\printnoidxglossary[type=</span><span +class="cmmi-10"><</span><span +class="cmitt-10">type</span><span +class="cmmi-10">></span><span +class="cmtt-10">] </span></div><hr> +</p><!--l. 814--><p class="noindent" > +(<a +href="#option1">Option 1</a>) or +</p><!--l. 817--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\printglossary[type=</span><span +class="cmmi-10"><</span><span +class="cmitt-10">type</span><span +class="cmmi-10">></span><span +class="cmtt-10">] </span></div><hr> +</p><!--l. 818--><p class="noindent" > +(Options <a +href="#option2">2</a> and <a +href="#option3">3</a>). Where <span +class="cmmi-10"><</span><span +class="cmti-10">type</span><span +class="cmmi-10">> </span>is the glossary label. If the type is omitted the +default <span +class="cmtt-10">main </span>glossary is assumed. +</p><!--l. 822--><p class="indent" > There’s a convenient shortcut that will display all the defined glossaries: +</p><!--l. 825--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\printnoidxglossaries </span></div><hr> +</p><!--l. 826--><p class="noindent" > +(<a +href="#option1">Option 1</a>) or +</p><!--l. 829--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\printglossaries </span></div><hr> +</p><!--l. 830--><p class="noindent" > +(Options <a +href="#option2">2</a> and <a +href="#option3">3</a>). +</p><!--l. 833--><p class="indent" > If you use <a +href="#option1">Option 1</a>, you don’t need to do anything else. If you use Options <a +href="#option2">2</a> or <a +href="#option3">3</a> +with the <span +class="cmtt-10">makeglossaries </span>Perl script, you similarly don’t need to do anything +else. If you use Options <a +href="#option2">2</a> or <a +href="#option3">3</a> without the <span +class="cmtt-10">makeglossaries </span>Perl script then +you need to make sure you run <span +class="cmtt-10">makeindex</span>/<span +class="cmtt-10">xindy </span><span +class="cmti-10">for each defined glossary</span>. +The <span +class="cmmi-10"><</span><span +class="cmti-10">gls</span><span +class="cmmi-10">> </span>and <span +class="cmmi-10"><</span><span +class="cmti-10">glo</span><span +class="cmmi-10">> </span>arguments of <span +class="cmtt-10">\newglossary </span>specify the file extensions +to use instead of <span +class="cmtt-10">.gls </span>and <span +class="cmtt-10">.glo</span>. The optional argument <span +class="cmmi-10"><</span><span +class="cmti-10">glg</span><span +class="cmmi-10">> </span>is the file +extension for the transcript file. This should be different for each glossary in +case you need to check for <span +class="cmtt-10">makeindex</span>/<span +class="cmtt-10">xindy </span>errors or warnings if things go +wrong. +</p><!--l. 846--><p class="indent" > For example, suppose you have three glossaries in your document (<span +class="cmtt-10">main</span>, <span +class="cmtt-10">acronym</span> +and <span +class="cmtt-10">notation</span>), specified using: + + + +</p> + <div class="verbatim" id="verbatim-41"> +\usepackage[acronyms]{glossaries} + <br />\newglossary[nlg]{notation}{not}{ntn}{Notation} +</div> +<!--l. 852--><p class="nopar" > Then (assuming your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> document is in a file called <span +class="cmtt-10">myDoc.tex</span>): +</p><!--l. 856--><p class="indent" > + </p><dl class="description"><dt class="description"> + </dt><dd +class="description"><a +href="#option2">Option 2</a>: + <!--l. 859--><p class="noindent" >You need to run <span +class="cmtt-10">makeindex </span>three times: + + + +</p> + <div class="verbatim" id="verbatim-42"> + makeindex -t myDoc.glg -s myDoc.ist -o myDoc.gls myDoc.glo +  <br />makeindex -t myDoc.alg -s myDoc.ist -o myDoc.acr myDoc.acn +  <br />makeindex -t myDoc.nlg -s myDoc.ist -o myDoc.not myDoc.ntn +</div> + <!--l. 864--><p class="nopar" > + </p></dd><dt class="description"> + </dt><dd +class="description"><a +href="#option3">Option 3</a>: + <!--l. 868--><p class="noindent" >You need to run <span +class="cmtt-10">xindy </span>three times (be careful not to insert line breaks where the + line has wrapped.) + + + +</p> + <div class="verbatim" id="verbatim-43"> + xindy  -L english -C utf8 -I xindy -M myDoc -t myDoc.glg +  <br />-o myDoc.gls myDoc.glo +  <br />xindy  -L english -C utf8 -I xindy -M myDoc -t myDoc.alg +  <br />-o myDoc.acr myDoc.acn +  <br />xindy  -L english -C utf8 -I xindy -M myDoc -t myDoc.nlg +  <br />-o myDoc.not myDoc.ntn +</div> + <!--l. 877--><p class="nopar" ></p></dd></dl> +<!--l. 880--><p class="noindent" > +</p> +<!--l. 880--><p class="noindent" ><a +href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">7 </span> <a + id="sec:hyperref"></a><span +class="cmss-10">glossaries </span>and <span +class="cmss-10">hyperref</span></h3> +<!--l. 883--><p class="noindent" >Take care if you use the <span class="cmss-10">glossaries</span><a - id="dx1-7012"></a> user manual. - </p></li> - <li - class="enumerate" id="x1-7014x3">Once you have successfully run the indexing application, you need to - build/<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span -class="E">E</span>X</span></span> your document again (see step 1).</li></ol> -<!--l. 362--><p class="noindent" >Note that sometimes you may have to repeat steps 2 and 3. -</p><!--l. 364--><p class="indent" > The appearance of the glossary depends on the glossary style in use. The default -style uses the <span -class="cmss-10">description</span><a - id="dx1-7015"></a><a - id="dx1-7016"></a> environment, but there are many other styles available. These -are described in <a -href="glossaries-user.html#sec:styles" >Glossary Styles</a> in the main <span + id="dx1-8001"></a> package with <span +class="cmss-10">hyperref</span><a + id="dx1-8002"></a>. Contrary to the usual +advice that <span +class="cmss-10">hyperref</span><a + id="dx1-8003"></a> should be loaded last, <span class="cmss-10">glossaries</span><a - id="dx1-7017"></a> user manual. By default, a -number or list of numbers will appear after each entry in the glossary. This indicates -the page (or pages) on which the term was used. This list can be suppressed using the + id="dx1-8004"></a> must be loaded <span +class="cmti-10">after</span> +<span +class="cmss-10">hyperref</span><a + id="dx1-8005"></a>: + + + +</p> + <div class="verbatim" id="verbatim-44"> +\usepackage[colorlinks]{hyperref} + <br />\usepackage{glossaries} +</div> +<!--l. 890--><p class="nopar" > If you use <span +class="cmss-10">hyperref</span><a + id="dx1-8006"></a> make sure you use PDF<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> rather than the <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> to DVI +engine. The DVI format can’t break hyperlinks across a line so long glossary +entries (such as the full form of acronyms) won’t line wrap with the DVI engine. +Also, hyperlinks in sub- or superscripts aren’t correctly sized with the DVI +format. +</p><!--l. 897--><p class="indent" > By default, if the <span +class="cmss-10">hyperref</span><a + id="dx1-8007"></a> package has been loaded, commands like <span +class="cmtt-10">\gls </span>will form +a hyperlink to the relevant entry in the glossary. If you don’t want this to happen for <span -class="cmss-10">nonumberlist</span><a - id="dx1-7018"></a> package option: +class="cmti-10">all </span>your glossaries, then use +</p><!--l. 902--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\glsdisablehyper </span></div><hr> +</p><!--l. 903--><p class="noindent" > +If you want hyperlinks suppressed for entries in specific glossaries, then use the +<span +class="cmtt-10">nohypertypes </span>package option. For example, if you don’t want hyperlinks for entries in +the <span +class="cmtt-10">acronym </span>and <span +class="cmtt-10">notation </span>glossaries but you do want them for entries in the <span +class="cmtt-10">main</span> +glossary, then do: </p> - <div class="verbatim" id="verbatim-18"> -\usepackage[nonumberlist]{glossaries} + <div class="verbatim" id="verbatim-45"> +\usepackage[colorlinks]{hyperref} + <br />\usepackage[acronym,nohypertypes={acronym,notation}]{glossaries} + <br />\newglossary[nlg]{notation}{not}{ntn}{Notation} +</div> +<!--l. 913--><p class="nopar" > +</p><!--l. 915--><p class="indent" > If you want the hyperlinks suppressed the first time an entry is used, but you want +hyperlinks for subsequence references then use the <span +class="cmtt-10">hyperfirst=false </span>package +option: + + + +</p> + <div class="verbatim" id="verbatim-46"> +\usepackage[colorlinks]{hyperref} + <br />\usepackage[hyperfirst=false]{glossaries} </div> -<!--l. 375--><p class="nopar" > -</p><!--l. 377--><p class="indent" > Further information can be found in the main <span +<!--l. 921--><p class="nopar" > +</p><!--l. 923--><p class="indent" > Take care not to use non-expandable commands in PDF bookmarks. This +isn’t specific to the <span class="cmss-10">glossaries</span><a - id="dx1-7019"></a> <a -href="glossaries-user.html" >user manual</a> and there is -also an <a + id="dx1-8008"></a> package but is a limitation of PDF bookmarks. +Non-expandable commands include commands like <span +class="cmtt-10">\gls</span>, <span +class="cmtt-10">\glspl</span>, <span +class="cmtt-10">\Gls </span>and <span +class="cmtt-10">\Glspl</span>. +The <span +class="cmss-10">hyperref</span><a + id="dx1-8009"></a> package provides a way of specifying alternative text for the PDF +bookmarks via <span +class="cmtt-10">\texorpdfstring</span>. For example: + + + +</p> + <div class="verbatim" id="verbatim-47"> +\section{The \texorpdfstring{\gls{fishage}}{Fish Age}} +</div> +<!--l. 931--><p class="nopar" > However, it’s not a good idea to use commands like <span +class="cmtt-10">\gls </span>in a section heading as +you’ll end up with the table of contents in your location list. Instead you can +use +</p><!--l. 936--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\glsentrytext{</span><span +class="cmmi-10"><</span><span +class="cmitt-10">label</span><span +class="cmmi-10">></span><span +class="cmtt-10">} </span></div><hr> +</p><!--l. 937--><p class="noindent" > +This is expandable provided that the <span +class="cmtt-10">text </span>key doesn’t containing non-expandable code. +For example, the following works: + + + +</p> + <div class="verbatim" id="verbatim-48"> +\section{The \glsentrytext{fishage}} +</div> +<!--l. 942--><p class="nopar" > and it doesn’t put the table of contents in the location list. +</p><!--l. 945--><p class="noindent" > +</p> +<!--l. 945--><p class="noindent" ><a +href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">8 </span> <a + id="sec:xr"></a>Cross-References</h3> +<!--l. 948--><p class="noindent" >You can add a reference to another entry in a location list using the <span +class="cmtt-10">see={</span><span +class="cmmi-10"><</span><span +class="cmti-10">label</span><span +class="cmmi-10">></span><span +class="cmtt-10">}</span> +key when you define an entry. The referenced entry must also be defined. +</p><!--l. 952--><p class="indent" > For example: + + + +</p> + <div class="verbatim" id="verbatim-49"> +\longnewglossaryentry{devonian}{name={Devonian}}% + <br />{% + <br />  The geologic period spanning from the end of the + <br />  Silurian Period to the beginning of the Carboniferous Period. + <br />  This age was known for its remarkable variety of + <br />  fish species. + <br />} + <br />\newglossaryentry{fishage} + <br />{ + <br />  name={Fish Age}, + <br />  description={Common name for the Devonian period}, + <br />  see={devonian} + <br />} +</div> +<!--l. 969--><p class="nopar" > The cross-reference will appear as “<span +class="cmti-10">see </span>Devonian”. You can change the “see” tag using +the format <span +class="cmtt-10">see=[</span><span +class="cmmi-10"><</span><span +class="cmti-10">tag</span><span +class="cmmi-10">></span><span +class="cmtt-10">]</span><span +class="cmmi-10"><</span><span +class="cmti-10">label</span><span +class="cmmi-10">></span>. For example: + + + +</p> + <div class="verbatim" id="verbatim-50"> +\newglossaryentry{latinalph} + <br />{ + <br />  name={Latin alphabet}, + <br />  description={alphabet consisting of the letters + <br />  a, \ldots, z, A, \ldots, Z}, + <br />  see=[see also]{exlatinalph} + <br />} + <br />\newglossaryentry{exlatinalph} + <br />{ + <br />   name={extended Latin alphabet}, + <br />   description={The Latin alphabet extended to include + <br />   other letters such as ligatures or diacritics.} + <br />} +</div> +<!--l. 987--><p class="nopar" > If you use the <span +class="cmtt-10">see </span>key in the optional argument of <span +class="cmtt-10">\newacronym</span>, make sure you +enclose the value in braces. For example: + + + +</p> + <div class="verbatim" id="verbatim-51"> +\newacronym{ksvm}{ksvm}{kernel support vector machine} + <br />\newacronym + <br /> [see={[see also]{ksvm}}] + <br /> {svm}{svm}{support vector machine} +</div> +<!--l. 996--><p class="nopar" > +</p><!--l. 998--><p class="noindent" > +</p> +<!--l. 998--><p class="noindent" ><a +href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">9 </span> <a + id="sec:moreinfo"></a>Further Information</h3> +<!--l. 1001--><p class="noindent" >Further information can be found in the main <span +class="cmss-10">glossaries</span><a + id="dx1-10001"></a> <a +href="glossaries-user.html" >user manual</a> and there is also +an <a href="http://www.latex-community.org/index.php?option=com_content&view=article&id=263:glossaries-nomenclature-lists-of-symbols-and-acronyms&catid=55:latex-general&Itemid=114" >article on the glossaries package</a> on the <a href="http://www.latex-community.org/" ><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span -class="E">E</span>X</span></span> Community’s</a> Know How -section. </p> +class="E">E</span>X</span></span> Community’s</a> Know How section +and a chapter on the <span +class="cmss-10">glossaries</span><a + id="dx1-10002"></a> package in <a +href="http://www.dickimaw-books.com/latex/thesis/" >Using <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> to Write a PhD Thesis</a>. +</p> </body></html> |