3

Does anyone know how to left align the description text of abbrevations in a nomencl list of abbrevations. For example: I would like to left align the text "Kategorien- und Variablebezeichnungen" or "absolute Häufigkeit" in the following example. At the moment this text is justified. Thanks to all!

\documentclass[
a4paper,%
headings=small,%
]{scrbook}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{multicol}
\usepackage{ifthen}

%Abkürzungsverzeichnis
\usepackage[intoc]{nomencl}
\let\abk\nomenclature                           
\renewcommand{\nomname}{Abkürzungsverzeichnis}  
\setlength{\nomlabelwidth}{.20\hsize}           
\renewcommand{\nomlabel}[1]{#1 \dotfill}
\setlength{\nomitemsep}{-\parsep}               
\RequirePackage{ifthen}                         
\renewcommand{\nomgroup}[1]{%
\ifthenelse{\equal{#1}{S}}{\medskip\item[\textbf{Statistik}]}{%
\ifthenelse{\equal{#1}{K}}{\medskip\item[\textbf{Notationskonventionen}]}}}
\renewcommand*\nompreamble{\setlength{\columnsep}{5pc}\begin{multicols}{2}}
\renewcommand*\nompostamble{\end{multicols}}
\makenomenclature

\begin{document}
\printnomenclature[3.2cm]

\abk[S]{n}{Stichprobengröße}
\abk[S]{H\textsubscript{n}}{absolute Häufigkeit}
\abk[K]{\frqq\dots\flqq}{Kategorien- und Variablebezeichnungen}
\abk[K]{\textit{Kursivdruck}}{Objektsprache}

\end{document}
lockstep
  • 250,273
MaKa TaBo
  • 437
  • I think I don't completely understand you requirement; can you please explain a little more in detail what you mean with "I would like to left align the text "Kategorien- und Variablebezeichnungen" or "absolute Häufigkeit" in the following example"? – Gonzalo Medina May 24 '11 at 22:07

2 Answers2

2

I think you're looking for ragged right justification of the nomenclature. If so, try adding the ragged2e package to the preamble, and putting the \printnomenclature in a group with \RaggedRight. Before (from your MWE):

enter image description here

after, adding

\usepackage{ragged2e}

and changing to

{\RaggedRight
\printnomenclature[3.2cm]
}

enter image description here

Mike Renfro
  • 20,550
  • hi mike! that's what i was looking for. thanks a lot! In addition, do you have any idea how to delete the dots after an subheading? In the example after "Statistik". – MaKa TaBo May 25 '11 at 07:15
  • The nomgroups are also typeset as list items, so they're subject to the \nomlabel and other commands used to typeset the symbols and descriptions. The first header would have the dots, too, if could would fit in the 3.2cm allotted for the item width. Either drop the \nomlabel re-definition, decrease the 3.2cm to below the width of the word "Statistik", or add more words to "Statistik" to make its label longer than 3.2cm. – Mike Renfro May 25 '11 at 12:44
  • with the following code, which i got from an user in an other forum, it works great: \medskip{\let\dotfill\relax\item[\textbf{Statistik}]} – MaKa TaBo May 26 '11 at 11:45
0

Regarding the problem with the dots behind "Statistik" one can insert a phantom text. An example could be:

\ifthenelse{\equal{#1}{S}}{\medskip\item[\textbf{Statistik \hphantom{Statistik}}]}{

Source: How do I create an invisible character?