mbredel / thesis-template

A LaTeX template for Bachelor and Master thesis
GNU General Public License v3.0
86 stars 83 forks source link

Incorrect chapter name in header when including ToC (with workaround) #25

Open paddomanno opened 8 months ago

paddomanno commented 8 months ago

Hello everyone! I would like to highlight a small issue and provide a workaround for it. The problem originates from the original classicthesis project and is described there in an issue.

Problem: In my LaTeX project based on the classicthesis template, the header on each page incorrectly displays "Contents" instead of the actual chapter. This behavior occurs when the table of contents (\tableofcontents) is inserted but none of the lists of figures, listings, tables, or acronyms.

Solution: Manually add \automark[section]{chapter} to thesis.tex. In my case, placing it here resolved the issue:

thesis.tex

...
\cleardoublepage\include{frontbackmatter/Contents}

% Uncomment these if not needed (i.e., less than 3-5, of figures, tables, listings, and acronyms.)
% \cleardoublepage\include{frontbackmatter/Figures}
% \cleardoublepage\include{frontbackmatter/Tables}
% \cleardoublepage\include{frontbackmatter/Listings}
% \cleardoublepage\include{frontbackmatter/Acronyms}
\automark[section]{chapter} % add this line
...