|
5 | 5 | %% This work may be distributed and/or modified freely
|
6 | 6 | %% available at https://ddswhu.me/resource/
|
7 | 7 | % %
|
8 |
| -%% Last Modification 2018-12-31 |
| 8 | +%% Last Modification 2018-01-08 |
9 | 9 | %%%%%%%%%%%%%%%%%%%%%
|
10 | 10 | % % !Mode:: "TeX:UTF-8"
|
11 | 11 | \NeedsTeXFormat{LaTeX2e}
|
12 |
| -\ProvidesClass{elegantbook}[2018/12/31 v3.02 ElegantBook document class] |
| 12 | +\ProvidesClass{elegantbook}[2018/01/08 v3.03 ElegantBook document class] |
13 | 13 |
|
14 | 14 | \RequirePackage{kvoptions}
|
15 | 15 | \RequirePackage{etoolbox}
|
16 | 16 | \SetupKeyvalOptions{family=ELEGANT, prefix=ELEGANT@, setkeys=\kvsetkeys}
|
17 | 17 | \newcommand{\ekv}[1]{\kvsetkeys{ELEGANT}{#1}}
|
18 | 18 |
|
19 | 19 | % ----- Colors -----
|
20 |
| -\DeclareStringOption[green]{color}[green] |
| 20 | +\DeclareStringOption[green]{color} |
21 | 21 | % ----- backward compatibility
|
22 | 22 | \DeclareVoidOption{green}{\ekv{color = green}}
|
23 | 23 | \DeclareVoidOption{cyan}{\ekv{color = cyan}}
|
|
116 | 116 | \renewcommand{\listfigurename}{插图目录}
|
117 | 117 | \renewcommand{\listtablename}{表格目录}
|
118 | 118 | \renewcommand{\bibname}{参考文献}
|
119 |
| -\renewcommand{\appendixname}{附\hspace{2em}录} |
| 119 | +\renewcommand{\appendixname}{附录} |
120 | 120 | \renewcommand{\indexname}{索\hspace{2em}引}
|
121 | 121 |
|
122 | 122 | % more pretty font
|
|
169 | 169 |
|
170 | 170 | \hypersetup{
|
171 | 171 | breaklinks,
|
172 |
| - unicode, |
| 172 | + unicode, |
| 173 | + linktoc=all, |
173 | 174 | bookmarksnumbered=true,
|
174 | 175 | bookmarksopen=true,
|
175 | 176 | pdfsubject=\@author \@title Book,
|
|
197 | 198 |
|
198 | 199 | %% 章节设置
|
199 | 200 | \RequirePackage[center,pagestyles]{titlesec}
|
200 |
| -\renewcommand{\chaptername}{第 \thechapter\;章} |
| 201 | +\RequirePackage{apptools} |
| 202 | +\RequirePackage[toc,page]{appendix} |
201 | 203 |
|
| 204 | +\renewcommand{\chaptername}{第 \thechapter\;章} |
202 | 205 | \titleformat{\chapter}[\style]{\bfseries}
|
203 |
| -{\filcenter\LARGE\enspace\bfseries{\color{main}\chaptername}\enspace}{1pt}{\bfseries\color{main}\LARGE\filcenter}[\filcenter\base] |
| 206 | +{\filcenter\LARGE\enspace\bfseries{\color{main}\IfAppendix{\appendixname}{\chaptername}\enspace}}{1pt}{\bfseries\color{main}\LARGE\filcenter}[\filcenter\base] |
204 | 207 |
|
205 | 208 |
|
206 | 209 | \titleformat{\section}[hang]{\bfseries}
|
|
352 | 355 | {\Huge \bfseries{\color{main} \the\zhtitle } \the\zhend}\\
|
353 | 356 | \rule{0.8\textwidth}{2pt}
|
354 | 357 | \end{center}
|
355 |
| -\vskip3ex |
356 |
| -\begin{figure}[htp] |
357 |
| -\centering |
358 |
| -\@logo |
359 |
| -\end{figure} |
| 358 | +\vfill |
| 359 | +\vskip5ex |
| 360 | +\centerline{\@logo} |
360 | 361 | \begin{center}
|
361 | 362 | \begin{minipage}{0.65\textwidth}
|
362 | 363 | \indent\centering\color{bule}\@myquote
|
363 | 364 | \end{minipage}
|
364 | 365 | \end{center}
|
365 | 366 | \vfill
|
366 |
| -\vspace{2cm} |
367 | 367 | \begin{flushright}
|
368 | 368 | \color{second}
|
369 | 369 | \rule{0.45\textwidth}{1pt}\\
|
|
0 commit comments