사용자 정의 섹션 번호 매기기(문자 및 숫자)

사용자 정의 섹션 번호 매기기(문자 및 숫자)

나도 그런 걸 가질 수 있을까?

1. section one
  1.1 subsection one
  1.2 subsction two

2. section two
  2.1 subsection two

    A. title
       1) subtitle A.1
       2) subtitle A.2

    B. title
       1) subtitle B.1
           a) subsubtitle B.1.a
           b) subsubtitle B.1.b
       2) subtitle B.2

    C. title
    .
    .
    .
    .
    etc

          2.1.1 subsubsection two one
          2.1.2 subsubsection two two
          2.1.3 subsubsection two three
          2.1.4 subsubsection two four

아이디어는 다음과 같이 열거된 제목/섹션을 소개하는 것입니다.편지또는 결국 다른 것이지만 섹션 구조를 변경하지 않습니다. 따라서 이 열거는 다음과 같이 나타날 수 있습니다.목차.

답변1

다음을 사용하여 새로운 섹션 수준을 추가할 수 있습니다.titlesec. 다음 예에서는 아래와 위에 있는 두 개의 새로운 섹션 수준 \Title\subtitle(명령과의 혼동을 피하기 위해 대문자 T가 있음 )을 소개합니다 .\title\subsection\subsubsection

\documentclass{article}
\usepackage{titlesec}
\titleclass{\Title}{straight}[\subsection]
\titleclass{\subtitle}{straight}[\Title]
\newcounter{Title}
\newcounter{subtitle}
\renewcommand*{\theTitle}{\Alph{Title}}
\renewcommand*{\thesubtitle}{\arabic{subtitle})}
\titleformat{\Title}{\bfseries\large}{\theTitle}{1em}{}
\titleformat{\subtitle}{\bfseries}{\thesubtitle}{1em}{}
\titlespacing*{\Title}{1.5em}{6pt}{6pt}
\titlespacing*{\subtitle}{3em}{6pt}{6pt}
\setcounter{secnumdepth}{5}

\begin{document}

\section{Section one}
\subsection{Subsection one}
\subsection{Subsection two}

\section{Section two}
\subsection{Subsection one}
\Title{Title}
\subtitle{Subtitle A.1}
\subtitle{Subtitle A.2}

\subsubsection{Subsubsection one}
\subsubsection{Subsubsection two}
\end{document}

출력은 다음과 같습니다.

새 섹션 수준의 일반 형식은 \titleformat및 을 사용하여 변경할 수 \titlespacing있으며 번호 매기기는 \theTitle\thesubtitle명령을 사용하여 변경할 수 있습니다. 이 예를 사용하면 새 섹션 수준이 ToC에 나타나지만 형식은 예를 들어 수동으로 처리해야 합니다 titletoc.

관련 정보