Skip to content

Commit

Permalink
Replaced the package CJKnum by zhnumber
Browse files Browse the repository at this point in the history
  • Loading branch information
wenweili committed Jan 6, 2024
1 parent 63ff034 commit a6ece4d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions AJbook.cls
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

\RequirePackage{fontspec} % XeLaTeX
\RequirePackage[CJKchecksingle]{xeCJK} % XeCJK
\RequirePackage{CJKnumb} % 使用 CJK 数字
\RequirePackage{zhnumber} % 中文数字转换

% 引入 AMS 宏包 + mathtools
\RequirePackage[intlimits]{amsmath}
Expand Down Expand Up @@ -359,7 +359,7 @@
\pagestyle{fancy}
\if@AJ@CJKthechapter
\renewcommand{\chaptermark}[1]{\markboth{
\CJKnumber{\thechapter}章\quad #1
\zhnumber{\thechapter}章\quad #1
}{}}
\else
\renewcommand{\chaptermark}[1]{\markboth{
Expand Down
2 changes: 1 addition & 1 deletion AJerrata.cls
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

\RequirePackage{fontspec} % XeLaTeX
\RequirePackage[CJKchecksingle]{xeCJK} % XeCJK
\RequirePackage{CJKnumb} % 使用 CJK 数字
\RequirePackage{zhnumber} % 中文数字转换

% 引入 AMS 宏包 + mathtools
\RequirePackage[intlimits]{amsmath}
Expand Down
Binary file modified Template-AJbook.pdf
Binary file not shown.
9 changes: 5 additions & 4 deletions titles-setup.tex
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

% 目录部分: 章名除附录外仍用中文标号, 黑体显示. 以参数是否为大写拉丁字母来判定是否在附录 (烂招)
\if@AJ@traditional
\providecommand{\AJchapterttl}[1]{\IfSubStr{ABCDEFGHIJKLMNOPQRSTUVWXYZ}{#1}{附錄 #1 }{第\CJKnumber{#1}章}}
\providecommand{\AJchapterttl}[1]{\IfSubStr{ABCDEFGHIJKLMNOPQRSTUVWXYZ}{#1}{附錄 #1 }{第\zhnumber{#1}章}}
\else
\providecommand{\AJchapterttl}[1]{\IfSubStr{ABCDEFGHIJKLMNOPQRSTUVWXYZ}{#1}{附录 #1 }{第\CJKnumber{#1}章}}
\providecommand{\AJchapterttl}[1]{\IfSubStr{ABCDEFGHIJKLMNOPQRSTUVWXYZ}{#1}{附录 #1 }{第\zhnumber{#1}章}}
\fi

\newlength{\BoxTtlwidth} % 用来计算各种盒子所需宽度
Expand Down Expand Up @@ -162,10 +162,11 @@
\titlespacing*{name=\subsubsection} % 设置间隔
{0pt}{*1}{1em} % {left}{before-sep}{after-sep}

% 不应重新定义 \thepart 命令, 否则 PDF bookmark 将有问题. 改为在 Label 部份转换中文数字.
% 部分编号汉化
\renewcommand{\thepart}{\zhnum{part}}
\titleformat{name=\part}[display] % 各部分标题
{\filcenter\sffamily\bfseries\CJKfamily{song}\Huge} % Format
{第{\CJKnumber{\arabic{part}}}部分} % Label
{第{\thepart}部分} % Label
{1.5em} % Sep
{#1} % Before-code
[] % After-code
Expand Down

0 comments on commit a6ece4d

Please sign in to comment.