diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/glossaries/glossariesbegin.html |
Initial commit
Diffstat (limited to 'macros/latex/contrib/glossaries/glossariesbegin.html')
-rw-r--r-- | macros/latex/contrib/glossaries/glossariesbegin.html | 3949 |
1 files changed, 3949 insertions, 0 deletions
diff --git a/macros/latex/contrib/glossaries/glossariesbegin.html b/macros/latex/contrib/glossaries/glossariesbegin.html new file mode 100644 index 0000000000..ff79fcb0ef --- /dev/null +++ b/macros/latex/contrib/glossaries/glossariesbegin.html @@ -0,0 +1,3949 @@ +<?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--> +<html xmlns="http://www.w3.org/1999/xhtml" +> +<head><title></title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)" /> +<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)" /> +<!-- xhtml,fn-in,css-in,uni-html4,utf8 --> +<meta name="src" content="glossariesbegin.tex" /> + +<style type="text/css"> +<!-- + +/* start css.sty */ +.cmr-17{font-size:170%;} +.cmr-12{font-size:120%;} +.cmr-8{font-size:80%;} +.cmtt-12{font-size:120%;font-family: monospace;} +.cmtt-12{font-family: monospace;} +.cmtt-12{font-family: monospace;} +.cmtt-12{font-family: monospace;} +.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;} +.cmss-9{ font-family: sans-serif;} +.cmtt-10{font-family: monospace;} +.cmtt-10{font-family: monospace;} +.cmtt-10{font-family: monospace;} +.cmtt-10{font-family: monospace;} +.cmss-10{ font-family: sans-serif;} +.cmss-10{ font-family: sans-serif;} +.cmss-10{ font-family: sans-serif;} +.cmti-10{ font-style: italic;} +.cmtt-9{font-size:90%;font-family: monospace;} +.cmtt-9{font-family: monospace;} +.cmtt-9{font-family: monospace;} +.cmtt-9{font-family: monospace;} +.cmitt-10{font-family: monospace; font-style: italic;} +.cmbx-10{ font-weight: bold;} +.cmbx-10{ font-weight: bold;} +.cmsy-9{font-size:90%;} +.cmss-8{font-size:80%; font-family: sans-serif;} +.cmss-8{ font-family: sans-serif;} +.cmss-8{ font-family: sans-serif;} +.small-caps{font-variant: small-caps; } +p.noindent { text-indent: 0em } +td p.noindent { text-indent: 0em; margin-top:0em; } +p.nopar { text-indent: 0em; } +p.indent{ text-indent: 1.5em } +@media print {div.crosslinks {visibility:hidden;}} +a img { border-top: 0; border-left: 0; border-right: 0; } +center { margin-top:1em; margin-bottom:1em; } +td center { margin-top:0em; margin-bottom:0em; } +.Canvas { position:relative; } +img.math{vertical-align:middle;} +li p.indent { text-indent: 0em } +li p:first-child{ margin-top:0em; } +li p:last-child, li div:last-child { margin-bottom:0.5em; } +li p~ul:last-child, li p~ol:last-child{ margin-bottom:0.5em; } +.enumerate1 {list-style-type:decimal;} +.enumerate2 {list-style-type:lower-alpha;} +.enumerate3 {list-style-type:lower-roman;} +.enumerate4 {list-style-type:upper-alpha;} +div.newtheorem { margin-bottom: 2em; margin-top: 2em;} +.obeylines-h,.obeylines-v {white-space: nowrap; } +div.obeylines-v p { margin-top:0; margin-bottom:0; } +.overline{ text-decoration:overline; } +.overline img{ border-top: 1px solid black; } +td.displaylines {text-align:center; white-space:nowrap;} +.centerline {text-align:center;} +.rightline {text-align:right;} +div.verbatim {font-family: monospace; white-space: nowrap; text-align:left; clear:both; } +.fbox {padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +div.fbox {display:table} +div.center div.fbox {text-align:center; clear:both; padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +div.minipage{width:100%;} +div.center, div.center div.center {text-align: center; margin-left:1em; margin-right:1em;} +div.center div {text-align: left;} +div.flushright, div.flushright div.flushright {text-align: right;} +div.flushright div {text-align: left;} +div.flushleft {text-align: left;} +.underline{ text-decoration:underline; } +.underline img{ border-bottom: 1px solid black; margin-bottom:1pt; } +.framebox-c, .framebox-l, .framebox-r { padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +.framebox-c {text-align:center;} +.framebox-l {text-align:left;} +.framebox-r {text-align:right;} +span.thank-mark{ vertical-align: super } +span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } +div.footnotes{border-top:solid 1px black; border-bottom:solid 1px black; padding-bottom:1ex; padding-top:0.5ex; margin-right:15%; margin-top:2ex; font-style:italic; font-size:85%;} +div.footnotes p{margin-top:0; margin-bottom:0; text-indent:0;} +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; } +.tabbing-right {text-align:right;} +span.TEX {letter-spacing: -0.125em; } +span.TEX span.E{ position:relative;top:0.5ex;left:-0.0417em;} +a span.TEX span.E {text-decoration: none; } +span.LATEX span.A{ position:relative; top:-0.5ex; left:-0.4em; font-size:85%;} +span.LATEX span.TEX{ position:relative; left: -0.4em; } +div.float, div.figure {margin-left: auto; margin-right: auto;} +div.float img {text-align:center;} +div.figure img {text-align:center;} +.marginpar {width:20%; float:right; text-align:left; margin-left:auto; margin-top:0.5em; font-size:85%; text-decoration:underline;} +.marginpar p{margin-top:0.4em; margin-bottom:0.4em;} +table.equation {width:100%;} +.equation td{text-align:center; } +td.equation { margin-top:1em; margin-bottom:1em; } +td.equation-label { width:5%; text-align:center; } +td.eqnarray4 { width:5%; white-space: normal; } +td.eqnarray2 { width:5%; } +table.eqnarray-star, table.eqnarray {width:100%;} +div.eqnarray{text-align:center;} +div.array {text-align:center;} +div.pmatrix {text-align:center;} +table.pmatrix {width:100%;} +span.pmatrix img{vertical-align:middle;} +div.pmatrix {text-align:center;} +table.pmatrix {width:100%;} +span.bar-css {text-decoration:overline;} +img.cdots{vertical-align:middle;} +.partToc a, .partToc, .likepartToc a, .likepartToc {line-height: 200%; font-weight:bold; font-size:110%;} +.index-item, .index-subitem, .index-subsubitem {display:block} +div.caption {text-indent:-2em; margin-left:3em; margin-right:1em; text-align:left;} +div.caption span.id{font-weight: bold; white-space: nowrap; } +h1.partHead{text-align: center} +p.bibitem { text-indent: -2em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +p.bibitem-p { text-indent: 0em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +.paragraphHead, .likeparagraphHead { margin-top:2em; font-weight: bold;} +.subparagraphHead, .likesubparagraphHead { font-weight: bold;} +.quote {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; margin-right:1em; text-align:justify;} +.verse{white-space:nowrap; margin-left:2em} +div.maketitle {text-align:center;} +h2.titleHead{text-align:center;} +div.maketitle{ margin-bottom: 2em; } +div.author, div.date {text-align:center;} +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:95%; 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;} +span#textcolor1{color:#00FF00} +span#textcolor2{color:#00FF00} +span#textcolor3{color:#00FF00} +span#textcolor4{color:#FF0000} +span#textcolor5{color:#00FF00} +span#textcolor6{color:#FF0000} +span#textcolor7{color:#FF0000} +span#textcolor8{color:#FF0000} +span#textcolor9{color:#00FF00} +span#textcolor10{color:#00FF00} +span#textcolor11{color:#FF0000} +span#textcolor12{color:#00FF00} +span#textcolor13{color:#00FF00} +span#textcolor14{color:#00FF00} +span#textcolor15{color:#00FF00} +span#textcolor16{color:#FF0000} +span#textcolor17{color:#FF0000} +span#textcolor18{color:#FF0000} +span#textcolor19{color:#00FF00} +span#textcolor20{color:#00FF00} +span#textcolor21{color:#FF0000} +span#textcolor22{color:#00FF00} +span#textcolor23{color:#00FF00} +span#textcolor24{color:#00FF00} +span#textcolor25{color:#00FF00} +span#textcolor26{color:#FF0000} +span#textcolor27{color:#FF0000} +span#textcolor28{color:#00FF00} +span#textcolor29{color:#FF0000} +span#textcolor30{color:#FF0000} +span#textcolor31{color:#FF0000} +span#textcolor32{color:#00FF00} +span#textcolor33{color:#FF0000} +span#textcolor34{color:#00FF00} +span#textcolor35{color:#00FF00} +span#textcolor36{color:#00FF00} +span#textcolor37{color:#00FF00} +span#textcolor38{color:#FF0000} +span#textcolor39{color:#00FF00} +span#textcolor40{color:#00FF00} +/* end css.sty */ + + +--> +</style> +</head><body +> +<!--l. 55--><p class="noindent" ><a + id="top"></a> +</p><!--l. 55--><p class="indent" > + + + +</p><!--l. 55--><p class="indent" > + + + +</p> +<div class="center" +> +<!--l. 55--><p class="noindent" > +</p><!--l. 55--><p class="noindent" ><span +class="cmr-17">The glossaries package v4.42: a guide for</span> +<span +class="cmr-17">beginners</span> +</p> +<div class="tabular"> <table id="TBL-1" class="tabular" +cellspacing="0" cellpadding="0" +><colgroup id="TBL-1-1g"><col +id="TBL-1-1" /></colgroup><tr + style="vertical-align:baseline;" id="TBL-1-1-"><td style="white-space:nowrap; text-align:center;" id="TBL-1-1-1" +class="td11"> <span +class="cmr-12">Nicola L.C. Talbot </span></td></tr></table> +</div> +<!--l. 55--><p class="noindent" ><span +class="cmr-12">2019-01-06</span></p></div> + <div +class="abstract" +> +<div class="center" +> +<!--l. 57--><p class="noindent" > +</p><!--l. 57--><p class="noindent" ><span +class="cmbx-9">Abstract</span></p></div> + <!--l. 58--><p class="indent" > <span +class="cmr-9">The </span><span +class="cmss-9">glossaries </span><span +class="cmr-9">package is very flexible, but this means that it has a</span><span +class="cmr-9"> lot</span> + <span +class="cmr-9">of options, and since a user guide is supposed to provide a complete list</span> + <span +class="cmr-9">of all the high-level user commands, the main user manual is quite big.</span> + <span +class="cmr-9">This can be rather daunting for beginners, so this document is a brief</span> + <span +class="cmr-9">introduction just to help get you started. If you find yourself saying, “Yeah,</span> + <span +class="cmr-9">but how can I do</span><span +class="cmr-9">…?” then it’s time to move on to the </span><a +href="glossaries-user.html" ><span +class="cmr-9">main user manual</span></a><span +class="cmr-9">.</span> + </p><!--l. 67--><p class="indent" > <span +class="cmr-9">I’ve made some statements in this document that don’t actually tell</span> + <span +class="cmr-9">you the full truth, but it would clutter the document and cause confusion</span> + <span +class="cmr-9">if I keep writing “except when </span><span +class="cmr-9">…” or “but you can also do this, that or</span> + <span +class="cmr-9">the other” or “you can do it this way but you can also do it that way, but</span> + <span +class="cmr-9">that way may cause complications under certain circumstances”.</span> +</p> +</div> + <h3 class="likesectionHead"><a + id="x1-1000"></a>Contents</h3> + <div class="tableofcontents"> + <span class="sectionToc" >1 <a +href="#sec:start" id="QQ2-1-2">Getting Started</a></span> + + + +<br /> <span class="sectionToc" >2 <a +href="#sec:defterm" id="QQ2-1-3">Defining Terms</a></span> +<br /> <span class="sectionToc" >3 <a +href="#sec:useterm" id="QQ2-1-4">Using Entries</a></span> +<br /> <span class="sectionToc" >4 <a +href="#sec:printglossaries" id="QQ2-1-5">Displaying a List of Entries</a></span> +<br /> <span class="sectionToc" >5 <a +href="#sec:glosstyle" id="QQ2-1-7">Customising the Glossary</a></span> +<br /> <span class="sectionToc" >6 <a +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. 77--><p class="noindent" > +</p> +<!--l. 77--><p class="noindent" ><a +href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">1 </span> <a + id="sec:start"></a>Getting Started</h3> +<!--l. 80--><p class="noindent" >As with all packages, you need to load <span +class="cmss-10">glossaries </span>with <span +class="cmtt-10">\usepackage</span>, but +there are certain packages that must be loaded before <span +class="cmss-10">glossaries</span>, <span +class="cmti-10">if </span>they are +required: <span +class="cmss-10">hyperref</span><a + id="dx1-2001"></a>, <span +class="cmss-10">babel</span><a + id="dx1-2002"></a>, <span +class="cmss-10">polyglossia</span><a + id="dx1-2003"></a>, <span +class="cmss-10">inputenc</span><a + id="dx1-2004"></a> and <span +class="cmss-10">fontenc</span><a + id="dx1-2005"></a>. (You don’t have +to load these packages, but if you want them, you must load them before +<span +class="cmss-10">glossaries</span>.) +</p><!--l. 87--><p class="indent" > <div class="important" title="Important Note"> If you require multilingual support you must also install the relevant +language module. Each language module is called <span +class="cmtt-10">glossaries-</span>⟨<span +class="cmti-10">language</span>⟩, where +⟨<span +class="cmti-10">language</span>⟩ is the root language name. For example, <span +class="cmtt-10">glossaries-french </span>or +<span +class="cmtt-10">glossaries-german</span>. If a language module is required, the <span +class="cmss-10">glossaries </span>package will +automatically try to load it and will give a warning if the module isn’t found. +</div> +</p><!--l. 95--><p class="noindent" > +</p><!--l. 97--><p class="indent" > Once you have loaded <span +class="cmss-10">glossaries</span>, you need to define your terms in the +preamble and then you can use them throughout the document. Here’s a simple +example: + + + +</p> + <div class="verbatim" id="verbatim-1"> + \documentclass{article} + <br /> \usepackage{glossaries} + <br /> \newglossaryentry{ex}{name={sample},description={an example}} + <br /> \begin{document} + <br /> Here's my \gls{ex} term. + <br /> \end{document} +</div> +<!--l. 110--><p class="nopar" > This produces: + </p><div class="quote"> + <!--l. 113--><p class="noindent" >Here’s my sample term.</p></div> +<!--l. 115--><p class="noindent" >Here’s another example: + + + +</p> + <div class="verbatim" id="verbatim-2"> + \documentclass{article} + <br /> \usepackage{glossaries} + <br /> \setacronymstyle{long-short} + <br /> \newacronym{svm}{SVM}{support vector machine} + <br /> \begin{document} + <br /> First use: \gls{svm}. Second use: \gls{svm}. + <br /> \end{document} +</div> +<!--l. 128--><p class="nopar" > This produces: + </p><div class="quote"> + <!--l. 131--><p class="noindent" >First use: support vector machine (SVM). Second use: SVM.</p></div> +<!--l. 133--><p class="noindent" >In this case, the text produced by <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">\gls{svm}</span></span></span> changed after the first use. The first use +produced the long form followed by the short form in parentheses because I set the +acronym style to <span +class="cmtt-10">long-short</span>. I suggest you try the above two examples to +make sure you have the package correctly installed. If you get an <span +class="cmtt-10">undefined</span> +<span +class="cmtt-10">control sequence </span>error, check that the version number at the top of this +document matches the version you have installed. (Open the <span +class="cmtt-10">.log </span>file and search +for the line that starts with <span +class="cmtt-10">Package: glossaries </span>followed by a date and +version.) +</p><!--l. 144--><p class="indent" > <div class="important" title="Important Note"> Be careful of fragile commands. If a command causes a problem when used in one +of the <span +class="cmtt-10">\newglossaryentry </span>fields, consider adding <span +class="cmtt-10">\glsnoexpandfields </span>before you +start defining your entries. </div> +</p><!--l. 148--><p class="noindent" > +</p><!--l. 150--><p class="indent" > Abbreviations are slightly different if you use the extension package <span +class="cmss-10">glossaries-extra</span><a + id="dx1-2006"></a> +(which needs to be installed separately): + + + +</p> + <div class="verbatim" id="verbatim-3"> + \documentclass{article} + <br /> \usepackage{glossaries-extra} + <br /> \setabbreviationstyle{long-short}% glossaries-extra.sty + <br /> \newabbreviation{svm}{SVM}{support vector machine}% glossaries-extra.sty + <br /> \begin{document} + <br /> First use: \gls{svm}. Second use: \gls{svm}. + <br /> \end{document} +</div> +<!--l. 164--><p class="nopar" > If you still want to use <span +class="cmtt-10">\newacronym </span>(rather than <span +class="cmtt-10">\newabbreviation</span>) then you need +the optional argument of <span +class="cmtt-10">\setabbreviationstyle</span>: + + + +</p> + <div class="verbatim" id="verbatim-4"> + \documentclass{article} + <br /> \usepackage{glossaries-extra} + <br /> \setabbreviationstyle[acronym]{long-short}% glossaries-extra.sty only + <br /> \newacronym{svm}{SVM}{support vector machine} + <br /> \begin{document} + <br /> First use: \gls{svm}. Second use: \gls{svm}. + <br /> \end{document} +</div> +<!--l. 180--><p class="nopar" > +</p><!--l. 181--><p class="indent" > <div class="important" title="Important Note"> You can’t use <span +class="cmtt-10">\setacronymstyle </span>with <span +class="cmss-10">glossaries-extra</span><a + id="dx1-2007"></a>. </div> +</p><!--l. 183--><p class="noindent" > +</p><!--l. 185--><p class="indent" > If you like, you can put all your definitions in another file (for example, +<span +class="cmtt-10">defns.tex</span>) and load that file in the preamble using <span +class="cmtt-10">\loadglsentries </span>with the +filename as the argument. For example: + + + +</p> + <div class="verbatim" id="verbatim-5"> +\loadglsentries{defns} +</div> +<!--l. 190--><p class="nopar" > If you find you have a really large number of definitions that are hard to manage in a +<span +class="cmtt-10">.tex </span>file, you might want to have a look at <span +class="cmtt-10">bib2gls</span><a + id="dx1-2008"></a> (installed separately) which +requires a <span +class="cmtt-10">.bib </span>format instead that can be managed by an application such as +JabRef. +</p><!--l. 197--><p class="indent" > Don’t try inserting formatting commands into the definitions as they can interfere +with the underlying mechanism. Instead, the formatting should be done by the +style. For example, suppose I want to replace <span +class="cmtt-10">SVM </span>with <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">\textsc{svm}</span></span></span>, then +I need to select a style that uses <span +class="cmtt-10">\textsc</span>, like this (for the base <span +class="cmss-10">glossaries</span> +style): + + + +</p> + <div class="verbatim" id="verbatim-6"> + \documentclass{article} + <br /> \usepackage{glossaries} + <br /> \setacronymstyle{long-sc-short} + <br /> \newacronym{svm}{svm}{support vector machine} + <br /> \begin{document} + <br /> First use: \gls{svm}. Second use: \gls{svm}. + <br /> \end{document} +</div> +<!--l. 215--><p class="nopar" > The abbreviation styles have a different naming scheme with <span +class="cmss-10">glossaries-extra</span><a + id="dx1-2009"></a>: + + + +</p> + <div class="verbatim" id="verbatim-7"> + \documentclass{article} + <br /> \usepackage{glossaries-extra} + <br /> \setabbreviationstyle{long-short-sc}% glossaries-extra.sty + <br /> \newabbreviation{svm}{svm}{support vector machine}% glossaries-extra.sty + <br /> \begin{document} + <br /> First use: \gls{svm}. Second use: \gls{svm}. + <br /> \end{document} +</div> +<!--l. 230--><p class="nopar" > With <span +class="cmss-10">glossaries-extra</span><a + id="dx1-2010"></a> you can have multiple abbreviation styles for different +categories. Many of these styles have their own associated formatting commands that +can be redefined for minor adjustments. For example: + + + +</p> + <div class="verbatim" id="verbatim-8"> + \documentclass{article} + <br /> \usepackage{glossaries-extra} + <br /> \setabbreviationstyle[statistical]{long-short-sc} + <br /> \setabbreviationstyle[bacteria]{long-only-short-only} + <br /> % Formatting commands used by 'long-only-short-only' style: + <br /> \renewcommand*{\glsabbrvonlyfont}[1]{\emph{#1}} + <br /> \renewcommand*{\glslongonlyfont}[1]{\emph{#1}} + <br /> % Formatting command used by 'long-short-sc' style: + <br /> % (make sure abbreviation is converted to lower case) + <br /> \renewcommand*{\glsabbrvscfont}[1]{\textsc{\MakeLowercase{#1}}} + <br /> \newabbreviation + <br />  [ + <br />    category={statistical}% glossaries-extra.sty key + <br />  ] + <br />  {svm}{SVM}{support vector machine} + <br /> \newabbreviation + <br />  [ + <br />    category={bacteria}% glossaries-extra.sty key + <br />  ] + <br />  {cbot}{C.~botulinum}{Clostridium botulinum} + <br /> \begin{document} + <br /> First use: \gls{svm}, \gls{cbot}. + <br /> Next use: \gls{svm}, \gls{cbot}. + <br /> \end{document} +</div> +<!--l. 268--><p class="nopar" > This produces: + </p><div class="quote"> + <!--l. 271--><p class="noindent" >First use: support vector machine (<span +class="cmcsc-10"><span +class="small-caps">s</span><span +class="small-caps">v</span><span +class="small-caps">m</span></span>), <span +class="cmti-10">Clostridium botulinum</span>. + </p><!--l. 274--><p class="noindent" >Next use: <span +class="cmcsc-10"><span +class="small-caps">s</span><span +class="small-caps">v</span><span +class="small-caps">m</span></span>, <span +class="cmti-10">C.</span><span +class="cmti-10"> botulinum</span>.</p></div> +<!--l. 277--><p class="indent" > As you can hopefully see from the above examples, there are two main ways of +defining a term: as a general entry (<span +class="cmtt-10">\newglossaryentry</span>) or as an abbreviation +(<span +class="cmtt-10">\newacronym </span>or, with <span +class="cmss-10">glossaries-extra</span><a + id="dx1-2011"></a>, <span +class="cmtt-10">\newabbreviation</span>). +</p><!--l. 282--><p class="indent" > Regardless of the method of defining a term, the term is always given a label. In + + + +the first example, the label was <span +class="cmtt-10">ex </span>and in the other examples the label was <span +class="cmtt-10">svm </span>(and +<span +class="cmtt-10">cbot </span>in the last example). The label is used to uniquely identify the term (like the +standard <span +class="cmtt-10">\label</span>/<span +class="cmtt-10">\ref </span>or <span +class="cmtt-10">\cite </span>mechanism). It’s best to just use the following +alphanumerics in the labels: <span +class="cmtt-10">a</span>, …, <span +class="cmtt-10">z</span>, <span +class="cmtt-10">A</span>, …, <span +class="cmtt-10">Z</span>, <span +class="cmtt-10">0</span>, …, <span +class="cmtt-10">9</span>. Sometimes you can also use +punctuation characters but not if another package (such as <span +class="cmss-10">babel</span><a + id="dx1-2012"></a>) meddles with +them. Don’t try using any characters outside of the basic Latin set with +<span +class="cmss-10">inputenc</span><a + id="dx1-2013"></a> (for example, é or ß) or things will go horribly wrong. This warning +only applies to the label. It doesn’t apply to the text that appears in the +document. +</p><!--l. 297--><p class="indent" > <div class="important" title="Important Note"> Don’t use <span +class="cmtt-10">\gls </span>in chapter or section headings as it can have some unpleasant +side-effects. Instead use <span +class="cmtt-10">\glsentrytext </span>for regular entries and one of <span +class="cmtt-10">\glsentryshort</span>, +<span +class="cmtt-10">\glsentrylong </span>or <span +class="cmtt-10">\glsentryfull </span>for acronyms. Alternatively use <span +class="cmss-10">glossaries-extra</span><a + id="dx1-2014"></a> +which provides special commands for use in section headings, such as <span +class="cmtt-10">\glsfmtshort</span> +<span +class="cmtt-10">{</span>⟨<span +class="cmti-10">label</span>⟩<span +class="cmtt-10">}</span>. </div> +</p><!--l. 304--><p class="noindent" > +</p><!--l. 306--><p class="indent" > The above examples are reasonably straightforward. The difficulty comes if you +want to display a <span +class="cmti-10">sorted </span>list of all the entries you have used in the document. The +<span +class="cmss-10">glossaries-extra</span><a + id="dx1-2015"></a> package provides a really easy way of listing all the defined +entries: + + + +</p> + <div class="verbatim" id="verbatim-9"> + \documentclass{article} + <br /> \usepackage[sort=none]{glossaries-extra} + <br /> \newglossaryentry{potato}{name={potato},plural={potatoes}, + <br />  description={starchy tuber}} + <br /> \newglossaryentry{cabbage}{name={cabbage}, + <br />  description={vegetable with thick green or purple leaves}} + <br /> \newglossaryentry{turnip}{name={turnip}, + <br />  description={round pale root vegetable}} + <br /> \newglossaryentry{carrot}{name={carrot}, + <br />  description={orange root}} + <br /> \begin{document} + <br /> Chop the \gls{cabbage}, \glspl{potato} and \glspl{carrot}. + <br /> \printunsrtglossaries % list all entries + <br /> \end{document} +</div> +<!--l. 332--><p class="nopar" > However this method doesn’t sort the entries (they’re listed in order of definition) +and it will display all the defined entries, regardless of whether or not you’ve used +them all in the document, so “turnip” appears in the glossary even though there’s no +<span class="obeylines-h"><span class="verb"><span +class="cmtt-10">\gls{turnip}</span></span></span> (or similar) in the document. +</p><!--l. 339--><p class="indent" > The <span +class="cmss-10">sort=none</span><a + id="dx1-2016"></a> option isn’t essential in this case (there’s no other sort option +available for this document), but it prevents the automatic construction of the sort +value and so slightly improves the document build time. +</p><!--l. 344--><p class="indent" > Note that this example document uses the same command (<span +class="cmtt-10">\printunsrtglossaries</span>) +that’s used with <span +class="cmtt-10">bib2gls</span><a + id="dx1-2017"></a> (<a +href="#option4">Option 4</a>) but with <span +class="cmtt-10">bib2gls</span><a + id="dx1-2018"></a> you instead need to use the +<span +class="cmss-10">record</span><a + id="dx1-2019"></a> package option and one or more instances of <span +class="cmtt-10">\GlsXtrLoadResources </span>in the +preamble (see below). +</p><!--l. 350--><p class="indent" > Most users prefer to have an automatically sorted list that only contains entries +that have been used in the document. The <span +class="cmss-10">glossaries </span>package provides three options: +use <span class="TEX">T<span +class="E">E</span>X</span> to perform the sorting (<a +href="#option1">Option 1</a>); use <span +class="cmtt-10">makeindex</span><a + id="dx1-2020"></a> to perform +the sorting (<a +href="#option2">Option 2</a>); use <span +class="cmtt-10">xindy</span><a + id="dx1-2021"></a> to perform the sorting (<a +href="#option3">Option 3</a>). The +extension package <span +class="cmss-10">glossaries-extra</span><a + id="dx1-2022"></a> provides a fourth method: use <span +class="cmtt-10">bib2gls</span><a + id="dx1-2023"></a> +(<a +href="#option4">Option 4</a>). +</p><!--l. 358--><p class="indent" > The first option (using <span class="TEX">T<span +class="E">E</span>X</span>) is the simplest method, as it doesn’t require an +external tool, but it’s very inefficient and the sorting is done according to the English +alphabet. To use this method, add <span +class="cmtt-10">\makenoidxglossaries </span>to the preamble and put +<span +class="cmtt-10">\printnoidxglossaries </span>at the place where you want your glossary. For + + + +example: + + + +</p> + <div class="verbatim" id="verbatim-10"> + \documentclass{article} + <br /> \usepackage{glossaries} + <br /> \makenoidxglossaries % use TeX to sort + <br /> \newglossaryentry{potato}{name={potato},plural={potatoes}, + <br />  description={starchy tuber}} + <br /> \newglossaryentry{cabbage}{name={cabbage}, + <br />  description={vegetable with thick green or purple leaves}} + <br /> \newglossaryentry{turnip}{name={turnip}, + <br />  description={round pale root vegetable}} + <br /> \newglossaryentry{carrot}{name={carrot}, + <br />  description={orange root}} + <br /> \begin{document} + <br /> Chop the \gls{cabbage}, \glspl{potato} and \glspl{carrot}. + <br /> \printnoidxglossaries + <br /> \end{document} +</div> +<!--l. 388--><p class="nopar" > +</p><!--l. 390--><p class="indent" > <div class="important" title="Important Note"> The <span +class="cmtt-10">\makenoidxglossaries </span>method is very slow, uses an ASCII comparator and +often breaks if there are commands in the <span +class="cmtt-10">name </span>key. </div> +</p><!--l. 394--><p class="noindent" > +</p><!--l. 396--><p class="indent" > Try this out and run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> (or pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span>) <span +class="cmti-10">twice</span>. The first run won’t show the +glossary. It will only appear on the second run. This doesn’t include “turnip” in the +glossary because that term hasn’t been used (with commands like <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">\gls{turnip}</span></span></span>) in +the document. +</p><!--l. 401--><p class="indent" > The glossary has a vertical gap between the “carrot” term and the “potato” term. +This is because the entries in the glossaries are grouped according to their +first letter. If you don’t want this gap, just add <span +class="cmss-10">nogroupskip</span><a + id="dx1-2024"></a> to the package +options: + + + +</p> + <div class="verbatim" id="verbatim-11"> +\usepackage[nogroupskip]{glossaries} +</div> +<!--l. 407--><p class="nopar" > or you may want to try out a style that shows the group headings: + + + +</p> + <div class="verbatim" id="verbatim-12"> +\usepackage[style=indexgroup]{glossaries} +</div> +<!--l. 411--><p class="nopar" > If you try out this example you may also notice that the description is followed by a +full stop (period) and a number. The number is the location in the document where +the entry was used (page 1 in this case), so you can lookup the term in the glossary +and be directed to the relevant pages. It may be that you don’t want this +back-reference, in which case you can suppress it using the <span +class="cmss-10">nonumberlist</span><a + id="dx1-2025"></a> package +option: + + + +</p> + <div class="verbatim" id="verbatim-13"> +\usepackage[nonumberlist]{glossaries} +</div> +<!--l. 421--><p class="nopar" > If you don’t like the terminating full stop, you can suppress that with the <span +class="cmss-10">nopostdot</span><a + id="dx1-2026"></a> +package option: + + + +</p> + <div class="verbatim" id="verbatim-14"> +\usepackage[nopostdot]{glossaries} +</div> +<!--l. 426--><p class="nopar" > +</p><!--l. 428--><p class="indent" > If you tried out the previous example with <span +class="cmss-10">glossaries-extra</span><a + id="dx1-2027"></a> and <span +class="cmtt-10">\printunsrtglossaries</span> +the terminating full stop is missing and there are no number lists. You can add the +full stop back with + + + +</p> + <div class="verbatim" id="verbatim-15"> +\usepackage[nopostdot=false]{glossaries-extra} +</div> +<!--l. 433--><p class="nopar" > or + + + +</p> + <div class="verbatim" id="verbatim-16"> +\usepackage[postdot]{glossaries-extra} +</div> +<!--l. 437--><p class="nopar" > If you want the number lists then you need to use an indexing option. +</p><!--l. 441--><p class="indent" > You may have noticed that I’ve used another command in the above example: +<span +class="cmtt-10">\glspl</span>. This displays the plural form. By default, this is just the singular form with +the letter “s” appended, but in the case of “potato” I had to specify the correct +plural using the <span +class="cmtt-10">plural </span>key. +</p><!--l. 447--><p class="indent" > As I mentioned earlier, using <span class="TEX">T<span +class="E">E</span>X</span> to sort the entries is the simplest but least +efficient method. If you have a large glossary or if your terms contain non-Latin or +extended Latin characters, then you will have a much faster build time if you use +<span +class="cmtt-10">makeindex</span><a + id="dx1-2028"></a> (<a +href="#option2">Option 2</a>) or <span +class="cmtt-10">xindy</span><a + id="dx1-2029"></a> (<a +href="#option3">Option 3</a>) or <span +class="cmtt-10">bib2gls</span><a + id="dx1-2030"></a> (<a +href="#option4">Option 4</a>). If you are using +extended Latin or non-Latin characters, then <span +class="cmtt-10">xindy</span><a + id="dx1-2031"></a> or <span +class="cmtt-10">bib2gls</span><a + id="dx1-2032"></a> are the +recommended methods. These methods are described in more detail 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>. +</p><!--l. 457--><p class="indent" > The rest of this document briefly describes the main commands provided by the +<span +class="cmss-10">glossaries </span>package. (Most of these are also available with <span +class="cmss-10">glossaries-extra</span><a + id="dx1-2033"></a> but may +behave slightly differently.) +</p><!--l. 462--><p class="noindent" > +</p> +<!--l. 462--><p class="noindent" ><a +href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">2 </span> <a + id="sec:defterm"></a>Defining Terms</h3> +<!--l. 465--><p class="noindent" >When you use the <span +class="cmss-10">glossaries</span><a + id="dx1-3001"></a> package, you need to define glossary entries in the +document preamble. These entries could be a word, phrase, abbreviation 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. 472--><p class="indent" > <hr><div title="Definition"></p><div class="alltt"> +<div class="obeylines-v"> +<span +class="cmtt-10">\newglossaryentry{</span>⟨<span +class="cmitt-10">label</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="cmitt-10">name</span>⟩<span +class="cmtt-10">},</span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> description={</span>⟨<span +class="cmitt-10">description</span>⟩<span +class="cmtt-10">},</span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> </span>⟨<span +class="cmitt-10">other</span><span +class="cmitt-10"> options</span>⟩ +<br /><span class="verb"><span +class="cmtt-10">}</span></span> +</div> +</div> </div><hr> + + + +<!--l. 480--><p class="noindent" > +where ⟨<span +class="cmti-10">label</span>⟩ is a unique label that identifies this entry. (Don’t include the angle +brackets ⟨ ⟩. They just indicate the parts of the code you need to change when you use +this command in your document.) The ⟨<span +class="cmti-10">name</span>⟩ is the word, phrase or symbol +you are defining, and ⟨<span +class="cmti-10">description</span>⟩ is the description to be displayed in the +glossary. +</p><!--l. 488--><p class="indent" > This command is a “short” command, which means that ⟨<span +class="cmti-10">description</span>⟩ can’t +contain a paragraph break. If you have a long description, you can instead +use: +</p><!--l. 492--><p class="indent" > <hr><div title="Definition"></p><div class="alltt"> +<div class="obeylines-v"> +<span +class="cmtt-10">\longnewglossaryentry{</span>⟨<span +class="cmitt-10">label</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="cmitt-10">name</span>⟩<span +class="cmtt-10">},</span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> </span>⟨<span +class="cmitt-10">other</span><span +class="cmitt-10"> options</span>⟩ +<br /><span class="verb"><span +class="cmtt-10">}</span></span> +<br /><span +class="cmtt-10">{</span>⟨<span +class="cmitt-10">description</span>⟩<span +class="cmtt-10">}</span> +</div> +</div> </div><hr> +<!--l. 500--><p class="noindent" > +</p><!--l. 502--><p class="indent" > Examples: + </p><ol class="enumerate1" > + <li + class="enumerate" id="x1-3003x1">Define the term “set” with the label <span +class="cmtt-10">set</span>: + + + + <div class="verbatim" id="verbatim-17"> + \newglossaryentry{set} +  <br />{ +  <br />  name={set}, +  <br />  description={a collection of objects} +  <br />} +</div> + <!--l. 511--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-3005x2">Define the symbol <span +class="cmsy-10">∅ </span>with the label <span +class="cmtt-10">emptyset</span>: + + + + <div class="verbatim" id="verbatim-18"> + \newglossaryentry{emptyset} +  <br />{ +  <br />  name={\ensuremath{\emptyset}}, +  <br />  description={the empty set} +  <br />} +</div> + <!--l. 521--><p class="nopar" > (This will also need a <span +class="cmtt-10">sort </span>key if you use Options <a +href="#option1">1</a> or <a +href="#option3">3</a>, see below.) + </p></li> + <li + class="enumerate" id="x1-3007x3">Define the phrase “Fish Age” with the label <span +class="cmtt-10">fishage</span>: + + + + <div class="verbatim" id="verbatim-19"> + \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 />  This age was known for its remarkable variety of +  <br />  fish species. +  <br />} +</div> + <!--l. 538--><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-3009x4">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-3010"></a> package such + as <span +class="cmtt-10">é</span>). This first letter must be placed in a group: + + + + <div class="verbatim" id="verbatim-20"> + \newglossaryentry{elite} +  <br />{ +  <br />  name={{\'e}lite}, +  <br />  description={select group or class} +  <br />} +</div> + <!--l. 554--><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. 564--><p class="noindent" >(For further details, see the section “UTF-8” of the <a +href="https://ctan.org/pkg/mfirstuc" ><span +class="cmss-10">mfirstuc</span></a> user manual.) +</p><!--l. 567--><p class="indent" > If you use <span +class="cmtt-10">bib2gls</span><a + id="dx1-3011"></a> with <span +class="cmss-10">glossaries-extra</span><a + id="dx1-3012"></a> then the terms must be defined in a <span +class="cmtt-10">.bib</span> +file. For example: </p><div class="alltt"> +<div class="obeylines-v"> +<span +class="cmtt-10">%</span><span +class="cmtt-10"> Encoding:</span><span +class="cmtt-10"> UTF-8</span> +<br /> +<br /><span +class="cmtt-10">@entry</span><span +class="cmsy-10">{</span><span +class="cmtt-10">set,</span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> name=</span><span +class="cmsy-10">{</span><span +class="cmtt-10">set</span><span +class="cmsy-10">}</span><span +class="cmtt-10">,</span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> description=</span><span +class="cmsy-10">{</span><span +class="cmtt-10">a</span><span +class="cmtt-10"> collection</span><span +class="cmtt-10"> of</span><span +class="cmtt-10"> objects</span><span +class="cmsy-10">}</span> +<br /><span +class="cmsy-10">}</span> +<br /> +<br /><span +class="cmtt-10">@entry</span><span +class="cmsy-10">{</span><span +class="cmtt-10">emptyset,</span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> name=</span><span class="verb"><span +class="cmtt-10">{\ensuremath{\emptyset}}</span></span><span +class="cmtt-10">,</span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> description=</span><span +class="cmsy-10">{</span><span +class="cmtt-10">the</span><span +class="cmtt-10"> empty</span><span +class="cmtt-10"> set</span><span +class="cmsy-10">}</span> +<br /><span +class="cmsy-10">}</span> +<br /> +<br /><span +class="cmtt-10">@entry</span><span +class="cmsy-10">{</span><span +class="cmtt-10">fishage,</span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> name=</span><span +class="cmsy-10">{</span><span +class="cmtt-10">Fish</span><span +class="cmtt-10"> Age</span><span +class="cmsy-10">}</span><span +class="cmtt-10">,</span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> description=</span><span +class="cmsy-10">{</span><span +class="cmtt-10">A</span><span +class="cmtt-10"> common</span><span +class="cmtt-10"> name</span><span +class="cmtt-10"> for</span><span +class="cmtt-10"> the</span><span +class="cmtt-10"> Devonian</span><span +class="cmtt-10"> geologic</span><span +class="cmtt-10"> period</span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> spanning</span><span +class="cmtt-10"> from</span><span +class="cmtt-10"> the</span><span +class="cmtt-10"> end</span><span +class="cmtt-10"> of</span><span +class="cmtt-10"> the</span><span +class="cmtt-10"> Silurian</span><span +class="cmtt-10"> Period</span><span +class="cmtt-10"> to</span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> the</span><span +class="cmtt-10"> beginning</span><span +class="cmtt-10"> of</span><span +class="cmtt-10"> the</span><span +class="cmtt-10"> Carboniferous</span><span +class="cmtt-10"> Period.</span> + + + +<br /> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> This</span><span +class="cmtt-10"> age</span><span +class="cmtt-10"> was</span><span +class="cmtt-10"> known</span><span +class="cmtt-10"> for</span><span +class="cmtt-10"> its</span><span +class="cmtt-10"> remarkable</span><span +class="cmtt-10"> variety</span><span +class="cmtt-10"> of</span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> fish</span><span +class="cmtt-10"> species.</span><span +class="cmsy-10">}</span> +<br /><span +class="cmsy-10">}</span> +<br /> +<br /><span +class="cmtt-10">@entry</span><span +class="cmsy-10">{</span><span +class="cmtt-10">elite,</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="cmsy-10">}</span> +</div> +</div> (The <span +class="cmtt-10">.bib </span>format doesn’t allow spaces in labels so you can’t have <span +class="cmtt-10">fish age </span>as the +label, but you can have <span +class="cmtt-10">fish-age</span>.) This method requires the <span +class="cmss-10">glossaries-extra</span><a + id="dx1-3013"></a>’s <span +class="cmss-10">record</span><a + id="dx1-3014"></a> +package option: + + + + <div class="verbatim" id="verbatim-21"> +\usepackage[record]{glossaries-extra} +</div> +<!--l. 604--><p class="nopar" > and the <span +class="cmtt-10">.bib </span>file is specified in the resource command. For example, if the +<span +class="cmtt-10">.bib </span>file is called <span +class="cmtt-10">entries.bib </span>then put the following line in the document +preamble: + + + +</p> + <div class="verbatim" id="verbatim-22"> +\GlsXtrLoadResources[src={entries}] +</div> +<!--l. 610--><p class="nopar" > You can have a comma-separated list. For example, if you also have entries defined +in the file <span +class="cmtt-10">entries2.bib</span>: + + + +</p> + <div class="verbatim" id="verbatim-23"> +\GlsXtrLoadResources[src={entries,entries2.bib}] +</div> +<!--l. 615--><p class="nopar" > +</p><!--l. 617--><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 indicates how the term should appear in the list of entries (glossary), but if the +term should appear differently when you reference it with <span +class="cmtt-10">\gls{</span>⟨<span +class="cmti-10">label</span>⟩<span +class="cmtt-10">} </span>in the +document, you need to use the <span +class="cmtt-10">text </span>key as well. +</p><!--l. 623--><p class="indent" > For example: + + + +</p> + <div class="verbatim" id="verbatim-24"> +\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. 632--><p class="nopar" > This will appear in the text as “Latin alphabet” but will be listed in the glossary +as “Latin Alphabet”. With <span +class="cmtt-10">bib2gls</span><a + id="dx1-3015"></a> this entry is defined in the <span +class="cmtt-10">.bib </span>file +as: + + + +</p> + <div class="verbatim" id="verbatim-25"> +@entry{latinalph, + <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. 644--><p class="nopar" > +</p><!--l. 646--><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-26"> +\newglossaryentry{oesophagus} + <br />{ + <br />  name={{\oe}sophagus}, + <br />  plural={{\oe}sophagi}, + <br />  description={canal from mouth to stomach} + <br />} +</div> +<!--l. 657--><p class="nopar" > (Remember from earlier that the initial ligature <span +class="cmtt-10">\oe </span>needs to be grouped.) +</p><!--l. 661--><p class="indent" > Abbreviations can be defined using +</p><!--l. 663--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\newacronym[</span>⟨<span +class="cmitt-10">options</span>⟩<span +class="cmtt-10">]{</span>⟨<span +class="cmitt-10">label</span>⟩<span +class="cmtt-10">}{</span>⟨<span +class="cmitt-10">short</span>⟩<span +class="cmtt-10">}{</span>⟨<span +class="cmitt-10">long</span>⟩<span +class="cmtt-10">} </span></div><hr> +</p><!--l. 664--><p class="noindent" > +where ⟨<span +class="cmti-10">label</span>⟩ is the label (as per <span +class="cmtt-10">\newglossaryentry</span>), ⟨<span +class="cmti-10">short</span>⟩ is the short form and +⟨<span +class="cmti-10">long</span>⟩ is the long form. For example, the following defines an abbreviation: + + + +</p> + <div class="verbatim" id="verbatim-27"> +\newacronym{svm}{SVM}{support vector machine} +</div> +<!--l. 671--><p class="nopar" > This internally uses <span +class="cmtt-10">\newglossaryentry </span>to define an entry with the label <span +class="cmtt-10">svm</span>. By +default, the <span +class="cmtt-10">name </span>key is set to ⟨<span +class="cmti-10">short</span>⟩ (“SVM” in the above example) and the +<span +class="cmtt-10">description </span>key is set to ⟨<span +class="cmti-10">long</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-28"> +\newacronym + <br /> [description={statistical pattern recognition technique}] + <br /> {svm}{SVM}{support vector machine} +</div> +<!--l. 683--><p class="nopar" > +</p><!--l. 685--><p class="indent" > Before you define your acronyms (or other types of abbreviations), you need to +specify which style to use with +</p><!--l. 688--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\setacronymstyle{</span>⟨<span +class="cmitt-10">style name</span>⟩<span +class="cmtt-10">} </span></div><hr> +</p><!--l. 689--><p class="noindent" > +where ⟨<span +class="cmti-10">style name</span>⟩ is the name of the style. There are a number of predefined styles, +such as: <span +class="cmtt-10">long-short </span>(on first use display the long form with the short form in +parentheses); <span +class="cmtt-10">short-long </span>(on first use display the short form with the long form in +parentheses); <span +class="cmtt-10">long-short-desc </span>(like <span +class="cmtt-10">long-short </span>but you need to specify the +description); or <span +class="cmtt-10">short-long-desc </span>(like <span +class="cmtt-10">short-long </span>but you need to specify the +description). There are some other styles as well that use <span +class="cmtt-10">\textsc </span>to typeset the +acronym or that use a footnote on first use. See the main user guide for further +details. +</p><!--l. 701--><p class="indent" > The <span +class="cmss-10">glossaries-extra</span><a + id="dx1-3016"></a> package provides improved abbreviation handling with <a +href="http://www.dickimaw-books.com/gallery/sample-abbr-styles.shtml" >a lot +more predefined styles</a>. With this extension package, abbreviations are defined +using: +</p><!--l. 705--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\newabbreviation[</span>⟨<span +class="cmitt-10">options</span>⟩<span +class="cmtt-10">]{</span>⟨<span +class="cmitt-10">label</span>⟩<span +class="cmtt-10">}{</span>⟨<span +class="cmitt-10">short</span>⟩<span +class="cmtt-10">}{</span>⟨<span +class="cmitt-10">long</span>⟩<span +class="cmtt-10">} </span></div><hr> +</p><!--l. 706--><p class="noindent" > +You can still use <span +class="cmtt-10">\newacronym </span>but it’s redefined to use the new abbreviation +interface. The style must now be set using: +</p><!--l. 710--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\setabbreviationstyle[</span>⟨<span +class="cmitt-10">category</span>⟩<span +class="cmtt-10">]{</span>⟨<span +class="cmitt-10">style name</span>⟩<span +class="cmtt-10">} </span></div><hr> +</p><!--l. 711--><p class="noindent" > +The default ⟨<span +class="cmti-10">category</span>⟩ is <span +class="cmtt-10">abbreviation</span>. If you use <span +class="cmtt-10">\newacronym </span>the category is +<span +class="cmtt-10">acronym</span>, which is why you need to use the optional argument if you define +abbreviations with <span +class="cmtt-10">\newacronym </span>when <span +class="cmss-10">glossaries-extra</span><a + id="dx1-3017"></a> has been loaded: </p><div class="alltt"> +<div class="obeylines-v"> +<span +class="cmtt-10">\setabbreviationstyle[acronym]{</span>⟨<span +class="cmitt-10">style</span><span +class="cmitt-10"> name</span>⟩<span +class="cmtt-10">}</span> +</div> +</div> If you use <span +class="cmtt-10">bib2gls</span><a + id="dx1-3018"></a> then abbreviations are defined in the <span +class="cmtt-10">.bib </span>file in the format: +<div class="alltt"> +<div class="obeylines-v"> +<span +class="cmtt-10">@abbreviation</span><span +class="cmsy-10">{</span>⟨<span +class="cmitt-10">label</span>⟩<span +class="cmtt-10">,</span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> long={</span>⟨<span +class="cmitt-10">long</span><span +class="cmitt-10"> form</span>⟩<span +class="cmtt-10">},</span> + + + +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> short={</span>⟨<span +class="cmitt-10">short</span><span +class="cmitt-10"> form</span>⟩<span +class="cmtt-10">}</span> +<br /><span +class="cmsy-10">}</span> +</div> +</div> +<!--l. 728--><p class="indent" > The plural forms for abbreviations 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-29"> +\newacronym + <br /> [longplural={diagonal matrices}] + <br /> {dm}{DM}{diagonal matrix} +</div> +<!--l. 734--><p class="nopar" > or (with <span +class="cmss-10">glossaries-extra</span><a + id="dx1-3019"></a>): + + + +</p> + <div class="verbatim" id="verbatim-30"> +\newabbreviation % glossaries-extra.sty + <br /> [longplural={diagonal matrices}] + <br /> {dm}{DM}{diagonal matrix} +</div> +<!--l. 740--><p class="nopar" > If omitted, the defaults are again obtained by appending an “s” to the singular +versions. With <span +class="cmtt-10">bib2gls</span><a + id="dx1-3020"></a>, the definition in the <span +class="cmtt-10">.bib </span>file is: + + + +</p> + <div class="verbatim" id="verbatim-31"> +@abbreviation{dm, + <br />  short={DM}, + <br />  long={diagonal matrix}, + <br />  longplural={diagonal matrices} + <br />} +</div> +<!--l. 750--><p class="nopar" > +</p><!--l. 752--><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-32"> +\newglossaryentry{emptyset} + <br />{ + <br />  name={empty set}, + <br />  symbol={\ensuremath{\emptyset}}, + <br />  description={the set containing no elements} + <br />} +</div> +<!--l. 762--><p class="nopar" > or with <span +class="cmtt-10">bib2gls</span><a + id="dx1-3021"></a> the definition in the <span +class="cmtt-10">.bib </span>file is: + + + +</p> + <div class="verbatim" id="verbatim-33"> +@entry{emptyset, + <br />  name={empty set}, + <br />  symbol={\ensuremath{\emptyset}}, + <br />  description={the set containing no elements} + <br />} +</div> +<!--l. 770--><p class="nopar" > +</p><!--l. 772--><p class="indent" > If you want the symbol in the <span +class="cmtt-10">name </span>field then you must supply a <span +class="cmtt-10">sort </span>value with +Options <a +href="#option1">1</a> and <a +href="#option3">3</a> otherwise you’ll end up with errors from <span class="TEX">T<span +class="E">E</span>X</span> or <span +class="cmtt-10">xindy</span><a + id="dx1-3022"></a>. With +<a +href="#option2">Option 2</a> (<span +class="cmtt-10">makeindex</span><a + id="dx1-3023"></a>) it’s not quite so important but you may find the resulting +order is a little odd. For example: + + + +</p> + <div class="verbatim" id="verbatim-34"> +\newglossaryentry{emptyset} + <br />{ + <br />  name={\ensuremath{\emptyset}}, + <br />  sort={empty set}, + <br />  description={the set containing no elements} + <br />} +</div> +<!--l. 784--><p class="nopar" > This displays the symbol as <span +class="cmsy-10">∅ </span>but sorts according to “empty set”. You +may want to consider using <span +class="cmss-10">glossaries-extra</span><a + id="dx1-3024"></a>’s <span +class="cmss-10">symbols</span><a + id="dx1-3025"></a> package option which +provides +</p><!--l. 790--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\glsxtrnewsymbol[</span>⟨<span +class="cmitt-10">options</span>⟩<span +class="cmtt-10">]{</span>⟨<span +class="cmitt-10">label</span>⟩<span +class="cmtt-10">}{</span>⟨<span +class="cmitt-10">symbol</span>⟩<span +class="cmtt-10">} </span></div><hr> +</p><!--l. 791--><p class="noindent" > +This internally uses <span +class="cmtt-10">\newglossaryentry </span>but automatically sets the <span +class="cmtt-10">sort </span>key to the +⟨<span +class="cmti-10">label</span>⟩. For example: + + + +</p> + <div class="verbatim" id="verbatim-35"> +\documentclass{article} + <br />\usepackage[symbols]{glossaries-extra} + <br />\makeglossaries + <br />\glsxtrnewsymbol % requires glossaries-extra.sty 'symbols' option + <br /> [description={the set containing no elements}] + <br /> {emptyset}% label (and sort value) + <br /> {\ensuremath{\emptyset}}% symbol + <br />\begin{document} + <br />\gls{emptyset} + <br />\printglossaries + <br />\end{document} +</div> +<!--l. 811--><p class="nopar" > Now the sort value is “emptyset” rather than the previous “empty set”. +</p><!--l. 815--><p class="indent" > With <span +class="cmtt-10">bib2gls</span><a + id="dx1-3026"></a> you can define this in the <span +class="cmtt-10">.bib </span>file as + + + +</p> + <div class="verbatim" id="verbatim-36"> +@entry{emptyset, + <br />  name={\ensuremath{\emptyset}}, + <br />  description={the set containing no elements} + <br />} +</div> +<!--l. 822--><p class="nopar" > in which case <span +class="cmtt-10">bib2gls</span><a + id="dx1-3027"></a> will try to interpret the <span +class="cmtt-10">name </span>field to determine the sort +value. Alternatively you can use: + + + +</p> + <div class="verbatim" id="verbatim-37"> +@symbol{emptyset, + <br />  name={\ensuremath{\emptyset}}, + <br />  description={the set containing no elements} + <br />} +</div> +<!--l. 830--><p class="nopar" > which will use the label (<span +class="cmtt-10">emptyset</span>) as the sort value. (You don’t need the <span +class="cmss-10">symbols</span><a + id="dx1-3028"></a> +package option in this case, unless you want a separate symbols list.) The +corresponding document (where the definition is in the file <span +class="cmtt-10">entries.bib</span>) is +now: + + + +</p> + <div class="verbatim" id="verbatim-38"> +\documentclass{article} + <br />\usepackage[record]{glossaries-extra} + <br />\GlsXtrLoadResources[src=entries] + <br />\begin{document} + <br />\gls{emptyset} + <br />\printunsrtglossaries + <br />\end{document} +</div> +<!--l. 847--><p class="nopar" > +</p><!--l. 849--><p class="noindent" > +</p> +<!--l. 849--><p class="noindent" ><a +href="#top">Top</a><h2 class="sectionHead"></p><h3 class="sectionHead"><span class="titlemark">3 </span> <a + id="sec:useterm"></a>Using Entries</h3> +<!--l. 852--><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. 856--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\gls{</span>⟨<span +class="cmitt-10">label</span>⟩<span +class="cmtt-10">} </span></div><hr> +</p><!--l. 857--><p class="noindent" > +where ⟨<span +class="cmti-10">label</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). If you are using <span +class="cmtt-10">bib2gls</span><a + id="dx1-4001"></a> then this will display ?? (like +<span +class="cmtt-10">\ref </span>and <span +class="cmtt-10">\cite</span>) until <span +class="cmtt-10">bib2gls</span><a + id="dx1-4002"></a> has created the relevant files and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> is +rerun. +</p><!--l. 865--><p class="indent" > If you are using the <span +class="cmss-10">hyperref</span><a + id="dx1-4003"></a> package (remember to load it before <span +class="cmss-10">glossaries</span>) <span +class="cmtt-10">\gls</span> +will create a hyperlink to the corresponding entry in the glossary. If you want to +suppress the hyperlink for a particular instance, use the starred form <span +class="cmtt-10">\gls* </span>for +example, <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">\gls*{fishage}</span></span></span>. The other commands described in this section all have a +similar starred form. +</p><!--l. 872--><p class="indent" > If the entry was defined as an acronym (using <span +class="cmtt-10">\newacronym </span>with <span +class="cmss-10">glossaries</span> +described above) or an abbreviation (using <span +class="cmtt-10">\newabbreviation </span>with <span +class="cmss-10">glossaries-extra</span><a + id="dx1-4004"></a>), +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, if the style is set to <span +class="cmtt-10">long-short</span>, +then <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”. +(If you use <span +class="cmtt-10">\newacronym </span>with <span +class="cmss-10">glossaries-extra</span><a + id="dx1-4005"></a> the default doesn’t show the +long form on first use. You’ll need to change the style first, as described +earlier.) + + + +</p><!--l. 884--><p class="indent" > If you want the plural form, you can use: +</p><!--l. 886--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\glspl{</span>⟨<span +class="cmitt-10">label</span>⟩<span +class="cmtt-10">} </span></div><hr> +</p><!--l. 887--><p class="noindent" > +instead of <span +class="cmtt-10">\gls{</span>⟨<span +class="cmti-10">label</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. 891--><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. 894--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\Gls{</span>⟨<span +class="cmitt-10">label</span>⟩<span +class="cmtt-10">} </span></div><hr> +</p><!--l. 895--><p class="noindent" > +for the singular form or +</p><!--l. 898--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\Glspl{</span>⟨<span +class="cmitt-10">label</span>⟩<span +class="cmtt-10">} </span></div><hr> +</p><!--l. 899--><p class="noindent" > +for the plural form. For example: + + + +</p> + <div class="verbatim" id="verbatim-39"> +\Glspl{set} are collections. +</div> +<!--l. 903--><p class="nopar" > produces “Sets are collections”. +</p><!--l. 906--><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. 909--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\glssymbol{</span>⟨<span +class="cmitt-10">label</span>⟩<span +class="cmtt-10">} </span></div><hr> +</p><!--l. 910--><p class="noindent" > +</p><!--l. 912--><p class="noindent" > +</p> +<!--l. 912--><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. 915--><p class="noindent" >In <a +href="#sec:start"><span +class="cmsy-10">§</span>1 </a><a +href="#sec:start">Getting Started<!--tex4ht:ref: sec:start --></a>, I mentioned that there are three options you can +choose from to create an automatically sorted glossary with the base <span +class="cmss-10">glossaries</span> +package. These are also available with the extension package <span +class="cmss-10">glossaries-extra</span> +along with a fourth option. These four options are listed below in a little +more detail. <a +href="#x1-50011">Table 1</a> summarises the main advantages and disadvantages. +(There’s a more detailed summary in the main <span +class="cmss-10">glossaries </span>user manual.) See also +<a +href="https://www.dickimaw-books.com/latex/buildglossaries/" >Incorporating makeglossaries or makeglossaries-lite or bib2gls into the document +build</a>. +</p> + <div class="table"> + + + +<!--l. 925--><p class="indent" > <a + id="x1-50011"></a></p><hr class="float" /><div class="float" +> + + + + <div class="caption" +><span class="id">Table 1: </span><span +class="content">Comparison of Glossary Options</span></div><!--tex4ht:label?: x1-50011 --> +<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" /><col +id="TBL-2-5" /></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. 931--><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><td style="white-space:nowrap; text-align:center;" id="TBL-2-1-5" +class="td11"> <a +href="#option4"><span +class="cmbx-10">Option</span><span +class="cmbx-10"> 4</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. 933--><p class="noindent" >Requires + <span +class="cmss-10">glossaries-extra</span><a + id="dx1-5002"></a>? </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-2-2" +class="td11"> <span id="textcolor1"><span +class="pzdr-">✘</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-2-3" +class="td11"> <span id="textcolor2"><span +class="pzdr-">✘</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-2-4" +class="td11"> <span id="textcolor3"><span +class="pzdr-">✘</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-2-5" +class="td11"> <span id="textcolor4"><span +class="pzdr-">✔</span></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. 935--><p class="noindent" >Requires + an + external + application? </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-3-2" +class="td11"> <span id="textcolor5"><span +class="pzdr-">✘</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-3-3" +class="td11"> <span id="textcolor6"><span +class="pzdr-">✔</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-3-4" +class="td11"> <span id="textcolor7"><span +class="pzdr-">✔</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-3-5" +class="td11"> <span id="textcolor8"><span +class="pzdr-">✔</span></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. 937--><p class="noindent" >Requires + Perl? </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-4-2" +class="td11"> <span id="textcolor9"><span +class="pzdr-">✘</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-4-3" +class="td11"> <span id="textcolor10"><span +class="pzdr-">✘</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-4-4" +class="td11"> <span id="textcolor11"><span +class="pzdr-">✔</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-4-5" +class="td11"> <span id="textcolor12"><span +class="pzdr-">✘</span></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. 939--><p class="noindent" >Requires + Java? </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-5-2" +class="td11"> <span id="textcolor13"><span +class="pzdr-">✘</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-5-3" +class="td11"> <span id="textcolor14"><span +class="pzdr-">✘</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-5-4" +class="td11"> <span id="textcolor15"><span +class="pzdr-">✘</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-5-5" +class="td11"> <span id="textcolor16"><span +class="pzdr-">✔</span></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. 941--><p class="noindent" >Can + sort + extended + Latin + or + non-Latin + alphabets? </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-6-2" +class="td11"> <span id="textcolor17"><span +class="pzdr-">✘</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-6-3" +class="td11"> <span id="textcolor18"><span +class="pzdr-">✘</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-6-4" +class="td11"> <span id="textcolor19"><span +class="pzdr-">✔</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-6-5" +class="td11"> <span id="textcolor20"><span +class="pzdr-">✔</span></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. 944--><p class="noindent" >Efficient + sort + algorithm? </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-7-2" +class="td11"> <span id="textcolor21"><span +class="pzdr-">✘</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-7-3" +class="td11"> <span id="textcolor22"><span +class="pzdr-">✔</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-7-4" +class="td11"> <span id="textcolor23"><span +class="pzdr-">✔</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-7-5" +class="td11"> <span id="textcolor24"><span +class="pzdr-">✔</span></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. 946--><p class="noindent" >Can + use + different + sort + methods + for + each + glossary? </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-8-2" +class="td11"> <span id="textcolor25"><span +class="pzdr-">✔</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-8-3" +class="td11"> <span id="textcolor26"><span +class="pzdr-">✘</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-8-4" +class="td11"> <span id="textcolor27"><span +class="pzdr-">✘</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-8-5" +class="td11"> <span id="textcolor28"><span +class="pzdr-">✔</span></span> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-9-"><td style="white-space:wrap; text-align:left;" id="TBL-2-9-1" +class="td11"> <!--l. 948--><p class="noindent" >Any + problematic + sort + values? </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-9-2" +class="td11"> <span id="textcolor29"><span +class="pzdr-">✔</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-9-3" +class="td11"> <span id="textcolor30"><span +class="pzdr-">✔</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-9-4" +class="td11"> <span id="textcolor31"><span +class="pzdr-">✔</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-9-5" +class="td11"> <span id="textcolor32"><span +class="pzdr-">✘</span></span> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-10-"><td style="white-space:wrap; text-align:left;" id="TBL-2-10-1" +class="td11"> <!--l. 950--><p class="noindent" >Can + form + ranges + in + the + location + lists? </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-10-2" +class="td11"> <span id="textcolor33"><span +class="pzdr-">✘</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-10-3" +class="td11"> <span id="textcolor34"><span +class="pzdr-">✔</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-10-4" +class="td11"> <span id="textcolor35"><span +class="pzdr-">✔</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-10-5" +class="td11"> <span id="textcolor36"><span +class="pzdr-">✔</span></span> </td> +</tr><tr + style="vertical-align:baseline;" id="TBL-2-11-"><td style="white-space:wrap; text-align:left;" id="TBL-2-11-1" +class="td11"> <!--l. 952--><p class="noindent" >Can + have + non-standard + locations? </p></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-11-2" +class="td11"> <span id="textcolor37"><span +class="pzdr-">✔</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-11-3" +class="td11"> <span id="textcolor38"><span +class="pzdr-">✘</span></span> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-11-4" +class="td11"> <span id="textcolor39"><span +class="pzdr-">✔</span></span><sup class="textsuperscript"><span +class="cmsy-9">†</span></sup> </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-11-5" +class="td11"> <span id="textcolor40"><span +class="pzdr-">✔</span></span> </td> +</tr></table></div> +<!--l. 955--><p class="noindent" ><sup class="textsuperscript"><span +class="cmsy-9">†</span></sup> <span +class="cmr-8">Requires some setting up.</span> + + + +</p> + </div><hr class="endfloat" /> + </div> + <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. 962--><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. The <span +class="cmtt-10">name </span>mustn’t contain + commands (or, if it does, the <span +class="cmtt-10">sort </span>value must be supplied) unless you + have the package option <span +class="cmss-10">sanitizesort</span><a + id="dx1-5003"></a> or <span +class="cmss-10">sort=def</span><a + id="dx1-5004"></a> or <span +class="cmss-10">sort=use</span><a + id="dx1-5005"></a>. + </p><ol class="enumerate1" > + <li + class="enumerate" id="x1-5007x1">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>2 </a><a +href="#sec:defterm">Defining Terms<!--tex4ht:ref: sec:defterm --></a>). + </li> + <li + class="enumerate" id="x1-5009x2">Put + <!--l. 976--><p class="noindent" ><hr><div title="Definition"><span +class="cmtt-10">\printnoidxglossary[sort=</span>⟨<span +class="cmitt-10">order</span>⟩<span +class="cmtt-10">,</span>⟨<span +class="cmitt-10">other options</span>⟩<span +class="cmtt-10">] </span></div><hr> + </p><!--l. 977--><p class="noindent" > + where you want your list of entries to appear. The sort ⟨<span +class="cmti-10">order</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). + Alternatively, use + </p><!--l. 984--><p class="noindent" ><hr><div title="Definition"><span +class="cmtt-10">\printnoidxglossaries </span></div><hr> + </p><!--l. 985--><p class="noindent" > + to display all your glossaries (if you have more than one). This command + doesn’t have any arguments. + </p><!--l. 989--><p class="noindent" >This option allows you to have different sort methods. For example: + + + +</p> + <div class="verbatim" id="verbatim-40"> + \printnoidxglossary[sort=word]% main glossary +  <br />\printnoidxglossary[type=symbols,sort=use]% symbols glossary +</div> + <!--l. 994--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-5011x3">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> + <!--l. 1000--><p class="noindent" >Here’s a complete document (<span +class="cmtt-10">myDoc.tex</span>): + + + +</p> + <div class="verbatim" id="verbatim-41"> + \documentclass{article} +  <br />\usepackage{glossaries} +  <br />\makenoidxglossaries % use TeX to sort +  <br />\newglossaryentry{sample}{name={sample}, +  <br />  description={an example}} +  <br />\begin{document} +  <br />A \gls{sample}. +  <br />\printnoidxglossaries % iterate over all indexed entries +  <br />\end{document} +</div> + <!--l. 1016--><p class="nopar" > Document build: + + + +</p> + <div class="verbatim" id="verbatim-42"> + pdflatex myDoc +  <br />pdflatex myDoc +</div> + <!--l. 1021--><p class="nopar" > + </p></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. 1025--><p class="noindent" >This option uses an application called <span +class="cmtt-10">makeindex</span><a + id="dx1-5012"></a> 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><a + id="dx1-5013"></a> reads. + Then <span +class="cmtt-10">makeindex</span><a + id="dx1-5014"></a> 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. The <span +class="cmtt-10">makeindex</span><a + id="dx1-5015"></a> + application is automatically invoked by the helper <span +class="cmtt-10">makeglossaries</span><a + id="dx1-5016"></a> + script, which works out all the appropriate settings from the <span +class="cmtt-10">.aux</span> + file. + </p><ol class="enumerate1" > + <li + class="enumerate" id="x1-5018x1">If you are using <span +class="cmss-10">ngerman</span><a + id="dx1-5019"></a><span class="footnote-mark"><a +href="#fn1x0" id="fn1x0-bk"><sup class="textsuperscript">1</sup></a></span><a + id="x1-5020f1"></a> + or some other package that makes the double-quote character <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">"</span></span></span> a + shorthand, then use <span +class="cmtt-10">\GlsSetQuote </span>to change this to some other character. + For example: + + + + <div class="verbatim" id="verbatim-43"> + \GlsSetQuote{+} +</div> + <!--l. 1044--><p class="nopar" > Use this as soon as possible after you’ve loaded the <span +class="cmss-10">glossaries</span> + package. + </p></li> + <li + class="enumerate" id="x1-5023x2">Add <span +class="cmtt-10">\makeglossaries </span>to your preamble (before you start defining your + entries). + </li> + <li + class="enumerate" id="x1-5025x3">Put + <!--l. 1053--><p class="noindent" ><hr><div title="Definition"><span +class="cmtt-10">\printglossary[</span>⟨<span +class="cmitt-10">options</span>⟩<span +class="cmtt-10">] </span></div><hr> + </p><!--l. 1054--><p class="noindent" > + where you want your list of entries (glossary) to appear. (The <span +class="cmtt-10">sort </span>key + isn’t available in ⟨<span +class="cmti-10">options</span>⟩.) Alternatively, use + </p><!--l. 1059--><p class="noindent" ><hr><div title="Definition"><span +class="cmtt-10">\printglossaries </span></div><hr> + </p><!--l. 1060--><p class="noindent" > + which will display all glossaries (if you have more than one). This + command doesn’t have any arguments. + </p><!--l. 1064--><p class="noindent" ><div class="important" title="Important Note"> All glossaries are sorted using the same method which may be identified + with one of the package options: <span +class="cmss-10">sort=standard</span><a + id="dx1-5026"></a> (default), <span +class="cmss-10">sort=use</span><a + id="dx1-5027"></a> or + <span +class="cmss-10">sort=def</span><a + id="dx1-5028"></a>. </div> + </p><!--l. 1069--><p class="noindent" > + </p></li> + <li + class="enumerate" id="x1-5030x4">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-5032x5">Run <span +class="cmtt-10">makeglossaries</span><a + id="dx1-5033"></a> with the base name of your document (without the + <span +class="cmtt-10">.tex</span>) extension. 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-44"> + makeglossaries myDoc +</div> + <!--l. 1085--><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 + without the <span +class="cmtt-10">.tex </span>extension. Avoid spaces in the file name.) If you don’t + have Perl installed use <span +class="cmtt-10">makeglossaries-lite</span><a + id="dx1-5034"></a> instead: + + + +</p> + <div class="verbatim" id="verbatim-45"> + makeglossaries-lite myDoc +</div> + <!--l. 1092--><p class="nopar" > + </p><!--l. 1094--><p class="noindent" ><div class="important" title="Important Note"> Some beginners get confused by <span +class="cmtt-10">makeglossaries</span><a + id="dx1-5035"></a> the application (run as + a system command) and <span +class="cmtt-10">\makeglossaries </span>the <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> command + which should be typed in the document preamble. These are two + different concepts that happen to have similar looking names. + </div> + </p><!--l. 1100--><p class="noindent" > + </p><!--l. 1102--><p class="noindent" >If you don’t know how to use the command prompt, then you can + probably configure your text editor to add <span +class="cmtt-10">makeglossaries</span><a + id="dx1-5036"></a> (or + <span +class="cmtt-10">makeglossaries-lite</span><a + id="dx1-5037"></a>) as a build tool, 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. If you still have problems, try adding the + <span +class="cmss-10">automake</span><a + id="dx1-5038"></a> package option: + + + +</p> + <div class="verbatim" id="verbatim-46"> + \usepackage[automake]{glossaries} +</div> + <!--l. 1112--><p class="nopar" > + </p><!--l. 1114--><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="cmss-10">order=letter</span><a + id="dx1-5039"></a> package + option + + + +</p> + <div class="verbatim" id="verbatim-47"> + \usepackage[order=letter]{glossaries} +</div> + <!--l. 1119--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-5041x6">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> + <!--l. 1124--><p class="noindent" >Here’s a complete document (<span +class="cmtt-10">myDoc.tex</span>): + + + +</p> + <div class="verbatim" id="verbatim-48"> + \documentclass{article} +  <br />\usepackage{glossaries} +  <br />\makeglossaries % create makeindex files +  <br />\newglossaryentry{sample}{name={sample}, +  <br />  description={an example}} +  <br />\begin{document} +  <br />A \gls{sample}. +  <br />\printglossaries % input files created by makeindex +  <br />\end{document} +</div> + <!--l. 1140--><p class="nopar" > Document build: + + + +</p> + <div class="verbatim" id="verbatim-49"> + pdflatex myDoc +  <br />makeglossaries myDoc +  <br />pdflatex myDoc +</div> + <!--l. 1146--><p class="nopar" > or + + + +</p> + <div class="verbatim" id="verbatim-50"> + pdflatex myDoc +  <br />makeglossaries-lite myDoc +  <br />pdflatex myDoc +</div> + <!--l. 1152--><p class="nopar" > + </p></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. 1157--><p class="noindent" >This option uses an application called <span +class="cmtt-10">xindy</span><a + id="dx1-5042"></a> to sort the entries. This + application is more flexible than <span +class="cmtt-10">makeindex</span><a + id="dx1-5043"></a> and is able to sort extended Latin + or non-Latin alphabets. It comes with both <span class="TEX">T<span +class="E">E</span>X</span> Live and MiK<span class="TEX">T<span +class="E">E</span>X</span>. + Since <span +class="cmtt-10">xindy</span><a + id="dx1-5044"></a> is a Perl script, you will also need to ensure that Perl is + installed. 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><a + id="dx1-5045"></a> + reads. Then <span +class="cmtt-10">xindy</span><a + id="dx1-5046"></a> 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. The <span +class="cmtt-10">xindy</span><a + id="dx1-5047"></a> + application is automatically invoked by the helper <span +class="cmtt-10">makeglossaries</span><a + id="dx1-5048"></a> + script, which works out all the appropriate settings from the <span +class="cmtt-10">.aux</span> + file. + </p><ol class="enumerate1" > + <li + class="enumerate" id="x1-5050x1">Add the <span +class="cmss-10">xindy</span><a + id="dx1-5051"></a> option to the <span +class="cmss-10">glossaries</span><a + id="dx1-5052"></a> package option list: + + + + <div class="verbatim" id="verbatim-51"> + \usepackage[xindy]{glossaries} +</div> + <!--l. 1176--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-5054x2">Add <span +class="cmtt-10">\makeglossaries </span>to your preamble (before you start defining your + entries). + </li> + <li + class="enumerate" id="x1-5056x3">Put + <!--l. 1183--><p class="noindent" ><hr><div title="Definition"><span +class="cmtt-10">\printglossary[</span>⟨<span +class="cmitt-10">options</span>⟩<span +class="cmtt-10">] </span></div><hr> + </p><!--l. 1184--><p class="noindent" > + where you want your list of entries (glossary) to appear. (The <span +class="cmtt-10">sort </span>key + isn’t available in ⟨<span +class="cmti-10">options</span>⟩.) Alternatively, use + </p><!--l. 1189--><p class="noindent" ><hr><div title="Definition"><span +class="cmtt-10">\printglossaries </span></div><hr> + </p><!--l. 1190--><p class="noindent" > + </p><!--l. 1192--><p class="noindent" ><div class="important" title="Important Note"> All glossaries are sorted using the same method which may be identified + with one of the package options: <span +class="cmss-10">sort=standard</span><a + id="dx1-5057"></a> (default), <span +class="cmss-10">sort=use</span><a + id="dx1-5058"></a> or + <span +class="cmss-10">sort=def</span><a + id="dx1-5059"></a>. </div> + </p><!--l. 1197--><p class="noindent" > + </p></li> + <li + class="enumerate" id="x1-5061x4">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-5063x5">Run <span +class="cmtt-10">makeglossaries</span><a + id="dx1-5064"></a> with the base name of the document (omitting the + <span +class="cmtt-10">.tex </span>extension). 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-52"> + makeglossaries myDoc +</div> + <!--l. 1213--><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 + without the <span +class="cmtt-10">.tex </span>extension. Avoid spaces in the file name. If you don’t + know how to use the command prompt, then as mentioned above, you may + be able to configure your text editor to add <span +class="cmtt-10">makeglossaries</span><a + id="dx1-5065"></a> as a build + tool. + </p><!--l. 1221--><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-53"> + \usepackage[xindy,order=letter]{glossaries} +</div> + <!--l. 1227--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-5067x6">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> + <!--l. 1233--><p class="noindent" >Here’s a complete document (<span +class="cmtt-10">myDoc.tex</span>): + + + +</p> + <div class="verbatim" id="verbatim-54"> + \documentclass{article} +  <br />\usepackage[xindy]{glossaries} +  <br />\makeglossaries % create xindy files +  <br />\newglossaryentry{sample}{name={sample}, +  <br />  description={an example}} +  <br />\begin{document} +  <br />A \gls{sample}. +  <br />\printglossaries % input files created by xindy +  <br />\end{document} +</div> + <!--l. 1249--><p class="nopar" > Document build: + + + +</p> + <div class="verbatim" id="verbatim-55"> + pdflatex myDoc +  <br />makeglossaries myDoc +  <br />pdflatex myDoc +</div> + <!--l. 1255--><p class="nopar" > + </p></dd><dt class="description"> + </dt><dd +class="description"><a + id="option4"></a><span +class="cmbx-10">Option</span><span +class="cmbx-10"> 4</span>: + <!--l. 1259--><p class="noindent" >This requires the extension package <span +class="cmss-10">glossaries-extra</span><a + id="dx1-5068"></a> and an application called + <span +class="cmtt-10">bib2gls</span><a + id="dx1-5069"></a>. This application is able to sort extended Latin or non-Latin + alphabets. It comes with both <span class="TEX">T<span +class="E">E</span>X</span> Live and MiK<span class="TEX">T<span +class="E">E</span>X</span> but requires at least + Java 7. This method works differently to Options <a +href="#option2">2</a> and <a +href="#option3">3</a>. Instead of + creating a file containing the code to typeset the glossary it creates a + <span +class="cmtt-10">.glstex </span>file containing the entry definitions fetched from the <span +class="cmtt-10">.bib </span>file (or + files), but only those entries that are required in the document are + defined and they are defined in the order obtained from the chosen sort + method. This means that you can just use <span +class="cmtt-10">\printunsrtglossary </span>to + display each glossary (or <span +class="cmtt-10">\printunsrtglossaries </span>to display them + all). + </p><ol class="enumerate1" > + <li + class="enumerate" id="x1-5071x1">Add the <span +class="cmss-10">record</span><a + id="dx1-5072"></a> option to the <span +class="cmss-10">glossaries-extra</span><a + id="dx1-5073"></a> package option list: + + + + <div class="verbatim" id="verbatim-56"> + \usepackage[record]{glossaries-extra} +</div> + <!--l. 1278--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-5075x2">Add one or more + <!--l. 1282--><p class="noindent" ><hr><div title="Definition"><span +class="cmtt-10">\GlsXtrLoadResources[src={</span>⟨<span +class="cmitt-10">bib list</span>⟩<span +class="cmtt-10">},</span>⟨<span +class="cmitt-10">options</span>⟩<span +class="cmtt-10">] </span></div><hr> + </p><!--l. 1283--><p class="noindent" > + to your preamble where ⟨<span +class="cmti-10">bib list</span>⟩ is the list of <span +class="cmtt-10">.bib </span>files containing the + entries. You may use different sort methods for each resource set. For + example: + + + +</p> + <div class="verbatim" id="verbatim-57"> + \usepackage[record,% using bib2gls +  <br /> abbreviations, +  <br /> symbols, +  <br /> numbers +  <br />]{glossaries-extra} +  <br />\GlsXtrLoadResources[ +  <br />  src={terms},% entries in terms.bib +  <br />  type=main,% put these entries in the 'main' (default) list +  <br />  sort={de-CH-1996}% sort according to this locale +  <br />] +  <br />\GlsXtrLoadResources[ +  <br />  src={abbrvs},% entries in abbrvs.bib +  <br />  type=abbreviations,% put these entries in the 'abbreviations' list +  <br />  sort={letter-case}% case-sensitive letter (non-locale) sort +  <br />] +  <br />\GlsXtrLoadResources[ +  <br />  src={syms},% entries in syms.bib +  <br />  type=symbols,% put these entries in the 'symbols' list +  <br />  sort={use}% sort according to first use in the document +  <br />] +  <br />\GlsXtrLoadResources[ +  <br />  src={constants},% entries in constants.bib +  <br />  type=numbers,% put these entries in the 'numbers' list +  <br />  sort-field={user1},% sort according to this field +  <br />  sort={double}% double-precision sort +  <br />] +</div> + <!--l. 1315--><p class="nopar" > The last resource set assumes that the entries defined in the file + <span +class="cmtt-10">constants.bib </span>have a number stored in the <span +class="cmtt-10">user1 </span>field. For + example: + + + +</p> + <div class="verbatim" id="verbatim-58"> + @number{pi, +  <br />  name={\ensuremath{\pi}}, +  <br />  description={pi}, +  <br />  user1={3.141592654} +  <br />} +</div> + <!--l. 1325--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-5077x3">Put + <!--l. 1329--><p class="noindent" ><hr><div title="Definition"><span +class="cmtt-10">\printunsrtglossary[type={</span>⟨<span +class="cmitt-10">type</span>⟩<span +class="cmtt-10">},</span>⟨<span +class="cmitt-10">options</span>⟩<span +class="cmtt-10">] </span></div><hr> + </p><!--l. 1330--><p class="noindent" > + where you want your list of entries (glossary) to appear. (The <span +class="cmtt-10">sort </span>key + isn’t available in ⟨<span +class="cmti-10">options</span>⟩. It needs to be used in <span +class="cmtt-10">\GlsXtrLoadResources</span> + instead.) Alternatively, use + </p><!--l. 1336--><p class="noindent" ><hr><div title="Definition"><span +class="cmtt-10">\printunsrtglossaries </span></div><hr> + </p><!--l. 1337--><p class="noindent" > + </p></li> + <li + class="enumerate" id="x1-5079x4">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. The <span +class="cmss-10">record</span><a + id="dx1-5080"></a> option adds information to + the <span +class="cmtt-10">.aux </span>file that provides <span +class="cmtt-10">bib2gls</span><a + id="dx1-5081"></a> with all required details for each + resource set. For example, if the file is called <span +class="cmtt-10">myDoc.tex</span>: + + + + <div class="verbatim" id="verbatim-59"> + pdflatex myDoc +</div> + <!--l. 1345--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-5083x5">Run <span +class="cmtt-10">bib2gls</span><a + id="dx1-5084"></a> + + + + <div class="verbatim" id="verbatim-60"> + bib2gls myDoc +</div> + <!--l. 1350--><p class="nopar" > or (if you need letter groups) + + + +</p> + <div class="verbatim" id="verbatim-61"> + bib2gls --group myDoc +</div> + <!--l. 1354--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-5086x6">Run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> again.</li></ol> + <!--l. 1358--><p class="noindent" >Here’s a complete document (<span +class="cmtt-10">myDoc.tex</span>): + + + +</p> + <div class="verbatim" id="verbatim-62"> + \documentclass{article} +  <br />\usepackage[record]{glossaries-extra} +  <br />\GlsXtrLoadResources % input file created by bib2gls +  <br /> [% instructions to bib2gls: +  <br />   src={entries}, % terms defined in entries.bib +  <br />   sort={en-GB}% sort according to this locale +  <br /> ] +  <br />\newglossaryentry{sample}{name={sample}, +  <br />  description={an example}} +  <br />\begin{document} +  <br />A \gls{sample}. +  <br />\printunsrtglossaries % iterate over all defined entries +  <br />\end{document} +</div> + <!--l. 1378--><p class="nopar" > The accompanying <span +class="cmtt-10">entries.bib </span>file: + + + +</p> + <div class="verbatim" id="verbatim-63"> + @entry{sample, +  <br />  name = {sample}, +  <br />  description = {an example} +  <br />} +</div> + <!--l. 1385--><p class="nopar" > Document build: + + + +</p> + <div class="verbatim" id="verbatim-64"> + pdflatex myDoc +  <br />bib2gls myDoc +  <br />pdflatex myDoc +</div> + <!--l. 1391--><p class="nopar" > +</p> + </dd></dl> +<!--l. 1395--><p class="indent" > If you are having difficulty integrating <span +class="cmtt-10">makeglossaries</span><a + id="dx1-5087"></a> into your document build +process, you may want to consider using <span +class="cmtt-10">arara</span><a + id="dx1-5088"></a>, which is a Java application that +searches the document for special comment lines that tell <span +class="cmtt-10">arara</span><a + id="dx1-5089"></a> which applications +to run. For example, the file <span +class="cmtt-10">myDoc.tex </span>might start with: + + + +</p> + <div class="verbatim" id="verbatim-65"> + % arara: pdflatex + <br /> % arara: makeglossaries + <br /> % arara: pdflatex + <br /> \documentclass{article} + <br /> \usepackage{glossaries} + <br /> \makeglossaries +</div> +<!--l. 1408--><p class="nopar" > then to build the document you just need the single system call: + + + +</p> + <div class="verbatim" id="verbatim-66"> + arara myDoc +</div> +<!--l. 1412--><p class="nopar" > (The currently pending version 4.0 of <span +class="cmtt-10">arara</span><a + id="dx1-5090"></a> has directives for <span +class="cmtt-10">makeglossaries-lite</span><a + id="dx1-5091"></a> +and <span +class="cmtt-10">bib2gls</span><a + id="dx1-5092"></a>. These aren’t available in earlier versions, but you could try copying +and adapting the <span +class="cmtt-10">makeglossaries.yaml </span>file and replace <span +class="cmtt-10">makeglossaries</span><a + id="dx1-5093"></a> as +appropriate.) +</p><!--l. 1419--><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-67"> + \newglossaryentry{elite} + <br /> { + <br />   name={{\'e}lite}, + <br />   description={select group or class} + <br /> } +</div> +<!--l. 1429--><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. However + if you use the <span +class="cmss-10">sanitizesort=true</span><a + id="dx1-5094"></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="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>. This will + place this entry in the “symbols” 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">lit </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><a + id="dx1-5095"></a> + 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><a + id="dx1-5096"></a> 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. If stripping all commands leads to an empty string + (such as <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">\ensuremath{\emptyset}</span></span></span>) then <span +class="cmtt-10">xindy</span><a + id="dx1-5097"></a> will fail, so in these + situations you need to provide an appropriate <span +class="cmtt-10">sort </span>value that <span +class="cmtt-10">xindy</span><a + id="dx1-5098"></a> will + accept. + <!--l. 1455--><p class="noindent" ><div class="important" title="Important Note"> <span +class="cmtt-10">xindy</span><a + id="dx1-5099"></a> merges entries with duplicate sort values. <span +class="cmtt-10">xindy</span><a + id="dx1-5100"></a> forbids empty sort + values. A sort value may degrade into an empty or duplicate value once <span +class="cmtt-10">xindy</span><a + id="dx1-5101"></a> + has stripped all commands and braces. </div> + </p><!--l. 1460--><p class="noindent" > + </p></dd><dt class="description"> +<a +href="#option4"><span +class="cmbx-10">Option</span><span +class="cmbx-10"> 4</span></a><span +class="cmbx-10">:</span> </dt><dd +class="description"><span +class="cmtt-10">bib2gls</span><a + id="dx1-5102"></a> has a primitive <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> parser that recognises a limited set of + commands, which includes the standard accent commands and some maths + commands, so it can convert <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">{\’e}lite</span></span></span> to <span +class="cmtt-10">é</span><span +class="cmtt-10">lite</span>. It disregards unknown + commands. This may lead to an empty sort value, but <span +class="cmtt-10">bib2gls</span><a + id="dx1-5103"></a> doesn’t mind + that. + <!--l. 1469--><p class="noindent" >Note that even if the name is given as <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">{\’e}lite</span></span></span>, the letter group heading + (if the <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">--group</span></span></span> switch is used) may end up with the character É + depending on the locale used by the sort comparator. In this case you + + + + will need to ensure the document can support this character either + with <span +class="cmss-10">inputenc</span><a + id="dx1-5104"></a> or by switching to a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span +class="E">E</span>X</span></span> engine with native UTF-8 + support. +</p> + </dd></dl> +<!--l. 1479--><p class="indent" > If the <span +class="cmss-10">inputenc</span><a + id="dx1-5105"></a> package is used: + + + +</p> + <div class="verbatim" id="verbatim-68"> + \usepackage[utf8]{inputenc} +</div> +<!--l. 1482--><p class="nopar" > and the entry is defined as: </p><div class="alltt"> +<div class="obeylines-v"> +<span +class="cmtt-10"> </span><span class="verb"><span +class="cmtt-10">\newglossaryentry{elite}</span></span> +<br /><span +class="cmtt-10"> </span><span class="verb"><span +class="cmtt-10">{</span></span> +<br /><span +class="cmtt-10"> </span><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"> </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="cmtt-10"> </span><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-5106"></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 and is in fact seen as two + octets 0xC3 0xA9) which will put this entry before the “A” letter group. + (The group is determined by the first octet 0xC3.) + </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><a + id="dx1-5107"></a> sees <span +class="cmtt-10">é</span> as two octets (0xC3 0xA9) rather than a single + character so it tries to put <span +class="cmtt-10">é</span><span +class="cmtt-10">lite </span>in the 0xC3 (“Ô) letter group (which, + in this case, comes after “Z”). + </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><a + id="dx1-5108"></a> 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, but another language + might put it in the “É” letter group.) + </dd><dt class="description"> +<a +href="#option4"><span +class="cmbx-10">Option</span><span +class="cmbx-10"> 4</span></a><span +class="cmbx-10">:</span> </dt><dd +class="description">The <span +class="cmss-10">inputenc</span><a + id="dx1-5109"></a> package doesn’t affect the encoding used with <span +class="cmtt-10">.bib </span>entry + definitions, since these are dependent on the encoding used to save the <span +class="cmtt-10">.bib </span>file + (although the labels must still be ASCII). You can help <span +class="cmtt-10">bib2gls</span><a + id="dx1-5110"></a> (and + JabRef) by putting an encoding comment at the start of the <span +class="cmtt-10">.bib </span>file: + <div class="alltt"> + <div class="obeylines-v"> + <span +class="cmtt-10">%</span><span +class="cmtt-10"> Encoding:</span><span +class="cmtt-10"> UTF-8</span> + + + +</div> + </div> + <!--l. 1522--><p class="noindent" >With the correct encoding set up, <span +class="cmtt-10">bib2gls</span><a + id="dx1-5111"></a> will determine that the sort value is + <span +class="cmtt-10">é</span><span +class="cmtt-10">lite </span>and will place it in whatever letter group is appropriate for the given + sort rule. For example, <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">sort=en-GB</span></span></span> (or just <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">sort=en</span></span></span>) will put <span +class="cmtt-10">é</span><span +class="cmtt-10">lite </span>in the + “E” letter group, but another language might put it in the “É” letter + group. +</p> + </dd></dl> +<!--l. 1531--><p class="indent" > Therefore if you have extended Latin or non-Latin characters, your best option is +to use either <span +class="cmtt-10">xindy</span><a + id="dx1-5112"></a> (<a +href="#option3">Option 3</a>) or <span +class="cmtt-10">bib2gls</span><a + id="dx1-5113"></a> (<a +href="#option4">Option 4</a>) with the <span +class="cmss-10">inputenc</span><a + id="dx1-5114"></a> or <span +class="cmss-10">fontspec</span><a + id="dx1-5115"></a> +package. If you use <span +class="cmtt-10">makeindex</span><a + id="dx1-5116"></a> (<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-69"> +\newglossaryentry{elite} + <br />{ + <br />  name={{\'e}lite}, + <br />  sort={elite}, + <br />  description={select group or class} + <br />} +</div> +<!--l. 1543--><p class="nopar" > or </p><div class="alltt"> +<div class="obeylines-v"> +<span +class="cmtt-10">\newglossaryentry</span><span +class="cmsy-10">{</span><span +class="cmtt-10">elite</span><span +class="cmsy-10">}</span> +<br /><span +class="cmsy-10">{</span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> name=</span><span +class="cmsy-10">{{</span><span +class="cmtt-10">é</span><span +class="cmsy-10">}</span><span +class="cmtt-10">lite</span><span +class="cmsy-10">}</span><span +class="cmtt-10">,</span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> sort=</span><span +class="cmsy-10">{</span><span +class="cmtt-10">elite</span><span +class="cmsy-10">}</span><span +class="cmtt-10">,</span> +<br /><span +class="cmtt-10"> </span><span +class="cmtt-10"> description=</span><span +class="cmsy-10">{</span><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 +class="cmsy-10">}</span> +<br /><span +class="cmsy-10">}</span> +</div> +</div> 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. +<!--l. 1557--><p class="indent" > If you use <a +href="#option3">Option 3</a> and the <span +class="cmtt-10">name </span>only contains a command or commands (such +as <span +class="cmtt-10">\P </span>or <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">\ensuremath{\pi}</span></span></span>) you must add the <span +class="cmtt-10">sort </span>key. This is also advisable +for the other options (except <a +href="#option4">Option 4</a>), but is essential for <a +href="#option3">Option 3</a>. For +example: + + + +</p> + <div class="verbatim" id="verbatim-70"> + \newglossaryentry{P}{name={\P},sort={P}, + <br />  description={paragraph symbol}} +</div> +<!--l. 1564--><p class="nopar" > +</p> +<!--l. 1566--><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. 1569--><p class="noindent" >The default glossary style uses the <span +class="cmss-10">description</span><a + id="dx1-6001"></a><a + id="dx1-6002"></a> 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">\glsnamefont</span>: + + + +</p> + <div class="verbatim" id="verbatim-71"> +\renewcommand*{\glsnamefont}[1]{\textmd{#1}} +</div> +<!--l. 1576--><p class="nopar" > Some classes and packages redefine the <span +class="cmss-10">description</span><a + id="dx1-6003"></a><a + id="dx1-6004"></a> environment in such as way that’s +incompatible with the <span +class="cmss-10">glossaries </span>package. In which case you’ll need to select a +different glossary style (see below). +</p><!--l. 1582--><p class="indent" > By default, a full stop is appended to the description (unless you use +<span +class="cmss-10">glossaries-extra</span><a + id="dx1-6005"></a>). To prevent this from happening use the <span +class="cmss-10">nopostdot</span><a + id="dx1-6006"></a> package +option: + + + +</p> + <div class="verbatim" id="verbatim-72"> +\usepackage[nopostdot]{glossaries} +</div> +<!--l. 1587--><p class="nopar" > or to add it with <span +class="cmss-10">glossaries-extra</span>: + + + +</p> + <div class="verbatim" id="verbatim-73"> +\usepackage[postdot]{glossaries-extra} +</div> +<!--l. 1591--><p class="nopar" > +</p><!--l. 1593--><p class="indent" > By default, a location list is displayed for each entry (unless you use +<span +class="cmtt-10">\printunsrtglossary </span>without <span +class="cmtt-10">bib2gls</span><a + id="dx1-6007"></a>). 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> or <a +href="#option4">Option 4</a> (with +<span +class="cmtt-10">bib2gls</span><a + id="dx1-6008"></a> and <span +class="cmss-10">glossaries-extra</span><a + id="dx1-6009"></a>) then 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> or <a +href="#option4">Option 4</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="cmss-10">nonumberlist</span><a + id="dx1-6010"></a> package +option: + + + +</p> + <div class="verbatim" id="verbatim-74"> +\usepackage[nonumberlist]{glossaries} +</div> +<!--l. 1605--><p class="nopar" > or with <span +class="cmtt-10">bib2gls</span><a + id="dx1-6011"></a> use <span +class="cmtt-10">save-locations=false </span>in the optional argument of the +appropriate <span +class="cmtt-10">\GlsXtrLoadResources </span>(it’s possible to have some resource sets with +locations and some without). +</p><!--l. 1611--><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="cmss-10">nogroupskip</span><a + id="dx1-6012"></a> package option: + + + +</p> + <div class="verbatim" id="verbatim-75"> +\usepackage[nogroupskip]{glossaries} +</div> +<!--l. 1617--><p class="nopar" > +</p><!--l. 1619--><p class="indent" > If the default style doesn’t suit your document, you can change the style +using: +</p><!--l. 1622--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\setglossarystyle{</span>⟨<span +class="cmitt-10">style name</span>⟩<span +class="cmtt-10">} </span></div><hr> +</p><!--l. 1623--><p class="noindent" > +<a +href="http://www.dickimaw-books.com/gallery/glossaries-styles/" >There are a number of predefined styles.</a> 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. For example: + + + +</p> + <div class="verbatim" id="verbatim-76"> +\setglossarystyle{index} +</div> +<!--l. 1631--><p class="nopar" > You can also use the <span +class="cmss-10">style</span><a + id="dx1-6013"></a> package option for the preloaded styles. For example: + + + +</p> + <div class="verbatim" id="verbatim-77"> +\usepackage[style=index]{glossaries} +</div> +<!--l. 1636--><p class="nopar" > +</p><!--l. 1638--><p class="indent" > Examples: + </p><ol class="enumerate1" > + <li + class="enumerate" id="x1-6015x1">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-6016"></a> package. For example: + + + + <div class="verbatim" id="verbatim-78"> + \usepackage[nopostdot]{glossaries} +  <br />\usepackage{glossary-mcols} +  <br />\setglossarystyle{mcolindex} +</div> + <!--l. 1647--><p class="nopar" > or + + + +</p> + <div class="verbatim" id="verbatim-79"> + \usepackage[stylemods={mcols},style=mcolindex]{glossaries-extra} +</div> + <!--l. 1651--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-6018x2">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-80"> + \usepackage[nopostdot]{glossaries} +  <br />\setglossarystyle{altlist} +</div> + <!--l. 1659--><p class="nopar" > or + + + +</p> + <div class="verbatim" id="verbatim-81"> + \usepackage[stylemods,style=altlist]{glossaries-extra} +</div> + <!--l. 1663--><p class="nopar" > + </p></li> + <li + class="enumerate" id="x1-6020x3">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-82"> + \usepackage[nopostdot,nonumberlist]{glossaries} +  <br />\setglossarystyle{long4col} +</div> + <!--l. 1672--><p class="nopar" > or one of the “tree” styles: + + + +</p> + <div class="verbatim" id="verbatim-83"> + \usepackage[nopostdot,nonumberlist]{glossaries} +  <br />\setglossarystyle{tree} +</div> + <!--l. 1677--><p class="nopar" ></p></li></ol> +<!--l. 1680--><p class="indent" > If your glossary consists of a list of abbreviations and you also want to specify +a description as well as the long form, then you need to use an abbreviation 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-84"> +\setacronymstyle{long-short-desc} +</div> +<!--l. 1686--><p class="nopar" > Define the acronyms with a description: + + + +</p> + <div class="verbatim" id="verbatim-85"> +\newacronym + <br /> [description={statistical pattern recognition technique}] + <br /> {svm}{SVM}{support vector machine} +</div> +<!--l. 1692--><p class="nopar" > Alternatively with <span +class="cmss-10">glossaries-extra</span><a + id="dx1-6021"></a>: + + + +</p> + <div class="verbatim" id="verbatim-86"> +\setabbreviationstyle{long-short-desc} + <br />\newabbreviation + <br /> [description={statistical pattern recognition technique}] + <br /> {svm}{SVM}{support vector machine} +</div> +<!--l. 1700--><p class="nopar" > +</p><!--l. 1702--><p class="indent" > Choose a glossary style that suits wide entry names. For example: + + + +</p> + <div class="verbatim" id="verbatim-87"> +\setglossarystyle{altlist} +</div> +<!--l. 1705--><p class="nopar" > +</p><!--l. 1707--><p class="noindent" > +</p> +<!--l. 1707--><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. 1710--><p class="noindent" >The <span +class="cmss-10">glossaries</span><a + 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>2 </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. 1717--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\newglossary[</span>⟨<span +class="cmitt-10">glg</span>⟩<span +class="cmtt-10">]{</span>⟨<span +class="cmitt-10">label</span>⟩<span +class="cmtt-10">}{</span>⟨<span +class="cmitt-10">gls</span>⟩<span +class="cmtt-10">}{</span>⟨<span +class="cmitt-10">glo</span>⟩<span +class="cmtt-10">}{</span>⟨<span +class="cmitt-10">title</span>⟩<span +class="cmtt-10">} </span></div><hr> +</p><!--l. 1718--><p class="noindent" > +The ⟨<span +class="cmti-10">label</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="cmti-10">label</span>⟩. The final +argument ⟨<span +class="cmti-10">title</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><a + id="dx1-7002"></a>/<span +class="cmtt-10">xindy</span><a + id="dx1-7003"></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>). If you use <a +href="#option1">Option 1</a> +described above (or <span +class="cmtt-10">bib2gls</span><a + id="dx1-7004"></a> and <span +class="cmtt-10">\printunsrtglossaries</span>), then the ⟨<span +class="cmti-10">glg</span>⟩, ⟨<span +class="cmti-10">gls</span>⟩ and ⟨<span +class="cmti-10">glo</span>⟩ +arguments are ignored, in which case you may prefer to use the starred version where +you don’t specify the extensions: +</p><!--l. 1732--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\newglossary*{</span>⟨<span +class="cmitt-10">label</span>⟩<span +class="cmtt-10">}{</span>⟨<span +class="cmitt-10">title</span>⟩<span +class="cmtt-10">} </span></div><hr> +</p><!--l. 1733--><p class="noindent" > +</p><!--l. 1735--><p class="indent" > 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>. (Entries definitions should come after <span +class="cmtt-10">\makeglossaries</span>.) In the case +of <a +href="#option4">Option 4</a>, all glossary definitions must come before any <span +class="cmtt-10">\GlsXtrLoadResources</span> +that requires them. +</p><!--l. 1740--><p class="indent" > Since it’s quite common for documents to have both a list of terms and a list of +abbreviations, the <span +class="cmss-10">glossaries</span><a + id="dx1-7005"></a> package provides the package option <span +class="cmss-10">acronym</span><a + id="dx1-7006"></a> (or +<span +class="cmss-10">acronyms</span><a + id="dx1-7007"></a>), which is a convenient shortcut for + + + +</p> + <div class="verbatim" id="verbatim-88"> +\newglossary[alg]{acronym}{acr}{acn}{\acronymname} +</div> +<!--l. 1746--><p class="nopar" > The option 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. The +<span +class="cmss-10">glossaries-extra</span><a + id="dx1-7008"></a> package also provides this option for abbreviations defined using +<span +class="cmtt-10">\newacronym </span>but additionally has the package option <span +class="cmss-10">abbreviations</span><a + id="dx1-7009"></a> to create a list of +abbreviations for <span +class="cmtt-10">\newabbreviation</span>. +</p><!--l. 1754--><p class="indent" > There are some other package options for creating commonly used lists: <span +class="cmss-10">symbols</span><a + id="dx1-7010"></a> +(lists of symbols), <span +class="cmss-10">numbers</span><a + id="dx1-7011"></a> (lists of numbers), <span +class="cmss-10">index</span><a + id="dx1-7012"></a> (index of terms without +descriptions defined with <span +class="cmtt-10">\newterm[</span>⟨<span +class="cmti-10">options</span>⟩<span +class="cmtt-10">]{</span>⟨<span +class="cmti-10">label</span>⟩<span +class="cmtt-10">}</span>). +</p><!--l. 1759--><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-89"> + \usepackage[acronyms]{glossaries} + <br /> \newglossary[nlg]{notation}{not}{ntn}{Notation} +</div> +<!--l. 1764--><p class="nopar" > After <span +class="cmtt-10">\makeglossaries </span>(or <span +class="cmtt-10">\makenoidxglossaries</span>) you can define the entries in +the preamble. For example: + + + +</p> + <div class="verbatim" id="verbatim-90"> + \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. 1783--><p class="nopar" > or if you don’t like using <span +class="cmtt-10">\ensuremath</span>: + + + +</p> + <div class="verbatim" id="verbatim-91"> + \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. 1793--><p class="nopar" > +</p><!--l. 1795--><p class="indent" > Each glossary is displayed using: +</p><!--l. 1797--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\printnoidxglossary[type=</span>⟨<span +class="cmitt-10">type</span>⟩<span +class="cmtt-10">] </span></div><hr> +</p><!--l. 1798--><p class="noindent" > +(<a +href="#option1">Option 1</a>) or +</p><!--l. 1801--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\printglossary[type=</span>⟨<span +class="cmitt-10">type</span>⟩<span +class="cmtt-10">] </span></div><hr> +</p><!--l. 1802--><p class="noindent" > +(Options <a +href="#option2">2</a> and <a +href="#option3">3</a>). Where ⟨<span +class="cmti-10">type</span>⟩ is the glossary label. If the type is omitted the +default <span +class="cmtt-10">main </span>glossary is assumed. +</p><!--l. 1806--><p class="indent" > If you’re using <span +class="cmtt-10">bib2gls</span><a + id="dx1-7013"></a> then each glossary is displayed using: +</p><!--l. 1809--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\printunsrtglossary[type=</span>⟨<span +class="cmitt-10">type</span>⟩<span +class="cmtt-10">] </span></div><hr> +</p><!--l. 1810--><p class="noindent" > +With this method you don’t use <span +class="cmtt-10">\makeglossaries </span>or <span +class="cmtt-10">\makenoidxglossaries</span>. +Instead you can assign the entry type with the resource command. For example: + + + +</p> + <div class="verbatim" id="verbatim-92"> + \usepackage[record,abbreviations,symbols]{glossaries-extra} + <br /> \GlsXtrLoadResources[ + <br />  src={terms}, % entries defined in terms.bib + <br />  type={main}% put in main glossary + <br /> ] + <br /> \GlsXtrLoadResources[ + <br />  src={abbrvs}, % entries defined in abbrvs.bib + <br />  type={abbreviations}% put in abbreviations glossary + <br /> ] + <br /> \GlsXtrLoadResources[ + <br />  src={syms}, % entries defined in syms.bib + <br />  type={symbols}% put in symbols glossary + <br /> ] +</div> +<!--l. 1829--><p class="nopar" > Later in the document: + + + +</p> + <div class="verbatim" id="verbatim-93"> + \printunsrtglossary % main + <br /> \printunsrtglossary[type=abbreviations] + <br /> \printunsrtglossary[type=symbols] +</div> +<!--l. 1835--><p class="nopar" > +</p><!--l. 1837--><p class="indent" > There’s a convenient shortcut that will display all the defined glossaries +depending on the indexing method: +</p><!--l. 1840--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\printnoidxglossaries </span></div><hr> +</p><!--l. 1841--><p class="noindent" > +(<a +href="#option1">Option 1</a>) or +</p><!--l. 1844--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\printglossaries </span></div><hr> +</p><!--l. 1845--><p class="noindent" > +(Options <a +href="#option2">2</a> and <a +href="#option3">3</a>) or (<span +class="cmss-10">glossaries-extra</span><a + id="dx1-7014"></a> only) +</p><!--l. 1848--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\printunsrtglossaries </span></div><hr> +</p><!--l. 1849--><p class="noindent" > +</p><!--l. 1851--><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><a + id="dx1-7015"></a> Perl script or the <span +class="cmtt-10">makeglossaries-lite</span><a + id="dx1-7016"></a> Lua 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><a + id="dx1-7017"></a> Perl script then you need to make sure you run <span +class="cmtt-10">makeindex</span><a + id="dx1-7018"></a>/<span +class="cmtt-10">xindy</span><a + id="dx1-7019"></a> +<span +class="cmti-10">for each defined glossary</span>. The ⟨<span +class="cmti-10">gls</span>⟩ and ⟨<span +class="cmti-10">glo</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="cmti-10">glg</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><a + id="dx1-7020"></a>/<span +class="cmtt-10">xindy</span><a + id="dx1-7021"></a> errors or warnings if things go +wrong. +</p><!--l. 1865--><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-94"> +\usepackage[acronyms]{glossaries} + <br />\newglossary[nlg]{notation}{not}{ntn}{Notation} +</div> +<!--l. 1871--><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. 1875--><p class="indent" > + </p><dl class="description"><dt class="description"> + </dt><dd +class="description"><a +href="#option2">Option 2</a> Either use one <span +class="cmtt-10">makeglossaries</span><a + id="dx1-7022"></a> or <span +class="cmtt-10">makeglossaries-lite</span><a + id="dx1-7023"></a> call: + + + + <div class="verbatim" id="verbatim-95"> + makeglossaries myDoc +</div> + <!--l. 1881--><p class="nopar" > or + + + +</p> + <div class="verbatim" id="verbatim-96"> + makeglossaries-lite myDoc +</div> + <!--l. 1885--><p class="nopar" > Or you need to run <span +class="cmtt-10">makeindex</span><a + id="dx1-7024"></a> three times: + + + +</p> + <div class="verbatim" id="verbatim-97"> + 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. 1891--><p class="nopar" > + </p></dd><dt class="description"> + </dt><dd +class="description"><a +href="#option3">Option 3</a> Either use one <span +class="cmtt-10">makeglossaries</span><a + id="dx1-7025"></a> call: + + + + <div class="verbatim" id="verbatim-98"> + makeglossaries myDoc +</div> + <!--l. 1897--><p class="nopar" > Or you need to run <span +class="cmtt-10">xindy</span><a + id="dx1-7026"></a> three times (be careful not to insert line breaks + where the line has wrapped.) + + + +</p> + <div class="verbatim" id="verbatim-99"> + 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. 1907--><p class="nopar" > + </p></dd><dt class="description"> + </dt><dd +class="description"><a +href="#option4">Option 4</a> With <span +class="cmtt-10">bib2gls</span><a + id="dx1-7027"></a> only one call is required: + + + + <div class="verbatim" id="verbatim-100"> + pdflatex myDoc +  <br />bib2gls --group myDoc +  <br />pdflatex myDoc +</div> + <!--l. 1915--><p class="nopar" > (Omit <span class="obeylines-h"><span class="verb"><span +class="cmtt-10">--group</span></span></span> if you don’t need letter groups.)</p></dd></dl> +<!--l. 1920--><p class="noindent" > +</p> +<!--l. 1920--><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. 1923--><p class="noindent" >Take care if you use the <span +class="cmss-10">glossaries</span><a + 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-8004"></a> (and <span +class="cmss-10">glossaries-extra</span><a + id="dx1-8005"></a>) must be loaded +<span +class="cmti-10">after </span><span +class="cmss-10">hyperref</span><a + id="dx1-8006"></a>: + + + +</p> + <div class="verbatim" id="verbatim-101"> +\usepackage[colorlinks]{hyperref} + <br />\usepackage{glossaries} +</div> +<!--l. 1930--><p class="nopar" > If you use <span +class="cmss-10">hyperref</span><a + id="dx1-8007"></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. 1937--><p class="indent" > By default, if the <span +class="cmss-10">hyperref</span><a + id="dx1-8008"></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 to disable this for <span +class="cmti-10">all </span>your +glossaries, then use +</p><!--l. 1942--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\glsdisablehyper </span></div><hr> +</p><!--l. 1943--><p class="noindent" > +If you want hyperlinks suppressed for entries in specific glossaries, then use the +<span +class="cmss-10">nohypertypes</span><a + id="dx1-8009"></a> 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-102"> +\usepackage[colorlinks]{hyperref} + <br />\usepackage[acronym,nohypertypes={acronym,notation}]{glossaries} + <br />\newglossary[nlg]{notation}{not}{ntn}{Notation} +</div> +<!--l. 1953--><p class="nopar" > +</p><!--l. 1955--><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="cmss-10">hyperfirst=false</span><a + id="dx1-8010"></a> package +option: + + + +</p> + <div class="verbatim" id="verbatim-103"> +\usepackage[colorlinks]{hyperref} + <br />\usepackage[hyperfirst=false]{glossaries} +</div> +<!--l. 1961--><p class="nopar" > +</p><!--l. 1963--><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-8011"></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-8012"></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-104"> +\section{The \texorpdfstring{\gls{fishage}}{Fish Age}} +</div> +<!--l. 1971--><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. 1976--><p class="indent" > <hr><div title="Definition"><span +class="cmtt-10">\glsentrytext{</span>⟨<span +class="cmitt-10">label</span>⟩<span +class="cmtt-10">} </span></div><hr> +</p><!--l. 1977--><p class="noindent" > +This is expandable provided that the <span +class="cmtt-10">text </span>key doesn’t contain non-expandable code. +For example, the following works: + + + +</p> + <div class="verbatim" id="verbatim-105"> +\section{The \glsentrytext{fishage}} +</div> +<!--l. 1982--><p class="nopar" > and it doesn’t put the table of contents in the location list. +</p><!--l. 1985--><p class="indent" > If you use <span +class="cmss-10">glossaries-extra</span><a + id="dx1-8013"></a> then use the commands that are provided specifically for +use in section headers. For example: + + + +</p> + <div class="verbatim" id="verbatim-106"> +\section{The \glsfmttext{fishage}} +</div> +<!--l. 1989--><p class="nopar" > +</p><!--l. 1991--><p class="noindent" > +</p> +<!--l. 1991--><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. 1994--><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="cmti-10">label list</span>⟩<span +class="cmtt-10">}</span> +key when you define an entry. The referenced entry (or entries) must also be +defined. +</p><!--l. 1998--><p class="indent" > For example: + + + +</p> + <div class="verbatim" id="verbatim-107"> +\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. 2015--><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="cmti-10">tag</span>⟩<span +class="cmtt-10">]</span>⟨<span +class="cmti-10">label</span>⟩. For example: + + + +</p> + <div class="verbatim" id="verbatim-108"> +\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. 2033--><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-109"> +\newacronym{ksvm}{ksvm}{kernel support vector machine} + <br />\newacronym + <br /> [see={[see also]{ksvm}}] + <br /> {svm}{svm}{support vector machine} +</div> +<!--l. 2042--><p class="nopar" > The <span +class="cmss-10">glossaries-extra</span><a + id="dx1-9001"></a> package provides a <span +class="cmtt-10">seealso </span>key. This doesn’t allow a tag but +behaves much like <span +class="cmtt-10">see=</span><span +class="cmsy-10">{</span><span +class="cmtt-10">[\seealsoname]{</span>⟨<span +class="cmitt-10">label</span>⟩<span +class="cmtt-10">}</span><span +class="cmsy-10">}</span>. For example: + + + +</p> + <div class="verbatim" id="verbatim-110"> +\newabbreviation{ksvm}{ksvm}{kernel support vector machine} + <br />\newabbreviation + <br /> [seealso={ksvm}] + <br /> {svm}{svm}{support vector machine} +</div> +<!--l. 2051--><p class="nopar" > +</p><!--l. 2053--><p class="indent" > Since the cross-reference appears in the location list, if you suppress the +location list using the <span +class="cmss-10">nonumberlist</span><a + id="dx1-9002"></a> package option, then the cross-reference +will also be suppressed. With <span +class="cmtt-10">bib2gls</span><a + id="dx1-9003"></a>, don’t use the <span +class="cmss-10">nonumberlist</span><a + id="dx1-9004"></a> package +option. Instead use the <span +class="cmtt-10">save-locations=false </span>in the resource options. For +example: + + + +</p> + <div class="verbatim" id="verbatim-111"> +\usepackage[record,abbreviations,symbols]{glossaries-extra} + <br />\GlsXtrLoadResources[ + <br /> src={terms}, % entries defined in terms.bib + <br /> type={main}% put in main glossary + <br />] + <br />\GlsXtrLoadResources[ + <br /> src={abbrvs}, % entries defined in abbrvs.bib + <br /> type={abbreviations},% put in abbreviations glossary + <br /> save-locations=false% no number list for these entries + <br />] + <br />\GlsXtrLoadResources[ + <br /> src={syms}, % entries defined in syms.bib + <br /> type={symbols}% put in symbols glossary + <br />] +</div> +<!--l. 2075--><p class="nopar" > +</p><!--l. 2077--><p class="noindent" > +</p> +<!--l. 2077--><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> + <ul class="itemize1"> + <li class="itemize"><a +href="http://mirrors.ctan.org/support/bib2gls/bib2gls-begin.pdf" ><span +class="cmss-10">glossaries-extra </span>and <span +class="cmtt-10">bib2gls</span>: an introductory guide</a>. + </li> + <li class="itemize">The main <span +class="cmss-10">glossaries</span><a + id="dx1-10001"></a> <a +href="glossaries-user.html" >user manual</a>. + </li> + <li class="itemize">The <a +href="http://www.dickimaw-books.com/faqs/glossariesfaq.html" >glossaries FAQ</a>. + </li> + <li class="itemize"><a +href="https://www.dickimaw-books.com/latex/buildglossaries/" >Incorporating makeglossaries or makeglossaries-lite or bib2gls into the + document build</a>. + </li> + <li class="itemize">The <a +href="https://ctan.org/pkg/glossaries-extra" ><span +class="cmss-10">glossaries-extra</span></a> package. + </li> + <li class="itemize">The <a +href="https://ctan.org/pkg/bib2gls" ><span +class="cmtt-10">bib2gls</span></a> application.</li></ul> + <div class="footnotes"><!--l. 1038--><p class="noindent" ><span class="footnote-mark"><a +href="#fn1x0-bk" id="fn1x0"><sup class="textsuperscript">1</sup></a></span><span +class="cmr-8">deprecated, use </span><span +class="cmss-8">babel</span><a + id="dx1-5021"></a> <span +class="cmr-8">instead</span></p> </div> + +</body></html> + + + + |