章节旁边的章节编号

章节旁边的章节编号

正如在我的 MWE 中看到的,我的部分编号出现在部分名称上方。请查看。提前感谢您提供的帮助。

\documentclass[11pt,dvipsnames]{report}
\usepackage{geometry}
\usepackage{enumerate}
\usepackage{latexsym,booktabs}
\usepackage{amsmath,amssymb}
\usepackage[singlespacing]{setspace}
\usepackage[colorlinks=true,linkcolor=blue]{hyperref}
\usepackage{graphicx}
\usepackage{caption} 
\captionsetup[table]{skip=1pt}
\usepackage{float}
\usepackage{makecell}
\usepackage{booktabs}
\usepackage{tikz}
\usepackage[natbibapa]{apacite} 
\usepackage{xcolor}

\newcommand{\tb}[1]{\noindent \textcolor{NavyBlue}{\textbf{Tom:}  #1}} 
\newcommand{\ishaan}[1]{\noindent \textcolor{Orange}{\textbf{Ishaan:}  #1}}


\geometry{a4paper,left=2cm,right=2.0cm, top=2cm, bottom=2.0cm}

\newtheorem{Definition}{Definition}
\newtheorem{Theorem}{Theorem}
\newtheorem{Lemma}{Lemma}
\newtheorem{Corollary}{Corollary}
\newtheorem{Proposition}{Proposition}
\newtheorem{Algorithm}{Algorithm}
\numberwithin{Theorem}{section}
\numberwithin{Definition}{section}
\numberwithin{Lemma}{section}
\numberwithin{Algorithm}{section}
\numberwithin{equation}{section}

% Remove the spaces from above , and be neat align, though these need to be edited. 
%\usepackage{etoolbox}
%\newcommand{\zerodisplayskips}{%
%  \setlength{\abovedisplayskip}{4pt}%
%  \setlength{\belowdisplayskip}{4pt}%
%  \setlength{\abovedisplayshortskip}{4pt}%
%  \setlength{\belowdisplayshortskip}{4pt}}
%\appto{\normalsize}{\zerodisplayskips}



% *********************************************************************
% Headings , and page layout
% *********************************************************************
\usepackage{fancyhdr} % to design my own headings
\usepackage{titlesec, titletoc} % to design my own toc , and part/chapter/section styles

% page style of "chapter"
\titleformat{\chapter}[display]{\Huge \bfseries}
    {\Large Chapter \thechapter \thispagestyle{plain}}{0ex}{\titlerule\vspace{1ex}}
\titlespacing*{\chapter}{0ex}{5ex}{5ex}

\titleformat{\section}[display]{\LARGE \bfseries}
    {\thesection \thispagestyle{plain} }{0ex}{}
\titlespacing*{\section}{0ex}{0ex}{2ex}
    
\titleformat{\subsection}[display]{\Large \bfseries}
    {\thispagestyle{plain}}{0ex}{\vspace{2ex}}
\titlespacing*{\subsection}{0ex}{0ex}{3ex}



% definition of headings
\fancypagestyle{memo}{
    \pagestyle{fancy}
    \fancyhf{}
    \fancyhead[RO,LE]{\thepage}
    \fancyhead[RE]{\rightmark}
    \fancyhead[LO]{\leftmark}
    \renewcommand\headrulewidth{0.5pt}
}


\begin{document}


\section{hello} 


\end{document} 





相关内容