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.

I have defined a lot of terms with the glossaries package and use them in my text with the \gls{} command. However, I'd like terms called with \gls{} to appear bold, so people know that it is a term defined in the glossary. What command do I have to renew and how to achieve this?

Thanks in advance,

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

The glossaries package offers the command \glstextformat to control the way the text is displayed, so you can write

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

or

\renewcommand*{\glstextformat}{\textbf}

in the preamble of your document.

share|improve this answer
    
I should have mentioned, I am using the glossaries package, didn't know that there was a previous version. –  Tim van Dalen Jun 19 '11 at 16:37
    
or even \renewcommand*{\glstextformat}{\textbf} which is even preferable, albeit a little hard to digest for beginners. –  egreg Jun 19 '11 at 16:37
add comment

I don't know whether \gls is your command or an external one, to whose definition you don't have easy access. If the latter, then you can do something like

\let\oldgls=\gls
\renewcommand\gls[1]{\textbf{\oldgls{#1}}}

(This sort of manipulation can be automated using patch.) If the former, then, rather than devoting a new command to it, you can just replace your definition

\newcommand\gls[1]{...}

by

\newcommand\gls[1]{\textbf{...}}
share|improve this answer
    
Oops, sorry, I missed the fact that you were using a specific package. My answer is about general fiddling with commands after their definition; G Medina's answer (tex.stackexchange.com/questions/21152/…) is a much better approach in your specific setting. –  L Spice Jun 19 '11 at 17:41
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.