1

I have made a four column nomenclature, my code looks like this:

\documentclass{article}

\usepackage{nomencl,etoolbox,ragged2e,siunitx,fullpage,parskip}

\newcommand{\DimensUnits}[2]{\hfill\makebox[18em]{#1\hfill}%
\makebox[4em]{#2\hfill}\ignorespaces}
\newcommand{\insertnomheaders}{\item[\bfseries Symbool]\textbf{Grootheid}\DimensUnits{\textbf{Eenheid}}{\textbf{Afkorting}}}
\renewcommand{\nomname}{Symbolenlijst}

\renewcommand\nomgroup[1]{\item[\large\bfseries]\insertnomheaders}

\newcommand{\nomdescr}[1]{\parbox[t]{6cm}{\RaggedRight #1}}
\newcommand{\slijst}[4]{\nomenclature{#1}{\nomdescr{#2}\DimensUnits{#3}{#4}}}

\makenomenclature

\begin{document}
\printnomenclature [6em]

\section{hoofdstuk}
\slijst{$\pi$}{lengtemaat}{meter per seconde kwadraat, met meer uitleg}{\si{m}}
random text
\slijst{$\alpha$}{hoek}{L}{\si{F.m^{-1}}}
\slijst{$\beta$}{langte van contragewicht tot basis, een hele lange uitleg}{meter}{\si{v}}

\end{document}

The only problem I still have, is that when my text is too long, it overflows in the makebox (third and fourth column). How can I make the text go to another line, such as in the second paragraph?

1
  • 1
    Welcome to TeX.SX! If you select your code and hit the {} button in the top of the editor, your code will be formatted as such. Commented Nov 2, 2015 at 17:34

1 Answer 1

1

Use \parbox also in the third column. I have streamlined and fixed the code.

\documentclass{article}

\usepackage{nomencl,etoolbox,ragged2e,siunitx,fullpage,parskip}

\newcommand{\DimensUnits}[2]{%
  \quad
  \parbox[t]{16em}{\RaggedRight #1}%
  \quad
  \makebox[4em][l]{#2}%
}
\newcommand{\insertnomheaders}{%
  \item[\bfseries Symbool]
  \nomdescr{\textbf{Grootheid}}\DimensUnits{\textbf{Eenheid}}{\textbf{Afkorting}}%
}
\renewcommand{\nomname}{Symbolenlijst}

\renewcommand\nomgroup[1]{\item[\large\bfseries]\insertnomheaders}

\newcommand{\nomdescr}[1]{\parbox[t]{6cm}{\RaggedRight #1}}
\newcommand{\slijst}[4]{\nomenclature{#1}{\nomdescr{#2}\DimensUnits{#3}{#4}}}

\makenomenclature

\begin{document}
\printnomenclature [6em]

\section{hoofdstuk}
\slijst{$\pi$}{lengtemaat}{meter per seconde kwadraat, met meer uitleg}{\si{m}}
random text
\slijst{$\alpha$}{hoek}{L}{\si{F.m^{-1}}}
\slijst{$\beta$}{langte van contragewicht tot basis, een hele lange uitleg}{meter}{\si{v}}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .