
私はJesper Ipsenが提供したMWEを使用しています次の質問。
セクション番号の代わりに色付きのボックスを使用するつもりです。私のアイデアはそれを実装することでした次の質問に示されているように。
今残っているのは、次に示すように、新しいセクションを作成するたびにこれらのボックスを簡単に追加できるようにすることです。
\section*{Time Machines}
次のように表示することを想定しています。
答え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
ドキュメントを参照してください。