如何在章节编号和标题之间留出空格

如何在章节编号和标题之间留出空格

想到这里,我感到很困惑。我想在章节编号和后面的文本之间留出一个空格。我想制作一个如下所示的章节。我对此一无所知,因为我正在使用自己的课程,不知道在哪里进行编辑。 在此处输入图片描述

这是我的班级部分设置

% SECTION  
%  
% Section names are bold face typed using \bf.
\renewcommand{\section}[1]{%  
\refstepcounter{section}  
\noindent
\setbox\@tempboxa\hbox{\bf\thesection\space\space{#1}}%
\ifdim \wd\@tempboxa >\hsize         % IF it is longer than one line, use indentation
%    \vskip 1pt \noindent\ssp \hangindent 0.36in
\vskip 1pt \noindent\ssp \hangindent 0.33in  
{\bf\thesection\space\space{#1}\par} \dsp
\else                              % ELSE  center.
{\bf\thesection\space\space{#1}}
\fi
\addtocontents{toc}{\protect}
\addcontentsline{toc}{section}{\protect
    \makebox[.15cm][r]{\thesection} \hspace*{3pt}#1}
}

% SUBSECTION
%
% Subsection names are typed italic bold, and they are not included in tha table of contents.
\renewcommand{\subsection}[1]{%
\refstepcounter{subsection}
\noindent
\setbox\@tempboxa\hbox{\bf\thesubsection\space\space{#1}}%
 \ifdim \wd\@tempboxa >\hsize         % IF it is longer than one line, use indentation
%    \vskip 1pt \noindent\ssp \hangindent 0.36in
     \vskip 1pt \noindent\ssp \hangindent 0.49in  
  {\bf\thesubsection\space\space{#1}\par} \dsp
  \else                              % ELSE  center.
  {\bf\thesubsection\space\space{#1}}
  \fi
  \addtocontents{toc}{\protect}
  \addcontentsline{toc}{subsection}{\protect
%___________________________________________
%  {\textbf{\thesubsection\space\space{#1}}}
%  \addtocontents{toc}{\protect\vspace{-10pt}}
%  \addcontentsline{toc}{subsection}{\protect
%  \makebox[0.3in][r]{\thesubsection.} \hspace*{3pt}#1}
   \makebox[.2mm][r]{\thesubsection} \hspace*{3pt}#1}
   }


% SUBSUBSECTION
% Subsubsection names are typed italic,and they are not included in the table of contents.
\renewcommand{\subsubsection}[1]{%
\refstepcounter{subsubsection}
\noindent
{\text{\thesubsubsection\space\space{#1}}}
%  \addtocontents{toc}{\protect\vspace{-10pt}}
%  \addcontentsline{toc}{subsubsection}{\protect
%  \makebox[0.3in][r]{\thesubsubsection.} \hspace*{3pt}#1}
}

注意: \dsp 定义为双倍行距,\ssp 定义为单倍行距

相关内容