วันศุกร์, ตุลาคม 05, 2550

ว่าด้วยการนับเรียงของส่วนพาดหัวใน LaTeX (Numbering Heading)

REF: The LaTeX Companion, pp. 25

Every counter in LaTeX has an associated command constructed by prefixing the counter name with `\the', which generates a typeset representation of the counter in question. In case of the sectioning commands this representation form is used to produce the full number associated with the commands, as in the following definitions:
  • \renewcommand\thechapter{\arabic{chapter}}
  • \renewcommand\thesection{\thechapter.\arabic{section}}
  • \renewcommand\thesubsection{thesection.\arabic{subsection}}
This kind of recursive definition facilitates modifications to the counter representations because changes do not need to be made in more than one place. If you want to number sections using capital letters, you can just redefine the command \thesection:
  • \renewcommand\thesection{\Alph{section}}

ไม่มีความคิดเห็น: