From 99eb12f4c44e11261dc1b69e62f2c182ef0898c8 Mon Sep 17 00:00:00 2001 From: EthanDeng Date: Sun, 18 Sep 2022 19:41:42 +0800 Subject: [PATCH] fix toc width --- elegantbook-cn.tex | 2 +- elegantbook.cls | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/elegantbook-cn.tex b/elegantbook-cn.tex index f0c64ca..69fc65f 100644 --- a/elegantbook-cn.tex +++ b/elegantbook-cn.tex @@ -1,4 +1,4 @@ -\documentclass[lang=cn,10pt,newtx]{elegantbook} +\documentclass[lang=cn,10pt,newtx,scheme=chinese]{elegantbook} \title{ElegantBook:优美的 \LaTeX{} 书籍模板} \subtitle{Elegant\LaTeX{} 经典之作} diff --git a/elegantbook.cls b/elegantbook.cls index e32625f..724ff47 100644 --- a/elegantbook.cls +++ b/elegantbook.cls @@ -1439,7 +1439,10 @@ \ifdefstring{\ELEGANT@lang}{cn}{ % \renewcommand{\cftchappresnum}{\beforechap\space} % \renewcommand{\cftchapaftersnum}{\space\afterchap} - \setlength{\cftchapnumwidth}{\widthof{\textbf{附录~999}}} + % \setlength{\cftchapnumwidth}{\widthof{\textbf{附录~十一}}} + \renewcommand{\numberline}[1]{% + \@cftbsnum #1\@cftasnum~\@cftasnumb ~% + } \g@addto@macro\appendix{% % recover \thechapter in the \NR@chapter's \numberline \ifELEGANT@Hy@later