[Tex/LaTex] Koma-script and glossaries package

formattingglossarieskoma-script

This has driven me crazy for some time now and I finally found out the origin of my problem. Now I would like to solve it.

In my thesis document, I add acronyms using the glossaries package. This all works, however I could never figure out why my Acronym items were formatted in Sans Serif, here is a coded MWE:

\documentclass[10pt,a4paper]{scrreprt}

%preamble
\usepackage[colorlinks,plainpages=false]{hyperref}
\usepackage[acronym,% create 'acronym' glossary type
            nomain,% 'main' glossary not needed as using 'acronym'
            style=altlist, % use altlist style
            toc, % add the glossary to the table of contents
           ]{glossaries}
\usepackage{filecontents}
\makeglossaries
\setacronymstyle{long-sc-short-desc}

\renewcommand*{\glsseeitemformat}[1]{\acronymfont{\glsentrytext{#1}}}

\renewcommand*{\glsnamefont}[1]{\textmd{#1}}


\begin{filecontents}{glossaryTest.tex}
% Glossary Entries
\newacronym[description={This is just for show}
]{foo}{foo}{don't really know where foo stand for}

\newacronym[description={And another showoff description}
]{bar}{bar}{beyond all recognition}
\end{filecontents}

\loadglsentries{glossaryTest.tex}


\begin{document}


\chapter{blabla}

Just testing whether I can refer to some \gls{foo} or \gls{bar}.

\printglossaries

\end{document}

And an example image:
enter image description here

Which, as you surely agree, looks horrible.

After fiddling forever with all my packages and all my style stuffs, I finally changed the last thing I would think influence the look of my glossary… it was the koma-script scrreprt documentclass I am using, if I change this to report this is the output:

enter image description here

As I like a lot of the features koma-script scrreprt offers me, my question is how can I format or tweak something so that my glossary looks as in the second image, whilst still using the scrreprt class.

Anyone?

Best Answer

One solution is to use \textnormal instead of \textmd when redefining \glsnamefont.

\renewcommand*{\glsnamefont}[1]{\textnormal{#1}}

Another -- and perhaps more consistent -- way is to redefine the formatting used by the labels of description lists, which is also used by glossaries' labels:

\setkomafont{descriptionlabel}{\normalfont}
Related Question