7

I'm currently working on a thesis and having trouble with my glossary in connection with abbreviations.

I define an abbreviation that way:

\acro{conMan}[CMS]{\gls{CMS}}

In my glossary list file i write:

\newglossaryentry{CMS}{
    name={Content Management System},
    description={My description comes here.}
}

By using:

\emph{\ac{conMan}}

it always prints "Content Management System" in bold+italic font. Its only with this one. I have several similar ones before that, an they are just written italic, as i defined.

How do I get it only italic too?

EDIT:

For further explanation: I want the following style, using the glossaries package for glossary entries and acronyms:

1) acronyms without a glossary entry in background shall be written italic in the text

Example: TH => Technical Highschool => Technical Highschool is not explained inside a glossary

2) acronyms with a glossary entry in background shall also be written italic in the text, but in the index they shall be written bold and reference to the glossary

Example: CMS => Content Management System <-- is written italic in text, but bold in index of acronyms => Content Management System is explained in glossary

3) glossary entries are written bold in the text

Example: I use the Word "Web-App" in the text, so i want it to be written bold, because its in my glossary.

13

You haven't provided a Minimal Working Example but it looks like you're using both acronym and glossaries, but since glossaries also does acronyms you only need to load one package:

\documentclass{article}

\usepackage[acronym,shortcuts]{glossaries}

\makeglossaries

\newglossaryentry{CMS}{
    name={Content Management System},
    description={My description comes here.}
}

\newacronym{conMan}{CMS}{\gls{CMS}}

\begin{document}

First use: \emph{\ac{conMan}}. Next use: \emph{\ac{conMan}}.

\printglossaries
\end{document}

Produces:

Image of resulting document

Edit: To make glossary entries bold and acronyms not bold:

\documentclass{article}

\usepackage[acronym,shortcuts]{glossaries}

\renewcommand*{\CustomAcronymFields}{%  
  name={\the\glslongtok},%  
  symbol={\the\glsshorttok},%  
  text={\textmd{\the\glsshorttok}},%  
  first={\the\glslongtok\space\textmd{(\the\glsshorttok)}},%  
  firstplural={\the\glslongtok\noexpand\acrpluralsuffix\space\textmd{(\the\glsshorttok)}},%  
  plural={\textmd{\the\glsshorttok}\noexpand\acrpluralsuffix}%  
} 

\SetCustomStyle 

\renewcommand*{\glstextformat}[1]{\textbf{#1}} 

\makeglossaries

\newglossaryentry{CMS}{
    name={Content Management System},
    description={My description comes here.}
}

\newacronym{conMan}{CMS}{\gls{CMS}}

\begin{document}

First use: \emph{\ac{conMan}}. Next use: \emph{\ac{conMan}}.

Reset\glsreset{conMan}. Now without the emphasis:

First use: \ac{conMan}. Next use: \ac{conMan}.

\printglossaries
\end{document}

If you don't want the acronym affected by the surrounding font (such as \emph in the above example), replace \textmd with \textnormal in the \CustomAcronymFields definition.

Result:

Image of result

Edit:

In this example below, I've defined a new command called \newglosacr for the acronyms that also have entries in the glossary. The acronyms are emphasized and the glossary terms are in bold:

% arara: pdflatex
% arara: makeglossaries
% arara: pdflatex
% arara: makeglossaries
% arara: pdflatex

\documentclass{article}

\usepackage[pdfborder={0 0 0}]{hyperref}
\usepackage[acronym,shortcuts]{glossaries}

\renewcommand*{\acronymfont}[1]{\emph{\mdseries #1}}

\renewcommand*{\glstextformat}[1]{\textbf{#1}} 

\renewcommand*{\CustomAcronymFields}{%  
  name={\noexpand\acronymfont{\the\glsshorttok}},%  
  sort={\the\glsshorttok},%  
  symbol={\the\glsshorttok},%  
  text={\noexpand\acronymfont{\the\glsshorttok}},%  
  first={\textmd{\the\glslongtok}\space
           \noexpand\acronymfont{(\the\glsshorttok)}},%  
  firstplural={\textmd{\the\glslongtok\noexpand\acrpluralsuffix}\space
    \noexpand\acronymfont{(\the\glsshorttok)}},%  
  plural={\noexpand\acronymfont{\the\glsshorttok}\noexpand\acrpluralsuffix},%  
  description={\the\glslongtok}
} 

\SetCustomStyle 

\makeglossaries

% Glossary entries

\newglossaryentry{CMS}{
    name={Content Management System},
    description={My description comes here}
}

\newglossaryentry{webapp}{name={Web-App},
  description={Description here}
}

% Acronyms without links to glossary

\newacronym{th}{TH}{Technical Highschool}

% Acronyms with links to glossary

% syntax: \newglosacr[options]{new acr label}{acronym}{referenced gls label}
\newcommand{\newglosacr}[4][]{%
  \newacronym[description={\gls{#4} (see
     glossary)},#1]{#2}{#3}{\glsentryname{#4}}%
}

\newglosacr{conMan}{CMS}{CMS}

\begin{document}

First use: \ac{conMan}. Next use: \ac{conMan}.

First use: \ac{th}. Next use: \ac{th}.

Term without acronym: \gls{webapp}.

\printglossaries
\end{document}

I've added the hyperref package to the example so you can hyperlink to the glossary. I don't know if you want that or not. Since the glossary entry CMS is only used in the list of acronyms, not in the main text, you need to repeat the LaTeX + makeglossaries steps. I've added some arara directives at the top of the example code as a reminder, but you can ignore them if you don't want to use it.

Result:

Image of resulting document

  • I added a further description to my question. i hope this helps! – tellob May 5 '13 at 18:30

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.