summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/gloss
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/gloss
Initial commit
Diffstat (limited to 'macros/latex/contrib/gloss')
-rw-r--r--macros/latex/contrib/gloss/README31
-rw-r--r--macros/latex/contrib/gloss/gloss.pdfbin0 -> 121356 bytes
-rw-r--r--macros/latex/contrib/gloss/gloss.sty347
-rw-r--r--macros/latex/contrib/gloss/gloss.tex602
-rw-r--r--macros/latex/contrib/gloss/glsbase.bib37
-rw-r--r--macros/latex/contrib/gloss/glsplain.bst252
-rw-r--r--macros/latex/contrib/gloss/glsshort.bst251
-rw-r--r--macros/latex/contrib/gloss/sample.bib98
-rw-r--r--macros/latex/contrib/gloss/sample.tex72
9 files changed, 1690 insertions, 0 deletions
diff --git a/macros/latex/contrib/gloss/README b/macros/latex/contrib/gloss/README
new file mode 100644
index 0000000000..8203a958a1
--- /dev/null
+++ b/macros/latex/contrib/gloss/README
@@ -0,0 +1,31 @@
+Gloss 1.5.2
+~~~~~~~~~~~
+
+Gloss is a package which allows the creation of glossaries
+using bibTeX. This approach has several advantages:
+- bibTeX is available in every platform where TeX is.
+- Glossary entries can be stored in databases, and you needn't
+ rewrite the definitions.
+- There are a lot of tools for managing bibTeX databases.
+- bibTeX is a programable tool and you can define your own
+ styles for acronyms, symbols, and so on.
+
+The file gloss.tex contains the documentation.
+
+Release 1.5.1 fixes a few bugs:
+
+- page was missing when a nocite form was followed by a
+ "normal" form (not a frequent situation, however).
+- chars usually allowed in \cite now are allowed in \gloss
+ as well
+- refpage was no-op with nocite. Now it can be used to
+ refer to the page even if the term in not cited in the
+ text (and since this combination did not make sense
+ formerly, I hope there won't be uncompatibilities).
+
+Release 1.5.2 fixes a bug:
+
+- Sometimes the space following \gloss was gobbled.
+
+2002/07/26
+http://www.texytipografia.com
diff --git a/macros/latex/contrib/gloss/gloss.pdf b/macros/latex/contrib/gloss/gloss.pdf
new file mode 100644
index 0000000000..a657980b7d
--- /dev/null
+++ b/macros/latex/contrib/gloss/gloss.pdf
Binary files differ
diff --git a/macros/latex/contrib/gloss/gloss.sty b/macros/latex/contrib/gloss/gloss.sty
new file mode 100644
index 0000000000..b9687767c0
--- /dev/null
+++ b/macros/latex/contrib/gloss/gloss.sty
@@ -0,0 +1,347 @@
+% +--------------------------------------------------+
+% | Typeset gloss.tex to get the documentation. |
+% +--------------------------------------------------+
+%
+% (c) 1998 Jose Luis Diaz, 1999-2002 Jose Luis Diaz and Javier Bezos.
+% All Rights Reserved.
+%
+% This file is part of the gloss distribution release 1.5.2
+% -----------------------------------------------------------
+%
+% This file can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License Distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or any later version.
+
+\def\fileversion{1.5.2}
+\def\filedate{2002/07/26}
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesPackage{gloss}[\filedate\space\fileversion\space Gloss package]
+
+\edef\gls@a{\catcode`\string:=\the\catcode`:\relax}
+\catcode`:=12
+
+\providecommand\glossname{Glossary}
+\newcommand\glosspage[1]{, p.\nobreakspace#1.}
+\newcommand\xglosspage{\glosspage}
+
+\DeclareOption{refpages}{%
+ \def\endglossitem{%
+ \@ifundefined{gls@thispage}%
+ {.}%
+ {\glosspage\gls@thispage}%
+ \par}%
+ \@namedef{endglossitem*}{%
+ \@ifundefined{gls@thispage}%
+ {}%
+ {\xglosspage\gls@thispage}%
+ \par}}
+
+% Declaring new glossaries
+% ~~~~~~~~~~~~~~~~~~~~~~~~
+
+% 1:label 2:ext 3:title 4:bibstyle
+
+\newcommand\newgloss[4]{%
+ \if@filesw
+ \expandafter\newwrite\csname glsf@#1\endcsname
+ \immediate\openout\csname glsf@#1\endcsname\jobname#2.aux %
+ \PackageInfo{gloss}{Writing gloss file \jobname#2.aux}%
+ \immediate\write\csname glsf@#1\endcsname{\string\bibstyle{#4}}%
+ \fi
+ \@namedef{glst@#1}{\def\gls@title{#3}}%
+ \@namedef{glso@#1}{\edef\gls@base{\jobname#2}\edef\gls@name{#1}}}
+
+\newcommand\makegloss{%
+ \newgloss{default}{.gls}{\glossname}{glsplain}}
+
+\def\glso@default{\PackageError{gloss}{Missing default glossary}%
+ {You missed either \string\makegloss or a \string\newgloss
+ with a `default' label}}
+
+% Two .aux related commands
+% ~~~~~~~~~~~~~~~~~~~~~~~~
+% In both of them, #1 includes (already expanded) \gls@name ::
+
+\def\gls@cite{%
+ \begingroup
+ \catcode`:=12
+ \gls@cite@i}
+\def\gls@cite@i#1#2#3#4{%
+ \endgroup
+ \global\@namedef{gls@#1}{{#2}{#3}{#4}}}
+
+\def\gls@page{%
+ \begingroup
+ \catcode`:=12
+ \gls@page@i}
+\def\gls@page@i#1#2{%
+ \endgroup
+ \global\@namedef{glsp@#1}{#2}}
+
+% The \gloss command
+% ~~~~~~~~~~~~~~~~~~
+% The command:
+
+\newcommand\gloss{\protect\gls@gloss@i}
+
+\def\gls@gloss@i{%
+ \@bsphack
+ \begingroup
+ \catcode`\ =9
+ \@ifnextchar[{\gls@gloss@ii}{\gls@gloss@ii[]}}
+
+\def\gls@gloss@ii[#1]{%
+ \endgroup
+ \gls@gloss@iii{#1}}
+
+\def\gls@gloss@iii#1#2{%
+ \begingroup
+ \def\gls@a{\def\gls@a{,\penalty\@m\ }}%
+ \glso@default
+ \glso@word
+ \@for\gls@b:=#1\do{%
+ \@ifundefined{glso@\gls@b}%
+ {\PackageError{gloss}{Unknown option}%
+ {You have used an unknown option in \string\gloss}}%
+ {\csname glso@\gls@b\endcsname}}%
+ \@for\gls@b:=#2\do
+ {\gls@a %%% 2001/08/29 Missing
+ \edef\gls@b{\expandafter\@firstofone\gls@b\@empty}%
+ \ifgls@cite %%% 2001/12/20 a few lines rewritten
+ \@ifundefined{glspp@\gls@name::\gls@b}{\gls@refpagetrue}{}%
+ \fi
+ \ifgls@refpage
+ \protected@write\@auxout{}%
+ {\string\gls@page{\gls@name::\gls@b}{\noexpand\thepage}}%
+ \global\@namedef{glspp@\gls@name::\gls@b}{}%
+ \fi
+ \if@filesw
+ \immediate\write\csname glsf@\gls@name\endcsname
+ {\string\citation{\gls@b}}%
+ \fi
+ \@ifundefined{gls@\gls@name::\gls@b}%
+ {\ifgls@cite
+ {\reset@font\bfseries[\gls@unlabel{#2}??]}%
+ \fi
+ \G@refundefinedtrue
+ \PackageWarning{gloss}%
+ {Term `\gls@b' on page \thepage\space
+ not defined in glossary `\gls@name'}}%
+ {\ifgls@cite
+ {\edef\@pdfborder{\glosslinkborder}%
+ \edef\@linkcolor{\glosslinkcolor}%
+ \edef\@linkbordercolor{\glosslinkbordercolor}%
+ \gls@hyperlink{\gls@name::\gls@b}{%
+ \expandafter\expandafter\expandafter
+ \gls@printtext\csname gls@\gls@name::\gls@b\endcsname}}%
+ \fi}}%
+ \expandafter
+ \endgroup %2002/07/25 wrong tempswa replaced by gls@cite
+ \ifgls@cite\else\expandafter\@esphack\fi}
+
+\def\gls@unlabel#1{%
+ \expandafter\expandafter\expandafter
+ \@gobble\expandafter\string\csname #1\endcsname}
+
+\AtBeginDocument{%
+ \@ifpackageloaded{hyperref}%
+ {\let\gls@hyperlink\hyperlink
+ \let\gls@raisedlink\Hy@raisedlink}%
+ {\let\gls@hyperlink\@secondoftwo
+ \let\gls@raisedlink\@gobble
+ \let\glosslinkborder\relax
+ \let\glosslinkcolor\relax
+ \let\glosslinkbordercolor\relax}}
+
+\def\glosslinkborder{\@pdfborder}%
+\def\glosslinkcolor{\@linkcolor}%
+\def\glosslinkbordercolor{\@linkbordercolor}
+
+% Options:
+
+\newif\ifgls@cite
+\gls@citetrue
+\def\glso@nocite{%
+ \gls@citefalse
+ \let\gls@a\@empty}
+
+\newif\ifgls@refpage % false by default
+\def\glso@refpage{\gls@refpagetrue}
+
+\newcommand\setglosstext[2]{%
+ \@namedef{gls@prtext@#1}##1##2##3{{\def\gls@short{##3}#2}}%
+ \@namedef{glso@#1}{%
+ \def\gls@printtext{\csname gls@prtext@#1\endcsname}}}
+
+\setglosstext{short}{\ifglossshort*{#3}{}}
+\setglosstext{word}{#1}
+\setglosstext{Word}{#2}
+\setglosstext{long}{#1\ifglossshort*{ (#3)}{}}
+\setglosstext{Long}{#2\ifglossshort*{ (#3)}{}}
+
+\def\ifglossshort{%
+ \@ifstar
+ {\ifx\gls@short\@empty
+ \PackageError{gloss}{Empty short}%
+ {You cannot print a short form of a term lacking it}%
+ {\reset@font\bfseries[??]}%
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi}%
+ {\ifx\gls@short\@empty
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi}}
+
+% \newcommand\maingloss[2][word]{\textit{\gloss[refpage,#1]{#2}}}
+
+\newcommand\Gloss[1]{\gloss[Word]{#1}}
+\newcommand\onlygloss[1]{\gloss[nocite]{#1}}
+
+% Printing the gloss
+% ~~~~~~~~~~~~~~~~~~
+% The whole list:
+
+\@ifundefined{chapter}
+ {\def\gls@section{%
+ \section*{\gls@title}%
+ \@mkboth{\MakeUppercase\gls@title}{\MakeUppercase\gls@title}%
+ \addcontentsline{toc}{section}{\gls@title}}}%
+ {\def\gls@section{%
+ \chapter*{\gls@title}%
+ \@mkboth{\MakeUppercase\gls@title}{\MakeUppercase\gls@title}%
+ \addcontentsline{toc}{chapter}{\gls@title}}}
+
+\newcommand\printgloss[2][default]{%
+ \if@filesw
+ \csname glso@#1\endcsname
+ \immediate\write\csname glsf@\gls@name\endcsname
+ {\string\bibdata{#2}}%
+ \fi
+ \csname glst@#1\endcsname
+ \InputIfFileExists{\gls@base.bbl}%
+ {}%
+ {\typeout{No file \gls@base.bbl}}}
+
+\newenvironment{thegloss}
+ {\gls@section
+ \def\+##1+{}%
+ \@beginparpenalty\@M}%
+ {\stopglosslist}
+
+% Headings:
+
+\newcommand\setglossgroup[1]{\@namedef{gls@group@#1}}
+\newcommand\glossgroup[1]{%
+ \expandafter\glossheading\csname gls@group@#1\endcsname}
+
+\newcommand\glossheading[1]{%
+ \stopglosslist
+ \subsection*{#1}}
+
+% The list itself:
+
+\newlength{\glosshang}
+\setlength{\glosshang}{2cm}
+
+\newenvironment{glosslist}
+ {\begin{list}{\relax}{%
+ \def\makelabel##1{##1\hfil}%
+ \setlength{\labelsep}{1em}%
+ \setlength{\labelwidth}{\glosshang}%
+ \addtolength{\labelwidth}{-\labelsep}%
+ \setlength{\itemindent}{0em}%
+ \setlength{\leftmargin}{\glosshang}}}
+ {\end{list}}
+
+% The gloss items:
+
+% 1:key 2:term 3:text 4:shorthand
+
+\newcommand\stopglosslist{}
+
+\newif\ifgls@list
+
+\newenvironment{glossitem}[4]%
+ {\ifgls@list
+ \expandafter\let\expandafter\gls@thispage % relax if undefined
+ \csname glsp@\gls@name::#1\endcsname
+ \item[%
+ \gls@raisedlink{\hyper@anchorstart{\gls@name::#1}\hyper@anchorend}%
+ \gls@label{#2}{#3}{#4}]%
+ \begingroup
+ \let\protect\noexpand
+ \immediate\write\@auxout{%
+ \string\gls@cite{\gls@name::#1}{#2}{#3}{#4}}%
+ \endgroup
+ \else
+ \xdef\gls@a{\noexpand\begin{\@currenvir}}%
+ \endgroup
+ \begin{glosslist}%
+ \gls@listtrue
+ \def\stopglosslist{\end{glosslist}}%
+ \gls@a{#1}{#2}{#3}{#4}%
+ \fi
+ \ignorespaces}
+ {.\@@par}
+
+\expandafter\let\csname glossitem*\endcsname\glossitem
+\expandafter\let\csname endglossitem*\endcsname\@@par
+
+\newcommand\setglosslabel[1]{%
+ \def\gls@label##1##2##3{\def\gls@short{##3}#1}}
+
+\setglosslabel{\sffamily\bfseries#1\ifglossshort{ (#3)}{}}
+
+% Language support
+
+\DeclareOption{basque}{%
+ \def\glossname{Glosategi}%
+ \def\glosspage#1{, orri \nobreakspace#1.}}%*********
+\DeclareOption{brazilian}{%
+ \def\glossname{Gloss\'ario}%
+ \def\glosspage#1{, p\'ag.\nobreakspace#1.}}
+\DeclareOption{catalan}{%
+ \def\glossname{Glossari}%
+ \def\glosspage#1{, p\`ag.\nobreakspace#1.}}
+\DeclareOption{danish}{%
+ \def\glossname{Ordliste}%
+ \def\glosspage#1{, s.\nobreakspace#1.}}
+\DeclareOption{dutch}{%
+ \def\glossname{Verklarende woordenlijst}%
+ \def\glosspage#1{, p.\nobreakspace#1.}}
+\DeclareOption{french}{%
+ \def\glossname{Glossaire}%
+ \def\glosspage#1{, p.\nobreakspace#1.}}
+\DeclareOption{german}{%
+ \def\glossname{Glossar}%
+ \def\glosspage#1{, S.\nobreakspace#1.}}
+\DeclareOption{italian}{%
+ \def\glossname{Glossario}%
+ \def\glosspage#1{, pag.\nobreakspace#1.}}
+\DeclareOption{polish}{%
+ \def\glossname{S\l owniczek}%
+ \def\glosspage#1{, str.\nobreakspace#1.}}%
+\DeclareOption{portuguese}{%
+ \def\glossname{Gloss\'ario}%
+ \def\glosspage#1{, p\'ag.\nobreakspace#1.}}
+\DeclareOption{russian}{%
+ \def\glossname{%
+ {\cyr\CYRG\cyrl\cyro\cyrs\cyrs\cyra\cyrr\cyri\cyrishrt}}%
+ \def\glosspage#1{, {\cyr\cyrs.}\nobreakspace#1.}}
+\DeclareOption{spanish}{%
+ \def\glossname{Glosario}%
+ \def\glosspage#1{, p\'ag.\nobreakspace#1.}}
+\DeclareOption{swedish}{%
+ \def\glossname{Ordlista}%
+ \def\glosspage#1{, s.\nobreakspace#1.}}%*******
+
+\ProcessOptions*
+
+\gls@a % restores the colon catcode
+
+\endinput
diff --git a/macros/latex/contrib/gloss/gloss.tex b/macros/latex/contrib/gloss/gloss.tex
new file mode 100644
index 0000000000..9e60fad716
--- /dev/null
+++ b/macros/latex/contrib/gloss/gloss.tex
@@ -0,0 +1,602 @@
+% +--------------------------------------------------+
+% | Typeset this file to get the documentation. |
+% +--------------------------------------------------+
+%
+% (c) 1998 Jose Luis Diaz, 1999-2002 Jose Luis Diaz and Javier Bezos.
+% All Rights Reserved.
+%
+% This file is part of the gloss distribution release 1.5.2
+% -----------------------------------------------------------
+%
+% This file can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License Distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or any later version.
+
+\def\fileversion{1.5.2}
+\def\docdate{July 26, 2002}
+
+\documentclass{ltxguide}
+\usepackage{hyperref}
+
+\title{The \textsf{gloss} Package\footnote{The
+\textsf{gloss} package is currently at version \fileversion. \copyright{}
+1998 Jose Luis Diaz,
+1999-2001 Jose Luis Diaz and Javier Bezos. All Rights Reserved.}}
+
+\author{Jose Luis D\'{\i}iaz\\Javier Bezos\footnote{For bug reports, comments and
+suggestions go to \href{http://www.texytipografia.com/contact.php}%
+{http://www.texytipografia.com/contact.php}. New \texttt{.bst} styles
+are also welcome. English is not my strong point, so contact me when
+you find mistakes in the manual. Other packages by Javier Bezos:
+\textsf{accents, tensind, esindex, titlesec, titletoc, dotlessi}.}}
+
+\date{\docdate}
+
+\addtolength{\topmargin}{-3pc}
+\addtolength{\textwidth}{6pc}
+\addtolength{\oddsidemargin}{-2pc}
+\addtolength{\textheight}{7pc}
+
+\raggedright
+\parindent1em
+
+\newcommand{\gloss}{\textsf{gloss}}
+\newcommand{\bibTeX}{\textsc{Bib}\TeX}
+
+\begin{document}
+
+\maketitle
+
+\textsf{Gloss} is a package which allows the creation of glossaries
+using \bibTeX. With this approach, the user writes a database of terms
+and definitions using a file format much like the bibliographic
+databases. Then he inserts in the \LaTeX{} document a command
+|\gloss{<key>}| for selecting which entries he wants to appear in the
+glossary. These keys are written in an auxiliar file when \LaTeX{} is
+run on the document. Then, running \bibTeX{} these entries are
+extracted from the database and collected in alphabetical order in a
+file. The next run of \LaTeX{} read this file and inserts it in the
+appropiate point of the document, typesetting the desired glossary or
+glossaries.
+
+The process is much like the mechanism for including the bibliographic
+references. This approach has several advantages:
+\begin{enumerate}
+\item \bibTeX{} is available in every platform where \TeX{} is.
+\item Glossary entries can be stored in databases, and you needn't
+ rewrite the definitions.
+\item There are a lot of tools for managing \bibTeX{} databases.
+\item \bibTeX{} can sort the entries and group them; furthermore,
+ \bibTeX-8 can sort correctly the entries in non-English
+ languages. (In fact, this is the main raison which the package
+ was first developped for.)
+\item \bibTeX{} is a programable tool and you can define your own
+ styles for acronyms, symbols, and so on, or changing its default
+ behaviour. \textsf{Gloss} styles are pretty simples and creating
+ new ones is not difficult.
+\end{enumerate}
+
+Of course, there also disavantages---for example, you cannot
+select sorting entries word by word or letter by letter, at least
+at present.
+
+The gloss{} bundle includes the \textsf{gloss}.sty package, a
+\textsf{glsplain}.bst style, a \textsf{glsbase}.bib database, and a
+\texttt{sample.tex} file with its \texttt{sample.bib} database
+(and, of course, the \texttt{readme} file and this manual).
+
+\section{The data files}
+
+If you know \bibTeX, you will find this section easy to understand.
+A data file contains a set of records defining terms, and its
+name must have the extension \texttt{.bib}. Every entry has the
+following format:
+\begin{verbatim}
+@gd{gnu,
+ word = {gnu},
+ definition = {Extrange animal}
+}
+\end{verbatim}
+
+Here
+\begin{itemize}
+\item |gnu| is a key identifying the record;
+\item |word| is the word which will be used as headword and in the
+ text; and
+\item |definition| is the definition printed in the glossary.
+\end{itemize}
+
+Here is the description of the available fields, and when they are used
+\begin{description}
+\item[word] Required. It should be given always as it would be
+ written at the middle of a sentence. The basic style
+ \textsf{glsplain} converts its first letter to uppercase for use after
+ a period. In the generated glossary, entries with the
+ same initial are grouped, preceded by a heading with that letter.
+
+\item[definition] Required. The definition can be as long an you
+ want, but you should note that implicit paragraphs (those with a
+ blank line) are ignored and a |\par| would be necessary. The final
+ period should be omitted because it is supplied later (and sometimes it
+ will be replaced by a comma).
+
+\item[short] Optional. A short form. It could be a symbol, an
+ acronym, etc. depending on the nature of the glossary.
+
+\item[sort-word] Optional. If present, this field will be used to
+sort the entries. It is useful in greek symbols and signs, for
+example.
+
+\item[group] Optional. This field should consist in an uppercase
+ letter and is intended for entries not beginning (or not containing)
+ letters. Entries with the same |group| are gathered in the glossary
+ under a single heading and sorted in the whole glossary using this
+ letter, with entries without |group| placed as if they had a group
+ key of |L|. Using both |sort-word| and this field allows grouping,
+ say, greek symbols, numbers, signs and the like under seperate
+ headings. More on that later.
+
+\item[heading] Optional. It forces an entry to be listed under the
+ given heading. Useful in non-English languages when
+ letters with diacriticals are used (even with \bibTeX-8):
+\begin{verbatim}
+@gd{gnu,
+ word = "{\'A}nimo",
+ definition = "...",
+ heading = "A"}
+\end{verbatim}
+This field is uncompatible with |group|.
+
+\end{description}
+
+The |@gd| entry type is the only available currently in |glsplain|.
+|@glossdef| is a synonymous.
+
+The default |crossref| field is available, but in glossaries is mostly
+unpractical except in a few cases (for example, in a list of symbols
+with the same greek letter with many meanings).
+
+\section{Basic commands}
+
+\begin{decl}
+|\makegloss|
+\end{decl}
+
+This command in the preamble tells \gloss{} to create a glossary.
+
+\begin{decl}
+|\gloss{<key>}|
+\end{decl}
+
+Similar to |\cite|. It writes a ``citation'' to the auxiliary file
+|.gls.aux|. Sadly, this double extension is necessary because
+\bibTeX{} requires the input file to be named with the |.aux|
+extension. Below is explained how MS-DOS users can work around that.
+Note that this file is not reread by the document, it just
+provides information to \bibTeX\ of terms cited.
+
+\begin{decl}
+|\printgloss{<databases>}|
+\end{decl}
+
+Similar to |\bibliography|. It prints the glossary stored into the
+|.gls.bbl| file generated by \bibTeX{} from |.gls.aux|.
+
+In this basic interface the \textsf{glsplain} style is used always.
+
+\section{The generated glossary}
+
+The steps to generate and use the glossary are:
+\begin{itemize}
+\item \LaTeX{} the document (let's call it |file.tex|),
+\item \bibTeX\ the |.gls.aux| file (i.e., |bibtex file.gls|),
+\item \LaTeX{} the document again, and
+\item \LaTeX{} again if there are unresolved cross references.
+\end{itemize}
+
+Once \LaTeX{}ed the document, and \bibTeX{}ed the |.gls.aux| file,
+you will get the glossary in the |.gls.bbl| with the following \TeX{}
+format:
+\begin{itemize}
+
+\item the whole glossary is enclosed in the |thegloss| environment,
+ which just prints the sectioning heading whith the |\glossname| title;
+
+\item a series of |\glossheading|s (or |\glossgroup|s) commands
+ and |glossitem|s environments. Note that gloss items are not
+ commands but environments. The |glossitem*| environment means that
+ the definition of the entry ends with a period.
+
+\end{itemize}
+
+\section{The whole thing}
+
+Most of the formatting is done by the package and not by \bibTeX. The
+\textsf{glsplain} style provides two forms, sometimes three, of
+terms: the basic form as given in |word| to be used in the text,
+and probably as headword, the second one is |word| with the first
+letter uppercased to be used at the beginning of a sentence; and only
+if |short| was included, a short form.
+
+Not surprisingly, the syntax of the \gloss{} commands is very
+alike to that of bibliographies with some touches from that
+of indexes.
+
+\subsection{Package options}
+
+\begin{decl}
+|refpages|
+\end{decl}
+
+The number of the first page where the term is referred to, is
+appended to the gloss entry.
+
+\subsection{Multiple glossaries}
+
+\begin{decl}
+|\makegloss|\\
+|\newgloss{<name>}{<suffix>}{<title>}{<style>}|
+\end{decl}
+
+For defining a new glossary use |\newgloss|. The |\makegloss|
+command is just a synonymous with
+\begin{verbatim}
+\newgloss{default}{.gls}{\glossname}{glsplain}
+\end{verbatim}
+Note that the suffix does include the dot.
+
+MS-DOS users must use |\newgloss| instead of |\makegloss|, and
+a document name with at most seven letters. For instance:
+\begin{verbatim}
+\newgloss{default}{G}{\glossname}{glsplain}
+\end{verbatim}
+Note that, in this case, the suffix does not include the dot
+(this way we avoid double extensions).
+
+\begin{decl}
+|\printgloss[<name>]{<databases>}|
+\end{decl}
+
+Prints the |<name>| glossary. By default, the |default| one
+is printed.
+
+\subsection{The \texttt{\string\gloss} command}
+
+\begin{decl}
+|\gloss[<options>]{<key>}|
+\end{decl}
+
+Possible options are:
+\begin{itemize}
+\item |nocite| makes the command behave in the same fashion
+ as |\nocite|. For example, with |\gloss[nocite]{*}| all entries of
+ the databases are included in the glossary.\footnote{The command
+ |\string\onlygloss| is a deprecated synonymous with
+ |\string\gloss[nocite]|.}
+
+\item |refpage| tells \gloss{} to ignore previous references to pages.
+ Sometimes you say things like ``...at the end of the chapter, we will
+ introduce the concept of...''; when the concept is actually
+ introduced you should use this option.
+
+\item |<name>| of the glossary file where the key is written,
+ as defined by |\newgloss|. The key will be written into that
+ glossary. If there is no |<name>| it defaults to |default|.
+\end{itemize}
+
+The following options control the format of the term in the text.
+
+\begin{itemize}
+
+\item |word| prints the term exactly as given in the |word| field.
+
+\item |Word| prints the term as given in the |word| field, but
+ with the first letter uppercased.\footnote{%
+ The command |\string\Gloss| is a deprecated synonymous with
+ |\string\gloss[Word]|.}
+
+\begin{verbatim}
+ ...discovered. \gloss[Word]{spectroscopy} became one of the most...
+\end{verbatim}
+
+\item |short| prints the short form, provided the bib file defines it
+ (if not a warning is reported).
+
+\item |Long| prints a combination of |Word| and |short|: ``Word
+ (short)''.
+
+\item |long| prints a combination of |word| and |short|: ``word
+(short)''. For example, the very first time an acronym is used:
+\begin{verbatim}
+...and the proposals made by the \gloss[long]{iupac} provide...
+\end{verbatim}
+ Of course, you may want the following references to be in the short
+ form; just define
+\begin{verbatim}
+\newcommand{\acronym}[2][]{\gloss[short,#1]{#2}}
+\end{verbatim}
+
+\end{itemize} The former (|nocite| and |refpage|) are built in,
+|<name>|s are created by |\newgloss|, and the latter are created by
+the package with |\setglosstext|; if no option defined by
+|\setglosstext| is included, it defaults to |word|.
+
+\begin{decl}
+|\setglosstext{<option-name>}{<format>}| \quad (3 parameters)\\
+|\ifglossshort{<format>}| \qquad |\ifglossshort*{<format>}|
+\end{decl}
+
+|\setglosstext| sets how entries are printed in the main text by
+|\gloss|, where |<option-name>| is the name to be used in the optional
+argument of |\gloss|. There are five predefined formats, described
+above, which you may redefine or complement with new defined ones. In
+|<format>| there are three available arguments, which are defined
+implicitly:
+|#1| is |word|, |#2| is |word| with its initial uppercased, and |#3|
+is the |short| field. Thus, the package does the following:
+\begin{verbatim}
+\setglosstext{word}{#1}
+\setglosstext{Word}{#2}
+\setglosstext{short}{\ifglossshort*{#3}{}}
+\setglosstext{long}{#1\ifglossshort*{ (#3)}{}}
+\setglosstext{Long}{#2\ifglossshort*{ (#3)}{}}
+\end{verbatim}
+Use is made of |\ifglossshort| which takes the first argument if the
+short form exists, and the second one if does not exist. In the
+latter case, that is done silently in the unstarred version, but with
+an error in the starred one.
+
+\subsection{Glossary layout}
+
+\begin{decl}
+|\glossheading{<format>}|
+\end{decl}
+
+Sets how the headings are formatted; it is redefined with
+|\renewcommand|. For example:
+\begin{verbatim}
+\renewcommand\glossheading[1]{%
+ \stopglosslist
+ \subsection*{#1}}
+\end{verbatim}
+
+\begin{decl}
+|\setglossgroup{<group>}{<heading>}|
+\end{decl}
+
+Sets the heading corresponding to entries grouped by \textsf{glsplain}
+under the same |group| key (and preceded by |\glossgroup|, which in
+turn calls |\glossheading|).
+\begin{verbatim}
+\setglossgroup{C}{Signs}
+\end{verbatim}
+
+\begin{decl}
+|\setglosslabel{<format>}| \quad (3 parameters)
+\end{decl}
+
+Sets which of the three forms are printed as label in the gloss items and
+some other optional formatting.
+
+The package does:
+\begin{verbatim}
+\setglosslabel{\sffamily\bfseries#1\ifglossshort{ (#3)}{}}
+\end{verbatim}
+
+\begin{decl}
+|thegloss|
+\end{decl}
+
+By default, the main environment just prints the gloss title.
+You may change its definition.
+
+\begin{decl}
+|glosslist|\\
+|\stopglosslist|
+\end{decl}
+
+You usually won't see the |glosslist| environnment. It is automatically
+started by |glossitem| if necessary. You may stop it with the
+|\stopglosslist|. That's so done to interact with the format
+of the heading for each letter group. The above example of
+|\glossheading| uses it because sectioning commands cannot be
+used inside lists; this way, the list is stopped, the title is
+printed, and the following |glossitem| restarts the list. If
+you say:
+\begin{verbatim}
+\renewcommand{\glossheading}[1]{}
+\end{verbatim}
+the whole glossary is printed in a single list (with no unwanted
+space between letter groups).
+
+\textsf{Gloss} provides its own format for |glosslist|
+(simply because the authors like it) with a |\glosshang| length
+to adjust the left margin, but you may change its definition.
+
+\begin{decl}
+|glossitem|\\
+|glossitem*|
+\end{decl}
+
+Its |\begin| consists of an |\item| and some additional stuff. Its
+|\end| adds a period (except in the starred version) or the page
+number. You should not modify this environment, except if you want a
+format not based in a list environment.
+
+Here is an example of how to modify the layout of the glossary:
+\begin{verbatim}
+\setglosslabel{#2}
+
+\renewcommand{\glossheading}[1]{%
+ \stopglosslist % -- Don't forget that!
+ \vspace{1pc}%
+ {\large\centering\bfseries#1\par}}
+
+\renewenvironment{glosslist}
+ {\begin{description}}
+ {\end{description}}
+\end{verbatim}
+
+\begin{decl}
+|\glosspage|\\
+|\xglosspage|
+\end{decl}
+
+This command is used to print the page at the end of the gloss entry
+with |refpages|. If the entry ends with a period, |\xglosspage| is
+used, which by default just maps to |\glosspage|. You may redefine them
+with |\renewcommand|:
+
+\begin{verbatim}
+\renewcommand{\glosspage}[1]{. (See page~#1)}
+\renewcommand{\xglosspage}[1]{ (See page~#1)}
+\end{verbatim}
+
+
+\section{Order of items}
+
+Now we explain how \bibTeX{} sorts and groups entries. Firstly, the
+necessary values are assigned, if necessary. The |group| field is
+used, as stated above, for entries consisting of non alphabetical
+terms, and differents steps are followed depending on whether
+this field exists or not.
+
+If |group| is not present, then
+\begin{itemize}
+\item |sort-word|, if omitted, is |word| lowercased with
+ non alphabetical signs removed.
+
+\item |heading|, if omitted, is the first letter in
+ |word|.
+\end{itemize}
+If |group| is present, then
+\begin{itemize}
+\item |sort-word|, if omitted, is |word| lowercased with
+ non alphabetical signs \textit{not} removed.
+
+\item |heading| is not used.
+\end{itemize}
+
+Now, entries can be sorted. First, they are ordered by |group|, and
+then, inside each group, by |sort-word|. In fields with |group| and
+no |sort-word| the ASCII codes are used. No further sortening is
+done. Finally, entries are grouped: first, consecutive entries with
+the same |group| field; then, consecutive entries whose |group| is "L"
+and with the same |heading| field. Note that |group| sorts and
+groups, |sort-word| just sorts, and |heading| just groups.
+
+Now, let's answer the following simple question: When should I use
+|heading| and |sort-word|? If the word begins with a letter with
+diacritical mark alphabetized under the letter without diacritical
+mark (a fairly frequent case), use heading, does not matter you are
+using \bibTeX{} or \bibTeX 8:
+\begin{verbatim}
+@gd{ecole,
+ word = "{\'e}cole",
+ definition = "...",
+ heading = "E"
+}
+\end{verbatim}
+(\texttt{\'ecole} and \texttt{{'e}cole} are allowed, too).
+
+If the word begins with a letter which is placed under a heading of
+its own, use |sort-word| in \bibTeX{} and nothing in \bibTeX8
+(provided a correct sorting file is provided, which is not the case
+for many languages):
+\begin{verbatim}
+@gd{nname,
+ word = "{\~n}ame",
+ definition = "...",
+ sort-word = "nzzame"
+}
+\end{verbatim}
+in 7-bits versions. In 8-bits version, you may set |word| as
+\texttt{\~name} and suppress the |sort-word| field.
+
+Anyway, if you are using a 7-bits version you may want using both fields:
+\begin{verbatim}
+@gd{innigo,
+ word = "{\'I}\~nigo",
+ definition = "...",
+ heading = "I",
+ sort-word = "Inzzigo"
+}
+\end{verbatim}
+
+Finaly, \textsf{gloss} provides inside the |thegloss| environment the
+|\+zz+| command expanding to nothing, where |zz| is any text helping
+in sorting entries (usualy |zz|); this way, |sort-field| is not
+necessary in most of cases:
+\begin{verbatim}
+@gd{nname,
+ word = "{\~n\+zz+}ame",
+ definition = "..."
+}
+\end{verbatim}
+An example in Swedish is |\+zzx+\r{a}|, in Czech
+|{\v{c}\+zz+}|, and in Breton (8-bits) |\+n+\~n|. (Of course,
+\bibTeX{} could translate from a readable form to one for
+alphabetizing. That should be done in a future.) Using either
+|sort-word| or |\+zz+| is a question of personal taste; One of us [JB]
+uses |sort-word| while the other [JLDA] prefers
+\bibTeX8. This syntax is not compliant with the \LaTeX\ interface
+guidelines (use braces or brackets always) but it's short, which was
+the main goal; this feature is mostly unsuportted, however.
+
+\section{Complements}
+
+\subsection{The \textsf{glsbase} database}
+
+This database defines some useful strings which can be used
+in other databases. Currently, it only includes a set of
+strings named |alphasort|, |betasort|, etc. to be used
+in the |sort-word| field to provide the right order of
+greek symbols. (They are defined as |"01"| , |"02"|, etc.)
+
+\subsection{The \textsf{glsshort} style}
+
+This style is provided for acronym lists. It sorts and creates
+headings using the |short| filed. A new |sort-short| can be used
+to fine tune the order of entries (this field will be ignored
+in the \textsf{glsplain} style). However, note that the
+printed form still follows the conventions given above, and
+you should use the |short| specifier in |\cite|, and
+|\setglosslabel|.
+
+\subsection{Compatibility with \textsf{hyperref}}
+
+If the \textsf{hyperref} package is loaded, links from the
+word to the entry will be created. You can control
+the appearance of gloss links with the following macros:
+|\glosslinkborder|, |\glosslinkcolor|,
+|\glosslinkbordercolor| (which correspond to |pdfborder|,
+|linkcolor| and |linkbordercolor|); you can change
+them with |\renewcommand|.
+
+\subsection{The sample file}
+
+Once installed \gloss{} you should be able to typeset the
+|sample.tex| file, which will enlighten the usage
+of this package --- \LaTeX{} to write the auxiliary file, \bibTeX{}
+to create the glossary, \LaTeX{} to define the labels, and \LaTeX{}
+to see the final result. Disclaimer: its text is in Spanish.
+
+\subsection{Backward uncompatibility}
+
+Version 0.1 beta had a different syntax for the |\gloss|
+command. The old syntax |\gloss[<word>]{<key>}| does not work
+and |<word>\gloss[nocite]{<key>}| should be used instead. The
+|\glossstyle| command has been removed and its functionality
+merged into |\newgloss|.
+
+\subsection{Language support}
+
+The following package options provide translation of the glossary
+heading and page abbreviation: |basque|, |catalan|, |danish|, |dutch|,
+|french|, |german|, |italian|, |portuguese| (and |brazilian|),
+|russian| (any encoding), |polish|, |spanish| and |swedish|.
+Translations to other languages are welcome.
+
+\end{document}
+
diff --git a/macros/latex/contrib/gloss/glsbase.bib b/macros/latex/contrib/gloss/glsbase.bib
new file mode 100644
index 0000000000..b4065efcd6
--- /dev/null
+++ b/macros/latex/contrib/gloss/glsbase.bib
@@ -0,0 +1,37 @@
+% (c) 1999-2002 by Jose Luis Dias and Javier Bezos.
+% All Rights Reserved.
+%
+% This file is part of the gloss distribution release 1.5.2
+% -----------------------------------------------------------
+%
+% This file can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License Distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or any later version.
+
+
+@string{alphasort = "01"}
+@string{betasort = "02"}
+@string{gammasort = "03"}
+@string{deltasort = "04"}
+@string{epsilonsort = "05"}
+@string{zetasort = "06"}
+@string{etasort = "07"}
+@string{thetasort = "08"}
+@string{iotasort = "09"}
+@string{kappasort = "10"}
+@string{lambdasort = "11"}
+@string{musort = "12"}
+@string{nusort = "13"}
+@string{xisort = "14"}
+@string{omicronsort = "15"}
+@string{pisort = "16"}
+@string{rhosort = "17"}
+@string{sigmasort = "18"}
+@string{tausort = "19"}
+@string{upsilonsort = "20"}
+@string{phisort = "21"}
+@string{chisort = "22"}
+@string{psisort = "23"}
+@string{omegasort = "24"}
+
diff --git a/macros/latex/contrib/gloss/glsplain.bst b/macros/latex/contrib/gloss/glsplain.bst
new file mode 100644
index 0000000000..675407b4c2
--- /dev/null
+++ b/macros/latex/contrib/gloss/glsplain.bst
@@ -0,0 +1,252 @@
+% (c) 1998 Jose Luis Diaz, 1999-2002 Jose Luis Diaz and Javier Bezos.
+% All Rights Reserved.
+%
+% This file is part of the gloss distribution release 1.5.2
+% --------------------------------------------------------
+%
+% This file can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License Distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or any later version.
+%
+%% History of v0.1
+%% ~~~~~~~~~~~~~~~
+%% 1997/06/25 (JLDdA) Original version, by Jose Luis Diaz de Arriba (and an
+%% unindicted co-conspirator)
+%% History of v1.0
+%% ~~~~~~~~~~~~~~~
+%% 1999/07/29 (JBL) Rewritten in full. Now it warns if a required field is
+%% missing, conforms the new gloss.sty syntax, and
+%% writes headings for each letter. The heading,
+%% short, and group fiels have been added.
+%% History of v1.1-1.4
+%% ~~~~~~~~~~~~~~~~~~~
+%% 1999/10/10 (JBL) Lots of changes.
+%% History of v.1.5
+%% ~~~~~~~~~~~~~~~~
+%% 2001/08/02 (JBL) Added the sort-short field for compatility
+%% with glsshort.bst
+
+STRINGS { last.heading s t star.period}
+
+ENTRY
+ { word
+ sort-word
+ definition
+ heading
+ group
+ short
+ sort-short
+ }
+ {}
+ { ucword }
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {has.period}
+{ duplicate$
+ add.period$ =
+}
+
+FUNCTION {str.length}
+{ 't :=
+ #0
+ { t empty$ not }
+ { t #2 global.max$ substring$
+ 't :=
+ #1 +
+ }
+ while$
+}
+
+
+FUNCTION {upper.first}
+{ duplicate$
+ #1 text.prefix$
+ duplicate$
+ "u" change.case$
+ 's :=
+ str.length
+ #1 + entry.max$ substring$
+ s swap$ *
+}
+
+FUNCTION {check.required}
+{ 's :=
+ duplicate$ empty$
+ { "Empty " s * " in " * cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {push.sortword}
+{ sort-word empty$
+ { word field.or.null }
+ 'sort-word
+ if$
+}
+
+FUNCTION {check.alpha}
+{ duplicate$
+ purify$
+ empty$
+ { "Non alphabetical " cite$ *
+ " entry without group field" * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {push.heading}
+{ heading empty$
+ { word field.or.null
+ #1 text.prefix$
+ check.alpha
+ }
+ 'heading
+ if$
+}
+
+FUNCTION {begin.entry}
+{ newline$
+ "\begin{glossitem" star.period * write$
+ "}{" write$
+ cite$ write$
+ "}{" write$
+ word write$
+ "}{" write$
+ ucword write$
+ "}{" write$
+ short field.or.null write$
+ "}" write$
+ newline$
+}
+
+FUNCTION {end.entry}
+{ "\end{glossitem" star.period "}" * * write$
+ newline$
+}
+
+FUNCTION {set.vars}
+{ word field.or.null
+ "word" check.required
+ upper.first
+ 'ucword :=
+}
+
+
+FUNCTION {glossdef}
+{ definition field.or.null
+ "definition" check.required
+ duplicate$ has.period
+ { "*" }
+ { "" }
+ if$
+ 'star.period := % definition is stored for later writing
+ begin.entry % this outputs word, ucword, and short
+ write$ % writes definition
+ end.entry
+}
+
+FUNCTION {gd}
+{ definition field.or.null
+ "definition" check.required
+ duplicate$ has.period
+ { "*" }
+ { "" }
+ if$
+ 'star.period := % definition is stored for later
+ begin.entry % this outputs word, ucword, and short
+ write$ % writes definition
+ end.entry
+}
+
+FUNCTION {default.type} { glossdef }
+
+FUNCTION {presort}
+{ set.vars
+ push.sortword
+ group empty$
+ { purify$ "L" }
+ 'group
+ if$ % sort-word heading
+ swap$ * % heading * sort-word
+ "l" change.case$
+ 'sort.key$ :=
+}
+
+FUNCTION {begin.thegloss}
+{ "\begin{thegloss}"
+ write$
+ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+}
+
+FUNCTION {end.thegloss}
+{ newline$
+ "\end{thegloss}" write$
+ newline$
+}
+
+FUNCTION {call.entries}
+ { group empty$
+ 'push.heading
+ { heading empty$
+ 'skip$
+ { "Ignoring heading because there is group field in "
+ cite$ *
+ warning$
+ }
+ if$
+ group
+ }
+ if$
+ "u" change.case$
+ duplicate$
+ group empty$
+ 'skip$
+ { "$$$$$" * }
+ if$
+ duplicate$
+ last.heading =
+ { pop$ pop$ }
+ { newline$
+ 'last.heading :=
+ group empty$
+ { "\glossheading{" }
+ { "\glossgroup{" }
+ if$
+ swap$ * "}" *
+ write$
+ newline$
+ }
+ if$
+ call.type$
+ }
+
+READ
+
+ITERATE {presort}
+
+SORT
+
+EXECUTE {begin.thegloss}
+
+ITERATE {call.entries}
+
+EXECUTE {end.thegloss}
+
+
diff --git a/macros/latex/contrib/gloss/glsshort.bst b/macros/latex/contrib/gloss/glsshort.bst
new file mode 100644
index 0000000000..babd8ded93
--- /dev/null
+++ b/macros/latex/contrib/gloss/glsshort.bst
@@ -0,0 +1,251 @@
+% (c) 1998 Jose Luis Diaz, 1999-2002 Jose Luis Diaz and Javier Bezos.
+% All Rights Reserved.
+%
+% This file is part of the gloss distribution release 1.5.2
+% -----------------------------------------------------------
+%
+% This file can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License Distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or any later version.
+%
+%% History of v0.1
+%% ~~~~~~~~~~~~~~~
+%% 1997/06/25 (JLDdA) Original version, by Jose Luis Diaz de Arriba (and an
+%% unindicted co-conspirator)
+%% History of v1.0
+%% ~~~~~~~~~~~~~~~
+%% 1999/07/29 (JBL) Rewritten in full. Now it warns if a required field is
+%% missing, conforms the new gloss.sty syntax, and
+%% writes headings for each letter. The heading,
+%% short, and group fiels have been added.
+%% History of v1.1-1.4
+%% ~~~~~~~~~~~~~~~~~~~
+%% 1999/10/10 (JBL) Lots of changes.
+%% History of v.1.5
+%% ~~~~~~~~~~~~~~~~
+%% 2001/08/02 (JBL) Created this file from glsplain.bst
+
+STRINGS { last.heading s t star.period}
+
+ENTRY
+ { word
+ sort-word
+ definition
+ heading
+ group
+ short
+ sort-short
+ }
+ {}
+ { ucword }
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {has.period}
+{ duplicate$
+ add.period$ =
+}
+
+FUNCTION {str.length}
+{ 't :=
+ #0
+ { t empty$ not }
+ { t #2 global.max$ substring$
+ 't :=
+ #1 +
+ }
+ while$
+}
+
+
+FUNCTION {upper.first}
+{ duplicate$
+ #1 text.prefix$
+ duplicate$
+ "u" change.case$
+ 's :=
+ str.length
+ #1 + entry.max$ substring$
+ s swap$ *
+}
+
+FUNCTION {check.required}
+{ 's :=
+ duplicate$ empty$
+ { "Empty " s * " in " * cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {push.sortshort}
+{ sort-short empty$
+ { short field.or.null }
+ 'sort-short
+ if$
+}
+
+FUNCTION {check.alpha}
+{ duplicate$
+ purify$
+ empty$
+ { "Non alphabetical " cite$ *
+ " entry without group field" * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {push.heading}
+{ heading empty$
+ { short field.or.null
+ #1 text.prefix$
+ check.alpha
+ }
+ 'heading
+ if$
+}
+
+FUNCTION {begin.entry}
+{ newline$
+ "\begin{glossitem" star.period * write$
+ "}{" write$
+ cite$ write$
+ "}{" write$
+ word write$
+ "}{" write$
+ ucword write$
+ "}{" write$
+ short field.or.null write$
+ "}" write$
+ newline$
+}
+
+FUNCTION {end.entry}
+{ "\end{glossitem" star.period "}" * * write$
+ newline$
+}
+
+FUNCTION {set.vars}
+{ short field.or.null
+ "short" check.required
+ upper.first
+ 'ucword :=
+}
+
+
+FUNCTION {glossdef}
+{ definition field.or.null
+ "definition" check.required
+ duplicate$ has.period
+ { "*" }
+ { "" }
+ if$
+ 'star.period := % definition is stored for later writing
+ begin.entry % this outputs word, ucword, and short
+ write$ % writes definition
+ end.entry
+}
+
+FUNCTION {gd}
+{ definition field.or.null
+ "definition" check.required
+ duplicate$ has.period
+ { "*" }
+ { "" }
+ if$
+ 'star.period := % definition is stored for later
+ begin.entry % this outputs word, ucword, and short
+ write$ % writes definition
+ end.entry
+}
+
+FUNCTION {default.type} { glossdef }
+
+FUNCTION {presort}
+{ set.vars
+ push.sortshort
+ group empty$
+ { purify$ "L" }
+ 'group
+ if$ % sort-short heading
+ swap$ * % heading * sort-short
+ "l" change.case$
+ 'sort.key$ :=
+}
+
+FUNCTION {begin.thegloss}
+{ "\begin{thegloss}"
+ write$
+ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+}
+
+FUNCTION {end.thegloss}
+{ newline$
+ "\end{thegloss}" write$
+ newline$
+}
+
+FUNCTION {call.entries}
+ { group empty$
+ 'push.heading
+ { heading empty$
+ 'skip$
+ { "Ignoring heading because there is group field in "
+ cite$ *
+ warning$
+ }
+ if$
+ group
+ }
+ if$
+ "u" change.case$
+ duplicate$
+ group empty$
+ 'skip$
+ { "$$$$$" * }
+ if$
+ duplicate$
+ last.heading =
+ { pop$ pop$ }
+ { newline$
+ 'last.heading :=
+ group empty$
+ { "\glossheading{" }
+ { "\glossgroup{" }
+ if$
+ swap$ * "}" *
+ write$
+ newline$
+ }
+ if$
+ call.type$
+ }
+
+READ
+
+ITERATE {presort}
+
+SORT
+
+EXECUTE {begin.thegloss}
+
+ITERATE {call.entries}
+
+EXECUTE {end.thegloss}
+
+
diff --git a/macros/latex/contrib/gloss/sample.bib b/macros/latex/contrib/gloss/sample.bib
new file mode 100644
index 0000000000..6236ca1db9
--- /dev/null
+++ b/macros/latex/contrib/gloss/sample.bib
@@ -0,0 +1,98 @@
+% (c) 1998 Jose Luis Diaz, 1999-2002 Jose Luis Diaz and Javier Bezos.
+% All Rights Reserved.
+%
+% This file is part of the gloss distribution release 1.5.2
+% -----------------------------------------------------------
+%
+% This file can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License Distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or any later version.
+%
+
+% Using this file as test with bibTeX8
+% - Replace {\~n} with the corresponding character in your system
+% and without braces. In Mac it is Ò.
+% - Remove the sort-word fields in the egne and gnu entries.
+% - Restore the \usepackage[...]{inputenc} with the setting
+% corresponding to your system in sample.tex.
+
+@GLOSSDEF{gnu,
+ word="{\~n}u",
+ definition="Simp\'atico animal, mascota de los programadores",
+ sort-word="Nzzu"
+}
+@GLOSSDEF{a,
+ word="a",
+ definition={Primera letra del alfabeto}
+}
+@GLOSSDEF{zeta,
+ word="z",
+ definition={\'Ultima letra del alfabeto}
+}
+@GLOSSDEF{egne,
+ word="{\~n}",
+ definition={Letra problem\'atica en la ordenaci\'on alfab\'etica},
+ sort-word={Nzz}
+}
+@GLOSSDEF{ene,
+ word="n",
+ definition={Letra que va antes de la \gloss{egne}}
+}
+@GLOSSDEF{nuname,
+ word="nu",
+ definition={Nombre de la letra griega $\nu$}
+}
+@GLOSSDEF{exclam,
+ word="!",
+ definition={!`Ay!},
+ group="C"
+}
+@GLOSSDEF{interr,
+ word="?",
+ definition={?`Eh?},
+ group="C"
+}
+@GLOSSDEF{ASCII,
+ word="American Standard Code for Information Interchange",
+ short="ASCII",
+ definition="El sistema m\'as popular de codificaci\'on
+ El sistema m\'as popular de codificaci\'on
+ El sistema m\'as popular de codificaci\'on
+ El sistema m\'as popular de codificaci\'on
+ El sistema m\'as popular de codificaci\'on
+ El sistema m\'as popular de codificaci\'on
+ El sistema m\'as popular de codificaci\'on
+ El sistema m\'as popular de codificaci\'on
+ El sistema m\'as popular de codificaci\'on
+ El sistema m\'as popular de codificaci\'on
+ El sistema m\'as popular de codificaci\'on
+ El sistema m\'as popular de codificaci\'on
+ El sistema m\'as popular de codificaci\'on"
+}
+@GLOSSDEF{bit,
+ word="bit",
+ definition={Contracci\'on de ``binary digit''. M\'{\i}nima unidad de
+ informaci\'on}
+}
+@GLOSSDEF{bibtex8,
+ word="bib\TeX8",
+ definition={Implementaci\'on de Bib\TeX\ que alfabetiza correctamente
+ juegos de caracteres de 8 bits}
+}
+@GLOSSDEF{pi,
+ word="$\pi$",
+ definition={Constante matem\'atica aproximadamente igual a la
+ versi\'on m\'as reciente de \TeX},
+ sort-word=pisort,
+ group="S"
+}
+@GLOSSDEF{alfa,
+ word="$\alpha$",
+ definition={Primera letra del alfabeto griego},
+ sort-word=alphasort,
+ group="S"
+}
+
+
+
diff --git a/macros/latex/contrib/gloss/sample.tex b/macros/latex/contrib/gloss/sample.tex
new file mode 100644
index 0000000000..2c181ec55a
--- /dev/null
+++ b/macros/latex/contrib/gloss/sample.tex
@@ -0,0 +1,72 @@
+% (c) 1998 Jose Luis Diaz, 1999-2002 Jose Luis Diaz and Javier Bezos.
+% All Rights Reserved.
+%
+% This file is part of the gloss distribution release 1.5.2
+% -----------------------------------------------------------
+%
+% This file can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License Distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or any later version.
+%
+
+\documentclass[a4paper,spanish]{article}
+% \usepackage[latin1]{inputenc}
+
+\usepackage[refpages]{gloss}
+
+% Try that, if you want:
+%
+% \usepackage[colorlinks,dvips]{hyperref}
+% \renewcommand{\glosslinkborder}{0 0 0}
+% \renewcommand{\glosslinkcolor}{blue}
+
+\makegloss
+
+\setglossgroup{C}{Signos}
+\setglossgroup{S}{S\'{\i}mbolos}
+
+\title{Ejemplo de uso del paquete \textsf{Gloss}}
+\author{Jose Luis D\'{\i}az}
+
+\begin{document}
+\maketitle
+\begin{abstract}
+ Este documento pretende tan s\'olo servir de muestra de c\'omo se usa el
+ paquete \textsf{gloss} para la creaci\'on de glosarios. Los t\'erminos
+ incluidos en este glosario se han elegido porque plantean problemas
+ de ordenaci\'on alfab\'etica.
+\end{abstract}
+
+\section{Ejemplo}
+
+El c\'odigo \gloss[short]{ASCII} no previ\'o la \gloss[nocite]{ene}
+necesidad de vocales acentuadas ni de otros caracteres no
+anglosajones. Por suerte, este c\'odigo s\'olo usa 7
+bits\gloss[nocite]{bit}, por lo que usando el \gloss{bit} que deja
+libre se dispone de 128 caracteres m\'as, donde acomodar los
+s\'{\i}mbolos no previstos.
+
+No obstante, esto plantea problemas a los programas de
+alfabetizaci\'on, que no pueden basarse ya en el sencillo m\'etodo de
+comparar los c\'odigos de los caracteres para determinar cu\'al va
+antes alfab\'eticamente. En efecto, la ``\gloss{egne}'' tendr\'{\i}a
+un c\'odigo superior a 128, lo cual la situar\'{\i}a alfab\'eticamente
+por encima de la ``\gloss{zeta}'', cuando en realidad deber\'{\i}a ir
+despu\'es de la ``\gloss{ene}''.
+
+Bib\TeX\ admite caracteres de 8 bits como parte de los nombres de los
+autores, pero realiza una ordenaci\'on incorrecta de los mismos, ya
+que se basa simplemente en la comparaci\'on num\'erica de los
+c\'odigos de los caracteres.
+
+\gloss[Word]{bibtex8} es una implementaci\'on que permite especificar
+al usuario qu\'e orden alfab\'etico ocupa cada caracter dentro de un
+juego de caracteres de 8 bits\gloss[nocite]{bit}.
+\gloss[nocite]{gnu,a,pi,alfa,exclam,interr,nuname}
+
+\sloppy
+
+\printgloss{glsbase,sample}
+
+\end{document} \ No newline at end of file