![目次の見出しに余分なテキストがあるのはなぜか](https://rvso.com/image/405364/%E7%9B%AE%E6%AC%A1%E3%81%AE%E8%A6%8B%E5%87%BA%E3%81%97%E3%81%AB%E4%BD%99%E5%88%86%E3%81%AA%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%8C%E3%81%82%E3%82%8B%E3%81%AE%E3%81%AF%E3%81%AA%E3%81%9C%E3%81%8B.png)
ここで、目次の見出しに余分なテキストが表示されています。どうすれば問題を解決できますか?これが私のMWEです
\documentclass[twoside,8pt,openany]{book}
\usepackage[inner=1cm,outer=0.5cm,paperheight=9.5in,paperwidth=6.3in]{geometry}
\usepackage[T1]{fontenc}
\usepackage{titletoc} %%% Table of contents
\usepackage{ebgaramond}
\usepackage{lipsum}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{paracol}
\usepackage{microtype}
\usepackage{graphicx}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[RO,LE]{\rightmark}
\fancyhead[LE,RO]{\leftmark} %% display chapter in header
\renewcommand{\headrulewidth}{.5pt}
\fancyhead[C]{\thepage} %% To display numbering on every page alternately left and right
\setlength{\headwidth}{\textwidth}
\setlength{\headheight}{15pt}
\setlength{\headsep}{0pt}
\setlength{\columnseprule}{0pt}
\usepackage[colorlinks, unicode]{hyperref}
%%%% End Add
\makeatletter
\newcommand\versenumcolor{red}
\newcommand\chapnumcolor{red}
\renewcommand\paragraph{%
\@startsection{paragraph}{4}{\z@}%
{.25ex \@plus.25ex \@minus.1ex}%
{-.5em}%
{\normalfont\normalsize\bfseries\color{\versenumcolor}}}%
\newlength{\biblechapskip}
\setlength{\biblechapskip}{1em plus .33em minus .2em}
\newcounter{biblechapter}
\newcounter{bibleverse}[biblechapter]
\renewcommand\chaptername{Book}
\let\ltx@chapter=\chapter
\let\ltx@paragraph=\paragraph
\newcommand{\book}[1]{%
\gdef\currbook{#1}
\ltx@chapter{#1}}
\newcount\biblechap@svdopt
\newenvironment{biblechapter}[1][\thebiblechapter]
{\biblechap@svdopt=#1
\ifnum\c@biblechapter=\biblechap@svdopt\else
\advance\biblechap@svdopt by -1\fi
\setcounter{biblechapter}{\the\biblechap@svdopt}
\refstepcounter{biblechapter}
\lettrine{\color{\chapnumcolor}\lower-6pt\hbox{\thebiblechapter}}{}\ignorespaces}
{\vspace{\biblechapskip}}
\renewcommand{\verse}[1][\thebibleverse]{%
\refstepcounter{bibleverse}
\markright{{\scshape\currbook} \thebiblechapter:\thebibleverse}
\ifnum\c@bibleverse=1\else
\ltx@paragraph*{#1}\fi}%
\makeatother
\newcounter{jChapter}
\newcommand{\jverse}[1]{\noindent{\fontsize{11}{30}\selectfont\color{cyan}\textbf{#1\hspace{1.0mm}}\noindent}\markboth{\scshape \currbook\ \thejChapter : #1}{} }
\newcommand{\jChapter}[1]{
\setcounter{jChapter}{#1}
\noindent{\fontsize{27}{30}\selectfont\color{red}\textbf{#1}}\markboth{\scshape \currbook\ \thejChapter : 1}{}%\vspace{-5mm}
}
\newcommand{\story}[1]{\vfill\noindent\parbox[t]{\columnwidth}{\centering\it\color{blue}\textbf{#1}}}% \centering contained within \parbox
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\storygap}{\vfill\ensurevspace{3\baselineskip}\switchcolumn*}% paracol specific code
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{\fontsize{30}{30}\selectfont\textbf{KARBI - NRSV PARALLEL BIBLE}}
\date{}
\author{}
\usepackage{lipsum}
\usepackage{ragged2e}
\newcommand{\BookLine}{ \centering\noindent\rule{19cm}{1pt}}
\newcommand{\BookNote}[1]{{\begin{center} \textbf{KEPACHINI} \justify
#1
\end{center}
\BookLine
\vspace{2mm}
}}
\newcommand{\ParallelLText}[2]{\switchcolumn[0] #1\par \switchcolumn[1] #2\par \switchcolumn*}
\usepackage[perpage]{footmisc} %%% To restart footnote numbering on every new pages
\usepackage{multicol,etoolbox}
\setcounter{tocdepth}{2} %set depth of printed table of contets.
\makeatletter
\patchcmd{\l@section}
{\hfil}
{\leaders\hbox{\normalfont$\m@th\mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill}
{}{}
\renewcommand\tableofcontents{%
\begin{multicols}{2}[\section*{\contentsname
\@mkboth{%
\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}]%
\printlist{toc}{}{}
\thispagestyle{empty}
\end{multicols}%
}
\makeatother %print dots in sections in toc.
%%% Command to make uppercase for every first letter
\usepackage{mfirstuc}
\MFUnocap{are}
\MFUnocap{or}
\MFUnocap{etc}
\newcommand{\athepi}{\textbf{\capitalisewords{Athepi Alamthe Hei Hei}}\\}
\usepackage{enumitem}
\usepackage{transparent}
\begin{document}
\renewcommand{\thefootnote}{\emph{\alph{footnote}}}
\frontmatter
\maketitle
{\setlength{\columnsep}{130pt}
\renewcommand{\contentsname}{\hfill\Huge Kechejok Barim\hfill~\\[2.5ex] }
\startlist{toc}
\hypersetup{linkcolor=blue}
\tableofcontents
}
\mainmatter
{\pagenumbering{gobble}
\part*{\scshape Kechejok Barim}
}
\pagenumbering{arabic}
\setlength{\columnseprule}{0.5pt}
\setcounter{page}{1}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\book{Kecheng}
\end{document}
しかし、用紙のフォーマットをA4用紙サイズに変更すると、以下のように正しく表示されます。
用紙サイズを変更せずに修正されたページを取得するにはどうすればよいですか?
答え1
これは簡単に解決できます。コマンドの前に\thispagestyle{empty}
または を置くだけです。ヘッダーが非常に狭いため、ランニング ヘッダー内のテキストがタイトルと重なっています。\thispagestyle{plain}
\tableofcontents
コード全体を繰り返すことはせず、コマンドを入力する部分だけをコピーしました。もちろん、より洗練された方法で同じことを行うことができます。
しかし、bookクラスに施したハッキングの代わりに、次のようなクラスを使用することをお勧めします。スクラップブックからKOMA スクリプト、組み込みコマンドを使用してすべての変更を行うことができます。そうすれば、発生する可能性のあるすべての非互換性を回避できます。
オリジナルのブッククラスを好む場合は、同じ著者のパッケージバンドルを使用することをお勧めします。列挙項目、ハビエル・ベゾス・ロペスは、ページスタイル、見出し、目次を変更する優れたパッケージも作成しました。等。 見てタイトル(ページスタイルコントロール)、タイトル(代替セクションタイトル)およびタイトルtoc(toc/lof/lotの代替見出し)。そして最後に、色空間色が正しく印刷されることを希望する場合は、
\frontmatter
\maketitle
{\setlength{\columnsep}{130pt}
\renewcommand{\contentsname}{\hfill\Huge Kechejok Barim\hfill~\\[2.5ex] }
\startlist{toc}
\hypersetup{linkcolor=blue}
\thispagestyle{plain}\tableofcontents %% <--- Change code here
}
\mainmatter