Home

User Manual for glossaries.sty

image

Contents

1. 210 lel name sampl le2 name samp lel description an example le2 description an example ifglsfielddefeq 16 Utilities begin document ifglsfieldeq samplel useri foo TRUE FALSE ifglsfieldeq sample2 useri foo TRUE FALSE end document i This now produces FALSE for the first case comparing FOO with foo and TRUE for the second case comparing foo with foo You can test if the value of a field is equal to the replacement text of a command using ifglsfielddefeq label field command true false This internally uses etoolbox s ifdefstrequal command to per form the comparison The argument command must be a macro For example documentclass article usepackage glossaries newcommands foo FOO glssetnoexpandfield useri newglossaryentry samplel name samplel description an example userl FOO newglossaryentry sample2 name sample2 description an example userl foo begin document ifglsfielddefeq samplel useri foo TRUE FALSE ifglsfielddefeq sample2 useri foo TRUE FALSE end document Here the first case produces TRUE since the value of the useri field FOO is the same as the replacement text definition of foo
2. For example glsSetCompositor This command must not be used after makeglossaries If you use Option 3 you can have a different compositor for page numbers starting with an upper case alphabetical character using glsSetAlphaCompositor glsSetAlphaCompositor symbol This command has no effect if you use Option 2 For example if you want number lists containing a mixture of A 1 and 2 3 style formats then do glsSetCompositor glsSetAlphaCompositor See Section 5 for further information about number lists 74 newglossaryentry longnewglossaryentry provideglossaryentry 4 Defining Glossary Entries All glossary entries must be defined before they are used so it is better to define them in the preamble to ensure this In fact some commands such as longnewglossaryentry may only be used in the preamble See Section 4 10 for a discussion of the problems with defining entries within the document instead of in the preamble Option 1 enforces the preamble only restriction on newglossaryentry Only those entries that are referenced in the document using any of the commands described in Section 6 Section 7 or Section 8 will appear in the glossary See Section 10 to find out how to display the glossary New glossary entries are defined using the command newglossaryentry label key value list This is a short command so values in key val list can t contain any paragraph breaks I
3. body This iterates through all entries in the glossary given by glossary label At each iteration cs which must be a control sequence is set to the entry label for the current iteration and body is performed If glossary label is omitted glsdefaulttype usually the main 206 16 Utilities glossary is used forallglsentries forallglsentries glossary list cs body This is like forglsentries but for each glossary in glossary list a comma separated list of glossary labels If glossary list is omit ted the default is the list of all defined glossaries except the ig nored ones At each iteration cs is set to the entry label and body is performed The current glossary label can be obtained using glsentrytype cs within body we 16 2 Conditionals ifglossaryexists ifglossaryexists label true part false part This checks if the glossary given by label exists If it does true part is performed otherwise false part we Ee ifglsentryexists N fglsentryexists label true part false part This checks if the glossary entry given by label exists If it does true part is performed otherwise false part Note that ifglsentryexists will always be true after the containing glossary has been displayed via printglossary or printglossaries even if the entry is explicitly defined later in the document This is because the entry has to
4. glsmoveent ry label target glossary label 95 4 Defining Glossary Entries where label is the unique label identifying the required entry and target glossary label is the unique label identifying the glossary in which to put the entry Note that no check is performed to determine the existence of the target glossary If you want to move an entry to a glossary that s skipped by printglossaries then define an ignored glossary with newignoredglossary See Section 12 Unpredictable results may occur if you move an entry to a different glossary from its parent or children 4 10 Drawbacks With Defining Entries in the Document Environment Originally newglossaryentry and newacronym could only be used in the preamble I reluctantly removed this restriction in ver sion 1 13 but there are issues with defining commands in the docu ment environment instead of the preamble which is why the restric tion is maintained for newer commands This restriction is also reim posed for newglossaryentry by the new Option 1 4 10 1 Technical Issues 1 If you define an entry mid way through your document but subsequently shuffle sections around you could end up using an entry before it has been defined 2 Entry information is required when displaying the glossary If this occurs at the start of the document but the entries aren t defined until later then the entry details are being looked up before the entry h
5. FOO We have the result FOO is equal to FOO The second case produces FALSE since the value of the useri field foo is not the same as the replacement text definition of 00 FOO No expansion has been performed on the value of the useri field We have the result V foo is not equal to FOO If we add 211 Nifglsfieldcseq glsfieldfetch glsfielddef glsfieldedef 16 Utilities newcommand FOO f oo ifglsfielddefeq sample2 useri FOO TRUE FALSE we now get TRUE since the value of the useri field foo is the same as the replacement text definition of FOO foo We have the result foo is equal to foo There is a similar command that requires the control sequence name without the leading backslash instead of the actual control sequence ifglsfieldcseq label field csname true false This internally uses etoolbox s i fcsst requal command instead of ifdefstrequal 16 3 Fetching and Updating the Value of a Field You can fetch the value of a given field and store it in a control se quence using glsfieldfetch label field t cs where label is the label identifying the glossary entry field is the field label see table 4 1 and cs is the control sequence in which to store the value Remember that field is the internal label and is not necessar
6. Note that you can also specify the language and encoding using the package option xindy language lang codepage code 140 11 Xindy Option 3 For example Nusepackage xindy language english codepage ut f8 glossaries If you write your own custom xindy style file that includes the language settings you need to set the language to nothing GlsSetXdyLanguage and remember to use noist to prevent the style file from being overwritten The commands GlsSetXdyLanguage and GlsSetXdyCodePage have no effect if you don t use makeglossaries If you call xindy without makeglossaries you need to remember to set the language and encoding using the L and C switches 11 2 Locations and Number lists If you use xindy the glossaries package needs to know which coun ters you will be using in the number list in order to correctly format the xindy style file Counters specified using the counter package option or the counter option of newglossary are automatically taken care of but if you plan to use a different counter in the counter key for commands like glslink then you need to identify these counters before Nnakeglossaries using GlsAddXdyCounters GlsAddXdyCounters counter list where counter list is a comma separated list of counter names The most likely attributes used in the format key textrm hyperrm etc are automatically added to the xindy style file but if you want to use another
7. label insert 215 17 Prefixes or Determiners This is inserts the value of the prefixplural key or prefixfirstplural key on first use in front of glsp1 options label insert Pglspl Pglspl options label insert If the prefixplural key or prefixfirstplural on first use has been set this displays the value of that key with the first letter converted to upper case followed by glsp1 options label insert If that key hasn t been set this is equivalent to G1 sp1 options label insert PGLSpl PGLSp1 options label insert As pglsp1 but converts the prefix to upper case and uses GLSp1 instead of glspl Example 30 Using Prefixes Continuing from Example 29 now that I ve defined my entries I can use them in the text via the above commands First use pgls svm Next use pgls svm Singular pgls sample pgls oeil Plural pglspl sample pglspl oeil e which produces First use a support vector machine SVM Next use an SVM Singular a sample l oeil Plural the samples les yeux For a complete document see sample prefix tex This package also provides the commands described below none of which perform any check to determine the entry s existence ifglshasprefix ifglshasprefix label true part false part Does true part if the entry identified by label h
8. newglossaryentry glossary name glossary description nopostdesc plural glossaries Again the parent entry has no description so the description termi nator needs to be suppressed using nopostdesc Now define the two different meanings of the word newglossaryentry glossarylist description list of technical words sort 1 parent glossary newglossaryentry glossarycol description collection of glosses sort 2 parent glossary Note that if I reference the parent entry the location will be added to the parent s number list whereas if I reference any of the child entries the location will be added to the child entry s number list Note also that since the sub entries have the same name the sort key is required unless you are using the sort use or sort def package options see Section 2 4 You can use the subentrycounter package option to automatically number the first level child entries See Section 2 3 for further details 92 loadglsentries 4 Defining Glossary Entries In the above example the plural form for both of the child entries is the same as the parent entry so the plural key was not required for the child entries However if the sub entries have different plurals they will need to be specified For example newglossaryentry bravo name bravo description nopostdesc newglossaryentry bravocry description cry of approval pl bravos sort 1
9. plural bravos parent bravo newglossaryentry bravoruffian description hired ruffian or killer pl bravoes sort 2 plural bravoes parent bravo 4 8 Loading Entries From a File You can store all your glossary entry definitions in another file and use loadglsentries type filename where filename is the name of the file containing all the newglossaryentry or longnewglossaryentry commands The optional argument type is the name of the glossary to which those entries should belong for those entries where the type key has been omitted or more specifically for those entries whose type has been specified by glsdefaulttype which is what newglossaryentry uses by default This is a preamble only command You may also use input to load the file but don t use include If you want to use AtBeginDocument to input all your entries automatically at the start of the document add the AtBeginDocument command before you load the glossaries package and babel if you are also loading that to avoid the creation of the glsdefs file and any associated problems that are caused by defining commands in the document environment See Section 4 10 93 4 Defining Glossary Entries Example 7 Loading Entries from Another File Suppose I have a file called myent ries tex which contains newglossaryentry perl type main name Perl description A scripting language newglossary
10. 2 glsentrylong 2 3 space acronymfont glsentryshort 2 oe oe 164 13 Acronyms and Other Abbreviations Nrenewcommand Acrfullfmt 3 glslink 1 2 Glsentrylong 2 3 space acronymfont glsentryshort 2 oe renewcommands ACRfullfmt 3 glslink 1 2 MakeTextUppercase glsentrylong 2 3 space acronymfont glsentryshort 2 ol oo Ww renewcommand acrfullplfmt 3 glslink 1 2 glsentrylongpl 2 3 space acronymfont glsentryshortpl 2 oe Nrenewcommand Acrfullplfmt 3 glslink 1 2 Glsentrylongpl 2 3 space acronymfont glsentryshortpl 2 oe renewcommand ACRfullplfmt 3 glslink 1 2 MakeTextUppercase glsentrylongpl 2 3 space acronymfont glsentryshortpl 2 oe oe oe This may cause problems with long hyperlinks in which case adjust the definitions so that for example only the short form is inside the argument of glslink The style also needs to redefine acronymsort so that the acronyms are sorted according to the long form renewcommand acronymsort 2 2 If you prefer them to be sorted according to th
11. 7 Adding an Entry to the Glossary Without Generating Text glsaddallunused list This command uses glsadd format gobble which will ig nore this location in the number list The optional argument list is a comma separated list of glossary types If omitted it defaults to the list of all defined glossaries If you want to use glsaddallunused it s best to place the com mand at the end of the document to ensure that all the commands you intend to use have already been used Otherwise you could end up with a spurious comma or dash in the location list Example 14 Dual Entries The example file sampl1e dual tex makes use of glsadd to al low for an entry that should appear both in the main glossary and in the list of acronyms This example sets up the list of acronyms using the acronym package option usepackage acronym glossaries A new command is then defined to make it easier to define dual en tries newcommands newdualentry 5 newglossaryentry main 2 name 4 text 3 glsadd 2 description 5 1 newacronym 2 3 glsadd main 2 4 This has the following syntax newdualentry options label abbrv long t description You can then define a new dual entry newdualentry svm label SVM abbreviation support vector machine long form Statistical pattern recognition technique description Now you can reference the acron
12. Example 10 First Use With Hyperlinked Footnote Descrip tion Suppose I want the first use to have a hyperlink to the description in a footnote instead of hyperlinking to the relevant place in the glos sary First I need to disable the hyperlinks on first use via the package option hyperfirst false usepackage hyperfirst false glossaries Now I need to redefine gl sent ryfmt see Section 6 3 Nrenewcommand Nglsentryfmt glsgenentryfmt ifglsused glslabel footnote glsentrydesc glslabel Now the first use won t have hyperlinked text but will be followed by a footnote See the sample file samp1e FnDesc tex for a com plete document 118 6 Links to Glossary Entries Note that the hyperfirst option applies to all defined glossaries It may be that you only want to disable the hyperlinks on first use for glossaries that have a different form on first use This can be achieved by noting that since the entries that require hyperlinking for all in stances have identical first and subsequent text they can be unset via glsunsetall see Section 14 so that the hyperfirst option doesn t get applied Example 11 Suppressing Hyperlinks on First Use Just For Acronyms Suppose I want to suppress the hyperlink on first use for acronyms but not for entries in the main glossary I can load the glossaries pack age using usepackage hyperfirst false acronym glossaries Once all glossary entries
13. If you redefine glsseeformat keep the default value of the optional argument as seename as both see and glssee explicitly write seename in the out put file if no optional argument is given 125 glsseelastsep glsseeitemformat 8 Cross Referencing Entries glsseelastsep These default to space and space andname space re spectively The list entry text is displayed using glsseeitemformat label This defaults to glsentrytext label For example to make the cross referenced list use small caps renewcommand glsseeitemformat 1 textsc glsentrytext 1 You can use glsseeformat and glsseelist in the main body of the text but they won t automatically add the cross referenced entries to the glossary If you want them added with that location you can do Some information see also glsseelist FourierSeries TaylorsTheorem glsadd FourierSeries glsadd TaylorsTheorem In versions before 3 0 gl sent ryname was used but this could cause problems when the name key was sanitized 126 9 Using Glossary Terms Without Links The commands described in this section display entry details without adding any information to the glossary They don t use glstext format they don t have any optional arguments they don t affect the first use flag and apart from glshyperlink they don t produce hy perlinks Commands that aren t expandable will be igno
14. Note that some of the commands provided by the glossaries package must not be used after makeglossaries as they are required when creating the customised style file If you attempt to use those commands after makeglossaries you will generate an error Similarly there are some commands that must not be used before makeglossaries You can suppress the creation of the customised x indy or makeindex style file using 73 3 Setting Up noist nowst That this command must not be used after makeglossaries Note that if you have a custom xdy file created when using glossaries version 2 07 or below you will need to use the compatible 2 07 package option with it The default name for the customised style file is given by jobname ist Option 2 or jobname xdy Option 3 This name may be changed using setStyleFil setStyleFile name where name is the name of the style file without the extension Note that this command must not be used after makeglossaries Each glossary entry is assigned a number list that lists all the lo cations in the document where that entry was used By default the location refers to the page number but this may be overridden using the counter package option The default form of the location number assumes a full stop compositor e g 1 2 but if your location numbers use a different compositor e g 1 2 you need to set this using glsSetCompositor glsSetCompositor symbol
15. altsuperragged4colheader The altsuperragged4colheader style is like alt superragged4col but has a header row altsuperragged4colheaderborder The altsuperragged4colheaderborder style is like altsuperragged4colheader but has horizontal and vertical lines around it 15 1 6 Tree Like Styles The styles described in this section are all defined in the package glossary tree These styles are designed for hierarchical glossaries but can also be used with glossaries that don t have sub entries These styles will display the entry s symbol if it exists Note that these styles will automatically be available unless you use the notree or nostyles package options These styles all format the entry name using glstreenamefmt name This defaults to textbf name but note that name includes glsnamefont so the bold setting in glstreenamefont may be counteracted by another font change in glsnamefont or in acronymfont The tree like styles that also display the header use glstreenamefmt to format the heading index The index style is similar to the way indices are usually format ted in that it has a hierarchical structure up to three levels the main level plus two sub levels The name is typeset in bold and if the symbol is present it is set in parentheses after the name and before the description Sub entries are indented and also include the name the symbol in brackets if present and the description Groups are sep
16. 72 74 compatible 3 07 66 72 113 counter 60 74 98 141 144 page 60 counterwithin 57 184 200 203 description 67 69 Qu i9 n 68 69 entrycounter 57 58 184 200 203 false 2 lll zu kw 57 THUG Se eS weds oe eee 57 footnote 67 69 hyperfirst 51 92 119 false 52 104 118 160 THUG ooreet ieta ee 51 index 48 71 72 148 indexonlyfirst 53 false rn 53 makeindex 48 64 72 nogroupskip 19 60 186 200 204 false x cee e mk mi 60 230 nohypertypes 51 52 103 104 114 118 148 index sedem 71 nolist 59 72 187 nolog 58 72 186 188 nomain 48 66 70 72 148 nonumberlist 10 59 79 98 121 201 nopostdot 60 187 false llle 60 noredefwarn 48 nostyles 59 72 186 188 191 195 nosuper 59 72 186 191 notranslate Shou y notree 59 72 195 nowam rnn 48 numberedsection 56 135 136 autolabel 56 57 false vat x exi 56 nameref 57 nolabel 56 numberline 54 numbers 48 70 148 order uel 63 136 letter 14 23 41 63 word 23 41 63 sanitizesort 16 49 61 false 12 49 61 79 true 12 49 78 80 136 savenumberlist o3 132 falS amp seve wee R 53 savewrites 49 50
17. Note that although this chapter uses the term acronym you can also use the commands described here for abbreviations or contractions as in the case of some of the examples given below If the glossary title is no longer applicable for example it should be Abbreviations rather than Acronyms then you can change the title either by redefining acronymname see Section 1 3 or by using the title in the optional argument of printglossary or printacronym You may have noticed in Section 4 that when you specify a new entry you can specify alternate text to use when the term is first used in the document This provides a useful means to define acronyms For convenience the glossaries package defines the command newacronym newacronym key val list label abbro long This uses newglossaryentry to create an entry with the given label in the glossary given by acronymtype You can specify a dif ferent glossary using the type key within the optional argument The newacronym command also uses the long longplural short and short plural keys in newglossaryentry to store the long and abbreviated forms and their plurals If you haven t identified the specified glossary type as a list of acronyms via the package option acronymlists or the command DeclareAcronymlList see Section 2 5 newacronym will add it to the list and reset the display style for that glossary via defglsentryfmt If you h
18. VAYPETDE oso esccheents 105 hyperbsf 105 hyperemph 105 WAYPETLE vosenn t edens 105 hyperlink 105 118 Nhypetfmd x12 329 ba 105 Mhyp rpage sess sac sas 105 hyperref package 2 100 105 108 114 118 127 132 133 143 144 201 hyperrm 105 141 Xhyperse co 9 4 105 Nhypertsf si desa e ees 105 hypers L owed Re RIS 105 hypertarget 118 Mhypertb sce hee woe nek 105 NBYDeErup aiora mnei ees 105 I ifglossaryexists 207 ifglsdescsuppressed 209 ifglsentryexists 207 ifglsfieldcseq 412 ifglsfielddefeq 211 ifglsfieldeq 172 209 ifglshaschildren 208 ifglshasdesc 209 ifglshaslong T 52 88 89 161 208 ifglshasparent 208 ifglshasprefix 216 ifglshasprefixfirst 217 ifglshasprefixfirstplural TL eae aR ease 217 ifglshasprefixplural 216 ifglshasshort 161 208 ifglshassymbol 203 208 ifglsucmark J9 ifgls sed xcu e es 52 114 161 172 177 208 ifignoredglossary 148 imakeidx package 71 Ninglude ohachee wowace 93 index 71 104 105 index package 7 1 indexname 149 indexspace 187 195 200 204 228 MEE kerete nete RET 29 93 inputenc package v 18 24 30 78 80 140 inputencodingname 140 Miten ersa nbis ti ai eai 187 itemize envir
19. firstaccess The replacement text corresponding to the first key pluralaccess The replacement text corresponding to the plural key firstpluralaccess The replacement text corresponding to the firstplural key symbolaccess The replacement text corresponding to the symbol key symbolpluralaccess The replacement text corresponding to the sym bolplural key descriptionaccess The replacement text corresponding to the descrip tion key descriptionpluralaccess The replacement text corresponding to the descriptionplural key longaccess The replacement text corresponding to the long key used by newacronym shortaccess The replacement text corresponding to the short key used by newacronym longpluralaccess The replacement text corresponding to the longplural key used by newacronym shortpluralaccess The replacement text corresponding to the shortplu ral key used by newacronym 219 18 Accessibility Support For example newglossaryentry tex name TeX preparation language access TexX Now gls tex will be equivalent to description Document BeginAccSupp ActualText TeX TeX EndAccSupp The sample file sampleaccsupp tex illustrates the glossaries accsupp package See section 5 in the documented code glossaries code pdf for further details It is recommended that you also read the accsupp documentation 220 19 Troubleshooting The glossaries package comes
20. forallglsentries DOF epia aede TEE forglsentries 206 altsuperragged4colheader frame environment 19g 5 e e ess 195 altsuperragged4colheaderborder GC ie SA d de RE aed 195 Genacrfullformat 115 soto weal f ree eee 195 197 genacrfullformat alttreegroup 196 197 115 116 156 161 163 alttreehypergroup 196 197 GenericAcronymFields THOS PD 195 197 PNE 161 166 indexgroup 195 197 Genplacrfullformat 115 indexhypergroup 195 197 genplacrfullformat 115 116 inline 24 197 198 glossaries package list 59 187 199 201 204 218 nee 29 31 93 103 104 listdotted 186 188 glossaries accsupp package TOORIEDUE raii 61 164 187 Q 28 79 80 219 220 listhyper group esien glossaries babel package 50 51 187 188 195 196 200 glossaries polyglossia package 50 TONG eee Se ads 186 188 189 glossaries prefix package lo ng3col A 185 189 AS 28 79 80 214 215 long3colborder 185 189 glossary counters long3colheader 185 189 long3colheaderborder glossaryentry 67 185 189 glossarysubentry 58 77 pou SU 7 glossary package 2 11 173 174 EP pir MD E E glossary styles F n E 7 altlist 159 160 168 187 188 d n m Le alt listgroup escasas o E 189 190 altlisthypergroup 188 longborder 189 altlon
21. oe oe use the same definitions as long short NGlsUseAcrStyleDefs long short Minor modifications renewcommand acronymfont 1 textsc 1 renewcommands acrpluralsuffix glstextup glspluralsuffix glstextup glstextup is used to cancel the effect of textsc This defaults to textulc if defined otherwise t ext up For example the plural of SVM should be rendered as SVMs rather than SVMS Example 22 Defining a Custom Acronym Style Suppose I want my acronym on first use to have the short form in the text and the long form with the description in a footnote Suppose also that I want the short form to be put in small caps in the main 162 13 Acronyms and Other Abbreviations body of the document but I want it in normal capitals in the list of acronyms In my list of acronyms I want the long form as the name with the short form in brackets followed by the description That is in the text I want gls on first use to display textsc abbrv footnote long description on subsequent use textsc abbrv and in the list of acronyms each entry will be displayed in the form long short description Let s suppose it s possible that I may have a mixed glossary I can check this in the second argument of Nnewacronymstyle using ifglshaslong glslabel glsgenacfmt glsgenentryfmt This will use glsgenentryfmt if the entry isn t an acro
22. packages You can also define your own custom keys see Section 4 3 Note that if the name starts with non Latin character you must group the character otherwise it will cause a problem for commands like Gls and Glsp1 For example newglossaryentry elite name e lite description select group or class Note that the same applies if you are using the inputenc package newglossaryentry elite name lite description select group or class This doesn t apply for XqIATEX documents using the fontspec package For further details see the section UTF 8 mfirstuc manual pdf in the mfirstuc user manual Note that in both of the above examples you will also need to sup ply the sort key if you are using Option 2 whereas xindy Option 3 is usually able to sort non Latin characters correctly Option 1 discards accents from standard IATEX extended Latin characters unless you use the sanitizesort true 4 1 Plurals You may have noticed from above that you can specify the plural form when you define a term If you omit this the plural will be obtained by appending 80 4 Defining Glossary Entries glspluralsuffix glspluralsuffix HF to the singular form This command defaults to the letter s For example newglossaryentry cow name cow description a fully grown female of any bovine animal defines a new entry whose singular form is cow and plural form is cows Howeve
23. 2 2 Nrenewcommand acronymentry 1 Glsentrylong 1 space MakeTextUppercase glsentryshort 1 Now I need to specify that I want to use this new style setacronymstyle custom fn I also need to use a glossary style that suits this acronym style for example altlist setglossarystyle altlist Once the acronym style has been set I can define my acronyms newacronym description set of tags for use in developing hypertext documents html html Hyper Text Markup Language newacronym description language used to describe the layout of a document written in a markup language css css Cascading Style Sheet The sample file sample custom acronym tex illustrates this example Example 23 Italic and Upright Abbreviations Suppose I want to have some abbreviations in italic and some that just use the surrounding font Hard coding this into the short argu ment of newacronym can cause complications 168 13 Acronyms and Other Abbreviations This example uses glsaddstoragekey to add an extra field that can be used to store the formatting declaration such as em glsaddstoragekey font entryfont This defines a new field key called font which defaults to noth ing if it s not explicitly set This also defines a command called entryfont that s analogous to glsentrytext A new style is then created to format abbreviations that access this fiel
24. format This specifies how to format the associated location number for this entry in the glossary This value is equivalent to the makeindex encap value and as with index the value needs to be the name of a command without the initial backslash As with index the characters and can also be used to spec ify the beginning and ending of a number range Again as with index the command should be the name of a command which takes an argument which will be the associated loca tion Be careful not to use a declaration such as b series instead of a text block command such as textbf as the effect is not guaranteed to be localised If you want to apply more than one style to a given entry e g bold and italic you will need to create a command that applies both formats e g newcommands textbfem 1 textbf emph 1 and use that command In this document the standard formats refer to the standard text block commands such as t ext bf or emph or any of the com mands listed in table 6 1 104 6 Links to Glossary Entries If you use xindy instead of make index you must specify any non standard formats that you want to use with the format key using GlsAddXdyAttribute name So if you use xindy with the above example you would need to add GlsAddXdyAttribute textbfem See Section 11 for further details Note that unlike index you can t have anything following the command name such as an a
25. glossaries without referencing each one explicitly To create the document do latex sampleDB makeglossaries sampleDB latex sampleDB The glossary definitions are stored in the accompanying files databasel texand database2 tex Note that if you don t have Perl installed you will need to use makeindex twice in stead of a single call to makeglossaries 1 Create the main glossary all on one line makeindex s sampleDB ist t sampleDB glg o sampleDB gls sampleDB glo 21 1 Introduction 2 Create the secondary glossary all on one line makeindex s sampleDB ist t sampleDB nlg o sampleDB not sampleDB ntn sampleEq tex This document illustrates how to change the loca tion to something other than the page number In this case the equation counter is used since all glossary entries appear in side an equation environment To create the document do latex sampleEq makeglossaries sampleEq latex sampleEq sampleEqPg tex This is similar to the previous example but the number lists are a mixture of page numbers and equation num bers This example adds the glossary to the table of contents so an extra IATEX run is required latex sampleEgPg makeglossaries sampleEgPg latex sampleEgPg latex sampleEgPg sampleSec tex This document also illustrates how to change the location to something other than the page number In this case the section co
26. glsentryuserii 2 Dimensions amp 3 Page list tabularnewline end of row oe Nothing between groups Nrenewcommand glsgroupskip 205 16 Utilities This section describes some utility commands Additional commands can be found in the documented code glossaries code pdf 16 1 Loops Some of the commands described here take a comma separated list as an argument As with I4TRX s for command make sure your list doesn t have any unwanted spaces in it as they don t get stripped forallglossaries forallglossaries glossary list cs body Y This iterates through glossary list a comma separated list of glos sary labels as supplied when the glossary was defined At each it eration cs which must be a control sequence is set to the glossary label for the current iteration and body is performed If glossary list is omitted the default is to iterate over all glossaries except the ignored ones forallacronyms forallacronyms cs t body This is like forallglossaries but only iterates over the lists of acronyms that have previously been declared using DeclareAcronymList or the acronymlists package option This command doesn t have an optional argument If you want to explicitly say which lists to iterate over just use the optional argument of forallglossaries forglsentries forglsentries glossary label cs
27. glsnumberlistloop is not available for Options 2 and 3 101 6 Links to Glossary Entries Once you have defined a glossary entry using newglossaryentry or newacronym see Section 13 you can refer to that entry in the document using one of the commands listed in Section 6 1 or Sec tion 6 2 The text which appears at that point in the document when using one of these commands is referred to as the link text even if there are no hyperlinks These commands also add a line to an ex ternal file that is used to generate the relevant entry in the glossary This information includes an associated location that is added to the number list for that entry By default the location refers to the page number For further information on number lists see Section 5 These external files need to be post processed by make index or xindy un less you have chosen Option 1 If you don t use makeglossaries these external files won t be created I strongly recommend that you don t use the commands defined in this chapter in the arguments of sectioning or caption commands or any other command that has a moving argument Aside from problems with expansion issues PDF bookmarks and possible nested hyperlinks in the table of contents or list of whatever any use of the commands described in Section 6 1 will have their first use flag unset when they appear in the table of contents or list of whatever The above warning is particularly important if y
28. let glsing glsuseri 81 4 Defining Glossary Entries let glsd glsuserii newcommands Ningkey user1 newcommands Nedkey user2 newcommands newword 3 newglossaryentry 2 name 2 description 3 edkey 2ed ingkey 2ing 1 oe With the above definitions I can now define terms like this newword play to take part in activities for enjoyment newword edkey ran ingkey running run to move fast using the legs and use them in the text Peter is glsing play in the park today Jane glsd play in the park yesterday Peter and Jane glsd run in the park last week Alternatively you can define your own keys using glsaddkey described below in Section 4 3 4 3 Additional Keys You can now also define your own custom keys using the commands described in this section There are two types of keys those for use within the document and those to store information used behind the scenes by other commands For example if you want to add a key that indicates the associated unit for a term you might want to reference this unit in your docu ment In this case use glsaddkey described in Section 4 4 If on the other hand you want to add a key to indicate to a glossary style or acronym style that this entry should be formatted differently to other entries then you can use glsaddstoragekey described in Section 4 5 In both cases a new command
29. me cs ae s 110 glsname 110 glsnamefont A137 157 195 glsnavhypertarget 200 glsnoexpandfields 90 glsnoidxdisplayloc 101 glsnumber format 99 144 Nglsnumberlistloop 100 Nglsnumbersgroupname 32 glsnumbersgrouptitle 199 Nglsnumlistlastsep 133 Nglsnumlistsep 133 glsopenbrace 139 glspagelistwidth je wba es 184 189 191 194 NOLS pab cede hen wae oedins 76 glspercentchar 139 GLSpl 8 77 107 216 Glspl 8 77 80 107 154 216 olspl xs 8 77 107 114 154 Splural sampes gantei 109 Glsplural 109 glsplural 109 glspluralsuffix 24 81 glspostdescription 186 glspostinline 198 198 glspostlinkhook bidders 115 116 171 172 Nglsprestandardsort 61 78 NdlSquotbe eese ees 139 glsrefentry 23 57 58 135 glsreset 151 176 glsresetall 176 glsresetentrycounter 58 glssee 11 59 105 124 125 glsseeformat 125 125 Nglsseeitemformat 126 Nglsseelastsep 126 glsseelist 126 Nglsseesep 125 glsSetAlphaCompositor 74 NglsSetCompositor 74 Nglssetexpandfield 90 Nglssetnoexpandfield 90 glsSetSuffixF 100 glsSetSuffixFF 100 Nglssetwidest 196 GlsSetXdyCodePage 41 64 140 GlsSetXdyFirstLetterAfterDigits Mua SUR eoe ee eee 146 NGlsSetXdyLanguage Dau banned 41 64 72 140 Gls
30. then you can provide your own dictionary with the necessary modifications using deft ranslation and load it using usedictionary Note that the translator dictionaries are loaded at the beginning of the document so it won t have any effect if you put deftranslation in the preamble It should be put in your personal dictionary instead as in the example below See the translator documentation for further details Now with beamer documentation Your custom dictionary doesn t have to be just a translation from English to another language You may prefer to have a dictionary for a particular type of document For example suppose your institu tion s in house reports have to have the glossary labelled as Nomen clature and the page list should be labelled Location then you can create a file called say myinstitute glossaries dictionary English dict that contains the following ProvidesDictionary myinstitute glossaries dictionary English deftranslation Glossary Nomenclature deftranslation Page List glossaries Location 33 1 Introduction You can now load it using Nusedictionary myinstitute glossaries dictionary Makesure thatmyinstitute glossaries dictionary English dict can be found by Tex If you want to share your custom dictionary you can upload it to CTAN If you are using babel and don t want to use the translator interface you can use the package option translate b
31. 1 sentryfullpl 1 1 space glsentryshortpl sentryfullpl 1 1 space glsentryshortpl renewcommands acrfullfmt 3 glslink 1 2 glsentrylong 2 3 space acronymfont oe glsentryshort 2 renewcommands Acrfullfmt 3 glslink 1 42 Glsentrylong 2 3 space acronymfont glsentryshort 2 oe ntrydesc 1 renewcommand ACRfullfmt 3 glslink 1 2 MakeTextUppercase glsentrylong 2 3 space acronymfont glsentryshort 2 3 oe ox oo Ww Nrenewcommand acrfullplfmt 3 glslink 1 2 glsentrylongpl 2 3 space acronymfont glsentryshortpl 2 8 ox oe 167 13 Acronyms and Other Abbreviations Nrenewcommand Acrfullplfmt 3 glslink 1 2 Glsentrylongpl 2 3 space acronymfont glsentryshortpl 2 oe Nrenewcommand ACRfullplfmt 3 glslink 1 2 MakeTextUppercase glsentrylongpl 2 3 space acronymfont glsentryshortpl 2 ol o renewcommand acronymfont 1 textsc 1 renewcommands acrpluralsuffix glstextup glspluralsuffix renewcommand Nacronymsort
32. 102 107 115 124 150 151 153 159 161 171 174 179 208 219 newacronymstyle 161 163 newdualentry 122 newglossary 45 46 48 141 144 147 newglossary 147 newglossaryentry 9 16 20 59 61 71 75 75 80 83 93 95 96 102 107 150 151 161 179 214 newglossaryentry options ACCESS EE 219 description a 29 26 77 07 90 111 151 158 160 162 209 219 descriptionaccess 219 descriptionplural 77 90 219 descriptionpluralaccess 219 entrycounter 135 first 4 64 e444 es 9 77 107 T09 110 115 127 129 156 176 212 214 219 firstaccess 219 firstplural 9 77 81 90 107 110 115 129 214 219 firstpluralaccess 219 format os uec Re eee e 106 long 52 80 87 107 115 150 152 156 208 219 longaccess 219 229 longplural 80 90 107 115 150 151 153 219 longpluralaccess 219 name 29 60 62 76 79 90 92 110 126 127 132 156 159 160 166 199 212 219 nonumberlist 79 parent 76 77 91 plural 77 81 93 107 109 115 128 212 214 219 pluralaccess 219 prefix 214 217 prefixfirst 214 215 217 prefixfirstplural 214 216 217 prefixplural 214 216 217 see 11 59 79 80 105 123 125 short 80 107 115 150 152 156 208 219 shortaccess 219 sho
33. 2 Package Options instead of or in addition to the acronymlists option This will add the glossaries given in list to the list of glossaries that are identified as lists of acronyms To replace the list of acronym lists with a new list use SetAcronymLists list You can determine if a glossary has been identified as being a list of acronyms using glsIfListOfAcronyms label true part false part shortcuts This option provides shortcut commands for acronyms See Section 13 for further details Alternatively you can use DefineAcronymShortcuts 2 5 1 Deprecated Acronym Style Options The package options listed in this section are now deprecated but are kept for backward compatibility Use setacronymsty1le instead See Section 13 for further details description This option changes the definition of newacronym to allow a description This option may be replaced by setacronymstyle long short desc or with smallcaps setacronymstyle long sc short desc or with smaller setacronymstyle long sm short desc or with footnote setacronymstyle footnote desc 2 Package Options or with footnote and smallcaps setacronymstyle footnote sc desc or with footnote and smaller setacronymstyle footnote sm desc or with dua setacronymstyle dua desc smallcaps This option changes the definition of newacronym and the way that acronyms are displayed This option may be re placed
34. Protected expansion is performed on 156 firstacronymfont acronymfont 13 Acronyms and Other Abbreviations acronymsort when the entry is defined 13 1 1 Predefined Acronym Styles The glossaries package provides a number of predefined styles These styles apply firstacronymfont text to the short form on first use and acronymfont text on subsequent use The styles modify the definition of acronymfont as required but firstacronymfont is only set once by the pack age when it s loaded By default firstacronymfont text is the same as acronymfont text If you want the short form dis played differently on first use you can redefine firstacronymfont independently of the acronym style The predefined styles that contain sc in their name for example long sc short redefine acronymfont to use textsc which means that the short form needs to be specified in lower case Remem ber that textsc abc produces ABC but textsc ABC produces ABC Some fonts don t support bold smallcaps so you may need to redefine glsnamefont see Section 10 to switch to medium weight if you are using a glossary style that displays entry names in bold and you have chosen an acronym style that uses textsc The predefined styles that contain sm in their name for example long sm short redefine acronymfont to use textsmaller Note that the glossaries package doesn t define or load any pack
35. The sample file glossary lipsum examples tex in the doc latex glossaries samples directory uses all these files See also http www dickimaw books com gallery fglossaries 1 3 Multi Lingual Support As from version 1 17 the glossaries package can now be used with x indy as well as makeindex If you are writing in a language that uses an extended Latin alphabet or non Latin alphabet it is recom mended that you use xindy as makeindex is hard coded for the non extended Latin alphabet This means that you are not restricted to the A Z letter groups If you want to use xindy remember to use the xindy package option For example documentclass frenchb article usepackage ut f8 inputenc usepackage T1 fontenc usepackage babel usepackage xindy glossaries Note that although a non Latin character such as looks like a plain character in your tex file with standard Tgx it s actually a macro and can therefore cause expansion problems You may need to switch off the field expansions with glsnoexpandfields This issue doesn t occur with XglATEX If you use a non Latin character or other expandable character at the start of an entry name you must place it in a group or it will cause a problem for commands that convert the first letter to upper case e g G1s For example newglossaryentry elite name lite description select group or class For further details see the section UTF 8 mfirstu
36. a an or the The glossaries prefix package automatically loads the glossaries package and has the same package options The extra keys for newglossaryentry are as follows prefix The prefix associated with the text key This defaults to nothing prefixplural The prefix associated with the plural key This defaults to nothing prefixfirst The prefix associated with the first key If omitted this de faults to the value of the prefix key prefixfirstplural The prefix associated with the firstplural key If omit ted this defaults to the value of the prefixplural key Example 29 Defining Determiners Here s the start of my example document documentclass article usepackage colorlinks hyperref usepackage toc acronym glossaries prefix Note that I ve simply replaced glossaries from previous sample docu ments with glossaries prefix Now for a sample definition newglossaryentry sample name sample description an example prefix a prefixplural the space Note that I ve had to explicitly insert a space after the prefix This allows for the possibility of prefixes that shouldn t have a space such as D Single letter words such as a and T should typically not appear at the end of p a line hence the non breakable space after a in the prefix field 214 pgls Pgls PGLS pglspl 17 Prefixes or Determiners newglossaryentry oeil name oeil plu
37. attribute you need to add it using GlsAddXdyAttribute GlsAddXdyAttribute name where name is the name of the attribute as used in the format key Example 17 Custom Font for Displaying a Location Suppose I want a bold italic hyperlinked location I first need to define a command that will do this newcommand hyperbfit 1 textit hyperbf 1 141 GlsAddXdyLocation 11 Xindy Option 3 but with xindy I also need to add this as an allowed attribute GlsAddXdyAttribute hyperbfit Now I can use it in the optional argument of commands like Ng1s Here is a gls format hyperbfit sample entry where sample is the label of the required entry Note that GlsAddXdyAttribute has no effect if noist is used or if makeglossaries is omitted GlsAddXdyAttribute must be used before makeglossaries Additionally GlsAddXdyCounters must come before GlsAddXdyAttribute If the location numbers include formatting commands then you need to add a location style in the appropriate format using GlsAddXdyLocation prefix location name definition where name is the name of the format and definition is the xindy definition The optional argument prefix location is needed if theH counter either isn t defined or is different from t he counter See also glsaddprotectedpagefmt described in Section 5 Note that GlsAddXdyLocation has no effect if noist is used or if makeglos
38. be defined before it can be displayed in the glossary see Sec tion 4 10 1 for further details glsdoifexists glsdoifexists label t code Does code if the entry given by label exists If it doesn t exist an error is generated This command uses ifglsentryexists glsdoifnoexists glsdoifnoexists label code Does the reverse of Ng1sdoifexists This command uses ifglsentryexists glsdoifexistsorwarn glsdoifexistsorwarn label code As glsdoifexists but issues a warning rather than an error if the entry doesn t exist 207 glsdoifexistsordo glsdoifnoexistsordo ifglsused ifglshaschildren ifglshasparent ifglshassymbol ifglshaslong ifglshasshort 16 Utilities glsdoifexistsordo label code else code Does code if the entry given by label exists otherwise generate an error and do else code glsdoifnoexistsordo label code else code Does code if the entry given by label doesn t exist otherwise gen erate an error and do else code ifglsused label true part false part See Section 14 ifglshaschildren label true part false part This checks if the glossary entry given by label has any sub entries If it does true part is performed otherwise false part ifglshasparent label true part false part This checks if the glossary entry given by label has a parent e
39. by setacronymstyle long sc short or with description Nsetacronymstyle long sc short desc or with description and footnote setacronymstyle footnote sc desc smaller This option changes the definition of newacronym and the way that acronyms are displayed If you use this option you will need to include the relsize package or otherwise define text smaller or redefine acronymfont This option may be replaced by setacronymstyle long sm short or with description Nsetacronymstyle long sm short desc or with description and footnote setacronymstyle footnote sm desc 68 2 Package Options footnote This option changes the definition of newacronym and the way that acronyms are displayed This option may be replaced by setacronymstyle footnote or with smallcaps setacronymstyle footnote sc or with smaller setacronymstyle footnote sm or with description setacronymstyle footnote desc or with smallcaps and description setacronymstyle footnote sc desc or with smaller and description setacronymstyle footnote sm desc dua This option changes the definition of newacronym so that acronyms are always expanded This option may be replaced by setacronymstyle dua or with description setacronymstyle dua desc 2 6 Other Options Other available options that don t fit any of the above categories are symbols This option defines a new glossary type with the label symbols
40. by glossarypreambl1le or the glos sary postamble defined by glossarypostamble For example the list style uses the description environment so the theglossary envi ronment is simply redefined to begin and end the description environ ment glossaryheader This macro indicates what to do at the start of the main body of the glossary Note that this is not the same as glossarypreamble which should not be affected by changes in the glossary style The list glossary style redefines glossaryheader to do nothing whereas the longheader glossary style redefines glossaryheader to doa 2 D em b H a o glsgroupheading label This macro indicates what to do at the start of each logical block within the main body of the glossary If you use make index the glos sary is sub divided into a maximum of twenty eight logical blocks that are determined by the first character of the sort key or name key if the sort key is omitted The sub divisions are in the following or der symbols numbers A Z If you use x indy the sub divisions depend on the language settings Note that the argument to gl sgroupheading is a label not the group title The group title can be obtained via glsgetgrouptitle label This obtains the title as follows if label consists of a single non active character or label is equal to glssymbols or glsnumbers and label groupname exists this is taken to be the title other wise the
41. don t like typing cgls you can create a synonym For example let ac cgls 183 setglossarystyle glsdescwidth glspagelistwidth 15 Glossary Styles Glossaries vary from lists that simply contain a symbol with a terse description to lists of terms or phrases with lengthy descriptions Some glossaries may have terms with associated symbols Some may have hierarchical entries There is therefore no single style that fits every type of glossary The glossaries package comes with a num ber of pre defined glossary styles described in Section 15 1 You can choose one of these that best suits your type of glossary or if none of them suit your document you can defined your own style see Sec tion 15 2 The glossary style can be set using the style key in the optional argu ment to printnoidxglossary Option 1 or printglossary Options 2 and 3 or using the command setglossarystyle style name before the glossary is displayed Some of the predefined glossary styles may also be set using the style package option it depends if the package in which they are de fined is automatically loaded by the glossaries package You can use the lorum ipsum dummy entries provided in the example glossaries tex files described in Section 1 2 to test the different styles 15 1 Predefined Styles The predefined styles can accommodate numbered level 0 main and level 1 entries See the package options entrycounter counte
42. et 2 oO S 9 s 3 9a Q o 3 z D 5 jon n glsreset label glslocalreset label E oO on 2 oO gt ze oO H eo o 3 oc oO o 2 oO lt oO a n lt o 5 oO o P cr 2 oO e S s 3 9a Q o H z 3 c n glsunset label glslocalunset label aq ag c eo Bo e p co M N F b e o A c 3 Dn b e c 5 2 F m o e E o aq IS lt o 5 aa m o a ui 4 lt o uo E o S Nglsresetall glossary list glslocalresetall glossary list glsunsetall glslocalunsetall glsunsetall glossary list glslocalunsetall glossary list where glossary list is a comma separated list of glossary labels If omitted all defined glossaries are assumed except for the ignored 176 ifglsused 14 Unsetting and Resetting Entry Flags ones For example to reset all entries in the main glossary and the list of acronyms glsresetall main acronym You can determine whether an entry s first use flag is set using ifglsused label true part false part where label is the label of the required entry If the entry has been used true part will be done otherwise false part will be done Be careful when using g1s like commands within an environment or command argument that gets processed multiple times as it can cause unwanted side effects when the first use di
43. exceed TEX s maximum allocation unexpected expansion issues could occur if you have very long entries you could find unexpected line breaks have been written to the temporary file causing spurious spaces or even worse a command name could get split across a line causing an error message The last reason is why N1ongnewglossaryentry has the preamble only restriction which I don t intend to lift 4 10 2 Good Practice Issues The above section covers technical issues that can cause your docu ment to have compilation errors or produce incorrect output This section focuses on good writing practice The main reason cited by users wanting to define entries within the document environment rather than in the preamble is that they want to write the definition as they type in their document text This suggests a stream of con sciousness style of writing that may be acceptable in certain literary genres but is inappropriate for factual documents When you write technical documents regardless of whether it s a PhD thesis or an article for a journal or proceedings you must plan what you write in advance If you plan in advance you should have a fairly good idea of the type of terminology that your document will contain so while you are planning create a new file with all your entry definitions If while you re writing your document you re member another term you need then you can switch over to your definition file and add it
44. false nogroupskip This is a boolean option If no value is specified t rue is assumed When set to t rue this option suppresses the default vertical gap between groups used by some of the predefined styles The default setting is nogroupskip false 2 4 Sorting Options sort If you use Options 2 or 3 this package option is the only way of specifying how to sort the glossaries Only Option 1 allows you to specify sort methods for individual glossaries via the sort key in the optional argument of printnoidxglossary If you have multiple glossaries in your document and you are using Option 1 only use the package options sort def or sort use if you want to set this sort method for all your glossaries This is a key value option where value may be one of the following e standard entries are sorted according to the value of the sort key used in newglossaryentry if present or the name key if sort key is missing def entries are sorted in the order in which they were de fined the sort key in newglossaryentry is ignored use entries are sorted according to the order in which they are used in the document the sort key in newglossaryentry is ignored Both sort def and sort use set the sort key to a six digit num ber via glssortnumberfmt glssortnumber fmt number padded with leading zeros where necessary This can be redefined if required before the entries are defined in the case of sort def o
45. in brackets after the name followed by the description and last of all the number list should appear within square brackets at the end Then you can create this new glossary style called say mylist as fol lows newglossarystyle mylist put the glossary in the itemize environment renewenvironment theglossary begin itemize end itemize have nothing after begin theglossary Nrenewcommand Nglossaryheader 202 15 Glossary Styles have nothing between glossary groups renewcommands glsgroupheading 1 Nrenewcommand glsgroupskip set how each entry should appear renewcommand glossentry 2 item bullet point glstarget 1 glossentryname 1 the entry name space glossentrysymbol 1 the symbol in brackets space glossentrydesc 1 the description space 2 the number list in square brackets set how sub entries appear Nrenewcommand Nsubglossentry 3 glossentry 2 3 Note that this style creates a flat glossary where sub entries are dis played in exactly the same way as the top level entries It also hasn t used glsentryitem or glssubentryitem so it won t be af fected by the entrycounter counterwithin or subentrycounter package op tions Variations You might want the entry name to be capitalised in which case use Glossentryname instead of glossentryname You might want to check if the
46. insert This command always uses the value of the user5 key as the link text There are also analogous uppercasing commands Glsuserv Glsuserv options text insert GLSuserv GLSuserv options text insert Nglsuservi glsuservi options text insert This command always uses the value of the user6 key as the link text There are also analogous uppercasing commands Glsuservi_ Glsuservi options text insert NGLSuservi GLSuservi options text insert 112 glsentryfmt defglsentryfmt glslabel 6 Links to Glossary Entries 6 3 Changing the format of the link text The default format of the link text for the gls like commands is governed by glsentryfmt This may be redefined but if you only want the change the display style for a given glossary then you need to use defglsentry mt type definition instead of redefining glsentryfmt The optional first argument type is the glossary type This defaults to glsdefaulttype if omitted The second argument is the entry format definition Note that glsentryfmt is the default display format for entries Once the display format has been changed for an individual glossary using defglsentryfmt redefining glsentryfmt won t have an effect on that glossary you must instead use defglsentryfmt again Note that glossaries that have been identifie
47. long package ET 58 59 137 188 190 glossary longragged package 190 glossary mcols package 59 196 197 Tm 79 85 120 169 NGlsAddXdyAttribute 105 141 NGlsAddXdyCounters 141 144 GlsAddXdyLocation 142 144 Nglsautoprefix 56 glsbackslash 199 glscapscase 114 115 161 glsclearpage 55 glsclosebrace 139 225 glscustomtex 115 glscustomtext 113 151 GlsDeclareNoHyperList fe de ha ds Sede 8 feck E 51 71 glsdefaulttype 66 93 94 113 206 NGLSdesC susaczoced Xcz5 I1 NGISdesQ i e xs 111 Ngdsdesce es m reg 111 glsdescwidth 184 188 194 glsdisablehyper 104 114 118 119 132 8 9 51 77 106 108 77 115 2 13 glsdisp glsdispl glsdisplayfirst glsdisplaynumberlist 16 53 132 glsdoifexists 207 glsdoifexistsordo 208 glsdoifexistsorwarn 207 glsdoifnoexists 207 glsdoifnoexistsordo 208 glsdosanitizesort 61 glsenableentrycount 29 179 glsenablehyper 118 glsentrycounterlabel 201 glsentrycurrcount 179 Glsentrydesc 129 glsentrydesc 129 Glsentrydescplural 130 glsentrydescplural 130 Glsentryfirst 129 glsentryfirst 129 Glsentryfirstplural 129 glsentryfirstplural 129 glsentryfmt 28 103 106 108 113 116 118 119 150 Glsentryfull 155 glsen
48. lt gt glsreset svm gls svm item lt gt Stuff end itemize end frame These are non optimal but the beamer class is too complex for me to provide a programmatic solution Other potentially problematic en vironments are some tabular like environments but not tabular itself that process the contents in order to work out the column widths and then reprocess the contents to do the actual typesetting The amsmath environments such as align also process their contents multiple times but the glossaries package now checks for this 14 1 Counting the Number of Times an Entry has been Used First Use Flag Unset As from version 4 14 it s now possible to keep track of how many times an entry is used That is how many times the first use flag is unset 178 14 Unsetting and Resetting Entry Flags This function is disabled by default as it adds extra overhead to the document build time and also switches newglossaryentry and therefore newacronym into a preamble only command To enable this function use glsenableentrycount glsenableentrycount before defining your entries This adds two extra internal fields to entries currcount and prevcount The currcount field keeps track of how many times glsunset is used within the document A local unset using g1slocalunset performs a local rather than global increment to currcount Re member that not all commands use glsunset Only the gls like comman
49. m m m m m m a a a a a a a a nd Nglossaryname Glossary ndx Nacronymname Acronyms ndx entryname Notation ndx descriptionname Description ndx symbolname Symbol ndx pagelistname Page List ndx glssymbolsgroupname Symbols ndx glsnumbersgroupname Numbers ifcsdef captions CurrentTrackedDialect csappto captions CurrentTrackedDialect glossariescaptionsenglish ove aw oe oe ifcsdef captions CurrentTrackedLanguage 35 1 Introduction csappto captions CurrentTrackedLanguage glossariescaptionsenglish oo oe oe oe glossariescaptionsenglish Nrenewcommand glspluralsuffix s Nrenewcommand Nglsacrpluralsuffix Nglspluralsuffix renewcommands glsupacrpluralsuffix glstextup glspluralsuffix This is a somewhat longer file but again you can use it as a template Replace English with the translator language label Lang used for the dictionary file and replace english with the root language name lang Within the definition of glossariescaptions lang re place the English text such as Glossaries with the appropriate translation Note the suffixes used to generate the plural forms when the plu ral hasn t been specified are given by glspluralsuffix for gen eral entries and gl supacrpluralsuf fix for acronyms where the suffix needs to be set using glstextup to cou
50. need to install Perl if you want to use makeglossaries Further information is available at http www perl org about html and MiKTeX and Perl scripts and one Python script The advantages of using makeglossaries It automatically detects whether to use makeindex or xindy and sets the relevant application switches Onecall of makeglossaries will run makeindex xindy for each glossary type If things go wrong makeglossaries will scan the messages from makeindex or xindy and attempt to diagnose the prob lem in relation to the glossaries package This will hopefully pro vide more helpful messages in some cases If it can t diagnose the problem you will have to read the relevant transcript file 39 1 Introduction and see if you can work it out from the makeindex or xindy messages As from version 4 16 the glossaries package also comes with a Lua script called makeglossaries lite lua This is a trimmed down alternative to the makeglossaries Perl script It doesn t have some of the options that the Perl version has and it doesn t attempt to di agnose any problems but since modern TEX distributions come with LuaTgxX and therefore have a Lua interpreter you don t need to in stall anything else in order to use nakeglossaries lite lua so it s an alternative to makeglossaries if you want to use Option 2 makeindex There is also a Java GUI alternative called makeglossariesgui distributed separately that has diagnostic too
51. no link cs will be defined that can be used to access the value of this key analogous to commands such as glsentrytext This can be used in an expandable con text provided any fragile commands stored in the key have been 82 glsaddkey 4 Defining Glossary Entries protected The new keys must be added using glsaddkey or glsaddstoragekey before glossary entries are defined 4 4 Document Keys A custom key that can be used in the document is defined using glsaddkey key default value no link cs no link ucfirst cs link cs link ucfirst cs link allcaps cs where key is the new key to use in newglossaryentry or similar commands such as N1ongnewglossaryentry default value is the default value to use if this key isn t used in an entry definition this may reference the current entry label via glslabel but you will have to switch on expansion via the starred version of glsaddkey and protect fragile commands no link cs is the control sequence to use analogous to commands like glsentrytext no link ucfirst cs is the control sequence to use analogous to com mands like Glsentrytext link cs is the control sequence to use analogous to commands like glstext link ucfirst cs is the control sequence to use analogous to com mands like Glstext link allcaps cs is the control sequence to use analogous to com mands like GLStext The starred v
52. options label insert which by default does acrfullformat acrlong options label insert acrshort options label where acrfullformat acrfullformat long short by default does long short For further details of these format commands see section 1 17 in the documented code glossaries code pdf There are also analogous upper case variants Acrfull Acrfull options label insert ACRfull NACR u11 options label insert 153 13 Acronyms and Other Abbreviations and plural versions acrfullpl acrfullp1l options label insert Acrfullpl Acrfullp1l options label insert ACRfullpl ACRf ullp1 options label insert If you find the above commands too cumbersome to write you can use the shortcuts package option to activate the shorter command names listed in table 13 1 Table 13 1 Synonyms provided by the package option shortcuts Shortcut Command Equivalent Command acs Acs acsp Acsp acl Acl aclp Aclp Nacf Acf acfp Acfp ac Ac acp Acp acrs Acrs acrs Acrs acrl Acrl Nacrl hort hort hortpl hortpl ong ong ongp Acr Nacrf NAcrf ongpl ull a Nacrf ullpl NAcrf gls Gls glspl ullpl Glsp It is also possible to acces
53. override the language and codepage For example usepackage xindy language english codepage utf8 glossaries You can also specify whether you want a number group in the glossary This defaults to true but can be suppressed For ex ample usepackage xindy glsnumbers false glossaries If no value is supplied to this package option either simply writing xindy or writing xindy then the language code page and number group settings are unchanged See Section 11 for further details on using xindy with the glossaries package xindygloss Option 3 This is equivalent to xindy that is the xindy option without any value supplied and may be used as a document class option The language and code page can be set via GlsSetXdyLanguage and GlsSetXdyCodePage see Section 11 1 64 2 Package Options xindynoglsnumbers Option 3 This is equivalent to xindy glsnumbers false and may be used as a document class option automake This is a boolean option new to version 4 08 that will attempt to run makeindex or xindy using TEX s writel8 mechanism at the end of the document Since this mechanism can be a security risk some TEX distributions disable it com pletely in which case this option won t have an effect If this option doesn t appear to work search the log file for runsys tem and see if it is followed by enabled or disabled Some distributions allow Nwrite18 ina restricted mode This mode has a l
54. s best to avoid Glsent ryname with acronyms Instead consider using Glsentrylong Glsentryshort or Glsentryfull glossentryname label This is like gl snamefont glsentryname label but also checks for the existence of label This command is not expandable It s used in the predefined glossary styles so if you want to change the way the name is formatted in the glossary you can redefine glsnamefont to use the required fonts For example renewcommand glsnamefont 1 textmd sffamily 1 Glossentryname label This is like glossent ryname but makes the first letter of the name upper case glsentrytext label Glsentrytext label These commands display the subsequent use text for the glossary en try given by label as specified by the text key Glsentrytext makes the first letter upper case The first form is expandable unless the text contains unexpandable commands The second form is not expandable Neither checks for the existence of label glsentryplural label Glsentryplural label These commands display the subsequent use plural text for the glos sary entry given by label as specified by the plural key Glsentryplural makes the first letter upper case The first form is expandable unless 128 glsentryfirst Glsentryfirst glsentryfirstplural 9 Using Glossary Terms Without Links the value of that key contains unexpandable command
55. s number list using glsnumberlistloop label handler cs xr handler cs 100 5 Number lists where label is the entry s label and handler cs is a handler control sequence of the form handler cs prefix counter format location where prefix is the hyperref prefix counter is the name of the counter used for the location format is the format used to display the location e g textb and location is the location The third ar gument is the control sequence to use for any cross references in the list This handler should have the syntax xr handler cs tag xr list where fag is the cross referenced text e g see and xr list is a comma separated list of labels This actually has a third argument but it s always empty when used with Option 1 For example if on page 12 I have used gls format textbf apple and on page 18 I have used gls format emph apple then glsnumberlistloop apple myhandler will be equivalent to myhandler page textbf 12 myhandler page emph 18 There is a predefined handler that s used to display the number list in the glossary Nglsnoidxdisplayloc glsnoidxdisplayloc prefix counter format location The predefined handler used for the cross references in the glossary s 2 glsseeformat tag xr list location which is described in Section 8 1
56. tence of label This command is not expandable It s used in the predefined glossary styles to display the description 129 Glossentrydesc glsentrydescplural 9 Using Glossary Terms Without Links Glossentrydesc label This is like glossentrydesc but converts the first letter to upper case This command is not expandable glsentrydescplural label Glsentrydescplural Glsentrydescplural label glsentrysymbol These commands display the plural description for the glossary en try given by label Glsentrydescplural makes the first letter upper case The first form is expandable unless the value of that key contains unexpandable commands The second form is not expand able Neither checks for the existence of label Nglsentrysymbol label Glsentrysymbol glsletentryfield glossentrysymbol NGlsentrysymbol label These commands display the symbol for the glossary entry given by label NG1sentrysymbol makes the first letter upper case The first form is expandable unless the value of that key contains unexpand for the existence of label glsletentryfield cs label field This command doesn t display anything It merely fetches the value associated with the given field where the available field names are listed in table 4 1 and stores the result in the control sequence cs For example to store the description for the entry whose
57. that this option has no effect if the toc option is omitted If toc is used without numberline the title will be aligned with the section numbers rather than the section titles section This is a key value option Its value should be the name of a sectional unit e g chapter This will make the glossaries ap pear in the named sectional unit otherwise each glossary will appear in a chapter if chapters exist otherwise in a section Un numbered sectional units will be used by default Example Nusepackage section subsection glossaries You can omit the value if you want to use sections i e usepackage section glossaries is equivalent to usepackage section section glossaries You can change this value later in the document using setglossarysection name where name is the sectional unit The start of each glossary adds information to the page header via glsglossarymark glsclearpage ifglsucmark 2 Package Options glsglossarymark glossary title By default this uses mkboth but you may need to redefine it For example to only change the right header renewcommand glsglossarymark 1 markright 1 or to prevent it from changing the headers renewcommand glsglossarymark 1 If you want glsglossarymark to use MakeUppercase in the header use the ucmark option described below Occasionally you may find that another package defines cleardoublepage
58. the glossaries prefix Section 17 and glossaries accsupp Section 18 packages nonumberlist A boolean key If the value is missing or is t rue this will suppress the number list just for this entry Conversely if you have used the package option nonumberlist you can activate the number list just for this entry with nonumberlist false See Section 5 see Cross reference another entry Using the see key will automati cally add this entry to the glossary but will not automatically add the cross referenced entry The referenced entry should be supplied as the value to this key If you want to override the 79 4 Defining Glossary Entries see tag you can supply the new tag in square brackets before the label For example see see also anotherlabel Note that if you have suppressed the number list the cross referencing information won t appear in the glossary as it forms part of the number list You can override this for individ ual glossary entries using nonumberlist false see above Alter natively you can use the seeautonumberlist package option For further details see Section 8 For Options 2 and 3 makeglossaries must be used before any occurrence of newglossaryentry that contains the see key The following keys are reserved for newacronym see Section 13 long longplural short and shortplural Additional keys are provided by the glossaries prefix Section 17 and the glossaries accsupp Section 18
59. the same as that for listhypergroup described above alttree The alttree style is similar to the tree style except that the in dentation for each level is determined by the width of the text specified by glssetwidest level text The optional argument level indicates the level where 0 indi cates the top most level 1 indicates the first level sub entries etc If glssetwidest hasn t been used for a given sub level the level 0 widest text is used instead If level is omitted 0 is assumed For each level the name is placed to the left of the paragraph block containing the symbol optional and the description If the symbol is present it is placed in parentheses before the de scription alttreegroup The alttreegroup is like the alttree style except that each group has a heading alttreehypergroup The alttreehypergroup style is like alttreegroup but has a set of links to the glossary groups The navigation line is the same as that for listhypergroup described above 15 1 7 Multicols Style The glossary mcols package provides tree like styles that are in the mul ticols environment defined by the multicol package The style names are as their analogous tree styles as defined in Section 15 1 6 but are 196 glsmcols 15 Glossary Styles prefixed with mcol For example the mcolindex style is essentially the index style but put in a multicols environment For the complete list see table 15 2 N
60. then the associated number list for that entry The symbol is ignored If the entry has child entries the description and num ber list follows but not the name for each child entry Groups are separated using indexspace listgroup The listgroup style is like list but the glossary groups have headings listhypergroup The listhypergroup style is like listgroup but has a navi gation line at the start of the glossary with links to each group that is present in the glossary This requires an additional run through TX to ensure the group information is up to date In the navigation line each group is separated by glshypernavsep which defaults to a vertical bar with a space on either side For example to simply have a space separating each group do Nrenewcommand glshypernavsep space Note that the hyper navigation line is now as from version 1 14 set inside the optional argument to item instead of after it to prevent a spurious space at the start This can be changed by redefining glossaryheader but note that this needs to be done after the glossary style has been set altlist The altlist style is like list but the description starts on the line fol lowing the name As with the list style the symbol is ignored Each child entry starts a new line but as with the list style the name associated with each child entry is ignored 187 glslistdottedwidth 15 Glossary Styles altlistgroup The altlistgroup style is
61. title is just label The symbols group has the label glssymbols so the command glssymbolsgroupname is used and the numbers group has the label glsnumbers so the com mand glsnumbersgrouptitle is used If you are using xindy 199 15 Glossary Styles label may be an active character for example e in which case the title will be set to just label You can redefine glsgetgrouptitle if this is unsuitable for your document A navigation hypertarget can be created using glsnavhypertarget glsnavhypertarget label text For further details about glsnavhypertarget see section 3 1 in the documented code glossaries code pdf Most of the predefined glossary styles redefine gl sgroupheading to simply ignore its argument The listhypergroup style redefines glsgroupheading as follows Nrenewcommand glsgroupheading 1 item glsnavhypertarget 1 glsgetgrouptitle 1 See also glsgroupskip below Note that command definitions within newglossarystyle must use 1 instead of 1 etc glsgroupskip glsgroupskip This macro determines what to do after one logical group but before the header for the next logical group The list glossary style simply re defines glsgroupskip to be indexspace whereas the tabular like styles redefine gl sgroupskip to produce a blank row As from version 3 03 the package option nogroupskip can be used to suppress this default gap for the predefined
62. to determine whether to use xindy or makeindex and the information needed to call those applications is stored in the auxiliary file This information can be gathered by a front end editor or script to make the glossaries where appropriate This section describes how the information is stored in the auxiliary file The file extensions used by each defined glossary are given by newglossary label log out ext t in ext where in ext is the extension of the indexing application s input file the output file from the glossaries package s point of view out ext is the extension of the indexing application s output file the input file from the glossaries package s point of view and log is the extension of the indexing application s transcript file The label for the glossary is also given for information purposes only but is not required by the indexing applications For example the information for the default main glossary is written as newglossary main glg gls glo The indexing application s style file is specified by istfilename filename The file extension indicates whether to use makeindex ist or xindy xdy Note that the glossary information is formatted dif ferently depending on which indexing application is supposed to be used so it s important to call the correct one Word or letter ordering is specified by glsorder order xdylanguage gls codepage
63. to use the 1 switch to indicate letter ordering 23 1 Introduction sample inline tex This document is like sample tex above but uses the inline glossary style to put the glossary in a footnote sampletree tex This document illustrates a hierarchical glossary structure where child entries have different names to their cor responding parent entry To create the document do latex sampletree makeglossaries sampletree latex sampletree sample dual tex This document illustrates how to define an en try that both appears in the list of acronyms and in the main glossary To create the document do latex sample dual makeglossaries sample dual latex sample dual sample langdict tex This document illustrates how to use the glossaries package to create English to French and French to En glish dictionaries To create the document do latex sample langdict makeglossaries sample langdict latex sample langdict samplexdy tex This document illustrates how to use the glossaries package with xindy instead of makeindex The document uses UTF8 encoding with the inputenc package The encoding is picked up by makeglossaries By default this document will create a x indy style file called samplexdy xdy but if you uncomment the lines setStyleFile samplexdy mc noist GlsSetXdyLanguage 24 1 Introduction it will set the style file to samplexdy mc xdy instead This prov
64. upper case 2 Glsentryprefix Glsentryprefix label Glsentryprefixfirst Glsentryprefixfirst label Glsentryprefixplural Glsentryprefixplural label Glsentryprefixfirstplural 2The earlier caveats about initial non Latin characters apply 217 17 Prefixes or Determiners Glsentryprefixfirstplural label As with analogous commands such as Glsentrytext these commands aren t expandable so can t be used in PDF bookmarks Example 31 Adding Determiner to Glossary Style You can use the above commands to define a new glossary style that uses the determiner For example the following style is a slight modification of the list style that inserts the prefix before the name newglossarystyle plist setglossarystyle list renewcommand glossentry 2 item glsentryitem 1 Glsentryprefix 1 glstarget 1 glossentryname 1 glossentrydesc 1 glspostdescription space 2 218 18 Accessibility Support Limited accessibility support is provided by the accompanying glossaries accsupp package but note that this package is experimental and it requires the accsupp package which is also listed as experimental This package defines additional keys that may be used when defining glossary entries The keys are as follows access The replacement text corresponding to the name key textaccess The replacement text corresponding to the text key
65. via newglossary slg symbols sls slo glssymbolsgroupname 69 printsymbols printnumbers 2 Package Options It also defines printsymbo1s options which is a synonym for Nprintglossary type symbols options If you use Option 1 you need to use printnoidxglossary type symbols options to display the list of symbols Remember to use the nomain package option if you re only interested in using this symbols glossary and don t intend to use the main glossary numbers This option defines a new glossary type with the label numbers via newglossary nlg numbers nls nlo glsnumbersgroupname It also defines printnumbers options which is a synonym for printglossary type numbers options If you use Option 1 you need to use printnoidxglossary type numbers options to display the list of numbers Remember to use the nomain package option if you re only interested in using this numbers glossary and don t intend to use the main glossary 70 2 Package Options index This option defines a new glossary type with the label index via newglossary ilg index ind idx indexname It also defines newterm newterm options term which is a synonym for newglossaryentry term type index name term description nopostdesc options and printindex print index options which is a synonym for pri
66. when it is not required This may cause an unwanted blank page to appear before each glossary This can be fixed by redefining glsclearpage Nrenewcommand glsclearpage clearpage ucmark This is a boolean option default ucmark false unless memoir has been loaded in which case it defaults to ucmark true If set glsglossarymark uses MakeText Uppercase You can test whether this option has been set or not using ifglsucmark true part else false part fi For example renewcommand glsglossarymark 1 ifglsucmark markright MakeTextUppercase 1 else markright 1 fi If memoir has been loaded and ucfirst is set then memoir s memUChead is used 2unless memoir is loaded which case it uses markboth 3Actually it uses mfirstucMakeUppercase which is set to textcase s MMakeTextUppercase by the glossaries package This makes it consistent with makefirstuc The textcase package is automatically loaded by glossaries 55 2 Package Options numberedsection The glossaries are placed in unnumbered sectional units by default but this can be changed using numberedsection This option can take one of the following values false no number i e use starred form of sectioning com mand e g chapter or sectionx nolabel use a numbered section i e the unstarred form of sectioning command e g chapter or section but the section not labelled autola
67. your ATEX docu ment file Avoid spaces in the file name If necessary also replace english with the name of your language and utf8 with your input encoding for example L german C din5007 utf8 If you don t know how to use the command prompt then you can probably access xindy via your text editor but each editor has a different method of doing this so I can t give a general description You will have to check your editor s manual The default sort is word order sea lion comes before seal If you want letter ordering you need to add the order letter package option usepackage xindy order letter glossaries and return to the previous step See Section 1 4 3 for fur ther details on using xindy explicitly 14 1 Introduction 5 Once you have successfully completed the previous step you can now run BIEX on your document again For Options 2 and 3 it can be difficult to remember all the parame ters required for makeindex or xindy so the glossaries package pro vides a Perl script called makeglossaries that reads the aux file to determine what settings you have used and will then run make index or xindy Again this is a command line application and can be run in a terminal or command prompt For example if your ATEX docu ment is in the file myDoc tex then run makeglossaries myDoc Replace myDoc with the base name of your MITEX document file Avoid spaces in the file name This is described in more de
68. your requirements In this case you can define your own style using newacronymstyle style name display definitions where style name is the name of the new style avoid active charac ters The second argument display is equivalent to the mandatory argument of defglsentryfmt You can simply use glsgenacfmt or you can customize the display using commands like ifglsused glsifplural and glscapscase See Section 6 3 for further de tails If the style is likely to be used with a mixed glossary that is entries in that glossary are defined both with newacronym and newglossaryentry then you can test if the entry is an acronym and use glsgenacfmt if itis or glsgenentryfmt if it isn t For example the long short style sets display as ifglshaslong glslabel glsgenacfmt glsgenentryfmt You can use ifglshasshort instead of ifglshaslong to test if the entry is an acronym if you prefer The third argument definitions can be used to redefine the com mands that affect the display style such as acronymfont or if display uses glsgenacfmt genacrfullformat and its vari ants Note that setacronymstyle redefines glsentryfull and acrfullfmt to use genacrfullformat and similarly for the plural and upper case variants If this isn t appropriate for the style as in the case of styles like footnote and dua newacronymstyle should redefine these commands within definitions Within ne
69. 1 Introduction where order can be either word or letter If xindy should be used the language and code page for each glos sary is specified by xdy language label language gls codepage label code where label identifies the glossary language is the root language e g english and code is the encoding e g ut 8 These com mands are omitted if make index should be used If Option 1 has been used the aux file will contain gls reference type label location for every time an entry has been referenced 2 Package Options This section describes the available glossaries package options You may omit the t rue for boolean options For example acronym is equivalent to acronym true Note that key value package options can t be passed via the document class options This includes options where the value part may be omitted such as acronym This is a general limitation not restricted to the glossaries package Options that aren t key value such as makeindex may be passed via the document class options 2 1 General Options nowarn This suppresses all warnings generated by the glossaries package Don t use this option if you re new to using glossaries as the warnings are designed to help detect common mistakes such as forgetting to use makeglossaries noredefwarn If you load glossaries with a class or another package that already defines glossary rel
70. 5 coesckroneexen mee x39 a e XD a Other Grammatical Constructs Additional Keys sese cm See RE eeren Document KOUS ua sono hen AO EORR Re GS Storage 5o x c het ht BOR PRE REE EES EXPANSION S ou Rub xor OX PE ASSES Sa aS SUDSEBEIOS E i uus ie ae o A ewe a A 47 1 Hierarchical Categories c srono Ke Re Rm n 10 11 12 13 14 Contents 472 Hom graphs se Oe ede oe eo emm ema 45 Loading Entries Froma File 2 266 b2 ee be ea es 49 Moving Entries to Another Glossary 4 10 Drawbacks With Defining Entries in the Document En VITOMIMERE ECC 410 1 Technical IB88e9 voe oo m s 4 10 2 GoodPracticeIssues ls Number lists Links to Glossary Entries 6 1 The gis Like Commands First Use Flag Queried 6 2 The glstext Like Commands First Use Flag Not c CPI 6 3 Changing the format of the link text 6 4 Enabling and disabling hyperlinks to glossary entries Adding an Entry to the Glossary Without Generating Text Cross Referencing Entries 8 1 Customising Cross reference Text Using Glossary Terms Without Links Displaying a glossary Xindy Option 3 111 Language and Encodings gt 2 4 424 6i 44 444 4 11 2 Locations and Number lists 113 Glossary Groupe oue ee Rm ee RR Ret Defining New Glossaries Acronyms and Other Abbreviations 13 1 Changing the Acronym Style 24445 sb be eee ees 13 1 1 Predefined Acronym Styles 2 5 sss 13 1 2
71. Cross Referencing Entries The see tag is produce using seename but can be overrid den in specific instances using square brackets at the start of the see value For example newglossaryentry MaclaurinSeries name Maclaurin series description Series expansion see see also TaylorsTheorem Take care if you want to use the optional argument of com mands such as newacronym or newterm as the value will need to be grouped For example newterm seal newterm see s also seal sea lion Similarly if the value contains a list For example glossaryentry lemon name lemon description Yellow citrus fruit glossaryentry lime name lime description Green citrus fruit glossaryentry citrus name citrus description Plant in the Rutaceae family see lemon lime After you have defined the entry use glssee tag label xr label list where xr label list is a comma separated list of entry labels to be cross referenced label is the label of the entry doing the cross referencing and fag is the see tag The default value of tag is seename For example glssee see also series FourierSeries TaylorsTheorem 124 glsseeformat glsseesep 8 Cross Referencing Entries Note that this automatically adds the entry given by label to the glossary but doesn t add the cross referenced entries speci fied by xr label lis
72. Defining A Custom Acronym Style 13 2 Displaying the List of Acronyms 13 3 Upgrading From the glossary Package Unsetting and Resetting Entry Flags 14 1 Counting the Number of Times an Entry has been Used First Use Flag Unset ux soca ew oP e ap aahi 102 106 108 113 118 121 123 125 127 134 139 140 141 146 147 150 156 157 161 173 173 176 Contents 15 Glossary Styles 184 15 3 Fredefimed Siles ud Vox NC ew OS RRR OR 4 184 e ERDOUIBSe uade xk ta Bo ste RUE EORCR de ARA 187 1512 LonglableBPd S uu ova eo Cee ER 188 15 1 3 Longtable Styles Ragged Right 190 1514 Supertabular Styles oce sua 191 15 1 5 SupertabularStyles Ragged Right 193 15 16 Tree lLike Styles oi ce a HES eS BREA SO 195 15 1 7 MMIC Style gh a we orm 196 15 18 M line Sle a es hk OR ER N i 197 15 2 Defining your own glossary style 198 16 Utilities 206 1510 LOOPS 22 2 3a 9 PERRA ES Y Ses 206 152 CondiliohalS eive EX E enit i 207 16 3 Fetching and Updating the ValueofaField 212 17 Prefixes or Determiners 214 18 Accessibility Support 219 19 Troubleshooting 221 Index 222 List of Examples Jg AUNG 10 11 12 13 14 15 16 17 18 19 20 21 22 pis 24 25 26 2r 28 29 30 31 Mixing Alphabetical and Order of Definition Sorting 61 Customizing Standard Sort Options 20r3 62 Defining Custom Keys of oa sass oe RR 83 D
73. GREUIC seeshedsr scoes 162 NESGXEUD wot kes cde ure ee 162 NEG exactes m eek ER RAS 162 theglossary environment m 199 199 202 Che page aces gg eias 143 tracklang package 34 translator package 91 33 36 38 50 51 149 NwrdBtelB8 t2 9 4x3 50 65 xindy 9 10 13 15 24 26 30 34 39 47 50 57 61 64 65 73 79 80 99 100 102 105 106 133 134 139 144 146 147 195 199 xkeyval package 17 120 NXSDAacG sou ska oen 174 xspace package 174 232
74. If omitted the value is set to relax Note that not all glossary styles display the symbol symbolplural This is the plural form of the symbol as passed to glsdisplay and glsdisplayfirst by Nglspl NGlspl and NGLSpl If omitted the value is set to the same as the symbol key sort This value indicates how this entry should be sorted If omit ted the value is given by the name field unless one of the pack age options sort def and sort use have been used In general 77 4 Defining Glossary Entries it s best to use the sort key if the name contains commands e g ensuremath alpha You can also override the sort key by redefining glsprestandardsort see Section 2 4 Option 1 by default strips the standard TEX accents that is accents generated by core IATEX commands from the name key when it sets the sort key So with Option 1 newglossaryentry elite name e lite description select group of people This is equivalent to newglossaryentry elite name e lite description select group of people sort elite Unless you use the package option sanitizesort true in which case it s equivalent to newglossaryentry elite name e lite description select group of people sort elite This will place the entry before the A letter group since the sort value starts with a symbol Similarly if you use the inputenc package newglossaryentry elite name li
75. Links to Glossary Entries glsfirstplural options label insert Glsfirstplural This command always uses the value of the firstplural key as the link text There are also analogous uppercasing commands GLSfirstplural Glsfirstplural options text insert GLSfirstplural options text insert glsname Glsname GLSname glssymbol Glssymbol GLSsymbol glsname options label insert This command always uses the value of the name key as the link text Note that this may be different from the values of the text or first keys In general it s better to use Ng1stext or glsfirst instead of glsname There are also analogous uppercasing commands Glsname options text insert GLSname options text insert In general it s best to avoid Gl sname with acronyms Instead consider using Acrlong Acrshort or Acrfull glssymbol options label insert This command always uses the value of the symbol key as the link text There are also analogous uppercasing commands Glssymbol options text insert GLSsymbol options text insert 110 glsdesc Glsdesc GLSdesc glsuseri 6 Links to Glossary Entries glsdesc options label insert This command always uses the value of the description key as the link text There are also an
76. Most text editors have the ability to have more than one file open at a time The other advantage to this ap proach is that if you forget the label you can look it up in the defini tion file rather than searching through your document text to find the definition 97 5 Number lists Each entry in the glossary has an associated number list By default these numbers refer to the pages on which that entry has been used using any of the commands described in Section 6 and Section 7 The number list can be suppressed using the nonumberlist package option or an alternative counter can be set as the default using the counter package option The number list is also referred to as the loca tion list Due to the asynchronous nature of TEX s output routine see for example Finding if you re on an odd or an even page the page counter represented internally as c page can be unreliable This can cause problems when glossary entries are referenced in a para graph that spans a page break To compensate the glossaries pack age has to make some adjustments to ensure the location number is correct for this situation By default the adjustments only affect the counter styles roman Roman alph Alph and arabic If you have a different numbering system where cs name page expands to V internal cs name c page you need to use glsaddprotectedpagefmt glsaddprotectedpagefmt internal cs name For example suppose you have a style samp
77. NAGID ed eos eee as 154 NaGlp merani euii eer dads 154 NAOD oe caeu weed beeen ad 154 NEC au Map a Benenden A 154 NACR ULL 221 2 153 NAGHEULL 22 4 aceee4 153 154 yaC rral acne 153 154 158 160 164 178 acrfullfmt 153 161 164 acrfullformat 153 156 VACREGII pd x5ze kec49xa 154 Acrfullpl 154 154 NdGtfullpl 2220529 154 154 NAORLOnDG cueste Re RES 152 NAGPlODng six kw 152 154 NacBlong sese es 152 154 VACRLOAGDL vu ger Ren 153 Acrlongpl 153 154 Nacrlongpl 153 154 acronym styles dia ice etx 158 159 161 d d dese vs de ws 159 footnote 158 159 161 footnote desc 160 footnote sc 159 footnote sc desc 20 160 footnote sm 159 footnote sm desc 160 long sc short 157 159 162 long sc short desc 159 Tong Short eux 116 158 159 161 162 long short desc 159 162 long sm short 157 159 long sm short desc 159 long sp short 158 159 long sp short desc 159 sc short long 158 Sc short long desc 159 SHOPE TONG poai aaea 158 short long desc 159 sm short long 158 sm short long desc 159 Nacronymentry 156 159 160 166 acronymfont 68 152 157 157 158 160 161 169 acronymname 32 150 acronymsort 156 159 160 165 Nacronymtype 51 56 66 94 121 148 150 173 NACRSHOTE iceksasdRdc 4d 152 NAcrShOort sus 152 154 Nacrshort 11 152 154 169 NAC
78. RShOrtpl 224m 152 Acrshortpl 152 154 Nacrshortpl 152 154 NAGS ueaduleBkeucu be halen 154 NaGQS duis gus exo en ane 154 VACS vasa y eb s px d 154 Ne GSD user sbaeed ead 154 Naddcontentsline 54 align environment 178 222 altnewglossary 147 amsgen package 171 amsmath package 178 Nandname ls 126 arara isa ted denke RSS ewi 39 array package 190 193 AtBeginDocument 93 B Vbabel i444 540 eka s 65 babel package 30 31 33 34 50 51 76 93 96 149 beamerclass 177 178 beamer package 33 C NEGISe oh ee o44 s heed oe 4 180 VEGIS aeaii i db pea wee 29 180 cGlsformat 181 Gols format aiieieo xd 181 NOGESDI edens Wee x 180 NGGESDl uus dee 180 cGlsplformat 181 cglsplformat 181 Chapter xsesdcea ex bs 136 chapter 57 136 currentglossary 202 D datatool package 136 DeclareAcronymList 66 113 150 206 defentryfmt 151 defglsentry g defglsentryfmt 103 106 108 113 113 150 156 161 DefineAcronymShortcuts 67 Nde limN amp eacawuecee 4 4024 201 Nded mk usc exa 201 description environment TP 187 188 199 descriptionname 32 doc package 2 document environment 93 96 97 179 dtlcompare 136 dtlicompare 136 dtlletterindexcom
79. SetXdyLocationClassOrder Index 144 227 GlsSetXdyMinRangeLength m 100 146 glsshorttok 161 glssortnumberfmt 60 glssubentrycounterlabel Pd aue doct ALPES A ais 202 glssubentryitem 202 203 GLSsymbol 110 Glssymbol 110 glssymbol 110 116 glssymbolsgroupname 32 199 glstarget 201 202 GLStext 00 83 109 NGlstext 4 dia vua 83 109 NGTSEGRE a4 oe dead 52 83 109 glstextformat ene ee 103 116 127 152 NODLStEXtUD oid e cease oad 162 glstildechar 139 glstocfalse ss 54 Nglstoctr e icem 54 glstreeindent 195 glstreenamefmt 195 glstype 52 113 115 glsunset 176 glsunsetall 119 176 GlsUseAcrEntryDispStyle fete Sioa UE quad 162 GlsUseAcrStyleDefs 162 GUSUSEFL ccu note ws 4 111 GISUSEET csse ew 111 glsuseri 111 GLSuserii 111 Glsuserii TH glsuserii 111 GLSuseriii 112 Glsuseriii 111 glsuseriii 111 GLSuseriv 112 Glsuseriv 112 glsuseriv II GUSUSELV sies isew we bad 112 GISUSEEV uy emend LI GLSUSERY xx ex uee erg 112 GUSUSEFVE doses uus TI Glsuservi 112 glsuservi 112 Nglswriteentry 53 Index H html package 118
80. User Manual for glossaries sty v4 20 Nicola L C Talbot http www dickimaw books com 2015 11 30 Abstract The glossaries package provides a means to define terms or abbreviations or symbols that can be referenced within your document Sorted lists with collated locations can be generated either using TEX or using a supplementary indexing applica tion If you require multilingual support you must also separately in stall the relevant language module Each language module is called glossaries language where language is the root language name For example glossaries french or glossaries german Ifa language module is required the glossaries package will automati cally try to load it and will give a warning if the module isn t found See Section 1 3 for further details Documents have wide ranging styles when it comes to presenting glossaries or lists of terms or notation People have their own preferences and to a large extent this is determined by the kind of information that needs to go in the glossary They may just have symbols with terse descriptions or they may have long technical words with complicated descriptions The glossaries package is flexible enough to accommodate such varied requirements but this flexibility comes at a price a big manual If you re freaking out at the size of this manual start with glossariesbegin pdf The glossaries package a guide for beginnners You should find it in the
81. abel For example documentclass british article Nusepackage babel usepackage translate babel glossaries addto captionsbritish Nrenewcommand Nglossaryname List of Terms renewcommand acronymname List of Acronyms Note that xindy provides much better multi lingual support than makeindex so I recommend that you use xindy if you have glos sary entries that contain non Latin characters See Section 11 for fur ther details Creating a New Language Module The glossaries package now uses the tracklang package to determine which language modules need to be loaded If you want to create a new language module you should first read the tracklang documenta tion To create a new language module you need to at least create two files g1ossaries lang 1df and glossaries dictionary Lang dict where lang is the root language name for example english and Lang is the language name used by translator for example English Here s an example of glossaries dictionary English dict ProvidesDictionary glossaries dictionary English providetranslation Glossary Glossary providetranslation Acronyms Acronyms providetranslation Notation glossaries Notation providetranslation Description glossaries Description providetranslation Symbol glossaries Symbol providetranslation Page List glossaries Page List providetranslation Symbols glossaries Symbols providetra
82. able 1 1 Glossary Options Pros and Cons Option1 Option2 Option 3 Requires an external x v v application Requires Perl x x Vv Can sort extended Latin xt x v alphabets or non Latin alphabets Efficient sort algorithm x v v Can use a different sort v x x method for each glossary Can form ranges in the x v v location lists Can have non standard v x v locations in the location lists Maximum hierarchical Unlimited 3 Unlimited depth glsdisplaynumberlist Y x x reliable newglossaryentry v x x restricted to preamble Requires additional x v v write registers Default value of false true true sanitizesort package option t Strips standard ATEX accents that is accents generated by core ATEX commands so for example AA is treated the same as A 16 1 Introduction 1 1 Sample Documents The glossaries package is provided with some sample documents that illustrate the various functions These should be located in the samples subdirectory folder of the glossaries documentation direc tory This location varies according to your operating system and TEX distribution You can use texdoc to locate the main glossaries docu mentation For example in a terminal or command prompt type texdoc 1 glossaries This should display a list of all the files in the glossaries documenta tion directory with their full pathnames If you can t find the sample files on your computer they are also available from your n
83. according to the long form In addition since the name will typically be quite wide it s best to choose a glossary style that can accommodate this such as altlist Example 21 Adapting a Predefined Acronym Style Suppose I want to use the footnote sc desc style but I want the name key set to the short form followed by the long form in parentheses and the sort key set to the short form Then I need to specify the footnote sc desc style setacronymstyle footnote sc desc and then redefine Nacronymsort and Nacronymentry renewcommands acronymsort 2 1 sort by short form Nrenewcommand acronymentry 1 acronymfont glsentryshort 1 space glsentrylong 1 I ve used space for extra clarity but you can just use an actual space instead Since the default Computer Modern fonts don t support bold smallcaps I m also going to redefine acronymfont so that it al ways switches to medium weight to ensure the smallcaps setting is used renewcommands acronymfont 1 textmd scshape 1 160 newacronymstyle GenericAcronymFields Ng Ng Islabeltok glslongtok lsshorttok 13 Acronyms and Other Abbreviations This isn t necessary if you use a font that supports bold smallcaps The sample file sampleFnAcrDesc tex illustrates this example 13 1 2 Defining A Custom Acronym Style You may find that the predefined acronyms styles that come with the glossaries package don t suit
84. acronymtype to the target glossary let orgacronymt ype acronymtype renewcommand acronymtype altacronym loadglsentries myacronyms let acronymtype orgacronymtype BE cd P i Note that only those entries that have been used in the text will appear in the relevant glossaries Note also that loadglsentries may only be used in the preamble Remember that you can use provideglossaryentry rather than newglossaryentry Suppose you want to maintain a large database of acronyms or terms that you re likely to use in your doc uments but you may want to use a modified version of some of those entries Suppose for example one document may require a more detailed description Then if you define the entries using provideglossaryentry in your database file you can override the definition by simply using newglossaryentry before loading the file For example suppose your file called say terms tex con tains provideglossaryentry mallard name mallard description a type of duck but suppose your document requires a more detailed description you can do usepackage glossaries makeglossaries newglossaryentry mallard name mallard description a dabbling duck where the male has a green head loadglsentries terms Now the mallard definition in the terms tex file will be ignored 4 9 Moving Entries to Another Glossary As from version 3 02 you can move an entry from one glossary to another using
85. actions can similarly been defined using this new command newcontraction description front part of a ship below the deck focsle fo c s le forecastle 88 4 Defining Glossary Entries Since the custom acronym style just checks if abbrt ype is acronym the contractions will be treated the same as the initialisms but the style could be modified by a further test of the abbrtype value if required To test regular non abbreviated entries I ve also defined a simple word newglossaryentry apple name apple description a fruit Now for a new glossary style that provides information about the abbreviation in addition to the description newglossarystyle mystyle style name base it on the list style setglossarystyle list Nrenewcommand glossentry 2 item glsentryitem 1 glstarget 1 glossentryname 1 ifglshaslong 1 abbrtype 1 glsentrylong 1 space glossentrydesc 1 glspostdescription space 2 This uses ifglshaslong to determine whether or not the term is an abbreviation If it has an abbreviation the full form is supplied in parentheses and abbrtype defined by glsaddstoragekey earlier is used to indicate the type of abbreviation With this style set the apple entry is simply displayed in the glos sary as apple a fruit but the abbreviations are displayed in the form laser acronym light amplification by stimul
86. age created the command acr name when defining the acronym acr name In order to facilitate migrating from the old package to the new one the glossaries package provides the command oldacronym label abbrv long key val list las from version 1 18 173 13 Acronyms and Other Abbreviations This uses the same syntax as the glossary package s method of defin ing acronyms It is equivalent to newacronym key val list label abbro long In addition oldacronymalso defines the commands label which is equivalent to gls label and label which is equivalent to G1s label If label is omitted abbrv is used Since commands names must consist only of alphabetical characters label must also only consist of alphabetical characters Note that label doesn t al low you to use the first optional argument of gls or Gls you will need to explicitly use gls or G1s to change the settings Recall that in general BIEX ignores spaces following command names consisting of alphabetical characters This is also true for label unless you additionally load the xspace package but be 2 aware that there are some issues with using xspace The glossaries package doesn t load the xspace package since there are both advantages and disadvantages to using xspace in label If you don t use the xspace package you need to explicitly force a space usin
87. age that defines text smaller If you use one of the acronym styles that set acronymfont to textsmaller you must explicitly load the relsize package or otherwise define textsmaller The remaining predefined styles redefine acronymfont text to simply do its argument fext 157 glsacspace 13 Acronyms and Other Abbreviations In most cases the predefined styles adjust acrfull and glsentryfull and their plural and upper case variants to reflect the style The only exceptions to this are the dua and footnote styles and their variants The following styles are supplied by the glossaries package long short long sc short long sm short long sp short With these three styles acronyms are displayed in the form long firstacronymfont short on first use and acronymfont short on subsequent use They also set acronymsort short long to just short This means that the acronyms are sorted accord ing to their short form In addition acronyment ry label is set to just the short form enclosed in acronymfont and the description key is set to the long form The long sp short style was introduced in version 4 16 and uses glsacspace label for the space between the long and short forms This defaults to a non breakable space if acronymfont short is less than 3em otherwise it uses a normal space This may be rede fined as required Fo
88. al categories you need to first define the category and then define the sub entries using the relevant category entry as the value of the parent key Example 6 Hierarchical Categories Greek and Roman Math ematical Symbols Suppose I want a glossary of mathematical symbols that are di vided into Greek letters and Roman letters Then I can define the categories as follows newglossaryentry greekletter name Greek letters description nopostdesc newglossaryentry romanletter name Roman letters description nopostdesc Note that in this example the category entries don t need a de scription so I have set the descriptions to nopostdesc This gives a blank description and suppresses the description terminator 91 4 Defining Glossary Entries I can now define my sub entries as follows newglossaryentry pi name ensuremath pi sort pi description ratio of the circumference of a circle to the diameter parent greekletter newglossaryentry C name ensuremath C sort C description Euler s constant parent romanletter For a complete document see the sample file samplet ree tex 4 7 2 Homographs Sub entries that have the same name as the parent entry don t need to have the name key For example the word glossary can mean a list of technical words or a collection of glosses In both cases the plural is glossaries So first define the parent entry
89. alogous uppercasing commands Glsdesc options text insert GLSdesc options text insert glsuseri options label insert Glsuseri This command always uses the value of the user1 key as the link text There are also analogous uppercasing commands Glsuseri options text insert NGLSuseri GLSuseri options text insert glsuserii Glsuserii glsuserii options text insert This command always uses the value of the user2 key as the link text There are also analogous uppercasing commands GLSuserii Glsuserii options text insert GLSuserii options text insert glsuseriii glsuseriii options text insert Glsuseriii This command always uses the value of the user3 key as the link text There are also analogous uppercasing commands Glsuseriii options text insert 111 6 Links to Glossary Entries GLSuseriii GLSuseriii options text insert glsuseriv glsuseriv options text insert This command always uses the value of the user4 key as the link text There are also analogous uppercasing commands Glsuseriv Glsuseriv options text insert GLSuseriv GLSuseriv options text insert glsuserv glsuserv options text
90. am ble Options 2 and 3 printglossaries Must be used with makeglossaries in the preamble These commands will display all the glossaries in the order in which they were defined Note that in the case of Options 2 and 3 no glossaries will appear until you have either used the Perl script makeglossaries or have directly used makeindex or xindy as described in Section 1 4 If the glossary still does not appear after you re IATEX your document check the makeindex xindy log files to see if there is a problem With Option 1 you just need two BIEX runs to make the glossaries appear but you may need further runs to make the number lists up to date An individual glossary can be displayed using Option 1 printnoidxglossary options Must be used with makenoidxglossaries in the pream ble Options 2 and 3 printglossary options Must be used with makeglossaries in the preamble 134 10 Displaying a glossary where options is a key value list of options The following keys are available type The value of this key specifies which glossary to print If omit ted the default glossary is assumed For example to print the list of acronyms printglossary type acronymtype Note that you can t display an ignored glossary so don t try setting type to the name of a glossary that was defined using newignoredglossary See Section 12 title This is the glossary s title overriding t
91. ame sort description hash symbol The sort value must be sanitized before writing it to the glos sary file otherwise IATEX will try to interpret it as a parameter reference If on the other hand you want the sort value ex panded you need to switch off the sanitization For example suppose you do newcommand mysortvalue AAA newglossaryentry sample name sample sort mysortvalue description an example and you actually want mysortvalue expanded so that the entry is sorted according to AAA then use the package option sanitizesort false The default for Options 2 and 3 is sanitizesort true and the de fault for Option 1 is sanitizesort false savewrites This is a boolean option to minimise the number of write registers used by the glossaries package Default is savewrites false There are only a limited number of write reg isters and if you have a large number of glossaries or if you are using a class or other packages that create a lot of external files 49 2 Package Options you may exceed the maximum number of available registers If savewrites is set the glossary information will be stored in token registers until the end of the document when they will be writ ten to the external files If you run out of token registers you can use etex This option can significantly slow document compilation As an alternative you can use the scrwfile package part of the KOMA Script bundl
92. ame distance description The length between two points symbol km and now suppose you want gls distance to produce distance km on first use then you can redefine glsentryfmt as follows renewcommand glsentryfmt glsgenentryfmt ifglsused glslabel space glsentrysymbol glslabel Note that I ve used glsentrysymbol rather than glssymbol to avoid nested hyperlinks Note also that all of the link text will be formatted according to glstext format described earlier So if you do say 116 6 Links to Glossary Entries renewcommand glstextformat 1 textbf 1 Nrenewcommand glsentryfmt glsgenentryfmt ifglsused glslabel space glsentrysymbol glslabel then gls distance will produce distance km For a complete document see the sample file sample entryfmt tex Example 9 Custom Format for Particular Glossary Suppose you have created a new glossary called notation and you want to change the way the entry is displayed on first use so that it includes the symbol you can do defglsentryfmt notation glsgenentryfmt ifglsused glslabel space denoted glsentrysymbol glslabel Now suppose you have defined an entry as follows newglossaryentry set type notation name set description A collection of objects symbol SS The first time you reference this entry it will be displayed as set denot
93. any of the glossary styles defined in the glossary tree package unless you explicitly load glossary tree nostyles This prevents all the predefined styles from being loaded If you use this option you need to load a glossary style pack age such as glossary mcols Also if you use this option you can t use the style package option Instead you must either use Nsetglossarystyle style or the style key in the optional argument to printglossary Example Nusepackage nostyles glossaries usepackage glossary mcols setglossarystyle mcoltree nonumberlist This option will suppress the associated number lists in the glossaries see also Section 5 seeautonumberlist If you suppress the number lists with nonumberlist described above this will also suppress any cross referencing information supplied by the see key in newglossaryentry or glssee If you use seeautonumberlist the see key will auto matically implement nonumberlist false for that entry Note this doesn t affect gl ssee For further details see Section 8 59 2 Package Options counter This is a key value option Default is counter page The value should be the name of the default counter to use in the number lists see Section 5 nopostdot This is a boolean option If no value is specified t rue is assumed When set to t rue this option suppresses the default post description dot used by some of the predefined styles The default setting is nopostdot
94. arated using indexspace indexgroup The indexgroup style is similar to the index style except that each group has a heading indexhypergroup The indexhypergroup style is like indexgroup but has a set of links to the glossary groups The navigation line is the same as that for listhypergroup described above tree The tree style is similar to the index style except that it can have arbitrary levels Note that makeindex is limited to three lev els so you will need to use xindy if you want more than three levels Each sub level is indented by glstreeindent Note that the name symbol if present and description are placed in the same paragraph block If you want the name to be apart from the description use the alttree style instead See below 195 glssetwidest 15 Glossary Styles treegroup The treegroup style is similar to the tree style except that each group has a heading treehypergroup The treehypergroup style is like treegroup but has a set of links to the glossary groups The navigation line is the same as that for listhypergroup described above treenoname The treenoname style is like the tree style except that the name for each sub entry is ignored treenonamegroup The treenonamegroup style is similar to the treenon ame style except that each group has a heading treenonamehypergroup The treenonamehypergroup style is like treenon amegroup but has a set of links to the glossary groups The navi gation line is
95. aries package makeglossariesgui A Java GUI alternative to makeglossaries that also provides diagnostic tools Available separately on CTAN makeglossaries lite lua A custom designed Lua script interface to x indy and makeindex provided with the glossaries package This is a cut down alter native to the Perl makeglossaries script If you have Perl installed use the Perl script instead makeindex An indexing application Glossary Non Latin Alphabet An alphabet consisting of non Latin characters Non Latin Character An extended Latin character or a character that isn t a Latin character Number list A list of entry locations also called a location list The number list can be suppressed using the nonumberlist package option Sanitize Converts command names into character sequences That is a command called say foo is converted into the sequence of characters o o Depending on the font the backslash character may appear as a dash when used in the main docu ment text so foo will appear as foo Earlier versions of glossaries used this technique to write infor mation to the files used by the indexing applications to prevent problems caused by fragile commands Now this is only used for the sort key Standard LATgX Extended Latin Character An extended Latin character that can be created by a core IATEX command such as o e or e That is the character can be produced without the
96. as a non empty value for the prefix key This package also provides the following commands uc ifglshasprefixplural ifglshasprefixplural label true part false part Does true part if the entry identified by label has a non empty value for the prefixplural key 216 17 Prefixes or Determiners ifglshasprefixfirst ifglshasprefixfirst label true part false part Does true part if the entry identified by label has a non empty value for the prefixfirst key ifglshasprefixfirstplural ifglshasprefixfirstplural label true part false part Does true part if the entry identified by label has a non empty value for the prefixfirstplural key glsentryprefix glsentryprefix label Displays the value of the prefix key for the entry given by label glsentryprefixfirst glsentryprefixfirst label Displays the value of the prefixfirst key for the entry given by label glsentryprefixplural glsentryprefixplural label Displays the value of the prefixplural key for the entry given by label No check is performed to determine if the entry exists glsentryprefixfirstplural glsentryprefixfirstplural label Displays the value of the prefixfirstplural key for the entry given by label No check is performed to determine if the entry exists There are also variants that convert the first letter to
97. as been defined 3 If you use a package such as babel that makes certain charac ters active at the start of the document environment there will be a problem if those characters have a special significance when defining glossary entries These characters include the double quote character the exclamation mark character the ques tion mark character and the pipe character They must not be active when defining a glossary entry where they occur in the sort key and they should be avoided in the label if they may be active at any point in the document Additionally the comma character and the equals character should not be active when using commands that have key value arguments 96 4 Defining Glossary Entries To overcome the first two problems as from version 4 0 the glos saries package modifies the definition of newglossaryentry at the beginning of the document environment so that the definitions are written to an external file jobname glsdefs which is then read in at the start of the document on the next run The entry will then only be defined in the document environment if it doesn t already ex ist This means that the entry can now be looked up in the glossary even if the glossary occurs at the beginning of the document There are drawbacks to this mechanism if you modify an entry definition you need a second run to see the effect of your modifi cation this method requires an extra newwrite which may
98. ase is the name of your document without the t ex exten sion and style ist is the name of the nakeindex style file By de fault this is base ist but may be changed via set Stylerile style Note that there are other options such as 1 letter ordering See the makeindex manual for further details For example if your document is called myDoc tex then type the following at the terminal makeindex s myDoc ist t myDoc glg o myDoc gls myDoc glo Note that this only creates the main glossary If you have additional glossaries for example if you have used the acronym package option then you must call makeindex for each glossary substituting 919 gls and glo with the relevant extensions For example if you have used the acronym package option then you need to type the fol lowing in your terminal makeindex s myDoc ist t myDoc alg o myDoc acr myDoc acn For additional glossaries the extensions are those supplied when you 45 newglossary istfilename glsorder 1 Introduction created the glossary with newglossary Note that if you use makeglossaries instead you can replace all those calls to make index with just one call to makeglossaries makeglossaries myDoc Note also that some commands and package options have no effect if you use makeindex explicitly instead of using makeglossaries These are listed in table 1 3 1 4 5 Note to Front End and Script Developers The information needed
99. ated commands by default glos saries will warn you that it s redefining those commands If you are aware of the consequences of using glossaries with that class or package and you don t want to be warned about it use this option to suppress those warnings Other warnings will still be issued unless you use the nowarn option described above nomain This suppresses the creation of the main glossary and asso ciated glo file if unrequired Note that if you use this op tion you must create another glossary in which to put all your entries either via the acronym or acronyms package option de scribed in Section 2 5 or via the symbols numbers or index options described in Section 2 6 or via newglossary described in Sec tion 12 48 2 Package Options If you don t use the main glossary and you don t use this option makeglossaries will produce the following warning Warning File filename glo is empty Have you used any entries defined in glossar main Remember to use package option nomain if you don t want to use the main glossary If you did actually want to use the main glossary and you see this warning check that you have referenced the entries in that glossary via commands such as g1s sanitizesort This is a boolean option that determines whether or not to sanitize the sort value when writing to the external glossary file For example suppose you define an entry as follows newglossaryentry hash n
100. ated emission of radia tion device that creates a narrow beam of intense light for acronyms or DSP initialism digital signal processing mathematical manipula tion of an information signal for initalisms or fo c s le contraction forecastle front part of a ship below the deck for contractions For a complete document see the sample file sample storage abbr desc tex 89 glssetexpandfield glssetnoexpandfield glsexpandfields glsnoexpandfields 4 Defining Glossary Entries 4 6 Expansion When you define new glossary entries expansion is performed by default except for the name description descriptionplural symbol sym bolplural and sort keys these keys all have expansion suppressed via glssetnoexpandfield You can switch expansion on or off for individual keys using glssetexpandfield field glssetnoexpandfield field respectively where field is the field tag corresponding to the key In most cases this is the same as the name of the key except for those listed in table 4 1 Table 4 1 Key to Field Mappings Key Field sort sortvalue firstplural Exrstpl description desc descriptionplural descplural user1 useri user2 userii user3 useriii user4 useriv user5 userv user6 uservi longplural longpl shortplural shortpl Any keys that haven t had the expansion explicitly set using Nglssetexpandfield or glssetnoexpandfield are governed by g
101. ave a mixture of acronyms and regular entries within the same glossary care is needed if you want to change the display style you must first identify that glossary as a list of acronyms and then use defglsentryfmt not redefine glsentryfmt before defining your entries 150 13 Acronyms and Other Abbreviations The optional argument key val list allows you to specify keys such as description when used with one of the styles that require a de scription described in Section 13 1 or you can override plural forms of abbrv or long using the shortplural or longplural keys For example newacronym longplural diagonal matrices dm DM diagonal matrix If the first use uses the plural form glspl dm will display di agonal matrices DMs If you want to use the longplural or shortplural keys I recommend you use setacronymsty1e to set the display style rather than using one of the pre version 4 02 acronym styles Since Nnewacronym uses Nnewglossaryentry you can use commands like gls and glsreset as with any other glossary en try Since newacronym sets type acronymt ype if you want to load a file containing acronym definitions using loadglsentries type filename the optional argument type will not have an effect unless you explicitly set the type as type glsdefaulttype in the optional argument to newacronym See Section 4 8 Example 20 Defining an Abbreviation The follo
102. be redefined so that it ex pands to a format that s acceptable to the indexing application For example Nrenewcommand gls samplenumpage romannumeral c page While this modification means that the location list in the glossary won t exactly match the format of the page numbers displaying lower case Roman numbers instead of small cap Roman numerals this method will at least work correctly for both makeindex and xindy If you are using xindy the following definition renewcommand gls samplenumpage glsbackslash string textsc romannumeral c page combined with GlsAddXdyLocation romansc sep string textsc glsopenbrace roman numbers lowercase sep glsclosebrace will now have lowercase Roman numerals in the location list This option may cause problems if your locations should be hyperlinks Another possibility that will work with both makeindex and xindy is to redefine Vg1s internal cs name page Ng1s8samplenumpage in this example to just expand to the decimal page number and rede fine glsnumberformat to change the displayed format Nrenewcommand gls samplenumpage number c page renewcommands glsnumberformat 1 textsc romannumeral 1 If you redefine gls internal cs name page you must make sure that c page is expanded when it s written to the file So don t for example hide c page inside a robust command 99 glsSetSuffixF glsSetSuffixFF glsnu
103. bel numbered with automatic labelling Each glos sary uses the unstarred form of a sectioning command e g chapter or section and is assigned a label via label The label is formed from glsautoprefix glsautoprefix type where type is the label identifying that glossary The de fault value of glsautoprefix is empty For example if you load glossaries using usepackage section numberedsection autolabel glossaries then each glossary will appear in a numbered section and can be referenced using something like The main glossary is in section ref main and the list of acronyms is in section ref acronym If you can t decide whether to have the acronyms in the main glossary or a separate list of acronyms you can use acronymt ype which is set to main if the acronym option is not used and is set to acronym if the acronym option is used For example The list of acronyms is in section ref acronymtype You can redefine the prefix if the default label clashes with another label in your document For example Nrenewcommand Nglsautoprefix glo will add glo to the automatically generated label so you can then for example refer to the list of acronyms as fol lows The list of acronyms is in section ref glo acronymtype Or if you are undecided on a prefix 56 glossaryentry glsrefentry 2 Package Options The list of acronyms is in section ref glsautoprefix acronymtype nameref
104. c manual pdf in the mfirstuc user manual If you use the inputenc package makeglossaries will pick up the encoding from the auxiliary file If you use xindy explicitly instead of via makeglossaries you may need to specify the encoding us ing the C option Read the xindy manual for further details 1 3 1 Changing the Fixed Names The fixed names are produced using the commands listed in table 1 2 If you aren t using a language package such as babel or polyglossia that 30 1 Introduction uses caption hooks you can just redefine these commands as appro priate If you are using babel or polyglossia you need to use their cap tion hooks to change the defaults See http www tex ac uk cgi bin texfaq2html label latexwords or read the babel or polyglossia documentation If you have loaded babel then glossaries will attempt to load translator unless you have used the notranslate translate false or translate babel package options If the translator pack age is loaded the translations are provided by dictionary files for ex ample glossaries dictionary English dict See the trans lator package for advice on changing translations provided by transla tor dictionaries If you can t work out how to modify these dictionary definitions try switching to babel s interface using translate babel documentclass english french article Nusepackage babel usepackage translate babel glossaries and then use babel s capt
105. cally but the notation type should be sorted in order of definition For Option 1 I just need to set the sort key in the optional argu ment of printnoidxglossary printnoidxglossary sort word printnoidxglossary type acronym sort word printnoidxglossary type notation sort def 61 2 Package Options For Options 2 or 3 I can set the sort to standard which is the default but can be explicitly set via the package option sort standard and I can either define all my main and acronym entries then redefine glsprestandardsort to set sort cs to an incremented integer and then define all my notation entries Alternatively I can redefine glsprestandardsort to check for the glossary type and only modify sort cs if type is notation The first option can be achieved as follows newcounter sortcount renewcommand glsprestandardsort 3 stepcounter sortcount edef 1 glssortnumberfmt arabic sortcount The second option can be achieved as follows newcounter sortcount renewcommand glsprestandardsort 3 ifdefstring 2 notation stepcounter sortcount edef 1 glssortnumberfmt arabic sortcount An oe oo glsdosanitizesort oo ifdefstring is defined by the etoolbox package For a com plete document see the sample file sampleSort tex Example 2 Customizing Standard Sort Options 2 or 3 Suppose you want a glossary of
106. ccess the value if required This may seem a little odd for non abbreviated entries defined using newglossaryentry directly but ifglshaslong can be used to determine whether or not to reference the value of this new abbrtype field The new acronym style has a minor modification that forces the user to specify a description In the previous example the line renewcommands GenericAcronymFields description the glslongtok needs to be changed to Nrenewcommand GenericAcronymFields Additionally to accommodate the change in the default value of the abbrtype key all instances of ifglsfieldeq 1 abbrtype word need to be changed to ifglsfieldeq 1 abbrtype acronym Once this new style has been set the new acronyms can be defined using the optional argument to set the description newacronym description system for detecting the position and speed of aircraft ships etc radar radar radio detecting and ranging No change is required for the definition of newinitialism but again the optional argument is required to set the description newinitialism description mathematical manipulation of an information signal dsp DSP digital signal processing We can also accommodate contractions in a similar manner to the initialisms newcommands newcontraction 4 newacronym abbrtype contraction 1 2 3 4 The contr
107. colheader 192 Nglossarypreamble 58 136 199 super3colheaderborder tob Md rA ae eae d rm 192 HEC VOR LE es qepe dukd super4col 186 192 193 nur mco SU super4colborder 193 M c a 130 Acolheader 193 E AL NUR EN Medi Mi Meo glossentrydesc 129 200 super4colheaderborder Giessentvoname 128 203 peas Ack als Bata dia gts 193 EE s perb rd r 192 glossentryname 128 200 203 ae ie ha 192 Glossentrysymbol 131 ave M ON RC glossentrysymbol 130 200 superheaderborder 137 192 XGLe 8 77 107 215 superragged 193 194 4 ai 5 ab 97 60 107 154 174 215 superragged3col 194 ous 8 RR C MEE 9 40 49 51 52 77 107 pur aes a pora EE 114 115 117 123 142 Superragged3 olheader 151 154 163 169 174 215 A Re pans SOO R ONE NTE o oi teen ain an Di superragged3colheaderborder 41 sacspace oe he Be ees 158 PRE PERE MEE D4 walsadd 58 121 dd MES ME gisaddall EET 21 121 superraggedheader 194 glsadda11 options superraggedheaderborder typeS 2 ee eee eee 121 Ths CLE COR LORI ARE E E EOR E 194 Ng saddallunused TP 122 CEGE ee 166 195 197 glsaddkey 79 81 82 83 treegroup 196 197 Nglsaddprotectedpagefmt treehypergroup 196 197 98 142 treenoname 196 197 glsaddstoragekey treenonamegroup 196 197 treenonamehypergroup 4 d wy y Ro es 196 197 glossary inline package 197 198 glossary list package 58 59 137 187 glossary
108. criptions The column widths are governed by the widest entry in the given column Use altsuper4col for multi line descriptions Seg with the flowfram package 192 15 Glossary Styles super4colborder The super4colborder style is like the super4col style but has horizontal and vertical lines around it super4colheader The super4colheader style is like super4col but has a header row super4colheaderborder The super4colheaderborder style is like the super4colheader style but has horizontal and vertical lines around it altsuper4col The altsuper4col style is like super4col but allows multi line descriptions and page lists The width of the descrip tion column is governed by the length glsdescwidth and the width of the page list column is governed by the length glspagelistwidth The width of the name and symbol columns is governed by the widest entry in the given column altsuper4colborder The altsuper4colborder style is like the super4colborder style but allows multi line descriptions and page lists altsuper4colheader The altsuper4colheader style is like super4colheader but allows multi line descriptions and page lists altsuper4colheaderborder The altsuper4colheaderborder style is like su per4colheaderborder but allows multi line descriptions and page lists 15 1 5 Supertabular Styles Ragged Right The styles described in this section are all defined in the package glossary superragged These styles are analogous to t
109. d There are two ways to do this The first is to create a style that doesn t use glsgenacfmt but instead provides a modified version that doesn t use acronymfont short but instead uses entryfont glslabel short The full format given by com mands such as genacrfullformat need to be similarly adjusted For example Nrenewcommand genacrfullformat 2 glsentrylong 1l 2 space entryfont 1 glsentryshort 1 This will deal with commands like gls but not commands like acrshort which still use acronymfont Another approach is to redefine acronymfont to look up the required font declaration Since acronymfont doesn t take the entry label as an argument the following will only work if acronymfont is used in a context where the label is provided by glslabel This is true in gls acrshort and acrfull The redefinition is now renewcommands acronymfont 1 entryfont glslabel 1 So the new style can be defined as newacronymstyle long font short GlsUseAcrEntryDispStyle long short oe GlsUseAcrStyleDefs long short renewcommands genacrfullformat 2 glsentrylong 1 2 space entryfont 1 glsentryshort Nrenewcommand Genacrfullformat Glsentrylong 1 2 space entryfont 1 glsentryshort renewcommands genplacrfullformat 2 glsentrylongpl 1 2 space 3E Ane ae N LA
110. d as lists of acronyms via the package option acronymlists or the command DeclareAcronymList see Section 2 5 use defglsentryfmt to set their display style Within the definition argument of defglsentryfmt or if you want to redefine glsentryfmt you may use the following com mands glstype glscustomtext This is the label of the entry being referenced As from version 4 08 you can also access the glossary entry type using glstype This is defined using edef so the replacement text is the actual glos sary type rather than glsentrytype glslabel glscustomtext This is the custom text supplied in glsdisp It s always empty for 1 glsdisplayfirst and glsdisplay are now deprecated Backwards com patibility should be preserved but you may need to use the compatible 3 07 option 113 glsinsert glsifplural 6 Links to Glossary Entries gls glsp1 and their upper case variants You can use etoolbox s ifdefempty to determine if glscustomtext is empty glsinsert The custom text supplied in the final optional argument to gls glsp1 and their upper case variants glsifplural true text false text glscapscase glsifhyperon glslinkvar If glspl NGlspl or GLSp1 was used this command does true text otherwise it does false text glscapscase no case first uc all caps If gls glspl or glsdisp were used this does no case If NG1s o
111. d or Package Option makeindex xindy order letter use 1 use M ord letorder order word default default xindy language lang codename code N A use L lang C code GlsSetXdyLanguage lang N A use L lang NGlsSetXdyCodePage code N A use C code hnttp www latex community org 9http www dickimaw books com latex thesis 41 1 Introduction 1 4 1 Using the makeglossaries Perl Script The makeglossaries script picks up the relevant information from the auxiliary aux file and will either call xindy or makeindex depending on the supplied information Therefore you only need to pass the document s name without the extension to makeglossaries For example if your document is called myDoc tex type the follow ing in your terminal latex myDoc makeglossaries myDoc latex myDoc You may need to explicitly load makeglossaries into Perl perl makeglossaries myDoc Windows users TeX Live on Windows has its own internal Perl interpreter and provides makeglossaries exe as a convenient wrapper for the makeglossaries Perlscript MiKTeX also provides a wrapper makeglossaries exe but doesn t provide a Perl inter preter which is still required even if you run MiKTeX s makeglossaries exe so with MiKTeX you ll need to install Perl There s more informa tion about thisathttp tex stackexchange com q 158796 19862 on the TeX SX site Alternatively there is a batch file called makeglossaries bat that sh
112. define your entries terms symbols or abbreviations Then you can refer ence these within your document like cite or ref You can also optionally display a list of the entries you have referenced in your document the glossary This last part displaying the glossary is the part that most new users find difficult There are three options Option 1 This is the simplest option but it s slow and if you want a sorted list it doesn t work well for extended Latin alphabets or non That is if the term has been referenced using any of the commands described in Section 6 and Section 7 or via glssee or the see key or commands such as Nacrshort 11 1 Introduction Latin alphabets However if you use the sanitizesort false pack age option the default for Option 1 then the standard TEX accent commands will be ignored so if an entry s name is set to e lite then the sort will default to elite if sanitize sort false is used and will default to elite if sanitizesort true is used This option works best with the sort def setting For any other setting be prepared for a long document build time especially if you have a lot of entries defined 1 Add makenoidxglossaries to your preamble before you start defining your entries as described in Section 4 2 Put printnoidxglossary where you want your list of entries to appear described in Section 10 3 Run IATEX twice on your document As you would d
113. der This may take two values word or letter The default is word ordering Note that the order option has no effect if you don t use makeglossaries If you use Option 1 this setting will be used if you use sort st andard in the optional argument of printnoidxglossary printnoidxglossary sort standard 63 2 Package Options Alternatively you can specify the order for individual glos saries printnoidxglossary sort word printnoidxglossary type acronym sort letter makeindex Option 2 The glossary information and indexing style file will be written in makeindex format If you use makeglossaries it will automatically detect that it needs to call makeindex If you don t use makeglossaries you need to remember to use makeindex not xindy The indexing style file will been given a ist extension You may omit this package option if you are using Option 2 as this is the default It s available in case you need to override the effect of an earlier occurrence of xindy in the package option list xindy Option 3 The glossary information and indexing style file will be written in xindy format If you use makeglossaries it will automatically detect that it needs to call xindy If you don t use makeglossaries you need to remember to use xindy not makeindex The indexing style file will been given a xdy extension This package option may additionally have a value that is a key value comma separated list to
114. derborder The long3colheaderborder style is like long3colheader but has horizontal and vertical lines around it long4col The long4col style is like long3col but has an additional col umn in which the entry s associated symbol appears This style is used for brief single line descriptions The column widths are governed by the widest entry in the given column Use alt long4col for multi line descriptions long4colborder The long4colborder style is like the long4col style but has horizontal and vertical lines around it long4colheader The long4colheader style is like long4col but has a header row long4colheaderborder The long4colheaderborder style is like long4colheader but has horizontal and vertical lines around it altlong4col The altlong4col style is like long4col but allows multi line descriptions and page lists The width of the description col umn is governed by the length glsdescwidth and the width of the page list column is governed by the length glspagelistwidth The widths of the name and symbol columns are governed by the widest entry in the given column 189 15 Glossary Styles altlong4colborder The altlong4colborder style is like the long4colborder but allows multi line descriptions and page lists altlong4colheader The altlong4colheader style is like long4colheader but allows multi line descriptions and page lists altlong4colheaderborder The altlong4colheaderborder style is like long4colheaderborder but allo
115. don t increment the entry count On the next IATEX run glsentryprevcount apple now produces 4 as that was the value of the currcount field for the apple entry at the end of the document on the previous run When you enable the entry count using glsenableentrycount you also enable the following commands v cgls Negisi options label insert no case change singular cglspl NeglsplI options label insert no case change plural cGls cG1s options label insert first letter uppercase singular and cGlspl cGlsp1 options label insert first letter uppercase plural These all have plus and starred vari ants like the analogous gls glspl Gls and NGlspl com mands If you don t use glsenableentrycount these commands be have like Ng1s glsp1 Gls and Glspl respectively only there will be a warning that you haven t enabled entry counting If you have enabled entry counting with glsenableentrycount then these commands test if glsentryprevcount label equals 1 If it doesn t then the analogous g1s etc will be used If it does then the first optional argument will be ignored and cs format label insert glsunset label 180 cglsformat cglsplformat cGlsformat cGlsplformat 14 Unsetting and Resetting Entry Flags will be performed where cs format is a command tha
116. ds newinitialism 4 newacronym abbrtype initialism 1 2 3 4 Now the entries can all be defined newacronym radar radar radio detecting and ranging newacronym laser laser light amplification by stimulated mission of radiation newacronym scuba scuba self contained underwater breathing pparatus newinitialism dsp DSP digital signal processing newinitialism atm ATM automated teller machine z 7 MU 0 On first use Ng1s radar will produce radar radio detecting and ranging but g1s dsp will produce DSP digital signal process ing For a complete document see the sample file sample storage abbr tex In the above example if newglossaryentry is explicitly used instead of through newacronym the abbrtype key will be set to its default value of word but the ifglshaslong test in the cus tom acronym style will be false since the long key hasn t been set so the display style will switch to that given by glsgenentryfmt and they ll be no test performed on the abbrt ype field Example 5 Defining Custom Storage Key Acronyms and Non Acronyms with Descriptions The previous example can be modified if the description also needs to be provided Here I ve changed word to acronym glsaddstoragekey 87 4 Defining Glossary Entries abbrtype key field name acronym default value if not explicitly set abbrtype custom command to a
117. ds all take a first op tional argument that is a comma separated list of key value op 103 6 Links to Glossary Entries tions described below They also have a star variant which inserts hyper false at the start of the list of options and a plus variant which inserts hyper t rue at the start of the list of options For ex ample Ng1s sample is the same as gls hyper false sample and glst sample isthesameas gls hyper true sample whereas just gls sample will use the default hyperlink setting which depends on a number of factors such as whether the entry is in a glossary that has been identified in the nohypertypes list You can override the hyper key in the variant s optional argument for exam ple gls hyper true sample but this creates redundancy and is best avoided The following keys are available for the optional argument hyper This is a boolean key which can be used to enable disable the hyperlink to the relevant entry in the glossary If this key is omitted the value is determined by current settings as indi cated above For example when used with a g1s like com mand if this is the first use and the hyperfirst false package op tion has been used then the default value is hyper false The hyperlink can be forced on using hyper true unless the hyperlinks have been suppressed using glsdisablehyper You must load the hyperref package before the glossaries package to ensure the hyperlinks work
118. ds do this The reset commands glsreset and glslocalreset reset this field back to zero where glslocalreset performs a local change The prevcount field stores the final value of the currcount field from the previous run This value is read from the aux file at the be ginning of the document environment You can access these fields using glsentrycurrcount glsentrycurrcount label for the currcount field and glsentryprevcount glsentryprevcount label for the prevcount field These commands are only defined if you have used glsenableentrycount For example documentclass article usepackage glossaries makeglossaries glsenableentrycount newglossaryentry apple name apple description a fruit begin document Total usage on previous run glsentryprevcount apple gls apple gls apple glsadd apple glsentrytext apple 179 14 Unsetting and Resetting Entry Flags glslink apple apple glsdisp apple apple Gls apple Number of times apple has been used glsentrycurrcount apple end document On the first ISTEX run glsentryprevcount apple produces 0 At the end of the document glsentrycurrcount apple pro duces 4 This is because the only commands that have incremented the entry count are those that use glsunset That is gls glsdisp and Gls The other commands used in the above xample glsadd glsentrytext and glslink don t use glsunset so they
119. e and not use this option You can also reduce the number of write registers by using Op tion 1 or by ensuring you define all your glossary entries in the preamble If you want to use TEX s write18 mechanism to call makeindex or xindy from your document and use savewrites you must create the external files with glswritefiles before you call makeindex xindy Also set gl swritefiles to nothing or relax before the end of the document to avoid rewriting the files For example glswritefiles writel8 makeindex s istfilename space t jobname glg o jobname gls jobname let glswritefiles relax translate This can take the following values translate true If babel has been loaded and the translator pack age is installed translator will be loaded and the trans lations will be provided by the translator package inter face You can modify the translations by providing your own dictionary If the translator package isn t installed and babel is loaded the glossaries babel package will be loaded and the translations will be provided using babel s addto caption language mechanism If polyglossia has been loaded glossaries polyglossia will be loaded translate false Don t provide translations even if babel or poly glossia has been loaded Note that babel provides the com mand glossaryname so that will still be translated if you have loaded babel 50 2 Package Options translate babel Don t load the
120. e the end of the sentence For example I was awarded a B Sc and a Ph D From the same place is typeset as I was awarded a B Sc and a Ph D From the same place The spacing is more noticeable with the typewriter font Nttfamily I was awarded a B Sc and a Ph D From the same place is typeset as I was awarded a B Sc and a Ph D From the same place 170 13 Acronyms and Other Abbreviations The lower case letter at the end of B Sc is confusing TEX into think ing that the full stop after it marks the end of the sentence Whereas the upper case letter at the end of Ph D has confused TEX into thinking that the following full stop is just part of the abbreviation These can be corrected I was awarded a B Sc and a Ph D From the same place This situation is a bit problematic for glossaries The full stops can form part of the short argument of newacronymand the B Sc part can be dealt with by remembering to add _ for example gls bsc _ but the end of sentence case is more troublesome as you need to omit the sentence terminating full stop to avoid two dots which can make the source code look a little strange but you also need to adjust the space factor which is usually done by insert ing before the full stop The next example shows one way of achieving this Example 24 Abbreviations with Full Stops Periods As from version 4 16 there s now a hook Ngl1spostlinkhoo
121. e for long short desc etc dua dua desc With these styles the g1s like commands always display the long form regardless of whether the entry has been used or not However acrfull and glsentryfull will display long acronymfont short In the case of dua the name and sort keys are set to the short form and the description is set to the long form In the case of dua desc the name and sort keys are set to the long form and the description is supplied in the optional argument of newacronym footnote footnote sc footnote sm With these three styles on first use the gls like commands display firstacronymfont short footnote long 159 13 Acronyms and Other Abbreviations However acrfulland glsentryfullareset to acronymfont short long On subsequent use the display is acronymfont short The sort and name keys are set to the short form and the descrip tion is set to the long form In order to avoid nested hyperlinks on first use the footnote styles automatically implement hyperfirst false for the acronym lists e footnote desc footnote sc desc footnote sm desc These three styles are similar to the previous three styles but the description has to be supplied in the optional argument of newacronym The name key is set to the long form followed by the short form in parentheses and the sort key is set to the long form This means that the acronyms will be sorted
122. e from being overwritten by the glossaries package For additional information about xindy read the xindy documentation I m sorry I can t provide any assis tance with writing xindy style files If you need help I recommend you ask on the xindy mailing list http xindy sourceforge net mailing list html 11 1 Language and Encodings When you use xindy you need to specify the language and encod ing used unless you have written your own custom xindy style file that defines the relevant alphabet and sort rules If you use makeglossaries this information is obtained from the document s auxiliary aux file The makeglossaries script attempts to find the root language given your document settings but in the event that it gets it wrong or if xindy doesn t support that language then you can specify the required language using GlsSetXdyLanguage glossary type language where language is the name of the language The optional argument can be used if you have multiple glossaries in different languages If glossary type is omitted it will be applied to all glossaries otherwise the language setting will only be applied to the glossary given by glossary type If the inputenc package is used the encoding will be obtained from the value of inputencodingname Alternatively you can specify the encoding using GlsSetXdyCodePage code where code is the name of the encoding For example GlsSetXdyCodePage utf8
123. e is no check for the existence of label For all other fields you can use ifglshasfield field label true part false part This checks if the field given by field for the entry identified by label is empty If it is true part is performed otherwise false part If the field supplied is unrecognised false part is performed and a warning is issued Unlike the above commands such as ifglshasshort an error occurs if the entry is undefined You can test if the value of the field is equal to a given string using ifglsfieldea label field string true false In this case the field must be the field name not the key see table 4 1 If the field isn t recognised an error will occur This command inter nally uses etoolbox s ifcsstring to perform the comparison The string is not expanded during the test The result may vary depending on whether or not expansion is on for the given field when the entry was defined For example documentclass article usepackage glossaries newcommands N oo FOO newglossaryentry samplel name samplel description an exampl userl FOO newglossaryentry sample2 name sample2 description an exampl userl foo begin document ifglsfieldeq samplel useri FOO TRUE FALSE 209 ej ej ifglsfieldeq sample2 useri FOO TRUE end document 16 Uti
124. e short form you can change the above to renewcommand acronymsort 2 1 The acronym font needs to be set to textsc and the plural suffix adjusted so that the s suffix in the plural short form doesn t get 165 13 Acronyms and Other Abbreviations converted to smallcaps Nrenewcommand Nacronymfont 1 textsc 1 renewcommands acrpluralsuffix glstextup glspluralsuffix There are a number of ways of dealing with the format in the list of acronyms The simplest way is to redefine acronymentry to the long form followed by the upper case short form in parentheses Nrenewcommand Nacronymentry 1 Glsentrylong 1 space MakeTextUppercase glsentryshort 1 I ve used Glsentrylong instead of glsentrylong to capitalise the name in the glossary An alternative approach is to set acronyment ry to just the long form and redefine GenericAcronymFields to set the symbol key to the short form and use a glossary style that displays the symbol in parentheses after the name such as the tree style like this renewcommands Nacronymentry 1 Glsentrylong 1 Nrenewcommand GenericAcronymFields symbol protect MakeTextUppercase the glsshorttok I m going to use the first approach and set GenericAcronymFields to do nothing renewcommands GenericAcronymFields Finally this style needs to switch off hyperlinks on f
125. each entry name is formatted according to glsnamefont name which takes one argument the entry name This command is always used regardless of the glossary style By default glsnamefont simply displays its argument in whatever the surrounding font hap pens to be This means that in the list like glossary styles defined in the glossary list style file the name will appear in bold since the name is placed in the optional argument of item whereas in the tabu lar styles defined in the glossary long and glossary super style files the name will appear in the normal font The hierarchical glossary styles defined in the glossary tree style file also set the name in bold lyou can t use the longheaderborder style for this example as you can t use the longtable environment in two column mode 137 10 Displaying a glossary Example 16 Changing the Font Used to Display Entry Names in the Glossary Suppose you want all the entry names to appear in medium weight small caps in your glossaries then you can do renewcommand glsnamefont 1 textsc mdseries 1 138 glsopenbrace glsclosebrace glspercentchar glstildechar glsbackslash glsquote 11 Xindy Option 3 If you want to use xindy to sort the glossary you must use the pack age option xindy Nusepackage xindy glossaries This ensures that the glossary information is written in xindy syntax Section 1 4 covers how to use the external inde
126. earest CTAN mirror at http mirror ctan org macros latex contrib glossaries samples The sample documents are as follows minimalgls tex This document is a minimal working example You can test your installation using this file To create the com plete document you will need to do the following steps 1 Run minimalgls tex through IATEX either by typing latex minimalgls in a terminal or by using the relevant button or menu item in your text editor or front end This will create the re quired associated files but you will not see the glossary If you use PDFI4TEX you will also get warnings about non existent references that look something like pdfTeX warning dest name glo aca has been referenced but does not exist replaced by a fixed one These warnings may be ignored on the first run If you get a Missing begin document error then it s most likely that your version of xkeyval is out of date Check the log file for a warning of that nature If this is the case you will need to update the xkeyval package Note that although I ve written Latex in this section it s better to use pdf latex where possible for the reasons given earlier 17 1 Introduction 2 Run makeglossaries on the document Section 1 4 This can be done on a terminal either by typing makeglossaries minimalgls or by typing perl makeglossaries minimalgls If your system doesn t recognise the command per1 then it s like
127. ed S assuming gls was used Alternatively if you expect all the symbols to be set in math mode you can do defglsentryfmt notation glsgenentryfmt ifglsused glslabel space denoted glsentrysymbol glslabel and define entries like this newglossaryentry set type notation name set description A collection of objects symbol S Remember that if you use the symbol key you need to use a glossary style that displays the symbol as many of the styles ignore it 117 6 Links to Glossary Entries 6 4 Enabling and disabling hyperlinks to glossary entries If you load the hyperref or html packages prior to loading the glossaries package the gls like and glstext like commands will automat ically have hyperlinks to the relevant glossary entry unless the hy per option has been switched off either explicitly or through implicit means such as via the nohypertypes package option You can disable or enable links using glsdisablehyper glsdisablehyper and glsenablehyper glsenablehyper respectively The effect can be localised by placing the commands within a group Note that you should only use glsenablehyper if the commands hyperlink and hypertarget have been defined for example by the hyperref package You can disable just the first use links using the package option hyperfirst false Note that this option only affects the g1s like com mands that recognise the first use flag
128. edheaderborder style is like su perraggedheader but has horizontal and vertical lines around it superragged3col The superragged3col style is like superragged but has three columns The first column contains the entry s name the second column contains the left justified description and the third column contains the left justified number list The en try s symbol is ignored The width of the first column is gov erned by the widest entry in that column The width of the second column is governed by the length glsdescwidth The width of the third column is governed by the length glspagelistwidth superragged3colborder The superragged3colborder style is like the su perragged3col style but has horizontal and vertical lines around it superragged3colheader The superragged3colheader style is like super ragged3col but has a header row superragged3colheaderborder The superragged3colheaderborder style is like superragged3colheader but has horizontal and vertical lines around it altsuperragged4col The altsuperragged4col style is like superragged3col but has an additional column in which the entry s associated symbol appears The column widths for the name and symbol column are governed by the widest entry in the given column altsuperragged4colborder The altsuperragged4colborder style is like the altsuperragged4col style but has horizontal and vertical lines around it 194 glstreenamefmt glstreeindent 15 Glossary Styles
129. edi ate step unless you have chosen Option 1 which uses TEX to do the sorting It is this application that creates the file containing the code that typesets the glossary If this step is omitted the glossaries will not appear in your document The two indexing applications that are most commonly used with I5TEX are makeindex and xindy As from version 1 17 the glossaries package can be used with either of these applications Previous versions were designed to be used with makeindex only Note that xindy has much better multi lingual support than makeindex so xindy is recommended if you re not writing in English Commands that only have an effect when xindy is used are described in Section 11 This is a multi stage process but there are methods of automating document compilation using applications such as latexmk and arara Seehttp www dickimaw books com latex thesis html build html for more information The glossaries package comes with the Perl script makeglossaries which will run makeindex or xindy on all the glossary files us ing a customized style file which is created by makeglossaries See Section 1 4 1 for further details Perl is stable cross platform open source software that is used by a number of TpX related applica tions Most Unix like operating systems come with a Perl interpreter TEX Live also comes with a Perl interpreter MiKTEX doesn t come with a Perl interpreter so if you are a Windows MiKTEX user you will
130. ee also non Latin char acter First use The first time a glossary entry is used from the start of the doc ument or after a reset with one of the following commands gls Gls NGLS glspl Glspl NGLSpl or glsdisp See first use flag amp first use text First use flag A conditional that determines whether or not the entry has been used according to the rules of first use Commands to unset or reset this conditional are described in Section 14 Glossary First use text The text that is displayed on first use which is governed by the first and firstplural keys of newglossaryentry May be overridden by glsdisp or by defglsentry Indexing application An application piece of software separate from TEX T4TEX that collates and sorts information that has an associated page ref erence Generally the information is an index entry but in this case the information is a glossary entry There are two main indexing applications that are used with TEX makeindex and xindy These are both command line interface CLI applica tions Latin Alphabet The alphabet consisting of Latin characters See also extended Latin alphabet Latin Character One of the letters a z A Z See also extended Latin character Link text The text produced by commands such as g1s It may or may not be a hyperlink to the glossary makeglossaries A custom designed Perl script interface to x indy and makeindex provided with the gloss
131. efining Custom Storage Key Acronyms and Initialisms 85 Defining Custom Storage Key Acronyms and Non Acronyms with Descriptions 87 Hierarchical Categories Greek and Roman Mathe matical Symbols Loa ae eR BPS S 91 Loading Entries from Another File 94 Custom Entry Display in Text ous s oem n 116 Custom Format for Particular Glossary 117 First Use With Hyperlinked Footnote Description 118 Suppressing Hyperlinks on First Use Just For Acronyms 119 Only Hyperlink in Text Mode Not Math Mode 119 One Hyper Link Per Entry Per Chapter sss 120 Dual Entries os ous coe y domo OD eS A 122 Switch to Two Column Mode for Glossary 197 Changing the Font Used to Display Entry Names in the coo CU DEP 138 Custom Font for Displaying a Location 141 Custom Numbering System for Locations 142 Locations as Words not Digits 143 Defining an Abbreviation orn Rs 151 Adapting a Predefined Acronym Style 160 Defining a Custom Acronym Style 162 Italic and Upright Abbreviations 168 Abbreviations with Full Stops Periods 171 Don t index entries that are only used once 182 Creating a completely new style 202 Creating a new glossary style based on an existing style 203 Example creating a glossary style that uses the user1 poy USORE KEYS MM CETT 204 Defining Determiners nudam ok ES 214 Using Pes Lo
132. entry tex name TeX description A typesetting language sort TeX newglossaryentry html type glsdefaulttype name htmlj description A mark up language and suppose in my document preamble I use the command loadglsentries languages myentries then this will add the entries tex and htm1 to the glossary whose type is given by languages but the entry per1 will be added to the main glossary since it explicitly sets the type to main Note if you use newacronym see Section 13 the type is set as type acronymtype unless you explicitly override it For example if my file myacronyms tex contains newacronym aca aca a contrived acronym then supposing I have defined a new glossary type called alt acronym loadglsentries altacronym myacronyms will add aca to the glossary type acronym if the package option acronym has been specified or will add aca to the glossary type altacronyn if the package option acronym is not specified If you have used the acronym package option there are two possible solutions to this problem 1 Change myacronyms tex so that entries are defined in the form newacronym type glsdefaulttype aca aca a contrived acronym lThis is because acronymt ype is set to glsdefaulttype if the acronym pack age option is not used 94 glsmoveentry 4 Defining Glossary Entries and do loadglsentries altacronym myacronyms 2 Temporarily change
133. ere are also analogous upper case variants Acrshort options label insert ACRshort options label insert There are also plural versions acrshortpl options label insert Acrshortpl options label insert ACRshortpl options label insert The short plural form is as supplied by the shortplural key which newacronym implicitly sets acrlong options label insert This sets the link text to the long form for the entry given by label The long form is as supplied by the long key which newacronym implicitly sets There are also analogous upper case variants Acrlong options label insert ACRlong options label insert 152 13 Acronyms and Other Abbreviations Again there are also plural versions acrlongpl acrlongp1 options label insert Acrlongpl Acrlongp1 options label insert ACRlongpl_ ACRlongp1 options label insert The long plural form is as supplied by the longplural key which newacronym implicitly sets The commands below display the full form of the acronym but note that this isn t necessarily the same as the form used on first use These full form commands are shortcuts that use the above com acrfull acrfull options label insert This is a shortcut for acrfullfmt acrfullfmt
134. ersion of glsaddkey switches on expansion for this key The unstarred version doesn t override the current expansion setting Example 3 Defining Custom Keys Suppose I want to define two new keys ed and ing that default to the entry text followed by ed and ing respectively The default value will need expanding in both cases so I need to use the starred form Define ed key 83 4 Defining Glossary Entries glsaddkey ed key glsentrytext glslabel ed default value glsentryed command analogous to glsentrytext Glsentryed command analogous to Glsentrytext glsed command analogous to glstext Glsed command analogous to Glstext GLSed command analogous to GLStext 9 Define ing key Nglsaddkeyx ing key glsentrytext glslabel ing default value glsentrying command analogous to glsentrytext Glsentrying command analogous to Glsentrytext glsing command analogous to glstext Glsing command analogous to Glstext GLSing command analogous to GLStext Now I can define some entries 9 No need to override defaults for this entry newglossaryentry jump name jump description 9 Need to override defaults on these entries newglossaryentry run name run ed ran ing running description newglossaryentry waddle name waddle ed waddled ing waddling description These entrie
135. f 212 glsfieldfetch 212 Nglsfieldgdef 213 glsfieldxdef 120 213 VGLOT ITSE ies res 109 NGISITPSE geraten taa ek 109 Naglstirst 44 ead des 109 GLSfirstplural 110 Glsfirstplural 110 glsfirstplural 110 226 glsgenacfmt 115 116 156 161 163 169 glsgenentryfmt 115 161 163 glsgetgrouptitle 199 glsglossarymark 55 55 136 156 glsgroupheading 199 202 glsgroupskip 186 200 202 glshyperlink 119 127 132 glshypernavsep glsifhyper glsifhyperon glsIfListOfAcronyms 67 glsifplural 114 115 161 172 Nglsinlineparentchildseparatong 198 198 glsinlineseparator 198 198 Nglsinlinesubseparator Sau leXebr erac nn 198 198 glsinsert 114 115 glslabel 52 113 115 169 172 glslabeltok 161 glsletentryfield 130 glslink 52 108 108 141 165 glslink options counter 106 141 format 104 105 133 141 hyper 52 104 114 118 121 local ota eom m 106 glslinkcheckfirsthyperhook ete OE ecesatutu Ub d Rue 52 glslinkpostsetkeys T 52 115 116 120 172 glslinkvar 114 glslistdottedwidth 188 glslocalreset 176 glslocalresetall 176 glslocalunset 176 glslocalunsetall 176 glslongtok 161 NGLSHeoLs qooque wk ens 197 glsmoveentry 95 NGLSfame coe ke ee anaes 110 NGIsn
136. f you have a long description that needs to span multiple paragraphs use longnewglossaryentry label key value list long description instead Note that this command may only be used in the pream ble Be careful of unwanted spaces longnewglossaryentry will remove trailing spaces in the description via unskip but won t re move leading spaces otherwise it would interfere with commands like Glsentrydesc There are also commands that will only define the entry if it hasn t already been defined provideglossaryentry label key value list and longprovideglossaryentry nopostdesc glspar 4 Defining Glossary Entries longprovideglossaryentry label key value list long description These are both preamble only commands For all the above commands the first argument label must be a unique label with which to identify this entry This can t contain any non expandable commands or active characters Note that although an extended Latin character or other non Latin character such as or f looks like a plain character in your tex file it s actually a macro an active character and therefore can t be used in the label This applies to IATEX rather than X3lATEX Also be careful of babel s options that change certain punctuation characters such as or to active characters The second argument key value list is a key value list that supplies
137. false eva ex es 49 section 54 136 seeautonumberlist 59 80 125 shortcuts 67 154 smallcaps 67 69 72 smaler 67 69 SOME se e tees d 60 def 12 60 61 77 92 184 standard 60 62 use 60 61 77 92 184 style 58 59 135 184 190 193 list mE E Ae ee a 58 subentrycounter 58 91 92 184 202 203 false wx e aha RR 58 symbols 48 69 148 TOC uo eae 54 135 Index translate 50 51 72 babel 31 33 34 51 false i sz 31 50 51 ju PL 50 51 ucfirSt fick mor weed Ss 55 ucmark 55 fale s s e n 55 WUE oie ie cs ee eS wale 55 xindy 14 26 30 41 44 45 64 72 139 141 146 xindygloss 64 72 xindynoglsnumbers 65 72 page counter 144 pagelistname 32 PAETAE wish ces wis es 2 103 NPGIS as dt erm dee its 215 VEIS aha dutem o eps 215 NpPOdS uwae9uew eed re RAS 215 NPGDISDpl omes Y OE 216 XAPglSpl 4664856044860 4 216 NpOdlspl 24 bead 215 pod2ma n selema ex ed 43 polyglossia package m 30 31 33 50 51 printacronym 150 printacronyms 65 173 printglossaries 96 134 148 173 202 207 printglossary ee 59 65 70 71 134 150 173 184 186 202 207 printglossary options entrycounter 135 nogroupskip 135 nonumberlist 135
138. g backslash space however you can follow label with additional text in square brackets the final optional argument to gls If you use the xspace package you don t need to escape the spaces but you can t use the optional argument to insert text you will have to explicitly use gls To illustrate this suppose I define the acronym abc as follows oldacronym abc example acronym This will create the command abc and its starred version abc Table 13 2 illustrates the effect of albc on subsequent use according to whether or not the xspace package has been loaded As can be seen from the final row in the table the xspace package prevents the optional argument from being recognised 2See David Carlisle s explanation in http tex stackexchange com questions 86565 drawbacks of xspace 174 13 Acronyms and Other Abbreviations Table 13 2 The effect of using xspace with oldacronym Code abe abc xyz abc xyz abc xyz abc s XYZ With xspace abc abc xyz abc xyz Abc xyz abc s xyz 175 Without xspace abc abcxyz abc xyz Abc xyz abc s xyz glsreset glslocalreset glsunset glslocalunset glsresetall glslocalresetall used the glossary entry Conversely you may want to use the value given by the text key even though you haven t used the glossary entry 2 oO S a z oO H o e 3 n oO o Z oO lt oO a o n o 2 oO o lt a
139. g4col 186 189 longheader 189 199 altlong4colborder 190 longheaderborder 137 189 altlong4colheader 190 longragged 190 191 altlong4colheaderborder longragged3col 191 es 190 longragged3colborder 191 altlongragged4col 191 longragged3colheader 191 Md MEE longragged3colheaderborder teen n e n n n n 6 dT 000000 llle rrr 191 altlongragged4colheader longraggedborder 190 E 2s L91 lonaragaedheader 190 alt A Inesderpoeder d oie dheaderborder ETT 191 pcd exa cenae 190 altsuper4col 186 192 193 mcolalttree 197 altsuper4colborder 193 mcolalttreegroup 197 altsuper4colheader 193 mcolalttreehypergroup altsuper4colheaderborder Tu 197 193 mcolindex 197 224 Index mcolindexgroup 197 glossary super package mcolindexhypergroup 197 55 59 137 191 193 ficolbre6e 26 5 45 Ake ve 197 glossary superragged package 193 mcoltreegroup 197 glossary tree package mcoltreehypergroup 197 ee eee 58 59 137 195 mcoltreenoname 197 glossaryentry counter mcoltreenonamegroup 197 trees 57 57 58 mcoltreenonamehypergroup glossaryentrynumbers 201 pei Sad otis Bs Rees 197 glossaryheader BUDE seh a wed cae ud 1920 tes 187 199 199 202 super3col 192 Nglossaryname 32 50 super3colborder 192 glossarypostamble 137 199 super3
140. ge you will need to redefine glsglossarymark Further in formation about these options and commands is given in Section 2 2 Information can be added to the start of the glossary after the title and before the main body of the glossary by redefining glossarypreamble For example renewcommand glossarypreamble Numbers in italic indicate primary definitions This needs to be done before the glossary is displayed If you want a different preamble per glossary you can use setglossarypreamble type preamble text If type is omitted glsdefaulttype is used 136 glossarypostamble glsnamefont 10 Displaying a glossary For example setglossarypreamble Numbers in italic indicate primary definitions This will print the given preamble text for the main glossary but not have any preamble text for any other glossaries There is an analogous command to glossarypreamble called glossarypostamble which is placed at the end of each glossary Example 15 Switch to Two Column Mode for Glossary Suppose you are using the superheaderborder style and you want the glossary to be in two columns but after the glossary you want to switch back to one column mode you could do Nrenewcommand Nglossarysectionj 2 Ntwocolumn Nchapter 42 setlength glsdescwidth 0 6 linewidth glsglossarymark glossarytoctitle renewcommand glossarypostamble onecolumn Within each glossary
141. glossaries myDoc latex myDoc Likewise an additional makeglossaries and TEX run may be required if the document pages shift with re runs For example if the page numbering is not reset after the table of contents the insertion of the table of contents on the second TEX run may push glossary entries across page boundaries which means that the number lists in the glossary may need updating The examples in this document assume that you are accessing makeglossaries xindy or makeindex via a terminal Windows users can use the MSDOS Prompt which is usually accessed via the Start All Programs menu or Start All Programs Accessories menu Alternatively your text editor may have the facility to create a func tion that will call the required application The article Glossaries Nomenclature List of Symbols and Acronyms in the BIEX Commu nity s Know How section describes how to do this for TeXnicCen ter and the thread Executing Glossaries makeindex from a WinEdt macro on the comp text tex newsgroup describes how to do it for WinEdt Section 1 1 Building Your Document of Using IATEX to Write a PhD Thesis describes how to do it for TeXWorks For other editors see the editor s user manual for further details If any problems occur remember to check the transcript files e g glg or alg for messages Table 1 3 Commands and package options that have no effect when using xindy or makeindex explicitly Comman
142. glossarystyle inline Note that you need to include glossary inline with usepackage as it s not automatically included by the glossaries package and then set the style using setglossarystyle Where you need to include your glossaries as a footnote you can o Q footnote printglossaries The inline style is governed by the following glsinlineseparator glsinlineseparator This defaults to and is used between main i e level 0 entries glsinlinesubseparator glsinlinesubseparator This defaults to and is used between sub entries glsinlineparentchildsepagdtsamlineparentchildseparator This defaults to and is used between a parent main entry and its first sub entry glspostinline glspostinline This defaults to and is used at the end of the glossary 15 2 Defining your own glossary style If the predefined styles don t fit your requirements you can define your own style using newglossarystyle newglossarystyle name definitions 198 theglossary glossaryheader glsgroupheading glsgetgrouptitle 15 Glossary Styles where name is the name of the new glossary style to be used in setglossarystyle The second argument definitions needs to redefine all of the following theglossary This environment defines how the main body of the glossary should be typeset Note that this does not include the section heading the glossary preamble defined
143. have been defined I then do glsunsetall main For more complex requirements you might find it easier to switch off all hyperlinks via glsdisablehyper and put the hyperlinks where required within the definition of glsentryfmt see Sec tion 6 3 via Ng1shyperlink see Section 9 Example 12 Only Hyperlink in Text Mode Not Math Mode This is a bit of a contrived example but suppose for some reason I only want the g1s like commands to have hyperlinks when used in text mode but not in math mode I can do this by adding the glossary to the list of nohypertypes and redefining glsentryfmt GlsDeclareNoHyperList main renewcommand glsentryfmt ifmmode glsgenentryfmt else glsifhyperon glsgenentryfmt hyperlink already on glshyperlink glsgenentryfmt glslabel VEI 119 6 Links to Glossary Entries Note that this doesn t affect the glstext like commands which will have the hyperlinks off unless they re forced on using the plus variant See the sample file sample nomathhyper tex for a complete document Example 13 One Hyper Link Per Entry Per Chapter Here s a more complicated example that will only have the hyper link on the first time an entry is used per chapter This doesn t in volve resetting the first use flag Instead it adds a new key using glsaddstoragekey see Section 4 5 that keeps track of the chap ter number that the entry was last used in glsaddstoragekey cha
144. he DVI format doesn t correctly size hyperlinks in subscripts or superscripts This means that if you define a term that may be used as a subscript or superscript if you use the DVI format it won t come out the correct size These are limitations of the DVI format not of the glossaries package It may be that you only want terms in certain glossaries to have hyperlinks but not for other glossaries In this case you can use the package option nohypertypes to identify the glossary lists that shouldn t have hyperlinked link text See Section 2 1 for further de tails The way the link text is displayed depends on glstext format text For example to make all link text appear in a sans serif font do renewcommands glstext format 1 textsf 1 Further customisation can be done via defglsentryfmt or by re defining glsentryfmt See Section 6 3 for further details Each entry has an associated conditional referred to as the first use flag Some of the commands described in this chapter automatically unset this flag and can also use it to determine what text should be displayed These types of commands are the gls like commands and are described in Section 6 1 The commands that don t reference or change the first use flag are glstext like commands and are described in Section 6 2 See Section 14 for commands that unset or reset the first use flag without referencing the entries The gls like and glstext like comman
145. he title specified when the glossary was defined toctitle This is the title to use for the table of contents if the toc pack age option has been used It may also be used for the page header depending on the page style If omitted the value of title is used style This specifies which glossary style to use for this glossary over riding the effect of the style package option or glossarystyle numberedsection This specifies whether to use a numbered section for this glossary overriding the effect of the numberedsection package option This key has the same syntax as the numbered section package option described in Section 2 2 nonumberlist This is a boolean key If true nonumberlist true the numberlist is suppressed for this glossary If false nonumberlist false the numberlist is displayed for this glossary nogroupskip This is a boolean key If true the vertical gap between groups is suppressed for this glossary nopostdot This is a boolean key If true the full stop after the descrip tion is suppressed for this glossary entrycounter This is a boolean key Behaves similar to the package option of the same name The corresponding package option must be used to make Ng1srefentry work correctly subentrycounter This is a boolean key Behaves similar to the pack age option of the same name If you want to set both en trycounter and subentrycounter make sure you specify entrycounter first The corresponding package
146. hose defined in glossary super but the multiline columns are left justified instead of fully justified Since these styles all use the supertabular environment they are governed by the same parameters as that environment The glossary superragged package additionally requires the array package Note that these styles will only be available if you explicitly load glossary superragged usepackage glossaries usepackage glossary superragged Note that you can t set these styles using the style package option since the styles aren t defined until after the glossaries package has been loaded superragged The superragged style uses the supertabular environment defined by the supertabular package It has two columns the 193 15 Glossary Styles first column contains the entry s name and the second column contains the left justified description followed by the number list The entry s symbol is ignored Sub groups are separated with a blank row The width of the first column is governed by the widest entry in that column The width of the second column is governed by the length glsdescwidth Child en tries have a similar format to the parent entries except that their name is suppressed superraggedborder The superraggedborder style is like superragged but has horizontal and vertical lines around it superraggedheader The superraggedheader style is like superragged but has a header row superraggedheaderborder The superragg
147. ible 2 07 translate notranslate acronym These options have to be set while the package is loading except for the xindy sub options which can be set using commands like GlsSetXdyLanguage see Section 11 for further details If you need to use this command use it as soon as possible after loading glossaries otherwise you might end up using it too late for the change to take effect For example if you try changing the acronym styles such as smallcaps after you have started defining your acronyms you are likely to get unexpected results If you try changing the sort option after you have started to define entries you may get unexpected results 72 makenoidxglossaries makeglossaries 3 Setting Up In the preamble you need to indicate whether you want to use Op tion 1 Option 2 or Option 3 It s not possible to mix these options within a document 3 1 Option 1 The command makenoidxglossaries must be placed in the preamble This sets up the internal commands required to make Option 1 work If you omit makenoidxglossaries none of the glossaries will be displayed 3 2 Options 2 and 3 The command makeglossaries must be placed in the preamble in order to create the customised makeindex ist or xindy xdy style file for Options 2 or 3 respectively and to ensure that glossary entries are written to the ap propriate output files If you omit makeglossaries none of the glossary files will be created
148. ides an additional letter group for entries starting with Mc or Mac If you use makeglossaries you don t need to supply any additional information If you don t use makeglossaries you will need to specify the required infor mation Note that if you set the style file to samplexdy mc xdy you must also specify noist otherwise the glossaries package will overwrite samp lexdy mc xdy and you will lose the Mc letter group To create the document do latex samplexdy makeglossaries samplexdy latex samplexdy If you don t have Perl installed you will have to call xindy explicitly instead of using makeglossaries If you are using the default style file samplexdy xdy then do no line breaks xindy L english C utf8 I xindy M samplexdy t samplexdy glg o samplexdy gls samplexdy glo otherwise if you are using samplexdy mc xdy then do no line breaks xindy I xindy M samplexdy mc t samplexdy glg o samplexdy gls samplexdy glo samplexdy2 tex This document illustrates how to use the glos saries package where the location numbers don t follow a stan dard format This example will only work with xindy To cre ate the document do pdflatex samplexdy2 makeglossaries samplexdy2 pdflatex samplexdy2 25 1 Introduction If you can t use makeglossaries then you need to do all on one line xindy L english C utf8 I xindy M samplexdy2 t samplexdy2 glg o sa
149. ily the same as the key used to set that field in the argument of newglossaryentry or the optional argument of newacronym You can change the value of a given field using one of the following commands Note that these commands only change the value of the given field They have no affect on any related field For example if you change the value of the text field it won t modify the value given by the name plural first or any other related key In all the four related commands below label and field are as above and definition is the new value of the field glsfielddef label field definition This uses def to change the value of the field so it will be localised by any grouping Nglsfieldedef label field definition 212 glsfieldgdef glsfieldxdef 16 Utilities This uses edef to change the value of the field so it will be localised by any grouping Any fragile commands contained in the definition must be protected Nglsfieldgdef label field definition This uses gdef to change the value of the field Nglsfieldxdef label field definition This uses xdef to change the value of the field Any fragile com mands contained in the definition must be protected 213 17 Prefixes or Determiners The glossaries prefix package provides additional keys that can be used as prefixes For example if you want to specify determiners such as
150. imited number of trusted applications which usu ally includes makeindex but may not include xindy So if you have the restricted mode on automake should work with makeindex but may not work with xindy However even in unrestricted mode this option may not work with xindy as xindy uses language names that don t always correspond with babe1 s language names The makeglossaries script applies mappings to assist you Note that you still need at least two IATEX runs to ensure the document is up to date with this setting Since this package option attempts to run the indexing appli cation on every BIEX run its use should be considered a last resort for those who can t work out how to incorporate the in dexing application into their document build The default value for this option is automake false 2 5 Acronym Options acronym This creates a new glossary with the label acronym This is equivalent to newglossary alg acronym acr acn acronymname It will also define printacronyms printacronyms options that s equivalent to printglossary type acronym options 65 DeclareAcronymList 2 Package Options unless that command is already defined before the beginning of the document or the package option compatible 3 07 is used If you are using Option 1 you need to use printnoidxglossary type acronym options to display the list of acronyms If the acronym package option is used acrony
151. ining arguments are analogous to those for glossentry described above glssubentryitem glssubentryitem label This macro will increment and display the associated counter for the level 1 entries if the subentrycounter package option has been used This macro is typically called by subglossentry before glstarget The format of the counter is controlled by the macro glssubentrycounterlabell glssubentrycounterlabel Note that printglossary which printglossaries calls sets currentglossary currentglossary to the current glossary label so it s possible to create a glossary style that varies according to the glossary type For further details of these commands see section 1 16 Displaying the glossary in the documented code g1ossaries code pdf Example 26 Creating a completely new style If you want a completely new style you will need to redefine all of the commands and the environment listed above For example suppose you want each entry to start with a bullet point This means that the glossary should be placed in the itemize environment so theglossary should start and end that environment Let s also suppose that you don t want anything between the glos sary groups so glsgroupheading and glsgroupskip should do nothing and suppose you don t want anything to appear immedi ately after begin theglossary so glossaryheader should do nothing In addition let s suppose the symbol should appear
152. ion hook mechanism Note that if you pass the language options directly to babel rather that using the docu ment class options or otherwise passing the same options to translator then translator won t pick up the language and no dictionaries will be loaded and babel s caption hooks will be used instead As from version 4 12 multilingual support is provided by sepa rate language modules that need to be installed in addition to in stalling the glossaries package You only need to install the modules for the languages that you require If the language module has an un maintained status you can volunteer to take over the maintenance by contacting me at http www dickimaw books com contact html The translator dictionary files for glossaries are now provided by the appropriate language module For further details about infor mation specific to a given language please see the documentation for that language module Examples of use e Using babel and translator documentclass english french article Nusepackage babel usepackage glossaries translator is automatically loaded Using babel documentclass english french article Nusepackage babel usepackage translate babel glossaries 31 Table 1 2 Customised Text Command Name glossaryname acronymname entryname descriptionname symbolname pagelistname 1 Introduction Translator Key Word Glossary Acronyms Notation glossarie
153. ions Genacrfullformat Genacrfullformat label insert nd ps Genplacrfullformat Genplacrfullformat label insert By default these perform a protected expansion on their no case change equivalents and then use makefirstuc to convert the first 115 6 Links to Glossary Entries character to upper case If there are issues caused by this expan sion you will need to redefine those commands to explicitly use com mands like Glsent rylong which is what the predefined acronym styles such as long short do Otherwise you only need to redefine genacrfullformat and genplacrfullformat to change the behaviour of glsgenacfmt See Section 13 for further details on changing the style of acronyms Note that glsentryfmt is not used by the glstext like commands As from version 4 16 both the gis like and glstext like com mands use glslinkpostsetkeys glslinkpostsetkeys after the options are set This macro does nothing by default but can be redefined For example to switch off the hyperlink under certain conditions This version also introduces glspostlinkhook glspostlinkhook which is done after the link text has been displayed and also after the first use flag has been unset see example 24 Example 8 Custom Entry Display in Text Suppose you want a glossary of measurements and units you can use the symbol key to store the unit newglossaryentry distance n
154. irst use to avoid nested links glshyperfirstfalse Putting this all together newacronymstyle custom fn new style name ifglshaslong glslabel glsgenacfmt glsgenentryfmt oe oe oe Nrenewcommand NGenericAcronymFields glshyperfirstfalse renewcommand genacrfullformat 2 firstacronymfont glsentryshort 1 2 footnote glsentrylong 1 glsentrydesc 1 Nrenewcommand Genacrfullformat 2 firstacronymfont Glsentryshort 1 2 footnote glsentrylong 1l glsentrydesc 1 166 13 Acronyms and Other Abbreviations Nrenewcommand genplacrfullformat 2 firstacronymfont glsentryshortpl 1 2 footnote glsentrylongpl 1 glsentrydesc 1 renewcommand renewcommand Genplacrfull firstacronymfont Glsentryshortpl footnote glsentrylongpl gl Format 2 a 1 2 gls 1 sentryfull glsentrylong 1 space acronymfont renewcommands NGL glsentryshort 1 sentryfull 1 Glsentrylong 1 space acronymfont renewcommands gl glsentrylongpl acronymfont Nrenewcommand G1 Glsentrylongpl acronymfont glsentryshort
155. ith the extension gls If you have access to a termi nal or a command prompt for example the MSDOS com mand prompt for Windows users or the bash console for Unix like users then you need to run the command makeindex s myDoc ist o myDoc gls myDoc glo Replace myDoc with the base name of your ATEX docu ment file Avoid spaces in the file name If you don t know how to use the command prompt then you can probably access nakeindex via your text editor but each editor has a different method of doing this so I can t give a general description You will have to check your editor s manual The default sort is word order sea lion comes before seal If you want letter ordering you need to add the 1 switch makeindex l s myDoc ist o myDoc gls myDoc glo See Section 1 4 4 for further details on using makeindex explicitly 5 Once you have successfully completed the previous step you can now run BIEX on your document again This is the default option although you still need to use makeglossaries to ensure the glossary files are created Option 3 This option uses a CLI application called xindy to sort the en tries This application is more flexible than makeindex and is able to sort extended Latin alphabets or non Latin alpha bets The xindy application comes with TEX Live but not with MiKTEgX Since xindy is a Perl script if you are using MiKTEX you will not only need to install xindy you will also need to instal
156. k that s called at the very end of the g1s like and glstext like com mands This can be redefined to check if the following character is a full stop The amsgen package which is automatically loaded by glossaries provides an internal command called new ifnextchar that can be used to determine if the given character appears next For more information see the amsgen documentation It s possible that I may also want acronyms or contractions in my document so I need some way to differentiate between them Here I m going to use the same method as in example 4 where a new field is defined to indicate the type of abbreviation glsaddstoragekey abbrtype word abbrtype newcommands newabbr 1 newacronym abbrtype initials 1 Now I just use newacronym for the acronyms for example newacronym laser laser light amplification by stimulated emission of radiation and my new command newabbr for initials for example newabbr eg e g exempli gratia newabbr ie i e id est newabbr bsc B Sc Bachelor of Science newabbr ba B A Bachelor of Arts newabbr agm A G M annual general meeting 171 13 Acronyms and Other Abbreviations Within glspostlinkhook the entry s label can be accessed us ing glslabel and ifglsfieldeq can be used to determine if the current entry has the new abbrtype field set to initials If it doesn t then nothing needs to happen but if it does a check is per formed to
157. l Perl In a similar way to Option 2 this option involves making TEX write the glossary information to a temporary file 13 1 Introduction which xindy reads Then xindy writes a new file containing the code to typeset the glossary TEX then reads this file in on the next run This is the best option if you want to sort according to a lan guage other than English or if you want non standard location lists 1 Add the xindy option to the glossaries package option list usepackage xindy glossaries 2 Add makeglossaries to your preamble before you start defining your entries as described in Section 4 3 Run TEX on your document This creates files with the ex tensions glo and xdy for example if your IATEX docu ment is called myDoc tex then you ll have two extra files called myDoc glo and myDoc xdy If you look at your document at this point you won t see the glossary as it hasn t been created yet 4 Run xindy with the glo file as the input file and the xdy file as a module so that it creates an output file with the extension gls You also need to set the language name and input encoding If you have access to a termi nal or a command prompt for example the MSDOS com mand prompt for Windows users or the bash console for Unix like users then you need to run the command all on one line xindy L english C utf8 I xindy M myDoc t myDoc glg o myDoc gls myDoc glo Replace myDoc with the base name of
158. l need to add this to the list of location attributes NGlsAddXdyAttribute hyperbsf counter This specifies which counter to use for this location This overrides the default counter used by this entry See also Sec tion 5 local This is a boolean key that only makes a difference when used with g1s like commands that change the entry s first use flag If local true the change to the first use flag will be localised to the current scope The default is local false 6 1 The gls Like Commands First Use Flag Queried This section describes the commands that unset the first use flag on completion and in most cases they use the current state of the flag to determine the text to be displayed As described above these commands all have a star variant hyper false and a plus variant hyper true and have an optional first argument that is a key value list These commands use glsentryfmt or the equivalent definition provided by defglsentryfmt to determine the automatically gen erated text and its format see Section 6 3 Apart from glsdisp the commands described in this section also have a final optional argument insert which may be used to insert material into the automatically generated text Since the commands have a final optional argument take care if you actually want to display an open square bracket after the command when the final optional argument is absent Insert an empty set of braces immediately bef
159. label is ap ple in the control sequence tmp glsletentryfield tmp apple desc Nglossentrysymbol label This is like glsentrysymbo1 label but also checks for the exis tence of label This command is not expandable It s used in some of the predefined glossary styles to display the symbol 130 9 Using Glossary Terms Without Links Glossentrysymbol Glossentrysymbol label This is like glossentrysymbol but converts the first letter to up per case This command is not expandable glsentrysymbolplural glsentrysymbolplural label Glsentrysymbolplural Glsentrysymbolplural label These commands display the plural symbol for the glossary entry given by label Glsentrysymbolplural makes the first letter upper case The first form is expandable unless the value of that key contains unexpandable commands The second form is not expand able Neither checks for the existence of label glsentryuseri glsentryuseri label Glsentryuseri Glsentryuseri label glsentryuserii glsentryuserii label Glsentryuserii Glsentryuserii abel glsentryuseriii glsentryuseriii label Glsentryuseriii Glsentryuseriii label glsentryuseriv glsentryuseriv label Glsentryuseriv Glsentryuseriv label glsentryuserv glsentryuserv label 131 9 Using Glossary Terms Without Links Glsentryuserv Glsentryu
160. le is like longragged but has a header row longraggedheaderborder The longraggedheaderborder style is like lon graggedheader but has horizontal and vertical lines around it 190 15 Glossary Styles longragged3col The longragged3col style is like longragged but has three columns The first column contains the entry s name the sec ond column contains the left justified description and the third column contains the left justified number list The entry s sym bol is ignored The width of the first column is governed by the widest entry in that column the width of the second column is governed by the length Ng1sdescwidth and the width of the third column is governed by the length glspagelistwidth longragged3colborder The longragged3colborder style is like the lon gragged3col style but has horizontal and vertical lines around it longragged3colheader The longragged3colheader style is like longragged3col but has a header row longragged3colheaderborder The longragged3colheaderborder style is like longragged3colheader but has horizontal and vertical lines around it altlongragged4col The altlongragged4col style is like longragged3col but has an additional column in which the entry s associated sym bol appears The width of the description column is governed by the length glsdescwidth and the width of the page list column is governed by the length glspagelistwidth The widths of the name and symbol columns are governed by
161. le quotes For example if your document is called myDoc tex and you are using UTF8 encoding in English then type the following in your ter minal xindy L english C utf8 I xindy M myDoc t myDoc glg o myDoc gls myDoc glo Note that this just creates the main glossary You need to do the same for each of the other glossaries including the list of acronyms if you have used the acronym package option substituting glg gls and glo with the relevant extensions For example if you have used the acronym package option then you would need to do Shttp www stackexchange com 44 1 Introduction xindy L english C utf8 I xindy M myDoc t myDoc alg o myDoc acr myDoc acn For additional glossaries the extensions are those supplied when you created the glossary with newglossary Note that if you use makeglossaries instead you can replace all those calls to xindy with just one call to makeglossaries makeglossaries myDoc Note also that some commands and package options have no effect if you use xindy explicitly instead of using makeglossaries These are listed in table 1 3 1 4 4 Using makeindex explicitly Option 2 If you want to use makeindex explicitly you must make sure that you haven t used the xindy package option or the glossary entries will be written in the wrong format To run makeindex type the follow ing in your terminal makeindex s style ist t base glg o base gls base glo where b
162. lenum that is imple mented as follows newcommands Nsamplenum 1 expandafter samplenum csname c 1 endcsname newcommand samplenum 1 two digits 1 That is it displays the value of the counter as a two digit number Then to ensure the location is correct for entries in page spanning paragraphs you need to do glsaddprotectedpagefmt samplenum If you are using a different counter for the location such as sect ion or equation you don t need to worry about this If the inner macro as given by internal cs name contains non expandable commands then you may need to redefine g1s internal cs name page after using Ng1saddprotectedpagefmt internal cs 98 5 Number lists name This command doesn t take any arguments as the location is assumed to be given by c page For example suppose now my page counter format uses small caps Roman numerals newcommands Nsamplenum 1 expandafter samplenum csname c 1 endcsname newcommands samplenum 1 textsc romannumeral 1 Again the inner macro needs to be identified using glsaddprotectedpagefmt samplenum However since t ext sc isn t fully expandable the location is writ ten to the file as textsc i for page 1 Ntextsc ii for page 2 etc This format may cause a problem for the indexing ap plication particularly for makeindex To compensate for this the Ngls internal cs name page command may
163. less explicitly suppressed us ing starred versions of commands such as gls or by iden tifying the glossary with nohypertypes described above Note that nohypertypes overrides hyperfirst true This option only affects commands that check the first use flag such as the gls like commands for example gls or glsdisp but 51 2 Package Options not the glstext like commands for example glslink or glstext The hyperfirst setting applies to all glossary types unless identi fied by nohypertypes or defined with newignoredglossary It can be overridden on an individual basis by explicitly setting the hyper key when referencing an entry or by using the plus or starred version of the referencing command It may be that you only want to apply this to just the acronyms where the first use explains the meaning of the acronym but not for ordinary glossary entries where the first use is identical to subsequent uses In this case you can use hyperfirst false and apply glsunsetall to all the regular non acronym glos saries For example usepackage acronym hyperfirst false glossaries acronym and glossary entry definitions 9 at the end of the preamble glsunsetall main Alternatively you can redefine the hook glslinkcheckfirsthyperhook glslinkcheckfirsthyperhook which is used by the commands that check the first use flag such as gls Within the definition of this command you can use glslabel t
164. like altlist but the glossary groups have headings altlisthypergroup The altlisthypergroup style is like altlistgroup but has a set of links to the glossary groups The navigation line is the same as that for listhypergroup described above listdotted This style uses the description environment Each entry starts with item followed by the name followed by a dot ted line followed by the description Note that this style ignores both the number list and the symbol The length glslistdottedwidth governs where the description should start This is a flat style so child entries are formatted in the same way as the parent entries sublistdotted This is a variation on the listdotted style designed for hi erarchical glossaries The main entries have just the name dis played The sub entries are displayed in the same manner as listdotted 15 1 2 Longtable Styles The styles described in this section are all defined in the package glossary long Since they all use the longtable environment they are governed by the same parameters as that environment Note that these styles will automatically be available unless you use the nolong or nostyles package options These styles fully justify the description and page list columns If you want ragged right formatting instead use the analogous styles described in Section 15 1 3 long The long style uses the longtable environment defined by the longtable package It has two columns the fir
165. link to the relevant pages I need to redefine the necessary g1sx counter X format commands renewcommand glsXpageXglsnumberformat 2 linkpagenumber 2 renewcommand glsXpageXhyperbfit 2 textbf em linkpagenumber 2 newcommand linkpagenumber 3 hyperlink page 3 1 2 3 In the number list the locations are sorted according to type The default ordering is roman page numbers e g i arabic page numbers e g 1 arabic section numbers e g 1 1 if the compositor is a full stop or 1 1 if the compositor is a hyphen a1pha page numbers e g a Roman page numbers e g I ALpha page numbers e g A Appendix page numbers e g A 1 if the Alpha compositor is a full stop or A 1 if the Alpha compositor is a hyphen user defined location names as specified by G1sAddXdyLocation in the order in which they were defined see cross referenced entries This or dering can be changed using GlsSetXdyLocationClassOrder 1s5ee setCompositor described in Section 3 2see NsetAlphaCompositor described in Section 3 144 11 Xindy Option 3 GlsSetXdyLocationClassOrder location names where each location name is delimited by double quote marks and separated by white space For example GlsSetXdyLoca arabic page numbers arabic section numbers roman page Roman page a tionClassOrder lpha page A lpha page numbers numbers numbers n
166. lities FALSE This will produce TRUE in both cases since expansion is on so foo was expanded to FOO when sample2 was defined If the tests are changed to ifgl sfiel ifgl sfiel deq samp deq samp lel useri foo le2 useri foo RU E FALS I eS RU E FALS I jb then this will produce FALSE in both cases Now suppose expan sion is switched off for the user1 key documentclass article usepackage glossaries newcommands foo FOO glssetnoexpa newg userl newg userl begi ifgl lossarye FOO lossarye foo n document sfiel ifgl sfiel end deq samp deq samp document ntry sampl ntry sampl ndfield useri Le1 name samp le2 name samp lel useri FOO TRUE FALSE le2 useri FOO TRUE FALSE lel description an example le2 description an example Fs This now produces TRUE for the first case comparing FOO with FOO and FALSE for the second case comparing foo with FOO The reverse happens in the following documentclass article usepackage glossaries newcommands foo FOO glssetnoexpandfield useri newg lossaryentry samp userl FOO newg lossaryentry samp userl foo
167. lo sa She Eae Ree a 216 Adding Determiner to Glossary Style 218 List of Tables 11 1 2 1 9 4 1 6 1 13 1 13 2 15 1 15 2 Glossary Options Pros and Cons 16 Customised IBN ud eh ss a dx EROR Re e Be 32 Commands and package options that have no effect when using xindy or makeindex explicitly 41 Key to Field Mappings 2 2 x x33 90 Predefined Hyperlinked Location Formats 105 Synonyms provided by the package option shortcuts 154 The effect Of Using NSDAO 2 2929 x Sey XH 175 Glossary Styles ee se ox meg HEED OREO 185 Multicolumn Styles uus dee ERG wee ew 197 Glossary This glossary style was setup using Nusepackage xindy nonumberlist toc nopostdot style altlist nogroupskip glossaries Command Line Interface CLI An application that doesn t have a graphical user interface That is an application that doesn t have any windows buttons or menus and can be run in a command prompt or terminal Entry location The location of the entry in the document This defaults to the page number on which the entry appears An entry may have multiple locations Extended Latin Alphabet An alphabet consisting of Latin characters and extended Latin characters Extended Latin Character A character that s created by combining Latin characters to form ligatures e g a or by applying diacritical marks to a Latin character or characters e g or S
168. ls Whilst it is strongly recommended that you use the makeglossaries Perl script or themakeglossaries lite luascriptorthemakeglossariesgui Java application it is possible to use the glossaries package without using those applications However note that some commands and package options have no effect if you explicitly run makeindex xindy These are listed in table 1 3 If you are choosing not to use makeglossaries because you don t want to install Perl you will only be able to use make index as xindy also requires Perl Note that if any of your entries use an entry that is not ref erenced outside the glossary you will need to do an additional makeglossaries makeindex or xindy run as appropriate For example suppose you have defined the following entries newglossaryentry citrusfruit name citrus fruit description fruit of any citrus tree See also gls orange newglossaryentry orange name orange description an orange coloured fruit and suppose you have gls citrusfruit in your document but don t reference the orange entry then the orange entry won t ap pear in your glossary until you first create the glossary and then do another run of makeglossaries makeindex or xindy For exam ple if the document is called myDoc tex then you must do latex myDoc 3 As from v3 01 gls is no longer fragile and doesn t need protecting 40 1 Introduction makeglossaries myDoc latex myDoc make
169. ls with hyperlinks much better If you use the DVI format you will encounter problems where you have long hyperlinks or hyperlinks in subscripts or superscripts This is an issue with the DVI format not with glossaries Other documents that describe using the glossaries package include Using LaTeX to Write a PhD Thesis and Glossaries Nomenclature Lists of Symbols and Acronyms Contents Glossary 1 Introduction 1 1 1 2 1 9 1 4 Sample Documents lt oo oa oe Gee a see Roe OE s Dummy Entries for Testing ovd o 99 Multi Lingual Support cc oor e 1 3 1 Changing the Fixed Names 2 22s Generating the Associated Glossary Files 143 Using the makeglossaries Perl Script 1 4 2 Using the makeglossaries lite lua Lua Script 143 Using xindy explicitly Option3 1 4 4 Using makeindex explicitly Option 2 1 4 5 Note to Front End and Script Developers Package Options 2 1 22 25 24 25 2 6 2 7 General LODS o s s c eo ede on Ree d Sectioning Headings and TOC Options Glossary Appearance Options Sorring UPUONS ces ou doe Roc PA CI es Acronym OPOS i e oar rec o REOR CE RO 25 1 Deprecated Acronym Style Options Cees eek Ke RESTS REESE d Setting Options After the Package is Loaded Setting Up 34 33 0 PPP C Options SAN fade uan redeo Rt RUE RIA Re Defining Glossary Entries 4 1 4 2 4 3 44 4 5 4 6 4 7 Plural i
170. lsentryfullpl setacronymstyle acronymentry acronymsort Glsentryfullp1 label These again use acrfullformat by default but the format may be redefined by the acronym style 13 1 Changing the Acronym Style It may be that the default style doesn t suit your requirements in which case you can switch to another styles using setacronymstyle style name where style name is the name of the required style You must use setacronymstyle before you define the acronyms with newacronym If you have multiple glossaries representing lists of acronyms you must use Nsetacronymstyle after using NDeclareAcronymList Note that unlike the default behaviour of newacronym the styles used via setacronymstyle don t use the first or text keys but in stead they use defglsentryfmt to set a custom format that uses the long and short keys or their plural equivalents This means that these styles cope better with plurals that aren t formed by simply ap pending the singular form with the letter s In fact most of the predefined styles use glsgenacfmt and modify the definitions of commands like genacrfullformat Note that when you use setacronymstyle the name key is set to Nacronymentry label and the sort key is set to acronymsort short long These commands are redefined by the acronym styles However you can redefine them again after the style has been set but be fore you use newacronym
171. lsexpandfields and glsnoexpandfields If your entries contain any fragile commands I recommend you 90 4 Defining Glossary Entries switch off expansion via glsnoexpandfields This should be used before you define the entries 4 7 Sub Entries As from version 1 17 it is possible to specify sub entries These may be used to order the glossary into categories in which case the sub entry will have a different name to its parent entry or it may be used to distinguish different definitions for the same word in which case the sub entries will have the same name as the parent entry Note that not all glossary styles support hierarchical entries and may display all the entries in a flat format Of the styles that support sub entries some display the sub entry s name whilst others don t Therefore you need to ensure that you use a suitable style See Section 15 for a list of predefined styles As from version 3 0 level 1 sub entries are au tomatically numbered in the predefined styles if you use the suben trycounter package option see Section 2 3 for further details Note that the parent entry will automatically be added to the glos sary if any of its child entries are used in the document If the parent entry is not referenced in the document it will not have a number list Note also that makeindex has a restriction on the maximum sub entry depth 4 7 1 Hierarchical Categories To arrange a glossary with hierarchic
172. ly you don t have Perl installed In which case you will need to use makeindex directly You can do this in a terminal by typing all on one line makeindex s minimalgls ist t minimalgls glg o minimalgls gls minimalgls glo See Section 1 4 4 for further details on using makeindex explicitly Note that if you need to specify the full path and the path contains spaces you will need to delimit the file names with the double quote character 3 Run minimalgls tex through IATEX again as step 1 You should now have a complete document The number fol lowing each entry in the glossary is the location number By de fault this is the page number where the entry was referenced There are three other files that can be used as a minimal working example mwe gls tex mwe acr texandmwe acr desc tex sample noidx tex This document illustrates how to use the glos saries package without an external indexing application Op tion 1 To create the complete document you need to do latex sample noidx latex sample noidx sample noidx utf8 tex As the previous example except that it uses the inputenc package To create the complete document you need to do 18 1 Introduction latex sample noidx utf8 latex sample noidx utf8 sample4col tex This document illustrates a four column glossary where the entries have a symbol in addition to the name and description To create the complete document y
173. mberlistloop 5 Number lists Both makeindex and xindy Options 2 and 3 concatenate a se quence of 3 or more consecutive pages into a range With xindy Op tion 3 you can vary the minimum sequence length using GlsSetXdyMinRangeLength n where n is either an integer or the keyword none which indicates that there should be no range formation Note that GlsSetXdyMinRangeLength must be used before makeglossaries and has no effect if noist is used With both makeindex and xindy Options 2 and 3 you can re place the separator and the closing number in the range using glsSetSuffixF suffix glsSetSuffixFF suffix where the former command specifies the suffix to use for a 2 page list and the latter specifies the suffix to use for longer lists For example glsSetSuffixF f glsSetSuffixFF ff Note that if you use xindy Option 3 you will also need to set the minimum range length to 1 if you want to change these suffixes GlsSetXdyMinRangeLength 1 Note that if you use the hyperref package you will need to use nohyperpage in the suffix to ensure that the hyperlinks work cor rectly For example glsSetSuffixF nohyperpage f glsSetSuffixFF nohyperpage ff Note that glsSetSuffixF and glsSetSuffixFF must be used before makeglossaries and have no effect if noist is used Option 1 doesn t form ranges However with this option you can iterate over an entry
174. mplexdy2 gls samplexdy2 glo See Section 11 2 for further details sampleutf8 tex This is another example that uses x indy Unlike makeindex xindy can cope with non Latin characters This document uses UTF8 encoding To create the document do latex sampleutf8 makeglossaries sampleutf8 latex sampleutf8 If you don t have Perl installed you will have to call xindy explicitly instead of using makeglossaries no line breaks xindy L english C utf8 I xindy M sampleutf8 t sampleutf8 glg o sampleutf8 gls sampleutf8 glo If you remove the xindy option from sampleutf8 tex and do latex sampleutf8 makeglossaries sampleutf8 latex sampleutf8 you will see that the entries that start with an extended Latin character now appear in the symbols group and the word manceuvre is now after manor instead of before it If you are unable to use makeglossaries the call to makeindex is as follows no line breaks makeindex s sampleutf8 ist t sampleutf8 glg o sampleutf8 gls sampleutf8 glo 26 1 Introduction sample index tex This document uses the glossaries package to create both a glossary and an index This requires two makeglossaries calls to ensure the document is up to date latex sample index makeglossaries sample index latex sample index a makeglossaries sample index latex sample index sample newkeys tex This document illustrates how add c
175. mtype is set to acronym otherwise it is set to main Entries that are defined using newacronym are placed in the glossary whose label is given by acronymtype unless another glossary is explicitly specified Remember to use the nomain package option if you re only interested in using this acronym glossary That is you don t intend to use the main glossary acronyms This is equivalent to acronym true and may be used in the document class option list acronymlists By default only the acronymt ype glossary is consid ered to be a list of acronyms If you have other lists of acronyms you can specify them as a comma separated list in the value of acronymlists For example if you use the acronym package op tion but you also want the main glossary to also contain a list of acronyms you can do usepackage acronym acronymlists main glossaries No check is performed to determine if the listed glossaries exist so you can add glossaries you haven t defined yet For example Nusepackage acronym acronymlists main acronym2 glossaries newglossary alg2 acronym2 acr2 acn2 Statistical Acronyms You can use DeclareAcronymList list 4 Actually it sets acronymt ype to glsdefaulttype if the acronym package op tion is not used but glsdefaulttype usually has the value main unless the nomain option has been used 66 SetAcronymLists glsIfListOfAcronyms DefineAcronymShortcuts
176. n nogroupskip to suppress the gap between groups for the default styles instead of redefining gl sgroupskip All the styles except for the three and four column styles and the listdotted style use the command glspostdescription after the description This simply displays a full stop by default To eliminate this full stop or replace it with something else say a comma you will need to redefine glspostdescription before the glossary is displayed Alternatively you can suppress it for a given entry by placing nopostdesc in the entry s description lThese lengths will not be available if you use both the nolong and nosuper package options or if you use the nostyles package option unless you explicitly load the relevant package 186 glshypernavsep 15 Glossary Styles As from version 3 03 you can now use the package option nopostdot to suppress this full stop 15 1 1 List Styles The styles described in this section are all defined in the package glossary list Since they all use the description environment they are governed by the same parameters as that environment These styles all ignore the entry s symbol Note that these styles will automatically be available unless you use the nolist or nostyles package options list The list style uses the description environment The entry name is placed in the optional argument of the item command so it will usually appear in bold by default The description follows and
177. n t been defined For example the list style defines glossentry as follows Nrenewcommand glossentry 2 item glsentryitem 1 glstarget 1 glossentryname 1 glossentrydesc 1 glspostdescription space 2 Note also that number list will always be of the form glossaryentrynumbers relax setentrycounter Hprefix t counter name format cmd number s where number s may contain NdelimN to delimit individual num bers and or delimR to indicate a range of numbers There may be multiple occurrences of setentrycounter Hprefix counter name format cmd number s but note that the entire number list is enclosed within the argument of glossaryentrynumbers The user can redefine this to change the way the entire number list is formatted regardless of the glossary style However the most common use of glossaryentrynumbers is to provide a means of suppressing the number list altogether In fact the nonumberlist option redefines glossaryentrynumbers to ignore its argument Therefore when you define a new glossary style you don t need to worry about whether the user has specified the nonumberlist package option subglossentry level label number list This is used to display sub entries The first argument level indi 201 15 Glossary Styles cates the sub entry level This must be an integer from 1 first sub level onwards The rema
178. need to load a particular package xindy A flexible indexing application with multilingual support writ ten in Perl 10 1 Introduction The glossaries package is provided to assist generating lists of terms symbols or abbreviations glossaries It has a certain amount of flex ibility allowing the user to customize the format of the glossary and define multiple glossaries It also supports glossary styles that in clude symbols in addition to a name and description for glossary entries There is provision for loading a database of glossary terms Only those terms used in the document will be added to the glossary This package replaces the glossary package which is now obso lete Please see the document Upgrading from the glossary package to the glossaries package glossary2glossaries pdf for assistance in upgrading One of the strengths of this package is its flexibility however the drawback of this is the necessity of having a large manual that covers all the various settings If you are daunted by the size of the manual try starting off with the much shorter guide for beginners glossaries begin pdf There s a common misconception that you have to have Perl installed in order to use the glossaries package Perl is not a requirement but it does increase the available options particularly if you use an extended Latin alphabet or a non Latin alphabet The basic idea behind the glossaries package is that you first
179. nopostdot 135 numberedsection 135 style 59 135 184 186 subentrycounter 135 tile cms 135 150 toctile l l 135 lyD 252 R 135 Nprintindex easi ce 71 printnoidxglossaries CCP RP 134 173 printnoidxglossary Bren ea rcd eer 60 61 63 66 70 71 134 173 184 186 231 printnoidxglossary op tions sort 60 61 63 136 printnumbers 70 printsymbols 70 provideglossaryentry PE 75 95 R relsize package 68 157 ROMAN eetbaar eti Saas 143 S sanitize 10 49 61 126 132 scrwfile package 50 XSectioh 24e 57 136 seename 124 125 SetAcronymLists 67 Nsetacronymstyle EE 67 107 151 156 161 setAlphaCompositor 144 setCompositor 144 setentrycounter 201 setglossarypreamble 58 136 setglossarysection 54 136 setglossarystyle 59 184 186 197 198 203 setStyleFile 44 45 74 setupglossaries 72 standard IATgX extended Latin character 10 80 subglossentry 201 supertabular environment Ak RE te aa ee 191 193 Index supertabular package 59 192 193 symbolname 32 T tabular environment 178 Ntexorpdfstring 102 Ntextbf oosikeucu uuu 104 textcase package B5 NESXEZ H usse km ERR 14 textse 45 157 162 163 165 textsmaller 68 157 NG
180. nslation Numbers glossaries Numbers 34 1 Introduction You can use this as a template for your dictionary file Change English to the translator name for your language so that it matches the file name glossaries dictionary Lang dict and for each providetranslation change the second argument to the appropriate translation Here s an example of glossaries english ldf ProvidesGlossariesLang english glsifusedtranslatordict English addglossarytocaptions CurrentTrackedLanguage addglossarytocaptions CurrentTrackedDialect tpn Sese oe ifpackageloaded polyglossia newcommands glossariescaptionsenglish renewcom renewco renewco renewco renewco renewco m m m renewcom m m m renewco oe oe oe PS m m m m m m m m a a a a a a a a nd glossaryname textenglish Glossary ndx acronymname textenglish Acronyms nd entryname textenglish Notation nd descriptionname textenglish Description nd symbolname textenglish Symbol nd pagelistname textenglish Page List ndx glssymbolsgroupname textenglish Symbols nd x glsnumbersgroupname textenglish Numbers newcommands glossariescaptionsenglish renewcom renewcom renewcom renewcom renewcom renewcom renewcom renewcom oe m m
181. nteract the effects of textsc and glsacrpluralsuffix for other acronym styles These commands need to be set before the entry is defined and so the definitions aren t included in the caption mechanism as that s not switched on until the start of the document This means that the suffix in effect will be for the last loaded language If you want to add a regional variation create a file called glossaries iso lang iso country 1 where iso lang is the ISO language code and iso country is the ISO country code For example g1ossaries en GB ldf This file can load the root language file and make the appropriate changes for example ProvidesGlossariesLang en GB RequireGlossariesLang english glsifusedtranslatordict British addglossarytocaptions CurrentTrackedLanguage addglossarytocaptions CurrentTrackedDialect oe ifpackageloaded polyglossia Modify glossariescaptionsenglish as appropriate for 36 1 Introduction polyglossia 9 KJ 9 5 non polyglossia oe If the translations includes non Latin characters it s necessary to provide code that s independent of the input encoding Remember that while some users may use UTF 8 others may use Latin 1 or any other supported encoding but while users won t appreciate you en forcing your preference on them it s useful to provide a UTF 8 ver sion for XJATEX users The glos
182. ntglossary type index options If you use Option 1 you need to use printnoidxglossary type index options to display this glossary Remember to use the nomain package option if you re only interested in using this index glossary and don t intend to use the main glossary Note that you can t mix this option with index Either use glossaries for the indexing or use a custom indexing package such as makeidx index or imakeidx You can of course load one of those packages and load glossaries without the index package option Since the index isn t designed for terms with descriptions you might also want to disable the hyperlinks for this glossary using the package option nohypertypes index or the command GlsDeclareNoHyperList index 71 setupglossaries 2 Package Options The example file sampl1e index tex illustrates the use of the index package option compatible 2 07 Compatibility mode for old documents created using version 2 07 or below compatible 3 07 Compatibility mode for old documents created using version 3 07 or below 2 7 Setting Options After the Package is Loaded Some of the options described above may also be set after the glos saries package has been loaded using setupglossaries key val list The following package options can t be used in setupglossaries xindy xindygloss xindynoglsnumbers makeindex nolong nosuper nolist notree nostyles nomain compat
183. ntry If it does true part is performed otherwise false part ifglshassymbol label true part false part This checks if the glossary entry given by label has had the symbol field set If it has true part is performed otherwise false part ifglshaslong label true part false part This checks if the glossary entry given by label has had the long field set If it has true part is performed otherwise false part This should be true for any entry that has been defined via newacronym There is no check for the existence of label ifglshasshort label true part false part This checks if the glossary entry given by label has had the short field set If it has true part is performed otherwise false part This should be true for any entry that has been defined via newacronym There is no check for the existence of label 208 ifglshasdesc ifglsdescsuppressed ifglsfieldeq 16 Utilities ifglshasdesc label true part false part This checks if the description field is non empty for the entry given by label If it has true part is performed otherwise false part Compare with ifglsdescsuppressed label true part false part This checks if the description field has been set to just nopostdesc for the entry given by label If it has true part is performed other wise false part Ther
184. nym oth erwise it will use glsgenacfmt The third argument definitions of Nnewacronymstyle needs to redefine genacrfullformat etc so that the first use displays the short form in the text with the long form in a footnote followed by the description This is done as follows remember to use instead of 9 No case change singular first use Nrenewcommand genacrfullformat 2 firstacronymfont glsentryshort 1 2 footnote glsentrylong 1l glsentrydesc 1 First letter upper case singular first use Nrenewcommand Genacrfullformat 2 firstacronymfont Glsentryshort 1 2 footnote glsentrylong 1 glsentrydesc 1 No case change plural first use Nrenewcommand genplacrfullformat 2 firstacronymfont glsentryshortpl 1 2 footnote glsentrylongpl 1 glsentrydesc 1 First letter upper case plural first use renewcommand Genplacrfullformat 2 firstacronymfont Glsentryshortpl 1 2 footnote glsentrylongpl 1 glsentrydesc 1 163 13 Acronyms and Other Abbreviations If you think it inappropriate for the short form to be capitalised at the start of a sentence you can change the above to No case change singular first use Nrenewcommand genacrfullformat 2 firstacro
185. nymfont glsentryshort 1 2 footnote glsentrylong glsentrydesc 1 No case change plural first use Nrenewcommand genplacrfullformat 2 firstacronymfont glsentryshortpl 1 2 footnote glsentrylongpl 1 glsentrydesc 1 let Genacrfullformat genacrfullformat let Genplacrfullformat genplacrfullformat Another variation is to use Glsentrylongand Glsentrylongpl in the footnote instead of glsentrylong and glsentrylongpl Now let s suppose that commands such as glsentryfull and acrfull shouldn t use a footnote but instead use the format long short This means that the style needs to redefine glsentryfull acrfullfmt and their plural and upper case variants First the non linking commands renewcommandx gl glsentrylong acronymfont renewcommands G1 Glsentrylong acronymfont renewcommands gl glsentrylongpl acronymfont Nrenewcommand G1 Glsentrylongpl acronymfont oe sentryfull 1 1 space glsentryshort 1 sentryfull 1 1 space glsentryshort 1 ol sentryfullpl 1 1 space glsentryshortpl 1 oe sentryfullpl 1 1 space glsentryshortpl 1 Now for the linking commands renewcommands acrfullfmt 3 glslink 1
186. o reference the entry label and glstype to reference the glossary type You can also use ifglsused to determine if the entry has been used You can test if an en try is an acronym by checking if it has the long key set using ifglshaslong For example to switch off the hyperlink on first use just for acronyms Nrenewcommand Nglslinkcheckfirsthyperhook ifglsused glslabel ifglshaslong glslabel setkeys glslink hyper false oe Note that this hook isn t used by the commands that don t check the first use flag such as gl stext You can instead redefine glslinkpostsetkeys which is used by both the gls like and glstext like commands 52 glswriteentry 2 Package Options indexonlyfirst This is a boolean option that specifies whether to only add information to the external glossary file on first use The default is indexonlyfirst false which will add a line to the file ev ery time one of the gls like or glstext like commands are used Note that g1sadd will always add information to the ex ternal glossary file since that s the purpose of that command You can customise this by redefining glswriteentry label wr code where label is the entry s label and wr code is the code that writes the entry s information to the external file The default definition of glswriteentry is newcommands glswriteentry 2 ifglsindexonlyfirst ifglsused 1 2 el
187. o to make a table of contents appear For example click twice on the typeset or build or PDFIATEX button in your editor Option 2 This option uses a command line interface CLI application called makeindex to sort the entries This application comes with all modern TEX distributions but it s hard coded for the non extended Latin alphabet so it doesn t work well for ex tended Latin alphabets or non Latin alphabets This process involves making IATEX write the glossary information to a tem porary file which makeindex reads Then makeindex writes a new file containing the code to typeset the glossary IATEX then reads this file in on the next run This option works best if you want to sort entries according to the English alphabet and you don t want to install Perl 1 Add makeglossaries to your preamble before you start defining your entries as described in Section 4 2 Put printglossary 12 1 Introduction where you want your list of entries to appear described in Section 10 3 Run TEX on your document This creates files with the ex tensions glo and ist for example if your BIFX docu ment is called myDoc tex then you ll have two extra files called myDoc glo and myDoc ist If you look at your document at this point you won t see the glossary as it hasn t been created yet 4 Run makeindex with the glo file as the input file and the ist file as the style so that it creates an output file w
188. oe a 1 169 13 Acronyms and Other Abbreviations entryfont 1 glsentryshortpl 1 renewcommands Genplacrfullformat 2 Glsentrylongpl l 2 space entryfont 1 glsentryshortpl 1 renewcommands acronymfont 1 entryfont glslabel 1 renewcommands acronymentry 1 entryfont 1 glsentryshort 1 Remember the style needs to be set before defining the entries setacronymstyle long font short The complete document is contained in the sample file sample font abbr tex Some writers and publishing houses have started to drop full stops periods from upper case initials but may still retain them for lower case abbreviations while others may still use them for both upper and lower case This can cause complications Chapter 12 of The TEXbook discusses the spacing between words but briefly the default behaviour of TEX is to assume that an upper case character followed by a full stop and space is an abbreviation so the space is the default inter word space whereas a lower case character followed by a full stop and space is a word occurring at the end of a sentence In the event that this isn t true you need to make a manual adjustment us ing back slash space in place of just a space character for an inter word mid sentence space and use before the full stop to indicat
189. om the longplural or shortplural keys 107 glsdisp glslink 6 Links to Glossary Entries Be careful when you use glossary entries in math mode especially if you are using hyperref as it can affect the spacing of subscripts and superscripts For example suppose you have defined the following entry newglossaryentry Falpha name F_ alpha description sample and later you use it in math mode gls Falpha 2 This will result in F instead of F2 In this situation it s best to bring the superscript into the hyperlink using the final insert optional argument gls Falpha 2 glsdisp options label link text This behaves in the same way as the above commands except that the link text is explicitly set There s no final optional argument as any inserted material can be added to the link text argument Don t use any of the g1s like or glstext like commands in the link text argument of glsdisp 6 2 The glstext Like Commands First Use Flag Not Queried This section describes the commands that don t change or reference the first use flag As described above these commands all have a star variant hyper false and a plus variant hyper true and have an optional first argument that is a key value list These commands also don t use glsentryfmt or the equivalent defini tion provided by defglsentryfmt see Section 6 3 Apart from glslink the commands described in
190. onment 202 J JODHAEME esses m ee 74 L NUES ce bd ee dee 56 latex ose v oos 2 103 d texmk cusa d 39 Latinalphabet 9 12 30 Latincharacter 8 9 9 10 147 link text 9 102 103 107 109 113 116 152 153 215 loadglsentries 29 93 151 location list see number list longnewglossaryentry swadexwba qeu 75 83 93 97 longprovideglossaryentry tee AER wn vage ds 75 longtable environment 137 188 190 191 204 longtable package 58 188 M makeatletter 172 makeatother 172 makefirstuc 55 107 115 makeglossaries 9 9 15 15 I9 21 23 27 30 38 46 49 57 63 65 123 132 134 140 141 147 makeglossaries 39 48 73 80 100 102 123 134 141 142 145 146 149 makeglossaries lite lua 9 40 43 makeglossariesgui 9 40 44 makeidx package 71 makeindex 9 9 12 13 15 18 19 21 23 24 26 30 34 38 43 45 47 50 57 61 64 65 73 91 99 100 102 104 105 125 133 134 147 185 195 199 Index makenoidxglossaries T 73 123 134 MakeTextUppercase 55 markboth s s 55 memoir class 55 memUChead 55 mfirstuc package 2 30 80 107 127 mfirstucMakeUppercase 55 multicol package 196 multicols environment Tm 196 197 mwe package 29 N nameref package 57 newacronym 20 66 69 79 80 87 94 96
191. option must be used to make glsrefentry work correctly 135 glsglossarymark glossarypreamble setglossarypreambl 10 Displaying a glossary sort This key is only available for Option 1 Possible values are word word order letter letter order standard word or let ter ordering taken from the order package option use order of use def order of definition nocase case insensitive or case case sensitive The word and letter order sort methods use datatool s dt lwordindexcompare and dtlletterindexcompare handlers The case insensitive sort method uses datatool s Ndtlicompare handler The case sensitive sort method uses datatool s dt 1compare handler See the datatool documentation for further details If you don t get an error with sort use and sort def but you do get an error with one of the other sort options then you probably need to use the sanitizesort true package option or make sure none of the entries have fragile commands in their sort field By default the glossary is started either by Nchapter or by sectionx depending on whether or not chapter is defined This can be overridden by the section package option or the setglossarysection command Numbered sectional units can be obtained using the numberedsection package option Each glossary sets the page header via the command glsglossarymark title If this mechanism is unsuitable for your chosen class file or page style packa
192. ore the opening square bracket to prevent it from being interpreted as the final argument For example gls sample Editor s comment Don t use any of the gls like or glstext like commands in the insert argument 106 gls Gls GLS 6 Links to Glossary Entries Ngls options t label insert This command typically determines the link text from the values of the text or first keys supplied when the entry was defined using newglossaryentry However if the entry was defined using newacronymand setacronymstyle was used then the link text will usually be determined from the long or short keys There are two upper case variants G1s options t label insert nd fed GLS options t label insert which make the first letter of the link text or all the link text upper case respectively For the former the uppercasing of the first letter is performed by makefirstuc For further details including its limitations see the mfirstuc user manual There are also analogous plural forms Nglspl Glspl glsp1 options label insert Glsp1 options label insert GLSp GLSp1 options label insert These typically determine the link text from the plural or firstplural keys supplied when the entry was defined using newglossaryentry or if the entry is an acronym and setacronymstyle was used fr
193. ot only has an associated symbol but also units stored in user1 and dimension stored in user2 Then you can define a glossary style that displays each entry in a longtable as fol lows newglossarystyle long6col put the glossary in a longtable environment renewenvironment theglossary begin longtable lp glsdescwidth cccp glspagelistwidth end longtable Set the table s header renewcommands glossaryheader bfseries Term amp bfseries Description amp bfseries Symbol amp bfseries Units amp bfseries Dimensions amp bfseries Page List endhead No heading between groups Nrenewcommand glsgroupheading 1 Main level 0 entries displayed in a row optionally numbered Nrenewcommand Nglossentry 2 glsentryitem 1 Entry number if required glstarget 1 glossentryname 1 Name amp glossentrydesc 1 Description amp glossentrysymbol 1 Symbol amp glsentryuseri 1 Units amp glsentryuserii 1 Dimensions amp 2 Page list 9 tabularnewline end of row 204 15 Glossary Styles Similarly for sub entries no sub entry numbers Nrenewcommand Nsubglossentry 3 ignoring first argument sub level glstarget 2 glossentryname 2 Name amp glossentrydesc 2 Description amp glossentrysymbol 2 Symbol amp glsentryuseri 2 Units amp
194. ote that glossary mcols is not loaded by glossaries If you want to use any of the multicol styles in that package you need to load it explicitly with usepackage and set the required glossary style using setglossarystyle The default number of columns is 2 but can be changed by redefin ing glsmcols to the required number For example for a three column glossary usepackage glossary mcols Nrenewcommand glsmcols 3 setglossarystyle mcolindex Table 15 2 Multicolumn Styles glossary mcols Style Analogous Tree Style mcolindex index mcolindexgroup indexgroup mcolindexhypergroup indexhypergroup mcoltree tree mcoltreegroup treegroup mcoltreehypergroup treehypergroup mcoltreenoname treenoname mcoltreenonamegroup treenonamegroup mcoltreenonamehypergroup treenonamehypergroup moolalttree alttree mcolalttreegroup alttreegroup moolalttreehypergroup alttreehypergroup 15 1 8 In Line Style This section covers the glossary inline package that supplies the inline style This is a style that is designed for in line use as opposed to block styles such as lists or tables This style doesn t display the number list 197 15 Glossary Styles You will most likely need to redefine glossarysection with this style For example suppose you are required to have your glos saries and list of acronyms in a footnote you can do usepackage glossary inline renewcommands glossarysection 2 textbf 1 set
195. ou are using the glossaries package in conjunction with the hyperref package Instead use one of the expandable commands listed in Section 9 such as glsentrytext but not the non expandable case changing versions like Glsentrytext Alternatively provide an alternative via the optional argument to the sectioning caption command or use hyper refs texorpdfstring Examples chapter An overview of glsentrytext perl chapter An overview of Perl An overview of gls perl chapter An overview of texorpdfstring gls perl Perl If you want the link text to produce a hyperlink to the correspond ing entry details in the glossary you should load the hyperref package before the glossaries package That s what I ve done in this document 102 glstext format 6 Links to Glossary Entries so if you see a hyperlinked term such as link text you can click on the word or phrase and it will take you to a brief description in this document s glossary If you use the hyperref package I strongly recommend you use pdflatex rather than latex to compile your document if possible The DVI format of IATEX has limitations with the hyperlinks that can cause a problem when used with the glossaries package Firstly the DVI format can t break a hyperlink across a line whereas PDFIATEX can This means that long glossary entries for example the full form of an acronym won t be able to break across a line with the DVI format Secondly t
196. ou need to do latex sample4co makeglossaries sample4col latex sample4co As before if you don t have Perl installed you will need to use makeindex directly instead of using makeglossaries The vertical gap between entries is the gap created at the start of each group This can be suppressed using the nogroupskip pack age option sampleAcr tex This document has some sample acronyms It also adds the glossary to the table of contents so an extra run through TEX is required to ensure the document is up to date latex sampleAcr makeglossaries sampleAcr latex sampleAcr latex sampleAcr sampleAcrDesc tex This is similar to the previous example ex cept that the acronyms have an associated description As with the previous example the glossary is added to the table of con tents so an extra run through IATEX is required latex sampleAcrDesc makeglossaries sampleAcrDesc latex sampleAcrDesc latex sampleAcrDesc 19 1 Introduction sampleDesc tex This is similar to the previous example except that it defines the acronyms using newglossaryentry in stead of newacronym As with the previous example the glossary is added to the table of contents so an extra run through TEX is required latex sampleDesc makeglossaries sampleDesc latex sampleDesc latex sampleDesc sampleCustomAcr tex This document has some sample acronyms with a custom acronym style It al
197. ould be located in the same folder as the makeglossaries Perl script This just explicitly loads the script into Perl If you ve installed Perl but for some rea son your operating system can t find perl exe you can edit the makeglossaries bat file to include the full path to perl exe but take care as this file will be overwritten next time you update the glossaries package If you move the bat file to a new location you will also need to supply the full path to the makeglossaries Perl script Don t also move the Perl script as well or you may miss out on updates to makeglossaries The makeglossaries script attempts to fork the makeindex xindy process using open on the piped redirection 2 gt amp 1 and parses the processor output to help diagnose problems If this method fails nakeglossaries will print an Unable to fork warning and will retry without redirection If you run makeglossaries on an operating system that doesn t support this form of redirection then you can use the Q switch to suppress this warning or you can use the k switch to make makeglossaries automatically use the fallback method without attempting the redirection Without this redirection 42 1 Introduction the q quiet switch doesn t work as well You can specify in which directory the aux glo etc files are lo cated using the d switch For example pdflatex output directory myTmpDir myDoc makeglossaries d myTmpDir myDoc Note that makeglos
198. pace glsentrylong 1 is another form of abbreviation glsentrylongpl l 2 space protect firstacronymfont glsentryshortpl 1 oe plural and first letter upper cas renewcommands Genplacrfullformat 2 ifglsfieldeq 1 abbrtype word is a proper acronym protect firstacronymfont Glsentryshortpl 1 2 space glsentrylong 1 is another form of abbreviation Glsentrylongpl l 2 space protect firstacronymfont glsentryshortpl 1 oe o9 Just use the short form as the name part in the glossary renewcommands acronymentry 1 acronymfont glsentryshort 1 Sort by the short form renewcommands acronymsort 2 1 Just use the surrounding font for the short form Nrenewcommand Nacronymfont 1 1 a oe Pd oe 86 4 Defining Glossary Entries Same for first use renewcommands firstacronymfont 1 acronymfont 1 Default plural suffix if the plural isn t explicitly set renewcommands acrpluralsuffix glspluralsuffix oe Remember that the new style needs to be set before defining any terms setacronymstyle mystyle Since it s a bit confusing to use newacronym for something that s not technically an acronym let s define a new command for ini tialisms newcomman
199. pare 136 dtlwordindexcompare 136 Index E ecapitalisewords 127 6d E s2biekres bier 113 Nemph 2 2 esee 104 entry location 8 entryname 32 environments ALIGN usua veda 178 description 187 188 199 document 93 96 97 179 equation ceper s ed 22 fame esee priori I Xtemize 222 ux 202 lorngtable 2123 137 188 190 191 204 multicols 196 197 supertabular 191 193 tabular resaca piee 178 theglossary 199 199 202 equation environment 22 etex package 50 etoolbox package bees 62 114 209 211 212 Extended Latin Alphabet 8 extended Latin character TEETAN 8 8 10 26 76 F file types PALO ieagoo sage iue nan 41 HOUR ETTET 42 43 140 JOD emassa 41 44 45 Bre gio A Mn LET 2 Eo NE o EEE 43 45 GLS druer tesa us 44 45 SOLSAELES 45 0 e208 ee saed 97 PSE 222 45 46 64 73 74 Rc qM edn a Whee 44 45 xdy 44 46 64 73 74 139 GLO i leiesgaiekegu 2 US Dens acis cx ep E 2 firstuse 000 8 HAS m casi eas eau 8 lext 22 493 e ees 9 firstacronymfont ka pees 115 157 157 158 flowfram package 192 fmtcount package 143 fontspec package 80 223 Index WEOOENOUE uou ooo ees 159 altsuperragged4col forallacronyms 206 te lee mies 194 195 forallglossaries 206 altsuperragged4colborder
200. people and you want the names listed as first name surname in the glossary but you want the names sorted by surname first name You can do this by defining a command called say name first name surname that you can use in the name key when you define the entry but 62 2 Package Options hook into the standard sort mechanism to temporarily redefine name while the sort value is being set First define two commands to set the person s name newcommand sortname 2 newcommand textname 2 2 1 1 2 and name needs to be initialised to textname let name textnam Now redefine glsprestandardsort so that it temporarily sets name to sortname and expands the sort value then sets name to textname so that the person s name appears as first name surname in the text renewcommand glsprestandardsort 3 let name sortname edef 1 expandafter expandonce expandafter 1 let name textnam glsdosanitizesort The somewhat complicate use of expandafter etc helps to protect fragile commands but care is still needed Now the entries can be defined newglossaryentry joebloggs name name Joe Bloggs description some information about Joe Bloggs newglossaryentry johnsmith name name John Smith description some information about John Smith For a complete document see the sample file samp 1ePeople tex or
201. pter 0 glschapnum This creates anew user command called glschapnum that s analo gous to glsentrytext The default value for this key is 0 I then define my glossary entries as usual Next I redefine the hook glslinkpostsetkeys see Section 6 3 so that it determines the current chapter number which is stored in currentchap using edef This value is then compared with the value of the entry s chapter key that I defined earlier If they re the same this entry has already been used in this chapter so the hyperlink is switched off using xkeyval s setkeys command If the chapter number isn t the same then this entry hasn t been used in the current chapter The chapter field is updated using glsfieldxdef Sec tion 16 3 provided the user hasn t switched off the hyperlink This test is performed using glsifhyperon Nrenewcommand Nglslinkpostsetkeys edef currentchap arabic chapter ifnum currentchap glschapnum glslabel relax setkeys glslink hyper false else glsifhyperon glsfieldxdef glslabel chapter currentchap fi Note that this will be confused if you use g1s etc when the chapter counter is 0 That is before the first chapter See the sample file sample chap hyperfirst tex for a com plete document 120 glsadd Nglsaddall 7 Adding an Entry to the Glossary Without Generating Text It is possible to add a line to the glossary file without generating any text at
202. r if you are writing in archaic English you may want to use kine as the plural form in which case you would have to do newglossaryentry cow name cow plural kine description a fully grown female of any bovine animal If you are writing in a language that supports multiple plurals for a given term then use the plural key for one of them and one of the user keys to specify the other plural form For example newglossaryentry cow name cow description a fully grown female of any bovine animal plural cows archaic plural kine userl kine You can then use glsp1 cow to produce cows and glsuseri cow to produce kine You can of course define an easy to remember synonym For example let glsaltpl glsuseri Then you don t have to remember which key you used to store the second plural Alternatively you can define your own keys using glsaddkey described in Section 4 3 If you are using a language that usually forms plurals by ap pending a different letter or sequence of letters you can redefine glspluralsuffix as required However this must be done before the entries are defined For languages that don t form plurals by sim ply appending a suffix all the plural forms must be specified using the plural key and the firstplural key where necessary 4 2 Other Grammatical Constructs You can use the six user keys to provide alternatives such as partici ples For example
203. r NGlspl were used this does first uc If GLS or NGLSpl were used this does all caps glsifhyperon hyper true hyper false This will do hyper true if the hyperlinks are on for the current ref erence otherwise it will do hyper false The hyperlink may be off even if it wasn t explicitly switched off with the hyper key or the use of a starred command It may be off because the hyperref package hasn t been loaded or because glsdisablehyper has been used or because the entry is in a glossary type that s had the hyperlinks switched off using nohypertypes or because it s the first use and the hyperlinks have been suppressed on first use Note that glsifhyper is now deprecated If you want to know if the command used to reference this entry was used with the star or plus variant you can use glslinkvar unmodified star plus This will do unmodified if the unmodified version was used or will do star if the starred version was used or will do plus if the plus version was used Note that this doesn t take into account if the hy per key was used to override the default setting so this command shouldn t be used to guess whether or not the hyperlink is on for this reference Note that you can also use commands such as Ni fglsused within the definition of glsentryfmt see Section 14 114 6 Links to Glossary Entries The commands glslabel glstype glsifplural glscapsca
204. r before the entries are used in the case of sort use 60 glsprestandardsort glsdosanitizesort 2 Package Options Note that the group styles such as listgroup are incompatible with the sort use and sort def options The default is sort standard When the standard sort option is in use you can hook into the sort mechanism by redefining glsprestandardsort sort cs type label where sort cs is a temporary control sequence that stores the sort value which was either explicitly set via the sort key or implicitly set via the name key before any escaping of the make index xindy special characters is performed By default glsprestandardsort just does glsdosanitizesort which sanitizes sort cs if the sanitizesort package option is set or does nothing if the package option sanitizesort false is used The other arguments type and label are the glossary type and the entry label for the current entry Note that type will always be a control sequence but label will be in the form used in the first argument of newglossaryentry Redefining glsprestandardsort won t affect any entries that have already been defined and will have no effect at all if you are using sort def or sort use Example 1 Mixing Alphabetical and Order of Definition Sorting Suppose I have three glossaries main acronymand notation and let s suppose I want the main and acronym glossaries to be sorted alphabeti
205. r example to always use a non breakable space Nrenewcommand glsacspace 1 e short long sc short long sm short long These three styles are analogous to the above three styles except the display order is swapped to firstacronymfont short long on first use 158 13 Acronyms and Other Abbreviations Note however that acronymsort and acronymentry are the same as for the long short styles above so the acronyms are still sorted according to the short form long short desc long sc short desc long sm short desc long sp short desc These are like the long short long sc short long sm short and long sp short styles described above except that the description key must be supplied in the optional argument of newacronym They also redefine Nacronyment ry to long acronymfont short and redefine acronymsort short long to just long This means that the acronyms are sorted according to the long form and in the list of acronyms the name field has the long form followed by the short form in parentheses I recommend you use a glossary style such as altlist with these acronym styles to allow for the long name field short long desc sc short long desc sm short long desc These styles are analogous to the above three styles but the first use display style is firstacronymfont short long The definitions of acronymsort and acronymentry are the same as thos
206. ral yeux description eye prefix 1 prefixplural les space Where a space is required at the end of the prefix you must use a spacing command such as space V backslash space or due to the automatic spacing trimming performed in key value op tions The prefixes can also be used with acronyms For example newacronym prefix an space prefixfirst a svm SVM support vector machine The glossaries prefix package provides convenient commands to use these prefixes with commands such as gls Note that the prefix is not considered part of the link text so it s not included in the hyper link where hyperlinks are enabled The options and any star or plus modifier are passed on to the gls like command See Section 6 for further details pgls options label insert This is inserts the value of the prefix key or prefixfirst key on first use in front of gls options label insert Pgls options label insert If the prefix key or prefixfirst on first use has been set this displays the value of that key with the first letter converted to upper case followed by gls options label insert If that key hasn t been set this is equivalent to Gls options label insert PGLS options label insert As pg1s but converts the prefix to upper case and uses GLS instead of gls pglsp1 options
207. red by PDF bookmarks so you will need to provide an alternative via hyperref s texorpdfstring if you want to use them in sectioning commands This isn t specific to the glossaries package See the hyperref documentation for further details All the commands that convert the first letter to upper case aren t expandable The other commands depend on whether their corresponding keys were assigned non expandable values If you want each word in a given entry field capitalised you can use ecapitalisewords fext defined by the mfirstuc package but make sure you use one of the expandable commands within text For example ecaptialisewords glsentrytext somelabel Note that ecapitalisewords is not expandable glsentryname glsentryname label Glsentryname Glsentryname label These commands display the name of the glossary entry given by label as specified by the name key Glsentryname makes the first letter upper case Neither of these commands check for the existence of label The first form glsentryname is expandable unless the name contains unexpandable commands Note that this may be different from the values of the text or first Keys In general 127 glossentryname Glossentryname glsentrytext Glsentrytext glsentryplural Glsentryplural 9 Using Glossary Terms Without Links it s better to use glsentrytext or glsentryfirst instead of glsentryname In general it
208. rish Ciall renewcommands descriptionname textirish Tuairisc renewcommand symbolname textirish Comhartha renewcommand glssymbolsgroupname textirish Comhartha i renewcommands pagelistname textirish Leathanaigh renewcommands glsnumbersgroupname textirish Uimhreacha oe o oe pm newcommands glossariescaptionsirish renewcommands glossaryname Gluais renewcommands acronymname Acrainmneacha Nrenewcommand entryname Ciall Nrenewcommand descriptionname Tuairisc Nrenewcommand symbolname Comhartha Nrenewcommand glssymbolsgroupname Comhartha i renewcommands pagelistname Leathanaigh renewcommands glsnumbersgroupname Uimhreacha oe whereas the ut 8 1df replaces the accent commands with the ap propriate UTF 8 characters 1 4 Generating the Associated Glossary Files This section is only applicable if you have chosen Options 2 or 3 You can ignore this section if you have chosen Option 1 If this section seriously confuses you and you can t work out how to run makeglossaries or makeindex you can try using the au 38 1 Introduction tomake package option described in Section 2 4 but you will need TEX s shell escape enabled In order to generate a sorted glossary with compact number lists it is necessary to use an external indexing application as an interm
209. rt sample nomathhyper tex This document illustrates how to se lectively enable and disable entry hyperlinks in glsentryfmt sample entryfmt tex This document illustrates how to change the way an entry is displayed in the text sample prefix tex This document illustrates the use of the glossaries prefix package An additional run is required to ensure the table of contents is up to date latex sample prefix makeglossaries sample prefix latex sample prefix latex sample prefix sampleaccsupp tex This document uses the experimental glossaries accsupp package The symbol is set to the replacement text Note that some PDF viewers don t use the accessibility support Information about the glossaries accsupp package can be found in Section 18 sample ignored tex This document defines an ignored glossary for common terms that don t need a definition 28 1 Introduction sample entrycount tex This document uses glsenableentrycount and cgls described in Section 14 1 so that acronyms only used once don t appear in the list of acronyms 1 2 Dummy Entries for Testing In addition to the sample files described above glossaries also pro vides some files containing lorum ipsum dummy entries These are provided for testing purposes and are on TgX s path in tex latex glossaries test entries so they can be included via input or loadglsentries The files are as follows example glossaries brief tex These entrie
210. rtplural 80 90 107 115 150 152 219 shortpluralaccess 219 sort 10 60 61 77 80 90 92 96 136 156 159 160 199 subentrycounter 135 symbol 29 77 90 110 116 117 166 208 219 symbolaccess 219 symbolplural 77 90 219 symbolpluralaccess 219 text ios duet T 107 209 110 115 127 128 156 176 212 214 219 textaccesS 219 type 00 79 93 150 useri 6 29 79 90 111 204 210 user2 79 90 111 204 USERS isa by 79 90 111 serd essaie 79 90 112 userb ln 79 90 112 user 6 79 90 112 204 newglossarystyle 186 198 200 204 newignoredglossary UTE 52 96 135 148 Anewline i a a 76 186 newterm 71 124 ngerman package 33 139 nohyperpage 100 noist 25 74 100 140 142 145 146 Non Latin Alphabet 10 non Latin character 8 10 10 26 30 34 37 76 80 nopostdesc 71 76 91 92 186 209 number list 10 21 22 27 39 41 53 59 60 74 79 80 91 92 98 100 102 121 125 132 134 141 144 145 147 187 192 194 197 200 202 numberline 54 O oldacronym 173 174 P package options acronym 32 44 45 48 56 65 66 72 94 122 148 173 THUG oou ce 48 66 acronymlists 66 67 113 148 150 206 acronyms 48 66 automake 39 65 false bes 65 compatible 2 07
211. rwithin and subentrycounter described in Section 2 3 There is a summary of avail able styles in table 15 1 Note that the group styles such as listgroup will have unexpected results if used with the sort def or sort use options The tabular like styles that allow multi line descriptions and page lists use the length glsdescwidth to set the width of the de scription column and the length glspagelistwidth to set the 184 15 Glossary Styles Table 15 1 Glossary Styles An asterisk in the style name indi cates anything that matches that doesn t match any pre viously listed style e g long3col matches long3col long3colheader long3colborder and long3colheaderborder A maximum level of 0 indicates a flat glossary sub entries are displayed in the same way as main entries Where the maximum level is given as there is no limit but note that nakeindex Option 2 imposes a limit of 2 sub levels If the homograph column is checked then the name is not displayed for sub entries If the symbol column is checked then the symbol will be displayed Style Maximum Level Homograph Symbol Jl Ia al lo al lo super 3colx super4colx altsuperx4colx super indexx treenonamex xtreex a inl sublistdotted e stdotted St long4colx tlong 4colx tlist ng x3colx ng SNSNSNNNNN SN SS RJ L3 e a d d j e j Ex S NNN NAN lttreex E ine 1 V 185 glspostde
212. s Description glossaries Symbol glossaries Page List glossaries glssymbolsgroupname Symbols glossaries glsnumbersgroupname Numbers glossaries 32 Purpose Title of the main glossary Title of the list of acronyms when used with package option acronym Header for first column in the glossary for 2 3 or 4 column glossaries that support headers Header for second column in the glossary for 2 3 or 4 column glossaries that support headers Header for symbol column in the glossary for glossary styles that support this option Header for page list column in the glossary for glossaries that support this option Header for symbols section of the glossary for glossary styles that support this option Header for numbers section of the glossary for glossary styles that support this option 1 Introduction translator isn t loaded Using polyglossia documentclass article usepackage polyglossia setmainlanguage english usepackage glossaries Using ngerman documentclass article Nusepackage ngerman usepackage glossaries Due to the varied nature of glossaries it s likely that the prede fined translations may not be appropriate If you are using the babel package and the glossaries package option translate babel you need to be familiar with the advice given in http www tex ac uk cgi bin texfaq2html label latexwords If you are using the translator package
213. s The second form is not expandable Neither checks for the existence of label glsentryfirst label Glsentryfirst label These commands display the first use text for the glossary entry given by label as specified by the first key Glsentryfirst makes the first letter upper case The first form is expandable unless the value of that key contains unexpandable commands The second form is not expandable Neither checks for the existence of label glsentryfirstplural label Glsentryfirstplural glsentrydesc Glsentrydesc glossentrydesc Glsentryfirstplural label These commands display the plural form of the first use text for the glossary entry given by label as specified by the firstplural key Glsentryfirstplural makes the first letter upper case The first form is expandable unless the value of that key contains unexpand able commands The second form is not expandable Neither checks for the existence of label glsentrydesc label Glsentrydesc label These commands display the description for the glossary entry given by label Glsentrydesc makes the first letter upper case The first form is expandable unless the value of that key contains unex pandable commands The second form is not expandable Neither checks for the existence of label Nglossentrydesc label This is like glsentrydesc label but also checks for the exis
214. s all have brief descriptions example glossaries long tex These entries all have long descriptions example glossaries multipar tex These entries all have multi paragraph descriptions example glossaries symbols tex These entries all use the symbol key example glossaries images tex These entries use the user1 key to store the name of an image file The images are provided by the mwe package and should be on T X s path One entry doesn t have an associated image to help test for a missing key example glossaries acronym tex These entries are all acronyms example glossaries acronym desc tex These entries are all acronyms that use the description key example glossaries acronyms lang tex These entries are all acronyms where some of them have a translation supplied in the user key example glossaries parent tex These are hierarchical entries where the child entries use the name key example glossaries childnoname tex These are hierarchical entries where the child entries don t use the name key example glossaries cite tex These entries use the user1 key to store a citation key or comma separated list of citation keys The cita tions are defined in xamp1 bib which should be available on all modern TEX distributions One entry doesn t have an associ ated citation to help test for a missing key example glossaries url tex These entries use the user key to store an URL associated with the entry 29 1 Introduction
215. s can later be used in the document The dog glsed jump over the duck The duck was glsing waddle round the dog The dog glsed run away from the duck For a complete document see the sample file sampl1e newkeys tex 84 glsaddstoragekey 4 Defining Glossary Entries 4 5 Storage Keys A custom key that can be used for simply storing information is de fined using glsaddstoragekey key default value no link cs where the arguments are as the first three arguments of glsaddkey described above in Section 4 4 This is essentially the same as gl saddkey except that it doesn t define the additional commands You can access or update the value of your new field using the commands described in Section 16 3 Example 4 Defining Custom Storage Key Acronyms and Ini tialisms Suppose I want to define acronyms and other forms of abbrevia tions such as initialisms but I want them all in the same glossary and I want the acronyms on first use to be displayed with the short form followed by the long form in parentheses but the opposite way round for other forms of abbreviations Here I can define a new key that determines whether the term is actually an acronym rather than some other form of abbreviation I m going to call this key abbrtype since t ype already exists glsaddstoragekey abbrtype key field name word default value if not explicitly set abbrtype custom command to access
216. s the long and short forms without adding information to the glossary using commands analogous to glsentrytext described in Section 9 154 glsentrylong Glsentrylong Nglsentrylongpl 13 Acronyms and Other Abbreviations The commands that convert the first letter to upper case come with the same caveats as those for analogous commands like Glsentrytext non expandable can t be used in PDF bookmarks care needs to be taken if the first letter is an accented character etc See Section 9 The long form can be accessed using glsentrylong label o A a E 2 oO m H 7 th oO T oO H Q S 4 oO H Eh oO a cr o a O mo oO H Q wn D z Glsentrylong label a ce H B S a 3 n Nglsentrylongpl label NGlsentrylongpl label Similarly to access the short form o a a gt ct H oO r d n oe oO ct oO H Q S a oO d a oO a cr o e O TO oO H eo D n oO Nglsentryshortpl label NGlsentryshortpl label And the full form can be obtained using Full label Glsentrylongpl glsentryshort glsentryshort label Glsentryshort Glsentryshort label Plural forms glsentryshortpl Glsentryshortpl glsentryfull Nglsentryi Glsentryfull NGlsentry Full label 155 Nglsentryfullpl 13 Acronyms and Other Abbreviations glsentryfullp1 label G
217. same directory as this document or try texdoc glossariesbegin pdf Once you ve got to grips with the basics then come back to this manual to find out how to adjust the settings The glossaries bundle comes with the following documentation glossariesbegin pdf If you are a complete beginner start with The glossaries package a guide for beginners glossary2glossaries pdf If you are moving over from the ob solete glossary package read Upgrading from the glossary package to the glossaries package glossaries user pdf This document is the main user guide for the glos saries package mfirstuc manual pdf The commands provided by the mfirstuc package are briefly described in mfirstuc sty uppercasing first letter glossaries code pdf Advanced users wishing to know more about the inner workings of all the packages provided in the glossaries bundle should read Documented Code for glossaries v4 20 This includes the documented code for the mfirstuc pack age INSTALL Installation instructions CHANGES Change log README Package summary If you use hyperref and glossaries you must load hyperref first Similarly the doc package must also be loaded before glossaries If doc is loaded the file extensions for the default main glossary are changed to g1s2 glo2 and glg2 to avoid conflict with doc s changes glossary If you are using hyperref it s best to use pdf latex rather than latex DVI format as pdflatex dea
218. saries assumes by default that makeindex xindy is on your operating system s path If this isn t the case you can specify the full pathname using m path to makeindex for makeindex or x path to xindy for xindy The makeglossaries script contains POD Plain Old Documen tation If you want you can create a man page for makeglossaries using pod2man and move the resulting file onto the man path Al ternatively do makeglossaries help for a list of all options or makeglossaries version for the version number When upgrading the glossaries package make sure you also upgrade your version of makeglossaries The current version is 1 4 2 Using the makeglossaries lite lua Lua Script The Lua alternative to the makeglossaries Perl script requires a Lua interpreter which should already be available if you have a modern TEX distribution that includes LuaTpx Lua is a light weight cross platform scripting language but because it s light weight it doesn t have the full functionality of heavy weight scripting lan guages such as Perl The makeglossaries lite lua script is therefore limited by this and some of the options available to the makeglossaries Perl script aren t available here In particular the d option The makeglossaries lite lua script can be invoked in the same way as makeglossaries but you need to remember the lua extension For example if your document is called myDoc t ex then do makeglossaries lite lua m
219. saries irish 1ldf file provides this as follows ProvidesGlossariesLang irish glsifusedtranslatordict Irish addglossarytocaptions CurrentTrackedLanguage addglossarytocaptions CurrentTrackedDialect yum Se oe ifdefstring inputencodingname utf8 input glossaries irish utf8 ldf ifdef XeTeXinputencoding XeTeX defaults to UTF 8 input glossaries irish utf8 ldf input glossaries irish noenc 1ldf ifcsdef captions CurrentTrackedDialect csappto captions CurrentTrackedDialect oe glossariescaptionsirish oo oe oe Nifcsdef captionsNCurrentTrackedLanguage csappto captions CurrentTrackedLanguage glossariescaptionsirish va oe oe oe oo o 37 Modify glossariescaptionsenglish as appropriate for 1 Introduction glossariescaptionsirish Again you can use this as a template Replace irish with your root language label and Irish with the translator dictionary label There are now two extra files glossaries irish noenc ldf and glossaries irish utf8 1ldf These both define glossariescaptionsirish but the noenc ldf uses I4TEX accent commands ifpackageloaded polyglossia newcommands glossariescaptionsirish renewcommand glossaryname textirish Gluais renewcommands Nacronymname textirish Acrainmneacha renewcommands entryname texti
220. saries is omitted GlsAddXdyLocation must be used before makeglossaries Example 18 Custom Numbering System for Locations Suppose I decide to use a somewhat eccentric numbering system for sections where I redefine thesection as follows renewcommands thesection thechapter arabic section If I haven t done counter section in the package option I need to specify that the counter will be used as a location number GlsAddXdyCounters section 142 11 Xindy Option 3 Next I need to add the location style thechapter is assumed to be the standard arabic chapter GlsAddXdyLocation section sep arabic numbers sep arabic numbers Note that if I have further decided to use the hyperref package and want to redefine theHsection as Nrenewcommand theHsection thepart thesection Nrenewcommand Nthepart Roman part then I need to modify the GlsAddXdyLocation code above to GlsAddXdyLocation roman numbers uppercase section sep arabic numbers sep arabic numbers Since Roman will result in an empty string if the counter is zero it s a good idea to add an extra location to catch this GlsAddXdyLocation zero section sep arabic numbers sep arabic numbers This example is illustrated in the sample file samplexdy2 tex Example 19 Locations as Words not Digits Suppose I want the page numbers written as words rather than dig i
221. scription 15 Glossary Styles width of the page list column These will need to be changed us ing Nsetlength if the glossary is too wide Note that the long4col and super4col styles and their header and border variations don t use these lengths as they are designed for single line entries Instead you should use the analogous altlong4col and altsuper4col styles If you want to explicitly create a line break within a multi line description in a tabular like style it s better to use newline instead of Note that if you use the style key in the optional argument to printnoidxglossary Option 1 or printglossary Options 2 and 3 it will override any previous style settings for the given glos sary so if for example you do Nrenewcommand glsgroupskip printglossary style long then the new definition of glsgroupskip will not have an affect for this glossary as glsgroupskip is redefined by style long Like wise setglossarystyle will also override any previous style definitions so again renewcommands glsgroupskip setglossarystyle long will reset glsgroupskip back to its default definition for the named glossary style long in this case If you want to modify the styles either use newglossarystyle described in the next sec tion or make the modifications after set glossarystyle e g setglossarystyle long renewcommands glsgroupskip As from version 3 03 you can now use the package optio
222. se glscustomtex and glsinsert are typically updated at the start of the g1s like and glstext like commands so they can usually be accessed in the hook user commands such as Ng1spostlinkhook and Nglslinkpostsetkeys If you only want to make minor modifications to glsentryfmt you can use Nglsgenentryfmt glsgenentryfmt This uses the above commands to display just the first text plural or firstplural keys or the custom text with the insert text appended Alternatively if want to change the entry format for acronyms de fined via newacronym you can use glsgenacfmt glsgenacfmt This uses the values from the long short longplural and shortplural keys rather than using the text plural first and firstplural keys The first use singular text is obtained via genacrfullformat genacrfullformat label insert instead of from the first key and the first use plural text is obtained ia 4 js genplacrfullformat genplacrful Format label insert instead of from the firstplural key In both cases label is the entry s label and insert is the insert text provided in the final optional ar gument of commands like gls The default behaviour is to do the long form or plural long form followed by insert and a space and the short form or plural short form in parentheses where the short form is in the argument of firstacronymfont There are also first letter upper case vers
223. se 2 fi This checks the indexonlyfirst package option using Ni fglsindexonlyi and does wr code if this is false otherwise it only does wr code of the entry hasn t been used For example suppose you only want to index the first use for entries in the acronym glossary and not in the main or any other glossary renewcommands Nglswriteentry 2 ifthenelse equal glsentrytype 1 acronym ifglsused 1 2 2 Here I ve used ifthenelse to ensure the arguments of equal are fully expanded before the comparison is made savenumberlist This is a boolean option that specifies whether or not to gather and store the number list for each entry The de fault is savenumberlist false See glsentrynumberlist and Nglsdisplaynumberlist in Section 9 This is always true if you use Option 1 bug fix in v4 16 has corrected the code to ensure this 53 First glstoctrue glstocfalse setglossarysection 2 Package Options 2 2 Sectioning Headings and TOC Options toc Add the glossaries to the table of contents Note that an extra IATEX run is required with this option Alternatively you can switch this function on and off using glstoctrue and glstocfalse numberline When used with toc this will add numberline in the final argument of Naddcontentsline This will align the table of contents entry with the numbered section titles Note
224. see if the next character is a full stop If itis this signals the end of a sentence otherwise it s mid sentence Remember that internal commands within the document file rather than in a class or package need to be placed between makeat letter and makeatother makeatletter renewcommand glspostlinkhook ifglsfieldeq glslabel abbrtype initials new ifnextchar doendsentence doendword makeatother In the event that a full stop is found doendsentence is performed but it will be followed by the full stop which needs to be discarded Otherwise doendword will be done but it won t be followed by a full stop so there s nothing to discard The definitions for these com mands are newcommand doendsentence 1 Nspacefactor 10000 newcommand Ndoendword spacefactor 1000 Now I can just do gls bsc mid sentence and gls phd at the end of the sentence The terminating full stop will be discarded in the latter case but it won t be discarded in say gls laser as that doesn t have the abbrt ype field set to initials This also works on first use when the style is set to one of the long short styles but it will fail with the short long styles as in this case the terminating full stop shouldn t be discarded Since Nglspostlinkhook is used after the first use flag has been unset for the entry this can t be fixed by simply checking with ifglsused One possible solution to this is
225. serv label glsentryuservi Glsentryuservi glsentryuservi label glshyperlink glsentrynumberlist glsdisplaynumberlist Glsentryuservi label These commands display the value of the user keys for the glossary entry given by label The lower case forms are expandable unless the value of the key contains unexpandable commands The com mands beginning with an upper case letter convert the first letter of the required value to upper case and are not expandable None of these commands check for the existence of label Nglshyperlink link text label This command provides a hyperlink to the glossary entry given by label but does not add any information to the glossary file The link text is given by glsentrytext label by default but can be overridden using the optional argument Note that the hyperlink will be suppressed if you have used glsdisablehyper or if you haven t loaded the hyperref package If you use glshyperlink you need to ensure that the relevant entry has been added to the glossary using any of the commands described in Section 6 or Section 7 otherwise you will end up with an undefined link The next two commands are only available with Option 1 or with the savenumberlist package option Nglsentrynumberlist label Nglsdisplaynumberlist label Both display the number list for the entry given by label When used with Option 1 a rerun is req
226. so adds the glossary to the ta ble of contents so an extra run through TEX is required latex sampleCustomAcr makeglossaries sampleCustomAcr latex sampleCustomAcr latex sampleCustomAcr sampleFnAcrDesc tex This is similar to sampleAcrDesc tex except that it uses the footnote sc desc style As with the previous example the glossary is added to the table of contents so an extra run through TEX is required latex sampleFnAcrDesc makeglossaries sampleFnAcrDesc latex sampleFnAcrDesc latex sampleFnAcrDesc sample FnDesc tex This example defines a custom display for mat that puts the description in a footnote on first use latex sample FnDesc makeglossaries sample FnDesc 20 1 Introduction latex sample FnDesc sample custom acronym tex This document illustrates how to define your own acronym style if the predefined styles don t suit your requirements latex sample custom acronym makeglossaries sample custom acronym latex sample custom acronym sample crossref tex This document illustrates how to cross reference entries in the glossary latex sample crossref makeglossaries sample crossref latex sample crossref sampleDB tex This document illustrates how to load external files containing the glossary definitions It also illustrates how to define a new glossary type This document has the number list suppressed and uses Ng1saddall to add all the entries to the
227. splayed text is different from subsequent use For example the frame environment in beamer processes its argu ment for each overlay This means that the first use flag will be unset on the first overlay and subsequent overlays will use the non first use form Consider the following example documentclass beamer usepackage glossaries newacronym svm SVM support vector machine begin document begin frame frametitle Frame 1 begin itemize item lt gt gls svm item lt gt Stuff end itemize end frame end document On the first overlay gls svm produces support vector ma chine SVM and then unsets the first use flag When the second overlay is processed gls svm now produces SVM which is un likely to be the desired effect I don t know anyway around this and I can only offer two suggestions 177 14 Unsetting and Resetting Entry Flags Firstly unset all acronyms at the start of the document and explic itly use acrfull when you want the full version to be displayed documentclass beamer usepackage glossaries newacronym svm SVM support vector machine glsunsetall begin document begin frame frametitle Frame 1 begin itemize item lt gt acrfull svm item lt gt Stuff end itemize end frame end document Secondly explicitly reset each acronym on first use begin frame frametitle Frame 1 begin itemize item
228. ssary s sectioning command 57 glsresetentrycounter glossarysubentry 2 Package Options If you want the counter reset at the start of each glossary you can redefine glossarypreamble to use glsresetentrycounter which sets glossaryentry to zero renewcommand glossarypreamble glsresetentrycounter or if you are using Nsetglossarypreamble add it to each glossary preamble as required For example setglossarypreamble acronym glsresetentrycounter The preamble text here for the list of acronyms setglossarypreamble glsresetentrycounter The preamble text here for the main glossary subentrycounter This is a boolean option Default is subentrycounter false style If set each level 1 glossary entry will be numbered when using the standard glossary styles This option creates the counter glossarysubentry The counter is reset with each main level 0 entry Note that this package option is independent of en trycounter You can reference the number within the document using glsrefentry label where label is the label associ ated with the sub entry This is a key value option Default is style list Its value should be the name of the glossary style to use This key may only be used for styles defined in glossary list glossary long glossary super or glossary tree Alternatively you can set the style using setglossarystyle style name See Section 15 for f
229. st column con tains the entry s name and the second column contains the de scription followed by the number list The entry s symbol is ignored Sub groups are separated with a blank row The width of the first column is governed by the widest entry in that col umn The width of the second column is governed by the length glsdescwidth Child entries have a similar format to the parent entries except that their name is suppressed 2This style was supplied by Axel Menzel 188 15 Glossary Styles longborder The longborder style is like long but has horizontal and ver tical lines around it longheader The longheader style is like long but has a header row longheaderborder The longheaderborder style is like longheader but has horizontal and vertical lines around it long3col The long3col style is like long but has three columns The first column contains the entry s name the second column contains the description and the third column contains the number list The entry s symbol is ignored The width of the first column is governed by the widest entry in that column the width of the second column is governed by the length glsdescwidth and the width of the third column is governed by the length glspagelistwidth long3colborder The long3colborder style is like the long3col style but has horizontal and vertical lines around it long3colheader The long3colheader style is like long3col but has a header row long3colhea
230. sterisk or arguments If you want to cross reference another entry either use the see key when you define the entry or use glssee described in Section 8 If you are using hyperlinks and you want to change the font of the hyperlinked location don t use hyperpage provided by the hyperref package as the locations may not refer to a page number Instead the glossaries package provides number for mats listed in table 6 1 Table 6 1 Predefined Hyperlinked Location Formats hyperrm serif hyperlink hypersf sans serif hyperlink hypertt monospaced hyperlink hyperbf bold hyperlink hypermd medium weight hyperlink hyperit italic hyperlink hypersl slanted hyperlink hyperup upright hyperlink hypersc small caps hyperlink hyperemph emphasized hyperlink Note that if the Nhyperlink command hasn t been defined the hyper xx formats are equivalent to the analogous text xx font commands and hyperemph is equivalent to emph If you want to make a new format you will need to define a command which takes one argument and use that For example if you want the location number to be in a bold sans serif font you can define a command called say nyperbsf newcommand hyperbsf 1 textbf hypersf 1 105 6 Links to Glossary Entries and then use hyperbs f as the value for the format key See also section 1 16 Displaying the glossary in the documented code glossaries code pdf Remember that if you use xindy you wil
231. styles glossentry glossentry label number list This macro indicates what to do for each level 0 glossary entry The entry label is given by label and the associated number list is given by number list You can redefine glossentry to use commands like glossentryname label Ng1ossentrydesc label and Nglossentrysymbol label to display the name description and symbol fields or to access other fields use commands like gl sent ryuseri label See Section 9 for further details You can also use the following com mands glsentryitem glsentryitem label This macro will increment and display the associated counter for the main level 0 entries if the entrycounter or counterwithin package op tions have been used This macro is typically called by glossentry 200 15 Glossary Styles before glstarget The format of the counter is controlled by the macro glsentrycounterlabel glstarget subglossentry glsentrycounterlabel Each time you use a glossary entry it creates a hyperlink if hy perlinks are enabled to the relevant line in the glossary Your new glossary style must therefore redefine glossentry to set the ap propriate target This is done using glstarget label text where label is the entry s label Note that you don t need to worry about whether the hyperref package has been loaded as glstarget won t create a target if nypertarget has
232. symbol hasn t been set and omit the parentheses if the symbol is absent In this case you can use ifglshassymbol see Section 16 renewcommand glossentry 2 o item bullet point glstarget 1 glossentryname 1 the entry name ifglshassymbol 1 check if symbol exists space glossentrysymbol 1 the symbol in brackets oe no symbol so do nothing space glossentrydesc 1 the description space 2 the number list in square brackets 6 Example 27 Creating a new glossary style based on an exist ing style If you want to define a new style that is a slightly modified version of an existing style you can use setglossarystyle within the 203 15 Glossary Styles second argument of newglossarystyle followed by whatever al terations you require For example suppose you want a style like the list style but you don t want the extra vertical space created by indexspace between groups then you can create a new glossary style called say mylist as follows newglossarystyle mylist setglossarystyle list base this style on the list style renewcommand glsgroupskip make nothing happen between groups In this case you can actually achieve the same effect using the list style in combination with the package option nogroupskip Example 28 Example creating a glossary style that uses the user1 user6 keys Suppose each entry n
233. t to the glossary In both cases 2 and 3 above the cross referenced information ap pears in the number list whereas in case 1 the cross referenced infor mation appears in the description See the sample crossref tex example file that comes with this package This means that in cases 2 and 3 the cross referencing information won t appear if you have suppressed the number list In this case you will need to activate the number list for the given entries using nonumberlist false Alterna tively if you just use the see key instead of glssee you can auto matically activate the number list using the seeautonumberlist package option 8 1 Customising Cross reference Text When you use either the see key or the command glssee the cross referencing information will be typeset in the glossary according to glsseeformat fag label list location The default definition of glsseeformat is emph fag glsseelist label list Note that the location is always ignored For example if you want the tag to appear in bold you can do renewcommands glsseeformat 3 seename textbf 1 glsseelist 2 The list of labels is dealt with by glsseelist which iterates through the list and typesets each entry in the label The entries are separated by glsseesep or for the last pair lmakeindex will always assign a location number even if it s not needed so it needs to be discarded
234. t takes two arguments The command used depends whether you have used cgls cglspl cGls or cGlspl cglsformat label insert This command is used by cgl1s and defaults to glsentrylong label insert if the entry given by label has a long form or glsentryfirst label insert otherwise cglsplformat label insert This command is used by Ncg1sp1 and defaults to glsentrylongp1 label insert if the entry given by label has a long form or glsentryfirstplural label insert otherwise cGlsformat label insert This command is used by cG1s and defaults to Glsentrylong label insert if the entry given by label has a long form or Glsentryfirst label insert otherwise cGlsplformat label insert This command is used by cGl1sp1 and defaults to NGlsentrylongpl label insert if the entry given by label has a long form or Glsentryfirstplural label insert 181 14 Unsetting and Resetting Entry Flags otherwise This means that if the previous count for the given entry was 1 the entry won t be hyperlinked with the cg1s like commands and they won t add a line to the external glossary file If you haven t used any of the other commands that add information to glossary file such as glsadd or the glstext like commands then the entry won t appear in the glossary Remember that since these commands use glsentr
235. t text when using gls or one of its upper case variants If this field is omitted the value of the name key is used first How the entry will appear in the document text on first use with gls or one of its upper case variants If this field is omitted the value of the text key is used Note that if you use glspl Glspl NGLSpl glsdisp before using g1ls the firstplural value won t be used with Ng1s plural How the entry will appear in the document text when using glsp1 or one of its upper case variants If this field is omit ted the value is obtained by appending glspluralsuffix to the value of the text field The default value of glspluralsuffix is the letter s firstplural How the entry will appear in the document text on first use with glsp1 or one of its upper case variants If this field is omitted the value is obtained from the plural key if the first key is omitted or by appending glspluralsuffix to the value of the first field if the first field is present Note that if you use gls Gls GLS glsdisp before using glsp1 the firstplural value won t be used with glspl Note prior to version 1 13 the default value of firstplural was always taken by appending s to the first key which meant that you had to specify both plural and firstplural even if you hadn t used the first key symbol This field is provided to allow the user to specify an associ ated symbol
236. t to newglossary name glg name name gls name g10 title counter or you can also use altnewglossary altnewglossary name tag title counter which is equivalent to newglossary fag g1g name tag g1s fag g10 title counter 147 12 Defining New Glossaries It may be that you have some terms or acronyms that are so com mon that they don t need to be listed In this case you can define a special type of glossary that doesn t create any associated files This is referred to as an ignored glossary and it s ignored by commands that iterate over all the glossaries such as printglossaries To define an ignored glossary use newignoredglossary newignoredglossary name where name is the name of the glossary as above This glossary type will automatically be added to the nohypertypes list since there are no hypertargets for the entries in an ignored glossary The sample file sample entryfmt tex defines an ignored glossary You can test if a glossary is an ignored one using ifignoredglossary ifignoredglossary name true false This does true if name was defined as an ignored glossary other wise it does false Note that the main default glossary is automatically created as newglossary main gls glo glossaryname so it can be identified by the label main unless the nomain package op
237. tail in Section 1 4 If you don t have Perl installed you can use the Lua script instead makeglossaries lite lua myDoc This script doesn t have the full functionality of the Perl script but since modern TEX distributions come with Lua you shouldn t need to install anything extra to make it run Remember that since xindy is also a Perl script if you want to use xindy you ll need Perl in stalled anyway so there s no point using this Lua script if you re us ing xindy The gls and glo are temporary files created to help build your document You should not edit or explicitly input them However you may need to delete them if something goes wrong and you need to do a fresh build An overview of these three options is given in table 1 1 This document uses the glossaries package For example when viewing the PDF version of this document in a hyperlinked enabled PDF viewer such as Adobe Reader or Okular if you click on the word xindy you ll be taken to the entry in the glossary where there s a brief description of the term xindy The remainder of this introductory section covers the following e Section 1 1 lists the sample documents provided with this pack age e Section 1 3 provides information for users who wish to write in a language other than English e Section 1 4 describes how to use an indexing application to cre ate the sorted glossaries for your document Options 2 or 3 15 1 Introduction T
238. te description select group of people This is equivalent to newglossaryentry elite name lite description select group of people sort elite 78 4 Defining Glossary Entries Unless you use the package option sanitizesort true in which case it s equivalent to newglossaryentry elite name lite description select group of people sort lite Again this will place the entry before the A group With Options 2 and 3 the default value of sort will either be set to the name key if sanitizesort true or it will set it to the expan sion of the name key if sanitizesort false Take care with xindy Option 3 if you have entries with the same sort value they will be treated as the same entry Take care if you use Option 1 and the name contains fragile commands You will either need to explicitly set the sort key or use the sanitizesort true package option unless you use the def or use sort methods type This specifies the label of the glossary in which this entry belongs If omitted the default glossary is assumed unless newacronym is used see Section 13 userl user6 Six keys provided for any additional information the user may want to specify For example an associated dimension or an alternative plural or some other grammat ical construct Alternatively you can add new keys using glsaddkey or glsaddstoragekey see Section 4 3 Other keys are also provided by
239. that point in the document using Nglsadd options label This is similar to the glstext like commands only it doesn t pro duce any text so therefore there is no hyper key available in options but all the other options that can be used with glstext like com mands can be passed to glsadd For example to add a page range to the glossary number list for the entry whose label is given by set glsadd format set Lots of text about sets spanning many pages glsadd format set To add all entries that have been defined use Nglsaddall options The optional argument is the same as for glsadd except there is also a key types which can be used to specify which glossaries to use This should be a comma separated list For example if you only want to add all the entries belonging to the list of acronyms specified by the glossary type acronymt ype and a list of notation specified by the glossary type notation then you can do glsaddall types acronymtype notation Note that glsadd and Ng1saddall add the current location to the number list In the case of glsadda11 all entries in the glossary will have the same location in the number list If you want to use gl sadda11 it s best to suppress the number list with the nonumberlist package option See sections 2 3 and 5 There is now a variation of glsadda11 that skips any entries that have already been used 121 glsaddallunused
240. the widest entry in the given column altlongragged4colborder The altlongragged4colborder style is like the al tlongragged4col but has horizontal and vertical lines around it altlongragged4colheader The altlongragged4colheader style is like altlon gragged4col but has a header row altlongragged4colheaderborder The altlongragged4colheaderborder style is like altlongragged4colheader but has horizontal and vertical lines around it 15 1 4 Supertabular Styles The styles described in this section are all defined in the package glossary super Since they all use the supertabular environment they are governed by the same parameters as that environment Note that these styles will automatically be available unless you use the nosu per or nostyles package options In general the longtable environment is better but there are some circumstances where it is better to use 191 15 Glossary Styles supertabular These styles fully justify the description and page list columns If you want ragged right formatting instead use the analo gous styles described in Section 15 1 5 super The super style uses the supertabular environment defined by the supertabular package It has two columns the first column contains the entry s name and the second column contains the description followed by the number list The entry s symbol is ignored Sub groups are separated with a blank row The width of the first column is governed by the widest entr
241. the relevant information about this entry There are two required fields description and either name or parent The descrip tion is set in the third argument of longnewglossaryentry and longprovideglossaryentry With the other commands it s set via the description key Available fields are listed below name The name of the entry as it will appear in the glossary If this key is omitted and the parent key is supplied this value will be the same as the parent s name description A brief description of this term to appear in the glossary Within this value you can use nopostdesc to suppress the description terminator for this entry For exam ple if this entry is a parent entry that doesn t require a descrip tion you can do description nopostdesc If you want a paragraph break in the description use glspar or better use longnewglossaryentry However note that not all glossary styles support multi line descriptions If you are using one of the tabular like glossary styles that permit multi line descriptions use newline not if you want to force a line break 4 Defining Glossary Entries parent The label of the parent entry Note that the parent entry must be defined before its sub entries See Section 4 7 for further de tails descriptionplural The plural form of the description if required If omitted the value is set to the same as the description key text How this entry will appear in the documen
242. the value if required Now I can define a style that looks up the value of this new key to determine how to display the full form newacronymstyle mystyle style name Use the generic display ifglshaslong glslabel glsgenacfmt glsgenentryfmt Put the long form in the description renewcommands GenericAcronymFields description the glslongtok For the full format test the value of the abbrtype key If it s set to word put the short form first with the long form in brackets renewcommand genacrfullformat 2 ifglsfieldeq 1 abbrtype word is a proper acronym protect firstacronymfont glsentryshort 1 2 space oe oe oe 85 4 Defining Glossary Entries glsentrylong 1 is another form of abbreviation glsentrylong 1 2 space protect firstacronymfont glsentryshort 1 oe o9 first letter upper case version Nrenewcommand NGenacrfullformat 2 ifglsfieldeq 1 abbrtype word is a proper acronym protect firstacronymfont Glsentryshort 1 2 space glsentrylong 1 is another form of abbreviation Glsentrylong 1 2 space protect firstacronymfont glsentryshort 1 oe plural renewcommand genplacrfullformat 2 ifglsfieldeq 1 abbrtype word is a proper acronym protect firstacronymfont glsentryshortpl 1 2 s
243. this is like autolabel but uses an unnumbered sec tioning command e g chapter or Nsectionx It s designed for use with the nameref package For example Nusepackage nameref Nusepackage numberedsection nameref glossaries Now nameref main will display the TOC section ti tle associated with the main glossary As above you can redefine glsautoprefix to provide a prefix for the la bel 2 3 Glossary Appearance Options entrycounter This is a boolean option Default is entrycounter false If set each main level 0 glossary entry will be numbered when using the standard glossary styles This option creates the counter glossaryentry If you use this option you can reference the entry number within the document using glsrefentry label where label is the label associated with that glossary entry If you use glsrefentry you must run IAIEX twice after creating the glossary files using makeglossaries makeindex or xindy to ensure the cross references are up to date counterwithin This is a key value option where value is the name of a counter If used this option will automatically set en trycounter true and the glossaryentry counter will be reset every time value is incremented The glossaryentry counter isn t automatically reset at the start of each glossary except when glossary section numbering is on and the counter used by counterwithin is the same as the counter used in the glo
244. this section also have a final optional argument insert which may be used to insert material into the automatically generated text See the caveat above in Section 6 1 glslink options label link text 108 6 Links to Glossary Entries Don t use any of the gls like or glstext like commands in the argument of glslink glstext glstext options label insert This command always uses the value of the text key as the link text There are also analogous commands Glstext Glstext options text insert GLStext GLStext options text insert These convert the first character or all the characters to uppercase respectively glsfirst glsfirst options label insert E Uu o o H z D 3 a g ES lt un er un O un er 2 a c D o Q er 2 z x 0 lt o un ze gt a 3 e T x Im There are also analogous uppercasing commands Glsfirst Glsfirst options text insert GLSfirst GLSfirst options text insert glsplural glsplural options label insert This command always uses the value of the plural key as the link text There are also analogous uppercasing commands Glsplural Glsplural options text insert GLSplural GLSplural options text insert 109 glsfirstplural 6
245. tion is used Using the acronym package option is equivalent to newglossary alg acronym acr acn acronymname so it can be identified by the label acronym If you are not sure whether the acronym option has been used you can identify the list of acronymtype acronyms by the command acronymt ype which is set to acronym if the acronym option has been used otherwise it is set to main Note that if you are using the main glossary as your list of acronyms you need to declare it as a list of acronyms using the package option acronymiists The symbols package option creates a new glossary with the label symbols using newglossary slg symbols sls slo glssymbolsgroupname The numbers package option creates a new glossary with the label numbers using newglossary nlg numbers nls nlo glsnumbersgroupname The index package option creates a new glossary with the label index using newglossary ilg index ind idx indexname 148 12 Defining New Glossaries Options 2 and 3 all glossaries must be defined before makeglossaries to ensure that the relevant output files are opened See Section 1 3 1 if you want to redefine glossaryname especially if you are using babel or translator Similarly for glssymbolsgroupname and glsnumbersgroupname If you want to redefine indexname just follow the advice in How to change LaTeX s fixed names 149 13 Acronyms and Other Abbreviations
246. to redefine glslinkpostsetkeys to check for the first use flag and define a macro that can then be used in glspostlinkhook The other thing to consider is what to do with plurals One pos sibility is to check for plural use within doendsentence using glsifplural and put the full stop back if the plural has been used The complete document is contained in the sample file sample dot abbr tex 172 oldacronym 13 Acronyms and Other Abbreviations 13 2 Displaying the List of Acronyms The list of acronyms is just like any other type of glossary and can be displayed on its own using Option 1 printnoidxglossary type acronymtype Options 2 and 3 printglossary type acronymtype If you use the acronym package option you can also use printacronyms options as a synonym for printglossary type acronymt ype options See Section 2 5 Alternatively the list of acronyms can be displayed with all the other glossaries using Option 1 printnoidxglossaries Options 2 and 3 printglossaries However care must be taken to choose a glossary style that s ap propriate to your acronym style Alternatively you can define your own custom style see Section 15 2 for further details 13 3 Upgrading From the glossary Package Users of the obsolete glossary package may recall that the syntax used to define new acronyms has changed with the replacement glossaries package In addition the old glossary pack
247. translator package Instead load glossaries babel I recommend you use translate babel if you have any problems with the translations or with PDF bookmarks but to maintain backward compatibility if babel has been loaded the default is translate true If translate is specified without a value translate true is assumed If translate isn t specified translate true is assumed if babel poly glossia or translator have been loaded Otherwise translate false is assumed See Section 1 3 1 for further details notranslate This is equivalent to translate false and may be passed via the document class options nohypertypes Use this option if you have multiple glossaries and you want to suppress the entry hyperlinks for a particular glossary or glossaries The value of this option should be a comma separated list of glossary types where g1s etc shouldn t have hyperlinks by default Make sure you enclose the value in braces if it contains any commas Example Nusepackage acronym nohypertypes acronym notationj glossaries newglossary nlg notation not ntn Notation The values must be fully expanded so don t try nohypertypes acronymtype You may also use GlsDeclareNoHyperList list instead or additionally See Section 6 for further details hyperfirst This is a boolean option that specifies whether each term has a hyperlink on first use The default is hyperfirst true terms on first use have a hyperlink un
248. tryfull 155 158 161 164 Glsentryfullpl 156 glsentryfullpl 156 glsentryitem 200 203 Glsentrylong 116 155 164 166 glsentrylong 155 164 166 Glsentrylongp 155 164 glsentrylongp 155 164 Glsentryname 127 glsentryname 127 132 glsentrynumberlist 53 132 Index Glsentryplural 128 glsentryplural 128 Glsentryprefix 217 Nglsentryprefix 217 Glsentryprefixfirst 217 glsentryprefixfirst 217 Glsentryprefixfirstplural ld d Sa deal Rae e d 217 glsentryprefixfirstplural oh Gaver se hada ee aay 217 Glsentryprefixplura 217 glsentryprefixplural 217 glsentryprevcount 179 Glsentryshort 155 glsentryshort 155 Glsentryshortpl 155 glsentryshortpl 155 Glsentrysymbol 130 glsentrysymbol 116 130 Glsentrysymbolplural 131 glsentrysymbolplural 131 Glsentrytext 83 102 128 155 218 glsentrytext B3 102 126 128 132 154 NGlsentryuseri 131 Nglsentryuseri 131 200 NGlsentryuserii 191 Nglsentryuserii 131 NGlsentryuseriii 131 glsentryuseriii 131 Glsentryuseriv 131 glsentryuseriv 131 Glsentryuserv 132 Nglsentryuserv 131 Glsentryuservi 132 glsentryuservi 132 glsexpandfields 90 Xglsfielddef ode 212 glsfieldede
249. ts and I use the fmtcount package to do this I can redefine t hepage as follows renewcommands thepage Numberstring page This gets expanded to protect Numberstringnum n where n is the Arabic page number This means that I need to define a new location that has that form GlsAddXdyLocation Numberstring sep string protect space string Numberstringnum space glsopenbrace arabic numbers sep glsclosebrace Note that it s necessary to use space to indicate that spaces also appear in the format since unlike TEX x indy doesn t ignore spaces after control sequences 143 11 Xindy Option 3 Note that GlsAddXdyLocation name t definition will de fine commands in the form glsx counter x name Hprefix location for each counter that has been identified either by the counter package option the counter option for newglossary or in the argument of GlsAddXdyCounters The first argument Hprefix is only relevant when used with the hyperref package and indicates that the Hcounter is given by Hprefix the counter The sample file samplexdy tex which comes with the glossaries package uses the default page counter for locations and it uses the default glsnumberformat and a custom hyperbfit format A new xindy location called Numberstring as illustrated above is defined to make the page numbers ap pear as One Two etc In order for the location numbers to hyper
250. u can change this using GlsSetXdyFirstLetterAfterDigits GlsSetXdyFirstLetterAfterDigits letter Note that GlsSetXdyFirstLetterAfterDigits has no effect if noist is used or if makeglossaries is omitted GlsSetXdyFirstLetterAfterDigits must be used before makeglossaries 146 12 Defining New Glossaries A new glossary can be defined using NN newglossary log ext name in ext out ext title counter where name is the label to assign to this glossary The arguments in ext and out ext specify the extensions to give to the input and output files for that glossary title is the default title for this new glossary and the final optional argument counter specifies which counter to use for the associated number lists see also Section 5 The first optional argument specifies the extension for the makeindex Option 2 or xindy Option 3 transcript file this information is only used by makeglossaries which picks up the information from the auxiliary file If you use Option 1 the log ext in ext and out ext arguments are ignored The glossary label name must not contain any active characters It s generally best to stick with just characters that have category code 11 typically the non extended Latin characters for standard ATEX There is also a starred version new to v4 08 newglossaryx newglossaryx name title counter which is equivalen
251. uired to ensure this list is up to date when used with Options 2 or 3 a run of makeglossaries lversions before 3 0 used glsentryname as the default but this could cause problems when name had been sanitized 132 glsnumlistsep glsnumlistlastsep 9 Using Glossary Terms Without Links or makeindex xindy followed by one or two runs of IATRX is re quired The first command glsentrynumberlist simply displays the number list as is The second command glsdisplaynumber1list formats the list using glsnumlistsep as the separator between all but the last two elements and glsnumlistlastsep between the final two elements The defaults are _ and _ amp _ re spectively Nglsdisplaynumberlist is fairly experimental It works with Option 1 but for Options 2 or3 it only works when the default counter format is used that is when the format key is set to glsnumberformat This command will only work with hyperref if you choose Option 1 If you try using this command with Options 2 or 3 and hyperref glsentrynumberlist will be used instead For further information see section 1 11 2 Displaying entry details without adding information to the glossary in the documented code glossaries code pdf 133 printnoidxglossaries printglossaries printnoidxglossary printglossary 10 Displaying a glossary Option 1 printnoidxglossaries Must be used with makenoidxglossaries in the pre
252. umbers Appendix page numbers see Note that GlsSetXdyLocationClassOrder has no effect if noist is used or if makeglossaries is omitted GlsSetXdyLocationClassOrder must be used before makeglossaries If a number list consists of a sequence of consecutive numbers the range will be concatenated The number of consecutive locations that causes a range formation defaults to 2 but can be changed using 145 11 Xindy Option 3 GlsSetXdyMinRangeLength GlsSetXdyMinRangeLength n For example GlsSetXdyMinRangeLength 3 The argument may also be the keyword none to indicate that there should be no range formations See the xindy manual for further details on range formations Note that GlsSet XdyMinRangeLength has no effect if noist is used or if makeglossaries is omitted GlsSetXdyMinRangeLength must be used before makeglossaries See Section 5 for further details 11 3 Glossary Groups The glossary is divided into groups according to the first letter of the sort key The glossaries package also adds a number group by default unless you suppress it in the xindy package option For example usepackage xindy glsnumbers false glossaries Any entry that doesn t go in one of the letter groups or the number group is placed in the default group If you have a number group the default behaviour is to locate it before the A letter group If you are not using a Roman alphabet yo
253. unter is used This example adds the glossary to the table of contents so an extra TEX run is required latex sampleSec makeglossaries sampleSec latex sampleSec latex sampleSec 22 1 Introduction sampleNtn tex This document illustrates how to create an addi tional glossary type This example adds the glossary to the table of contents so an extra ATEX run is required latex sampleNtn makeglossaries sampleNtn latex sampleNtn latex sampleNtn Note that if you don t have Perl installed you will need to use makeindex twice instead of a single call to makeglossaries 1 Create the main glossary all on one line makeindex s sampleNtn ist t sampleNtn glg o sampleNtn gls sampleNtn glo 2 Create the secondary glossary all on one line makeindex s sampleNtn ist t sampleNtn nlg o sampleNtn not sampleNtn ntn sample tex This document illustrates some of the basics includ ing how to create child entries that use the same name as the parent entry This example adds the glossary to the table of con tents and it also uses glsrefentry so an extra MITEX run is required latex sample makeglossaries sample latex sample latex sample You can see the difference between word and letter ordering if you substitute order word with order letter Note that this will only have an effect if you use makeglossaries If you use makeindex explicitly you will need
254. urther details nolong This prevents the glossaries package from automatically load ing glossary long which means that the longtable package also 58 2 Package Options won t be loaded This reduces overhead by not defining un wanted styles and commands Note that if you use this option you won t be able to use any of the glossary styles defined in the glossary long package unless you explicitly load glossary long nosuper This prevents the glossaries package from automatically load ing glossary super which means that the supertabular package also won t be loaded This reduces overhead by not defining unwanted styles and commands Note that if you use this op tion you won t be able to use any of the glossary styles defined in the glossary super package unless you explicitly load glossary super nolist This prevents the glossaries package from automatically load ing glossary list This reduces overhead by not defining un wanted styles Note that if you use this option you won t be able to use any of the glossary styles defined in the glossary list package unless you explicitly load glossary list Note that since the default style is list you will also need to use the style option to set the style to something else notree This prevents the glossaries package from automatically load ing glossary tree This reduces overhead by not defining un wanted styles Note that if you use this option you won t be able to use
255. ustom keys using glsaddkey sample storage abbr tex This document illustrates how add custom storage keys using glsaddstoragekey sample storage abbr desc tex An extension of the previous example where the user needs to provide a description sample chap hyperfirst tex This document illustrates how to add a custom key using glsaddstoragekey and hook into the gis like and glstext like mechanism used to de termine whether or not to hyperlink an entry sample font abbr tex This document illustrates how to differ ent fonts for abbreviations within the style sample numberlist tex This document illustrates how to refer ence the number list in the document text This requires an ad ditional IATEX run latex sample numberlist makeglossaries sample numberlist latex sample numberlist latex sample numberlist samplePeople tex This document illustrates how you can hook into the standard sort mechanism to adjust the way the sort key is set This requires an additional run to ensure the table of con tents is up to date 27 1 Introduction latex samplePeople makeglossaries samplePeople latex samplePeople latex samplePeople sampleSort tex This is another document that illustrates how to hook into the standard sort mechanism An additional run is required to ensure the table of contents is up to date latex sampleSort makeglossaries sampleSort latex sampleSort latex sampleSo
256. wacronymstyle s definitions argument you can also redefine GenericAcronymFields This is a list of additional fields to be set in newacronym You can use the following token registers to access the entry label long form and short form glslabeltok glslongtok and glsshorttok 161 13 Acronyms and Other Abbreviations As with all TEX registers you can access their values by preceding the register with the For example the long short style does Nrenewcommand GenericAcronymFields description the glslongtok which sets the description field to the long form of the acronym whereas the long short desc style does renewcommand GenericAcronymFields since the description needs to be specified by the user It may be that you want to define a new acronym style that s based on an existing style Within display you can use GlsUseAcrEntryDispStyle GlsUseAcrEntryDispStyle style name to use the display definition from the style given by style name Within definitions you can use NGlsUseAcrStyleDefs GlsUseAcrStyleDefs style name to use the definitions from the style given by style name For ex ample the long sc short acronym style is based on the long short style with minor modifications remember to use instead of within definitions newacronymstyle long sc short use the same display as long short GlsUseAcrEntryDispStyle long short
257. wing defines the abbreviation IDN newacronym idn IDN identification number gls idn will produce identification number IDN on first use and IDN on subsequent uses If you want to use one of the small caps acronym styles described in Section 13 1 you need to use lower case characters for the shortened form newacronym idn idn identification number Now gls idn will produce identification number IDN on first use and IDN on subsequent uses The commands described below are similar to the glstext like commands in that they don t modify the first use flag However their display is governed by defentryfmt with glscustomtext set as appropriate All caveats that apply to the glstext like commands also apply to the following commands 151 acrshort Acrshort ACRshort acrshortpl Acrshortpl ACRshortpl acrlong Acrlong ACRlong 13 Acronyms and Other Abbreviations The optional arguments are the same as those for the glstext like commands and there are similar star and plus variants that switch off or on the hyperlinks As with the glstext like com mands the link text is placed in the argument of glstext format acrshort options label insert This sets the link text to the short form within the argument of acronymfont for the entry given by label The short form is as supplied by the short key which newacronym implicitly sets Th
258. with some minimal example files minimalgls tex mwe gls tex mwe acr texandmwe acr desc tex which can be used for testing These should be located in the samples subdirectory folder of the glossaries documentation direc tory The location varies according to your operating system and TEX installation For example on my Linux partition it can be found in usr local texlive 2014 texmf dist doc latex glossaries Further information on debugging IATEX code is available at http www dickimaw books com latex minexample If you have any problems please first consult the glossaries FAQ If that doesn t help try posting your query to somewhere like the comp text tex newsgroup the IATEX Community Forum or TEX on StackExchange Bug reports can be submitted via my package bug report form Inttp www dickimaw books com faqs glossariesfaq html nttp www latex community org Shttp tex stackexchange com http www dickimaw books com bug report html 221 Index Symbols gls codepage 47 glsorder 46 istfilename 46 newglossary 46 xdylanguage 47 A NA use nung n ed cg ume 16 NAG osuere aor e ha 154 154 accsupp package 219 220 NAGE Dossier daa e bh S ee 154 Nacf access Pure bes d 154 NAG D idee aeed eeu oad 154 NBI ED uw eure Fenn ai 154 NAGI ebeesnsed pee 154 N Gl wise b440844e08 44 154
259. ws multi line descriptions and page lists 15 1 3 Longtable Styles Ragged Right The styles described in this section are all defined in the package glossary longragged These styles are analogous to those defined in glossary long but the multiline columns are left justified instead of fully justified Since these styles all use the longtable environment they are governed by the same parameters as that environment The glossary longragged package additionally requires the array package Note that these styles will only be available if you explicitly load glossary longragged usepackage glossaries Nusepackage glossary longragged Note that you can t set these styles using the style package option since the styles aren t defined until after the glossaries package has been loaded longragged The longragged style has two columns the first column contains the entry s name and the second column contains the left justified description followed by the number list The en try s symbol is ignored Sub groups are separated with a blank row The width of the first column is governed by the widest entry in that column The width of the second column is gov erned by the length glsdescwidth Child entries have a sim ilar format to the parent entries except that their name is sup pressed longraggedborder The longraggedborder style is like longragged but has horizontal and vertical lines around it longraggedheader The longraggedheader sty
260. xing application This section covers the commands provided by the glossaries package that allow you to adjust the xi n y style file xdy and parameters To assist writing information to the xindy style file the glossaries package provides the following commands glsopenbrace glsclosebrace which produce an open and closing brace This is needed because and don t expand to a simple brace character when written to a file Similarly you can write a percent character using glspercentchar and a tilde character using glstildechar For example a newline character is specified in a xindy style file using n so you can use glstildechar n to write this correctly or you can do Nst ring n A backslash can be written to a file using glsbackslash In addition if you are using a package that makes the double quote character active e g ngerman you can use glsquote text 139 GlsSetXdyLanguage GlsSetXdyCodePage 11 Xindy Option 3 which will produce fext Alternatively you can use string to write the double quote character This document assumes that the double quote character has not been made active so the examples just use for clarity If you want greater control over the x indy style file than is avail able through the TEX commands provided by the glossaries pack age you will need to edit the xindy style file In which case you must use noist to prevent the style fil
261. y in that column The width of the second column is governed by the length glsdescwidth Child entries have a similar format to the parent entries except that their name is suppressed superborder The superborder style is like super but has horizontal and vertical lines around it superheader The superheader style is like super but has a header row superheaderborder The superheaderborder style is like superheader but has horizontal and vertical lines around it super3col The super3col style is like super but has three columns The first column contains the entry s name the second column con tains the description and the third column contains the num ber list The entry s symbol is ignored The width of the first column is governed by the widest entry in that column The width of the second column is governed by the length glsdescwidth The width of the third column is governed by the length glspagelistwidth super3colborder The super3colborder style is like the super3col style but has horizontal and vertical lines around it super3colheader The super3colheader style is like super3col but has a header row super3colheaderborder The super3colheaderborder style is like the super3colheader style but has horizontal and vertical lines around it super4col The super4col style is like super3col but has an additional column in which the entry s associated symbol appears This style is designed for entries with brief single line des
262. yDoc Some of the options available with makeglossaries are also available with makeglossaries lite lua For a complete list of available options do 43 1 Introduction makeglossaries lite lua help 1 4 3 Using xindy explicitly Option 3 Xindy comes with TEX Live but not with MiKTpEX However MikTEX users can install it See How to use Xindy with MikTeX on TEX on StackExchange If you want to use xindy to process the glossary files you must make sure you have used the xindy package option Nusepackage xindy glossaries This is required regardless of whether you use xindy explicitly or whether it s called implicitly via applications such as makeglossaries or makeglossariesgui This causes the glossary entries to be writ ten in raw xindy format so you need to use I xindy not I tex To run xindy type the following in your terminal all on one line xindy L language C encoding I xindy M style t base glg o base gls base glo where language is the required language name encoding is the en coding base is the name of the document without the tex exten sion and style is the name of the xindy style file without the xdy extension The default name for this style file is base xdy but can be changed via setStyleFile style You may need to specify the full path name depending on the current working directory If any of the file names contain spaces you must delimit them using doub
263. ym with gls svm or you can ref erence the entry in the main glossary with gls main svm 122 8 Cross Referencing Entries You must use makeglossaries Options 2 or 3 or makenoidxglossaries Option 1 before defining any terms that cross reference entries If any of the terms that you have cross referenced don t appear in the glossary check that you have put makeglossaries makenoidxglossaries before all entry definitions There are several ways of cross referencing entries in the glossary 1 You can use commands such as g1s in the entries description For example newglossaryentry apple name apple description firm round fruit See also gls pear Note that with this method if you don t use the cross referenced term in the main part of the document you will need two runs of makeglossaries latex filename makeglossaries filename latex filename makeglossaries filename latex filename 2 As described in Section 4 you can use the see key when you define the entry For example newglossaryentry MaclaurinSeries name Maclaurin series description Series expansion see TaylorsTheorem Note that in this case the entry with the see key will automat ically be added to the glossary but the cross referenced entry won t You therefore need to ensure that you use the cross referenced term with the commands described in Section 6 or Section 7 123 glssee 8
264. yprevcount you need to run IATgX twice to ensure they work correctly The doc ument build order is now at least pdf latex pdf latex makeglossaries pdf latex Example 25 Don t index entries that are only used once In this example the abbreviations that have only been used once on the previous run only have their long form shown with Ncg1s documentclass article usepackage colorlinks hyperref usepackage acronym glossaries makeglossaries glsenableentrycount setacronymstyle long short newacronym html HTML hypertext markup language newacronym css CSS cascading style sheets newacronym xml XML extensible markup language newacronym sql SQL structured query language newacronym rdbms RDBMS relational database management system newacronym rdsms RDSMS relational data stream management system PME in ae aa ae ae begin document Thes ntries are only used once cgls sql cgls rdbms cgls xml Thes ntries are used multiple times cgls html cgls html cgls css cgls css cgls css cgls rdsms cgls rdsms printglossaries end document After a complete document build latex latex makeglossaries latex the list of abbrevaitions only includes the entries HTML CSS and RDSMS The entries SQL RDBMS and XML only have their long forms displayed and don t have a hyperlink 182 14 Unsetting and Resetting Entry Flags Remember that if you

Download Pdf Manuals

image

Related Search

Related Contents

Samsung ST6500 دليل المستخدم  MSI Workstation WT60 2OK(4K Edition)-1252TR  RR-4005i User Manual    User Manual: AimPlex Multiplex Immunoassay  ENTREMETS A FROID ÉDULCORÉ PARFUM VANILLE 9102  

Copyright © All rights reserved.
Failed to retrieve file