[Tex/LaTex] How to create a beautiful symbol table

indexingpositioningsymbolstables

One part of my "Geometrie und Topologie" book is a symbol table that allows students to quickly find the right words when they don't understand a symbol. This makes searching via the index / Wikipedia / Google / math.SE much easier. But currently it doesn't look very nice.

The complete sources of the document are here.

Working Example

The following example example compiles almost (except for references and page numbers) to the symbol table I currently have:

\documentclass[DIV15,BCOR12mm]{scrbook}
\KOMAoptions{paper=a5,twoside=true}
\usepackage{amsmath,amssymb}% math symbols / fonts
\usepackage[utf8]{inputenc} % this is needed for umlauts
\usepackage[ngerman]{babel} % this is needed for umlauts
\usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf
\usepackage[bookmarks,bookmarksnumbered,hypertexnames=false,pdfpagelayout=OneColumn,colorlinks,hyperindex=false]{hyperref} % has to be after makeidx
\hypersetup{hidelinks=true}
\usepackage{braket}         % needed for \Set
\usepackage{parskip}        % nicer paragraphs
\usepackage[german,nameinlink,noabbrev]{cleveref} % has to be after hyperref, ntheorem, amsthm

\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]%
{\markboth{\MakeUppercase{\thechapter.\ #1}}{}}
\renewcommand{\sectionmark}[1]%
{\markright{\MakeUppercase{\thesection.\ #1}}}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\newcommand{\helv}{%
\fontfamily{phv}\fontseries{b}\fontsize{9}{11}\selectfont}
\fancyhf{}
\fancyhead[LO,RE]{\helv \thepage}
\fancyhead[LE]{\helv \leftmark}
\fancyhead[RO]{\helv \rightmark}
\fancypagestyle{plain}{%
\fancyhead{}
\renewcommand{\headrulewidth}{0pt}
}

\allowdisplaybreaks
\usepackage{microtype}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% shortcuts                                                         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\fB{\mathfrak{B}}
\def\calS{\mathcal{S}}
\def\fT{\mathfrak{T}}
\def\fU{\mathfrak{U}}
\def\atlas{\ensuremath{\mathcal{A}}}
\def\praum{\ensuremath{\mathcal{P}}}
\DeclareMathOperator{\rang}{Rg}

\newcommand\dcup{\mathbin{\dot{\cup}}}
\def\GL{\ensuremath{\mathrm{GL}}}
\DeclareMathOperator{\Homoo}{\textnormal{Homöo}}
\DeclareMathOperator{\Iso}{Iso}
\def\SL{\ensuremath{\mathrm{SL}}}
\def\PSL{\ensuremath{\mathrm{PSL}}}
\DeclareMathOperator{\Perm}{Perm}
\DeclareMathOperator{\Sym}{Sym}
\DeclareMathOperator{\Fix}{Fix}
\newcommand{\ts}[1]{\textnormal{#1}} % textual subscript
\newcommand{\kappanor}{\kappa_{\ts{Nor}}}

\def\mda{\ensuremath{\mathbb{A}}}
\def\mdp{\ensuremath{\mathbb{P}}}
\def\mdc{\ensuremath{\mathbb{C}}}
\def\mdk{\ensuremath{\mathbb{K}}}
\def\mdr{\ensuremath{\mathbb{R}}}
\def\mdq{\ensuremath{\mathbb{Q}}}
\def\mdz{\ensuremath{\mathbb{Z}}}
\def\mdn{\ensuremath{\mathbb{N}}}
\def\mdh{\ensuremath{\mathbb{H}}}

\begin{document}
\appendix
\markboth{Symbolverzeichnis}{Symbolverzeichnis}
\twocolumn
\chapter*{Symbolverzeichnis}
\addcontentsline{toc}{chapter}{Symbolverzeichnis}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Mengenoperationen                                                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Mengenoperationen}
$A^C\;\;\;$ Komplement der Menge $A$\\
$\mathcal{P}(M)\;\;\;$ Potenzmenge von $M$\\
$\overline{M}\;\;\;$ Abschluss der Menge $M$\\
$\partial M\;\;\;$ Rand der Menge $M$\\
$M^\circ\;\;\;$ Inneres der Menge $M$\\
$A \times B\;\;\;$ Kreuzprodukt zweier Mengen\\
$A \subseteq B\;\;\;$ Teilmengenbeziehung\\
$A \subsetneq B\;\;\;$ echte Teilmengenbeziehung\\
$A \setminus B\;\;\;$ $A$ ohne $B$\\
$A \cup B\;\;\;$ Vereinigung\\
$A \dcup B\;\;\;$ Disjunkte Vereinigung\\
$A \cap B\;\;\;$ Schnitt\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Geometrie                                                         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Geometrie}
$AB\;\;\;$ Gerade durch die Punkte $A$ und $B$\\
$\overline{AB}\;\;\;$ Strecke mit Endpunkten $A$ und $B$\\
$\triangle ABC\;\;\;$ Dreieck mit Eckpunkten $A, B, C$\\
$\overline{AB} \cong \overline{CD}\;\;\;$ Die Strecken $\overline{AB}$ und $\overline{CD}$ sind isometrisch\\
$|K|\;\;\;$ Geometrische Realisierung des Simplizialkomplexes $K$\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Gruppen                                                           %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Gruppen}
$\Homoo(X)\;\;\;$ Homöomorphismengruppe\\
$\Iso(X)\;\;\;$ Isometriengruppe\\
$\GL_n(K)\;\;\;$ Allgemeine lineare Gruppe\footnote{von \textit{\textbf{G}eneral \textbf{L}inear Group}}\\
$\SL_n(K)\;\;\;$ Spezielle lineare Gruppe\\
$\PSL_n(K)\;\;\;$ Projektive lineare Gruppe\\
$\Perm(X)\;\;\;$ Permutationsgruppe\\
$\Sym(X)\;\;\;$ Symmetrische Gruppe
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Wege                                                              %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Wege}
$\gamma: I \rightarrow X\;\;\;$ Ein Weg\\
$[\gamma]\;\;\;$ Homotopieklasse von $\gamma$\\
$\gamma_1 * \gamma_2\;\;\;$ Zusammenhängen von Wegen\\
$\gamma_1 \sim \gamma_2\;\;\;$ Homotopie von Wegen\\
$\overline{\gamma}(x) = \gamma(1-x)\;\;\;$ Inverser Weg\\
$C := \gamma([0,1])\;\;\;$ Bild eines Weges $\gamma$

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Weiteres                                                          %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Weiteres}
$\fB\;\;\;$ Basis einer Topologie\\
$\calS\;\;\;$ Subbasis einer Topologie\\
$\fB_\delta(x)\;\;\;$ $\delta$-Kugel um $x$\\
$\fT\;\;\;$ Topologie\\

$\atlas\;\;\;$ Atlas\\
$\praum\;\;\;$ Projektiver Raum\\
$\langle \cdot , \cdot \rangle\;\;\;$ Skalarprodukt\\
$X /_\sim\;\;\;$ $X$ modulo $\sim$\\
$[x]_\sim\;\;\;$ Äquivalenzklassen von $x$ bzgl. $\sim$\\
$\| x \|\;\;\;$ Norm von $x$\\
$| x |\;\;\;$ Betrag von $x$\\
$\langle a \rangle\;\;\;$ Erzeugnis von $a$\\

$S^n\;\;\;$ Sphäre\\
$T^n\;\;\;$ Torus\\

$f \circ g\;\;\;$ Verkettung von $f$ und $g$\\
$\pi_X\;\;\;$ Projektion auf $X$\\
$f|_U\;\;\;$ $f$ eingeschränkt auf $U$\\
$f^{-1}(M)\;\;\;$ Urbild von $M$\\
$\rang(M)\;\;\;$ Rang von $M$\\
$\chi(K)\;\;\;$ Euler-Charakteristik von $K$\\
$\Delta^k\;\;\;$ Standard-Simplex\\
$X \# Y\;\;\;$ Verklebung von $X$ und $Y$\\
$d_n\;\;\;$ Lineare Abbildung aus \cref{kor:9.11}\\
$A \cong B\;\;\;$ $A$ ist isometrisch zu $B$\\
$f_*\;\;\;$ Abbildung zwischen Fundamentalgruppen (vgl. \cpageref{korr:11.5})
\onecolumn

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Zahlenmengen                                                      %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Zahlenmengen}
$\mdn = \Set{1, 2, 3, \dots} \;\;\;$ Natürliche Zahlen\\
$\mdz = \mdn \cup \Set{0, -1, -2, \dots} \;\;\;$ Ganze Zahlen\\
$\mdq = \mdz \cup \Set{\frac{1}{2}, \frac{1}{3}, \frac{2}{3}} = \Set{\frac{z}{n} \text{ mit } z \in \mdz \text{ und } n \in \mdz \setminus \Set{0}} \;\;\;$ Rationale Zahlen\\
$\mdr = \mdq \cup \Set{\sqrt{2}, -\sqrt[3]{3}, \dots}\;\;\;$ Reele Zahlen\\
$\mdr_+\;$ Echt positive reele Zahlen\\
$\mdr_{+,0}^n := \Set{(x_1, \dots, x_n) \in \mdr^n | x_n \geq 0}\;\;\;$ Halbraum\\
$\mdr^\times = \mdr \setminus \Set{0} \;$ Einheitengruppe von $\mdr$\\
$\mdc = \Set{a+ib|a,b \in \mdr}\;\;\;$ Komplexe Zahlen\\
$\mdp = \Set{2, 3, 5, 7, \dots}\;\;\;$ Primzahlen\\
$\mdh = \Set{z \in \mdc | \Im{z} > 0}\;\;\;$ obere Halbebene\\
$I = [0,1] \subsetneq \mdr\;\;\;$ Einheitsintervall\\

$f:S^1 \hookrightarrow \mdr^2\;\;\;$ Einbettung der Kreislinie in die Ebene\\
$\pi_1(X,x)\;\;\;$ Fundamentalgruppe im topologischen Raum $X$ um $x \in X$\\
$\Fix(f)\;\;\;$ Menge der Fixpunkte der Abbildung $f$\\
$\|\cdot\|_2\;\;\;$ 2-Norm; Euklidische Norm\\
$\kappa\;\;\;$ Krümmung\\
$\kappa_{\ts{Nor}}\;\;\;$ Normalenkrümmung\\
$V(f)\;\;\;$ Nullstellenmenge von $f$\footnote{von \textit{\textbf{V}anishing Set}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Krümmung                                                          %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Krümmung}
$D_p F: \mdr^2 \rightarrow \mdr^3\;\;\;$ Lineare Abbildung mit Jacobi-Matrix in $p$ (siehe \cpageref{def:Tangentialebene})\\
$T_s S\;\;\;$ Tangentialebene an $S \subseteq \mdr^3$ durch $s \in S$\\
$d_s n(x)\;\;\;$ Weingarten-Abbildung\\
\end{document}

Rendered

enter image description here

enter image description here

Question

I would like to know how to make this symbol table "nicer".

One way I could imagine how to improve it, would be by aligning the content on the first page below the section "Gruppen". But I don't want to restrict answers to this.

What I've tried

tabular

I've tried to use the tabular environment:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Mengenoperationen                                                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Mengenoperationen}
\begin{tabular}{ll}
    $A^C$           & Komplement der Menge $A$\\
    $\mathcal{P}(M)$& Potenzmenge von $M$\\
    $\overline{M}$  & Abschluss der Menge $M$\\
    $\partial M$    & Rand der Menge $M$\\
    $M^\circ$       & Inneres der Menge $M$\\
    $A \times B$    & Kreuzprodukt zweier Mengen\\
    $A \subseteq B$ & Teilmengenbeziehung\\
    $A \subsetneq B$& echte Teilmengenbeziehung\\
    $A \setminus B$ & $A$ ohne $B$\\
    $A \cup B$      & Vereinigung\\
    $A \dcup B$     & Disjunkte Vereinigung\\
    $A \cap B$      & Schnitt
\end{tabular}

but then I get this:

enter image description here

itemize

\section*{Mengenoperationen}\leavevmode
\begin{itemize}
    \itemsep0em 
    \item[$A^C$]            Komplement der Menge $A$\\
    \item[$\mathcal{P}(M)$] Potenzmenge von $M$\\
    \item[$\overline{M}$]   Abschluss der Menge $M$\\
    \item[$\partial M$]     Rand der Menge $M$\\
    \item[$M^\circ$]        Inneres der Menge $M$\\
    \item[$A \times B$]     Kreuzprodukt zweier Mengen\\
    \item[$A \subseteq B$]  Teilmengenbeziehung\\
    \item[$A \subsetneq B$] echte Teilmengenbeziehung\\
    \item[$A \setminus B$]  $A$ ohne $B$\\
    \item[$A \cup B$]       Vereinigung\\
    \item[$A \dcup B$]      Disjunkte Vereinigung\\
    \item[$A \cap B$]       Schnitt
\end{itemize}

results in much too high spacing:

enter image description here

Best Answer

You could use the xtab package and its environment xtabular. It functions very much like the longtable environment does, in that it can break across columns and pages; however, it's also compatible with twocolumn mode, whereas longtable is not.

I suggest you adjust the column width of the first table column (the symbol column) so that it's just wide enough to contain the widest symbolic entry within each section. Then, adjust the second column so that the entire table is as wide as \columnwidth. Given the narrow measure of the second column within a table, "full" justification isn't advisable. Instead, use \RaggedRight (provided by the package ragged2e), which allows hyphenation. (In contrast, \raggedright does not allow hyphenation.)

The example shows only the first page of your larger example.

enter image description here

\documentclass[DIV15,BCOR12mm]{scrbook}
\KOMAoptions{paper=a5,twoside=true}

\usepackage{array,xtab,ragged2e}
\newlength\mylengtha
\newlength\mylengthb
\newcolumntype{P}[1]{>{\RaggedRight}p{#1}}
\tabcolsep=3pt % default: 6pt

\usepackage{amsmath,amssymb}% math symbols / fonts
\usepackage[utf8]{inputenc} % this is needed for umlauts
\usepackage[ngerman]{babel} % this is needed for umlauts
\usepackage[T1]{fontenc}    % this is needed for correct 
                            % output of umlauts in pdf
\usepackage{braket}         % needed for \Set
\usepackage{parskip}        % nicer paragraphs

\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]%
{\markboth{\MakeUppercase{\thechapter.\ #1}}{}}
\renewcommand{\sectionmark}[1]%
{\markright{\MakeUppercase{\thesection.\ #1}}}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\newcommand{\helv}{%
\fontfamily{phv}\fontseries{b}\fontsize{9}{11}\selectfont}
\fancyhf{}
\fancyhead[LO,RE]{\helv \thepage}
\fancyhead[LE]{\helv \leftmark}
\fancyhead[RO]{\helv \rightmark}
\fancypagestyle{plain}{%
\fancyhead{}
\renewcommand{\headrulewidth}{0pt}
}

\allowdisplaybreaks
\usepackage{microtype}

\usepackage{hyperref} % has to be after makeidx
\hypersetup{bookmarks,bookmarksnumbered,hypertexnames=false,
   pdfpagelayout=OneColumn,colorlinks,hyperindex=false,
   hidelinks=true}
\usepackage[german,nameinlink,noabbrev]{cleveref} 
   % has to be after hyperref, ntheorem, amsthm

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% shortcuts                                                         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\fB{\mathfrak{B}}
\def\calS{\mathcal{S}}
\def\fT{\mathfrak{T}}
\def\fU{\mathfrak{U}}
\def\atlas{\ensuremath{\mathcal{A}}}
\def\praum{\ensuremath{\mathcal{P}}}
\DeclareMathOperator{\rang}{Rg}

\newcommand\dcup{\mathbin{\dot{\cup}}}
\def\GL{\ensuremath{\mathrm{GL}}}
\DeclareMathOperator{\Homoo}{\textnormal{Homöo}}
\DeclareMathOperator{\Iso}{Iso}
\def\SL{\ensuremath{\mathrm{SL}}}
\def\PSL{\ensuremath{\mathrm{PSL}}}
\DeclareMathOperator{\Perm}{Perm}
\DeclareMathOperator{\Sym}{Sym}
\DeclareMathOperator{\Fix}{Fix}
\newcommand{\ts}[1]{\textnormal{#1}} % textual subscript
\newcommand{\kappanor}{\kappa_{\ts{Nor}}}

\def\mda{\ensuremath{\mathbb{A}}}
\def\mdp{\ensuremath{\mathbb{P}}}
\def\mdc{\ensuremath{\mathbb{C}}}
\def\mdk{\ensuremath{\mathbb{K}}}
\def\mdr{\ensuremath{\mathbb{R}}}
\def\mdq{\ensuremath{\mathbb{Q}}}
\def\mdz{\ensuremath{\mathbb{Z}}}
\def\mdn{\ensuremath{\mathbb{N}}}
\def\mdh{\ensuremath{\mathbb{H}}}

\begin{document}
\appendix
\markboth{Symbolverzeichnis}{Symbolverzeichnis}

\twocolumn
\chapter*{Symbolverzeichnis}
\addcontentsline{toc}{chapter}{Symbolverzeichnis}

%%%%% Mengenoperationen                                                 
\section*{Mengenoperationen}

% Set \mylengtha to widest element in first column; adjust
% \mylengthb so that the width of the table is \columnwidth
\settowidth\mylengtha{$A \subsetneq B$}
\setlength\mylengthb{\dimexpr\columnwidth-\mylengtha-2\tabcolsep\relax}

\begin{xtabular}{@{} p{\mylengtha} P{\mylengthb} @{}}
$A^C $           & Komplement der Menge $A$\\
$\mathcal{P}(M)$ & Potenzmenge von $M$\\
$\overline{M}$   & Abschluss der Menge $M$\\
$\partial M$     & Rand der Menge $M$\\
$M^\circ$        & Inneres der Menge $M$\\
$A \times B$     & Kreuzprodukt zweier Mengen\\
$A \subseteq B$  & Teilmengenbeziehung\\
$A \subsetneq B$ & echte Teilmengenbeziehung\\
$A \setminus B$  & $A$ ohne $B$\\
$A \cup B$       & Vereinigung\\
$A \dcup B$      & Disjunkte Vereinigung\\
$A \cap B$       & Schnitt\\
\end{xtabular}

%%%%% Geometrie                                                         
\section*{Geometrie}

\settowidth\mylengtha{$\overline{AB} \cong \overline{CD}$}
\setlength\mylengthb{\dimexpr\columnwidth-\mylengtha-2\tabcolsep\relax}

\begin{xtabular}{@{} p{\mylengtha} P{\mylengthb} @{}}
$AB$ & Gerade durch die Punkte $A$ und $B$\\
$\overline{AB}$ & Strecke mit Endpunkten $A$ und $B$\\
$\triangle ABC$ & Dreieck mit Eckpunkten $A, B, C$\\
$\overline{AB} \cong \overline{CD}$ & Die Strecken $\overline{AB}$ und $\overline{CD}$ sind isometrisch\\
$|K|$ & Geometrische Realisierung des Simplizialkomplexes~$K$\\
\end{xtabular}

%%%%% Gruppen                                                           
\section*{Gruppen}

\settowidth\mylengtha{$\Homoo(X)$}
\setlength\mylengthb{\dimexpr\columnwidth-\mylengtha-2\tabcolsep\relax}

\begin{xtabular}{@{} p{\mylengtha} P{\mylengthb} @{}}
$\Homoo(X)$ & Homöomorphis\-men\-gruppe\\
$\Iso(X)$   & Isometriengruppe\\
$\GL_n(K)$  & Allgemeine lineare Gruppe (von \textit{\textbf{G}eneral \textbf{L}inear Group})\\
$\SL_n(K)$  & Spezielle lineare Gruppe\\
$\PSL_n(K)$ & Projektive lineare Gruppe\\
$\Perm(X)$  & Permutationsgruppe\\
$\Sym(X)$   & Symmetrische Gruppe\\
\end{xtabular}

\end{document}
Related Question