Text FormattingSection* title in header

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Zoran S
Posts: 9
Joined: Thu Dec 11, 2014 6:20 am

Section* title in header

Post by Zoran S »

In class book, when I made a section* with an asterisk (that is, a non-numbered section), its title does not appear in the header. There is still the title of the previous section (which is a regular one, so without *). How to make the title of a non-numbered section to be in the header?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Section* title in header

Post by Johannes_B »

Hi and welcome,

that depends on the basic setup, which is not shown. My first guess would be setting it by hand by using \markright{section title}. I haven't tested this though.

If you want to have the section title in the table of contents as well, there is a simpler solution. Try out unnumberedtotoc.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Section* title in header

Post by Stefan Kottwitz »

Yes, \markright{section title} or \markboth{section title}{section title} would fix it. Of course it should go at the desired place within the document.

Genereally I prefer KOMA-Script classes, they provide a command \addsec for this purpose.

Stefan
LaTeX.org admin
Post Reply