summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/vhistory
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/vhistory
Initial commit
Diffstat (limited to 'macros/latex/contrib/vhistory')
-rw-r--r--macros/latex/contrib/vhistory/CHANGES19
-rw-r--r--macros/latex/contrib/vhistory/README37
-rw-r--r--macros/latex/contrib/vhistory/doc/README34
-rw-r--r--macros/latex/contrib/vhistory/doc/de_beispiel.tex39
-rw-r--r--macros/latex/contrib/vhistory/doc/de_einleitung.tex27
-rw-r--r--macros/latex/contrib/vhistory/doc/de_sets.tex172
-rw-r--r--macros/latex/contrib/vhistory/doc/de_vhistory.tex115
-rw-r--r--macros/latex/contrib/vhistory/doc/en_example.tex39
-rw-r--r--macros/latex/contrib/vhistory/doc/en_introduction.tex28
-rw-r--r--macros/latex/contrib/vhistory/doc/en_sets.tex175
-rw-r--r--macros/latex/contrib/vhistory/doc/en_vhistory.tex117
-rw-r--r--macros/latex/contrib/vhistory/doc/hyperref.cfg7
-rw-r--r--macros/latex/contrib/vhistory/doc/vh_set_example.pdfbin0 -> 74513 bytes
-rw-r--r--macros/latex/contrib/vhistory/doc/vh_set_example.tex58
-rw-r--r--macros/latex/contrib/vhistory/doc/vh_sets_de.pdfbin0 -> 167148 bytes
-rw-r--r--macros/latex/contrib/vhistory/doc/vh_sets_de.tex73
-rw-r--r--macros/latex/contrib/vhistory/doc/vh_sets_en.pdfbin0 -> 161460 bytes
-rw-r--r--macros/latex/contrib/vhistory/doc/vh_sets_en.tex66
-rw-r--r--macros/latex/contrib/vhistory/sets.sty437
-rw-r--r--macros/latex/contrib/vhistory/vhistory.sty439
20 files changed, 1882 insertions, 0 deletions
diff --git a/macros/latex/contrib/vhistory/CHANGES b/macros/latex/contrib/vhistory/CHANGES
new file mode 100644
index 0000000000..ec9ce16af8
--- /dev/null
+++ b/macros/latex/contrib/vhistory/CHANGES
@@ -0,0 +1,19 @@
+2013-04-21: Bugfix release 1.6.1. No new features, but:
+ - Fixed bug that occurs when the options hideauthorcolumn and
+ tablegrid are used together
+ - Corrected lot of typos in the English documentation
+ - Described the previously undocumented option hideauthorcolumn
+2013-01-22: - Added Croation translation
+ - New option tablegrid
+ - Introduced possibility to change column width
+ Thanks to the users for their input which led to these changes.
+2010-07-17: - Added French translation.
+ - Listing of sets improved.
+ - Dutch translation added and English labels improved.
+ My thanks go to the friendly people who sent their patches and
+ comments to me.
+2009-03-01: Bug solved that occured when the first two letters of an element
+ of a set were identical.
+2006-01-09: Implementation of \listset changed. It now works within an \edef,
+ but the element \empty is no longer allowed in a set.
+2005-08-13: Documentation: Reference to LPPL added.
diff --git a/macros/latex/contrib/vhistory/README b/macros/latex/contrib/vhistory/README
new file mode 100644
index 0000000000..67535885e0
--- /dev/null
+++ b/macros/latex/contrib/vhistory/README
@@ -0,0 +1,37 @@
+See below for German version.
+
+This folder contains the files of the LaTeX packages "vhistory" and "sets".
+User documentation can be found in the subdirectory doc. An example for
+vhistory can be found there, too.
+
+All feedback is welcome! Please use the address mentioned in the
+documentation.
+
+REQUIREMENTS:
+Requirements are listed in the user documentation.
+
+LICENSE:
+The material in this directory and all of its subdirectories is subject
+to the LaTeX Project Public License. See
+http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for
+the details of that license.
+
+==============================================================================
+GERMAN VERSION:
+
+Dieser Ordner enthaelt die Dateien der LaTeX-Pakete "vhistory" und "sets".
+Die Dokumentation befindet sich im Unterverzeichnis doc. Ein Beispiel für
+die Verwendung von vhistory (in englischer Sprache) befindet sich ebenfalls
+in diesem Verzeichnis.
+
+Rueckmeldung ueber Fehler oder Verbesserungsvorschlaege an die in der
+Dokumentation angegebene Adresse sind stets willkommen.
+
+SYSTEMANFORDERUNGEN:
+Die Benutzerdokumentation listet alle benoetigten Pakete auf.
+
+LIZENZ:
+Das gesamte Material dieses Verzeichnisses und all seiner Unterverzeichnisse
+steht unter der LaTeX Project Public License. Diese kann in englischer Sprache
+unter http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+eingesehen werden. \ No newline at end of file
diff --git a/macros/latex/contrib/vhistory/doc/README b/macros/latex/contrib/vhistory/doc/README
new file mode 100644
index 0000000000..f28d39c28d
--- /dev/null
+++ b/macros/latex/contrib/vhistory/doc/README
@@ -0,0 +1,34 @@
+See below for German version.
+
+This folder contains the documentation of the LaTeX packages "vhistory" and
+"sets". The file you are probably searching for is called vh_sets_en.pdf.
+
+The files vh_set_example.tex and vh_set_example.pdf contain an example for the
+usage of vhistory.
+
+All feedback is welcome! Please use the address mentioned in the
+documentation.
+
+LICENSE:
+The material in this directory and all of its subdirectories is subject
+to the LaTeX Project Public License. See
+http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for
+the details of that license.
+
+==============================================================================
+GERMAN VERSION:
+
+Dieser Ordner enthaelt die Dokumentation der LaTeX-Pakete "vhistory" und
+"sets". Hoechstwahrscheinlich ist die von Ihnen gesuchte Datei vh_sets_de.pdf
+
+Die Dateien vh_set_example.tex und vh_set_example.pdf enthalten ein Beispiel
+fuer die Verwendung von vhistory.
+
+Rueckmeldung ueber Fehler oder Verbesserungsvorschlaege an die in der
+Dokumentation angegebene Adresse sind stets willkommen.
+
+LIZENZ:
+Das gesamte Material dieses Verzeichnisses und all seiner Unterverzeichnisse
+steht unter der LaTeX Project Public License. Diese kann in englischer Sprache
+unter http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+eingesehen werden. \ No newline at end of file
diff --git a/macros/latex/contrib/vhistory/doc/de_beispiel.tex b/macros/latex/contrib/vhistory/doc/de_beispiel.tex
new file mode 100644
index 0000000000..7cbedecff6
--- /dev/null
+++ b/macros/latex/contrib/vhistory/doc/de_beispiel.tex
@@ -0,0 +1,39 @@
+\begin{figure}[htb]
+\newcounter{line}\small
+\newcommand{\bef}{\\\stepcounter{line}\hbox to 1em{\hfill\footnotesize \arabic{line}:}\quad}
+\mbox{}
+\bef\verb@\documentclass{scrartcl}@
+\bef\verb@\usepackage{ngerman, vhistory, hyperref}@
+\bef\verb@@
+\bef\verb@\newcommand{\docTitle}{Ein Beispiel f\"ur vhistory}@
+\bef\verb@@
+\bef\verb@\hypersetup{%@
+\bef\verb@ pdftitle = {\docTitle},@
+\bef\verb@ pdfkeywords = {\docTitle, Version \vhCurrentVersion@
+\bef\verb@ vom \vhCurrentDate},@
+\bef\verb@ pdfauthor = {\vhAllAuthorsSet}@
+\bef\verb@}@
+\bef\verb@@
+\bef\verb@\usepackage{scrpage2}@
+\bef\verb@\pagestyle{scrheadings}@
+\bef\verb@\ifoot{\docTitle\ -- Version \vhCurrentVersion}@
+\bef\verb@\cfoot[]{}@
+\bef\verb@\ofoot[\thepage]{\thepage}@
+\bef\verb@@
+\bef\verb@\begin{document}@
+\bef\verb@@
+\bef\verb@\title{\docTitle}@
+\bef\verb@\author{\vhListAllAuthors}@
+\bef\verb@\date{Version \vhCurrentVersion\ vom \vhCurrentDate}@
+\bef\verb@\maketitle@
+\bef\verb@@
+\bef\verb@\begin{versionhistory}@
+\bef\verb@ \vhEntry{1.0}{22.01.04}{JPW|KW}{Erstellung}@
+\bef\verb@ \vhEntry{1.1}{23.01.04}{DP|JPW}{Fehlerkorrektur}@
+\bef\verb@ \vhEntry{1.2}{03.02.04}{DP|JPW}{\"Uberarbeitung nach Review}@
+\bef\verb@\end{versionhistory}@
+\bef\verb@@
+\bef\verb@\end{document}@
+
+\caption{Beispiel für die Verwendung von vhistory}\label{abb:beispiel}
+\end{figure}
diff --git a/macros/latex/contrib/vhistory/doc/de_einleitung.tex b/macros/latex/contrib/vhistory/doc/de_einleitung.tex
new file mode 100644
index 0000000000..9ead137403
--- /dev/null
+++ b/macros/latex/contrib/vhistory/doc/de_einleitung.tex
@@ -0,0 +1,27 @@
+\section{Einleitung}\label{einleitung}
+Es ist mir klar, dass die wenigsten Leser Einleitungen lesen. Ich empfehle dennoch, diesen Abschnitt nicht zu überspringen, da er zu erläutern versucht, wa\-rum die Pakete sets und vhistory entwickelt wurden. So können Sie frühzeitig erkennen, ob sie Ihren Anforderungen gerecht werden.
+
+%\index{Versionshistorie|(}
+Bei Softwareprojekten entstehen (hoffentlich) viele Dokumente wie Spezifikation oder Entwurf. Diese Dokumente werden mehrfach überarbeitet. Um Änderungen direkt nachvollziehen zu können, sollten diese Dokumente eine sogenannte \emph{Versionshistorie} enthalten. Dabei handelt es sich um eine Tabelle, deren Einträge folgende Daten umfassen:
+\begin{itemize}
+ \item eine Versionsnummer,
+ \item das Datum der Änderung,
+ \item die Kürzel der Personen, die die Änderungen vorgenommen haben (die Autoren),
+ \item eine Beschreibung der Änderungen.
+\end{itemize}
+
+Bestimmte Daten der Versionshistorie sollen häufig an anderen Stellen im Dokument wiederholt werden. So soll typischerweise die Titelseite die aktuelle Versionsnummer und alle Autoren aufführen. Die Versionsnummer sollte außerdem auf allen Seiten des Dokuments, z.\,B. in einer Fußzeile, wiederholt werden. Dadurch kann leicht überprüft werden, ob eine Seite zur aktuellsten Version gehört oder schon veraltet ist.
+
+Normalerweise werden die Daten, die z.\,B. auf der Titelseite erscheinen, nicht aus der Versionshistorie übernommen, sondern an anderer Stelle erneut angegeben. Die Einträge der Versionshistorie werden in der Regel immer aktualisiert. In der Hektik wird aber meist vergessen, die Angaben für Titelseite etc. zu aktualisieren. Das Ergebnis sind inkonsistente Dokumente. Aus eigener Erfahrung weiß ich, dass die Angaben zu den Autoren praktisch nie stimmen, besonders wenn im Laufe der Zeit mehrere Personen an einem Dokument gearbeitet haben.
+%\index{Versionshistorie|)}
+
+Es wäre also schön, wenn der Autor eines Dokuments sich nur darum kümmern müsste, die Versionshistorie auf dem aktuellen Stand zu halten. Die Informationen auf der Titelseite und in Fußzeilen sollten automatisch aus der Versionshistorie generiert werden.
+
+Diese Anforderungen sind ohne einen gewissen Aufwand nicht umzusetzen, da beispielsweise die Titelseite erzeugt wird, bevor die Versionshistorie überhaupt gelesen wurde. Die relevanten Daten müssen deshalb in eine Datei geschrieben und noch vor Bearbeitung der Titelseite wieder eingelesen werden. Da für manche Anwendungen auch der Zeitpunkt, zu dem die aux-Datei eingelesen wird zu spät ist, wird eine eigene Datei mit der Endung hst angelegt.
+Für die Tabelle mit der Versionshistorie ist ebenfalls eine eigene Datei notwendig, doch dazu später.
+
+Ein anderes Problem stellt die Liste der Autoren dar. Diese Liste kann nicht einfach durch Aneinanderreihung der Autor-Einträge in der Versionshistorie erzeugt werden, da sonst einige Personen mehrfach auftreten würden. Dies war die Geburtsstunde des Pakets sets, mit dem einfache Mengen von Text verwaltet werden können. Die Menge aller Autoren wird bei jedem Eintrag in der Versionshistorie mit der Menge der angegebenen Autoren vereinigt. Die Menge aller Autoren kann dann in alphabetisch sortierter Form an beliebiger Stelle -- eben meist auf der Titelseite -- ausgegeben werden.
+
+Soweit zur Vorrede. Die beiden folgenden Abschnitte beschreiben die beiden Pakete eingehender und zeigen, wie man mit ihnen arbeitet. Dabei wurde darauf verzichtet, den Quellcode der Pakete wiederzugeben. Wer sich dafür interessiert, kann direkt in die Quellen schauen. Ich habe versucht, den Quellcode so zu strukturieren und zu kommentieren, dass er lesbar ist.
+
+%Außerdem habe ich einen Trick angewandt, der sich unter \TeX{}nischen Programmierern leider kaum herumgesprochen hat; ich habe Kommentare sowohl zwischen, als auch innerhalb der Makros eingefügt.
diff --git a/macros/latex/contrib/vhistory/doc/de_sets.tex b/macros/latex/contrib/vhistory/doc/de_sets.tex
new file mode 100644
index 0000000000..3fd22e6303
--- /dev/null
+++ b/macros/latex/contrib/vhistory/doc/de_sets.tex
@@ -0,0 +1,172 @@
+\section{Das Paket sets}\label{sets}
+
+Wie schon in der Einleitung beschrieben ist sets dazu konzipiert, Mengenoperationen zu unterstützen. Die Elemente einer Menge sind normalerweise einfacher Text, Sie können aber auch Kommandos in Mengen einfügen. Diese werden -- außer
+bei der Ausgabe -- nicht ausgepackt. Die Verwendung von geschweiften Klammern in Mengen funktioniert leider nicht. In diesem Fall müssen Sie sich eine Abkürzung definieren, die ohne Parameter auskommt. Parameter ohne Klammern funktionieren jedoch. "`\verb|H"agar|"' wäre also ein gültiges Element einer Menge. Die Elemente "`\verb|\endset|"' und "`\verb|\empty|"' dürfen nicht in einer Menge enthalten sein.
+
+Da ein Dokument nur wenige Autoren hat, wurde auf Effizienz kein besonderer Wert gelegt. Die Mengen sollten deshalb relativ klein sein. Sollten Sie dennoch eine Menge mit hunderten oder gar tausenden von Elementen anlegen wollen, kann es passieren, dass der Stack von \TeX\ überläuft.
+
+Normalerweise ist bei einer Menge die Reihenfolge der Elemente egal. Dies ist auch hier bei den meisten Befehlen der Fall. Bei Abweichungen wird darauf hingewiesen.
+
+Das Paket sets benötigt \LaTeXe.
+
+\subsection{Verwendung}\label{sets-verwendung}
+
+In diesem Unterabschnitt soll die Verwendung des Pakets sets vorgestellt werden. Dabei werden einige Beispielmengen verwendet werden:
+\begin{eqnarray*}
+ A &=& \{Alice, Bob, Charly\}\\
+ B &=& \{Alice, Bob\}\\
+ C &=& \{Bob, Dean\}\\
+ D &=& \{Dean\}\\
+ L &=& \emptyset
+\end{eqnarray*}
+
+%-----------------------------------------------------------------------------
+\subsubsection{Konstruktoren}\label{konstruktoren}
+Um eine Menge anzulegen, gibt es die Befehle\\
+\mbox{}\hspace{2em}\verb$\newset{<Menge>}{<Inhalt>}$\\
+und\\
+\mbox{}\hspace{2em}\verb$\newsetsimple{<Menge>}{<Inhalt>}$.\\
+\texttt{<Menge>} ist ein Kommandoname, unter dem die Menge später erreichbar sein soll. Die Elemente einer Menge werden durch \texttt{|} getrennt. Die Menge $A$ ließe sich also wie folgt definieren:\\
+\mbox{}\hspace{2em}\verb$\newset{\mA}{Alice|Bob|Charly}$\\
+Die Menge $L$ wird mit\\
+\mbox{}\hspace{2em}\verb$\newset{\mL}{}$\\
+definiert.
+
+\verb$\newset$ legt also eine neue Menge an. Diese wird dabei alphabetisch sortiert und Duplikate werden entfernt. Es wäre also egal gewesen, wenn bei der Definition von $A$ nach "`Charly"' ein weiteres Mal "`Alice"' gestanden hätte.
+
+Der Aufwand für Sortierung und Duplikatentfernung ist an dieser Stelle unnötig. Will man diese Schritte nicht durchführen lassen, kann man eine Menge auch mit \verb$\newsetsimple$ definieren.
+
+Da sie später noch benötigt werden, werden wir nun alle oben genannten Mengen anlegen:\\
+\mbox{}\hspace{2em}\verb$\newsetsimple{\mA}{Alice|Bob|Charly}$ \newsetsimple{\mA}{Alice|Bob|Charly}\\
+\mbox{}\hspace{2em}\verb$\newsetsimple{\mD}{Alice|Bob}$ \newsetsimple{\mB}{Alice|Bob}\\
+\mbox{}\hspace{2em}\verb$\newsetsimple{\mC}{Bob|Dean}$ \newsetsimple{\mC}{Bob|Dean}\\
+\mbox{}\hspace{2em}\verb$\newsetsimple{\mD}{Dean}$ \newsetsimple{\mD}{Dean}\\
+\mbox{}\hspace{2em}\verb$\newsetsimple{\mL}{}$ \newsetsimple{\mL}{}
+%-----------------------------------------------------------------------------
+\subsubsection{Inspektoren}\label{inspektoren}
+Inspektoren dienen dazu, Eigenschaften von Mengen herauszufinden oder diese auszugeben.
+
+\paragraph{Ausgabe:}Eine Menge lässt sich über\\
+\mbox{}\hspace{2em}\verb$\listset$\\
+ausgeben. Die Elemente werden in der Reihenfolge, in der sie in der Menge stehen, ausgegeben. Als Trennzeichen zwischen den Elementen wird das Komma verwendet.
+
+\verb$\listset{\mA}$ ergibt also folgende Ausgabe:\\
+\centerline{\listset{\mA}}
+
+Manchmal möchte man die Elemente einer Menge vielleicht auf andere Art und Weise trennen, z.\,B. mit einem \texttt{\&} zur Darstellung in einer Tabelle. Hier hilft einem die (temporäre) Umdefinition des Kommandos\\
+\mbox{}\hspace{2em}\verb$\setseparator$\\
+weiter. Normalerweise hat dieses Makro den Ersetzungstext `\verb*$,\ $'.
+
+\paragraph{Größenbestimmung:} Der nächste Inspektor hat die Syntax\\
+\mbox{}\hspace{2em}\verb$\sizeofset{$$M$\verb$}\is{<Zähler>}$\\
+\texttt{<Zähler>} ist dabei der Name eines \LaTeX-Zählers, in dem die Anzahl der Elemente der Menge $M$ gespeichert wird. Die Kommandosequenz\\
+\mbox{}\hspace{2em}\verb$\newcounter{mycounter}$\newcounter{mycounter}\\
+\mbox{}\hspace{2em}\verb$\sizeofset{\mB}\is{mycounter}$\sizeofset{\mB}\is{mycounter}\\
+\mbox{}\hspace{2em}\verb$\arabic{mycounter}$\\
+führt zur Ausgabe: "`\arabic{mycounter}"'
+Wird die Größe der Menge $L$ bestimmt, ist das Ergebnis \sizeofset{\mL}\is{mycounter}wie erwartet "`\arabic{mycounter}"'.
+
+\paragraph{Prüfung auf Mitgliedschaft:}Mit dem Befehl\\
+\mbox{}\hspace{2em}\verb$\iselementofset{$$e$\verb$}{$$M$\verb$}$\\
+kann überprüft werden, ob $e \in M$ gilt. Der Aufwand ist $O(1)$, da alle Arbeit durch die Mustererkennung von \TeX\ übernommen wird. Die Befehlssequenz\\
+\mbox{}\hspace{2em}\verb$\if \iselementofset{Bob}{\mC}Ja\else Nein\fi$\\
+würde zur Ausgabe "`\if \iselementofset{Bob}{\mC}Ja\else Nein\fi"' führen, der gleiche Test mit Menge $D$ zu "`\if \iselementofset{Bob}{\mD}Ja\else Nein\fi"'.
+
+%-----------------------------------------------------------------------------
+\subsubsection{Modifikatoren}\label{modifikatoren}
+
+\paragraph{Mengenvereinigung:}Die Operation $R := M_1 \cup M_2$ wird durch den Befehl\\
+\mbox{}\hspace{2em}\verb|\unionsets{|$M_1$\verb|}{|$M_2$\verb|}\to{|$R$\verb|}|\\
+realisiert. Ein paar Beispiele sind in Tabelle \ref{tab:ops} aufgeführt. Das Ergebnis der Operation ist eine sortierte Menge ohne Duplikate, die die Elemente der Mengen $M_1$ und $M_2$ enthält.
+
+\paragraph{Mengendifferenz:}Die Operation $R := M_1 - M_2$ (auch $R := M_1 \backslash M_2$ geschrieben) lässt sich mit dem Befehl\\
+\mbox{}\hspace{2em}\verb|\minussets{|$M_1$\verb|}\minus{|$M_2$\verb|}\to{|$R$\verb|}|\\
+durchführen. Ist $M_1$ eine sortierte Menge, wird auch $R$ sortiert sein. Enthält $M_1$ Duplikate, enthält $R$ eventuell ebenfalls diese Duplikate. Tabelle \ref{tab:ops} enthält einige Beispiele für die Verwendung dieses Befehls.
+
+Die Operation kann man umgangssprachlich wie folgt formulieren: Prüfe für jedes Element $e$ aus $M_1$, ob $e \in M_2$ gilt. Wenn nein, füge $e$ zu $R$ hinzu. Und genau so wurde es auch straight forward implementiert!
+
+\paragraph{Mengendurchschnitt:} Die Operation $R := M_1 \cap M_2$ wird durch den Befehl\\
+\mbox{}\hspace{2em}\verb|\intersectsets{|$M_1$\verb|}{|$M_2$\verb|}\to{|$R$\verb|}|\\
+ermöglicht. Auch hier gilt: Ist $M_1$ eine sortierte Menge, wird auch $R$ sortiert sein. Enthält $M_1$ Duplikate, enthält $R$ eventuell ebenfalls diese Duplikate.
+Tabelle \ref{tab:ops} enthält auch Beispiele für die Verwendung dieser Operation.
+
+Die Operation kann man umgangssprachlich wie folgt formulieren: Prüfe für jedes Element $e$ aus $M_1$, ob $e \in M_2$ gilt. Wenn ja, füge $e$ zu $R$ hinzu. Wenn man dies mit der Formulierung der Mengendifferenz vergleicht, fällt auf, dass der einzige Unterschied im Wörtchen "`ja"' besteht. In der Implementierung drückt sich dies durch ein fehlendes \verb|\else| aus. Eigentlich verblüffend einfach, wenn man bedenkt, dass formal $M_1 \cap M_2 \equiv M_1 \backslash (M_1\backslash M_2)$ gilt, was eine deutlich höhere Komplexität erwarten lässt.
+
+\begin{table}%[htb]
+\begin{center}
+\begin{tabular}{ll}\hline
+\textbf{Befehl} & \textbf{Ergebnis} \\ \hline
+\unionsets{\mA}{\mC}\to{\mR}\global\let\mR\mR
+ \verb$\unionsets{\mA}{\mC}\to{\mR}$ & "`\listset{\mR}"' \\
+\unionsets{\mB}{\mD}\to{\mR}\global\let\mR\mR
+ \verb$\unionsets{\mB}{\mD}\to{\mR}$ & "`\listset{\mR}"' \\
+\unionsets{\mL}{\mC}\to{\mR}\global\let\mR\mR
+ \verb$\unionsets{\mL}{\mC}\to{\mR}$ & "`\listset{\mR}"' \\
+\unionsets{\mL}{\mL}\to{\mR}\global\let\mR\mR
+ \verb$\unionsets{\mL}{\mL}\to{\mR}$ & "`\listset{\mR}"' \\\hline
+%
+\minussets{\mA}\minus{\mC}\to{\mR}\global\let\mR\mR
+ \verb$\minussets{\mA}\minus{\mC}\to{\mR}$ & "`\listset{\mR}"' \\
+\minussets{\mD}\minus{\mC}\to{\mR}\global\let\mR\mR
+ \verb$\minussets{\mD}\minus{\mC}\to{\mR}$ & "`\listset{\mR}"' \\
+\minussets{\mD}\minus{\mB}\to{\mR}\global\let\mR\mR
+ \verb$\minussets{\mD}\minus{\mB}\to{\mR}$ & "`\listset{\mR}"' \\
+\minussets{\mA}\minus{\mL}\to{\mR}\global\let\mR\mR
+ \verb$\minussets{\mA}\minus{\mL}\to{\mR}$ & "`\listset{\mR}"' \\\hline
+%
+\intersectsets{\mA}{\mB}\to{\mR}\global\let\mR\mR
+ \verb$\intersectsets{\mA}{\mB}\to{\mR}$ & "`\listset{\mR}"' \\
+\intersectsets{\mC}{\mB}\to{\mR}\global\let\mR\mR
+ \verb$\intersectsets{\mC}{\mB}\to{\mR}$ & "`\listset{\mR}"' \\
+\intersectsets{\mB}{\mD}\to{\mR}\global\let\mR\mR
+ \verb$\intersectsets{\mB}{\mD}\to{\mR}$ & "`\listset{\mR}"' \\
+\intersectsets{\mA}{\mL}\to{\mR}\global\let\mR\mR
+ \verb$\intersectsets{\mA}{\mL}\to{\mR}$ & "`\listset{\mR}"' \\\hline
+\end{tabular}
+\caption{Mengenoperationen, Beispiele}
+\label{tab:ops}
+\end{center}
+\end{table}
+
+\paragraph{Sortieren:} Eine Menge $M$ kann alphabetisch sortiert werden. Dazu verwendet man den Befehl\\
+\mbox{}\hspace{2em}\verb|\sortset{|$M$\verb|}{|$R$\verb|}|.\\
+$R$ enthält danach die sortierte Menge. Die Sortierung erfolgt nach dem Sortierverfahren Bubblesort, einem Verfahren, das sich auch mit \TeX\ ohne größere Verrenkungen umsetzen lässt.
+
+Bei der Sortierung werden die Elemente so verglichen, wie Sie sie angegeben haben, d.\,h. eventuell enthaltene Kommandos werden nicht expandiert, sondern nach ihrem Namen verglichen (inklusive des Backslash).
+
+\paragraph{Duplikatentfernung:} Diese Operation funktioniert \emph{nur} auf sortierten Mengen! Man benötigt sie aber eigentlich auch kaum, da die Erstellung einer neuen Menge mit \verb|\newset| diese Aufgabe automatisch übernimmt (indem sie dieses Makro verwendet). Ich habe mich aber dazu entschlossen, die Operation trotzdem verfügbar zu machen; vielleicht benötigt sie ja tatsächlich einmal jemand.
+Aufgerufen wird die Duplikateleminierung mit:\\
+\mbox{}\hspace{2em}\verb|\deleteduplicates{|$M$\verb|}{|$R$\verb|}|,\\
+wobei $R$ die Ergebnis-Menge darstellt und $M$ die sortierte Menge, deren Duplikate entfernt werden sollen.
+
+%------------------------------------------------------------------------------
+\subsection{Aufwandsabschätzung}
+Tabelle \ref{tab:komplexitaet} beschreibt die Komplexität der Operationen in O-Notation. Dabei werden folgende Annahmen getroffen:
+\begin{itemize}
+ \item Die Länge eines Elements einer Menge sei $m$.
+ \item Die Anzahl der Elemente einer Menge sei $n$. Werden für eine Operation zwei Mengen benötigt, gibt $n_1$ die Kardinalität der ersten und $n_2$ die Kardinalität der zweiten Menge an.
+ \item Zur Vereinfachung sei der Aufwand für die Mustererkennung bei der Parameterübergabe konstant.
+\end{itemize}
+
+Die angegebenen Komplexitätsklassen können dazu dienen, eine Reihe von Mengenoperationen möglichst günstig anzuordnen. Beispielsweise ist es besser, bei \verb@\intersectsets@ und \verb@\minussets@ als erste Menge die kleinere Menge zu übergeben.
+
+\begin{table}[htb]
+ \begin{center}
+ \begin{tabular}{lc}\hline
+ \textbf{Operation} & \textbf{Komplexitätsklasse}\\ \hline
+ Element-Vergleich & $m$\\
+ \verb@\sizeofset@ & $n$\\
+ \verb@\listset@ & $n$\\
+ \verb@\iselementofset@ & $1$\\%\hline
+ \verb@\sortset@ & $m \cdot n^2$\\
+ \verb@\deleteduplicates@ & $n$\\%\hline
+ \verb@\newset@ & $m \cdot n^2$\\
+ \verb@\newsetsimple@ & $1$\\%\hline
+ \verb@\unionsets@ & $m \cdot (n_1 + n_2)^2$\\
+ \verb@\intersectsets@ & $n_1$\\
+ \verb@\minussets@ & $n_1$\\ \hline
+ \end{tabular}
+ \caption{Komplexitätsklassen der Mengenoperationen}%
+ \label{tab:komplexitaet}%
+ \end{center}
+\end{table}
diff --git a/macros/latex/contrib/vhistory/doc/de_vhistory.tex b/macros/latex/contrib/vhistory/doc/de_vhistory.tex
new file mode 100644
index 0000000000..42cd15d60a
--- /dev/null
+++ b/macros/latex/contrib/vhistory/doc/de_vhistory.tex
@@ -0,0 +1,115 @@
+\section{Das Paket vhistory}
+Sinn und Zweck dieses Pakets wurde bereits ausführlich in Abschnitt \ref{einleitung} beschrieben. Ich sagte ja, dass es sich lohnt, die Einleitung zu lesen. Hier soll nun ausführlich erklärt werden, wie man mit vhistory arbeitet.
+
+\subsection{Laden des Pakets}\label{laden}
+Das Paket wird wie üblich in der Präambel mit dem Befehl\\
+\mbox{}\hspace{2em}\verb|\usepackage{vhistory}|\\
+geladen. Vhistory setzt \LaTeXe\ und die Pakete sets und ltxtable (welches wiederum longtable und tabularx benötigt) voraus. Sollten die Pakete noch nicht geladen worden sein, werden sie von vhistory automatisch geladen.
+
+Das Paket vhistory versteht einige Optionen, um sein Verhalten anzupassen. Diese sind im Folgenden aufgelistet. Ein Aufruf mit Optionen lautet zum Beispiel\\
+\mbox{}\hspace{2em}\verb|\usepackage[tocentry, owncaptions]{vhistory}|.
+
+\paragraph{nochapter:} Ist diese Option beim Laden des Pakets angegeben worden, wird für die Versionshistorie kein eigenes Kapitel -- bzw. kein eigener Abschnitt, falls die Dokumentenklasse article (oder scrartcl) verwendet wird -- erzeugt.
+
+\paragraph{tocentry:} Mit dieser Option wird veranlasst, dass die Versionshistorie im Inhaltsverzeichnis aufgeführt wird. Normalerweise wird dieser Eintrag nicht erzeugt. Ist die Option nochapter aktiviert hat tocentry keine Funktion. Hier sind Sie selbst für eventuelle Einträge in das Inhaltsverzeichnis verantwortlich.
+
+\paragraph{owncaptions:} vhistory unterstützt die Sprachen Deutsch, Englisch, Französisch, Kroatisch und Niederländisch. Verwenden Sie eine nicht unterstützte Sprache, werden die Überschriften (z.\,B. "`Versionshistorie"' oder "`Änderungen"') in Englisch ausgegeben. In diesem Fall möchten Sie vielleicht die Überschriften selbst verändern. Die Option own\-capt\-ions unterstützt Sie dabei. Näheres zu diesem Thema finden Sie in Unterabschnitt \ref{sprachen}.
+
+\paragraph{tablegrid:} Mit dieser Option wird in der Tabelle mit der Versionshistorie ein Gitternetz angezeigt.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Verwendung}\label{verwendung}
+Die Verwendung von vhistory ist denkbar einfach und soll in diesem Unterabschnitt beschrieben werden. Allgemein gilt, dass vhistory zwei Durchläufe benötigt, da Daten in Dateien geschrieben werden.
+
+\subsubsection{Erzeugen der Versionshistorie}\label{begin}
+Die Versionshistorie wird als Umgebung dargestellt:\\
+\mbox{}\hspace{2em}\verb|\begin{versionhistory}|\\
+\mbox{}\hspace{2em}\verb|<Einträge>|\\
+\mbox{}\hspace{2em}\verb|\end{versionhistory}|
+
+Ein Eintrag hat die allgemeine Gestalt:\\
+\mbox{}\hspace{2em}\verb@\vhEntry{<Version>}{<Datum>}{<Autoren>}{<Änderungen>}@
+
+Die Autoren werden in der Mengenschreibweise des Pakets set angegeben, d.\,h. als Trennzeichen wird \texttt{|} verwendet. Ein Eintrag könnte also wie folgt aussehen:\\
+\mbox{}\hspace{2em}\verb@\vhEntry{1.1}{13.05.04}{JW|AK|KL}{Fehler korrigiert.}@
+
+Durch das \verb|\begin|\ldots wird ein neues Kapitel (beziehungsweise ein neuer Abschnitt, falls article verwendet wird) begonnen, wenn dies nicht durch die Paketoption nochapter wie oben beschrieben abgeschalten wurde.
+
+Die Versionshistorie selbst wird in eine "`ltxtable"' gesetzt. Dadurch kann die Versionshistorie auch mehrere Seiten umfassen. Die Spalten "`Autor(en)"' und "`Änderungen"' werden automatisch umgebrochen. Das Paket ltxtable setzt voraus, dass die Tabelle in einer eigenen Datei liegt. Diese Datei wird von vhistory automatisch erzeugt und hat die Endung "`ver"'.
+
+\subsubsection{Auslesen der aktuellen Versionsnummer}
+Die aktuelle Versionsnummer -- genauer: die zuletzt angegebene Versionsnummer -- kann mit dem Befehl\\
+\mbox{}\hspace{2em}\verb|\vhCurrentVersion|\\
+bestimmt werden. Der Befehl ist ab der Einbindung des Pakets verfügbar.
+
+\subsubsection{Auslesen des aktuellen Datums}
+Analog zur aktuellen Versionsnummer kann auch das Datum der letzten Änderung angezeigt werden. Dies funktioniert mit dem Befehl\\
+\mbox{}\hspace{2em}\verb|\vhCurrentDate|.\\
+Der Befehl ist ebenfalls ab der Einbindung des Pakets verfügbar.
+
+\subsubsection{Liste aller Autoren ausgeben}
+An eine Liste der Autoren kommen Sie auf zwei Wege. Ãœber das Kommando\\
+\mbox{}\hspace{2em}\verb|\vhAllAuthorsSet|\\
+können Sie sich die Autoren als Menge wie in Abschnitt \ref{sets} beschrieben zurückgeben lassen. Der weitaus einfachere Weg liegt im Kommando\\
+\mbox{}\hspace{2em}\verb|\vhListAllAuthors|.
+
+Dieses Kommando gibt eine alphabetisch sortierte Liste der Autoren aus. Die einzelnen Einträge werden durch Kommata getrennt. Soll stattdessen ein anderes Trennzeichen -- beispielsweise \texttt{\&} zur Ausgabe in einer Tabelle -- verwendet werden, können sie den Befehl\\
+\mbox{}\hspace{2em}\verb|\setsepararator|\\
+aus dem Paket sets umdefinieren (siehe auch Abschnitt \ref{inspektoren}).
+
+Manchmal möchten Sie vielleicht, dass die Autorenliste komplette Namen statt Kürzeln enthält, zum Beispiel
+"`Jochen Wer\-ten\-au\-er"' statt des Kürzels "`JW"', das in der Versionshistorie Verwendung findet. Indem Sie das Kommando\\
+\mbox{}\hspace{2em}\verb|\vhListAllAuthorsLong|\\
+verwenden, erhalten Sei das gewünschte Verhalten. In diesem Fall schreiben Sie weiterhin ``JW'' im \verb|\entry|-Kommando (Hinweis: Da ist kein backslash an dieser Stelle!), definieren aber zusätzlich das Makro \verb|\JW| wie unten beschrieben.\\
+\mbox{}\hspace{2em}\verb|\newcommand{\JW}{Jochen Wertenauer}|\\
+In der Versionshistorie wird weiterhin der Text "`JW"' angezeigt, aber das Kommando \verb|\vhListAllAuthorsLong| verwendet das Makro \verb|\JW|. Ist das Makro undefiniert, wird das Kürzel ausgegeben.
+
+Alternativ zu \verb|\vhListAllAuthorsLong| können Sie auch\\
+\mbox{}\hspace{2em}\verb|\vhListAllAuthorsLongWithAbbrev|\\
+verwenden, das hinter dem kompletten Namen jeweils das Kürzel in Klammern ausgibt, also z.\,B. "`Jochen Wertenauer (JW)"'. Name und Kürzel werden durch den Befehl\\
+\mbox{}\hspace{2em}\verb|\vhAbbrevSeparator|\\
+getrennt. Dieser ist mit "`\verb*|\ |"' vorbelegt. Falls Sie Zeilenumbrüche vermeiden wollen, können Sie den Befehl auch mit\\
+\mbox{}\hspace{2em}\verb|\renewcommand{\vhAbbrevSeparator}{~}|\\
+umdefinieren. Die Klammern können durch Umdefinition von\\
+\mbox{}\hspace{2em}\verb|\vhAbbrevLeft| und\\
+\mbox{}\hspace{2em}\verb|\vhAbbrevRight|\\
+ebenfalls den eigenen Vorlieben angepasst werden.
+
+\subsubsection{Spaltenbreite der Versionshistorie anpassen}
+Sollte die Breite der Spalten für Autoren und Änderungen in der Versionshistorie nicht Ihren Bedürfnissen entsprechen, können Sie das Breitenverhältnis der beiden Spalten zueinander anpassen. Die Befehlsfolge\\
+\mbox{}\hspace{2em}\verb|\renewcommand \vhAuthorColWidth{.8\hsize}|\\
+\mbox{}\hspace{2em}\verb|\renewcommand \vhChangeColWidth{1.2\hsize}|\\
+ändert das Verhältnis auf 2:3 (Standard ist 1:3). Bitte achten Sie bei Änderungen darauf, dass die Summe der beiden Breiten \verb|2\hsize| ergibt.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Sprachunterstützung}\label{sprachen}
+Wie schon in Abschnitt \ref{laden} erwähnt unterstützt vhistory die Sprachen Deutsch, Englisch, Französisch und Niederländisch. Die sprachabhängigen Texte mit ihren Voreinstellungen sind in Tabelle \ref{tab:sprachen} aufgelistet. Soll das Dokument in einer Sprache verfasst werden, die vhistory nicht unterstützt, wird die englische Variante gewählt.
+
+Mit der Paketoption "`owncaptions"' können eigene Überschriften verwendet werden. Die Option veranlasst vhistory dazu, die Kommandos, die die Überschriften enthalten, mit den Varianten der aktuell gewählten Sprache vorzubelegen. Deshalb ist es sinnvoll, in diesem Fall Pakete wie babel oder ngerman vor vhistory zu laden.
+
+Ãœber das Kommando\\
+\mbox{}\hspace{2em}\verb|\renewcommand{<Kommando>}{<gewünschter Text>}|\\
+kann eine Überschrift verändert werden. Wollen Sie beispielsweise statt "`Änderungen"' lieber "`Verbesserungen"' verwenden, schreiben Sie\\
+\mbox{}\hspace{2em}\verb|\renewcommand{\vhchangename}{Verbesserungen}|.
+
+\begin{table}%[htb]
+\begin{center}
+\begin{scriptsize}
+\begin{tabular}{llllll}\hline
+& \verb|\vhhistoryname| & \verb|\vhversionname| & \verb|\vhdatename| & \verb|\vhauthorname| & \verb|\vhchangename|\\ \hline
+Deutsch & Versionshistorie & Version & Datum & Autor(en) & Änderungen\\
+Englisch & Revision History & Revision & Date & Author(s) & Description\\
+Französisch & Historique & Version & Date & Auteur(s) & Modifications\\
+Kroatisch & Povijest verzija & Verzija & Datum & Autor(ica) & Opis Promjena\\
+Niederländisch & Wijzigingen & Herziening & Datum & Auteur(s) & Beschrijving\\ \hline
+\end{tabular}
+\end{scriptsize}
+\caption{sprachabhängige Texte}
+\label{tab:sprachen}
+\end{center}
+\end{table}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Beispiel}
+%Abbildung \ref{abb:beispiel} zeigt ein kurzes Beispiel für die Verwendung von vhistory.
+\input{de_beispiel}
diff --git a/macros/latex/contrib/vhistory/doc/en_example.tex b/macros/latex/contrib/vhistory/doc/en_example.tex
new file mode 100644
index 0000000000..c4a05c0f7c
--- /dev/null
+++ b/macros/latex/contrib/vhistory/doc/en_example.tex
@@ -0,0 +1,39 @@
+\begin{figure}[htb]
+\newcounter{line}\small
+\newcommand{\bef}{\\\stepcounter{line}\hbox to 1em{\hfill\footnotesize \arabic{line}:}\quad}
+\mbox{}
+\bef\verb@\documentclass{scrartcl}@
+\bef\verb@\usepackage{vhistory, hyperref}@
+\bef\verb@@
+\bef\verb@\newcommand{\docTitle}{An example for vhistory}@
+\bef\verb@@
+\bef\verb@\hypersetup{%@
+\bef\verb@ pdftitle = {\docTitle},@
+\bef\verb@ pdfkeywords = {\docTitle, Version \vhCurrentVersion@
+\bef\verb@ from \vhCurrentDate},@
+\bef\verb@ pdfauthor = {\vhAllAuthorsSet}@
+\bef\verb@}@
+\bef\verb@@
+\bef\verb@\usepackage{scrpage2}@
+\bef\verb@\pagestyle{scrheadings}@
+\bef\verb@\ifoot{\docTitle\ -- Version \vhCurrentVersion}@
+\bef\verb@\cfoot[]{}@
+\bef\verb@\ofoot[\thepage]{\thepage}@
+\bef\verb@@
+\bef\verb@\begin{document}@
+\bef\verb@@
+\bef\verb@\title{\docTitle}@
+\bef\verb@\author{\vhListAllAuthors}@
+\bef\verb@\date{Version \vhCurrentVersion\ from \vhCurrentDate}@
+\bef\verb@\maketitle@
+\bef\verb@@
+\bef\verb@\begin{versionhistory}@
+\bef\verb@ \vhEntry{1.0}{22.01.04}{JPW|KW}{created}@
+\bef\verb@ \vhEntry{1.1}{23.01.04}{DP|JPW}{correction}@
+\bef\verb@ \vhEntry{1.2}{03.02.04}{DP|JPW}{revised after review}@
+\bef\verb@\end{versionhistory}@
+\bef\verb@@
+\bef\verb@\end{document}@
+
+\caption{Example for the usage of vhistory}\label{abb:example}
+\end{figure} \ No newline at end of file
diff --git a/macros/latex/contrib/vhistory/doc/en_introduction.tex b/macros/latex/contrib/vhistory/doc/en_introduction.tex
new file mode 100644
index 0000000000..d4d99fb9e5
--- /dev/null
+++ b/macros/latex/contrib/vhistory/doc/en_introduction.tex
@@ -0,0 +1,28 @@
+\section{Introduction}\label{introduction}
+It's clear to me that nobody reads introductions. Nevertheless I recommend not to skip this section, as it tries to explain why I developed the packages sets and vhistory.
+By reading the following you can see if these packages meet your requirements.
+
+During software projects (hopefully) a lot of documents like specification or design are created. These are normally revised several times. To reconstruct changes, documents should contain a so called \emph{revision history} aka change log. This is a table whose entries contain the following data:
+\begin{itemize}
+ \item a version number,
+ \item the date of the change,
+ \item some kind of identification code (e.\,g.\ the initials) of the persons that
+ made the changes (the authors),
+ \item a summary of the changes.
+\end{itemize}
+
+Certain data of the revision history shall often be repeated at other parts of the document. Typically the title page shall quote the most recent version number and all authors of the document. The version number should although be repeated on every page, e.\,g. in a footer. By doing this, it is easy to verify if a page is part of the most recent version or if it is outdated.
+
+Normally the data that is placed on say the title page, is not (automatically) taken from the revision history, but stated at another part of the document. The entries in the revision history are normally always updated. Due to stress and rush updating the data on the title page is often forgotten. This results in inconsistent documents.
+From my own experience I know that the list of authors is practically never correct, especially when several people edited a document in the course of time.
+
+Therefore it would be nice if the author of a document only had to take care of the revision history. The informations on title page and in footers should be generated from the revision history automatically.
+
+These requirements cannot be implemented without any effort, because the title page for instance is processed by \LaTeX\ before the revision history is even read.
+All relevant data therefore has to be written to a file and read again before processing the title page. As for some applications even the moment when the aux-file is read is too late, an own file with the extension hst is created.
+The table containing the revision history needs an own file, too, but this topic will be discussed later.
+
+
+Another problem is the list of authors. This list cannot be created by simply concatenating the author entries, because this would result in duplicate entries. At this time the package sets was born allowing to manage simple sets of text. At every entry in the revision history, the set of authors is merged with the set of authors given at this entry. The alphabetically sorted set of authors can then be printed wherever one likes---normally on the tile page.
+
+The following to sections describe the two packages in more detail and explain how to use them. I decided not to repeat anything of source code here. Those who are interested can take a look at the sources. I tried to structure and comment the sources in a way that makes it readable for humans.
diff --git a/macros/latex/contrib/vhistory/doc/en_sets.tex b/macros/latex/contrib/vhistory/doc/en_sets.tex
new file mode 100644
index 0000000000..21f1711587
--- /dev/null
+++ b/macros/latex/contrib/vhistory/doc/en_sets.tex
@@ -0,0 +1,175 @@
+\section{The package sets}\label{sets}
+
+As described in the introduction, sets was designed to support set operations. The elements of a set are normally simple Text, but you can insert commands in a set, too.
+These commands will---except when printing the set---not expanded.
+The usage of braces (`\{' and `\}') unfortunately doesn't work. In this case you have to define a shortcut that doesn't need braces. However, Parameters without braces work.
+``\verb|H"agar|'' is therefore a valid element of a set. ``\verb|\endset|'' and ``\verb|\empty|'' can not be part of a set.
+
+As a document has only a few authors, not much effort was put in improving efficiency.
+Sets should therefore be relatively small. If you nevertheless try to create a set with hundreds or thousands of items, \TeX's stack might overflow.
+
+In most cases the sequence of items doesn't matter. This is also the case in most commands here. Exceptions will be marked.
+
+The package sets needs \LaTeXe.
+
+\subsection{Usage}\label{sets-usage}
+
+In this subsection the usage of the package sets is described. In the description, some example sets will be used:
+\begin{eqnarray*}
+ A &=& \{Alice, Bob, Charly\}\\
+ B &=& \{Alice, Bob\}\\
+ C &=& \{Bob, Dean\}\\
+ D &=& \{Dean\}\\
+ L &=& \emptyset
+\end{eqnarray*}
+
+%-----------------------------------------------------------------------------
+\subsubsection{Constructors}\label{constructors}
+To create a set, the commands\\
+\mbox{}\hspace{2em}\verb$\newset{<set>}{<content>}$\\
+and\\
+\mbox{}\hspace{2em}\verb$\newsetsimple{<set>}{<content>}$\\
+can be used. \texttt{<set>} is a command name to access the set from now on.
+The items of a set are separated with \texttt{|}. The set $A$ could therefore be defined with:\\
+\mbox{}\hspace{2em}\verb$\newset{\sA}{Alice|Bob|Charly}$\\
+The set $L$ is defined with:\\
+\mbox{}\hspace{2em}\verb$\newset{\sL}{}$\\
+
+\verb$\newset$ creates a new set. This set will be sorted in alphabetical order and duplicates will be removed. So it would be no matter if in the definition of $A$ after ``Charly'' a second ``Alice'' was inserted.
+
+The effort for sorting and duplicate deleting is unnecessary at this point. If you want to skip these expensive steps, you can create a set with the command
+\verb$\newsetsimple$, too.
+
+Because they are needed later, we will create all sets mentioned above:\\
+\mbox{}\hspace{2em}\verb$\newsetsimple{\sA}{Alice|Bob|Charly}$ \newsetsimple{\sA}{Alice|Bob|Charly}\\
+\mbox{}\hspace{2em}\verb$\newsetsimple{\sD}{Alice|Bob}$ \newsetsimple{\sB}{Alice|Bob}\\
+\mbox{}\hspace{2em}\verb$\newsetsimple{\sC}{Bob|Dean}$ \newsetsimple{\sC}{Bob|Dean}\\
+\mbox{}\hspace{2em}\verb$\newsetsimple{\sD}{Dean}$ \newsetsimple{\sD}{Dean}\\
+\mbox{}\hspace{2em}\verb$\newsetsimple{\sL}{}$ \newsetsimple{\sL}{}
+%-----------------------------------------------------------------------------
+\subsubsection{Inspectors}\label{inspectors}
+Inspectores help you to retrieve informations about sets and to print sets.
+
+\paragraph{Printing:}A set can be printed using the command\\
+\mbox{}\hspace{2em}\verb$\listset$.\\
+The elements will be put in the sequence they are in the set. A comma is used as separator.\\
+\mbox{}\hspace{2em}\verb$\listset{\sA}$ therefore leads to the following output:\\
+\centerline{\listset{\sA}}
+
+Sometimes you might want to separate the items in a different way, for example with a \texttt{\&} to put them in a table. In this case a (temporary) redefinition of\\
+\mbox{}\hspace{2em}\verb$\setseparator$\\
+helps you. Normally this command expands to `\verb*$,\ $'.
+
+\paragraph{Determining the size of a set:} The next inspector has the syntax\\
+\mbox{}\hspace{2em}\verb$\sizeofset{$$S$\verb$}\is{<counter>}$,\\
+where \texttt{<counter>} is the name of a \LaTeX\ counter, which afterwards will contain the number of elements in set $S$. The sequence\\
+\mbox{}\hspace{2em}\verb$\newcounter{mycounter}$\newcounter{mycounter}\\
+\mbox{}\hspace{2em}\verb$\sizeofset{\sB}\is{mycounter}$\sizeofset{\sB}\is{mycounter}\\
+\mbox{}\hspace{2em}\verb$\arabic{mycounter}$\\
+leads to the output: ``\arabic{mycounter}''
+If you determine the size of set $L$, the result\sizeofset{\sL}\is{mycounter} (as you might have expected) is ``\arabic{mycounter}''.
+
+\paragraph{Testing for membership:}By using the command\\
+\mbox{}\hspace{2em}\verb$\iselementofset{$$e$\verb$}{$$S$\verb$}$\\
+you can check, whether $e \in S$ is true. The effort is $O(1)$, because all work is done by the pattern matching of \TeX. The sequence\\
+\mbox{}\hspace{2em}\verb$\if \iselementofset{Bob}{\sC}Yes\else No\fi$\\
+would result in the output ``\if \iselementofset{Bob}{\sC}Yes\else No\fi'', the same test with set $D$ in ``\if \iselementofset{Bob}{\sD}Yes\else No\fi''.
+
+%-----------------------------------------------------------------------------
+\subsubsection{Modificators}\label{modificators}
+
+\paragraph{Union of sets:}The operation $R := S_1 \cup S_2$ is realized in the command\\
+\mbox{}\hspace{2em}\verb|\unionsets{|$S_1$\verb|}{|$S_2$\verb|}\to{|$R$\verb|}|.\\
+Table \ref{tab:ops} contains some examples. The result of the operation is a sorted set without duplicates containing the items of sets $S_1$ and $S_2$.
+
+\paragraph{Difference of sets:}The operation $R := S_1 - S_2$ (also written as $R := S_1 \backslash S_2$) can be carried out with\\
+\mbox{}\hspace{2em}\verb|\minussets{|$S_1$\verb|}\minus{|$S_2$\verb|}\to{|$R$\verb|}|.\\
+If $S_1$ is a sorted set, $R$ will be sorted, too. If $S_1$ contains duplicates, $R$ might also contains these duplicate elements. Table \ref{tab:ops} contains several examples for the usage of this command.
+
+Colloquially you can formulate the operation as follows: Check for every element $e$ in $S_1$ if $e \in S_2$ is true. If not, insert $e$ into $R$. And that's exactly the way it has been implemented!
+
+\paragraph{Intersection of sets:} The operation $R := S_1 \cap S_2$ is made possible with the command\\
+\mbox{}\hspace{2em}\verb|\intersectsets{|$S_1$\verb|}{|$S_2$\verb|}\to{|$R$\verb|}|.\\
+As above: If $S_1$ is a sorted set, $R$ will be sorted, too. If $S_1$ contains duplicates, $R$ might also contains these duplicate elements. Table \ref{tab:ops} contains several examples for the usage of this command, too.
+
+This operation can colloquially be written down as: Check for every element $e$ in $S_1$ if $e \in S_2$ is true. If yes, insert $e$ into $R$. If you compare this with the formulation above, one can recognize that the only difference is the small word ``yes''.
+In the source code, this expresses in a missing \verb|\else|. Acutally amazingly simple if you remember the formal relation $S_1 \cap S_2 \equiv S_1 \backslash (S_1\backslash S_2)$, which lets one expect a much higher complexity.
+
+\begin{table}%[htb]
+\begin{center}
+\begin{tabular}{ll}\hline
+\textbf{Operation} & \textbf{Result} \\ \hline
+\unionsets{\sA}{\sC}\to{\sR}\global\let\sR\sR
+ \verb$\unionsets{\sA}{\sC}\to{\sR}$ & ``\listset{\sR}'' \\
+\unionsets{\sB}{\sD}\to{\sR}\global\let\sR\sR
+ \verb$\unionsets{\sB}{\sD}\to{\sR}$ & ``\listset{\sR}'' \\
+\unionsets{\sL}{\sC}\to{\sR}\global\let\sR\sR
+ \verb$\unionsets{\sL}{\sC}\to{\sR}$ & ``\listset{\sR}'' \\
+\unionsets{\sL}{\sL}\to{\sR}\global\let\sR\sR
+ \verb$\unionsets{\sL}{\sL}\to{\sR}$ & ``\listset{\sR}'' \\\hline
+%
+\minussets{\sA}\minus{\sC}\to{\sR}\global\let\sR\sR
+ \verb$\minussets{\sA}\minus{\sC}\to{\sR}$ & ``\listset{\sR}'' \\
+\minussets{\sD}\minus{\sC}\to{\sR}\global\let\sR\sR
+ \verb$\minussets{\sD}\minus{\sC}\to{\sR}$ & ``\listset{\sR}'' \\
+\minussets{\sD}\minus{\sB}\to{\sR}\global\let\sR\sR
+ \verb$\minussets{\sD}\minus{\sB}\to{\sR}$ & ``\listset{\sR}'' \\
+\minussets{\sA}\minus{\sL}\to{\sR}\global\let\sR\sR
+ \verb$\minussets{\sA}\minus{\sL}\to{\sR}$ & ``\listset{\sR}'' \\\hline
+%
+\intersectsets{\sA}{\sB}\to{\sR}\global\let\sR\sR
+ \verb$\intersectsets{\sA}{\sB}\to{\sR}$ & ``\listset{\sR}'' \\
+\intersectsets{\sC}{\sB}\to{\sR}\global\let\sR\sR
+ \verb$\intersectsets{\sC}{\sB}\to{\sR}$ & ``\listset{\sR}'' \\
+\intersectsets{\sB}{\sD}\to{\sR}\global\let\sR\sR
+ \verb$\intersectsets{\sB}{\sD}\to{\sR}$ & ``\listset{\sR}'' \\
+\intersectsets{\sA}{\sL}\to{\sR}\global\let\sR\sR
+ \verb$\intersectsets{\sA}{\sL}\to{\sR}$ & ``\listset{\sR}'' \\\hline
+\end{tabular}
+\caption{Set operations, examples}
+\label{tab:ops}
+\end{center}
+\end{table}
+
+\paragraph{Sorting:} A set $S$ can be sorted alphabetically by using the command\\
+\mbox{}\hspace{2em}\verb|\sortset{|$S$\verb|}{|$R$\verb|}|.\\
+After execution of the command, $R$ contains the sorted set. The sorting is done by the bubblesort algorithm, an algorithm, that can be implemented in \TeX\ without having to perform many contortions.
+
+At sorting, the elements are compared as they are, i.\,e. possibly contained macros are not expanded but compared by their name (including the backslash).
+
+\paragraph{Removing duplicates:} The operations \emph{only} works on sorted sets! You actually will not need it very often, because the creation of a set using \verb|\newset| does the work automatically (by using this macro). However, I decided to make this macro available to public; probably sometimes someone really needs it.
+Duplicate removal is called with:\\
+\mbox{}\hspace{2em}\verb|\deleteduplicates{|$S$\verb|}{|$R$\verb|}|,\\
+with $R$ being the result set and $S$ being the sorted set, whose duplicates shall be removed.
+
+%------------------------------------------------------------------------------
+\subsection{Effort estimations}
+Table \ref{tab:complexity} lists the complexity of the operations in O-notation. The following Assumptions are made:
+\begin{itemize}
+ \item Let the length of an element of a set be $m$.
+ \item Let the number of elements in a set be $n$. If an operation need two sets, $n_1$ is the cardinality of the first set and $n_2$ the cardinality of the second one.
+ \item For simplicity reasons the effort for pattern matching in parameter processing is assumed to be constant.
+\end{itemize}
+
+The given complexity classes can help you to arrange a set of operations in the optimal sequence. For example when using the commands \verb@\intersectsets@ or \verb@\minussets@ it is better to let the smaller set be the first parameter.
+
+\begin{table}[htb]
+ \begin{center}
+ \begin{tabular}{lc}\hline
+ \textbf{Operation} & \textbf{Operation}\\ \hline
+ Compare elements & $m$\\
+ \verb@\sizeofset@ & $n$\\
+ \verb@\listset@ & $n$\\
+ \verb@\iselementofset@ & $1$\\%\hline
+ \verb@\sortset@ & $m \cdot n^2$\\
+ \verb@\deleteduplicates@ & $n$\\%\hline
+ \verb@\newset@ & $m \cdot n^2$\\
+ \verb@\newsetsimple@ & $1$\\%\hline
+ \verb@\unionsets@ & $m \cdot (n_1 + n_2)^2$\\
+ \verb@\intersectsets@ & $n_1$\\
+ \verb@\minussets@ & $n_1$\\ \hline
+ \end{tabular}
+ \caption{Complexity classes of set operations}%
+ \label{tab:complexity}%
+ \end{center}
+\end{table}
diff --git a/macros/latex/contrib/vhistory/doc/en_vhistory.tex b/macros/latex/contrib/vhistory/doc/en_vhistory.tex
new file mode 100644
index 0000000000..6610cd5b0d
--- /dev/null
+++ b/macros/latex/contrib/vhistory/doc/en_vhistory.tex
@@ -0,0 +1,117 @@
+\section{The package vhistory}
+
+The purpose of this package was described in detail in section \ref{introduction}.
+In this section the usage of vhistory is described in detail.
+
+\subsection{Loading the package}\label{load}
+As usual the package is loaded by using the command\\
+\mbox{}\hspace{2em}\verb|\usepackage{vhistory}|\\
+in the preamble. Vhistory requires \LaTeXe\ and the packages sets and ltxtable (which requires longtable and tabularx). If this packages are not already loaded, vhistory will load them.
+
+Vhistory understands several options to control its behaviour. These are listed below. An example for using options would be\\
+\mbox{}\hspace{2em}\verb|\usepackage[tocentry, owncaptions]{vhistory}|.
+
+\paragraph{nochapter:} If this option is used, the revision history will no be placed in an own chapter---respectively an own section if you use the document classes article or scrartcl.
+
+\paragraph{tocentry:} With this option you can cause an entry in the table of contents. Normally there won't be such an entry. If the option nochapter is used, tocentry has no effect and you are responsible for toc entries.
+
+\paragraph{owncaptions:} vhistory supports the languages Croatian, Dutch, English, French and German. If you use an unsupported language, all captions (like ``Revision history'' or ``Chan\-ges'') will be in English. In this case you might want to change captions yourself. The option own\-capt\-ions supports you in this case. More information on this topic can be found in subsection \ref{languages}.
+
+\paragraph{tablegrid:} Setting this option will display a grid in the table representing the revision history.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Usage}\label{usage}
+The Usage of vhistory is rather easy and is to be described in this subsection.
+It is important to know that vhistory needs two runs of \LaTeX, because some data is written to external files.
+
+\subsubsection{Creating the revision history}\label{begin}
+The revision history is an environment:\\
+\mbox{}\hspace{2em}\verb|\begin{versionhistory}|\\
+\mbox{}\hspace{2em}\verb|<entries>|\\
+\mbox{}\hspace{2em}\verb|\end{versionhistory}|
+
+An entry generally looks like:\\
+\mbox{}\hspace{2em}\verb@\vhEntry{<Version>}{<Date>}{<Authors>}{<Changes>}@
+
+The authors are written in the set notation of the package sets, i.\,e. the character \texttt{|} is used as the separator. An example for entry could therefore be:\\
+\mbox{}\hspace{2em}\verb@\vhEntry{1.1}{13.05.04}{JW|AK|KL}{Typos corrected.}@
+
+The \verb|\begin|\ldots starts a new chapter (or a new section respectively if article is used) if not disabled as described above.
+
+The revision history itself is set in an ``ltxtable''. As a result of that, the revision history can consist of more than one page. Lines in the columns ``Author(s)'' and ``Changes'' are broken automatically. The package ltxtable requires the table to be in a separate file. This file is generated by vhistory an has the ending ``ver''.
+
+\subsubsection{Getting the current version number}
+The current version number---i.\,e.: the version number of the last entry---can be read with the command\\
+\mbox{}\hspace{2em}\verb|\vhCurrentVersion|.\\
+The command is available right after loading the package.
+
+\subsubsection{Getting the current date}
+Analogous to the current version number, the date of the last change can be printed. By using the command\\
+\mbox{}\hspace{2em}\verb|\vhCurrentDate|\\
+you will get this data. The command is available right after loading the package, too.
+
+\subsubsection{Putting a list of all authors}
+You can get a list of all authors in two ways. Via the command\\
+\mbox{}\hspace{2em}\verb|\vhAllAuthorsSet|\\
+you can get the authors as a set as described in section \ref{sets}. The more convenient way is using the command\\
+\mbox{}\hspace{2em}\verb|\vhListAllAuthors|.
+
+This command returns an alphabetically sorted list of authors. The items of the list are comma separated. If you want another separator---e.\,g. \texttt{\&} for usage in a table---to be used instead, you can redefine the command\\
+\mbox{}\hspace{2em}\verb|\setsepararator|\\
+from the package sets (compare section \ref{inspectors}).
+
+Sometimes you want the list to contain full names like ``Jochen Wer\-ten\-au\-er'' instead of the short form ``JW'', which would probably be used in the revision history. By using the command\\
+\mbox{}\hspace{2em}\verb|\vhListAllAuthorsLong|\\
+you can get this behaviour. In this case you still write ``JW'' in the \verb|\entry| command (note: there is no backslash here!), but also define a macro \verb|\JW| as shown below.\\
+\mbox{}\hspace{2em}\verb|\newcommand{\JW}{Jochen Wertenauer}|\\
+In the revision history, the text ``JW'' will be shown in the authors column, but \verb|\vhListAllAuthorsLong| will use the macro \verb|\JW|. If the macro is undefined, the short form will be shown (for this author).
+
+Instead of \verb|\vhListAllAuthorsLong| you can also use\\
+\mbox{}\hspace{2em}\verb|\vhListAllAuthorsLongWithAbbrev|,\\
+which prints the short form in brackets after the complete name, e.\,g. ``Jochen Wertenauer (JW)''. Name und short form are separated by the command\\
+\mbox{}\hspace{2em}\verb|\vhAbbrevSeparator|,\\
+which defaults to ``\verb*|\ |''. In order to avoid line breaks, you can redefine the command with\\
+\mbox{}\hspace{2em}\verb|\renewcommand{\vhAbbrevSeparator}{~}|.\\
+In order to change the brackets you can redefine the commands\\
+\mbox{}\hspace{2em}\verb|\vhAbbrevLeft| and\\
+\mbox{}\hspace{2em}\verb|\vhAbbrevRight|\\
+as needed.
+
+\subsubsection{Adjusting the column with in the revision history}
+If the width of the columns for authors and changes in the revision history does not meet your requirements, you can change the with ratio of the two columns. The commands\\
+\mbox{}\hspace{2em}\verb|\renewcommand \vhAuthorColWidth{.8\hsize}|\\
+\mbox{}\hspace{2em}\verb|\renewcommand \vhChangeColWidth{1.2\hsize}|\\
+change the ratio to 2:3 (default is 1:3). When changing the widths, please take care that the widths add up to \verb|2\hsize|.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Language support}\label{languages}
+As mentioned in section \ref{load}, vhistory supports the languages Croatian, Dutch, English, French and German. All language dependent captions with their defaults are listed in table \ref{tab:languages}. If the document is written in a unsupported language, the English version will be used.
+
+By providing the option ``owncaptions'' you can use custom captions. This option causes vhistory to default the commands in the language that was selected when vhistory is loaded. Therefore it makes sense to load packages like babel or ngerman before vhistory.
+
+A caption can be changed via the command\\
+\mbox{}\hspace{2em}\verb|\renewcommand{<Command>}{<custom text>}|.\\
+If you prefer to use ``Improvements'' instead of ``Description'', you have to write\\
+\mbox{}\hspace{2em}\verb|\renewcommand{\vhchangename}{Improvements}|\\
+to get the desired result.
+
+\begin{table}%[htb]
+\begin{center}
+\begin{scriptsize}
+\begin{tabular}{llllll}\hline
+& \verb|\vhhistoryname| & \verb|\vhversionname| & \verb|\vhdatename| & \verb|\vhauthorname| & \verb|\vhchangename|\\ \hline
+Croatian & Povijest verzija & Verzija & Datum & Autor(ica) & Opis Promjena\\
+Dutch & Wijzigingen & Herziening & Datum & Auteur(s) & Beschrijving\\
+English & Revision History & Revision & Date & Author(s) & Description\\
+French & Historique & Version & Date & Auteur(s) & Modifications\\
+German & Versionshistorie & Version & Datum & Autor(en) & Änderungen\\ \hline
+\end{tabular}
+\end{scriptsize}
+\caption{language dependent captions}
+\label{tab:languages}
+\end{center}
+\end{table}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Example}
+\input{en_example}
diff --git a/macros/latex/contrib/vhistory/doc/hyperref.cfg b/macros/latex/contrib/vhistory/doc/hyperref.cfg
new file mode 100644
index 0000000000..4a84cf965d
--- /dev/null
+++ b/macros/latex/contrib/vhistory/doc/hyperref.cfg
@@ -0,0 +1,7 @@
+\ProvidesFile{hyperref.cfg}%
+ [2002/06/06 v1.2 hyperref configuration of TeXLive and teTeX]
+% Change default driver to "dvips" instead of "hypertex",
+% requires hyperref 2002/06/05 v6.72s
+\providecommand*{\Hy@defaultdriver}{hypertex}%
+\hypersetup{colorlinks=true}
+\endinput
diff --git a/macros/latex/contrib/vhistory/doc/vh_set_example.pdf b/macros/latex/contrib/vhistory/doc/vh_set_example.pdf
new file mode 100644
index 0000000000..73806310a5
--- /dev/null
+++ b/macros/latex/contrib/vhistory/doc/vh_set_example.pdf
Binary files differ
diff --git a/macros/latex/contrib/vhistory/doc/vh_set_example.tex b/macros/latex/contrib/vhistory/doc/vh_set_example.tex
new file mode 100644
index 0000000000..bf8e3d9f1b
--- /dev/null
+++ b/macros/latex/contrib/vhistory/doc/vh_set_example.tex
@@ -0,0 +1,58 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% DON'T FORGET TO COPY THE FILES sets.sty AND
+% vhistory.sty IN THIS DIRECTORY, IF YOU TRY
+% TO COMPILE THIS EXAMPLE!!!!!!!!!!!!!!!!!!!!
+%
+
+\documentclass{scrartcl}
+
+% Definition of shortcuts for authornames
+% This has to be done before the first usage
+% of \vhListAllAuthorsLong or \vhListAllAuthorsLongWithAbbrev
+% (otherwise only the shortcuts are printed)
+\newcommand{\JW}{Jochen Wertenauer}
+\newcommand{\PF}{Peter Foo}
+\newcommand{\MB}{Mary Bar}
+
+\usepackage{vhistory, hyperref}
+\hypersetup{pdfauthor={\vhListAllAuthorsLong}, colorlinks=true}
+
+\newcommand{\docTitle}{}
+
+\usepackage{scrpage2}
+\pagestyle{scrheadings}
+
+\ifoot{An example for vhistory---Version \vhCurrentVersion}
+\cfoot[]{}
+\ofoot[\thepage]{\thepage}
+
+\begin{document}
+
+{\renewcommand{\setseparator}{ \and }
+\title{An example for vhistory}
+\author{\vhListAllAuthorsLongWithAbbrev}
+\date{Version \vhCurrentVersion\ from \vhCurrentDate}
+\maketitle
+}
+
+\begin{versionhistory}
+ \vhEntry{1.0}{22/01/04}{JW|PF}{Creation}
+ \vhEntry{1.1}{23/01/04}{JW|MB}{Error correction}
+ \vhEntry{1.2}{03/02/04}{JW|MB}{Revised after review}
+ \vhEntry{1.3}{03/02/04}{JW|MB|PF}{Final version}
+\end{versionhistory}
+
+\tableofcontents
+\clearpage
+
+\section{Introduction}
+\subsection{Overview}
+bla bla bla
+
+\subsection{Target audience}
+more bla bla bla
+
+\section{bla bla}
+even more bla bla.
+
+\end{document}
diff --git a/macros/latex/contrib/vhistory/doc/vh_sets_de.pdf b/macros/latex/contrib/vhistory/doc/vh_sets_de.pdf
new file mode 100644
index 0000000000..bf26e13529
--- /dev/null
+++ b/macros/latex/contrib/vhistory/doc/vh_sets_de.pdf
Binary files differ
diff --git a/macros/latex/contrib/vhistory/doc/vh_sets_de.tex b/macros/latex/contrib/vhistory/doc/vh_sets_de.tex
new file mode 100644
index 0000000000..368ff0c47b
--- /dev/null
+++ b/macros/latex/contrib/vhistory/doc/vh_sets_de.tex
@@ -0,0 +1,73 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Dieses Dokument steht unter der LaTeX Project Public License.
+%% siehe: http://www.latex-project.org/lppl.txt
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\documentclass[a4paper,% % Papiergre A4
+ 12pt, % %
+ BCOR0mm, % % Bindekorrektur
+ DIVcalc, % % Satzspiegel wird unten neu berechnet
+ automark, % % lebende Kolumnentitel
+ pagesize% % Seitengre wird bei dvi und pdf richtig gesetzt
+ ]{scrartcl} % entspricht article
+
+\usepackage[english,ngerman]{babel}
+\usepackage{graphicx, mparhack, fixltx2e, ellipsis, sets}
+\usepackage[newcommands]{ragged2e} % verbesserter Flattersatz
+
+%---------------- Schriften ------------------------------------------------
+\usepackage{mathpazo} % Palatino
+\usepackage[scaled=0.95]{helvet} % Sansserif-Schrift: Helvetica
+\usepackage{courier} % TeleType-Schrift Courier
+
+\usepackage{setspace} % 1.05-facher Zeilenabstand wegen Palatino
+\linespread{1.05}
+
+\usepackage[T1]{fontenc} % T1-Schriften verwenden
+\usepackage[utf8]{inputenc} % Zeichenkodierung UTF-8
+%-----------------------------------------------------------------------------
+
+%---------------- Hyperref -------------------------------------------------
+\usepackage{hyperref}
+\hypersetup{% % Einstellung der pdf-Dokumenteigenschaften
+ pdftitle = {Die Pakete sets und vhistory}, % Titel
+ pdfsubject = {Beschreibung der LaTeX-Pakete}, % Thema
+ pdfauthor = {Jochen Wertenauer}, % Autor
+ pdfkeywords = {sets, sets.sty, vhistory, vhistory.sty, Beschreibung, Dokumentation, LaTeX}} % Stichworte
+%-----------------------------------------------------------------------------
+
+%---------------- Kopf- und Fuzeilen --------------------------------------
+\usepackage{scrpage2}
+\pagestyle{scrheadings}
+%-----------------------------------------------------------------------------
+
+\typearea[current]{calc} % Neuberechnung des Satzspiegels
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{document}
+
+%%%-------- TITELSEITE(N) -----------------------------------------------%%%
+
+\subject{Beschreibung der \LaTeX-Pakete} % Typisierung: Unmittelbar ber Titel
+\title{sets und vhistory} % Titel
+\author{Jochen Wertenauer\\
+ \normalsize{\href{mailto:jwertenauer@gmx.de}
+ {jwertenauer\,@\,gmx.de}}}
+\date{\today} % Datum
+\publishers{\vskip 2ex \small Dieses Dokument steht unter der
+ \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License}.}%
+\maketitle
+%%%---------- ENDE TITELSEITE(N) ------------------------------------------%%%
+
+\tableofcontents\clearpage
+
+\input{de_einleitung}
+\clearpage
+\input{de_vhistory}
+\clearpage
+\input{de_sets}
+
+%\printindex %Index
+
+\end{document}
diff --git a/macros/latex/contrib/vhistory/doc/vh_sets_en.pdf b/macros/latex/contrib/vhistory/doc/vh_sets_en.pdf
new file mode 100644
index 0000000000..5a72e01b6d
--- /dev/null
+++ b/macros/latex/contrib/vhistory/doc/vh_sets_en.pdf
Binary files differ
diff --git a/macros/latex/contrib/vhistory/doc/vh_sets_en.tex b/macros/latex/contrib/vhistory/doc/vh_sets_en.tex
new file mode 100644
index 0000000000..54f42e4c8f
--- /dev/null
+++ b/macros/latex/contrib/vhistory/doc/vh_sets_en.tex
@@ -0,0 +1,66 @@
+\documentclass[a4paper,%
+ 12pt,%
+ BCOR0mm,%
+ DIVcalc,%
+ automark,%
+ pagesize%
+ ]{scrartcl}
+
+\usepackage{graphicx, mparhack, fixltx2e, ellipsis, sets}
+\usepackage[newcommands]{ragged2e}
+
+%---------------- Fonts ----------------------------------------------------
+\usepackage{mathpazo} % Palatino
+\usepackage[scaled=0.95]{helvet} %
+\usepackage{courier} % TeleType font: Courier
+
+\usepackage{setspace} % line spread 1.05 (because of Palatino)
+\linespread{1.05}
+
+\usepackage[T1]{fontenc} % use T1 fonts
+\usepackage[utf8]{inputenc}
+%-----------------------------------------------------------------------------
+
+%---------------- Hyperref -------------------------------------------------
+\usepackage{hyperref}
+\hypersetup{%
+ pdftitle = {The packages sets and vhistory},
+ pdfsubject = {Documentation of the LaTeX packages},
+ pdfauthor = {Jochen Wertenauer},
+ pdfkeywords = {sets, sets.sty, vhistory, vhistory.sty, Documentation, user guide, LaTeX}}
+%-----------------------------------------------------------------------------
+
+%---------------- Headers and footers --------------------------------------
+\usepackage{scrpage2}
+\pagestyle{scrheadings}
+%-----------------------------------------------------------------------------
+
+\typearea[current]{calc}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{document}
+
+%%%-------- TITLEPAGE ---------------------------------------------------%%%
+
+\subject{Documentation of the \LaTeX\ packages}
+\title{sets and vhistory}
+\author{Jochen Wertenauer\\
+ \normalsize{\href{mailto:jwertenauer@gmx.de}
+ {jwertenauer\,@\,gmx.de}}}
+\publishers{\vskip 2ex \small This document is published under the
+ \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License}.}
+
+\maketitle
+%%%---------- END OF TITLEAGE ---------------------------------------------%%%
+
+\tableofcontents\clearpage
+
+\input{en_introduction}
+\clearpage
+\input{en_vhistory}
+\clearpage
+\input{en_sets}
+
+\end{document}
diff --git a/macros/latex/contrib/vhistory/sets.sty b/macros/latex/contrib/vhistory/sets.sty
new file mode 100644
index 0000000000..a2c26bd103
--- /dev/null
+++ b/macros/latex/contrib/vhistory/sets.sty
@@ -0,0 +1,437 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% PACKAGE: sets %%
+%% FILE: sets.sty %%
+%% %%
+%% AUTHOR: Jochen Wertenauer %%
+%% VERSION: 1.3 %%
+%% DATE: 2010-07-17 %%
+%% %%
+%% LICENSE: This program may be distributed and/or modified under the %%
+%% conditions of the LaTeX Project Public License, either version 1.2 %%
+%% of this license or (at your option) any later version. %%
+%% The latest version of this license is in %%
+%% http://www.latex-project.org/lppl.txt %%
+%% and version 1.2 or later is part of all distributions of LaTeX %%
+%% version 1999/12/01 or later. %%
+%% %%
+%% This program consists of the file sets.sty (this file). %%
+%% %%
+%%--------------------------------------------------------------------------%%
+%% DESCRIPTION (see separate file for more information): %%
+%% This package allows basic usage of sets. A set has the structure: %%
+%% set --> {contents} %%
+%% contents --> element(|element)* %%
+%% contents --> \epsilon %%
+%% A element can consist of strings and command tokens. Command tokens %%
+%% will not be expanded before you call \listset. Command tokens with %%
+%% parameters (in {}) are not allowed, i.e. \textbf{Test} would result in %%
+%% lots of errors. Defining a macro \boldTest %%
+%% \newcommand{\boldTest}{\textbf{Test}} %%
+%% and using that macro would solve the problem. Commands like like "A %%
+%% work fine. Of course an element cannot contain the character | (but %%
+%% you can "hide" it in a command like \boldTest, too). %%
+%% Other forbidden elemente are the commands \endset and \empty. %%
+%% In this package a set is normally sorted and contains no duplicates %%
+%% unless you explicitly want it as it is by using \newsetsimple (but %%
+%% several operations will return a sorted set without duplicates). %%
+%% An empty set cannot be destinguished from a set that contains only %%
+%% the an empty string, i.e. {} is an empty set. %%
+%% %%
+%% INTERFACE: %%
+%% Constructors: %%
+%% \newset, \newsetsimple %%
+%% Inspectors: %%
+%% \sizeofset, \listset, \iselementofset %%
+%% Modificators: %%
+%% \deleteduplicates, \sortset %%
+%% \unionsets, \intersectsets, \minussets %%
+%% OTHER COMMANDS: %%
+%% \setseparator %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{sets}
+
+%% Helper Methods ------------------------------------------------------------
+
+\def \sets@xxpa{\expandafter\expandafter\expandafter}
+
+\def \sets@empty{\empty}
+
+%% Appends #1 to the definition of macro #2.
+\def \sets@append #1\to#2{\expandafter \def \expandafter #2\expandafter{#2#1}}
+
+%% Removes the first character of the content of #2 and stores the result in
+%% #1. Note that \expandafter\expandafter\expandafter cannot be replaced by \sets@xxpa here!
+\def \sets@gobblefirst #1#2{%
+ \sets@xxpa \def \expandafter\expandafter\expandafter #1\expandafter\expandafter\expandafter {\expandafter\@gobble #2}}
+
+%% Deletes everthing to the next occurance of > inludung the >.
+\def \sets@erasetobrace #1>{}
+
+%% A do-while construct based on the macro of Alois Kabelschacht.
+%%
+%% Syntax:
+%% \loop
+%% ...
+%% \if ...
+%% \repeat
+\def \sets@loop #1\repeat{%
+ \def \iterate {#1\expandafter \iterate\fi}%
+ \iterate \let\iterate\relax}
+
+\long\def \sets@ReturnFi #1\fi{\fi #1}
+\long\def \sets@ReturnII #1\fi\fi{\fi\fi #1}
+\long\def \sets@ReturnIII #1\fi\fi\fi{\fi\fi\fi #1}
+
+\long\def \sets@ReturnElseIII #1\else#2\fi\fi\fi{\fi\fi\fi #1}
+
+\long\def \sets@Returntrue #1\fi{\fi \iftrue}
+\long\def \sets@Returnfalse #1\fi{\fi \iffalse}
+
+\newif \ifsets@less \newif \ifsets@greater
+
+%% Compares to strings. Result will be in \ifgreater and \ifless.
+%% #1 and #2 are compared as they are. There will be no expansion.
+%% The comparison is based on the position of the symbols in the
+%% ASCII table. Therefore the comparison is case sensitive (B<a).
+%%
+%% The macros are based on a sort algorithm by Klaus Lagally.
+\def \sets@compStrings #1#2{%
+ \def \sets@CSti{#1}%
+ \edef\sets@ctempi{\expandafter\sets@erasetobrace\meaning \sets@CSti}%
+ \def \sets@CStii{#2}%
+ \edef\sets@ctempii{\expandafter\sets@erasetobrace\meaning \sets@CStii}%
+ \sets@lessfalse\sets@greaterfalse
+ \sets@xxpa\sets@compI \expandafter\sets@ctempi\expandafter|\expandafter\\\sets@ctempii|\relax
+}
+
+
+%% Recursive string comparison. Called by \sets@compStrings.
+%% (1) Because of the position of | in the ASCII table, there must be a
+%% special test to get the right result.
+\def \sets@compI #1#2\\#3#4\relax{%
+ \ifnum `#1<`#3
+ \ifx |#3 \sets@greatertrue \else \sets@lesstrue \fi%(1)
+ \else
+ \ifnum `#1>`#3
+ \ifx |#1 \sets@lesstrue \else \sets@greatertrue \fi%(1)
+ \else
+ \ifx |#1\else
+ \sets@ReturnIII{\sets@compI#2\\#4\relax}%
+ \fi
+ \fi
+ \fi
+}
+%-----------------------------------------------------------------------------
+
+
+
+%% Create a new set ----------------------------------------------------------
+
+%% Creates a new set. The set will be sorted and will contain no duplicate
+%% elements.
+%%
+%% Example: \newset{\myset}{Alice|Bob|Charly}
+\def \newset #1#2{%
+ \def #1{#2}%
+ \sortset{#1}{#1}%
+ \deleteduplicates{#1}{#1}%
+}
+
+%% Simple constructor of a set. There is no sorting or duplicate detection
+%% done by this macro.
+%%
+%% Example: \newsetsimple{\myset}{Alice|Bob|Charly}
+\def \newsetsimple #1#2{\def #1{#2}}
+%-----------------------------------------------------------------------------
+
+
+
+%% Size determination --------------------------------------------------------
+
+%% Stores the size of set #1 in the LaTeX counter #2. #2 has to be existing.
+\def \sizeofset #1\is#2{%
+ \setcounter{#2}{0}%
+ \expandafter\sets@sizeofset #1|\endset{#2}%
+}
+
+% Helper method for \sizeofset. Recursively calls itself. Implemented straight
+% forward.
+\def \sets@sizeofset #1|#2\endset#3{%
+ \def \sizetemps@t{#1}%
+ \ifx \sizetemps@t\empty\relax\else
+ \stepcounter{#3}%
+ \def \sizetemps@t{#2}%
+ \ifx\sizetemps@t\empty\else
+ \sets@ReturnII{\sets@sizeofset #2\endset{#3}}%
+ \fi
+ \fi
+}
+%-----------------------------------------------------------------------------
+
+
+
+%% Printing a set ------------------------------------------------------------
+
+%% The content of this macro will be used to separate the elements of the set.
+\def \setseparator{, }
+
+%% Prints the contents of set #1. Elements will be separated by \setseparator.
+%\def \listset #1{\expandafter\sets@listset #1|\empty\endset}
+\def \listset #1{\expandafter\sets@listset #1|\endset|}
+
+
+%% Helper method for \listset.
+%\def \sets@listset #1|#2\endset{%
+% #1%
+% \def\temps@t{#2}%
+% \ifx \temps@t\sets@empty{}\else
+% \setseparator
+% \sets@ReturnFi{\sets@listset #2\endset}%
+% \fi
+%}
+
+\def \sets@listset #1|#2|{%
+ #1%
+ \ifx\endset #2%
+ \else
+ \setseparator\sets@ReturnFi{\sets@listset#2|}%
+ \fi
+}
+%-----------------------------------------------------------------------------
+
+
+
+%% Testing for membership ----------------------------------------------------
+
+%% This macro tests, if #1 is included in set #2. Can be used in constructs
+%% like \if \iselementofset{...}{...} ... \else ... \fi. It has complexity
+%% O(1), assuming that the pattern matching is done in O(1), too.
+%%
+\def \iselementofset #1#2{%
+ 00\fi
+ \begingroup
+ \def \lookup ##1|#1|##2\endset{%
+ \def \temp{##2}%
+ \ifx \temp\empty
+ \endgroup
+ \sets@Returnfalse
+ \else
+ \endgroup
+ \sets@Returntrue
+ \fi}%
+ \expandafter\lookup \expandafter |#2|#1|\endset%
+}
+%-----------------------------------------------------------------------------
+
+
+
+%% Duplicate detection: ------------------------------------------------------
+
+%% This macro finds alle duplicate elements in the SORTED set #1 and removes
+%% them. The result set (still sorted) is stored in #2.
+\def \deleteduplicates #1#2{\expandafter\sets@duplicates#1|\endset#2}
+
+%% Helper method for \deleteduplicates. Does some preparations and catches the
+%% special case of an set with size <= 1. Parameter #3 is the result set.
+\def \sets@duplicates #1|#2\endset#3{%
+ \def #3{}% Clear #3
+ \def \temps@t{#2}%
+ \ifx \temps@t\empty% Has the set more than one element?
+ \def #3{#1}% Just one element!
+ \else% More than one element
+ \sets@ReturnFi{\sets@duplicatesI#1|#2\endset#3}%
+ \fi
+}
+
+
+%% Called by \sets@duplicates, if the sorted set contains two or more elements. It
+%% checks, if two elements, which are directly following each other are equal.
+%% If yes, the first one will not be part of the result set, which is stored
+%% in #4.
+\def \sets@duplicatesI #1|#2|#3\endset#4{%
+ \def\temps@ti{#1}%
+ \def\temps@tii{#2}%
+ \def\temps@tiii{#3}%
+ \ifx \temps@tii\empty % Is #2 empty?
+ \def #4{#1}% A set with one element has no duplicates
+ \else % #2 not empty --> at least two elements (left)
+ \ifx \temps@tiii\empty% Is #3 empty?
+ % The set contains two elements, so work is nearly done.
+ % An additional | was inserted at the beginning. It has to be gobbled
+ % away.
+ \ifx \temps@ti\temps@tii % #1=#2
+ \sets@append{|#1}\to#4%
+ \sets@gobblefirst{#4}{#4}%
+ \else
+ \sets@append{|#1|#2}\to#4%
+ \sets@gobblefirst{#4}{#4}%
+ \fi
+ \else % #3 not empty --> at least three elements (left)
+ \ifx \temps@ti\temps@tii
+ \sets@ReturnElseIII{\sets@duplicatesI #2|#3\endset#4}%
+ \else
+ \sets@append{|#1}\to#4%
+ \sets@ReturnIII{\sets@duplicatesI #2|#3\endset#4}%
+ \fi
+ \fi
+ \fi
+}
+%-----------------------------------------------------------------------------
+
+
+
+%% Sorting a set -------------------------------------------------------------
+\newcounter{s@tlength} % LaTeX-counter used by \sortset.
+
+%% Takes an unsorted set #1, sorts it and stores the result in #2. If #1 has
+%% less than two elements, sorting is unneccessary, otherwise \sets@sortset is
+%% called.
+%%
+%% Syntax \sortset <set> <result set>
+\def \sortset #1#2{%
+ \sizeofset#1\is{s@tlength}%
+ \ifnum 2>\value{s@tlength}\relax
+ \let #2 #1%
+ \else
+ \sets@sortset #1#2%
+ \fi
+}
+
+%% Called by \sortset. This macro represents the outer loop of the bubblesort
+%% algorithm. Bubblesort has O(n^2) and is stable.
+%%
+\def \sets@sortset #1#2{%
+ \let \sorttemps@t #1%
+ \sets@loop
+ \expandafter\sets@bubblesortRun \sorttemps@t|\endset\sorttemps@t
+ \addtocounter{s@tlength}{-1}%
+ \ifnum 1<\value{s@tlength}\relax
+ \repeat
+ \let #2 \sorttemps@t
+}
+
+%% Called by \sets@sortset. Does some preparation for \sets@bubblesortRunI and
+%% removes the first character of the result. #4 is the result set.
+\def \sets@bubblesortRun #1|#2|#3\endset#4{%
+ \def\temps@t{}%
+ \sets@bubblesortRunI #1|#2|#3\endset\temps@t%
+ \sets@gobblefirst{#4}{\temps@t}%
+}
+
+%% Called by \sets@bubblesortRun and recursively by itself.
+%% This recursive macro represents the inner loop of "normal" bubblesort.
+%% #4 is the result set.
+\def \sets@bubblesortRunI #1|#2|#3\endset#4{%
+ \def\temps@tii{#2}%
+ \def\temps@tiii{#3}%
+ \ifx \temps@tii\empty
+ \sets@append{|#1}\to#4%
+ \else
+ \ifx \temps@tiii\empty
+ \sets@compStrings{#2}{#1}%
+ \ifsets@greater
+ \sets@append{|#1|#2}\to#4%
+ \else
+ \sets@append{|#2|#1}\to#4%
+ \fi
+ \else
+ \sets@compStrings{#2}{#1}%
+ \ifsets@greater
+ \sets@ReturnElseIII{%
+ \sets@append{|#1}\to#4%
+ \sets@bubblesortRunI#2|#3\endset#4}%
+ \else
+ \sets@ReturnIII{%
+ \sets@append{|#2}\to#4%
+ \sets@bubblesortRunI#1|#3\endset#4}%
+ \fi
+ \fi
+ \fi
+}
+%-----------------------------------------------------------------------------
+
+
+
+%% Set manipulation ----------------------------------------------------------
+
+%% Takes two sets #1 and #2 and performs a union operation. #1 and #2 do not
+%% have to be sorted and may contain duplicate elements.
+%% The result is stored in #3. It contains the elements of #1 and #2 and is
+%% sorted. Duplicates are removed.
+\def \unionsets #1#2\to#3{%
+ \let\uniont@mpi=#1%
+ \let\uniont@mpii=#2%
+ \ifx \uniont@mpi\empty
+ \let \uniontemps@t=\uniont@mpii
+ \else
+ \let \uniontemps@t=\uniont@mpi
+ \ifx \uniont@mpii\empty \else
+ \expandafter\sets@append\expandafter{\expandafter|#2}\to\uniontemps@t
+ \fi
+ \fi
+ \sortset{\uniontemps@t}{\uniontemps@t}%
+ \deleteduplicates{\uniontemps@t}{#3}%
+}
+%-----------------------------------------------------------------------------
+
+
+%% Takes two sets #1 and #2 and performs an intersect operation. The result is
+%% stored in #3. #3 contains only elements that have been in both sets #1 and
+%% #2. #1 and #2 don't have to be sorted, but if #1 is sorted, #3 will be
+%% sorted, too. If #1 contains duplicates, #3 may also contain duplicates.
+\def \intersectsets #1#2\to#3{%
+ \def \tempinters@ct{}%
+ \expandafter \sets@intersectsets #1|\endset#2\tempinters@ct
+ \ifx \tempinters@ct\empty
+ \def #3{}%
+ \else
+ \sets@gobblefirst{#3}{\tempinters@ct}%
+ \fi
+}
+
+%% #1 and #2 are parts of set #1 of \intersectsets. #3 is #2 of \intersectsets
+%% #4 is the result set
+\def \sets@intersectsets #1|#2\endset#3#4{%
+ \if \iselementofset{#1}{#3}%
+ \sets@append{|#1}\to#4%
+ \fi
+ \def \tempinters@cti{#2}%
+ \ifx \tempinters@cti\empty \else
+ \sets@ReturnFi{\sets@intersectsets #2\endset#3#4}%
+ \fi
+}
+%-----------------------------------------------------------------------------
+
+
+%% Takes two sets #1 and #2 and performs a minus operation, i.e. all elements
+%% of #1 that are in #2, too, are removed. The result is saved in #3. If #1 is
+%% sorted, #3 will be sorted, too.
+%%
+%% This macro is implemented like \intersectsets. The only difference is, that
+%% an element will only be part of #1 if it is NOT in #2. In \intersectsets it
+%% will be part if it is in #2.
+\def \minussets #1\minus#2\to#3{%
+ \def \@tempminus{}%
+ \expandafter \sets@minussets #1|\endset#2\@tempminus
+ \ifx \@tempminus\empty
+ \def #3{}%
+ \else
+ \sets@gobblefirst{#3}{\@tempminus}%
+ \fi
+}
+
+%% Syntax like \sets@intersectsets, but of course different semantics.
+\def \sets@minussets #1|#2\endset#3#4{%
+ \if \iselementofset{#1}{#3}\else
+ \sets@append{|#1}\to#4%
+ \fi
+ \def \temp@minus{#2}%
+ \ifx \temp@minus\empty \else
+ \sets@ReturnFi{\sets@minussets #2\endset#3#4}%
+ \fi
+}
+%-----------------------------------------------------------------------------
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
diff --git a/macros/latex/contrib/vhistory/vhistory.sty b/macros/latex/contrib/vhistory/vhistory.sty
new file mode 100644
index 0000000000..b4e515923e
--- /dev/null
+++ b/macros/latex/contrib/vhistory/vhistory.sty
@@ -0,0 +1,439 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% PACKAGE: vhistory %%
+%% FILE: vhistory.sty %%
+%% %%
+%% AUTHOR: Jochen Wertenauer %%
+%% VERSION: 1.6.1 %%
+%% DATE: 2013-01-28 %%
+%% %%
+%% LICENSE: This program may be distributed and/or modified under the %%
+%% conditions of the LaTeX Project Public License, either version 1.2 %%
+%% of this license or (at your option) any later version. %%
+%% The latest version of this license is in %%
+%% http://www.latex-project.org/lppl.txt %%
+%% and version 1.2 or later is part of all distributions of LaTeX %%
+%% version 1999/12/01 or later. %%
+%% %%
+%% This program consists of the file vhistory.sty (this file). %%
+%% %%
+%%--------------------------------------------------------------------------%%
+%% DESCRIPTION (For better documentation see the seperate file.): %%
+%% This package allows the creation to create a version history, where %%
+%% the changes that have been made to a document are listed. %%
+%% The version number of the last entry in the history is accessible (see %%
+%% below) with the command \vhCurrentVersion, its date with \vhCurrentDate. %%
+%% These commands can can be used for headers or title pages for example. %%
+%% The list of all Authors is also available. It is stored in the set %%
+%% \vhAllAuthorsSet. It can be printed using \vhListAllAuthors. There is %%
+%% another command to list authors: \vhListAllAuthorsLong. This command %%
+%% regards all elements in the authorset as commands (those elements do NOT %%
+%% have the \ as first character) and expands them (see example below). %%
+%% The sorting is based on the shortcuts and not on the expansion text! %%
+%% %%
+%% Note: The commands mentioned above work even before the version his- %%
+%% tory specified. Therefore you need two runs of LaTeX. If 'N/A' is dis- %%
+%% played instead of the correct number, you forgot the second run. %%
+%% %%
+%% OPTIONS: %%
+%% - tocentry: If provided, the version history will show up in the table %%
+%% of contents. By default it will not be added. %%
+%% - nochapter: If provided, vhHistory will not start a new chaper/section %%
+%% Use this option, if \section is undefined! %%
+%% - owncaptions: You have to specify your own names for the captions. Use %%
+%% this option if you are using a language that is not %%
+%% supported. %%
+%% - hideauthorcolumn: The history of versions does not contain the column %%
+%% listing the name(s) of the author(s). %%
+%% - tablegrid: If provided, the version history will display gridlines %%
+%% %%
+%% REQUIRED PACKAGES: %%
+%% - sets: Works well with version 1.2 or higher %%
+%% - ltxtable: Works well with version 0.2 from 1995-12-11 %%
+%% ltxtable requires tabularx and longtable. Versions %%
+%% - 2.07 (1999-01-07) of tabularx and %%
+%% - 4.10 (2000-10-22) of longtable %%
+%% worked fine. %%
+%% %%
+%% EXAMPLE OF USAGE: %%
+%% For a better documentation see the seperate file. %%
+%% %%
+%% \usepackage{vhistory} %%
+%% ... %%
+%% \newcommand{\AH}{Alice Hosle} % NOTE: All names are invented. %%
+%% \newcommand{\XY}{Mr. X} %%
+%% \newcommand{\CR}{Charles Richards} %%
+%% ... %%
+%% \begin{document} %%
+%% ... %%
+%% \date{Version \vhCurrentVersion from \vhCurrentDate} %%
+%% \author{\vhListAllAuthorsLong} %%
+%% ... %%
+%% \begin{versionhistory} %%
+%% % Note the syntax of \vhEntry! Authors are separated by `|' %%
+%% \vhEntry{0.1}{2004-04-23}{AH|XY}{Structure of chapters.} %%
+%% \vhEntry{0.2}{2004-04-24}{AH|CR}{Chapter introduction completed} %%
+%% \vhEntry{1.0}{2004-05-30}{XY}{spelling corrected} %%
+%% \end{versionhistory} %%
+%% ... %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{vhistory}
+\RequirePackage{ltxtable, sets}
+
+%% Helper methods ------------------------------------------------------------
+\def \vh@empty{\empty}
+\def \vh@iwrite{\immediate\write}
+
+\long\def \vh@ReturnFi #1\fi{\fi #1}
+
+%% Copied from the TeXbook
+\def \vh@Ifundefined #1{\expandafter\ifx\csname#1\endcsname\relax}
+
+%% Prints the content of macro #1 without expansion.
+\long \def \vh@verbprint #1{\expandafter\vh@eraseToBrace\meaning #1}
+
+%% This macro writes #2 verbatim to the (open) file #1.
+\long \def \vh@verbwrite #1#2{%
+ \long \def \vh@verbtemp{#2}%
+ \expandafter\vh@iwrite\expandafter#1\expandafter{\expandafter\vh@eraseToBrace \meaning\vh@verbtemp}%
+}
+
+%% Deletes everything before the next > e.g. "macro ->". Used by \vh@verbprint
+\def \vh@eraseToBrace #1>{}
+%% ---------------------------------------------------------------------------
+
+%% Multilanguage support -----------------------------------------------------
+\def \vh@setcaptions{%
+ \vh@EnglishCaptions %Default
+ \vh@Ifundefined{l@ngerman}\else
+ \ifnum \language=\l@ngerman\relax
+ \vh@GermanCaptions
+ \fi
+ \fi
+ \vh@Ifundefined{l@german}\else
+ \ifnum \language=\l@german\relax
+ \vh@GermanCaptions
+ \fi
+ \fi
+ \vh@Ifundefined{l@austrian}\else
+ \ifnum \language=\l@austrian\relax
+ \vh@GermanCaptions
+ \fi
+ \fi
+ \vh@Ifundefined{l@french}\else
+ \ifnum \language=\l@french\relax
+ \vh@FrenchCaptions
+ \fi
+ \fi
+ \vh@Ifundefined{l@dutch}\else
+ \ifnum \language=\l@dutch\relax
+ \vh@DutchCaptions
+ \fi
+ \fi
+ \vh@Ifundefined{l@croatian}\else
+ \ifnum \language=\l@croatian\relax
+ \vh@CroatianCaptions
+ \fi
+ \fi
+}
+
+\def \vh@EnglishCaptions{%
+ \def\vhhistoryname{Revision History}%
+ \def\vhversionname{Revision}%
+ \def\vhdatename{Date}%
+ \def\vhauthorname{Author(s)}%
+ \def\vhchangename{Description}%
+}
+
+\def \vh@GermanCaptions{%
+ \def\vhhistoryname{Versionshistorie}%
+ \def\vhversionname{Version}%
+ \def\vhdatename{Datum}%
+ \def\vhauthorname{Autor(en)}%
+ \def\vhchangename{\"Anderungen}%
+}
+
+\def \vh@FrenchCaptions{%
+ \def\vhhistoryname{Historique}%
+ \def\vhversionname{Version}%
+ \def\vhdatename{Date}%
+ \def\vhauthorname{Auteur(s)}%
+ \def\vhchangename{Modifications}%
+}
+
+\def \vh@DutchCaptions{%
+ \def\vhhistoryname{Wijzigingen}%
+ \def\vhversionname{Herziening}%
+ \def\vhdatename{Datum}%
+ \def\vhauthorname{Auteur(s)}%
+ \def\vhchangename{Beschrijving}%
+}
+
+\def \vh@CroatianCaptions{%
+ \def\vhhistoryname{Povijest verzija}%
+ \def\vhversionname{Verzija}%
+ \def\vhdatename{Datum}%
+ \def\vhauthorname{Autor(ica)}%
+ \def\vhchangename{Opis Promjena}%
+}
+%% ---------------------------------------------------------------------------
+
+%% -- Options ----------------------------------------------------------------
+\def \vh@tocentry{0} % By default, there will be no entry in the toc
+\def \vh@nochapter{0} % By default, a new chapter will be started
+\def \vh@owncaptions{0} % By default, the build in captions are used.
+\def \vh@hideauthor{0} % By default, the authors of a change are shown
+\def \vh@tablegrid{0} % By default, there is no tablegrid
+
+
+\DeclareOption{tocentry}{\def \vh@tocentry{1}}%
+\DeclareOption{nochapter}{\def \vh@chapter{}}%
+\DeclareOption{owncaptions}{\vh@setcaptions \def \vh@owncaptions{1}}%
+\DeclareOption{hideauthorcolumn}{\def \vh@hideauthor{1}}%
+\DeclareOption{tablegrid}{\def \vh@tablegrid{1}}%
+
+%% This macro starts a new chapter. If \chapter is undefined, \section is
+%% used (To work with document class article). The option nochapter will
+%% redefine this macro to {}.
+%%
+\def \vh@chapter{%
+ \vh@Ifundefined{chapter}
+ % Since chapter is undefined, we try section. If section is
+ % undefined, too we've got a problem. The User should use the option
+ % nochapter in this case.
+ \markright{\vhhistoryname}%
+ \ifnum \vh@tocentry=1\relax
+ \section{\vhhistoryname}%
+ \else
+ \section*{\vhhistoryname}%
+ \fi
+ \else
+ \markboth{\vhhistoryname}{\vhhistoryname}%
+ \ifnum \vh@tocentry=1\relax
+ \chapter{\vhhistoryname}%
+ \else
+ \chapter*{\vhhistoryname}%
+ \fi
+ \fi
+}
+
+\ProcessOptions
+%% ---------------------------------------------------------------------------
+
+
+%% Informations accessible to the user ---------------------------------------
+
+%% This macro will expand to the current version number
+\def \vhCurrentVersion{N/A}
+
+%% This macro will expand to the date of the last change
+\def \vhCurrentDate{N/A}
+
+%% This set will contain all authors mentioned in the version history.
+\newsetsimple \vhAllAuthorsSet{}
+
+%% Just a shortcut :-)
+\def \vhListAllAuthors{\listset{\vhAllAuthorsSet}}
+
+%% Prints the contents of \vhAllAuthorsSet but regards the elements as
+%% commands. Instead of XY, the definition of the command \XY will be used.
+\def \vhListAllAuthorsLong{\expandafter\vh@longlistset\vhAllAuthorsSet|\endset|}
+
+%% Helper method for \vhListAllAuthorsLong.
+\def \vh@longlistset #1|#2|{%
+ \expandafter\ifx\csname#1\endcsname\relax
+ #1%
+ \else
+ \csname#1\endcsname % Create command and expand
+ \fi
+ \ifx\endset#2%
+ \else
+ \setseparator\sets@ReturnFi{\vh@longlistset#2|}%
+ \fi
+}
+
+%% Prints the contents of \vhAllAuthorsSet but regards the elements as
+%% commands. Instead of XY, the definition of the command \XY will be used.
+\def \vhListAllAuthorsLongWithAbbrev{\expandafter\vh@longlistsetWithAbbrev\vhAllAuthorsSet|\endset|}
+
+\def \vhAbbrevSeparator{\ }
+\def \vhAbbrevLeft{(}
+\def \vhAbbrevRight{)}
+
+%% Helper method for \vhListAllAuthorsLong.
+\def \vh@longlistsetWithAbbrev #1|#2|{%
+ \expandafter\ifx\csname#1\endcsname\relax
+ #1%
+ \else
+ \csname#1\endcsname\vhAbbrevSeparator\vhAbbrevLeft #1\vhAbbrevRight%
+ \fi
+ \ifx\endset#2%
+ \else
+ \setseparator\sets@ReturnFi{\vh@longlistsetWithAbbrev#2|}%
+ \fi
+}
+
+%% ---------------------------------------------------------------------------
+
+
+%% -- Read file \jobname.hst, if existing ------------------------------------
+\IfFileExists{\jobname.hst}%
+{\typeout{Reading file \jobname.hst...}\input{\jobname.hst}} % File exists
+{\typeout{File \jobname.hst not found.}} % File doesn't exist.
+%% ---------------------------------------------------------------------------
+
+
+%% The environment versionhistory.
+%%
+%% At first the macro \decl@revhEntry will be called to allow the user to add
+%% entries to the version history. Second step is to write the tables's head.
+%% Third step is to delete previous contents of vhAllAuthorsSet. Now the
+%% captions of the actual language are loaded. Last step is to start a new
+%% chapter if the user wanted a new chapter.
+%% At the end of the version history, the table's foot is written to the
+%% \@verfile. Then the .hst file is written. Afterwards the command \vhEntry
+%% is undeclared to prevent the user from making nonsense. The last step is
+%% to load the table as a LTXtable, if the file exists.
+%%
+\newenvironment{versionhistory}{%
+ \vh@declarevhEntry
+ \vh@writeTable
+ \newsetsimple \vhAllAuthorsSet{}%
+ \ifnum \vh@owncaptions=0\relax% Defined by the options
+ \vh@setcaptions
+ \fi
+ \vh@chapter
+}{
+ \vh@writeEndTable
+ \vh@writeHstFile
+ \vh@undeclarevhEntry
+ \IfFileExists{\jobname.ver}{% file exists
+ \LTXtable{\textwidth}{\jobname.ver}}%
+ {\@latex@warning{Rerun LaTeX to get the history of versions.}}%
+}
+
+
+% This file contains the table that is the history of versions.
+\newwrite \vh@verfile
+
+%% This macro is called, when the environment versionhistory begins. It
+%% declares the macro vhEntry, which is used to add entries to the version
+%% history. Parameters are:
+%% #1: version number
+%% #2: date
+%% #3: author(s)
+%% #4: changes
+%% The content of the parameters is written to the file that contains the
+%% table with the history of versions.
+%%
+\def \vh@declarevhEntry{%
+ \long \gdef \vhEntry ##1##2##3##4{%
+ \gdef \vhCurrentVersion{##1}% Update version number
+ \gdef \vhCurrentDate{##2}% Update date
+ \vh@add{##3}%
+ \vh@verbwrite \vh@verfile {##1}%
+ \vh@verbwrite \vh@verfile { & ##2}%
+ \ifnum \vh@hideauthor=0\relax
+ \vh@verbwrite \vh@verfile { & \listset{##3}}%
+ \fi
+ \ifnum \vh@tablegrid=0\relax
+ \vh@verbwrite \vh@verfile { & ##4\\}%
+ \else
+ \vh@verbwrite \vh@verfile { & ##4\\\hline}%
+ \fi
+ }%
+}
+
+
+%% Helper macro, called by vhEntry. This macro unions the given author
+%% list with the global list of authors.
+%%
+\def \vh@add #1{%
+ \newsetsimple{\vh@EntrySet}{#1}% Define a temporary set
+ \unionsets{\vhAllAuthorsSet}{\vh@EntrySet}\to{\vhAllAuthorsSet}%
+ \global\let\vhAllAuthorsSet=\vhAllAuthorsSet% Results must be global
+}
+
+
+%% This macro is called, when the environment versionHistory is left. It
+%% redefines the macro vhEntry, which will now produce an error message.
+%%
+\def \vh@undeclarevhEntry{%
+ \long\gdef \vhEntry ##1##2##3##4{%
+ \errhelp{\vhEntry can only be used in the versionHistory environment.}%
+ \errmessage{This command is not accessible here.}}%
+}
+
+
+%% This macro writes the current version number/date and the set of Authors to
+%% the file \jobname.hst. Unwanted expansion of macros must be prevented here.
+%%
+\def \vh@writeHstFile{%
+ \newwrite \vh@hstfile%
+ \immediate \openout \vh@hstfile=\jobname.hst%
+ \vh@iwrite \vh@hstfile {%
+ \def \noexpand\vhCurrentVersion{\vh@verbprint\vhCurrentVersion}}%
+ \vh@iwrite \vh@hstfile {%
+ \def \noexpand\vhCurrentDate{\vh@verbprint\vhCurrentDate}}%
+ \vh@iwrite \vh@hstfile {%
+ \noexpand\newsetsimple \noexpand\vhAllAuthorsSet{\vh@verbprint\vhAllAuthorsSet}}%
+ \immediate \closeout \vh@hstfile%
+}
+
+\def \vhAuthorColWidth{.5\hsize}
+\def \vhChangeColWidth{1.5\hsize}
+
+\def \vh@showAuthorHead{%
+ \ifnum \vh@tablegrid=0\relax
+ \vh@verbwrite \vh@verfile {%
+ \begin{longtable}{@{}ll>{\hsize=\vhAuthorColWidth}X>{\hsize=\vhChangeColWidth}X@{}}%
+ }%
+ \else
+ \vh@verbwrite \vh@verfile {%
+ \begin{longtable}{@{}|l|l|>{\hsize=\vhAuthorColWidth}X|>{\hsize=\vhChangeColWidth}X|@{}}\hline%
+ }%
+ \fi
+}
+
+\def \vh@hideAuthorHead{%
+ \ifnum \vh@tablegrid=0\relax
+ \vh@verbwrite \vh@verfile {\begin{longtable}{@{}llX@{}}}%
+ \else
+ \vh@verbwrite \vh@verfile {\begin{longtable}{@{}|l|l|X|@{}}\hline}%
+ \fi
+}
+
+%% This macro is called at the beginning of a versionhistory environment. It
+%% writes the head of the resulting table to the file \jobname.ver. The table
+%% itself is a LTXtable, i.e. a longtable with the parameterset of tabularx.
+%%
+\def \vh@writeTable{%
+ \immediate \openout \vh@verfile=\jobname.ver%
+ \ifnum \vh@hideauthor=0\relax
+ \vh@showAuthorHead
+ \else
+ \vh@hideAuthorHead
+ \fi
+ \vh@verbwrite \vh@verfile {\textbf{\vhversionname}}%
+ \vh@verbwrite \vh@verfile { & \textbf{\vhdatename}}%
+ \ifnum \vh@hideauthor=0\relax
+ \vh@verbwrite \vh@verfile { & \textbf{\vhauthorname}}%
+ \fi
+ \ifnum \vh@tablegrid=0\relax
+ \vh@verbwrite \vh@verfile { & \textbf{\vhchangename}\\[1ex]}%
+ \else
+ \vh@verbwrite \vh@verfile { & \textbf{\vhchangename}\\\hline}%
+ \fi
+}
+
+
+%% This macro writes the end of the table that \vh@writeTable has begun.
+%%
+\def \vh@writeEndTable{%
+ \vh@verbwrite \vh@verfile{\end{longtable}}%
+ \immediate \closeout \vh@verfile%
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput