我正在尝试在 Latex 中创建一个满足以下特征的文档:
- 每章的第一页,无页眉和正文。
- 所有其他页面均带有各自的页眉和页脚。
但是下面的代码只满足第一个特征,而我想要同时满足 1 和 2。我做错了什么?
\documentclass[12pt,a4paper,twoside]{book}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage{blindtext}
\usepackage{graphicx}
\usepackage{makeidx}
\usepackage{appendix}
\usepackage{float}
\usepackage{listings}
\usepackage{acronym}
\usepackage{eurosym}
\usepackage[bookmarks=true, pdfborder={0 0 0}]{hyperref}
\usepackage[usenames,dvipsnames]{color}
\usepackage{xcolor}
\usepackage{fancyhdr}
% First page of each chapter
\fancypagestyle{plain}{
\fancyhead[L]{}
\fancyhead[C]{}
\fancyhead[R]{}
\fancyfoot[L]{}
\fancyfoot[C]{}
\fancyfoot[R]{}
\renewcommand{\headrulewidth}{0pt}
}
\fancyhf{}
\fancyhead[LO]{\rightmark}
\fancyhead[RO]{\thepage}
\fancyhead[LE]{\thepage}
\fancyhead[RE]{\leftmark}
\pagestyle{fancy}
\title{Test 1}
\author{Just me\\ \texttt{[email protected]}}
\oddsidemargin=15pt
\evensidemargin=15pt
\setlength{\textwidth}{5.7in}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\begin{document}
\renewcommand{\bibname}{bibliography}
\include{p1}
\newpage{\pagestyle{empty}\cleardoublepage}
\include{thanks}
\newpage{\pagestyle{empty}\cleardoublepage}
\include{summary}
\tableofcontents
\thispagestyle{empty}
\listoffigures
\thispagestyle{empty}
\cleardoublepage
\include{p2}
\newpage{\pagestyle{empty}\cleardoublepage}
\renewcommand{\baselinestretch}{1}
\renewcommand{\appendixname}{Anexo}
\renewcommand{\appendixtocname}{Anexo}
\renewcommand{\appendixpagename}{Anexo}
\lhead[\thepage]{CHAPTER \thechapter. \rightmark}
\rhead[CHAPTER \thechapter. \leftmark]{\thepage}
\include{ch1}
\include{ch2}
\end{document}
非常感谢您的帮助。问候。
编辑:“p1”的代码
%p1
\pagestyle{空}
\renewcommand{\baselinestretch}{1.3}
\开始{中心}
\large
\textbf{\textcolor{BrickRed}{some title}}\\
\textbf{\textcolor{Sepia}{type of project}}\\
\huge
\textbf{\textcolor{NavyBlue}{Wonderful Project Name}}
\normalsize
\begin{figure}[H]
\centering
\includegraphics[scale=0.08]{figures/logo1.png}
\label{uv}
\end{figure}
\textbf{AUTHOR: \textcolor{Blue}{Just me}}
\textbf{TUTORING: \textcolor{Blue}{Charles Parrish, Maximum Codus Serratus}}
\large
\textbf{2015}
\begin{figure}[H]
\centering
\includegraphics[scale=0.5]{figures/school1.png}
\label{school}
\end{figure}
\结束{中心}