From 9144cd7fe8a83679a67b2739e85be044b997c4a7 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 26 Jan 2016 22:53:06 +0000 Subject: glossaries (24jan15) git-svn-id: svn://tug.org/texlive/trunk@39488 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/latex/glossaries/glossary2glossaries.html | 697 ++++++++------------- 1 file changed, 256 insertions(+), 441 deletions(-) (limited to 'Master/texmf-dist/doc/latex/glossaries/glossary2glossaries.html') diff --git a/Master/texmf-dist/doc/latex/glossaries/glossary2glossaries.html b/Master/texmf-dist/doc/latex/glossaries/glossary2glossaries.html index 411bff47ee2..d2de8c4f63f 100644 --- a/Master/texmf-dist/doc/latex/glossaries/glossary2glossaries.html +++ b/Master/texmf-dist/doc/latex/glossaries/glossary2glossaries.html @@ -4,13 +4,13 @@ -Upgrading from the glossary package to the glossaries package + - + -

- +

+ - - + +

+ - - -

Upgrading from the glossary package to the -glossaries package

-
Nicola L.C. Talbot

-
2015-11-30
-
+ +

+
+

+

Upgrading from the glossary package to the +glossaries package +

+
Nicola L.C. Talbot
+
+

2016-01-24

@@ -190,7 +211,7 @@ class="abstract"

Abstract

The purpose of this document is to provide advice if you want to +class="cmr-9">The purpose of this document is to provide advice if you want to convert a LEX document from using the obsolete glossary package to the +class="cmr-9">package to replacement the replacement glossaries package.

@@ -231,15 +252,15 @@ class="cmtt-10">\useglosentry
 6.2 \useGlosentry + + +
 6.3 \gls
 6.4 \glossary - - -
7 Acronyms
 7.1 Displaying the glossary href="#processingyourdocument" id="QQ2-1-18">Processing Your Document
10 Troubleshooting -
Index

@@ -268,13 +287,13 @@ href="#index">Index href="#top">Top

1 Why the Need for a New Package?

The glossary package started out as an example in a tutorial, but I decided that I may -as well package it up and upload it to CTAN. Unfortunately it was fairly rigid and -unable to adapt well to the wide variation in glossary styles. Users began making +class="cmss-10">glossary package started out as an example in a tutorial, but I decided that I +may as well package it up and upload it to CTAN. Unfortunately it was fairly rigid +and unable to adapt well to the wide variation in glossary styles. Users began making requests for enhancements, but with each enhancement the code became more -complicated and bugs crept in. Each fix in one place seemed to cause another problem -elsewhere. In the end, it was taking up too much of my time to maintain, so I decided -to replace it with a much better designed package. With the new glossaries package:

@@ -286,8 +305,8 @@ package:
  • new glossary styles are much easier to design;
  • -
  • you can add dictionaries to supply translations for the fixed names used in - headings and by some of the glossary styles; +
  • you can add dictionaries to supply translations for the fixed names used + in headings and by some of the glossary styles;
  • you can choose1xindyxindy means that: - + - +
  • @@ -333,27 +352,27 @@ href="#top">Top

    When converting a document that currently uses the obsolete glossary package to the replacement glossaries package, it should be fairly obvious that the first thing you need -to do is replace glossaries package, it should be fairly obvious that the first thing you +need to do is replace \usepackage{glossary} with \usepackage{glossaries}, however -some of the package options are different, so you may need to change those as -well. Table \usepackage{glossaries}, +however some of the package options are different, so you may need to change those +as well. Table 1 shows the mappings from the glossary to the glossaries package options.

    - + - +


    - + - +
    Table 1: Mappings from global no corresponding option
    - + - +

    title⟩}



    -in the preamble, and, if the new glossary requires a different style to the main (default) -glossary, you will also need to put +in the preamble, and, if the new glossary requires a different style to the main +(default) glossary, you will also need to put


    glossaries new style⟩ using the same mapping given in Table 1.

    For example, if your document contains the following: - + - +

    \newglossarytype[nlg]{notation}{not}{ntn}[style=long,header]  
    \newcommand{\notationname}{Index of Notation}

    You will need to replace the above two lines with: - + - +

    \newglossary[nlg]{notation}{not}{ntn}{Index of Notation}

    in the preamble and - + - +

    \glossarystyle{longheader} @@ -601,9 +620,9 @@ class="cmss-10">style\printglossary. For example: - + - +

    \printglossary[type=notation,style=longheader] @@ -618,8 +637,8 @@ class="cmtt-10">\glossaryname and \acronymname) but is instead specified in the ⟨title⟩ argument of -title⟩ argument +of \newglossary. The short title which is specified in the glossary package by the @@ -645,23 +664,23 @@ class="cmti-10">glossary name⟩ (e.g. \makeglossary and \makeacronym) should -be replaced by the single command ) +should be replaced by the single command \makeglossaries. For example, if your document -contained the following: - + id="dx1-5003">. For example, if your +document contained the following: + - +

    \makeglossary  
    \makeacronym

    then you should replace both lines with the single line: - + - +

    \makeglossaries @@ -721,12 +740,12 @@ class="cmitt-10">gls-entry⟩}


    -This should be fairly easy to do using the search and replace facility in your editor (but -see notes below). +This should be fairly easy to do using the search and replace facility in your editor +(but see notes below).

    If you have used the optional argument of \storeglosentry (i.e. you have multiple -glossaries) then you will need to substitute + id="dx1-6009"> (i.e. you have +multiple glossaries) then you will need to substitute


    glossary ,type=gls-type}

    - + - +

    The glossary entry information ⟨gls-entry⟩ may also need changing. If ⟨" since the glossaries package deals with these characters internally. For example, if your document contains the following: - + - +

    \storeglosentry{card}{name={$"|\mathcal{S}"|$},  
    description={The cardinality of the set $\mathcal{S}$}}

    then you will need to replace it with: - + - +

    \newglossaryentry{card}{name={$|\mathcal{S}|$}, @@ -810,19 +829,19 @@ href="#top">Top

    glossary package provided two basic means to add information to the glossary: firstly, the term was defined using \storeglosentry and the entries for that term were -added using and the entries for that term +were added using \useglosentry, \useGlosentry and \gls. Secondly, the term was added -to the glossary using . Secondly, the term was +added to the glossary using \glossary. This second approach is unavailable with the glossaries -package. + id="dx1-7005">. This second approach is unavailable with the +glossaries package.

    old options⟩ should be replaced with counter=counter name⟩ -in ⟨counter +name⟩ in ⟨new options⟩. - + - +

    \gls\newglossaryentry commands, you may prefer to create a new file, in which to -store all these commands, and then input that file in your document’s preamble. Most - +store all these commands, and then input that file in your document’s preamble. + - -text editors and front-ends allow you to have multiple files open, and you can tab back -and forth between them. + +Most text editors and front-ends allow you to have multiple files open, and you can +tab back and forth between them.

    glossary package which set the name key to ⟨long⟩ (⟨abbrv⟩) and -allowed you to set a description using the abbrv⟩) +and allowed you to set a description using the description key. If you still want to do this, -you can use the key. If you still want to do +this, you can use the description package option, and use the description key in the optional -argument of key in the +optional argument of \newacronym.

    For example, if your document originally had the following: - + - +

    \newacronym{SVM}{Support Vector Machine}{description=Statistical @@ -1104,24 +1124,24 @@ class="cmss-10">glossaries package using the description package option, for example: - + - +

    \usepackage[description]{glossaries}

    and change the acronym definition to: - + - +

    \newacronym[description=Statistical pattern recognition  
    technique]{svm}{SVM}{Support Vector Machine}
    -

    You can then reference the acronym using any of the new referencing commands, such -as

    You can then reference the acronym using any of the new referencing commands, +such as \gls or \glsaddacr-name⟩ which could be used to display the acron So the above SVM example would create the command \SVM with the old package. In the new glossaries package, the acronyms are just another type -of glossary entry, so they are displayed using glossaries package, the acronyms are just another type of +glossary entry, so they are displayed using \gls{\gls{svm}. class="cmtt-10">\useacronym instead of \acr-name⟩, then you will need to replace -all occurrences of +class="cmti-10">acr-name⟩, then you will need to +replace all occurrences of


    glossary \oldacronymglossary package’s \newacronym and also defines - and +also defines \acr-name⟩. For example, if your document originally had the following: +class="cmti-10">acr-name⟩. For example, if your document originally had the +following:


    glossary - + - +

    \newacronym{SVM}{Support Vector Machine}{description=Statistical

    pattern recognition technique} @@ -1214,9 +1235,9 @@ class="cmss-10">glossary then you can change this to:


    glossaries - + - +

    \oldacronym{SVM}{Support Vector Machine}{description=Statistical

    pattern recognition technique} @@ -1227,16 +1248,16 @@ class="cmss-10">glossaries

    You can then continue to use \SVM. However, remember that LATEX generally ignores -spaces after command names that consist of alphabetical characters. You will therefore -need to force a space after EX generally +ignores spaces after command names that consist of alphabetical characters. You will +therefore need to force a space after \acr-name⟩, unless you also load the xspace package. -(See xspace +package. (See Acronyms of the glossaries documentation for further details.) Note that -glossaries documentation for further details.) Note +that \oldacronym uses its first argument to define the acronym’s label (as used by commands like \acrln and \acrsh. With -the . With the +glossaries package (provided you defined the acronym using \newacronym -or or +\oldacronym and provided you haven’t redefined \newacronym{acr-name}

    - + - +
    with


    \acrshortpl (plural short form) and \acrlongpl (plural long form) as well as upper case variations. If you use the - (plural long form) as well as upper case variations. If you use +the glossaries “shortcuts” package option, you can use \acs in place of \acrshort and +and \acl -in place of in place of \acrlong.

    See \unsetacronym

    The glossary package allows you to reset and unset the acronym flag which is used to determine whether the acronym has been used in the document. The glossaries package -also provides a means to do this on either a local or a global level. To reset an acronym, -you will need to replace: +class="cmss-10">glossaries +package also provides a means to do this on either a local or a global level. To reset +an acronym, you will need to replace:


    glossary {acr-name}

    - + - +
    with either




    - + - + or


    glossaries @@ -1539,51 +1560,51 @@ class="cmss-10">glossary package provides the command \printglossary (or \printtype⟩ for other -glossary types) which can be used to print individual glossaries. The glossaries package -provides the command type⟩ for +other glossary types) which can be used to print individual glossaries. The glossaries +package provides the command \printglossaries which will print all the glossaries which have -been defined, or which will print all the glossaries +which have been defined, or \printglossary[options] to print individual glossaries. So if you -just have ] to print individual glossaries. +So if you just have \printglossary, then you can leave it as it is, but if you have, say: - + - +

    \printglossary  
    \printglossary[acronym]

    or - + - +

    \printglossary  
    \printacronym

    then you will need to replace this with either - + - +

    \printglossaries

    or - + - +

    \printglossary @@ -1591,8 +1612,8 @@ say:

    The glossary package allows you to specify a short title (for the table of contents and -page header) by defining a command of the form glossary package allows you to specify a short title (for the table of contents +and page header) by defining a command of the form \shortglossary-typename. The @@ -1602,12 +1623,12 @@ class="cmss-10">toctitle key which can be used in the optional argument to \printglossary. For example, if you have created a -new glossary type called . For example, if you have created +a new glossary type called notation, and you had defined - + - +

    \newcommand{\shortnotationname}{Notation} @@ -1615,9 +1636,9 @@ class="cmtt-10">notation, and you had defined

    then you would need to use the toctitle key: - + - +

    \printglossary[type=notation,toctitle=Notation] @@ -1634,11 +1655,11 @@ href="#top">Top

    Processing Your Document

    If you convert your document from using the glossary package to the glossaries package, -you will need to delete any of the additional files, such as the glossaries +package, you will need to delete any of the additional files, such as the .glo file, that were -created by the file, that +were created by the glossary package, as the glossaries package uses a different format. Remember also, that if you used the makeglosmakeglossaries Perl script instead. As from v1.17, the glossaries package -can be used with either glossaries package can +be used with either makeindex or xindyTop

    Please check the FAQ for the glossaries package if you have any problems. - - - -

    +

    Index

    -

    A -

    -
    \acl  1
    -\acrln  2, 3
    -\acrlong  4, 5
    -\acrlongpl  6
    -\acronymname  7
    -\acronymtype  8, 9, 10, 11
    -\acrsh  12, 13
    -\acrshort  14, 15
    -\acrshortpl  16
    -\acs  17
    -

    F -file types
    +

    +
    file types
        .glo  18
    -

    1
    +

    G -\glossary  19, 20, 21, 22, 23, 24, 25, 26, 27
    -\glossaryname  28
    -\glossarystyle  29
    -\Gls  30
    -\gls  31, 32, 33, 34, 35, 36, 37, 38
    \gls options
    + + +     counter  39
    +href="glossary2glossaries.html#dx1-10003" >2
        number  40
    -\glsadd  41, 42, 43
    +href="glossary2glossaries.html#dx1-10002" >3
    \glsadd options
        counter  44
    -\glslink  45, 46
    -\glslocalreset  47
    -\glslocalresetall  48
    -\glslocalunset  49
    -\glslocalunsetall  50
    -\glsreset  51
    -\glsresetall  52
    -\glsunset  53
    - - - -\glsunsetall  54
    -

    I -\ifacronymfirstuse  55, 56
    -\ifglsused  57, 58
    -

    4
    +

    M -\makeacronym  59
    makeglos  60
    +href="glossary2glossaries.html#dx1-17002" >5
    makeglossaries  61, 62
    -\makeglossaries  63
    -\makeglossary  64
    +href="glossary2glossaries.html#dx1-17003" >6, 7
    makeindex  65, 66, 67, 68, 69, 70, 71, 72, 73
    -

    8, 9, 10, 11, 12, 13, 14, 15, 16
    +

    N -\newacronym  74, 75, 76, 77, 78
    -\newglossary  79, 80
    -\newglossaryentry  81, 82, 83, 84, 85, 86, 87
    \newglossaryentry options
        description  88, 89
    +href="glossary2glossaries.html#dx1-12004" >17, 18
        name  90
    -\newglossarytype  91
    -

    O -\oldacronym  92, 93, 94
    -

    19
    +

    P package options:
        description  95, 96
    -\printglossaries  97
    -\printglossary  98, 99, 100, 101, 102, 103, 104
    +href="glossary2glossaries.html#dx1-12005" >20, 21
    \printglossary options
        style  105
    +href="glossary2glossaries.html#dx1-4005" >22
        toctitle  106, 107, 108
    -

    R -\resetacronym  109
    -\resetallacronyms  110
    -

    23, 24, 25
    +

    S - - - -\shortnotationname  111
    -\storeglosentry  112, 113, 114, 115, 116, 117, 118
    \storeglosentry options
        format  119
    +href="glossary2glossaries.html#dx1-6013" >26
        number  120
    -

    27
    +

    U -\unsetacronym  121
    -\unsetallacronyms  122
    -\useacronym  123, 124, 125
    -\useGlosentry  126, 127
    -\useglosentry  128, 129
    \useglosentry options
        format  130
    +href="glossary2glossaries.html#dx1-8003" >28
        number  131
    -

    29
    +

    X xindy  132, 133, 134, 135, 136, 137, 138
    +href="glossary2glossaries.html#dx1-2004" >30, 31, 32, 33, 34, 35, 36

    + + +

    1as from v1.17. Previous versions were designed to be used with 4This is because \glossary requires the argument to be in a specific format and doesn’t use the -⟨requires the argument to be in a specific format and doesn’t use +the key=valueformat that the old glossary package used. The new package’s internal commands set this +class="cmr-8">format that the old glossary package used. The new package’s internal commands set format, as well as escaping any of this format, as well as escaping any of makeindex’s or xindy’s special characters. What’s more, the format +class="cmr-8">’s special characters. What’s more, the has changed as from v1.17 to allow the new package to be used with either format has changed as from v1.17 to allow the new package to be used with either makeindex or @@ -2052,12 +1867,12 @@ class="cmr-8">and if you use it more than once for the same term, there’s class="cmr-8">will cause makeindex to treat the two entries as different terms, even though they look the same in the +class="cmr-8">to treat the two entries as different terms, even though they look the same in document.

    +class="cmr-8">the document.

    - + -- cgit v1.2.3