在空白页上编辑文本?

在空白页上编辑文本?

作为我的标题,我该如何将文本和页脚放在每个标题页后的空白页上?这是我目前的代码,但这只对标题页之前的空白页有效!我还使用 python 和 json 来加载数据。

抱歉更新晚了,这是我用于 json 文件的完整代码,但它也有同样的问题。我认为我的代码之间可能存在一些冲突问题,但我不知道如何修复它。有人知道问题出在哪里吗?非常感谢。
第 6 页是标题页前的空白页,第 7 页是标题页,第 8 页是标题页后的空白页

\documentclass[11pt,letterpaper,twoside]{book}

\usepackage{fancyhdr}
\usepackage{fontspec}
\usepackage{color}
\usepackage{colortbl}
\usepackage{longtable}
\usepackage{array}
\usepackage{anysize}
\usepackage{tabu}
\usepackage{multicol}
\usepackage[explicit]{titlesec}
\usepackage{titletoc}
\usepackage{xparse}
\usepackage{amsfonts}
\usepackage[autolanguage]{numprint}
\usepackage{geometry}
\usepackage{ifoddpage}
\usepackage{lipsum}

\geometry{paperheight=11in,paperwidth=8.5in,textwidth=7.25in,textheight=9in,top=1in,bottom=1in,headsep=0.125in,footskip=0.125in,left=0.75in,right=0.5in,twoside}

\geometry{marginparsep = 0.5in}

\titlecontents{section}[5em]{}{\vspace{.1em} \hspace{-2.5em} }{}    {\hspace{.5em}\titlerule*[4pt]{.}\contentspage}
\titlecontents{subsection}[5em]{}{}{}{}

\setmainfont[Mapping=text-tex]{Calibri}
\setcounter{secnumdepth}{-1} 
\definecolor{green}{rgb}{0.3,.7,0.3}
\definecolor{blue}{rgb}{0.3, 0.3, .6}
\definecolor{white}{rgb}{1,1,1}
\definecolor{grey}{rgb}{.6,.6,.6}
\pagestyle{fancy}
\setlength{\parskip}{1.5ex}
\setlength{\parindent}{0.0in}
\voffset = 0pt
\hoffset = 0pt

%force section start with new page
\let\stdsection\section
\renewcommand\section{\newpage\stdsection}


\newcommand{\delppart}[1]{\part{#1}}
\newcommand{\delpsection}[1]{\section{#1}}
\newcommand{\delpsubsection}[1]{\subsection{#1}}
\newcommand{\delpsubsubsection}[1]{\subsubsection{#1}}
\newcommand{\delpsubsubsubsection}[0]{\subsubsubsection}
\newcommand{\bulletl}[0]{\renewcommand{\labelitemi}{$\bullet$}}
\newcommand{\checkl}[0]{\renewcommand{\labelitemi}{$\checkmark$}}
\newcommand{\figurebottom}[1]{\begin{figure}[b]#1\end{figure}}
\newcommand{\twocol}[1]{\begin{multicols}{2}{#1}\end{multicols}}
\newcommand{\greenrow}[1]{\rowcolor{green}#1}
\newcommand{\bluerow}[1]{\rowcolor{blue}#1}
\newcommand{\greyrow}[1]{\rowcolor{grey}#1}
\newcommand{\white}[1]{\color{white}#1}
\newcommand{\none}[1]{#1}


\setlength{\unitlength}{1mm}%footnote

\fancypagestyle{plain}{
\fancyhf[]{}
\fancyfoot[LE,RO]{ \normalsize  BlahBlahBlahBlah\\BlahBlahBlahBlah}
\fancyfoot[C]{- \thepage\  -}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0.4pt}
}

\fancypagestyle{empty}{
\fancyhf[]{}
\fancyfoot[LE,RO]{ \normalsize  BlahBlahBlahBlah\\BlahBlahBlahBlah}
\fancyfoot[C]{- \thepage\  -}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0.4pt}
}

\fancyhf{}
\renewcommand{\sectionmark}[1]{\markright{#1}}

\fancyhead[R]{\Huge \rightmark}
\fancyfoot[LE,RO]{ \normalsize BlahBlahBlahBlah\\BlahBlahBlahBlah}
\fancyfoot[C]{- \thepage\  -}

\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\renewcommand{\footrule}{%
\checkoddpage
\ifoddpage\hfill\else\fi\rule{2.5in}{\footrulewidth}\vskip\footruleskip}

\newcommand*\BPText{THIS PAGE IS INTENTIONALLY LEFT BLANK.}


\makeatletter
\renewcommand*\cleardoublepage{%
\clearpage\if@twoside \ifodd\c@page\else
\hbox{}
\vspace*{2.125in}
\begin{center}
\BPText
\end{center}
\vspace{\fill}
\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother

\newcommand{\dontbreak}[1]{\hbox{#1}}
\newcommand{\noinfo}[0]{-}
\newcommand{\defaultnum}[1]{\numprint{#1}}
\newcommand{\percentage}[1]{\numprint{#1}\%}

\titleformat{\part}[display]{\normalfont \huge\raggedleft  \vspace{0.6in} \titlerule}{}{-70pt}{#1\Huge}
\titleformat{\section}{}{}{0pt}{}


\newcommand{\defaulttabletitlemacro}[1]{\none{#1}}
\newcommand{\defaultcoltitlerowmacro}[1]{\greenrow{#1}}
\newcommand{\defaultcoltitleitemmacro}[1]{\textbf{#1}}
\newcommand{\defaultrowmacro}[1]{\none{#1}}
\newcommand{\defaultitemmacro}[1]{ \hspace*{\fill}#1}
\newcommand{\defaultrowtitlemacro}[1]{\none{#1}}
\newcommand{\defaultsumrowmacro}[1]{\greenrow{#1}}
\newcommand{\defaultsubsumrowmacro}[1]{\greyrow{#1}}
\newcommand{\defaultsubsubsumrowmacro}[1]{\greyrow{#1}}
\newcommand{\defaultsumitemmacro}[1]{\none{#1}}
\newcommand{\defaultsubsumitemmacro}[1]{\none{#1}}
\newcommand{\defaultsubsubsumitemmacro}[1]{\none{#1}}
\newcommand{\defaultdiffrowmacro}[1]{\bluerow{#1}}
\newcommand{\defaultdiffitemmacro}[1]{\hspace*{\fill}#1}
\newcommand{\defaultdifftitlemacro}[1]{\none{#1}}
\newcommand{\defaultsumtitlemacro}[1]{\none{#1}}
\newcommand{\defaultsubsumtitlemacro}[1]{\none{#1}}
\newcommand{\defaultsubsubsumtitlemacro}[1]{\none{#1}}

\newcommand{\defaultsubtabletitlemacro}[1]{ \textbf{#1}}
\newcommand{\centerit}[1]{\begin{center}\itshape{#1}\end{center}}

\NewDocumentCommand{\myrule}{O{1pt} O{3pt} O{black}}{%
\par\nobreak % don't break a page here
\vspace{0.01in} 
\kern\the\prevdepth % don't take into account the depth of the preceding line
\kern#2 % space before the rule
{\color{#3}\hrule height #1 width\hsize} % the rule
\kern#1 % space after the rule
\nointerlineskip % no additional space after the rule
}

\newcommand{\goalheader}[1]{#1\myrule[3pt][0pt][green]}
\nprounddigits{2}


\begin{document}


\part{Test Chapter One}
\lipsum[1-37]
\part{Test Chapter Two}
\lipsum[1-8]

\end{document}

谢谢!

答案1

我不知道这是否是你想要的:

\documentclass{book}

\newcommand*\BPText{THIS PAGE IS INTENTIONALLY LEFT BLANK.}

\makeatletter
\renewcommand*\cleardoublepage{%
  \clearpage\if@twoside\ifodd\c@page\else
  \vspace*{\fill}
  \centering
  \BPText
  \vspace{\fill}
  \thispagestyle{plain}
  \newpage
  \if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother

\title{The Title}
\author{The Author}

\begin{document}

\maketitle
\chapter{Test Chapter One}
\chapter{Test Chapter Two}

\end{document}

在此处输入图片描述

我保留了空白页的原始plain样式,这使得信息更加奇怪(这些页面并不是真正空白的:它们包含一些文本和页码)。

相关内容