제목 페이지 뒤에 페이지 번호가 없는 장 사이에 \pagestyle{plain}이 있습니까?

제목 페이지 뒤에 페이지 번호가 없는 장 사이에 \pagestyle{plain}이 있습니까?

장 사이의 빈 페이지에서 머리글/바닥글을 제거하는 방법에 대한 수많은 게시물을 찾았으며 한 가지 큰 예외를 제외하고는 잘 작동합니다...\pagestyle{plain} 문서에서 장이 시작되기 전에 모든 빈 페이지에 (예: 단일 중앙 pg#) 이 필요합니다.제외하고나는 필요하다\pagestyle{empty}페이지에 대한직후. \titlepage​내가 보고 시도한 모든 방법은 전체 문서 또는 \pagestyle{plain}모든 문서에 대해 완전히 빈 페이지를 남겨두었습니다.

나는 book문서 클래스 [twosided,openright], 를 사용하고 있으며 다음과 같이 fancyhdr재정의하는 코드를 포함했습니다 .\cleardoublepage

\makeatletter
\def
\cleardoublepage{%
\clearpage
  \ifodd\c@page
  \else
    \hbox{}
    \thispagestyle{plain}
    \newpage      
  \fi
  }%
\makeatother

...다양한 게시물에서 추천한 대로입니다. 불행하게도 페이지 번호 뒤에 빈 페이지가 남게 됩니다 titlepage(클라이언트를 미치게 만듭니다). 코드는 해당 페이지를 {empty}.

해당 섹션만 지우고 나머지( ) 는 빈 페이지 사이에 두는 데 사용할 수 있는 \if@titlepage유사한 조건 형식이 있습니까 ? 조건부로 캡처할 수 있는 방법이 있나요?\if@mainmatter\frontmatter, \mainmatter, \appendix, \backmatter\pagestyle{plain}

(매우) 대략적인 근사치 MWE:

\documentclass[12pt,letterpaper,final,openright]{book}

\usepackage{fancyhdr}
\usepackage{natbib}

\pagestyle{fancy}
  \setlength{\headheight}{15.2pt}
  \renewcommand{\headrulewidth}{0.4pt}
  \renewcommand{\footrulewidth}{0.2pt}

  \makeatletter
    \renewcommand{\chaptermark}[1]{%
      \if@mainmatter
        \markboth{\MakeUppercase{\chaptername\ \thechapter.\ #1}}{}
      \else
        \markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}
      \fi
      }%
  \makeatother  

  \fancyhf{} 
  \fancyhead[LE,RO]{\small \thepage}
  \fancyhead[LO]{\small \leftmark}
  \fancyhead[RE]{\small \rightmark}

% Redefine \pagestyle{plain}
\fancypagestyle{plain}{%
  \fancyhf{} % clear all header and footer fields
  \fancyfoot[C]{\small \thepage} % except the center
  \renewcommand{\headrulewidth}{0pt}
  \renewcommand{\footrulewidth}{0pt}
  }%

% Code for creating plain on empty pages before new chapter
\makeatletter
\def
  \cleardoublepage{%
    \clearpage
      \ifodd\c@page
      \else
        \hbox{}
        \thispagestyle{plain}
        \newpage      
      \fi
    }%
\makeatother

\begin{document}
% TITLE PAGE
\pagestyle{empty}  %Clear hdr/ftr 
\titlepage
  \input{./Chapter_txt/titlepageV1} %Custom title page text/layout

\frontmatter
\pagestyle{fancy} % Resume hdr/ftr
%MANAGEMENT SUMMARY 
\include{Preface} %Intro/Preface chapter

%ToC and Lists  
\tableofcontents
\listoftables   
\listoffigures

\mainmatter
\part{PartI}
  \include{Chapter1}
  \include{Chapter2}
\part{PartII}
  \include{Chapter3}
  \include{Chapter4}

\appendix
  \include{app}

\backmatter  
    \bibliographystyle{humannat}
    \bibliography{mybib}\footnotesize
    \addcontentsline{toc}{chapter}{Bibliography}

\end{document}

전체 내용은 여러 권으로 이루어진 작업이며, 각 섹션은 ... MWE의 많은 부분을 수행하는 좋은 방법이 아닙니다( 또는 \include{file}가 있는 작업을 수행하는 방법을 모르겠습니다 ).\input\include

답변1

여기에 해결책이 있습니다편집: 추가 설명

페이지 스타일이 멋집니다. 장 사이의 페이지는 plain재정의로 설정됩니다(이 마지막 명령은 및 \cleardoublepage에서 사용됩니다 ).\part\chapter

부분 페이지 이후의 페이지는 plain재정의하여 설정됩니다.\@endpart

제목 페이지 뒤의 페이지는 환경 empty바로 뒤에 있는 이 페이지 스타일{empty}에 의해 설정됩니다.titlepage

\documentclass{book}
\usepackage{lipsum}
\usepackage{fancyhdr}
\fancyhf{}  
\fancyhead[R]{\leftmark} 
\fancyfoot[R]{test} 
\fancyfoot[C]{\thepage}
\pagestyle{fancy}
\let\mtcleardoublepage\cleardoublepage
\renewcommand{\cleardoublepage}{\clearpage{\pagestyle{plain}\mtcleardoublepage}}
\makeatletter
\def\@endpart{\vfil\newpage
              \if@twoside
               \if@openright
                \null
                \thispagestyle{plain}%
                \newpage
               \fi
              \fi
              \if@tempswa
                \twocolumn
              \fi}
\makeatother
\title{Test}
\author{Me}
\begin{document}
\begin{titlepage}
\maketitle
\end{titlepage}
\thispagestyle{empty}
\lipsum[1-20]
\part{Deux}
\chapter{trois}
\lipsum[1-50]
\end{document}

편집: 이 특정 코드

\documentclass[12pt]{book}

\usepackage{fancyhdr}
\usepackage{natbib}

\pagestyle{fancy}
  \setlength{\headheight}{15.2pt}
  \renewcommand{\headrulewidth}{0.4pt}
  \renewcommand{\footrulewidth}{0.2pt}

  \makeatletter
    \renewcommand{\chaptermark}[1]{%
      \if@mainmatter
        \markboth{\MakeUppercase{\chaptername\ \thechapter.\ #1}}{}
      \else
        \markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}
      \fi
      }%
  \makeatother  

  \fancyhf{} 
  \fancyhead[LE,RO]{\small \thepage}
  \fancyhead[LO]{\small \leftmark}
  \fancyhead[RE]{\small \rightmark}

% Redefine \pagestyle{plain}
\fancypagestyle{plain}{%
  \fancyhf{} % clear all header and footer fields
  \fancyfoot[C]{\small \thepage} % except the center
  \renewcommand{\headrulewidth}{0pt}
  \renewcommand{\footrulewidth}{0pt}
  }%

\let\mtcleardoublepage\cleardoublepage
\renewcommand{\cleardoublepage}{\clearpage{\pagestyle{plain}\mtcleardoublepage}}
\makeatletter
\def\@endpart{\vfil\newpage
              \if@twoside
               \if@openright
                \null
                \thispagestyle{plain}%
                \newpage
               \fi
              \fi
              \if@tempswa
                \twocolumn
              \fi}
\makeatother

\begin{document}

\begin{titlepage}
test
\end{titlepage}
\thispagestyle{empty}
\frontmatter

\include{Preface} %Intro/Preface chapter

%ToC and Lists  
\tableofcontents
\listoftables   
\listoffigures

\mainmatter
\part{PartI}
  \include{Chapter1}
  \include{Chapter2}
\part{PartII}
  \include{Chapter3}
  \include{Chapter4}

\appendix
  \include{app}

\backmatter 
\footnotesize 
    \bibliographystyle{humannat}
    \bibliography{mybib}
    \addcontentsline{toc}{chapter}{Bibliography}

\end{document}

답변2

환경을 재정의해야 할 수도 있습니다 titlepage. 내 것도 이렇고, 제목 페이지 다음의 첫 번째 페이지는 비어 있고 다음 페이지는 올바르게 번호가 매겨져 있습니다.

\newenvironment{titlepage}
{%
  \if@openright
    \cleardoublepage
  \else
    \clearpage
  \fi%
  \newpage
  \thispagestyle{empty}%
  \setcounter{page}\@ne
}%
{\newpage
  \thispagestyle{empty}
}%%

또한 명령을 사용하는 경우 명령 정의 끝에 \maketitle다음을 추가해야 합니다 .\clearpage

\if@titlepage
\newcommand\maketitle{%
  \begin{titlepage}
...
  \end{titlepage}%
  \clearpage%
  \setcounter{footnote}{0}%
...
}%
\fi

도움이 되었으면 좋겠습니다.

답변3

패키지를 로드할 수 있습니다.scrextend옵션으로 cleardoublepage=plain. 제목 페이지 바로 다음에 빈 페이지를 가져오려면 환경 \cleardoubleoddemptypage다음에 사용하거나 titlepage이 환경 내의 마지막 명령으로 사용하세요.

\documentclass{book}
\usepackage[cleardoublepage=plain]{scrextend}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{blindtext}% dummy text
\begin{document}
\begin{titlepage}
\Huge My Titlepage
\end{titlepage}
\cleardoubleoddemptypage
\frontmatter
\tableofcontents
\mainmatter
\blinddocument
\Blindtext
\blinddocument
\end{document}

또 다른 가능성은 다음을 추가로 사용하는 것입니다.etoolbox:

\documentclass{book}
%
\usepackage[cleardoublepage=plain]{scrextend}
\usepackage{etoolbox}
\AfterEndEnvironment{titlepage}{\cleardoubleoddemptypage}
%
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{blindtext}% dummy text
\begin{document}
\begin{titlepage}
\Huge My Titlepage
\end{titlepage}
\frontmatter
\tableofcontents
\mainmatter
\blinddocument
\Blindtext
\blinddocument
\end{document}

관련 정보