Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In the following example the acronym is not replaced properly in the header and look like in this screenshot:

enter image description here

\documentclass{book}
  \usepackage{fancyhdr}
  \usepackage[toc,nonumberlist]{glossaries}
  \pagestyle{fancy}
  \newacronym{VOIP}{VoIP}{Voice over IP}
  \makeglossaries
  \renewcommand{\glossarymark}[1]{}
\begin{document}
  \chapter{Sample Chapter \gls{VOIP}}
  text \gls{VOIP}
  \printglossaries
\end{document}

Can anybody help?

share|improve this question
    
Welcome to TeX.sx! You don't have to sign with your name since it automatically appears in the lower right corner of your post. –  Werner Aug 2 '12 at 6:49
add comment

2 Answers

Beside using the optional argument you can also use commands like \glsentrydesc (described the in documentation as "commands without links"):

   \documentclass{book}
      \usepackage{fancyhdr}
      \usepackage[toc,nonumberlist]{glossaries}
      \pagestyle{fancy}
      \newacronym{VOIP}{VoIP}{Voice over IP}
      \makeglossaries
      \renewcommand{\glossarymark}[1]{}
    \begin{document}
      \tableofcontents
      \chapter{Sample Chapter \glsentrydesc{VOIP} (\glsentrytext{VOIP})}
      text \gls{VOIP}
      \printglossaries
    \end{document}
share|improve this answer
    
thanks you safed my day :-) –  gregor2005 Aug 3 '12 at 7:08
    
The problem with this is it does not work with the smallcaps option with glossaries since \glsentrytext gives \textsc{Voip} as a string. Any work arounds? –  Mobius Pizza Oct 26 '12 at 10:37
add comment

I would suggest using the "short/ToC title" of the \chapter command to obtain a more appropriate header: \chapter[Sample Chapter VOIP]{Sample Chapter \gls{VOIP}}

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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