5

I have a glossary printed in two columns, but the title is printed on the first columns:

enter image description here

If I print separatly the title I have:

enter image description here

How I can avoid to print again 'Glossario' with the command \printglossary? I use the package glossary.

This is my MWE:

\documentclass[english,11pt,twoside]{scrbook} 
\usepackage[paperwidth=17.5cm,paperheight=25cm, inner=1.25cm,outer=5.75cm,top=3cm,bottom=3cm]{geometry}
\usepackage{multicol}
\usepackage[style=list,glossaryname=false,number=none]{glossary}
\makeglossary
\begin{document}
\glossary{name={Luce}, description={Radiazione elettromagnetica di particolare frequenza, percepibile dall'occhio umano. La lunghezza d'onda dello spettro luminoso varia da 1 nm (violetto estremo) a 1000 nm (rosso).}}

\glossary{name={Numero atomico}, description={Numero utilizzato per caratterizzare chimicamente un atomo. Corrisponde al numero di protoni presenti nel nucleo dell'atomo.}}

%\normalsize
\addcontentsline{toc}{chapter}{Glossario}
\newgeometry{inner=1.25cm,outer=1.25cm}
%\chapter*{Glossario}
\thispagestyle{plain}

\hfill \huge\textbf{Glossario}
\small  
\begin{multicols}{2}
\printglossary
\end{multicols}
\restoregeometry
\end{document}
5

The problem is, regardless of the value of \glossarytitle, the package injects a \chapter* command, which causes column misalignment. To solve this, redefine the \glossarytitle macro to empty and enter your own \chapter* before the multicols environment.

\documentclass[11pt,twoside]{scrbook} 
\usepackage[style=list,number=none]{glossary}
\usepackage{multicol}

\renewcommand\glossaryname{Glossario}
\renewcommand\glossarytitle{}
\makeglossary

\begin{document}
\chapter{The First Chapter}
This is a test\glossary{name={test}, description={test}} of glossary functionality.

\section{The First Section}
Here we will test and check\glossary{name={check}, description={test2}} the glossary.

\chapter*{\glossaryname}
\begin{multicols}{2}
\printglossary
\end{multicols}
\end{document}

Gives output: MWE output

You might consider switching to the glossaries package, since glossary is obselete and the new package has more flexible styling. Migration instructions are provided here.

  • Yes, I dont like the 'Glossario' title over the first column only, but on the top of both columns. For this it is necessary to make glossaryname equals to null string... – Raffaele Santoro Jan 30 '14 at 20:22
  • Setting glossaryname to null string will still leave vertical space where the title would have gone, so your columns will not be aligned. To achieve what you want, redefine glossarytitle to empty and manually insert a \chapter* before the multicols environment. I will update my answer above. – Paul Gessler Jan 30 '14 at 21:17
  • Thanks it works very well only adding to my source code the line: \renewcommand\glossarytitle{} before \makeglossary. – Raffaele Santoro Jan 30 '14 at 22:55
2

First of all, the option glossaryname is not a valid option for the package glossary.

I suggest you to redefine the theglossary environment so that the glossary is printed in two columns. That is, add the following lines in the preamble

\makeatletter
\renewenvironment{theglossary}{%
\glossarytitle\glossarypreamble%
\begin{multicols}{2}\@bef@reglos%
}{%
\@ftergl@s\end{multicols}%
\noindent\glossarypostamble}
\makeatother

Also, if you want a glossary entry in the toc, it suffices to add the option toc=true when loading glossary (no need for the \addcontentsline line):

\usepackage[style=list,number=none,toc=true]{glossary}

MWE (I've also loaded babel with the italian option):

\documentclass[11pt,twoside]{scrbook}
\usepackage[paperwidth=17.5cm,paperheight=25cm, inner=1.25cm,outer=5.75cm,top=3cm,bottom=3cm]{geometry}
\usepackage[english,italian]{babel}
\usepackage{multicol}
\usepackage[style=list,number=none,toc=true]{glossary}

\makeatletter
\renewenvironment{theglossary}{%
\glossarytitle\glossarypreamble%
\begin{multicols}{2}\@bef@reglos%
}{%
\@ftergl@s\end{multicols}%
\noindent\glossarypostamble}
\makeatother

\makeglossary

\begin{document}
\tableofcontents

\glossary{name={Luce}, description={Radiazione elettromagnetica di particolare frequenza, percepibile dall'occhio umano. La lunghezza d'onda dello spettro luminoso varia da 1 nm (violetto estremo) a 1000 nm (rosso).}}

\glossary{name={Numero atomico}, description={Numero utilizzato per caratterizzare chimicamente un atomo. Corrisponde al numero di protoni presenti nel nucleo dell'atomo.}}

%\normalsize

\newgeometry{inner=1.25cm,outer=1.25cm}
%\chapter*{Glossario}
\thispagestyle{plain}

\small
\printglossary

\restoregeometry
\end{document} 

Output:

enter image description here

  • I already have this output! But I want 'Glossario' put on the top of both columns. – Raffaele Santoro Jan 30 '14 at 20:39
  • @RaffaeleSantoro Sorry for the late reply, I was going to bed. Now it does what you want. – karlkoeller Jan 31 '14 at 6:04

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.