![如果部分从页面顶部开始,如何应用 pagestyle{empty}](https://linux22.com/image/436811/%E5%A6%82%E6%9E%9C%E9%83%A8%E5%88%86%E4%BB%8E%E9%A1%B5%E9%9D%A2%E9%A1%B6%E9%83%A8%E5%BC%80%E5%A7%8B%EF%BC%8C%E5%A6%82%E4%BD%95%E5%BA%94%E7%94%A8%20pagestyle%7Bempty%7D.png)
\section
如果在顶部开始新的部分并且之前不包含任何文本,我该如何应用另一种页面样式?
例子
页面开始部分之前包含文本。不更改页面样式
[
章节从页面顶部开始。需要更改页面样式。这样就没有页码了。
\documentclass[draft, twoside, 12pt, openright]{extreport}
\usepackage[a5paper, outer=20mm,inner=10mm,top=25mm,bottom=15mm,footskip=1.5em,headsep=4pt,headheight=15pt]{geometry}
\usepackage[ukrainian]{babel} %% загружает пакет многоязыковой вёрстки
\usepackage{indentfirst}
\usepackage{titlesec,titletoc}
\usepackage{xcolor}
\usepackage[framemethod=tikz]{mdframed}
\usetikzlibrary{backgrounds}
\usepackage{metalogo}
\usepackage[normalem]{ulem}
\usepackage[final]{microtype}
\usepackage{verse}
%\usepackage[T2A,T1]{fontenc}
%\usepackage[utf8]{inputenc}
\usepackage{setspace}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage{etoolbox}
\defaultfontfeatures{Scale=MatchLowercase}
%\usepackage[all]{background}
\def\sectiontitlename{Розділ}
\def\parttitlename{Частина}
% -------------- Настраваем шрифты -----------------------------
\setmainfont[ItalicFont={Fregat Italic}]{Theano Old Style}
\setsansfont {Fregat} % Sans font
\newfontfamily{\tobyfnt}{Tobi Dirt Black Rough}
\newfontfamily{\toprule}{adrops}
\newfontfamily{\avdirafnt}{Piron TW}
% --------------------------------------------------------------
\newcommand\YUGE{\fontsize{48}{80}\selectfont}
\newcommand*{\bibqufont}[1]{\bibquf\scriptsize{#1}}
\DeclareRobustCommand{\bqseries}{\fontseries{ms}\selectfont}
% ---------------------------------------------------------------
% Modification TOP rule
% ---------------------------------------------------------------
\renewcommand\headrule{%
\vspace{-1em}
\hrulefill {\toprule\raisebox{-0.8pt}{C}\hrulefill}
}
% ------------------ END top rule dofication ---------------------
\fancypagestyle{headings}{%
\fancyhf{} % clear all header and footer fields
\fancyfoot{} % except the center
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\renewcommand\headrule{}
}
\let\fntshape\itshape
%\renewcommand{\itshape}{\sf\fntshape}
% --------------- Формат для оглавлений ------------------------
\titleformat{\part}
{\centering}
{\tobyfnt\YUGE\partname \space \thepart}
{1em}
{\thispagestyle{empty}}
\titleformat{\section}
{\avdirafnt\large\bfseries\centering}
{\sectiontitlename\space\thesection}
{-1.2em}
{}
[]
\titlespacing{\section}{0pt}{*1}{*1}
%\let\nonumberclearpage\clearpage
%\renewcommand{\clearpage}{\thispagestyle{empty}\nonumberclearpage}
% ---------------- Счетчики ------------------------
\newcounter{qenum}
\newcounter{q1}
\newlength{\mdffrw}
\newcommand{\qa}{\addtocounter{q1}{1}\arabic{q1})\ }
% ---------------- Основная информация книги ----------------------
% ================ Настройка некоторых параметров =================|
%\sloppy %----------------------------- Красивое формирование строк|
\tolerance=600
\parindent=2pc %-------------------------------Отступ первой строки|
\setlength{\columnsep}{14pt} %------------Растояние между колонками|
\setlength{\columnseprule}{0.05pt} %----------Линия между колонками|
% -----------------------------------------------------------------|
%\tolerance=600
%\emergencystretch=2pt
\hfuzz=0.9pt
\doublehyphendemerits=9000000
% ---------------- Двухколоночное формирование текста -------------
%\twocolumn
\clubpenalty=10000
\widowpenalty=10000
\raggedbottom
\hyphenpenalty=800
\righthyphenmin=2
%\linespread{0.93}
\ULdepth = 0.2em
\newcommand{\versefont}{\itshape} % put here whatever font commands you want
\let\myoldverse\verse % now we store the original {verse}
\def\verse{\versefont\myoldverse}
\def\fs{\kern 0.2em}
%==================================================================
% |
% BEGIN OF DOCUMENT |
% |
%==================================================================
\makeatletter
\let\booktitle\@title
\makeatother
\pagestyle{fancy}
\fancyfoot{}%clear all
\fancyhead{}%clear all
\fancyhead[RO, LE]{\sffamily\thepage}
\fancyhead[LO]{\sffamily\MakeUppercase{\rightmark}}
\fancyhead[RE]{\sffamily\MakeUppercase{\leftmark}}
\newcommand{\sectionbreak}{
\vspace*{3pc}
}
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\partmark}[1]{%
\markboth{\parttitlename\space \thepart}{}
}
\renewcommand{\sectionmark}[1]{%
\markright{\chaptertitlename\space \thesection}{}
}
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
\hbox{}
\newpage
\fi\fi}
\makeatother
\counterwithin*{section}{part}
\begin{document}
\author{Ігор Юхименко}
\title{Краплини дощу}
\newcommand{\speek}{—\enspace}
\setcounter{secnumdepth}{2}
% \makeatletter
% \@setfontsize\normalsize{13}{14.4}%
% \makeatother
%\setstretch{1.15}
% ================ Main content of book ========================
\input{Part1.tex}
%
\input{Part2.tex}
% \part{}
% \input{Part4.tex}
%
% =================================================================
\end{document}