我最近开始用 Latex 写一本书。这本书由同一作者的两本书组成,因此分为两部分。这是一个巨大的挑战,也出现了许多问题。我该如何让每一章都从奇数页开始,前面是空白页?我找不到允许我这样做的代码组合:
:甚至 | :奇怪的: |
---|---|
空白页 | 开始第1章 |
语料库第一章 | 第一章结束 |
空白页 | 开始第2章 |
和
甚至 | 奇怪的 |
---|---|
空白页 | 开始第1章 |
第一章结束 | 空白页 |
空白页 | 开始第2章 |
我实际使用的文本结构:
\documentclass[10pt]{book}
\usepackage[width=3.93in, height=6.49in, top=1.0in, papersize={5.5in,8.2in}]{geometry}
\makeatletter\@addtoreset{chapter}{part}\makeatother%
\usepackage[english]{babel}
\usepackage[pdftex]{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tipa}
\usepackage{setspace}
\usepackage [utf8]{inputenc}
\usepackage{subfiles}
\usepackage{textcomp}
\usepackage{blindtext}
\renewcommand{\thechapter}{\Roman{chapter}}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{xpatch}
\usepackage{blindtext}
\makeatletter
\renewcommand\part{%
\if@openright
\cleardoublepage
\else
\clearpage
\fi
\thispagestyle{empty}%
\if@twocolumn
\onecolumn
\@tempswatrue
\else
\@tempswafalse
\fi
\null\vfil
\secdef\@part\@spart}
\makeatother
%%%%%% CENTERED CHAPTER%%%%%%%
\usepackage{sectsty}
\chapterfont{\Large \centering}
\sectionfont{\normalsize \centering}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\fancyhf{}
\lfoot[\thepage]{}
\rfoot[]{\thepage}
\setcounter{tocdepth}{3}
\fancypagestyle{plain}{% % <-- this is new
\fancyhf{}
\fancyfoot[LE,RO]{\thepage} % same placement as with page style "fancy"
\renewcommand{\headrulewidth}{0pt}}
\usepackage{etoolbox}
\begin{document}
\include{cover}
\restoregeometry
\pagenumbering{gobble}
\thispagestyle{empty}
\frontmatter
\mainmatter
\part{Part1}
\Chapter{A}
\Chapter{B}
\Chapter{C}
\part{Part2}
\Chapter{A}
\Chapter{B}
\Chapter{C}
\end{document}
答案1
就像是
\documentclass[10pt]{book}
\usepackage[width=3.93in, height=6.49in, top=1.0in, papersize={5.5in,8.2in}]{geometry}
\makeatletter
\@addtoreset{chapter}{part}
\makeatother%
\usepackage[english]{babel}
% dont use option \usepackage[pdftex]{graphicx}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tipa}
\usepackage{setspace}
% only for old latex \usepackage [utf8]{inputenc}
\usepackage{subfiles}
% only for old latex \usepackage{textcomp}
\usepackage{blindtext}
\renewcommand{\thechapter}{\Roman{chapter}}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{xpatch}
% alraeady used \usepackage{blindtext}
\makeatletter
\renewcommand\part{%
\if@openright
\cleardoublepage
\else
\clearpage
\fi
\thispagestyle{empty}%
\if@twocolumn
\onecolumn
\@tempswatrue
\else
\@tempswafalse
\fi
\null\vfil
\secdef\@part\@spart}
%\cleardoublepage
% with odd/even switched
\def\cleartoeven{\clearpage\if@twoside \ifodd\c@page
\thispagestyle{plain}\hbox{}\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother
%%%%%% CENTERED CHAPTER%%%%%%%
\usepackage{sectsty}
\chapterfont{\Large \centering}
\sectionfont{\normalsize \centering}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\fancyhf{}
\lfoot[\thepage]{}
\rfoot[]{\thepage}
\setcounter{tocdepth}{3}
\fancypagestyle{plain}{% % <-- this is new
\fancyhf{}
\fancyfoot[LE,RO]{\thepage} % same placement as with page style "fancy"
\renewcommand{\headrulewidth}{0pt}}
\usepackage{etoolbox}
% why new command with C??? you used but did not define
\newcommand\Chapter{\cleartoeven\chapter}
\begin{document}
%\include{cover}
\thispagestyle{plain}
\mbox{}\clearpage
%\restoregeometry
\pagenumbering{arabic}
\frontmatter
\mainmatter
\part{Part1}
\Chapter{A}
text text text text text text text text
\Chapter{B}
text text text text text text text text
\Chapter{C}
\part{Part2}
\Chapter{A}
\Chapter{B}
\Chapter{C}
\end{document}