diff options
author | Karl Berry <karl@freefriends.org> | 2007-10-13 22:42:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-10-13 22:42:44 +0000 |
commit | 00fd18b649b5eaa172d3831df80680767d22be33 (patch) | |
tree | e3eb17ea921ac52daecd5852599288d6b80680a2 /Master/texmf-dist/doc/latex/glossaries | |
parent | 90e9a2ff73654ae1262eb867fc7ab09bb0f587d3 (diff) |
glossaries 1.08 (13oct07)
git-svn-id: svn://tug.org/texlive/trunk@5177 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/glossaries')
-rw-r--r-- | Master/texmf-dist/doc/latex/glossaries/README | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/glossaries/doc/CHANGES | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/glossaries/doc/glossaries.pdf | bin | 475628 -> 500567 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/glossaries/doc/glossary2glossaries.html | 746 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/glossaries/doc/glossary2glossaries.pdf | bin | 0 -> 158711 bytes | |||
-rwxr-xr-x | Master/texmf-dist/doc/latex/glossaries/scripts/makeglossaries | 229 | ||||
-rwxr-xr-x | Master/texmf-dist/doc/latex/glossaries/scripts/makeglossaries.bat | 3 |
7 files changed, 988 insertions, 2 deletions
diff --git a/Master/texmf-dist/doc/latex/glossaries/README b/Master/texmf-dist/doc/latex/glossaries/README index eb8924735a1..4e57293dab8 100644 --- a/Master/texmf-dist/doc/latex/glossaries/README +++ b/Master/texmf-dist/doc/latex/glossaries/README @@ -1,6 +1,6 @@ -LaTeX Package : glossaries v 1.07 +LaTeX Package : glossaries v 1.08 -Last Modified : 13 September 2007 +Last Modified : 13 October 2007 Author : Nicola Talbot diff --git a/Master/texmf-dist/doc/latex/glossaries/doc/CHANGES b/Master/texmf-dist/doc/latex/glossaries/doc/CHANGES index f9dce2cc0a9..4f3111053bc 100644 --- a/Master/texmf-dist/doc/latex/glossaries/doc/CHANGES +++ b/Master/texmf-dist/doc/latex/glossaries/doc/CHANGES @@ -1,5 +1,13 @@ glossaries change log: +v1.08 (13 Oct 2007): + * Added multilingual support + * Fixed bug in listgroup and altlistgroup styles so that + \glsgroupheading uses \glsgetgrouptitle to get the group title + instead of displaying the label + * Fixed typo in error message text when the description key + is missing to \newglossaryentry. + v1.07 (13 Sep 2007): * Fixed bug causing incorrect page number for entries in the first paragraph of a page. diff --git a/Master/texmf-dist/doc/latex/glossaries/doc/glossaries.pdf b/Master/texmf-dist/doc/latex/glossaries/doc/glossaries.pdf Binary files differindex 7adbe440f7e..f43e59e629d 100644 --- a/Master/texmf-dist/doc/latex/glossaries/doc/glossaries.pdf +++ b/Master/texmf-dist/doc/latex/glossaries/doc/glossaries.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries/doc/glossary2glossaries.html b/Master/texmf-dist/doc/latex/glossaries/doc/glossary2glossaries.html new file mode 100644 index 00000000000..235ac5000db --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries/doc/glossary2glossaries.html @@ -0,0 +1,746 @@ +<!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="tex2html19" + HREF="glossary2glossaries.html#SECTION00020000000000000000">1 Package Options</A> +<LI><A NAME="tex2html20" + HREF="glossary2glossaries.html#SECTION00030000000000000000">2 Defining new glossary types</A> +<LI><A NAME="tex2html21" + HREF="glossary2glossaries.html#SECTION00040000000000000000">3 \make<glossary name></A> +<LI><A NAME="tex2html22" + HREF="glossary2glossaries.html#SECTION00050000000000000000">4 Storing glossary information</A> +<LI><A NAME="tex2html23" + HREF="glossary2glossaries.html#SECTION00060000000000000000">5 Adding an entry to the glossary</A> +<UL> +<LI><A NAME="tex2html24" + HREF="glossary2glossaries.html#SECTION00061000000000000000">5.1 \useglosentry</A> +<LI><A NAME="tex2html25" + HREF="glossary2glossaries.html#SECTION00062000000000000000">5.2 \useGlosentry</A> +<LI><A NAME="tex2html26" + HREF="glossary2glossaries.html#SECTION00063000000000000000">5.3 \gls</A> +<LI><A NAME="tex2html27" + HREF="glossary2glossaries.html#SECTION00064000000000000000">5.4 \glossary</A> +</UL> +<BR> +<LI><A NAME="tex2html28" + HREF="glossary2glossaries.html#SECTION00070000000000000000">6 Acronyms</A> +<UL> +<LI><A NAME="tex2html29" + HREF="glossary2glossaries.html#SECTION00071000000000000000">6.1 \acrln and \acrsh</A> +<LI><A NAME="tex2html30" + HREF="glossary2glossaries.html#SECTION00072000000000000000">6.2 \ifacronymfirstuse</A> +<LI><A NAME="tex2html31" + HREF="glossary2glossaries.html#SECTION00073000000000000000">6.3 \resetacronym and \unsetacronym</A> +</UL> +<BR> +<LI><A NAME="tex2html32" + HREF="glossary2glossaries.html#SECTION00080000000000000000">7 Displaying the glossary</A> +<LI><A NAME="tex2html33" + 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="457"></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="#foot459"><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> +If 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! 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. However, if you have used <TT>\glossary</TT>, you will need +to define the term using <TT>\newglossaryentry</TT>, and then use +<TT>\glsadd{<<I>label</I>>}</TT> (or <TT>\glslink{<<I>label</I>>}{<<I>text</I>>}</TT> +if you have used <TT>\xglossary</TT>.) + +<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="foot459">... +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> +</DL> +<BR><HR> +<ADDRESS> +<A href=http://theoval.cmp.uea.ac.uk/~nlct/>Nicola L. C. Talbot</A>. +<A HREF=http://www.cmp.uea.ac.uk/>School of Computing Sciences</A>. +<A HREF=http://www.uea.ac.uk/>University of East Anglia.</A> +Last Modified: 2007-09-15 +</ADDRESS> +</BODY> +</HTML> diff --git a/Master/texmf-dist/doc/latex/glossaries/doc/glossary2glossaries.pdf b/Master/texmf-dist/doc/latex/glossaries/doc/glossary2glossaries.pdf Binary files differnew file mode 100644 index 00000000000..fd9d18c7c63 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries/doc/glossary2glossaries.pdf diff --git a/Master/texmf-dist/doc/latex/glossaries/scripts/makeglossaries b/Master/texmf-dist/doc/latex/glossaries/scripts/makeglossaries new file mode 100755 index 00000000000..aaa0c1b36d0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries/scripts/makeglossaries @@ -0,0 +1,229 @@ +#!/usr/bin/perl + +# File : makeglossaries +# Author : Nicola Talbot +# Version : 1.0 (2007/05/10) +# Description: simple Perl script that calls makeindex. +# Intended for use with "glossaries.sty" (saves having to remember +# all the various switches) + +# This file is distributed as part of the glossaries LaTeX package. +# Copyright 2007 Nicola L.C. Talbot +# This work may be distributed and/or modified under the +# conditions of the LaTeX Project Public License, either version 1.3 +# of this license of (at your option) any later version. +# The latest version of this license is in +# http://www.latex-project.org/lppl.txt +# and version 1.3 or later is part of all distributions of LaTeX +# version 2005/12/01 or later. +# +# This work has the LPPL maintenance status `maintained'. +# +# The Current Maintainer of this work is Nicola Talbot. + +# This work consists of the files glossaries.dtx and glossaries.ins +# and the derived files glossaries.sty, glossary-hypernav.sty, +# glossary-list.sty, glossary-long.sty, glossary-super.sty, +# glossaries.perl. Also makeglossaries and makeglossaries. + +use Getopt::Std; + +if ($#ARGV < 0) +{ + die "Syntax : $0 [-ilqrcg] [-s sty] [-o gls] [-t log] [-p num] <filename>\n"; +} + +getopt('sotp'); +getopts('ilqrcg'); + +# define known extensions + + %exttype = ( + main => {in=>'glo', out=>'gls', 'log'=>'glg'}, + ); + +$ext = ''; + +if (length(@ARGV[0]) < 4) +{ + $name = @ARGV[0]; +} +elsif (substr(@ARGV[0],-4,1) eq ".") +{ + $name = substr(@ARGV[0],0,length(@ARGV[0])-4); + + $ext = substr(@ARGV[0],-3,3); +} +else +{ + $name = @ARGV[0]; +} + +$istfile = "$name.ist"; + +# check log file for other glossary types +# and for ist file name + +if (open AUXFILE, "$name.aux") +{ + while (<AUXFILE>) + { + if (m/\\\@newglossary\s*\{(.*)\}{(.*)}{(.*)}{(.*)}/ + and ($1 ne 'main')) + { + $exttype{$1}{'log'} = $2; + $exttype{$1}{'out'} = $3; + $exttype{$1}{'in'} = $4; + + if (!$opt_q) + { + print "added glossary type '$1' ($2,$3,$4)\n"; + } + } + + if (m/\\\@istfilename\s*{([^}]*)}/) + { + $istfile = $1; + } + } + + close AUXFILE; +} +else +{ + print "unable to open $name.aux\n"; +} + +# save all the general makeindex switches + +$mkidxopts = ''; + +if ($opt_i) +{ + $mkidxopts .= " -i"; +} + +if ($opt_l) +{ + $mkidxopts .= " -l"; +} + +if ($opt_q) +{ + $mkidxopts .= " -q"; +} + +if ($opt_r) +{ + $mkidxopts .= " -r"; +} + +if ($opt_c) +{ + $mkidxopts .= " -c"; +} + +if ($opt_g) +{ + $mkidxopts .= " -g"; +} + +unless ($opt_p eq "") +{ + $mkidxopts .= " -p $opt_p"; +} + +unless ($opt_s eq "") +{ + $istfile = $opt_s; +} + +if ($ext ne '') +{ + %thistype = %{$exttype{'main'}}; #default + + foreach $type (keys %exttype) + { + if ($exttype{$type}{'in'} eq $ext) + { + %thistype = %{$exttype{$type}}; + + last; + } + } + + if ($opt_o eq "") + { + $outfile = "$name.$thistype{out}"; + } + else + { + $outfile = $opt_o; + } + + if ($opt_t eq "") + { + $transcript = "$name.$thistype{'log'}"; + } + else + { + $transcript = $opt_t; + } + + &makeindex("$name.$ext",$outfile,$transcript,$istfile, + $mkidxopts,$opt_q); +} +else +{ + foreach $type (keys %exttype) + { + %thistype = %{$exttype{$type}}; + + $inputfile = "$name.$thistype{in}"; + + if (-r $inputfile) + { + if ($opt_o eq "") + { + $outfile = "$name.$thistype{out}"; + } + else + { + $outfile = $opt_o; + } + + if ($opt_t eq "") + { + $transcript = "$name.$thistype{'log'}"; + } + else + { + $transcript = $opt_t; + } + + &makeindex($inputfile,$outfile,$transcript, + $istfile,$mkidxopts,$opt_q); + } + elsif (!$opt_q) + { + print "no read access for '$inputfile'\n"; + } + } +} + +sub makeindex{ + local($in,$out,$trans,$ist,$rest,$quiet) = @_; + local($name,$cmdstr,$buffer,$n,$i,$j); + local(@stuff,@item); + + $cmdstr = "$rest -s $ist -t $trans -o $out $in"; + + unless ($quiet) + { + print "makeindex $cmdstr\n"; + } + + `makeindex $cmdstr`; +} + +1; diff --git a/Master/texmf-dist/doc/latex/glossaries/scripts/makeglossaries.bat b/Master/texmf-dist/doc/latex/glossaries/scripts/makeglossaries.bat new file mode 100755 index 00000000000..64a6a20750c --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries/scripts/makeglossaries.bat @@ -0,0 +1,3 @@ +@rem = '-*- Perl -*-
+@echo off
+perl -S "%~dp0makeglossaries" %*
|