LaTeX forum ⇒ GeneralGlossaries: format 1st entry different from subsequent ones?

LaTeX specific issues not fitting into one of the other forums of this category.
danol
Posts: 7
Joined: Mon Sep 27, 2010 5:30 pm

Glossaries: format 1st entry different from subsequent ones?

Postby danol » Sat Jan 22, 2011 12:39 pm

Hello,

I'm using the glossaries package:

http://www.tex.ac.uk/tex-archive/macros ... begin.html
http://www.tex.ac.uk/tex-archive/macros ... anual.html

I see that I can change the format of all entries with e.g.

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


- for bold entries. Question: I want the first entry in bold, and subsequent entries formated as normal. Does anyone happen to know a way I can do this? I can't find an option for altering the format of the two separately.

Thanks,

Dan
Last edited by cgnieder on Sat Feb 09, 2013 9:43 pm, edited 1 time in total.
Reason: added code markup

Tags:

User avatar
nlct
Posts: 266
Joined: Thu Nov 06, 2008 11:15 am
Contact:

Postby nlct » Sat Feb 09, 2013 9:38 pm

You could try redefining \glsdisplayfirst:
  1. \documentclass{article}
  2.  
  3. \usepackage{glossaries}
  4.  
  5. \makeglossaries
  6.  
  7. \newglossaryentry{sample}{name={sample},description={an example}}
  8.  
  9. \renewcommand*{\glsdisplayfirst}[4]{\textbf{#1#4}}
  10.  
  11. \begin{document}
  12.  
  13. First: \gls{sample}. Next: \gls{sample}.
  14.  
  15. \printglossaries
  16.  
  17. \end{document}


Regards
Nicola Talbot


Return to “General”

Who is online

Users browsing this forum: No registered users and 10 guests