모든 장/섹션/하위 섹션 제목 앞에 기호를 어떻게 넣을 수 있나요?

모든 장/섹션/하위 섹션 제목 앞에 기호를 어떻게 넣을 수 있나요?

각 장, 섹션, 하위 섹션의 제목 앞에 기호를 어떻게 넣을 수 있나요? 가능하다면 왼쪽 여백에 이 기호를 넣고 싶습니다. 상징은 중요하지 않습니다.

이것은 내 MWE입니다.

    \documentclass[fancy,12pt,a4paper,oneside,table]{memoir}
    \usepackage{lipsum}
    \usepackage{xcolor}
    
    \definecolor{sectioncolour}{RGB}{247,131,53}
    \definecolor{chaptercolour}{RGB}{23,85,142}
    \definecolor{subsectioncolour}{RGB}{5,130,34}
    
    \renewcommand{\chapnamefont}{\normalfont\large\sffamily\scshape\center\color{chaptercolour}}
    \renewcommand{\chapnumfont}{\Huge\bfseries\sffamily\color{chaptercolour}}
    \renewcommand{\chaptitlefont}{\normalfont\Huge\bfseries\sffamily\center\color{chaptercolour}}
    \setsecheadstyle{\Large\bfseries\sffamily\color{sectioncolour}}
    \setsubsecheadstyle{\large\bfseries\sffamily\color{subsectioncolour}}
    
    \begin{document}
        \chapter{Guide Intro}
        \lipsum[1]
        \section{Operations}
        \lipsum[2]
        \section{General view}
        \lipsum[3]
        \subsection{General view}
        \lipsum[4]
        
        \chapter{Guide: Detailed content}
        \lipsum[4]
    
        \chapter{Future}
        \lipsum[5]
    \end{document}

답변1

요청하신 대로 장과 부분 제목 앞의 왼쪽 여백에 기호가 표시됩니다.

% symdivprob.tex  SE 639496  (Symbol before divisions)

\documentclass[fancy,12pt,a4paper,oneside,table]{memoir}
    \usepackage{lipsum}
    \usepackage{xcolor}
    
    \definecolor{sectioncolour}{RGB}{247,131,53}
    \definecolor{chaptercolour}{RGB}{23,85,142}
    \definecolor{subsectioncolour}{RGB}{5,130,34}
    
%%%% PW symbol stuff
    \newcommand{\symdiv}{$\clubsuit$}
    \newcommand{\lsymdiv}{\llap \symdiv}
    \let\saveprintchaptitle\printchaptertitle
    \renewcommand{\printchaptertitle}[1]{\llap\symdiv #1}
    
    \renewcommand{\chapnamefont}{\normalfont\large\sffamily\scshape\center\color{chaptercolour}}
    \renewcommand{\chapnumfont}{\Huge\bfseries\sffamily\color{chaptercolour}}
    \renewcommand{\chaptitlefont}{\normalfont\Huge\bfseries\sffamily\center\color{chaptercolour}}
    \setsecheadstyle{\Large\bfseries\sffamily\color{sectioncolour}\lsymdiv}
    \setsubsecheadstyle{\large\bfseries\sffamily\color{subsectioncolour}\lsymdiv}
    \begin{document}
    \chapter{Guide Intro}
        \lipsum[2]
        \section{Operations}
        %        \lipsum[2]
        Just a little bit of text. Just a little bit of text.
        Just a little bit of text. Just a little bit of text.
        Just a little bit of text. Just a little bit of text. 
        \subsection{General view}
        Just a little bit more of text. Just a little bit more of text.
        Just a little bit more of text. Just a little bit more of text.
        Just a little bit more of text. Just a little bit more of text. 

    \end{document}

여기에 이미지 설명을 입력하세요

관련 정보