Я использовал \ let \ clearpage \ relax, чтобы сохранить две главы на одной странице, и это приводит к тому, что номер страницы на следующей странице не отображается.
Есть ли способ отменить команду вдокумент и до сих пор держать две главы одной страницы?
Более подробная информация предоставляется.
\documentclass[12pt,a4paper]{report}
\usepackage[left=3cm,right=3cm,top=-2cm,bottom=4cm]{geometry}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{placeins}
\usepackage{tocloft}
\usepackage{ifthen}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage{float}
\floatstyle{plaintop}
\restylefloat{table}
\usepackage{caption}
\captionsetup[table]{skip=10pt}
\pagestyle{fancy}
\usepackage{setspace}
\makeatletter
% addition for not showing 'Chapter 1'
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\interlinepenalty\@M
\Huge \bfseries
\ifnum \c@secnumdepth >\m@ne
\thechapter\nobreakspace
\fi
#1\par\nobreak
\vskip 40\p@
}}
\@ifundefined{chapter}%
{}%
{\renewcommand{\chaptermark}[1]{%
\ifthenelse{\value{chapter} < 1}%
{\markboth{#1}{}}%
{\markboth{\thechapter\ #1}{}}
}}
\addtolength{\headheight}{\baselineskip}
\renewcommand{\headrulewidth}{0.4pt} %% thin line under header
%\renewcommand{\headrulewidth}{0pt} %% no line under header
\renewcommand{\footrulewidth}{0pt}
\fancyhf{} %% Clear all fields.
%\fancyhead[LE,RO]{\sffamily\thepage}
%\fancyhead[LO,RE]{\sffamily\nouppercase{\leftmark}}
\fancyhead[R]{\sffamily\thepage}
\fancyhead[L]{\sffamily\nouppercase{\leftmark}}
\fancypagestyle{plain}{%
\fancyhf{} % clear all header and footer fields
\fancyfoot[C]{\sffamily\thepage} % except the center
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}
\makeatother