참고문헌/목차는 헤더에 장이 있습니다.

참고문헌/목차는 헤더에 장이 있습니다.
\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}

따라서 이 명령을 사용하면 원하는 대로 보이지만 목차가 있고 그 헤더는 0장입니다. 목차

그래서 두 가지 질문이 있습니다 1. CONTENTS를 대문자로 만들지 않는 방법 2. Chapter를 어떻게 없애나요 (턱받이와 내용 섹션에만 해당)

참고문헌에도 같은 문제가 있다

예제 라텍스 파일의 4페이지에 어떻게 보이는지에 대한 예가 있습니다.

답변1

장 제목("예제 장 제목")뿐만 아니라 전체 헤더("1장. 장 제목 예")를 포함 \chaptermark하도록 약간 변경하는 것이 좋습니다 . \leftmark이렇게 하면 \fancyhead[L]더 간단해지고 잘못된 장 번호에 덜 취약해집니다.

ToC와 참고문헌의 멋진 헤더를 위해 명령을 직접 패치하는 것보다 더 좋은 방법은 없었습니다. 예를 들어 참조ToC 및 fancyhdr의 헤더.

memoir또는 KOMA 클래스가 이를 위해 더 편리한 인터페이스를 가질 것입니다.

\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}

ToC의 두 번째 페이지 스크린샷. 헤더의 왼쪽에는 "Contents"만 표시됩니다.

참고문헌의 두 번째 페이지 스크린샷. 헤더의 왼쪽에는 "Bibliography"라고 표시됩니다.


패키지 rsc가 로드되어 natbib참고문헌 제목의 조판이 약간 변경됩니다. 이 경우에는 명령 \bibsection이 아닌 명령을 패치해야 합니다 \thebibliography.

추가하다

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

당신의 전문에.

관련 정보