
Wie fügt man eine Kopfzeile für das Inhaltsverzeichnis, das Abbildungsverzeichnis und das Tabellenverzeichnis der ersten Seite hinzu?
\documentclass[10pt,a4paper]{book}
%%%%%%%%%%%%Tikz%%%%
\usepackage[left=2cm,right=2cm,top=3.25cm,bottom=3cm]{geometry}
%%%%%%%%%%%%%%%%%%%%
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{%
\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{%
\markright{\thesection\ #1}}
\fancyhf{} % delete current header and footer
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{0.5pt} % space for the rule
\fancypagestyle{plain}{%
\fancyhead{} % get rid of headers on plain pages
\renewcommand{\headrulewidth}{0pt} % and the line
}
\renewcommand{\theequation}{\arabic{equation}}
\begin{document}
\tableofcontents
\listoffigures
\listoftables
\chapter{Cha}
\section{Sec}
\end{document}
Antwort1
Das Inhaltsverzeichnis usw. und verwenden Sie standardmäßig \chapter
den Seitenstil. Um das gewünschte Ergebnis zu erzielen, müssen Sie dies in Ihren Seitenstil für das Inhaltsverzeichnis usw. ändern, müssen dann aber den Stil auf seine ursprüngliche Definition zurücksetzen (es sei denn, Sie möchten natürlich Überschriften auf Ihren Seiten, was ich nicht mag). Hier ist eine überarbeitete Version Ihres MWE, die mehrseitige Inhaltsverzeichnisse berücksichtigt.plain
fancy
\chapter
plain
\chapter
% tocheaderprob.tex SE 560800
\documentclass[10pt,a4paper]{book}
%%%%%%%%%%%%Tikz%%%%
\usepackage[left=2cm,right=2cm,top=3.25cm,bottom=3cm]{geometry}
%%%%%%%%%%%%%%%%%%%%
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{%
\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{%
\markright{\thesection\ #1}}
\fancyhf{} % delete current header and footer
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{0.5pt} % space for the rule
\fancypagestyle{plain}{%
\fancyhead{} % get rid of headers on plain pages
\renewcommand{\headrulewidth}{0pt} % and the line
}
\renewcommand{\theequation}{\arabic{equation}}
\usepackage{comment}
\makeatletter
\let\ps@originplain\ps@plain % save definition of plain pagestyle
\makeatother
\addtolength{\textheight}{-0.6\textheight} % short pages
\begin{document}
\fancypagestyle{plain}{} % change plain pagestyle to fancy
\tableofcontents
\listoffigures
\listoftables
\clearpage % make sure LoT typesetting is finished
\makeatletter
\let\ps@plain\ps@originplain % revert plain style to the original
\makeatother
% lots of chapters for a multi-page ToC
\chapter{Cha}
Text
\section{Sec}
Text
\subsection{Subsec}
Text
\chapter{Cha}
Text
\section{Sec}
Text
\subsection{Subsec}
Text
\chapter{Cha}
Text
\section{Sec}
Text
\subsection{Subsec}
Text
\chapter{Cha}
Text
\section{Sec}
Text
\subsection{Subsec}
Text
\end{document}