為什麼在章節之後插入分頁符號?

為什麼在章節之後插入分頁符號?

我的問題是在章節、某些章節和目錄之後插入分頁符號和水平線。我已經包含了所有程式碼,因為我不知道它的哪一部分導致了問題或原因。

\documentclass[letterpaper]{book}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\usepackage{helvet}
\usepackage{wrapfig}
\usepackage[letterpaper, top=4cm, bottom=2.5cm, left=4cm, right=2.5cm]{geometry}
\usepackage{setspace}
\doublespacing
\usepackage[pdftex]{graphicx}
\renewcommand{\familydefault}{\sfdefault}
\pagestyle{fancyplain}
\fancyhf{}
\fancyfoot[R]{\thepage}
\rfoot{\thepage}
\addto\captionsspanish{\renewcommand*\contentsname{TABLA DE CONTENIDOS}}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}

\begin{document}
\frontmatter
%\input{./title.tex}
\tableofcontents
\mainmatter
\section*{MySection}
\addcontentsline{toc}{subsection}{Preface}
\chapter{Introduction}
\section{MySection}
\section{MySection}
\section{MySection}
\subsection{subsect}
Lorem  ipsum  dolor  sit  amet,  consectetuer  adipiscing  
elit.   Etiam  lobortisfacilisis sem.  Nullam nec mi et 
neque pharetra sollicitudin.  Praesent imperdietmi nec ante. 
Donec ullamcorper, felis non sodales
\chapter{Chapter2}
\appendix
\chapter{Reproducible Research}
\end{document}

這裡是一個即時文檔。

答案1

這些線用於分隔頁面標題和文字。您可以將其寬度設為 0 來停用它們:

\renewcommand{\headrulewidth}{0pt}

它由包設定fancyhdr。預設情況下,它們在「特殊」頁面上被停用,例如使用不同格式的目錄或章節的第一頁。

插入空白頁是因為每個章節都應從右頁開始。如果您想停用此功能(您確實不應該這樣做),請使用以下openany選項:

\documentclass[letterpaper,openany]{book}

你不應該section沒有 a chapter,因為那沒有意義(你的第一個section*)。

相關內容