Bibliographie/Inhaltsverzeichnis hat Kapitel in der Kopfzeile

Bibliographie/Inhaltsverzeichnis hat Kapitel in der Kopfzeile
\documentclass[12pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{booktabs}
\usepackage{array}
\usepackage{tabularx}
\usepackage{caption} 
\captionsetup[table]{skip=10pt}
\renewcommand{\arraystretch}{1.4}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{adjustbox}
\usepackage{rsc}
\usepackage{graphicx}
\usepackage{setspace}
\linespread{1.25}
\UseRawInputEncoding
\usepackage{geometry}
    \geometry{
    a4paper,
    left=40mm,
    right=20mm,
    top=40mm,
    bottom=50mm
    }
%header settings
\usepackage{fancyhdr}
\pagestyle{fancy}
   \fancyhf{}
\makeatletter
% copy of the original from report.cls with the \MakeUppercase dropped
\renewcommand{\chaptermark}[1]{
  \markboth
    {\ifnum \c@secnumdepth >\m@ne
       \@chapapp\ \thechapter. 
      \fi
     #1}
    {}}
\makeatother

\usepackage{etoolbox}
\patchcmd{\tableofcontents}
  {\MakeUppercase}
  {}
  {}{}
\patchcmd{\tableofcontents}
  {\MakeUppercase}
  {}
  {}{}

\patchcmd{\thebibliography}
  {\MakeUppercase}
  {}
  {}{}
\patchcmd{\thebibliography}
  {\MakeUppercase}
  {}
  {}{}

\fancyhead[L]{\itshape\leftmark}
\fancyhead[R]{\itshape Keiran Corbett}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
  \setlength{\headheight}{15pt}
  \setlength{\footskip}{50pt}  %page number spacing
\begin{document}
    \tableofcontents
    \chapter{Example chapter title}
     \newpage
     text
    \chapter{Example chapter title}
    \chapter{Example chapter title}
    \chapter{Example chapter title}
    \chapter{Example chapter title}
    \chapter{Example chapter title}
    \chapter{Example chapter title}
    \chapter{Example chapter title}
    \chapter{Example chapter title}
    \chapter{Example chapter title}
    \chapter{Example chapter title}
    \chapter{Example chapter title}
    \chapter{Example chapter title}
    \chapter{Example chapter title}
    \chapter{Example chapter title}
    \chapter{Example chapter title}
    \chapter{Example chapter title}
    \chapter{Example chapter title}
    \chapter{Example chapter title}
    \end{document}

Mit diesem Befehl sieht es so aus, wie ich es möchte, aber ich habe ein Inhaltsverzeichnis und die Überschrift dafür ist Kapitel 0. INHALT

Ich habe also zwei Fragen: 1. Wie mache ich, dass INHALT nicht groß geschrieben wird? 2. Wie kann ich das Kapitel entfernen (nur für Bibl. und Inhaltsbereich)

Bibliographie hat auch das gleiche Problem

Ein Beispiel dafür, wie es aussehen sollte, finden Sie auf Seite 4 der Beispiel-Latex-Datei

Antwort1

Ich schlage eine kleine Änderung vor, \chaptermarksodass \leftmarkdie gesamte Überschrift („Kapitel 1. Beispielkapiteltitel“) und nicht nur der Kapiteltitel („Beispielkapiteltitel“) enthalten ist. Das macht es \fancyhead[L]einfacher und weniger anfällig für falsche Kapitelnummern.

Für eine schöne Überschrift im Inhaltsverzeichnis und in der Bibliographie habe ich keine bessere Möglichkeit gefunden, als die Befehle direkt zu patchen. Siehe zum BeispielÜberschriften von ToC und fancyhdr.

memoiroder die KOMA-Klassen hätten hierfür bequemere Schnittstellen.

\documentclass[12pt,a4paper]{report}

\usepackage{fancyhdr}
\pagestyle{fancy}
   \fancyhf{}

\makeatletter
% copy of the original from report.cls with the \MakeUppercase dropped
\renewcommand{\chaptermark}[1]{%
  \markboth
    {\ifnum \c@secnumdepth >\m@ne
       \@chapapp\ \thechapter. %
      \fi
     #1}
    {}}
\makeatother

\usepackage{etoolbox}
\patchcmd{\tableofcontents}
  {\MakeUppercase}
  {}
  {}{}
\patchcmd{\tableofcontents}
  {\MakeUppercase}
  {}
  {}{}

\patchcmd{\thebibliography}
  {\MakeUppercase}
  {}
  {}{}
\patchcmd{\thebibliography}
  {\MakeUppercase}
  {}
  {}{}

\fancyhead[L]{\itshape\leftmark}
\fancyhead[R]{\itshape NAME}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
  \setlength{\headheight}{15pt}


\begin{document}
\tableofcontents
\chapter{Example chapter title}
lorem
\newpage
ipsum
\newpage
dolor
\newpage
sit
\newpage
amet.
\chapter{Example chapter title}
\chapter{Example chapter title}
\chapter{Example chapter title}
\chapter{Example chapter title}
\chapter{Example chapter title}
\chapter{Example chapter title}
\chapter{Example chapter title}
\chapter{Example chapter title}
\chapter{Example chapter title}
\chapter{Example chapter title}
\chapter{Example chapter title}
\chapter{Example chapter title}
\chapter{Example chapter title}
\chapter{Example chapter title}
\chapter{Example chapter title}
\chapter{Example chapter title}
\chapter{Example chapter title}
\chapter{Example chapter title}

\nocite{*}
\bibliographystyle{plain}
\bibliography{xampl}
\end{document}

Screenshot der zweiten Seite des Inhaltsverzeichnisses. In der Überschrift steht links nur „Inhalt“

Screenshot der zweiten Seite der Bibliographie. Auf der linken Seite der Kopfzeile steht „Bibliographie“.


Das rscPaket wird geladen natbibund ändert dadurch den Schriftsatz der Bibliographieüberschrift geringfügig. In diesem Fall müssen Sie den Befehl patchen \bibsectionund nicht \thebibliography.

Hinzufügen

\patchcmd{\bibsection}
  {\MakeUppercase}
  {}
  {}{}
\patchcmd{\bibsection}
  {\MakeUppercase}
  {}
  {}{}

zu Ihrer Präambel.

verwandte Informationen