0

I have encounter an issue with multicols. I'm writing a document and I am using the class Thesis.cls from here.

I have the following code:

\documentclass[11pt, a4paper, twoside]{Thesis}
\usepackage[noprefix,norefeq]{nomencl} 
\usepackage{multicol}
\makenomenclature
\usepackage{ifthen}
\renewcommand{\nomgroup}[1]{%
\item[\bfseries
\ifthenelse{\equal{#1}{C}}{Acronyms}{%
\ifthenelse{\equal{#1}{A}}{Subscripts}{%
\ifthenelse{\equal{#1}{N}}{Notation}{%
\ifthenelse{\equal{#1}{G}}{Greek Letters}{}}}}%
]}

\renewcommand{\nomname}{List of Symbols}
\newcommand{\nomunit}[1]{%
\renewcommand{\nomentryend}{\hspace*{\fill}#1}}    

\begin{document}

\begin{multicols}{2}    
\printnomenclature    
\end{multicols}

\nomenclature[N]{A}{Somthing}
\nomenclature[N]{A}{Somthing}
\nomenclature[N]{A}{Somthing}
\nomenclature[N]{A}{Somthing}
\end{document}

But I have a problem. The columns are not printed aligned (see figure below). I have an extra space before the "Subscript".

enter image description here

  • Welcome to TeX.SX!! Please give a full minimal working example. Currently we have to guess what packages etc you are using and this makes it really hard to help you. A MWE should start with a \documentclass command, have a minimal preamble and then \begin{document}...\end{document}. The code should compile and be as small as possible to demonstrate your problem. Cutting your code down to a MWE may well reveal what your problem actually is. In any case, it is really difficult to help you without more information. – Andrew Nov 2 '16 at 23:21
1

You need to open and close the multicols environment inside the thenomenclature environment, which can be done with the \nompreamble and \nompostamble hooks.

\documentclass[11pt, a4paper, twoside]{book}
\usepackage[noprefix,norefeq]{nomencl} 
\usepackage{multicol}
\makenomenclature
\usepackage{ifthen}
\renewcommand{\nomgroup}[1]{%
\item[\bfseries
\ifthenelse{\equal{#1}{C}}{Acronyms}{%
\ifthenelse{\equal{#1}{A}}{Subscripts}{%
\ifthenelse{\equal{#1}{N}}{Notation}{%
\ifthenelse{\equal{#1}{G}}{Greek Letters}{}}}}%
]}

\renewcommand{\nomname}{List of Symbols}
\newcommand{\nomunit}[1]{%
\renewcommand{\nomentryend}{\hspace*{\fill}#1}}
\renewcommand{\nompreamble}{\begin{multicols}{2}}
\renewcommand{\nompostamble}{\end{multicols}}

\begin{document}

Some text

\printnomenclature    

% populate the nomenclature with dummy entries    
\count255=0
\loop\ifnum\count255<60
\advance\count255 1
\edef\temp{\noexpand\nomenclature[N]{A}{\romannumeral\count255}}\temp
\repeat

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.