Page LayoutHeader Font in ToC and Bibliography

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
the_blue_note
Posts: 15
Joined: Mon Oct 24, 2011 9:38 pm

Header Font in ToC and Bibliography

Post by the_blue_note »

Hello to all,
I'm about to finish formatting my document. However there is still a thing I would like to fix. I'm using for the chapters headers this font \usefont{OT1}{phv}{b}{n}, and I display the chapter name on left pages and the section name on the right ones.
However, the header of both the TOC and The Bibliography are roman smallcaps and I've no idea how can this be changed..
So my question is: is there any way to change the font on the TOC and bibliography to the same one that I'm using on the chapters heads?
Many thanks in advance for your help and time.
Cheers,
Pablo
Last edited by the_blue_note on Tue Nov 01, 2011 7:49 pm, edited 1 time in total.

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

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: Header Font in ToC and Bibliography

Post by Stefan Kottwitz »

Hi Pablo,

sure, that's possible, for example using class features, or the titlesec package, or redefining the macro \@makeschapterhead. Which one to choose, depends on your document. You did not tell us your class yet and how you modify the chapter headings.

Stefan
LaTeX.org admin
the_blue_note
Posts: 15
Joined: Mon Oct 24, 2011 9:38 pm

Re: Header Font in ToC and Bibliography

Post by the_blue_note »

Stefan,
many thanks for your fast answer. As a matter of fact, I'm using a template PhDtemplateLatex I found in http://openwetware.org/wiki/LaTeX_templ ... PhD_thesis. You probably know it. It's quite useful for newbies like me. In any case, I cannot find any documentclass line. I guess it defines its own.

The lines I changed to tweak the chapter heads are:
\renewcommand{\chaptermark}[1]{\markboth{\usefont{OT1}{phv}{b}{n}\selectfont{\thechapter. #1 }}{}}
\renewcommand{\sectionmark}[1]{\markright{\usefont{OT1}{phv}{m}{n}\selectfont\thesection\ #1}}
Originally they were small caps and quite big. The problem is that I do not know if these lines exist for TOC or bibliography nor where to find them.

Millions of thanks for your help and time!
Pablo
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Header Font in ToC and Bibliography

Post by Stefan Kottwitz »

You could call \markboth (or \markright) manually before the TOC or bibliography, respectively, or at the beginning. Such as

Code: Select all

\cleardoublepage
\markboth{...}{...}
\tableofcontents
or

Code: Select all

\addtocontents{toc}{\protect\markboth{...}{...}}
at the beginning.

Stefan
LaTeX.org admin
the_blue_note
Posts: 15
Joined: Mon Oct 24, 2011 9:38 pm

Re: Header Font in ToC and Bibliography

Post by the_blue_note »

Stefan,
thanks a lot! It worked like clockwork for the TOC, LOF and LOT. I'm almost there, but I'm still unable to do the same for the bibliography and the alphabetical index. Is it possible to tweak those ones too?
Thanks! Cheers,
Pablo
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Header Font in ToC and Bibliography

Post by Stefan Kottwitz »

Yes, that's possible. I could show it if you show a minimal working example representing your current code.

Stefan
LaTeX.org admin
the_blue_note
Posts: 15
Joined: Mon Oct 24, 2011 9:38 pm

Re: Header Font in ToC and Bibliography

Post by the_blue_note »

Hi again,
I finally got to do it placing the line \markboth{...}{...} inside the bib file and the index file.
Thanks a lot for your help! Cheers,
Pablo
Post Reply