2

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?

  • let your \sfdefault be \rmdefault. – Symbol 1 Sep 18 '14 at 14:21
  • Yes, this works. However everything I like about scrreprt (for example: serif titles and the serif captions I use) change with it. I would like to specifically edit the font in the glossaries, not a general setting for my entire document. – MTDJassen Sep 18 '14 at 14:33
  • Do it before your list – Symbol 1 Sep 18 '14 at 14:34
3

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}
  • Thanks for your update, the latter indeed seems more consistent. Will check it out. Thanks for the support! – MTDJassen Sep 18 '14 at 14:52

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.