作者LSC112233 (LSC)
看板LaTeX
標題Re: [問題] 獨立的節編號?
時間Thu Dec 22 05:12:47 2011
※ 引述《swyang (來聊天吧)》之銘言:
: 我想知道要怎麼做到像這樣的編號
: Chapter 1
: Section 1
: Section 2
: Section 3
: Chapter 2
: Section 4
: Section 5
: ......
: 謝謝
把以下加入preamble
\makeatletter
\renewcommand{\thesection}{\@arabic\c@section}
\makeatother
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 210.61.41.36
1F:→ swyang:謝謝你的回答,但試了一下發現不行,也許我沒說清楚我想要的 12/24 13:29
2F:推 swyang:我希望節的編號會一直累進而不會隨著章增加而再從1開始算 12/24 13:33
這個稍微麻煩了些,以下加入preamble:
\makeatletter
\def\@removefromreset#1#2{%
\let\@tempb\@elt
\expandafter\let\expandafter\@tempa
\csname c@#1\endcsname
\def\@elt##1{\expandafter\ifx
\csname c@##1\endcsname\@tempa\else
\noexpand\@elt{##1}\fi}%
\expandafter\protected@edef
\csname cl@#2\endcsname
{\csname cl@#2\endcsname}%
\let\@elt\@tempb}
\@removefromreset{section}{chapter}
\renewcommand{\thesection}{\@arabic\c@section}
\makeatother
※ 編輯: LSC112233 來自: 111.255.176.119 (12/24 18:06)