From fcd87a9cfad7e0d21b6843d62708c8ee5dbbe174 Mon Sep 17 00:00:00 2001
From: Karl Berry
glossaries-extra.sty v1.19: an extension to the
+class="cmr-17">glossaries-extra.sty v1.20: an extension to the
glossaries package
2017-09-08
The individual glossary displaying commands \printglossary, -, \printnoidxglossary and \printunsrtglossary have an extra key +and \printunsrtglossary have two extra keys: +
+The . This is a boolean key which can be used to switch off the automatic + hypertarget for each entry. Unlike \glsdisablehyper this doesn’t switch + off hyperlinks, so any cross-references within the glossary won’t be affected. + This is a way of avoiding duplicate target warnings if a glossary needs to + be displayed multiple times. +
The \newglossaryentry command has three new keys:
The test file The test file example-glossaries-xr.tex contains dummy entries with a mixture of
+
+
+
see, , alias and and seealso keys for use with minimal working examples. There are also
+ id="dx1-5016"> keys for use with minimal working examples. There are also
example-glossaries-*.bib files that correspond to each example-glossaries-*.tex
file for testing bib2gls.
- The .
+ The \longnewglossaryentry command now has a starred version (as from v1.12)
that doesn’t automatically insert
@@ -1643,11 +1659,11 @@ that doesn’t automatically insert
at the end of the description field.
- at the end of the description field.
+
+
The descriptionplural key is left unset unless explicitly set in ⟨ key is left unset unless explicitly set in ⟨options⟩.
- The unstarred version no longer hard-codes the above code (which removes
+ The unstarred version no longer hard-codes the above code (which removes
trailing space and suppresses the post-description hook) but instead uses:
-
+
This can be redefined to allow the post-description hook to work but retain the
\unskip part if required. For example:
@@ -1680,56 +1696,56 @@ class="cmtt-10">\unskip This will discarded unwanted trailing space at the end of the description but won’t
+ This will discarded unwanted trailing space at the end of the description but won’t
suppress the post-description hook.
- The unstarred version also alters the base The unstarred version also alters the base glossaries package’s treatment of the
+ id="dx1-5022"> package’s treatment of the
descriptionplural key. Since a plural description doesn’t make much sense for
+ id="dx1-5023"> key. Since a plural description doesn’t make much sense for
multi-paragraph descriptions, the default behaviour with glossaries-extra’s
+ id="dx1-5024">’s
\longnewglossaryentry is to simply leave the plural description unset
unless explicitly set using the descriptionplural key. The key. The glossaries.sty version
of this command sets the description’s plural form to the same as the
singular.2.1
- Note that this modified unstarred version doesn’t append
+ Note that this modified unstarred version doesn’t append \glsxtrpostlongdescription
to the description’s plural form.
- The The \newterm command (defined through the command (defined through the index package option) is modified
+ id="dx1-5033"> package option) is modified
so that the category defaults to index. The . The \newacronym command is modified
+ id="dx1-5035"> command is modified
to use the new abbreviation interface provided by glossaries-extra. (See §3
Abbreviations.)
- The The \makeglossaries command now has an optional argument.
-
+
If ⟨list⟩ is empty, \makeglossaries behaves as per its original definition in the
@@ -1737,29 +1753,29 @@ class="cmtt-10">\makeglossaries It should then be possible to use It should then be possible to use \printglossary for those glossaries listed in ⟨list⟩
and \printnoidxglossary for the other glossaries. (See the accompanying file
sample-mixedsort.tex for an example.)
-
-
+ You will need at least version 2.20 of makeglossaries or at least version 1.3 of
the Lua alternative makeglossaries-lite.lua (both distributed with (both distributed with glossaries
v4.27) to allow for this use of \makeglossaries[⟨list⟩]. Alternatively, use the
automake option.
+ id="dx1-5041"> option.
The The glossaries-extra package provides extra keys for commands like \gls and
wrgloss=after for specific instances. Note that this opti
settings (such as noindex).
- The default value is set up using
- The default value is set up using
+
+
which is defined as:
@@ -1856,15 +1872,15 @@ class="cmtt-10">\glsxtrinitwrgloss This sets the conditional
- This sets the conditional
+
+
which is used to determine where to perform the indexing.
- This means you can set the This means you can set the wrgloss attribute to \GlsXtrSetDefaultGlsOpts\glsxtrinitwrgloss There is a new hook that’s used each time indexing information is written to the
+ There is a new hook that’s used each time indexing information is written to the
external glossary files:
-
+
where ⟨label⟩ is the entry’s label. This does nothing by default but may be redefined.
(See, for example, the accompanying sample file sample-indexhook.tex, which uses
this hook to determine which entries haven’t been indexed.)
- As from version 1.14, there are two new keys for As from version 1.14, there are two new keys for \glsadd: thevalue and thevalue keys is intended
primarily for adding locations in supplementary material that can’t be obtained from
a counter.
- The principle key The principle key thevalue is for the location value. The other key theHvalue
- For example,
+ For example, makeindex will only accept locations in the form [⟨num⟩⟨
\glsadd[thevalue={Supplementary Material}]{sample}
For example, suppose the file For example, suppose the file suppl.tex contains:
@@ -1987,7 +2003,7 @@ class="cmtt-10">suppl.tex This has an entry on page S.2. Suppose another document wants to include this
+ This has an entry on page S.2. Suppose another document wants to include this
location in the glossary. Then this can be done by setting thevalue to \glsadd[thevalue={S.2}]{sample}
This location value will be accepted by This location value will be accepted by makeindex as it’s in the form ⟨num⟩⟨sep⟩⟨num⟩.
- If you want hyperlinks, things are more complicated. First you need to set the
+ If you want hyperlinks, things are more complicated. First you need to set the
externallocationexternallocation Next you need to add Next you need to add glsxtrsupphypernumber as the format:
@@ -2037,7 +2053,7 @@ class="cmtt-10">glsxtrsupphypernumber Both documents will need to use the Both documents will need to use the hyperref package. Remember that the counter
used for the location also needs to match. If sample-suppl-main-hyp.tex for an example that uses
hyperref.
-
- For example, if both
+ For example, if both sample-suppl-hyp.pdf and sample-suppl-main-hyp.pdf
are in the same directory, then viewing sample-suppl-main-hyp.pdf in Evince will
take you to the correct location in the linked document (when you click on the S.2
external link), but Okular will take you to the top of the first page of the linked
document.
-
+
The value of the The value of the see key is now saved as a field. This isn’t the case with glossaries,
@@ -2100,20 +2116,20 @@ class="cmss-10">document This modification allows This modification allows glossaries-extra to provide
-
+
which is used at the end of the document to automatically add any unused
cross-references unless the package option indexcrossrefs was set to false.
- As a by-product of this enhancement, the As a by-product of this enhancement, the see key will now work for entries
defined in the see
value to be stored even though it may not be possible to index it at that
point.
- As from version 1.06, you can display the cross-referenced information for a given
+ As from version 1.06, you can display the cross-referenced information for a given
entry using
-
+
This internally uses
-
+
where ⟨tag⟩ and ⟨xr list⟩ are obtained from the value of the entry’s see field hasn’t been set for the entry given by
⟨label⟩.
- Suppose you want to suppress the Suppose you want to suppress the number list using nonumberlist. This
@@ -2198,7 +2214,7 @@ class="cmss-10">see Another approach in this situation is to use the post description hook
+ Another approach in this situation is to use the post description hook
with \glsxtrusesee to append the cross-reference after the description. For
example:
@@ -2213,11 +2229,11 @@ example:
Now the cross-references can appear even though the Now the cross-references can appear even though the number list has been
suppressed.
- As from v1.16, there’s a separate As from v1.16, there’s a separate seealso key. Unlike see\seealsoname You can display the formatted list of cross-references stored in the You can display the formatted list of cross-references stored in the seealso key
using:
-
+
This works in much the same way as \glsxtrusesee but it internally uses
-
+
For example:
@@ -2274,20 +2290,20 @@ For example:
- The actual unformatted comma-separated list ⟨
+ The actual unformatted comma-separated list ⟨xr-list⟩ stored in the seealso field
can be accessed with:
-
+
This will just expand to the ⟨xr-labels⟩ provided in the value of the seealso[ The base The base glossaries package provides \glsseelist, which requires a
@@ -2313,20 +2329,20 @@ class="cmti-10">label
+
which fully expands its argument and passes it to \glsseelist.
- The The seealso key implements the automatic indexing using
-
+
which just does
+
Recall from the Recall from the glossaries package that commands such as \gls display text at
that point in the document (optionally with a hyperlink to the relevant
@@ -2372,7 +2388,7 @@ whether or not it actually has a hyperlink. The actual text and the way
it’s displayed depends on the command used (such as \gls) and the entry
format.
- The default entry format ( The default entry format (\glsentryfmt) used in the § This means that entries with a short form can be treated as regular entries rather
+ This means that entries with a short form can be treated as regular entries rather
than abbreviations if it’s more appropriate for the desired style.
- As from version 1.04, As from version 1.04, \glsentryfmt now puts \glsgenentry in the argument of
the new command
-
+
This just does its argument ⟨text⟩ by default. This means that if you want regular
entries in a different font but don’t want that font to apply to abbreviations, then
@@ -2479,7 +2495,7 @@ class="cmtt-10">\glsxtrregularfont For example:
+ For example:
@@ -2487,7 +2503,7 @@ class="cmtt-10">\glstextformat You can access the label through You can access the label through \glslabel. For example, you can query the
category:
@@ -2498,7 +2514,7 @@ category:
\renewcommand*{\glsxtrregularfont}[1]{%
or query the category attribute:
+ or query the category attribute:
@@ -2508,7 +2524,7 @@ category:
or use the attribute to store the control sequence name:
+ or use the attribute to store the control sequence name:
@@ -2522,7 +2538,7 @@ category:
(Remember the category and attribute settings will only queried here for (Remember the category and attribute settings will only queried here for regular
@@ -2532,7 +2548,7 @@ class="cmss-10">acronym The The \glspostlinkhook provided by the glossaries package to insert information
after the link-text produced by commands like \gls and \glstext is redefined
to
-
+
This command will discard a following full stop (period) if the discardperiod attribute
is set to “true” for the current entry’s category. It will also do
-
+
if a full stop hasn’t be discarded and
-
+
if a full stop has been discarded.
-
- By default
+ By default \glsxtrpostlink just does \glsxtrpostlink⟨category⟩general The sentence-ending hook is slightly more complicated. If the command
+ The sentence-ending hook is slightly more complicated. If the command
\glsxtrpostlink⟨category⟩ There are some convenient commands you might want to use when customizing
+ There are some convenient commands you might want to use when customizing
the post-link-text category hooks:
-
+
This will add the description in parentheses on first use.
- For example, suppose you want to append the description in parentheses on For example, suppose you want to append the description in parentheses on first
use for entries in the symbolsymbol
-
+
+
This will append the symbol (if defined) in parentheses on first use.
- If you want to provide your own custom format be aware that you can’t use
+ If you want to provide your own custom format be aware that you can’t use
\ifglsused within the post-link-text hook as by this point the first use flag will have
been unset. Instead you can use
-
+
This will do ⟨true⟩ if the last used entry was the first use for that entry, otherwise it
@@ -2677,7 +2693,7 @@ locally set by commands like \gls, so don’t rely on it outside of the post-link-text
hook.
-
- For example, if you want to place the description in a footnote after the
+ For example, if you want to place the description in a footnote after the link-text
on first use for the general \glsxtrifwasfirstuse{\footnote{\glsentrydesc{\glslabel}}}{}%
- The
+ The short-postfootnote abbreviation style uses the post-link-text hook to place the
footnote after trailing punctuation characters.
- You can set the default options used by You can set the default options used by \glslink, \gls etc with:
-
+
For example, if you mostly don’t want to index entries then you can do:
@@ -2745,7 +2761,7 @@ For example, if you mostly don’t want to index entries then you can do:
and then use, for example, and then use, for example, \gls[noindex=false]{sample} when you actually want
the location added to the \glslink Note that if you don’t want Note that if you don’t want any indexing, just omit \makeglossaries and
wrgloss\glsxtrinitwrgloss
- If you want to change the default value of
+ If you want to change the default value of format, you can instead use:
-
+
This has the advantage of also working for \glsadd. For example, if you
want all locations in the back matter to appear in italic (unless explicitly
@@ -2789,8 +2805,8 @@ overridden):
\backmatter
- Commands like
+ Commands like \gls have star (*) and plus (hyper=false and hyper=true. The glossaries-extra package provides a way to add a
third modifier, if required, using
-
+
where ⟨char⟩ is the character used as the modifier and ⟨options⟩ is the default set of
options (which may be overridden). Note that ⟨char⟩ must be a single character (not a
UTF-8 character, unless you are using XƎLATEX or LuaLATEX).
-
- Example:
+
+ Example:
@@ -2829,7 +2845,7 @@ class="cmti-10">char This means that This means that \gls!{sample} will be equivalent to \gls[noindex]{sample}. It’s
not possible to mix modifiers. For example, if you want to do
@@ -2840,17 +2856,17 @@ not possible to mix modifiers. For example, if you want to do
you can use you can use \gls*[noindex]{sample} or \gls![hyper=false]{sample} but you
can’t combine the * and ! modifiers.
- Location lists displayed with \printnoidxglossary internally use
-
+
This command is provided by glossaries, but is modified by glossaries-extra to check
@@ -2874,8 +2890,8 @@ class="cmtt-10">( If the range identifiers aren’t present, this just uses
- If the range identifiers aren’t present, this just uses
+
+
otherwise it uses
-
+
for the start of a range (where the identifier has been stripped from ⟨format⟩)
or
-
+
for the end of a range (where the identifier has been stripped from ⟨format⟩).
- By default the start range command saves the format in
- By default the start range command saves the format in
+
+
and does The end command checks that the format matches the start of the range,
+ The end command checks that the format matches the start of the range,
does
-
+
(which does nothing by default), followed by This means that the list
+ This means that the list
@@ -2967,7 +2983,7 @@ class="cmtt-10">\glsxtrlocrangefmt doesn’t display any differently from
+ doesn’t display any differently from
@@ -2977,14 +2993,14 @@ class="cmtt-10">\glsxtrlocrangefmt but it does make it easier to define your own custom list handler that can
+ but it does make it easier to define your own custom list handler that can
accommodate the ranges.
-
+
The The \glsenableentrycount command is modified to allow for the §5
Categories).
- For example, instead of just doing:
+ For example, instead of just doing:
@@ -3005,7 +3021,7 @@ href="#sec:categories">Categories).
you now need to do:
+ you now need to do:
@@ -3014,21 +3030,21 @@ href="#sec:categories">Categories).
\glsenableentrycount
This will enable the entry counting for entries in the This will enable the entry counting for entries in the abbreviation category, but any
entries assigned to other categories will be unchanged.
- Further information about entry counting, including the new per-unit feature, is
+ Further information about entry counting, including the new per-unit feature, is
described in §6 Entry Counting.
-
+
Some languages, such as English, have a general rule that plurals are formed from
+ Some languages, such as English, have a general rule that plurals are formed from
the singular with a suffix appended. This isn’t an absolute rule. There are
plenty of exceptions (for example, geese, children, churches, elves, fairies,
sheep). The plural To make life easier for languages where the majority of plurals can simply be
+ To make life easier for languages where the majority of plurals can simply be
formed by appending a suffix to the singular, the glossaries package sets lets the plural supplied as well, and you only need to use it for the
exceptions.
- For languages that don’t have this general rule, the For languages that don’t have this general rule, the plural field will always need to
be supplied, where needed.
- There are other plural fields, such as There are other plural fields, such as firstplural, longpluralshortplural If these fields are omitted, the If these fields are omitted, the glossaries package follows these rules: This This last case is changed with glossaries-extra. With this extension package, the
\abbrvpluralsuffix is redefined. In most cases its redefined to
use
-
+
which defaults to just \glspluralsuffix. Some of the abbreviation styles have their
own command for the plural suffix, such as \abbrvpluralsuffix, which changes with
the style. Redefining \acrpluralsuffix will have no affect, since it’s not used by the
new abbreviation mechanism.
- If you require a mixture (for example, in a multilingual document), there are two
+ If you require a mixture (for example, in a multilingual document), there are two
attributes that affect the short plural suffix formation. The first is aposplural
'\abbrvpluralsuffix
That is, an apostrophe followed by That is, an apostrophe followed by \abbrvpluralsuffix is appended. The second
attribute is shortpluralshort
+
Complications arise when you use Complications arise when you use \gls in the value of the name Things can go wrong if we try the following with the Things can go wrong if we try the following with the glossaries package:
@@ -3219,8 +3235,8 @@ class="cmss-10">glossaries
- The main problems are:
+
+ The main problems are:
which just doesn’t work. Grouping the which just doesn’t work. Grouping the \gls{ssi} doesn’t work either as this
will effectively try to do
@@ -3249,7 +3265,7 @@ class="cmtt-10">\gls{ssi} This will upper case the label This will upper case the label ssi so the entry won’t be recognised.
This problem will also occur if you use the all capitals version, such as
shtml. For example:
This produces:
+ This produces:
This section discusses server side includes (SSI), hypertext
+ This section discusses server side includes (SSI), hypertext
markup language (HTML) and SSI enabled HTML (SHTML). So the So the first use of the shtml entry produces “SSI enabled HTML (SHTML)”.
- Now let’s suppose the Now let’s suppose the html entry is used before the shtml but the ssi entry is
@@ -3312,17 +3328,17 @@ class="cmtt-10">shtml This produces:
+ This produces:
The sample files are either hypertext markup language (HTML)
+ The sample files are either hypertext markup language (HTML)
or server side includes (SSI) enabled HTML (SHTML), but let’s
first discuss SSI. So the So the first use of the shtml entry now produces “server side includes (SSI)
enabled HTML (SHTML)”, which looks a bit strange.
- Now let’s suppose the Now let’s suppose the shtml entry is used before (or without) the other two
entries:
@@ -3332,17 +3348,17 @@ class="cmtt-10">shtml This produces:
+ This produces:
This article is an introduction to server side includes (SSI)
+ This article is an introduction to server side includes (SSI)
enabled hypertext markup language (HTML) (SHTML). So the So the first use of the shtml entry now produces “server side includes (SSI)
enabled hypertext markup language (HTML) (SHTML)”, which is even more
strange.
- This is all aggravated by setting the style using the This is all aggravated by setting the style using the glossaries package’s
\setacronymstyle. For example:
@@ -3353,7 +3369,7 @@ class="cmtt-10">\setacronymstyle as this references the label through the use of as this references the label through the use of \glslabel when displaying the
long and short forms, but this value changes with each use of \gls, so
@@ -3365,7 +3381,7 @@ class="cmtt-10">\glslabel Another oddity occurs if you reset the Another oddity occurs if you reset the html entry between uses of the shtml
entry. For example:
@@ -3376,10 +3392,10 @@ class="cmtt-10">shtml The next use of The next use of shtml produces “Shypertext markup language (HTML)”,
which is downright weird.
- Even without this, the short form has nested formatting commands, which
+ Even without this, the short form has nested formatting commands, which
amount to \acronymfont{S\acronymfont{HTML}}. This may not be a problem
for some styles, but if you use one of the “sm” styles (that use hyperref
- For these reasons it’s better to use the simple expandable commands
+ For these reasons it’s better to use the simple expandable commands
like \glsentrytext or [description={\acrshort{ssi} enabled \acrshort{html}}]
with with glossaries or:
@@ -3440,7 +3456,7 @@ class="cmss-10">glossaries with with glossaries-extra. This fixes all the above listed problems (as long as you don’t
use \glsdescfirst use issue, but it doesn’t fix any of the other problems listed
above.
- If it’s simply that you want to use the abbreviation font, you can use
+ If it’s simply that you want to use the abbreviation font, you can use
\glsabbrvfont:
@@ -3465,10 +3481,10 @@ class="cmtt-10">\glsabbrvfont This will pick up the font style setting of the outer entry (shtml, in the above case).
+ This will pick up the font style setting of the outer entry (shtml, in the above case).
This isn’t a problem in the above example as all the abbreviations use the same
style.
- However if you’re really determined to use However if you’re really determined to use \gls in a field that may be included
within some
\gls{ssi} enabled \gls{html}
is treated as
+ is treated as
@@ -3501,7 +3517,7 @@ form
{\glstext[hyper=false,noindex]{ssi}} enabled
This overcomes problems This overcomes problems 4, 5 and 6 listed above, but still doesn’t fix problems long-noshort-desc).
- Additionally, any instance of the long form commands, such as Additionally, any instance of the long form commands, such as \glsxtrlong or
shtml entry had instead been defined as:
then (using the then (using the long-short style) the first use will be like
{\acronymfont{\glsentryshort{ssi}}} enabled
whereas if the entry is defined as:
+ whereas if the entry is defined as:
@@ -3578,7 +3594,7 @@ href="#glo:firstuse">first use will be like
\newabbreviation{shtml}{SHTML}{\glsxtrshort{ssi} enabled
then the then the first use will be like:
@@ -3589,7 +3605,7 @@ href="#glo:firstuse">first use Note that the first optional argument of Note that the first optional argument of \acrshort or \glsxtrshort is ignored in
this context. (The final optional argument will be inserted, if present.) The
@@ -3600,8 +3616,8 @@ class="cmtt-10">\glsxtrshort Alternatively you can use:
- Alternatively you can use:
+
+
where ⟨field⟩ is the field label and corresponds to a command in the form \gls⟨\glstext) or in the form \glsxtr⟨field⟩ (e.g. \glsxtrshort).
- There’s a shortcut command for the most common fields:
- There’s a shortcut command for the most common fields:
+
+
which is equivalent to \glsxtrp{short}{⟨label⟩}, and
-
+
which is equivalent to \glsxtrp{text}{⟨label⟩}.
- The The \glsxtrp command behaves much like the \glsfmt⟨field⟩ commands described
@@ -3664,14 +3680,14 @@ class="cmss-10">noindex
+
For example:
@@ -3680,17 +3696,17 @@ For example:
will just switch off the hyperlinks but not the indexing. Be careful using
+ will just switch off the hyperlinks but not the indexing. Be careful using
this command or you can end up back to the original problem of nested
links.
- The hyper link is re-enabled within glossaries. This is done through the
+ The hyper link is re-enabled within glossaries. This is done through the
command:
-
+
which by default just does
@@ -3699,7 +3715,7 @@ which by default just does
You can redefine this if you want to adjust the setting when You can redefine this if you want to adjust the setting when \glsxtrp is used in the
glossary. For example:
@@ -3709,8 +3725,8 @@ glossary. For example:
- For example,
+
+ For example,
@@ -3718,7 +3734,7 @@ glossary. For example:
is equivalent to
+ is equivalent to
@@ -3728,7 +3744,7 @@ glossary. For example:
in the main body of the document or
+ in the main body of the document or
@@ -3738,8 +3754,8 @@ glossary. For example:
inside the glossary. (Note the post-link hook is locally disabled.)
- If inside the glossary. (Note the post-link hook is locally disabled.)
+ If \glsxtrp{short}{ssi} occurs in a sectioning mark, it’s equivalent
to
@@ -3749,19 +3765,19 @@ to
(which recognises the (which recognises the headuc attribute.)
- If If hyperref has been loaded, then the bookmark will use \glsentry⟨field⟩
(\glsentryshort{ssi} in the above example).
- There are similar commands
- There are similar commands
+
+
for first letter upper case and
-
+
for all upper case.
-
- You can, with care, protect against issue
+ You can, with care, protect against issue 1 by inserting an empty group at the
start if the long form starts with a command that breaks the first letter uppercasing
commands like \Gls, but you still won’t be able to use the all caps commands, such
as \GLS.
- If you If you really need nested commands, the safest method is
@@ -3813,8 +3829,8 @@ class="cmti-10">really need but be aware that it may have some unexpected results occasionally.
- Example document:
+ but be aware that it may have some unexpected results occasionally.
+ Example document:
@@ -3844,16 +3860,16 @@ class="cmti-10">really need
-
+
+
The The glossaries-extra package provides a new way of dealing with abbreviations and
redefines \newacronymglossaries-extra before you define any entries. For example, the following document using just
+ before you define any entries. For example, the following document using just
glossaries
@@ -3892,7 +3908,7 @@ class="cmss-10">glossaries can be easily adapted to use can be easily adapted to use glossaries-extra:
@@ -3909,7 +3925,7 @@ class="cmss-10">glossaries-extra Table Table 2.1 lists the nearest equivalent glossaries-extra abbreviation styles for the
predefined acronym styles provided by The reason for introducing the new style of abbreviation commands provided by
+ The reason for introducing the new style of abbreviation commands provided by
glossaries-extra is because the original acronym commands provided by glossaries are
@@ -4177,15 +4193,15 @@ class="cmss-10">glossaries-extra
+
(before any use of \newacronym).
- \RestoreAcronyms should not be used in combination with the newer
glossaries-extra abbreviations. Don’t combine old and new style entries with the same
@@ -4195,7 +4211,7 @@ class="cmss-10">type
- In general, there’s rarely any need for
+ In general, there’s rarely any need for \RestoreAcronyms. If you have a
document that uses \newacronymstyle§3.5 Defining New Abbreviation Styles for further
details.)
-
+
The space command \glsacspace used by the long-sp-short acronym style provided
by glossaries is modified so that it uses
-
+
instead of the hard-coded 3em. This is a command not a length and so can be
changed using \renewcommand.
- Any of the new abbreviation styles that use Any of the new abbreviation styles that use \glsxtrfullsep (such as \glsacspace with
- The
+ The first use acronym font command
-
+
is redefined to use the first use abbreviation font command \glsfirstabbrvfont.
This will be reset if you use \RestoreAcronyms.
- The subsequent use acronym font command
- The subsequent use acronym font command
+
+
is redefined to use the subsequent use abbreviation font command \glsabbrvfont.
This will be reset if you use \RestoreAcronyms.
The default value of The default value of \glslistdottedwidth is changed so that it’s set at the start
of the document (if it hasn’t been changed in the preamble). This should
take into account situations where \hsize isn’t set until the start of the
document.
- The The glossaries package tries to determine the group title from its label by first
checking if \glsxtr@grouptitle@⟨label⟩
which shouldn’t clash with another package. You can set the group title
using
-
+
For example:
@@ -4336,13 +4352,13 @@ For example:
-
+
+
The commands The commands \glossentryname and \glossentrydesc§ There is a hook after There is a hook after \glossentryname and \Glossentryname:
-
+
By default this checks the indexname attribute. If the attribute exists for the
category to which the label belongs, then the name is automatically indexed
using
-
+
See §7 Auto-Indexing for further details.
- As from version 1.04, the post-name hook As from version 1.04, the post-name hook \glsxtrpostnamehook will also use
\glsxtrpostname⟨ (\glsentrysymbol{\glscurrententrylabel})}
- The post-description code used within the glossary is modified so that it also
+
+ The post-description code used within the glossary is modified so that it also
does
-
+
This occurs before the original \glspostdescription, so if the nopostdot=false
option is used, it will be inserted before the terminating full stop.
- This new command will do This new command will do \glsxtrpostdesc⟨category⟩ if it exists, where
⟨general\glsxtrpostdescacronym Since both Since both \glossentry and \subglossentry set
-
+
to the label for the current entry, you can use this within the definition of these
post-description hooks if you need to reference the label.
- For example, suppose you want to insert the plural form in brackets after the
+ For example, suppose you want to insert the plural form in brackets after the
description in the glossary, but only for entries in the general category, then you could
@@ -4465,10 +4481,10 @@ do:
\renewcommand{\glsxtrpostdescgeneral}{\space
This means you don’t have to define a custom glossary style, which you may find
+ This means you don’t have to define a custom glossary style, which you may find
more complicated. (It also allows more flexibility if you decide to change the
underlying glossary style.)
-
-
+
+
The The number list is now placed inside the argument of
-
+
This is internally used by \glossaryentrynumbers. The nonumberlist\glossaryentrynumbers
- If you want to, for example, change the font for the entire
+ If you want to, for example, change the font for the entire number list
then redefine \GlsXtrFormatLocationList as appropriate. Don’t modify
\glossaryentrynumbers.
- Sometimes users like to insert “page” or “pages” in front of the Sometimes users like to insert “page” or “pages” in front of the number list. This
is quite fiddly to do with the base glossaries package, but glossaries-extra provides a
way of doing this. First you need to enable this option and specify the text to display
using:
-
+
where ⟨page⟩ is the text to display if the number list only contains a single location and
@@ -4556,28 +4572,28 @@ class="cmti-10">pages An extra run is required when using this command.
- An extra run is required when using this command.
+
- See the accompanying sample file
+ See the accompanying sample file sample-pages.tex.
- Note that Note that bib2gls
+
As from v1.02, As from v1.02, glossaries-extra now includes the package glossaries-extra-stylemods that
@@ -4594,7 +4610,7 @@ class="cmss-10">glossaries-extra Alternatively you can load Alternatively you can load glossary-⟨name⟩.sty at the same time by passing ⟨glossaries-extra-stylemods\usepackage[longragged]{glossaries-extra-stylemods}
Another option is to use the Another option is to use the stylemods key when you load long3col
\usepackage[style=long3col,stylemods]{glossaries-extra}
Or the value of Or the value of stylemods may be a comma-separated list of the style package
@@ -4639,7 +4655,7 @@ identifiers. For example:
Remember to group the value if it contains any commas:
+ Remember to group the value if it contains any commas:
@@ -4647,8 +4663,8 @@ identifiers. For example:
- Note that the
+ Note that the inline style is dealt with slightly differently. The original definition
provided by the inlinenopostdot As from version 1.05, the As from version 1.05, the glossaries-extra-stylemods package provides some
additional commands for use with the alttreenotree
+
This is like \glssetwidest (provided by glossary-tree) but performs a protected
expansion on ⟨name⟩. This has a localised effect. For a global setting, use
-
+
The widest entry value can later be retrieved using
-
+
for the top-level entries and
-
+
for sub-entries, where ⟨level⟩ is the level number.
- The command The command \glsfindwidesttoplevelname provided by glossary-tree has a
CamelCase synonym:
-
+
Similar commands are also provided:
-
+
This has an additional check that the entry has been used. Naturally this is only
useful if the glossaries that use the alttree
+
This is like the previous command but if doesn’t check the parent key. This is useful if
all levels should have the same width for the name.
-
+
This is like the previous command but doesn’t check if the entry has been
used.
-
+
This is like \glsFindWidestUsedTopLevelName but also sets the first two sub-levels
as well. Any entry that has a great-grandparent is ignored.
-
+
This is like the previous command but doesn’t check if the entry has been
used.
-
+
This is like \glsFindWidestUsedAnyName but also measures the symbol. The length
of the widest symbol is stored in ⟨register⟩.
-
+
This is like the previous command but it doesn’t check if the entry has been
used.
-
+
This is like \glsFindWidestUsedAnyNameSymbol but also measures the symbol register
+
This is like the previous command but it doesn’t check if the entry has been
used.
-
+
This is like \glsFindWidestUsedAnyNameSymbolLocation but doesn’t measure the
symbol. The length of the widest number list is stored in ⟨register⟩.
-
+
This is like the previous command but doesn’t check if the entry has been
used.
- The layout of the symbol, description and The layout of the symbol, description and number list is governed by
-
+
for top-level entries and
-
+
for sub-entries.
- There is now a user level command that performs the initialisation for the There is now a user level command that performs the initialisation for the alttree
style:
-
- The paragraph indent for subsequent paragraphs in multi-paragraph descriptions
+
+ The paragraph indent for subsequent paragraphs in multi-paragraph descriptions
is provided by the length
- Abbreviations include acronyms (words formed from initial letters, such as
+ Abbreviations include acronyms (words formed from initial letters, such as
“laser”), initialisms (initial letters of a phrase, such as “html”, that aren’t
pronounced as words) and contractions (where parts of words are omitted, often
replaced by an apostrophe, such as “don’t”). The “acronym” code provided by the
@@ -4996,10 +5012,10 @@ to be described for readers unfamiliar with the term). They are therefore
more like a regular term, which may or may not require a description in the
glossary.
- The The glossaries-extra package corrects this misnomer, and provides better
abbreviation handling, with
-
- This sets the
+ This sets the category key to abbreviation by default, but that value may be
@@ -5037,7 +5053,7 @@ href="#sec:categories">§5
Categories for further details.
- See See §2.6 Nested Links regarding the pitfalls of using commands like \glsxtrshort within ⟨short⟩ or ⟨long⟩.
-
- The
+ The \newacronym command provided by the glossaries package is redefined by
@@ -5065,7 +5081,7 @@ class="cmtt-10">acronym
+
is
now
equivalent
@@ -5104,7 +5120,7 @@ class="cmtt-10">} The The \newabbreviation command is superficially similar to the glossaries
package’s abbreviationglossaries The way the abbreviations are displayed by commands like The way the abbreviations are displayed by commands like \gls varies according
to the abbreviation style. The styles are set according to the entry’s category so,
unlike the base glossaries package, you can have different abbreviation styles within
the same glossary.
- There are two types of full forms. The display full form, which is used on
+ There are two types of full forms. The display full form, which is used on
first use by commands like short-footnote, the display and inline full forms are
different.
- These formatting commands aren’t stored in the These formatting commands aren’t stored in the short, shortplural\glsxtrlong If you would like to tag the initial letters in the long form such that those letters are
+ If you would like to tag the initial letters in the long form such that those letters are
underlined in the glossary but not in the main part of the document, you can
use
-
+
before you define your abbreviations.
- This command (robustly) defines ⟨ This command (robustly) defines ⟨cs⟩ (a control sequence) to accept a single
argument, which is the letter (or letters) that needs to be tagged. The normal
behaviour of this command within the document is to simply do its argument, but in
@@ -5199,21 +5215,21 @@ href="#catattr.tagging">tagging attribute set to
“true”. For those cases it will use
-
+
This command defaults to \underline{⟨text⟩} but may be redefined as required.
- The control sequence ⟨ The control sequence ⟨cs⟩ can’t already be defined when used with the unstarred
version of \GlsXtrEnableInitialTagging for safety reasons. The starred
@@ -5225,7 +5241,7 @@ commands, ensure that you don’t redefine something important. In fact, jus
forget the existence of the starred version and let’s pretend I didn’t mention
it.
- The first argument of The first argument of \GlsXtrEnableInitialTagging is a comma-separated list
of category names. The §5 Categories) but
this must be done before the glossary is displayed.
- The accompanying sample file The accompanying sample file sample-mixtures.tex uses initial tagging for both
the acronymabbreviation This defines the command This defines the command \itag which can be used in the definitions. For
example:
@@ -5269,18 +5285,18 @@ example:
The underlining of the tagged letters only occurs in the glossary and then only for
+ The underlining of the tagged letters only occurs in the glossary and then only for
entries with the tagging attribute set.
-
+
The abbreviation style must be set before abbreviations are defined using:
- The abbreviation style must be set before abbreviations are defined using:
+
+
where ⟨style-name⟩ is the name of the style and ⟨category⟩ is the category label
@@ -5312,11 +5328,11 @@ class="cmss-10">regular
- Note that
+ Note that \setacronymstyle is disabled by glossaries-extra. Use Abbreviations can be used with the standard Abbreviations can be used with the standard glossaries commands, such as \gls,
@@ -5347,7 +5363,7 @@ class="cmtt-10">\acrshort
+
(Use this instead of \acrshort.)
- The long form can be produced with
- The long form can be produced with
+
+
(Use this instead of \acrlong.)
- The The inline full form can be produced with
-
+
(This this instead of \acrfull.)
-
- As mentioned earlier, the inline full form may not necessarily match the format
+
+ As mentioned earlier, the inline full form may not necessarily match the format
used on first use with short-nolongfirst use, but the full form will display the long form followed by the
short form in parentheses.
-
- The arguments ⟨
+ The arguments ⟨options⟩, ⟨label⟩ and ⟨insert⟩ are the same as for commands such as
\glstext. There are also analogous case-changing commands:
- First letter upper case short form:
- First letter upper case short form:
+
- First letter upper case long form:
-
+ First letter upper case long form:
+
- First letter upper case inline full form:
-
+ First letter upper case inline full form:
+
- All upper case short form:
+
+ All upper case short form:
-
- All upper case long form:
-
+ All upper case long form:
+
- All upper case inline full form:
-
+ All upper case inline full form:
+
- Plural forms are also available.
- Short form plurals:
-
+ Plural forms are also available.
+ Short form plurals:
+
-
+
-
+
- Long form plurals:
-
+ Long form plurals:
+
-
+
-
+
- Full form plurals:
-
+ Full form plurals:
+
-
+
-
+
-
+
-
+
+
The abbreviation shortcut commands can be enabled using the package option
+ The abbreviation shortcut commands can be enabled using the package option
shortcutstable 3.1.
- There are two types of abbreviation styles: those that treat the abbreviation as a
+ There are two types of abbreviation styles: those that treat the abbreviation as a
regular entry (so that \gls uses \gls uses \glsxtrgenabbrvfmt).
- The regular entry abbreviation styles set the The regular entry abbreviation styles set the regular attribute to “true” for the
@@ -6017,7 +6033,7 @@ class="cmss-10">long The other abbreviation styles don’t modify the The other abbreviation styles don’t modify the regular attribute. The \glsxtrfullformat that are defined by the
style).
- In both cases, the In both cases, the first use of \gls may not match the text produced by
\glsfirst (and likewise for the plural and case-changing versions).
- The sample file The sample file sample-abbr-styles.tex demonstrates all predefined styles
described here.
-
- The parenthetical styles, such as
+ The parenthetical styles, such as long-short, use
-
+
to set the parenthetical material. This just puts parentheses around the text:
(⟨text⟩).
- The basic abbreviation styles, such as The basic abbreviation styles, such as long-short and short-long use
-
-
-
-2.1 Entry Indexing
-
-
}%
}
-
-
\gls{sample}.
\end{document}
\end{document}
name={sample},description={an example}}
2.2 Cross-References (“see” and “see also”)
-
-
-
-
{}%
}
-
-
{}%
}
-
-
-2.3 Entry Display Style Modifications
-
-
\glsifcategory{\glslabel}{general}{\textsf{#1}}{#1}}
\renewcommand*{\glsxtrregularfont}[1]{%
\glsifattribute{\glslabel}{font}{sf}{\textsf{#1}}{#1}}
{#1}%
}
-
-
-
-
}
-
-
}
-
-
\GlsXtrSetDefaultNumberFormat{hyperit}
-
-
-
-
-
-
\glsxtrdisplaysingleloc{⟨}
-
\glsxtrdisplaysingleloc{⟨\glsxtrlocrangefmt to empty.
-
\glsnoidxdisplayloc{}{page}{textbf}{1},
\glsnoidxdisplayloc{}{page}{)textbf}{1}.
\glsnoidxdisplayloc{}{page}{textbf}{1},
\glsnoidxdisplayloc{}{page}{textbf}{1}.
2.4 Entry Counting Modifications
-
\glssetcategoryattribute{abbreviation}{entrycount}{1}
2.5 Plurals
-
@@ -3133,7 +3149,7 @@ class="cmtt-10">\acrpluralsuffix
short
-2.6 Nested Links
-
\newacronym{html}{HTML}{Hypertext Markup Language}
\newacronym{shtml}{S\gls{html}}{\gls{ssi} enabled \gls{html}}
first discuss \gls{ssi}.
{shtml}{SHTML}{SSI enabled HTML}
[description={\glsxtrshort{ssi} enabled \glsxtrshort{html}}]
{shtml}{SHTML}{SSI enabled HTML}
\newabbreviation{shtml}{shtml}{\glsabbrvfont{ssi} enabled
\glsabbrvfont{html}}
{\glstext[hyper=false,noindex]{html}}
{\acronymfont{\glsentryshort{html}}} (SHTML)
\glsxtrshort{html}}
{\glsabbrvfont{\glsentryshort{html}}} (SHTML)
-
-
-
-
-
\glsxtrshort[hyper=false,noindex]{ssi}[]%
}
\glsxtrshort[noindex]{ssi}[]%
}
-
-
\glsxtrp{short}{html}}
\printglossaries
\end{document}
2.7 Acronym Style Modifications
-
\printglossaries
\end{document}
\printglossaries
\end{document}
-
-
-
-
-2.8 Glossary Style Modifications
-
-2.8.1 Style Hooks
-
-
-
-
-
(plural: \glsentryplural{\glscurrententrylabel})}
2.8.2 Number List
-
-
-2.8.3 The glossaries-extra-stylemods Package
-
\usepackage{glossary-longragged}
\usepackage{glossaries-extra-stylemods}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-3. Abbreviations
-
-
-3.1 Tagging Initials
-
-
-
\newabbreviation{xml}{XML}
{e\itag{x}tensible \itag{m}arkup \itag{l}anguage}
3.2 Abbreviation Styles
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-3.3 Shortcut Commands
-
-3.4 Predefined Abbreviation Styles
-
-