特定页面的页码位置和存在情况

特定页面的页码位置和存在情况

在此处输入图片描述

你好!我想做一些像上面给出的图像那样的改变。

  • 删除章节第一页的页码。
  • 更改从章节页面到末尾的页码位置。

我该如何解决这个问题?谢谢。

\documentclass[12pt]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[turkish,english,shorthands=:!]{babel}
\usepackage[a4paper,left=30mm,top=30mm,right=25mm,bottom=25mm]{geometry}
% Font and line spacing settings
\usepackage[scaled=1.00375]{newtxtext}
\usepackage[scaled=1.00375]{newtxmath}
\usepackage[nodisplayskipstretch]{setspace}
\setstretch{1.432818}% <-- 1.00375*1.427465
% Customize headings
\usepackage{titlesec}
\newcommand*{\myonevspace}{13.850574pt}% <-- Define a macro \myonehalfvspace
\newcommand*{\myonehalfvspace}{20.775861pt}% <-- Define a macro \myonehalfvspace
\newcommand*{\mytwovspace}{27.701147pt}% <-- Define a macro \mytwovspace
% For dummy texts, you can remove it.
\usepackage{lipsum} 
\usepackage{tocloft}
\usepackage{titlesec}
\usepackage{apacite}
\usepackage{graphicx}
\usepackage{etoolbox}
%%----%%----%% Page number-----------
\usepackage{fancyhdr} %sayfa numarası
\fancypagestyle{plain}{%
  \fancyhf{}% clear all header and footer fields
  \chead{\thepage}%
  \renewcommand{\headrulewidth}{0pt}%
  \renewcommand{\footrulewidth}{0pt}%
}


% now we need to fix \@chapter
\makeatletter
\patchcmd{\@chapter}
  {\addtocontents{lof}{\protect\addvspace{10\p@}}}
  {}
  {}{}
\patchcmd{\@chapter}
  {\addtocontents{lot}{\protect\addvspace{10\p@}}}
  {}
  {}{}
\makeatother





%****************************************
% CHAPTERS
%%% Chapter titles

% Chapter heading \titlespacing*{command}{left}{before-sep}{after-sep}[right-sep]
\titleformat{\chapter}
  {\normalfont\normalsize\bfseries}{\thechapter.}{.5em}{}
\titlespacing{\chapter}{1cm}{0cm plus 4pt minus 2pt}{\myonehalfvspace plus 2pt minus 2pt}
% Section heading
\titleformat{\section}
  {\normalfont\normalsize\bfseries}{\thesection.}{.5em}{}
\titlespacing{\section}{1cm}{\myonehalfvspace plus 4pt minus 2pt}{\myonehalfvspace plus 2pt minus 2pt}
% Subsection heading
\titleformat{\subsection}
  {\normalfont\normalsize\bfseries}{\thesubsection.}{.5em}{}
\titlespacing{\subsection}{1cm}{\mytwovspace plus 4pt minus 2pt}{\myonehalfvspace plus 2pt minus 2pt}
% Subsubsection heading
\titleformat{\subsubsection}
  {\normalfont\normalsize\bfseries}{\thesubsubsection.}{.5em}{}
\titlespacing{\subsubsection}{1cm}{\mytwovspace plus 4pt minus 2pt}{\myonehalfvspace plus 2pt minus 2pt}



\usepackage[unicode]{hyperref} %son yükle

% BEGIN
\begin{document}
\pagenumbering{gobble}

\pagenumbering{Roman}
\addtocontents{toc}{\hfill \underline{\textbf{Sayfa No}}\par} 

% Page ÖNSÖZ--------------
\addcontentsline{toc}{chapter}{ÖNSÖZ} 
\begin{center}
    \vspace*{0cm} % Top: 40mm olmalı
    {\fontsize{12pt}{12pt}\selectfont \textbf{ÖNSÖZ}}\\
\end{center}
\par \lipsum[1-1]
\clearpage
%-------------------------

% Page Etik--------------
\addcontentsline{toc}{chapter}{ETİK} 
\begin{center}
    \vspace*{0cm} % Top: 40mm olmalı
    {\fontsize{12pt}{12pt}\selectfont \textbf{ETİK}}\\
\end{center}
\par \lipsum[1-1]
\clearpage
%-------------------------

% Page TOC İçindekiler ---
\renewcommand*\contentsname{İÇİNDEKİLER}
\addcontentsline{toc}{chapter}{İÇİNDEKİLER} %içindekiler tablosunu içindekilerde gösterir.
\setcounter{secnumdepth}{3} %Kaç alt başlığın numarasını verecek belirler
\setcounter{tocdepth}{3}

\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}} % dots for chapters
\renewcommand{\cfttoctitlefont}{\MakeUppercase\hfil\bfseries\fontsize{12pt}{12pt}\selectfont}
    \vspace*{-1.8cm} 
\renewcommand\cftchapfont{\mdseries}
\renewcommand\cftchappagefont{\mdseries}
%\renewcommand{\cftchappresnum}{CHAPTER\space}
\renewcommand{\cftchapaftersnum}{.} 
\renewcommand{\cftsecaftersnum}{.} 
\renewcommand{\cftsubsecaftersnum}{.} 
\renewcommand{\cftsubsubsecaftersnum}{.} 

%\setlength{\cftbeforetoctitleskip}{10mm} 
\setlength{\cftaftertoctitleskip}{1\baselineskip}
\setlength{\cftchapnumwidth}{4em}
\setlength{\cftsecnumwidth}{4em}
\setlength{\cftsubsecnumwidth}{4em}

\setlength{\cftchapindent}{0em}
\setlength{\cftsecindent}{0em}
\setlength{\cftsubsecindent}{0em}
\setlength{\cftsubsubsecindent}{0em}

% Spacing between items
\setlength{\cftbeforechapskip}{7pt}
\setlength{\cftbeforesecskip}{\cftbeforechapskip}
\setlength{\cftbeforesubsecskip}{\cftbeforechapskip}
\setlength{\cftbeforesubsubsecskip}{\cftbeforechapskip}

\begin{singlespace}
\tableofcontents
\end{singlespace}
\clearpage
%-------------------------

% Page Figures Şekiller ---
\renewcommand*\listfigurename{ŞEKİLLER DİZİNİ}
\addtocontents{lof}{\par\nobreak\textbf{{\scshape } \hfill} \underline{\textbf{Sayfa No}}\par\nobreak} %{\scshape Şekil} kısmı eklenebilir.
\renewcommand{\cftloftitlefont}{\MakeUppercase\hfil\bfseries\fontsize{12pt}{12pt}\selectfont}
\renewcommand{\cftfigaftersnum}{.}
\renewcommand*\cftfigpresnum{Şekil~}
\settowidth{\cftfignumwidth}{\cftfigpresnum}
\renewcommand{\cftfigaftersnumb}{\quad~~}
\setlength{\cftbeforeloftitleskip}{10mm}
\setlength{\cftafterloftitleskip}{1\baselineskip}
\setlength{\cftbeforefigskip}{\cftbeforechapskip}

\begin{singlespace}
\listoffigures
\end{singlespace}
\clearpage
%-------------------------

% Page Tables Tablolar ---
\renewcommand*\listtablename{TABLOLAR DİZİNİ}
\addtocontents{lot}{\par\nobreak\textbf{{\scshape } \hfill} \underline{Sayfa No}\par\nobreak}
\renewcommand{\cftlottitlefont}{\MakeUppercase\hfil\bfseries\fontsize{12pt}{12pt}\selectfont}
\renewcommand{\cfttabaftersnum}{.}
\renewcommand*\cfttabpresnum{Tablo~}
\settowidth{\cfttabnumwidth}{\cfttabpresnum}
\renewcommand{\cfttabaftersnumb}{\quad~~}
\setlength{\cftbeforelottitleskip}{10mm}
\setlength{\cftafterlottitleskip}{1\baselineskip}
\setlength{\cftbeforetabskip}{\cftbeforechapskip}

\begin{singlespace}
\listoftables
\end{singlespace}
\clearpage
%-------------------------

\pagenumbering{arabic}


\chapter{CHAPTER}
\section{Section}
\lipsum[1]
\subsubsection{Subsubsection}
\lipsum[3-5]
\chapter{CHAPTER}
\section{Section}
\lipsum[1]
\subsection{Subsection}
\lipsum[2-3]
\subsubsection{Subsubsection}
\lipsum[3-5]
%.........................

\end{document}

答案1

使用 fancyhdr 包,创建页面样式并编辑纯文本。解决方案如下:

\usepackage{fancyhdr} %sayfa numarası

\fancypagestyle{chapterpage}{%
  \fancyhf{}% Clear header and footer
  \chead{\thepage}%
  \renewcommand{\headrulewidth}{0pt}% Line at the header visible
  \renewcommand{\footrulewidth}{0pt}% Line at the footer visible
}

% Redefine the plain page style
\fancypagestyle{plain}{%
  %\fancyhf{}% clear all header and footer fields
  \chead{}%
  \renewcommand{\headrulewidth}{0pt}%
  \renewcommand{\footrulewidth}{0pt}%
}

并且之前\chapter

\pagestyle{chapterpage}

相关内容