summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/makeglos
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/makeglos
Initial commit
Diffstat (limited to 'macros/latex/contrib/makeglos')
-rw-r--r--macros/latex/contrib/makeglos/README35
-rw-r--r--macros/latex/contrib/makeglos/makeglos.glo5
-rw-r--r--macros/latex/contrib/makeglos/makeglos.gls5
-rw-r--r--macros/latex/contrib/makeglos/makeglos.pdfbin0 -> 11529 bytes
-rw-r--r--macros/latex/contrib/makeglos/makeglos.sty22
-rw-r--r--macros/latex/contrib/makeglos/makeglos.tex114
-rw-r--r--macros/latex/contrib/makeglos/makeglos.xdy77
7 files changed, 258 insertions, 0 deletions
diff --git a/macros/latex/contrib/makeglos/README b/macros/latex/contrib/makeglos/README
new file mode 100644
index 0000000000..472d018ecc
--- /dev/null
+++ b/macros/latex/contrib/makeglos/README
@@ -0,0 +1,35 @@
+The makeglos package
+
+
+makeglos is a LaTeX package to include a glossary into a document.
+The glossary must be prepared by an external program, like xindy or
+makeindex.
+
+
+Features
+
+* Can be easily configured: various aspects of the appearance of the
+ glossary can be changed by a simple \renewcommand.
+
+* Multi-language capability: certain keywords, like the name of the
+ glossary, can be made language-dependent.
+
+* Flexible: works equally well for document classes with a book- or
+ report-like structure (divided into \chapters) and for article-like
+ documents, like the documentation for the makeglos package (based on
+ \sections)
+* Equivalent: makeglos is to glossaries what makeidx is to indices.
+
+
+Files
+
+makeglos.sty LaTeX style file
+makeglos.pdf The makeglos documentation
+makeglos.tex The LaTex source of the documentation
+makeglos.glo Glossary for documentation written by LaTeX run
+makeglos.gls File which contains the formatted glossary environment
+makeglos.xdy Style file for xindy to process the glossary
+README.makeglos This file
+
+--
+Thomas Henlich (thenlich at arcor dot de)
diff --git a/macros/latex/contrib/makeglos/makeglos.glo b/macros/latex/contrib/makeglos/makeglos.glo
new file mode 100644
index 0000000000..ed571604b6
--- /dev/null
+++ b/macros/latex/contrib/makeglos/makeglos.glo
@@ -0,0 +1,5 @@
+\glossaryentry{glossary:A list of words with explanations of these words}{1}
+\glossaryentry{index processor:a software product to prepare an index for inclusion into a \LaTeX{} document}{2}
+\glossaryentry{xindy|is{an index processor, can also be used to process glossaries}}{2}
+\glossaryentry{xindy|see{index processor}}{2}
+\glossaryentry{xindy|seealso{glossary}}{2}
diff --git a/macros/latex/contrib/makeglos/makeglos.gls b/macros/latex/contrib/makeglos/makeglos.gls
new file mode 100644
index 0000000000..b61fdddf66
--- /dev/null
+++ b/macros/latex/contrib/makeglos/makeglos.gls
@@ -0,0 +1,5 @@
+\begin{theglossary}
+ \item [glossary] A list of words with explanations of these words
+ \item [index processor] a software product to prepare an index for inclusion into a \LaTeX{} document
+ \item [xindy] an index processor, can also be used to process glossaries; \gsee{index processor}{}; \galso{glossary}{}
+\end{theglossary}
diff --git a/macros/latex/contrib/makeglos/makeglos.pdf b/macros/latex/contrib/makeglos/makeglos.pdf
new file mode 100644
index 0000000000..74e65e9c6f
--- /dev/null
+++ b/macros/latex/contrib/makeglos/makeglos.pdf
Binary files differ
diff --git a/macros/latex/contrib/makeglos/makeglos.sty b/macros/latex/contrib/makeglos/makeglos.sty
new file mode 100644
index 0000000000..d0d2d33bda
--- /dev/null
+++ b/macros/latex/contrib/makeglos/makeglos.sty
@@ -0,0 +1,22 @@
+\ProvidesPackage{makeglos}[2000/02/24 v0.1 Glossary package]
+\newcommand*\gsee[2]{\emph{\seename} #1}
+\newcommand*\galso[2]{\emph{\alsoname} #1}
+\newcommand\printglossary{\@input@{\jobname.gls}}
+\providecommand\seename{see}
+\providecommand\alsoname{see also}
+\providecommand\glossaryname{Glossary}
+\providecommand\glossaryintro{}
+\ifx\@undefined\chapter
+\newenvironment{theglossary}% for article-like documents
+{\section*{\glossaryname}\glossaryintro%
+\begin{description}}%
+{\end{description}}
+\else
+\newenvironment{theglossary}% for report-/book-like documents
+{\chapter*{\glossaryname}\glossaryintro%
+\begin{description}}%
+{\end{description}}
+\fi
+\endinput
+%%
+%% End of file `makeglos.sty'.
diff --git a/macros/latex/contrib/makeglos/makeglos.tex b/macros/latex/contrib/makeglos/makeglos.tex
new file mode 100644
index 0000000000..5a72dcb0e2
--- /dev/null
+++ b/macros/latex/contrib/makeglos/makeglos.tex
@@ -0,0 +1,114 @@
+\documentclass[a4paper]{article}
+\usepackage{times,makeglos}
+\makeglossary
+\title{The makeglos package}
+\author{Thomas Henlich (thenlich at arcor dot de)}
+\begin{document}
+\maketitle
+\tableofcontents
+\renewcommand{\glossaryintro}{Now follows a very short glossary:}
+\printglossary
+\addcontentsline{toc}{section}{\glossaryname}
+
+\section{Introduction}
+
+A glossary is a list of words (concepts, terms) together with their
+explanations.
+\glossary{glossary:A list of words with explanations of these words}
+In a glossary you should explain those terms which are
+necessary for the understanding of your document, but which some of your
+readers might not know. The advantages of using a glossary vs. writing
+definitions in the middle of a sentence are:
+
+\begin{itemize}
+ \item improved text flow: the explanations don't clutter up the logical
+ structure of the text
+ \item reader-friendliness: people who already know the meaning of terms
+ (e.\,g. people who come from the same professional background as you)
+ don't need to read their definitions. That helps them understand the
+ text faster.
+\end{itemize}
+
+Very often a glossary is sorted alphabetically. An example for a glossary in
+a technical or scientific document is a list of mathematical symbols
+together with their meanings.
+
+{\tt makeglos} is a \LaTeX{} package to include a glossary into a document.
+The glossary must be prepared by an external program, like {\tt xindy} or
+{\tt makeindex}.
+\glossary{index processor:a software product to prepare an index for
+inclusion into a \LaTeX{} document}
+\glossary{xindy|is{an index processor, can also be used to process glossaries}}
+\glossary{xindy|see{index processor}}
+\glossary{xindy|seealso{glossary}}
+
+
+\section{Features}
+
+\begin{itemize}
+ \item Can be easily configured: various aspects of the appearance of the
+ glossary can be changed by a simple \verb+\renewcommand+.
+ \item Multi-language capability: certain keywords, like the name of the
+ glossary, can be made language-dependent.
+ \item Flexible: works equally well for document classes with a book- or
+ report-like structure (divided into \verb+\chapters+) and for article-like
+ documents, like the one you are reading now (based on \verb+\sections+)
+ \item Equivalent: \verb+makeglos+ is to glossaries what \verb+makeidx+ is
+ to indices.
+\end{itemize}
+
+
+\section{Commands}
+
+\begin{tabular}{lp{.7\textwidth}}
+\verb+\printglossary+ & Inserts the glossary file ({\tt *.gls}) here. \\
+\verb+\glossaryname+ & The name of the glossary. Defaults to ``Glossary''.\\
+\verb+\glossaryintro+ & Something to print before the actual glossary.
+Defaults to empty. \\
+\verb+\gsee+ & The cross-reference introduction phrase.
+Defaults to \verb+\emph{\seename} #1+. \\
+\verb+\galso+ & The secondary cross-reference introduction phrase.
+Defaults to \verb+\emph{\alsoname} #1+. \\
+\verb+\seename+ & The cross-reference introduction phrase.
+Defaults to ``see''. Redefined by \verb+babel+ package.\\
+\verb+\alsoname+ & The secondary cross-reference introduction phrase.
+Defaults to ``see also''. Redefined by \verb+babel+ package.\\
+\end{tabular}
+
+
+\section{Notes}
+
+The glossary environment is by default defined to be a chapter (or section)
+which does not appear in the table of contents. If you want the glossary to
+appear there (just like I did when I wrote this), just add \\
+\verb+\addcontentsline{toc}{section}{\glossaryname}+.
+
+The glossary's environment definition for document classes in which the
+\verb+\chapter+ command is undefined (article-like documents) is
+\begin{verbatim}
+\newenvironment{theglossary}%
+{\section*{\glossaryname}\glossaryintro%
+\begin{description}}%
+{\end{description}}%
+\end{verbatim}
+
+The glossary's environment definition for document classes in which the
+\verb+\chapter+ command is defined (report-/book-like documents) is
+\begin{verbatim}
+\newenvironment{theglossary}%
+{\chapter*{\glossaryname}\glossaryintro%
+\begin{description}}%
+{\end{description}}%
+\end{verbatim}
+
+If you want to change this, \verb+\renewenvironment+ is your friend!
+
+The glossary for this document was prepared with \verb+xindy+, version 2.0d:\\
+\verb+xindy -o makeglos.gls -f tex2xindy makeglos.xdy makeglos.glo+
+
+\end{document}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End:
diff --git a/macros/latex/contrib/makeglos/makeglos.xdy b/macros/latex/contrib/makeglos/makeglos.xdy
new file mode 100644
index 0000000000..a0484e3183
--- /dev/null
+++ b/macros/latex/contrib/makeglos/makeglos.xdy
@@ -0,0 +1,77 @@
+(define-attributes ("default"))
+
+(define-location-class "arabic-page-numbers" ("arabic-numbers"))
+(define-location-class "roman-page-numbers" ("roman-numbers-lowercase"))
+(define-location-class "Roman-page-numbers" ("roman-numbers-uppercase"))
+(define-location-class "alpha-page-numbers" ("alpha"))
+(define-location-class "Alpha-page-numbers" ("ALPHA"))
+
+(define-crossref-class "see")
+(define-crossref-class "seealso")
+
+(markup-crossref-list :open "\gsee{" :sep ", " :close "}{}"
+ :class "see")
+(markup-crossref-list :open "\galso{" :sep ", " :close "}{}"
+ :class "seealso")
+
+(define-crossref-class "is" :unverified)
+(markup-crossref-list :open "" :sep "; " :close "" :class "is")
+
+(define-location-class-order ("is"
+ "see"
+ "seealso"
+ "roman-page-numbers"
+ "arabic-page-numbers"
+ "alpha-page-numbers"
+ "Roman-page-numbers"
+ "Alpha-page-numbers"))
+
+(markup-index :open "\begin{theglossary}"
+ :close "~n\end{theglossary}~n"
+ :flat)
+
+(markup-indexentry :open "~n \item " :depth 0)
+(markup-keyword-list :open "[" :sep ", " :close "]")
+
+(markup-locclass-list :open " " :sep "; ")
+
+(markup-locref-list :sep ", ")
+
+(markup-range :sep "--")
+
+(define-letter-groups
+ ("a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m"
+ "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z"))
+
+(sort-rule "A" "a")
+(sort-rule "B" "b")
+(sort-rule "C" "c")
+(sort-rule "D" "d")
+(sort-rule "E" "e")
+(sort-rule "F" "f")
+(sort-rule "G" "g")
+(sort-rule "H" "h")
+(sort-rule "I" "i")
+(sort-rule "J" "j")
+(sort-rule "K" "k")
+(sort-rule "L" "l")
+(sort-rule "M" "m")
+(sort-rule "N" "n")
+(sort-rule "O" "o")
+(sort-rule "P" "p")
+(sort-rule "Q" "q")
+(sort-rule "R" "r")
+(sort-rule "S" "s")
+(sort-rule "T" "t")
+(sort-rule "U" "u")
+(sort-rule "V" "v")
+(sort-rule "W" "w")
+(sort-rule "X" "x")
+(sort-rule "Y" "y")
+(sort-rule "Z" "z")
+
+;; End
+
+;; Local Variables:
+;; mode: lisp
+;; End: