正如我在标题中提到的,我无法让 fancyhdr 工作。我无法删除页码。而且页码不稳定。这就是结果。如您所见,iii 位于底部,但 iv 位于标题并与文本相交。
抱歉我的英语不好。
这是 mwe(我认为)由于文档太长,我没有转储所有代码。但如果需要的话我可以转储。
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[turkish]{babel}
\usepackage[left=3.50cm, right=2.50cm, top=3.00cm, bottom=3.00cm,nohead,nofoot]{geometry}
\usepackage[overload]{textcase}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{pslatex}
\usepackage{setspace}
\setlength{\parindent}{0pt}
\renewcommand{\thefigure}{\arabic{section}.\arabic{figure}}
\setlength{\parskip}{\baselineskip}
\addto\extrasturkish{\uccode`i=\string"9D \lccode`I=\string"19 }
\addto\noextrasturkish{\uccode`i=`I \lccode`I=`i }
\setlength{\footskip}{20pt}
\setlength{\marginparwidth}{0 pt}
\raggedbottom
\usepackage{chngcntr}
\setcounter{secnumdepth}{6}
\counterwithin{paragraph}{subsubsection}
\counterwithin{subparagraph}{paragraph}
\makeatother
%\usepackage{graphicx,epstopdf}
%\epstopdfsetup{update}
%\DeclareGraphicsExtensions{.ps}
\usepackage{url}
\usepackage{tocloft}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
\usepackage{titlesec}
\titlespacing{\section}
{0pt}
{-12 pt plus 4pt minus 2pt}
{-10 pt plus 2pt minus 2pt}
\titlespacing{\subsection}
{0pt}
{-12pt plus 4pt minus 2pt}
{-10pt plus 2pt minus 2pt}
\titlespacing{\subsubsection}
{0pt}
{-12pt plus 4pt minus 2pt}
{-10pt plus 2pt minus 2pt}
\titlespacing\paragraph
{0pt}
{-12pt plus 4pt minus 2pt}
{-10pt plus 2pt minus 2pt}
\titleformat{\section}
{\normalfont\normalsize\bfseries\MakeTextUppercase}
{\thesection.}
{1em}
{}
\titleformat{\subsection}
{\normalfont\normalsize\bfseries}
{\thesubsection.}
{1em}
{}
\titleformat{\subsubsection}
{\normalfont\normalsize\bfseries\itshape}
{\thesubsubsection.}
{1em }
{}
\titleformat{\paragraph}
{\itshape\normalsize}
{\theparagraph.}
{1em}
{}
\usepackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}
\fancyhf{}
\chead{{\thepage}}
\renewcommand{\footrulewidth}{0pt}
\pagestyle{fancy}
\setlength{\headheight}{ 0 cm}
\usepackage{enumitem}
\setlist{nolistsep}
%\raggedbottom
\setitemize{topsep=-12pt}
\setenumerate{topsep=-12pt}
\setenumerate[2]{label=\alph*.}
\let\stdsection\section
\renewcommand{\section}{\newpage\stdsection}
\begin{document}
\shorthandoff{=}
(...)
(...)
\begin{spacing}{1.0}
\setlength{\parskip}{0.245\baselineskip}
\tableofcontents
\setlength{\parskip}{\baselineskip}
\end{spacing}
(...)
(...)
\end{document}
答案1
不使用任何边距设置后加载中fancyhdr
。删除您的
\setlength{\headheight}{ 0 cm}
并用于geometry
任何设置。要使章节首页获得相同的行为,请重新定义页面样式:
\fancypagestyle{plain}{%
\renewcommand{\headrulewidth}{0pt}
\fancyhf{}
\chead{{\thepage}}
\renewcommand{\footrulewidth}{0pt}}