问题基本上如上所述。如何才能仅将特定部分类型居中,而其他所有部分都保留标准格式?
\documentclass{report}
\begin{document}
\section{Blabla} %this one should NOT be centered
\subsection{xyz} %this one should be centered
\subsubsection{abc} %this one should NOT be centered
\end{document}
谢谢!
答案1
带包裹titlesec
。
\documentclass{report}
\usepackage{titlesec}% <<<<<<<<<<<<<<<<<<<<<<
\titleformat{\subsection}% sectioning command
{\large\bfseries\filcenter}% format
{\thesubsection}% label
{1ex}% label separation
{} %code before
\begin{document}
\section{Blabla} %this one should NOT be centered
\subsection{xyz} %this one should be centered
\subsubsection{abc} %this one should NOT be centered
\end{document}