.png)
이 매크로 덕분에
\makeatletter
\let\old@makechapterhead\@makechapterhead
\def\@makechapterhead{\def\thechapter{\words{chapter}}\old@makechapterhead}
\makeatother
\newcommand\words[1]{\expandafter\xwords\csname c@#1\endcsname}
\def\xwords#1{\ifcase#1\or
one\or
two\or
three\or
four\or
five\else
I need more words\fi}
이 질문에서 나온 것입니다. 장의 "문자 그대로" 번호 매기기
모두 기분이 좋고, 각 장의 첫 번째 페이지인 "1장", "2장" 등에서 원하는 것을 얻었지만 목차에서는 장의 동일한 숫자 표기법을 사용하므로 문자 그대로입니다. , 내가 원하지 않는 것은 분명합니다. 그렇다면 \arabic{chapter}
콘텐츠에 일반적인 번호 매기기( )를 어떻게 사용할 수 있습니까 ?
답변1
fmtcount
카운터의 철자 값을 얻으려면 패키지를 사용하는 것이 가장 좋습니다 . 이 경우 tocstyle
패키지를 사용하여 목차의 여백을 조정 해야 합니다 .
이것을 장에 사용하려면 section
by 가 있는 모든 항목을 바꾸십시오 chapter
.
\documentclass{article}
\pagestyle{empty}% for cropping
\usepackage{fmtcount,tocstyle}
\renewcommand\thesection{\Numberstring{section}}
\begin{document}
\tableofcontents
\section{First section}
\section{Second section}
\subsection{A subsection}
\section{Third section}
\end{document}