summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/glossaries/glossary2glossaries.html
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/glossaries/glossary2glossaries.html')
-rw-r--r--Master/texmf-dist/doc/latex/glossaries/glossary2glossaries.html192
1 files changed, 112 insertions, 80 deletions
diff --git a/Master/texmf-dist/doc/latex/glossaries/glossary2glossaries.html b/Master/texmf-dist/doc/latex/glossaries/glossary2glossaries.html
index 74207fb56c1..77571dcf832 100644
--- a/Master/texmf-dist/doc/latex/glossaries/glossary2glossaries.html
+++ b/Master/texmf-dist/doc/latex/glossaries/glossary2glossaries.html
@@ -26,6 +26,7 @@ package">
<H1 ALIGN="CENTER">Upgrading from the glossary package to the glossaries
package</H1>
<P ALIGN="CENTER"><STRONG>Nicola L.C. Talbot</STRONG></P>
+<P ALIGN="CENTER"><STRONG>17th June 2008</STRONG></P>
<BR>
<H2><A NAME="SECTION00010000000000000000">
@@ -34,42 +35,44 @@ Contents</A>
<!--Table of Contents-->
<UL>
-<LI><A NAME="tex2html21"
+<LI><A NAME="tex2html23"
HREF="glossary2glossaries.html#SECTION00020000000000000000">1 Package Options</A>
-<LI><A NAME="tex2html22"
+<LI><A NAME="tex2html24"
HREF="glossary2glossaries.html#SECTION00030000000000000000">2 Defining new glossary types</A>
-<LI><A NAME="tex2html23"
+<LI><A NAME="tex2html25"
HREF="glossary2glossaries.html#SECTION00040000000000000000">3 &#92;make&lt;glossary name&gt;</A>
-<LI><A NAME="tex2html24"
+<LI><A NAME="tex2html26"
HREF="glossary2glossaries.html#SECTION00050000000000000000">4 Storing glossary information</A>
-<LI><A NAME="tex2html25"
+<LI><A NAME="tex2html27"
HREF="glossary2glossaries.html#SECTION00060000000000000000">5 Adding an entry to the glossary</A>
<UL>
-<LI><A NAME="tex2html26"
+<LI><A NAME="tex2html28"
HREF="glossary2glossaries.html#SECTION00061000000000000000">5.1 &#92;useglosentry</A>
-<LI><A NAME="tex2html27"
+<LI><A NAME="tex2html29"
HREF="glossary2glossaries.html#SECTION00062000000000000000">5.2 &#92;useGlosentry</A>
-<LI><A NAME="tex2html28"
+<LI><A NAME="tex2html30"
HREF="glossary2glossaries.html#SECTION00063000000000000000">5.3 &#92;gls</A>
-<LI><A NAME="tex2html29"
+<LI><A NAME="tex2html31"
HREF="glossary2glossaries.html#SECTION00064000000000000000">5.4 &#92;glossary</A>
</UL>
<BR>
-<LI><A NAME="tex2html30"
+<LI><A NAME="tex2html32"
HREF="glossary2glossaries.html#SECTION00070000000000000000">6 Acronyms</A>
<UL>
-<LI><A NAME="tex2html31"
+<LI><A NAME="tex2html33"
HREF="glossary2glossaries.html#SECTION00071000000000000000">6.1 &#92;acrln and &#92;acrsh</A>
-<LI><A NAME="tex2html32"
+<LI><A NAME="tex2html34"
HREF="glossary2glossaries.html#SECTION00072000000000000000">6.2 &#92;ifacronymfirstuse</A>
-<LI><A NAME="tex2html33"
+<LI><A NAME="tex2html35"
HREF="glossary2glossaries.html#SECTION00073000000000000000">6.3 &#92;resetacronym and &#92;unsetacronym</A>
</UL>
<BR>
-<LI><A NAME="tex2html34"
+<LI><A NAME="tex2html36"
HREF="glossary2glossaries.html#SECTION00080000000000000000">7 Displaying the glossary</A>
-<LI><A NAME="tex2html35"
+<LI><A NAME="tex2html37"
HREF="glossary2glossaries.html#SECTION00090000000000000000">8 Using makeindex</A>
+<LI><A NAME="tex2html38"
+ HREF="glossary2glossaries.html#SECTION000100000000000000000">9 Troubleshooting</A>
</UL>
<!--End of Table of Contents-->
<P>
@@ -104,7 +107,7 @@ to the <TT>glossaries</TT> package options.
<A NAME="tab:pkgopt"></A>
<DIV ALIGN="CENTER">
-<A NAME="462"></A>
+<A NAME="502"></A>
<TABLE CELLPADDING=3>
<CAPTION><STRONG>Table 1:</STRONG>
Mappings from <TT>glossary</TT> to <TT>glossaries</TT>
@@ -221,7 +224,7 @@ with
in the preamble, and
<P>
-<TT><TT>&#92;glossarystyle&#123;&lt;<I>new style list</I>&gt;&#125;</TT></TT>
+<TT><TT>&#92;glossarystyle&#123;&lt;<I>new style</I>&gt;&#125;</TT></TT>
<P>
immediately before <code>\printglossary[type=</code>&lt;<I>type</I>&gt;<code>]</code>,
if the new glossary requires a different style to the main (default)
@@ -229,7 +232,7 @@ glossary.
<P>
The &lt;<I>style list</I>&gt; optional argument can be converted to
-&lt;<I>new style list</I>&gt; using the same mapping given in
+&lt;<I>new style</I>&gt; using the same mapping given in
Table&nbsp;<A HREF="glossary2glossaries.html#tab:pkgopt">1</A>.
<P>
@@ -244,11 +247,18 @@ You will need to replace the above two lines with:
</PRE>
in the preamble, and
<PRE>
-\glossarystyle{style=longheader}
+\glossarystyle{longheader}
</PRE>
immediately prior to displaying this glossary new type.
<P>
+Alternatively, you can specify the style using the <TT>style</TT>
+key in the optional argument of <TT>&#92;printglossary</TT>. For example:
+<PRE>
+\printglossary[type=notation,style=longheader]
+</PRE>
+
+<P>
Note that the glossary title is no longer specified using
<TT>&#92;</TT>&lt;<I>glossary-type</I>&gt;<TT>name</TT> (except for <TT>&#92;glossaryname</TT>
and <TT>&#92;acronymname</TT>) but is instead specified in the &lt;<I>title</I>&gt;
@@ -289,8 +299,8 @@ With the old <TT>glossary</TT> package you could optionally store
glossary information for later use, or you could simply use
<TT>&#92;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
+available.<A NAME="tex2html2"
+ HREF="#foot504"><SUP>1</SUP></A> If
you have stored all the glossary information using
<TT>&#92;storeglosentry</TT>, then you will need to convert these commands
into the equivalent <TT>&#92;newglossaryentry</TT>. If you haven't used
@@ -344,9 +354,6 @@ description={The cardinality of the set $\mathcal{S}$}}
<P>
The <TT>format</TT> and <TT>number</TT> keys available in
<TT>&#92;storeglosentry</TT> are not available with <TT>&#92;newglossaryentry</TT>.
-Note also that the <TT>glossary</TT> package allowed you to use
-<TT>&#92;storeglosentry</TT> in the document, but <TT>&#92;newglossaryentry</TT>
-may only be used in the preamble.
<P>
@@ -408,7 +415,7 @@ Any occurrences if this command will need to be replaced with
<TT><TT>&#92;glslink[&lt;<I>new options</I>&gt;]&#123;&lt;<I>label</I>&gt;&#125;&#123;&lt;<I>text</I>&gt;&#125;</TT></TT>
<P>
The mapping from &lt;<I>old options</I>&gt; to &lt;<I>new options</I>&gt; is
-the same as that given in section&nbsp;<A HREF="glossary2glossaries.html#sec:useglosentry">5.1</A> above.
+the same as that given <A HREF="glossary2glossaries.html#sec:useglosentry">above</A>.
<P>
@@ -420,7 +427,9 @@ the same as that given in section&nbsp;<A HREF="glossary2glossaries.html#sec:use
Both the <TT>glossary</TT> and the <TT>glossaries</TT> packages define
the command <TT>&#92;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>.
+to <TT>counter</TT>. Note that the new form of <TT>&#92;gls</TT> also takes
+a final optional argument which can be used to insert text into the
+automatically generated text.
<P>
@@ -431,13 +440,13 @@ to <TT>counter</TT>.
<P>
When using the <TT>glossaries</TT> package, you should not use
<TT>&#92;glossary</TT> directly.<A NAME="tex2html3"
- HREF="#foot469"><SUP>2</SUP></A> If, with the old
+ HREF="#foot511"><SUP>2</SUP></A> If, with the old
package, you have opted to explicitly use <TT>&#92;glossary</TT> instead of
storing the glossary information with <TT>&#92;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
+ HREF="#foot512"><SUP>3</SUP></A> If
you have used <TT>&#92;glossary</TT> with the old glossary package, you will
instead need to define the relevant glossary terms using
<TT>&#92;newglossaryentry</TT> and reference the terms using <TT>&#92;glslink</TT>,
@@ -462,7 +471,7 @@ 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:
+in the <TT>glossaries</TT> package, the default definition of:
<P>
<TT><TT>&#92;newacronym[&lt;<I>options</I>&gt;]&#123;&lt;<I>label</I>&gt;&#125;&#123;&lt;<I>abbrv</I>&gt;&#125;&#123;&lt;<I>long</I>&gt;&#125;</TT></TT>
@@ -483,20 +492,10 @@ firstplural={&lt;<I>long</I>&gt;s (&lt;<I>abbrv</I>&gt;s)},
<P>
This is different to the <TT>glossary</TT> package which set the
<TT>name</TT> key to &lt;<I>long</I>&gt; (&lt;<I>abbrv</I>&gt;) 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>&#92;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.
+to set a description using the <TT>description</TT> key. If you
+still want to do this, you can use the <TT>description</TT> package
+option, and use the <TT>description</TT> key in the
+optional argument of <TT>&#92;newacronym</TT>.
<P>
For example, if your document originally had the following:
@@ -504,8 +503,12 @@ For example, if your document originally had the following:
\newacronym{SVM}{Support Vector Machine}{description=Statistical
pattern recognition technique}
</PRE>
-Then you would need to redefine <TT>&#92;newacronym</TT> as shown above,
-and change the above to:
+Then you would need to load the <TT>glossaries</TT> package using the
+<TT>description</TT> package option, for example:
+<PRE>
+\usepackage[description]{glossaries}
+</PRE>
+and change the acronym definition to:
<PRE>
\newacronym[description=Statistical pattern recognition
technique]{svm}{SVM}{Support Vector Machine}
@@ -515,6 +518,39 @@ You will also need to replace all occurrences of <TT>&#92;SVM</TT> with
<PRE>
\newcommand{\SVM}{\gls{svm}}
</PRE>
+Remember that generally LaTeX ignores all spaces following command
+names that consist of a backslash followed by letters! For example,
+using the above definition of <TT>&#92;SVM</TT>, the following will ignore
+the space after <TT>&#92;SVM</TT>:
+<PRE>
+The \SVM is a statistical pattern recognition technique.
+</PRE>
+Instead, you need to explicitly insert a space:
+<PRE>
+The \SVM\ is a statistical pattern recognition technique.
+</PRE>
+However, <code>\SVM['s]</code> is equivalent to <code>\gls{svm}['s]</code>,
+so you can do, for example:
+<PRE>
+The \SVM['s] parameters are obtained via optimisation techniques.
+</PRE>
+
+<P>
+The <TT>xspace</TT> package provides the command <TT>&#92;xspace</TT> which can
+be used to insert a space after the command name if required. Some
+people prefer to use this at the end of the command definition so
+that they don't need to remember to insert an explicit space.
+For example, if we use the <TT>xspace</TT> package, we could define
+<TT>&#92;SVM</TT> as follows:
+<PRE>
+\newcommand{\SVM}{\gls{svm}\xspace}
+</PRE>
+so now the following will have a space before the word "is":
+<PRE>
+The \SVM is a statistical pattern recognition technique.
+</PRE>
+However, you can no longer do <code>\SVM['s]</code>, as the <TT>&#92;xspace</TT> is
+now in the way.
<P>
If you have used <TT>&#92;useacronym</TT> instead of <TT>&#92;</TT>&lt;<I>acr-name</I>&gt;,
@@ -542,7 +578,9 @@ be replaced with <TT>&#92;Gls&#123;&lt;<I>label</I>&gt;&#125;</TT>.
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>&#92;acrln</TT> and <TT>&#92;acrsh</TT>. With the
-<TT>glossaries</TT> package, you can replace
+<TT>glossaries</TT> package (provided you defined the acronym using
+<TT>&#92;newacronym</TT> and provided you haven't redefined <TT>&#92;newacronym</TT>)
+you can replace
<P>
<TT><TT>&#92;acrsh&#123;&lt;<I>acr-name</I>&gt;&#125;</TT></TT>
@@ -550,44 +588,26 @@ the glossary using <TT>&#92;acrln</TT> and <TT>&#92;acrsh</TT>. With the
with
<P>
-<TT><TT>&#92;glsentrytext&#123;&lt;<I>label</I>&gt;&#125;</TT></TT>
+<TT><TT>&#92;acrshort&#123;&lt;<I>label</I>&gt;&#125;</TT></TT>
<P>
-However the <TT>glossaries</TT> package provides no direct equivalent
-of <TT>&#92;acrln</TT>. Instead it provides <TT>&#92;glsentryfirst</TT> which
-produces the ``first use'' text without adding an entry to the
-glossary, or affecting the first use flag.
+and you can replace
<P>
-Alternatively, if you haven't changed the definition of
-<TT>&#92;newacronym</TT>, the long form by itself can be obtained using
-<TT>&#92;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).
+<TT><TT>&#92;acrln&#123;&lt;<I>acr-name</I>&gt;&#125;</TT></TT>
+<P>
+with
<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>&#92;newacronym</TT> so that it uses
-the <TT>symbol</TT> key and use <TT>&#92;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>&#92;glsentrytext&#123;&lt;<I>label</I>&gt;&#125;</TT>, but you can now access just the long
-form via <TT>&#92;glsentryfirst&#123;&lt;<I>label</I>&gt;&#125;</TT> and the description via
-<TT>&#92;glsentrydesc&#123;&lt;<I>label</I>&gt;&#125;</TT>.
+<TT><TT>&#92;acrlong&#123;&lt;<I>label</I>&gt;&#125;</TT></TT>
+<P>
+The <TT>glossaries</TT> package also provides the related commands
+<TT>&#92;acrshortpl</TT> (plural short form) and <TT>&#92;acrlongpl</TT> (plural long
+form) as well as upper case variations.
<P>
See
-the section ``Using
-glossary entries in the text'' of the <TT>glossaries</TT>
+the section "Using
+glossary entries in the text" of the <TT>glossaries</TT>
manual for further details of how to use these commands.
<P>
@@ -726,16 +746,28 @@ you will need to use the <TT>makeglossaries</TT> Perl script
instead.
<P>
+
+<H1><A NAME="SECTION000100000000000000000">
+9 Troubleshooting</A>
+</H1>
+
+<P>
+Please check the <A NAME="tex2html5"
+ HREF="http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/glossariesfaq.html">FAQ</A>
+for the <TT>glossaries</TT> package if you have any
+problems.
+
+<P>
<BR><HR><H4>Footnotes</H4>
<DL>
-<DT><A NAME="foot464">...
-available</A><A
+<DT><A NAME="foot504">...
+available.</A><A
HREF="glossary2glossaries.html#tex2html2"><SUP>1</SUP></A></DT>
<DD>mainly because having a key value list in
<TT>&#92;glossary</TT> caused problems, but it also helps consistency.
</DD>
-<DT><A NAME="foot469">... directly.</A><A
+<DT><A NAME="foot511">... directly.</A><A
HREF="glossary2glossaries.html#tex2html3"><SUP>2</SUP></A></DT>
<DD>This is because <TT>&#92;glossary</TT> requires
the argument to be in a specific format and doesn't use the
@@ -747,7 +779,7 @@ recommended. If you persist in using <TT>&#92;glossary</TT> with the new
package, don't complain if things go wrong!
</DD>
-<DT><A NAME="foot470">...
+<DT><A NAME="foot512">...
benefits!</A><A
HREF="glossary2glossaries.html#tex2html4"><SUP>3</SUP></A></DT>
<DD>From the user's point of view, using <TT>&#92;glossary</TT>