章节编号和章节标题的配置

章节编号和章节标题的配置

我正在使用该类article(而且我必须使用)。我该如何\section{<heading>}以这样的方式使用该命令来生成如下图所示的特定配置?

\documentclass{article}

\begin{document}

\section{Introduction}

In this section, we resolve the world's all problems.

\section{Conclusion}

We resolved all the current problems of the world.

\end{document}

在此处输入图片描述

答案1

简单易用titlesec

\documentclass{article}
\usepackage{titlesec}
\titleformat{\section}[display]{\sffamily\filleft}{\MakeUppercase{section}~\thesection}{1ex}{\MakeUppercase}

\begin{document}
\sffamily
\section{Introduction}

In this section, we resolve the world's all problems.

\section{Conclusion}

We indeed resolved all the current problems of the world.

\end{document}

在此处输入图片描述

答案2

\begin{flushright}并将 \end{flushright}文本与右边距对齐。

\documentclass{article}

\makeatletter
\renewcommand{\@seccntformat}[1]{\csname the#1\endcsname}
\makeatother

\renewcommand{\thesection}{Section \arabic{section}}

\begin{document}

\begin{flushright}
\section{\break Introduction}
\end{flushright}

In this section, we resolve the world's all problems.

\begin{flushright}
\section{\break Conclusion}
\end{flushright}

We resolved all the current problems of the world.

\end{document}

在此处输入图片描述

相关内容