diff options
author | Karl Berry <karl@freefriends.org> | 2008-03-07 19:18:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-03-07 19:18:57 +0000 |
commit | 65df837d29600b7980f1e49aa2bcee6da454bae0 (patch) | |
tree | dbd621ac42ed498c32fc49fb0bbe77753f1c32c1 /Master/texmf-dist/doc/latex/glossaries/glossary2glossaries.html | |
parent | b253317283f1d4cbf2a8c292bf3814b714e43ab3 (diff) |
glossaries update, including makeglossaries.bat in bin/win32 (4mar08)
git-svn-id: svn://tug.org/texlive/trunk@6879 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/glossaries/glossary2glossaries.html')
-rw-r--r-- | Master/texmf-dist/doc/latex/glossaries/glossary2glossaries.html | 764 |
1 files changed, 764 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/glossaries/glossary2glossaries.html b/Master/texmf-dist/doc/latex/glossaries/glossary2glossaries.html new file mode 100644 index 00000000000..74207fb56c1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries/glossary2glossaries.html @@ -0,0 +1,764 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> + +<!--Converted with LaTeX2HTML 2002 (1.67) +original version by: Nikos Drakos, CBLU, University of Leeds +* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan +* with significant contributions from: + Jens Lippmann, Marek Rouchal, Martin Wilck and others --> +<HTML> +<HEAD> +<TITLE>Upgrading from the glossary package to the glossaries +package</TITLE> +<META NAME="description" CONTENT="Upgrading from the glossary package to the glossaries +package"> +<META NAME="keywords" CONTENT="glossary2glossaries"> +<META NAME="resource-type" CONTENT="document"> +<META NAME="distribution" CONTENT="global"> + +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> +<META NAME="Generator" CONTENT="LaTeX2HTML v2002"> +<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> + + +</HEAD> + +<BODY > +<H1 ALIGN="CENTER">Upgrading from the glossary package to the glossaries +package</H1> +<P ALIGN="CENTER"><STRONG>Nicola L.C. Talbot</STRONG></P> +<BR> + +<H2><A NAME="SECTION00010000000000000000"> +Contents</A> +</H2> +<!--Table of Contents--> + +<UL> +<LI><A NAME="tex2html21" + HREF="glossary2glossaries.html#SECTION00020000000000000000">1 Package Options</A> +<LI><A NAME="tex2html22" + HREF="glossary2glossaries.html#SECTION00030000000000000000">2 Defining new glossary types</A> +<LI><A NAME="tex2html23" + HREF="glossary2glossaries.html#SECTION00040000000000000000">3 \make<glossary name></A> +<LI><A NAME="tex2html24" + HREF="glossary2glossaries.html#SECTION00050000000000000000">4 Storing glossary information</A> +<LI><A NAME="tex2html25" + HREF="glossary2glossaries.html#SECTION00060000000000000000">5 Adding an entry to the glossary</A> +<UL> +<LI><A NAME="tex2html26" + HREF="glossary2glossaries.html#SECTION00061000000000000000">5.1 \useglosentry</A> +<LI><A NAME="tex2html27" + HREF="glossary2glossaries.html#SECTION00062000000000000000">5.2 \useGlosentry</A> +<LI><A NAME="tex2html28" + HREF="glossary2glossaries.html#SECTION00063000000000000000">5.3 \gls</A> +<LI><A NAME="tex2html29" + HREF="glossary2glossaries.html#SECTION00064000000000000000">5.4 \glossary</A> +</UL> +<BR> +<LI><A NAME="tex2html30" + HREF="glossary2glossaries.html#SECTION00070000000000000000">6 Acronyms</A> +<UL> +<LI><A NAME="tex2html31" + HREF="glossary2glossaries.html#SECTION00071000000000000000">6.1 \acrln and \acrsh</A> +<LI><A NAME="tex2html32" + HREF="glossary2glossaries.html#SECTION00072000000000000000">6.2 \ifacronymfirstuse</A> +<LI><A NAME="tex2html33" + HREF="glossary2glossaries.html#SECTION00073000000000000000">6.3 \resetacronym and \unsetacronym</A> +</UL> +<BR> +<LI><A NAME="tex2html34" + HREF="glossary2glossaries.html#SECTION00080000000000000000">7 Displaying the glossary</A> +<LI><A NAME="tex2html35" + HREF="glossary2glossaries.html#SECTION00090000000000000000">8 Using makeindex</A> +</UL> +<!--End of Table of Contents--> +<P> + +<H3>Abstract:</H3> +<DIV> +The purpose of this document is to provide advice if you want +to convert a LaTeX document from using the obsolete +<TT>glossary</TT> package to the replacement <TT>glossaries</TT> package. +</DIV> +<P> + +<P> + +<H1><A NAME="SECTION00020000000000000000"> +1 Package Options</A> +</H1> + +<P> +When converting a document that currently uses the obsolete +<TT>glossary</TT> package to the replacement <TT>glossaries</TT> package, +it should be fairly obvious that the first thing you need to do is +replace <code>\usepackage{glossary}</code> with +<code>\usepackage{glossaries}</code>, however some of the package options +are different, so you may need to change those as well. +Table <A HREF="glossary2glossaries.html#tab:pkgopt">1</A> shows the mappings from the <TT>glossary</TT> +to the <TT>glossaries</TT> package options. + +<P> +<BR><P></P> +<DIV ALIGN="CENTER"> + +<A NAME="tab:pkgopt"></A> +<DIV ALIGN="CENTER"> +<A NAME="462"></A> +<TABLE CELLPADDING=3> +<CAPTION><STRONG>Table 1:</STRONG> +Mappings from <TT>glossary</TT> to <TT>glossaries</TT> +package options</CAPTION> +<TR><TH ALIGN="LEFT"><B><TT>glossary</TT> option </B></TH> +<TH ALIGN="LEFT"><B><TT>glossaries</TT> option</B></TH> +</TR> +<TR><TD ALIGN="LEFT">style=list</TD> +<TD ALIGN="LEFT">style=list</TD> +</TR> +<TR><TD ALIGN="LEFT">style=altlist</TD> +<TD ALIGN="LEFT">style=altlist</TD> +</TR> +<TR><TD ALIGN="LEFT">style=long,header=none,border=none,cols=2</TD> +<TD ALIGN="LEFT">style=long</TD> +</TR> +<TR><TD ALIGN="LEFT">style=long,header=plain,border=none,cols=2</TD> +<TD ALIGN="LEFT">style=longheader</TD> +</TR> +<TR><TD ALIGN="LEFT">style=long,header=none,border=plain,cols=2</TD> +<TD ALIGN="LEFT">style=longborder</TD> +</TR> +<TR><TD ALIGN="LEFT">style=long,header=plain,border=plain,cols=2</TD> +<TD ALIGN="LEFT">style=longheaderborder</TD> +</TR> +<TR><TD ALIGN="LEFT">style=long,header=none,border=none,cols=3</TD> +<TD ALIGN="LEFT">style=long3col</TD> +</TR> +<TR><TD ALIGN="LEFT">style=long,header=plain,border=none,cols=3</TD> +<TD ALIGN="LEFT">style=long3colheader</TD> +</TR> +<TR><TD ALIGN="LEFT">style=long,header=none,border=plain,cols=3</TD> +<TD ALIGN="LEFT">style=long3colborder</TD> +</TR> +<TR><TD ALIGN="LEFT">style=long,header=plain,border=plain,cols=3</TD> +<TD ALIGN="LEFT">style=long3colheaderborder</TD> +</TR> +<TR><TD ALIGN="LEFT">style=super,header=none,border=none,cols=2</TD> +<TD ALIGN="LEFT">style=super</TD> +</TR> +<TR><TD ALIGN="LEFT">style=super,header=plain,border=none,cols=2</TD> +<TD ALIGN="LEFT">style=superheader</TD> +</TR> +<TR><TD ALIGN="LEFT">style=super,header=none,border=plain,cols=2</TD> +<TD ALIGN="LEFT">style=superborder</TD> +</TR> +<TR><TD ALIGN="LEFT">style=super,header=plain,border=plain,cols=2</TD> +<TD ALIGN="LEFT">style=superheaderborder</TD> +</TR> +<TR><TD ALIGN="LEFT">style=super,header=none,border=none,cols=3</TD> +<TD ALIGN="LEFT">style=super3col</TD> +</TR> +<TR><TD ALIGN="LEFT">style=super,header=plain,border=none,cols=3</TD> +<TD ALIGN="LEFT">style=super3colheader</TD> +</TR> +<TR><TD ALIGN="LEFT">style=super,header=none,border=plain,cols=3</TD> +<TD ALIGN="LEFT">style=super3colborder</TD> +</TR> +<TR><TD ALIGN="LEFT">style=super,header=plain,border=plain,cols=3</TD> +<TD ALIGN="LEFT">style=super3colheaderborder</TD> +</TR> +<TR><TD ALIGN="LEFT">number=none</TD> +<TD ALIGN="LEFT">nonumberlist</TD> +</TR> +<TR><TD ALIGN="LEFT">number=<<I>counter name</I>></TD> +<TD ALIGN="LEFT">counter=<<I>counter name</I>></TD> +</TR> +<TR><TD ALIGN="LEFT">toc</TD> +<TD ALIGN="LEFT">toc</TD> +</TR> +<TR><TD ALIGN="LEFT">hypertoc</TD> +<TD ALIGN="LEFT">toc</TD> +</TR> +<TR><TD ALIGN="LEFT">hyper</TD> +<TD ALIGN="LEFT"><I>no corresponding option</I></TD> +</TR> +<TR><TD ALIGN="LEFT">section=true</TD> +<TD ALIGN="LEFT">section</TD> +</TR> +<TR><TD ALIGN="LEFT">section=false</TD> +<TD ALIGN="LEFT"><I>no corresponding option</I></TD> +</TR> +<TR><TD ALIGN="LEFT">acronym</TD> +<TD ALIGN="LEFT">acronym</TD> +</TR> +<TR><TD ALIGN="LEFT">global</TD> +<TD ALIGN="LEFT"><I>no corresponding option</I></TD> +</TR> +</TABLE> +</DIV> +</DIV> +<BR> + +<P> + +<H1><A NAME="SECTION00030000000000000000"> +2 Defining new glossary types</A> +</H1> + +<P> +If you have created new glossary types, you will need to +replace all instances of + +<P> +<TT><TT>\newglossarytype[<<I>log-ext</I>>]{<<I>type</I>>}{<<I>out-ext</I>>}{<<I>in-ext</I>>}[<<I>style list</I>>]</TT> +<BR> +<TT>\newcommand</TT><code>{\</code><<I>type</I>>name<code>}</code><TT>{<<I>title</I>>}</TT></TT> +<P> +with + +<P> +<TT><TT>\newglossary[<<I>log-ext</I>>]{<<I>type</I>>}{<<I>out-ext</I>>}{<<I>in-ext</I>>}{<<I>title</I>>}</TT></TT> +<P> +in the preamble, and + +<P> +<TT><TT>\glossarystyle{<<I>new style list</I>>}</TT></TT> +<P> +immediately before <code>\printglossary[type=</code><<I>type</I>><code>]</code>, +if the new glossary requires a different style to the main (default) +glossary. + +<P> +The <<I>style list</I>> optional argument can be converted to +<<I>new style list</I>> using the same mapping given in +Table <A HREF="glossary2glossaries.html#tab:pkgopt">1</A>. + +<P> +For example, if your document contains the following: +<PRE> +\newglossarytype[nlg]{notation}{not}{ntn}[style=long,header] +\newcommand{\notationname}{Index of Notation} +</PRE> +You will need to replace the above two lines with: +<PRE> +\newglossary[nlg]{notation}{not}{ntn}{Index of Notation} +</PRE> +in the preamble, and +<PRE> +\glossarystyle{style=longheader} +</PRE> +immediately prior to displaying this glossary new type. + +<P> +Note that the glossary title is no longer specified using +<TT>\</TT><<I>glossary-type</I>><TT>name</TT> (except for <TT>\glossaryname</TT> +and <TT>\acronymname</TT>) but is instead specified in the <<I>title</I>> +argument of <TT>\newglossary</TT>. The short title which is specified +in the <TT>glossary</TT> package by the command +<TT>\short</TT><<I>glossary-name</I>><TT>name</TT> is now specified +using the <TT>toctitle</TT> key in the optional argument to +<TT>\printglossary</TT>. + +<P> + +<H1><A NAME="SECTION00040000000000000000"> +3 <TT>\make</TT><<I>glossary name</I>></A> +</H1> + +<P> +All instances of <TT>\make</TT><<I>glossary name</I>> (e.g. +<TT>\makeglossary</TT> and <TT>\makeacronym</TT>) should be replaced +by the single command <TT>\makeglossaries</TT>. For example, if +your document contained the following: +<PRE> +\makeglossary +\makeacronym +</PRE> +then you should replace both lines with the single line: +<PRE> +\makeglossaries +</PRE> + +<P> + +<H1><A NAME="SECTION00050000000000000000"> +4 Storing glossary information</A> +</H1> + +<P> +With the old <TT>glossary</TT> package you could optionally store +glossary information for later use, or you could simply use +<TT>\glossary</TT> whenever you wanted to add information to the glossary. +With the new <TT>glossaries</TT> package, the latter option is no longer +available<A NAME="tex2html2" + HREF="#foot464"><SUP>1</SUP></A>. If +you have stored all the glossary information using +<TT>\storeglosentry</TT>, then you will need to convert these commands +into the equivalent <TT>\newglossaryentry</TT>. If you haven't used +<TT>\storeglosentry</TT>, then you'll have a bit more work to do! + +<P> +The former approach requires substituting all instances of + +<P> +<TT><TT>\storeglosentry{<<I>label</I>>}{<<I>gls-entry</I>>}</TT></TT> +<P> +with + +<P> +<TT><TT>\newglossaryentry{<<I>label</I>>}{<<I>gls-entry</I>>}</TT></TT> +<P> +This should be fairly easy to do using the search and replace +facility in your editor (but see notes below). + +<P> +If you have used the optional argument of <TT>\storeglosentry</TT> +(i.e. you have multiple glossaries) then you will need to +substitute + +<P> +<TT><TT>\storeglosentry[<<I>gls-type</I>>]{<<I>label</I>>}{<<I>gls-entry</I>>}</TT></TT> +<P> +with + +<P> +<TT><TT>\newglossaryentry{<<I>label</I>>}</TT><code>{</code><<I>gls-entry</I>>,type=<<I>gls-type</I>><code>}</code></TT> +<P> + +<P> +The glossary entry information <<I>gls-entry</I>> may also need +changing. If <<I>gls-entry</I>> contains any of <TT>makeindex</TT>'s +special characters (i.e. <TT>@</TT> <TT>!</TT> <code>"</code> or +<code>|</code>) then they should no longer be escaped with <code>"</code> +since the <TT>glossaries</TT> package deals with these characters +internally. For example, if your document contains the following: +<PRE> +\storeglosentry{card}{name={$"|\mathcal{S}"|$}, +description={The cardinality of the set $\mathcal{S}$}} +</PRE> +then you will need to replace it with: +<PRE> +\newglossaryentry{card}{name={$|\mathcal{S}|$}, +description={The cardinality of the set $\mathcal{S}$}} +</PRE> + +<P> +The <TT>format</TT> and <TT>number</TT> keys available in +<TT>\storeglosentry</TT> are not available with <TT>\newglossaryentry</TT>. +Note also that the <TT>glossary</TT> package allowed you to use +<TT>\storeglosentry</TT> in the document, but <TT>\newglossaryentry</TT> +may only be used in the preamble. + +<P> + +<H1><A NAME="SECTION00060000000000000000"> +5 Adding an entry to the glossary</A> +</H1> + +<P> +The <TT>glossary</TT> package provided two basic means to add +information to the glossary: firstly, the term was defined +using <TT>\storeglosentry</TT> and the entries for that term were +added using <TT>\useglosentry</TT>, <TT>\useGlosentry</TT> and <TT>\gls</TT>. +Secondly, the term was added to the glossary using <TT>\glossary</TT>. +This second approach is unavailable with the <TT>glossaries</TT> +package. + +<P> + +<H2><A NAME="SECTION00061000000000000000"></A> +<A NAME="sec:useglosentry"></A> +<BR> +5.1 <TT>\useglosentry</TT> +</H2> + +<P> +The <TT>glossary</TT> package allows you to add information to the +glossary for a predefined term without producing any text +in the document using + +<P> +<TT><TT>\useglosentry[<<I>old options</I>>]{<<I>label</I>>}</TT></TT> +<P> +Any occurrences of this command will need to be replaced with + +<P> +<TT><TT>\glsadd[<<I>new options</I>>]{<<I>label</I>>}</TT></TT> +<P> +The <TT>format</TT> key in <<I>old options</I>> remains the same +in <<I>new options</I>>, the <TT>number=</TT><<I>counter name</I>> +key in <<I>old options</I>> should be replaced with +<BR><TT>counter=</TT><<I>counter name</I>> in <<I>new options</I>>. + +<P> + +<H2><A NAME="SECTION00062000000000000000"> +5.2 <TT>\useGlosentry</TT></A> +</H2> + +<P> +The <TT>glossary</TT> package allows you to add information to the +glossary for a predefined term with the given text using + +<P> +<TT><TT>\useGlosentry[<<I>old options</I>>]{<<I>label</I>>}{<<I>text</I>>}</TT></TT> +<P> +Any occurrences if this command will need to be replaced with + +<P> +<TT><TT>\glslink[<<I>new options</I>>]{<<I>label</I>>}{<<I>text</I>>}</TT></TT> +<P> +The mapping from <<I>old options</I>> to <<I>new options</I>> is +the same as that given in section <A HREF="glossary2glossaries.html#sec:useglosentry">5.1</A> above. + +<P> + +<H2><A NAME="SECTION00063000000000000000"> +5.3 <TT>\gls</TT></A> +</H2> + +<P> +Both the <TT>glossary</TT> and the <TT>glossaries</TT> packages define +the command <TT>\gls</TT>. In this case, the only thing you need to +change is the <TT>number</TT> key in the optional argument +to <TT>counter</TT>. + +<P> + +<H2><A NAME="SECTION00064000000000000000"> +5.4 <TT>\glossary</TT></A> +</H2> + +<P> +When using the <TT>glossaries</TT> package, you should not use +<TT>\glossary</TT> directly.<A NAME="tex2html3" + HREF="#foot469"><SUP>2</SUP></A> If, with the old +package, you have opted to explicitly use <TT>\glossary</TT> instead of +storing the glossary information with <TT>\storeglosentry</TT>, then +converting from <TT>glossary</TT> to <TT>glossaries</TT> will be more +time-consuming, although in the end, I hope you will see the +benefits!<A NAME="tex2html4" + HREF="#foot470"><SUP>3</SUP></A> If +you have used <TT>\glossary</TT> with the old glossary package, you will +instead need to define the relevant glossary terms using +<TT>\newglossaryentry</TT> and reference the terms using <TT>\glslink</TT>, +<TT>\gls</TT> (or <TT>\glspl</TT> etc). + +<P> +If you don't like the idea of continually scrolling back to the +preamble to type all your <TT>\newglossaryentry</TT> 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 text +editors and front-ends allow you to have multiple files open, and +you can tab back and forth between them. + +<P> + +<H1><A NAME="SECTION00070000000000000000"> +6 Acronyms</A> +</H1> + +<P> +In the <TT>glossary</TT> package, acronyms were treated differently +to glossary entries. This resulted in inconsistencies and sprawling +unmaintainable code. The new <TT>glossaries</TT> package treats +acronyms in exactly the same way as normal glossary terms. In fact, +in the <TT>glossaries</TT> package: + +<P> +<TT><TT>\newacronym[<<I>options</I>>]{<<I>label</I>>}{<<I>abbrv</I>>}{<<I>long</I>>}</TT></TT> +<P> +is a shortcut for: + +<P> +<TT><TT>\newglossaryentry{<<I>label</I>>}</TT>{type=<TT>\acronymtype</TT>, +name=<TT>{<<I>abbrv</I>>}</TT>, +description=<TT>{<<I>long</I>>}</TT>, +text=<TT>{<<I>abbrv</I>>}</TT>, +first={<<I>long</I>> (<<I>abbrv</I>>)}, +plural={<<I>abbrv</I>>s}, +firstplural={<<I>long</I>>s (<<I>abbrv</I>>s)}, +<<I>options</I>>}</TT> +<P> + +<P> +This is different to the <TT>glossary</TT> package which set the +<TT>name</TT> key to <<I>long</I>> (<<I>abbrv</I>>) and allowed you +to set a description using the <TT>description</TT> key. If you want +your document to remain like this, you can redefine <TT>\newacronym</TT> +as follows: +<PRE> +\renewcommand{\newacronym}[4][]{% +\newglossaryentry{#2}{type=\acronymtype, +name={#4 (#3)}, +text={#3}, +first={#4 (#3)}, +plural={#3s}, +firstplural={#4s (#3s)},#1}} +</PRE> +The <TT>description</TT> key will then need to be entered using the +optional argument. + +<P> +For example, if your document originally had the following: +<PRE> +\newacronym{SVM}{Support Vector Machine}{description=Statistical +pattern recognition technique} +</PRE> +Then you would need to redefine <TT>\newacronym</TT> as shown above, +and change the above to: +<PRE> +\newacronym[description=Statistical pattern recognition +technique]{svm}{SVM}{Support Vector Machine} +</PRE> +You will also need to replace all occurrences of <TT>\SVM</TT> with +<code>\gls{svm}</code>. Alternatively, you can define <TT>\SVM</TT>: +<PRE> +\newcommand{\SVM}{\gls{svm}} +</PRE> + +<P> +If you have used <TT>\useacronym</TT> instead of <TT>\</TT><<I>acr-name</I>>, +then you will need to replace all occurrences of + +<P> +<TT><TT>\useacronym[<<I>insert</I>>]{<<I>acr-name</I>>}</TT></TT> +<P> +with + +<P> +<TT><TT>\gls{<<I>label</I>>}[<<I>insert</I>>]</TT></TT> +<P> +Note that the starred versions of <TT>\useacronym</TT> and +<TT>\</TT><<I>acr-name</I>> (which make the first letter uppercase) should +be replaced with <TT>\Gls{<<I>label</I>>}</TT>. + +<P> + +<H2><A NAME="SECTION00071000000000000000"> +6.1 <TT>\acrln</TT> and <TT>\acrsh</TT></A> +</H2> + +<P> +In the <TT>glossary</TT> package, it is possible to produce the +long and short forms of an acronym without adding an entry to +the glossary using <TT>\acrln</TT> and <TT>\acrsh</TT>. With the +<TT>glossaries</TT> package, you can replace + +<P> +<TT><TT>\acrsh{<<I>acr-name</I>>}</TT></TT> +<P> +with + +<P> +<TT><TT>\glsentrytext{<<I>label</I>>}</TT></TT> +<P> +However the <TT>glossaries</TT> package provides no direct equivalent +of <TT>\acrln</TT>. Instead it provides <TT>\glsentryfirst</TT> which +produces the ``first use'' text without adding an entry to the +glossary, or affecting the first use flag. + +<P> +Alternatively, if you haven't changed the definition of +<TT>\newacronym</TT>, the long form by itself can be obtained using +<TT>\glsentrydesc</TT>, since by default the <TT>description</TT> key is +set to the long form (but read the notes in the <TT>glossaries</TT> +manual regarding the <TT>sanitize</TT> package option). + +<P> +If you want to be able to set a description, and be able to +independently access the description, the long form and the +short form, you can redefine <TT>\newacronym</TT> so that it uses +the <TT>symbol</TT> key and use <TT>\defglsdisplayfirst</TT> +so that it uses this value on first use, as follows: +<PRE> +\renewcommand{\newacronym}[4][]{\newglossaryentry{#2}{% +name={#4 (#3)}, +text={#3}, +first={#4}, +symbol={#3}, +}} +\defglsdisplayfirst{\acronymtype}{##1 (##3)##4} +</PRE> +As before, you can access the short name via +<TT>\glsentrytext{<<I>label</I>>}</TT>, but you can now access just the long +form via <TT>\glsentryfirst{<<I>label</I>>}</TT> and the description via +<TT>\glsentrydesc{<<I>label</I>>}</TT>. + +<P> +See +the section ``Using +glossary entries in the text'' of the <TT>glossaries</TT> +manual for further details of how to use these commands. + +<P> + +<H2><A NAME="SECTION00072000000000000000"> +6.2 <TT>\ifacronymfirstuse</TT></A> +</H2> + +<P> +The <TT>glossary</TT> package command + +<P> +<TT><TT>\ifacronymfirstuse{<<I>acr-name</I>>}{<<I>text1</I>>}{<<I>text2</I>>}</TT></TT> +<P> +can be replaced by the <TT>glossaries</TT> command: + +<P> +<TT><TT>\ifglsused{<<I>label</I>>}{<<I>text2</I>>}{<<I>text1</I>>}</TT></TT> +<P> +Note that <TT>\ifglsused</TT> evaluates the opposite condition to +that of <TT>\ifacronymfirstuse</TT> which is why the last two arguments +have been reversed. + +<P> + +<H2><A NAME="SECTION00073000000000000000"> +6.3 <TT>\resetacronym</TT> and <TT>\unsetacronym</TT></A> +</H2> + +<P> +The <TT>glossary</TT> 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 <TT>glossaries</TT> package also +provides a means to do this on either a local or global level. +To reset an acronym, you will need to replace: + +<P> +<TT><TT>\resetacronym{<<I>acr-name</I>>}</TT></TT> +<P> +with either + +<P> +<TT><TT>\glsreset{<<I>label</I>>}</TT></TT> +<P> +or + +<P> +<TT><TT>\glslocalreset{<<I>label</I>>}</TT></TT> +<P> + +<P> +To unset an acronym, you will need to replace: + +<P> +<TT><TT>\unsetacronym{<<I>acr-name</I>>}</TT></TT> +<P> +with either + +<P> +<TT><TT>\glsunset{<<I>label</I>>}</TT></TT> +<P> +or + +<P> +<TT><TT>\glslocalunset{<<I>label</I>>}</TT></TT> +<P> + +<P> + +<H1><A NAME="SECTION00080000000000000000"> +7 Displaying the glossary</A> +</H1> + +<P> +The <TT>glossary</TT> package provides the command <TT>\printglossary</TT> +(or <TT>\print</TT><<I>type</I>> for other glossary types) which +can be used to print individual glossaries. The <TT>glossaries</TT> +package provides the command <TT>\printglossaries</TT> which +will print all the glossaries which have been defined, or +<TT>\printglossary[<<I>options</I>>]</TT> to print individual glossaries. +So if you just have <TT>\printglossary</TT>, then you can leave it as +it is, but if you have, say: +<PRE> +\printglossary +\printglossary[acronym] +</PRE> +or +<PRE> +\printglossary +\printacronym +</PRE> +then you will need to either replace this with either +<PRE> +\printglossaries +</PRE> +or +<PRE> +\printglossary +\printglossary[type=\acronymtype] +</PRE> + +<P> +The <TT>glossary</TT> package allows you to specify a short title +(for the table of contents and page header) by defining a command +of the form <TT>\short</TT><<I>glossary-type</I>><TT>name</TT>. The +<TT>glossaries</TT> package doesn't do this, but instead provides +the <TT>toctitle</TT> key which can be used in the optional +argument to <TT>\printglossary</TT>. For example, if you have created +a new glossary type called <TT>notation</TT>, and you had +defined +<PRE> +\newcommand{\shortnotationname}{Notation} +</PRE> +then you would need to use the <TT>toctitle</TT> key: +<PRE> +\printglossary[type=notation,toctitle=Notation] +</PRE> +The <TT>glossaries</TT> package will ignore <TT>\shortnotationname</TT>, +so unless you have used it elsewhere in the document, you may +as well remove the definition. + +<P> + +<H1><A NAME="SECTION00090000000000000000"> +8 Using makeindex</A> +</H1> + +<P> +If you convert your document from using the <TT>glossary</TT> package +to the <TT>glossaries</TT> package, you will need to delete any of +the additional files, such as the <TT>.glo</TT> file, that were +created by the <TT>glossary</TT> package, as the <TT>glossaries</TT> +package uses a different <TT>makeindex</TT> style file. +Remember also, that if you used the <TT>makeglos</TT> Perl script, +you will need to use the <TT>makeglossaries</TT> Perl script +instead. + +<P> +<BR><HR><H4>Footnotes</H4> +<DL> +<DT><A NAME="foot464">... +available</A><A + HREF="glossary2glossaries.html#tex2html2"><SUP>1</SUP></A></DT> +<DD>mainly because having a key value list in +<TT>\glossary</TT> caused problems, but it also helps consistency. + +</DD> +<DT><A NAME="foot469">... directly.</A><A + HREF="glossary2glossaries.html#tex2html3"><SUP>2</SUP></A></DT> +<DD>This is because <TT>\glossary</TT> requires +the argument to be in a specific format and doesn't use the +<<I>key</I>>=<<I>value</I>> format that the old glossary package used. The +new package's internal commands set this format, as well as escaping +any of <TT>makeindex</TT>'s special characters, so although it is +still possible to use <TT>\glossary</TT> with the new package, it's not +recommended. If you persist in using <TT>\glossary</TT> with the new +package, don't complain if things go wrong! + +</DD> +<DT><A NAME="foot470">... +benefits!</A><A + HREF="glossary2glossaries.html#tex2html4"><SUP>3</SUP></A></DT> +<DD>From the user's point of view, using <TT>\glossary</TT> +throughout the document is time consuming, and if you use it more than +once for the same term, there's a chance extra spaces may creep in +which will cause <TT>makeindex</TT> to treat the two entries as +different terms, even though they look the same in the document. + +</DD> +</DL> +<BR><HR> + +</BODY> +</HTML> |