答案1
原因是该LegrandOrangeBook.cls
文件使用titlesec
包来自定义节标题。您可以简单地将LegrandOrangeBook.cls
文件中第 211 行至第 226 行的相应代码替换为以下代码:
\titleformat
{\section} % Section type being modified
[block] % Shape type, can be: hang, block, display, runin, leftmargin, rightmargin, drop, wrap, frame
{\bfseries\sffamily\Large} % Format of the whole section
{\llap{\textcolor{ocre}{\thesection}\hspace{1em}}} % Format of the section label
{0cm} % Space between the title and label
{\includegraphics[height=1.5ex]{example-image}\quad#1} % Code before the label
[] % Code after the label
\titleformat
{name=\section, numberless} % Section type being modified
[block] % Shape type, can be: hang, block, display, runin, leftmargin, rightmargin, drop, wrap, frame
{\bfseries\sffamily\Large} % Format of the whole section
{\includegraphics[height=1.5ex]{example-image}\quad#1} % Format of the section label
{0cm} % Space between the title and label
{} % Code before the label
[] % Code after the label