
\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章です。CONTENTS
質問が2つあります。1. CONTENTSを大文字にしないにはどうしたらいいですか。2. Chapterを削除するにはどうしたらいいですか(bibとcontentsセクションのみ)
書誌学にも同じ問題がある
サンプルLaTeXファイルの4ページ目に、どのように表示されるかの例があります。
答え1
章タイトル (「章タイトルの例」) だけではなく、ヘッダー全体 (「第 1 章。章タイトルの例」) が含まれる\chaptermark
ように少し変更することをお勧めします。これにより、よりシンプルになり、章番号が誤っている可能性が低くなります。\leftmark
\fancyhead[L]
目次と参考文献の見出しをきれいにするには、コマンドを直接パッチするより良い方法は見つかりませんでした。例えば、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}
パッケージrsc
がロードされ、参考文献の見出しの組版がわずかに変更されます。その場合は、 ではなくnatbib
コマンドにパッチを適用する必要があります。\bibsection
\thebibliography
追加
\patchcmd{\bibsection}
{\MakeUppercase}
{}
{}{}
\patchcmd{\bibsection}
{\MakeUppercase}
{}
{}{}
あなたの序文に。