Вот я сталкиваюсь с тем, что в заголовке оглавления появляется лишний текст. Как решить эту проблему? Вот мой 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}
Выходные данные вышеуказанного MWE показаны ниже.
Но когда я меняю формат бумаги на A4, все отображается правильно, как показано ниже.
Как мне получить исправленную страницу, не меняя размеры бумаги?
решение1
Это легко решается. Просто поставьте \thispagestyle{empty}
или \thispagestyle{plain}
перед командой \tableofcontents
. Это текст в заголовке, который перекрывает заголовок, потому что у вас такой узкий заголовок.
Я не стал повторять весь ваш код, я только скопировал фрагмент, где нужно ввести команду. Конечно, вы можете сделать то же самое более изощренными способами.
Однако я рекомендую вам вместо всех этих хакерских манипуляций с классом книги использовать такой класс, какscrbookотКОМА-скрипт, где вы можете вносить все изменения с помощью встроенных команд. Тогда вы избежите всех несовместимостей, с которыми столкнетесь.
Если вы предпочитаете оригинальный bookclass, я рекомендую вам использовать комплект пакетов от того же автора. Авторперечислять,Хавьер Безос Лопес, также создала превосходные пакеты, которые изменяют стили страниц, заголовки, оглавленияи т. д.. Посмотри натитулы(управление стилем страницы),титулсек(альтернативные названия разделов) иtitletoc(альтернативные заголовки для 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