Page LayoutHeader Title in my Acronyms is wrong.

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Etiene
Posts: 2
Joined: Fri Jul 29, 2011 11:42 am

Header Title in my Acronyms is wrong.

Post by Etiene »

I've managed to fix the problem by editing the .acr and .gls files to replace

Code: Select all

\glossarytitle
with the desired heading on the first line of each of file.

It seems I'll need to do the same every time I run makeglossaries though, so this isn't really a permanent solution...

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

ougka
Posts: 43
Joined: Wed Jan 19, 2011 5:02 pm

Header Title in my Acronyms is wrong.

Post by ougka »

Etiene wrote:I've managed to fix the problem by editing the .acr and .gls files to replace

Code: Select all

\glossarytitle
with the desired heading on the first line of each of file.

It seems I'll need to do the same every time I run makeglossaries though, so this isn't really a permanent solution...
yes, this is far from ideal... I haven't yet found a solution to naming the header of my acronyms yet...

It shouldn't be that hard :(
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

Header Title in my Acronyms is wrong.

Post by nlct »

If you're not using a language package (such as babel) you can change the name of the main glossary by redefining \glossaryname. For example:

Code: Select all

\documentclass{book}

\usepackage[toc]{glossaries}

\makeglossaries

\renewcommand{\glossaryname}{List of Acronyms}

\newglossaryentry{sample}{name=sample,description=sample}

\begin{document}
\tableofcontents

\chapter{Sample}
\gls{sample}

\printglossaries

\end{document}
If you are using babel and translator packages, you need to define a custom dictionary file with the replacement text or use the "translate=false" package option and redefine \glossaryname using babel's hook mechanism. For example:

Code: Select all

\documentclass[english]{book}

\usepackage{babel}
\usepackage[toc,translate=false]{glossaries}

\makeglossaries

\addto\captionsenglish{%
  \renewcommand{\glossaryname}{List of Acronyms}
}

\newglossaryentry{sample}{name=sample,description=sample}

\begin{document}
\tableofcontents

\chapter{Sample}
\gls{sample}

\printglossaries

\end{document}
See section 1.2 of the glossaries user manual for further details.

Regards
Nicola Talbot
ougka
Posts: 43
Joined: Wed Jan 19, 2011 5:02 pm

Re: Header Title in my Acronyms is wrong.

Post by ougka »

Nicola you are ace!!!

As you would notice I was looking for a solution to this for months and I would have never ever guessed that glossaries was conflicting with babel.

So I did at the add the translate=false and it worked! I had the \renewcommand{\glossaryname}{List of Acronyms} already!

I didn't have to do the \addto\captionsenglish at all..In fact when I do it, it doesn't work.

Many many thanks!
Post Reply