[Tex/LaTex] Two column nomenclature

nomenclaturetwo-column

I want to achieve this for my nomenclature, making it two column with title on top of the columns and not part of the first one. I also want to keep my nomenclature's name changed to Appendix which I do with \renewcommand{\nomname}{Acronyms}.

Can anyone help me "port" the code in this post to my needs?

Best Answer

From \nomname I guess you're using the nomencl package.

Then

\usepackage{multicol}
\makeatletter
\@ifundefined{chapter}
  {\def\wilh@nomsection{section}}
  {\def\wilh@nomsection{chapter}}

\def\thenomenclature{%
  \begin{multicols}{2}[%
    \csname\wilh@nomsection\endcsname*{\nomname}
    \if@intoc\addcontentsline{toc}{\wilh@nomsection}{\nomname}\fi
    \nompreamble]
  \list{}{%
    \labelwidth\nom@tempdim
    \leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \itemsep\nomitemsep
    \let\makelabel\nomlabel}%
}
\def\endthenomenclature{%
  \endlist
  \end{multicols}
  \nompostamble}
\makeatother

should do.

Complete example (with mock nomenclature entries)

\documentclass{book}
\usepackage[intoc]{nomencl}
\makenomenclature
\usepackage{multicol}
\makeatletter
\@ifundefined{chapter}
  {\def\wilh@nomsection{section}}
  {\def\wilh@nomsection{chapter}}

\def\thenomenclature{%
  \begin{multicols}{2}[%
    \csname\wilh@nomsection\endcsname*{\nomname}
    \if@intoc\addcontentsline{toc}{\wilh@nomsection}{\nomname}\fi
    \nompreamble]
  \list{}{%
    \labelwidth\nom@tempdim
    \leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \itemsep\nomitemsep
    \let\makelabel\nomlabel}%
}
\def\endthenomenclature{%
  \endlist
  \end{multicols}
  \nompostamble}
\makeatother

\begin{document}

\frontmatter    
\tableofcontents

\mainmatter
\chapter{X}

\newcount\pippo
\def\mocknom{\expandafter\nomenclature\expandafter{\romannumeral\pippo}{X}}

abc

\loop\ifnum\pippo<200
\advance\pippo1
\mocknom
\repeat

\printnomenclature
\end{document}
Related Question