答案1
正如 skpblack 所评论的,该包titlesec
可用于以下用途:
\documentclass{article}
\usepackage{lmodern, titlesec, xcolor}
\titleformat{name=\section,numberless}
{\normalfont\Large\bfseries}
{\color{yellow}\rule{1em}{1em}}
{1em}
{}
\begin{document}
\section{Another day in paradise}
A regular numbered section
\section*{Another night in paradise}
A starred section that has a coloured box
\end{document}
这使
对于间距等的微调,请参阅titlesec
文档。