Skip to content

Commit

Permalink
v3.03
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanDeng committed Jan 15, 2019
1 parent dc8d927 commit ec862e0
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 18 deletions.
26 changes: 13 additions & 13 deletions elegantbook.cls
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
%% This work may be distributed and/or modified freely
%% available at https://ddswhu.me/resource/
% %
%% Last Modification 2018-12-31
%% Last Modification 2018-01-08
%%%%%%%%%%%%%%%%%%%%%
% % !Mode:: "TeX:UTF-8"
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{elegantbook}[2018/12/31 v3.02 ElegantBook document class]
\ProvidesClass{elegantbook}[2018/01/08 v3.03 ElegantBook document class]

\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
\SetupKeyvalOptions{family=ELEGANT, prefix=ELEGANT@, setkeys=\kvsetkeys}
\newcommand{\ekv}[1]{\kvsetkeys{ELEGANT}{#1}}

% ----- Colors -----
\DeclareStringOption[green]{color}[green]
\DeclareStringOption[green]{color}
% ----- backward compatibility
\DeclareVoidOption{green}{\ekv{color = green}}
\DeclareVoidOption{cyan}{\ekv{color = cyan}}
Expand Down Expand Up @@ -116,7 +116,7 @@
\renewcommand{\listfigurename}{插图目录}
\renewcommand{\listtablename}{表格目录}
\renewcommand{\bibname}{参考文献}
\renewcommand{\appendixname}{\hspace{2em}录}
\renewcommand{\appendixname}{附录}
\renewcommand{\indexname}{索\hspace{2em}引}

% more pretty font
Expand Down Expand Up @@ -169,7 +169,8 @@

\hypersetup{
breaklinks,
unicode,
unicode,
linktoc=all,
bookmarksnumbered=true,
bookmarksopen=true,
pdfsubject=\@author \@title Book,
Expand Down Expand Up @@ -197,10 +198,12 @@

%% 章节设置
\RequirePackage[center,pagestyles]{titlesec}
\renewcommand{\chaptername}{第 \thechapter\;章}
\RequirePackage{apptools}
\RequirePackage[toc,page]{appendix}

\renewcommand{\chaptername}{第 \thechapter\;章}
\titleformat{\chapter}[\style]{\bfseries}
{\filcenter\LARGE\enspace\bfseries{\color{main}\chaptername}\enspace}{1pt}{\bfseries\color{main}\LARGE\filcenter}[\filcenter\base]
{\filcenter\LARGE\enspace\bfseries{\color{main}\IfAppendix{\appendixname}{\chaptername}\enspace}}{1pt}{\bfseries\color{main}\LARGE\filcenter}[\filcenter\base]


\titleformat{\section}[hang]{\bfseries}
Expand Down Expand Up @@ -352,18 +355,15 @@
{\Huge \bfseries{\color{main} \the\zhtitle } \the\zhend}\\
\rule{0.8\textwidth}{2pt}
\end{center}
\vskip3ex
\begin{figure}[htp]
\centering
\@logo
\end{figure}
\vfill
\vskip5ex
\centerline{\@logo}
\begin{center}
\begin{minipage}{0.65\textwidth}
\indent\centering\color{bule}\@myquote
\end{minipage}
\end{center}
\vfill
\vspace{2cm}
\begin{flushright}
\color{second}
\rule{0.45\textwidth}{1pt}\\
Expand Down
Binary file added figure/ElegantLaTeX_green.pdf
Binary file not shown.
Binary file added figure/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed figure/logo.pdf
Binary file not shown.
Binary file modified figure/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified guide.pdf
Binary file not shown.
21 changes: 16 additions & 5 deletions guide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
\zhend{模板}
\entitle{Elegant\LaTeX{} Book}
\enend{Template}
\version{3.02}
\version{3.03}
\myquote{Victory won\rq t come to us unless we go to it.}
\logo{logo.png}
\logo{ElegantLaTeX_green.pdf}
\cover{cover.pdf}

%green color
Expand All @@ -29,8 +29,6 @@
\usepackage{lipsum}
\usepackage{texnames}



\begin{document}
\maketitle
\tableofcontents
Expand Down Expand Up @@ -223,6 +221,19 @@ \subsection{积分的定义}
\bibliographystyle{aer}
\bibliography{reference}

\addcontentsline{toc}{chapter}{参考文献}
\appendix
\chapter{线性代数}

\section{矩阵的分块}

\begin{equation}
\begin{vmatrix}
A_1 & 0\\
C & A_2
\end{vmatrix}
=|A_1|\times |A_2|
\end{equation}

由矩阵 $A$ 的若干行、若干列的交叉位置元素按照原来顺序排成的矩阵称为 $A$ 的一个\textbf{子矩阵}。

\end{document}

0 comments on commit ec862e0

Please sign in to comment.