LaTeX forum ⇒ Fonts & Character SetsGlossaries: abbreviation names in bold

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Matam
Posts: 29
Joined: Thu Jun 07, 2018 12:12 pm

Glossaries: abbreviation names in bold

Postby Matam » Fri Jun 08, 2018 12:58 pm

One more help. Please, observe contents in the List of Abbreviations.
Abbreviation is normal font. But, the first letter of each word is in Bold. So, I want the abbreviations in bold.

Example: the first line is in my PDF is
BOP Best Output Power

But, I want
BOP (some gap here) Best Output Power

User avatar
Stefan Kottwitz
Site Admin
Posts: 8905
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Fri Jun 08, 2018 2:03 pm

Try this:

\renewcommand{\glsnamefont}[1]{\textbf{#1}}

Stefan
Site admin

Matam
Posts: 29
Joined: Thu Jun 07, 2018 12:12 pm

Postby Matam » Sat Jun 09, 2018 8:07 am

I added the code. But, it did not work. The issue remained same.

THe code is:

  1. % List of Abbreviations
  2. \cleardoublepage
  3. \renewcommand{\glossarysection}[2][]{\chapter*{#1}}
  4. \markboth{List of Abbrevations}{List of Abbrevations}
  5. \addcontentsline{toc}{chapter}{List of Abbrevations}
  6. \printglossary[title=List of Abbreviations,type=\acronymtype]
  7. \renewcommand{\glsnamefont}[1]{\makefirstuc{#1}}
  8. \renewcommand{\glsnamefont}[1]{\textbf{#1}}

User avatar
Stefan Kottwitz
Site Admin
Posts: 8905
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sat Jun 09, 2018 3:09 pm

Put \renewcommand{\glsnamefont}[1]{\textbf{#1}} before \printglossary, not afterwards.

Stefan
Site admin

Matam
Posts: 29
Joined: Thu Jun 07, 2018 12:12 pm

Postby Matam » Sat Jun 09, 2018 6:37 pm

I tried this way also. It did not work.

Code is given below and screen shot is attached.
  1. % List of Abbreviations
  2. \cleardoublepage
  3. \renewcommand{\glossarysection}[2][]{\chapter*{#1}}
  4. \markboth{List of Abbrevations}{List of Abbrevations}
  5. \addcontentsline{toc}{chapter}{List of Abbrevations}
  6. \renewcommand{\glsnamefont}[1]{\textbf{#1}}
  7. \printglossary[title=List of Abbreviations,type=\acronymtype]
  8. \renewcommand{\glsnamefont}[1]{\makefirstuc{#1}}
Attachments
abbreBOLD.png
abbreBOLD.png (168.17 KiB) Viewed 143 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 8905
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun Jun 10, 2018 2:17 pm

It works for me. Check this complete example:

  1. \documentclass{report}
  2. \usepackage{glossaries}
  3. \newglossaryentry{test}{name=test, description={This is a test}}
  4. \makeglossaries
  5. \begin{document}
  6. This is a \gls{test}.
  7. \renewcommand{\glossarysection}[2][]{\chapter*{#1}}
  8. \renewcommand{\glsnamefont}[1]{\makefirstuc{\textbf{#1}}}
  9. \printglossary[title=List of Abbreviations,type=\acronymtype]
  10. \end{document}


Check your settings what is different. I see your names are written in italic shape (and uppercase) - where do you set this?

Stefan
Site admin

Matam
Posts: 29
Joined: Thu Jun 07, 2018 12:12 pm

Postby Matam » Sun Jun 10, 2018 4:51 pm

I have reinstalled my Textstudio and then executed the same code. It worked.
Please, find the attached screen shot. However, I need one more help: I want all the full abbreviations come in line. Example,


The code for List of Abbreviations is given below:

  1.  
  2. % List of Abbreviations
  3. \cleardoublepage
  4. \renewcommand{\glossarysection}[2][]{\chapter*{#1}}
  5. \markboth{List of Abbrevations}{List of Abbrevations}
  6. \addcontentsline{toc}{chapter}{List of Abbrevations}
  7. \renewcommand{\glsnamefont}[1]{\textbf{#1}}
  8. \printglossary[title=List of Abbreviations,type=\acronymtype]
  9. \renewcommand{\glsnamefont}[1]{\makefirstuc{#1}}
  10.  
  11.  
  12. \clearpage
  13. \pagenumbering{arabic}
  14.  
  15. \chapter{Introduction to solar PV systems and Dynamic PV arrays}
  16. \section{Introduction}
Attachments
abbreviationsLISTinLINE.png
abbreviationsLISTinLINE.png (74.99 KiB) Viewed 117 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 8905
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun Jun 10, 2018 5:01 pm

You could choose some of the tabular styles (longtable), see the glossaries manual, 15.1 Predefined Styles.

Stefan
Site admin

Matam
Posts: 29
Joined: Thu Jun 07, 2018 12:12 pm

Postby Matam » Sun Jun 10, 2018 5:38 pm

Thanks for the quick response about the new reference. I have checked the 15.1. They have not given how to use the code or Examples. I am bit poor in understanding those terminology. Could you help me with some code that would be fine. Please,


Return to “Fonts & Character Sets”

Who is online

Users browsing this forum: Baidu [Spider] and 0 guests