mirror of
https://github.com/ElegantLaTeX/ElegantBook.git
synced 2026-01-26 12:24:36 +08:00
primary of 4.0.5
This commit is contained in:
@@ -13,13 +13,11 @@ ElegantBook 是为 LaTeX 书籍写作而设计的模板,由 [Dongsheng Deng](h
|
|||||||
|
|
||||||
## 重要提示
|
## 重要提示
|
||||||
|
|
||||||
**版本提醒:** 由于新版本进行了重构,并且 3.06 版本对于封面进行了改版,3.06 以后的版本并不兼容之前版本,如果你想把之前版本的文件转为 3.06 以后的版本,请查看[跨版本转换](https://github.com/ElegantLaTeX/ElegantBook/wiki/convert)。我们强烈建议你使用最新版。
|
**重要提示**:ElegantLaTeX 项目 **不接受** 任何非预授权的提交(pull requests)!
|
||||||
|
|
||||||
**重要提示**:ElegantLaTeX 项目 **不接受** 任何非作者预约提交(pull requests)!
|
|
||||||
|
|
||||||
## 致谢
|
## 致谢
|
||||||
|
|
||||||
2019 年 5 月 20 日,ElegantBook 模板在 Github 上的 Star 数达到了 100,这对于 ElegantLaTeX 系列模板是一个非常重要的里程碑!在此特别感谢 ChinaTeX 以及 [LaTeX 工作室](http://www.latexstudio.net/)对于本系列模板的大力宣传与推广。LaTeX 工作室网站上有很多精彩的帖子和精致的模板,欢迎大家去挖掘里面的宝藏。这也是我所见到的国内最全面的 LaTeX 相关的网站。
|
特别感谢 ChinaTeX 以及 [LaTeX 工作室](http://www.latexstudio.net/)对于本系列模板的大力宣传与推广。LaTeX 工作室网站上有很多精彩的帖子和精致的模板,欢迎大家去挖掘里面的宝藏。这也是我所见到的国内最全面的 LaTeX 相关的网站。
|
||||||
|
|
||||||
如果你喜欢我们的模板,你可以在 Github 上收藏我们的模板。
|
如果你喜欢我们的模板,你可以在 Github 上收藏我们的模板。
|
||||||
|
|
||||||
|
|||||||
@@ -13,14 +13,10 @@ ElegantBook is designed for writing books, created by [Dongsheng Deng](https://d
|
|||||||
|
|
||||||
## Important Notes
|
## Important Notes
|
||||||
|
|
||||||
**Version Note**: Users for 2.x, please refer to [Version Convert](https://github.com/ElegantLaTeX/ElegantBook/wiki/convert). We strongly recommend that you use the latest version.
|
For some reasons, __unauthorized__ pull requests are **UNACCEPTABLE** since May 20, 2019. For those who want to help revise the templates, submit issues or clone to your own repository to modify under the LPPL-1.3c.
|
||||||
|
|
||||||
**Important Info**: For some reasons, __unauthorial__ pull requests are **UNACCEPTABLE** since May 20, 2019. For those who want to help revise the templates, submit issues or clone to your own repository to modify under the LPPL-1.3c.
|
|
||||||
|
|
||||||
## Acknowledgement
|
## Acknowledgement
|
||||||
|
|
||||||
_News_: _The number of stars on Github for ElegantBook reached 100 on May 20, 2019_.
|
|
||||||
|
|
||||||
Thank ChinaTeX and [LaTeX Studio](http://www.latexstudio.net/) for their promotion. LaTeX studio offers tons of valuable posts and templates for discovery. It is the most comprehensive website on LaTeX in China. If you like our template, star on Github for supporting us.
|
Thank ChinaTeX and [LaTeX Studio](http://www.latexstudio.net/) for their promotion. LaTeX studio offers tons of valuable posts and templates for discovery. It is the most comprehensive website on LaTeX in China. If you like our template, star on Github for supporting us.
|
||||||
|
|
||||||
## Donation
|
## Donation
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
\author{Ethan Deng \& Liam Huang}
|
\author{Ethan Deng \& Liam Huang}
|
||||||
\institute{Elegant\LaTeX{} Program}
|
\institute{Elegant\LaTeX{} Program}
|
||||||
\date{July 29, 2020}
|
\date{Aug. 4, 2020}
|
||||||
\version{4.0.3}
|
\version{4.0.5}
|
||||||
\bioinfo{自定义}{信息}
|
\bioinfo{自定义}{信息}
|
||||||
|
|
||||||
\extrainfo{温柔正确的人总是难以生存,因为这世界既不温柔,也不正确。—— 比企谷八幡}
|
\extrainfo{温柔正确的人总是难以生存,因为这世界既不温柔,也不正确。—— 比企谷八幡}
|
||||||
@@ -16,11 +16,20 @@
|
|||||||
mathescape = false}
|
mathescape = false}
|
||||||
\logo{logo-blue.png}
|
\logo{logo-blue.png}
|
||||||
\cover{cover.jpg}
|
\cover{cover.jpg}
|
||||||
|
\DeclareCaptionLabelFormat{nospace}{#1#2}
|
||||||
|
\captionsetup[table]{labelfont=bf, labelsep=period}
|
||||||
|
\renewcommand{\thetable}{L~\arabic{table}}
|
||||||
|
|
||||||
% 本文档命令
|
% 本文档命令
|
||||||
\usepackage{array}
|
\usepackage{array}
|
||||||
\newcommand{\ccr}[1]{\makecell{{\color{#1}\rule{1cm}{1cm}}}}
|
\newcommand{\ccr}[1]{\makecell{{\color{#1}\rule{1cm}{1cm}}}}
|
||||||
|
|
||||||
|
\usepackage[lined,dotocloa,algochapter]{algorithm2e}
|
||||||
|
\SetKwData{Left}{left}\SetKwData{This}{this}\SetKwData{Up}{up}
|
||||||
|
\SetKwFunction{Union}{Union}\SetKwFunction{FindCompress}{FindCompress}
|
||||||
|
\SetKwInOut{Input}{input}\SetKwInOut{Output}{output}
|
||||||
|
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
\maketitle
|
\maketitle
|
||||||
@@ -29,6 +38,7 @@
|
|||||||
\chapter*{特别声明}
|
\chapter*{特别声明}
|
||||||
\markboth{Introduction}{前言}
|
\markboth{Introduction}{前言}
|
||||||
|
|
||||||
|
|
||||||
在过去的 2019 年,\href{https://elegantlatex.org/}{Elegant\LaTeX{}} 系列模板均逐步上线 \href{https://github.com/ElegantLaTeX}{GitHub}、\href{https://ctan.org/pkg/elegantbook}{CTAN}、\href{https://www.overleaf.com/latex/templates/elegantbook-template/zpsrbmdsxrgy}{Overleaf} 以及 \href{https://gitee.com/ElegantLaTeX/ElegantBook}{Gitee} 上。截止到 2019 年底,ElegantNote、ElegantBook、ElegantPaper 三个模板在 GitHub 上的收藏数达到了 194、333 和 220,从 2019 年 5 月开启捐赠之后收到了用户 33 笔合计超过 1500 元的捐赠,用户群人数也超过了 400 人。这些数字的背后,反映出 Elegant\LaTeX{} 越来越受用户的喜爱,在此非常感谢大家。
|
在过去的 2019 年,\href{https://elegantlatex.org/}{Elegant\LaTeX{}} 系列模板均逐步上线 \href{https://github.com/ElegantLaTeX}{GitHub}、\href{https://ctan.org/pkg/elegantbook}{CTAN}、\href{https://www.overleaf.com/latex/templates/elegantbook-template/zpsrbmdsxrgy}{Overleaf} 以及 \href{https://gitee.com/ElegantLaTeX/ElegantBook}{Gitee} 上。截止到 2019 年底,ElegantNote、ElegantBook、ElegantPaper 三个模板在 GitHub 上的收藏数达到了 194、333 和 220,从 2019 年 5 月开启捐赠之后收到了用户 33 笔合计超过 1500 元的捐赠,用户群人数也超过了 400 人。这些数字的背后,反映出 Elegant\LaTeX{} 越来越受用户的喜爱,在此非常感谢大家。
|
||||||
|
|
||||||
但是,我想声明的是:
|
但是,我想声明的是:
|
||||||
@@ -54,7 +64,35 @@ February 10, 2020
|
|||||||
\mainmatter
|
\mainmatter
|
||||||
\chapter{Elegant\LaTeX{} 系列模板介绍}
|
\chapter{Elegant\LaTeX{} 系列模板介绍}
|
||||||
|
|
||||||
Elegant\LaTeX{} 项目组致力于打造一系列美观、优雅、简便的模板方便用户使用。目前由 \href{https://github.com/ElegantLaTeX/ElegantNote}{ElegantNote},\href{https://github.com/ElegantLaTeX/ElegantBook}{ElegantBook},\href{https://github.com/ElegantLaTeX/ElegantPaper}{ElegantPaper} 组成,分别用于排版笔记,书籍和工作论文。强烈推荐使用最新正式版本!本文将介绍本模板的一些设置内容以及基本使用方法。如果您有其他问题,建议或者意见,欢迎在 GitHub 上给我们提交 \href{https://github.com/ElegantLaTeX/ElegantBook/issues}{issues} 或者邮件联系我们。
|
\begin{algorithm}\label{alg:test}
|
||||||
|
\Input{A bitmap $I$ of size $w \times l$}
|
||||||
|
\Output{A partition of the bitmap}
|
||||||
|
\BlankLine
|
||||||
|
\emph{special treatment of the first line}\;
|
||||||
|
\For{$i \leftarrow 2$ \KwTo $l$}{
|
||||||
|
\emph{special treatment of the first element of line $i$}\;
|
||||||
|
\For{$j \leftarrow 2$ \KwTo $w$}{\label{forins}
|
||||||
|
$\Left \leftarrow \FindCompress{$I[i,j-1]$}$\;
|
||||||
|
$\Up \leftarrow \FindCompress{$I[i-1,]$}$\;
|
||||||
|
$\This \leftarrow \FindCompress{$I[i,j]$}$\;
|
||||||
|
\If(\tcp*[h]{O(\Left,\This)==1}){\Left compatible with \This}{\label{lt}
|
||||||
|
\lIf{$\Left < \This$}{$\Union{\Left,\This}$}
|
||||||
|
\lElse{$\Union{\This,\Left}$}
|
||||||
|
}
|
||||||
|
\If(\tcp*[f]{O(\Up,\This)==1}){\Up compatible with \This}{\label{ut}
|
||||||
|
\lIf{$\Up < \This$}{$\Union{\Up,\This}$}
|
||||||
|
\tcp{\This is put under \Up to keep tree as flat as possible}\label{cmt}
|
||||||
|
\lElse{$\Union{\This,\Up}$}\tcp*[r]{\This{} linked to \Up}\label{lelse}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
\lForEach{element $e$ of the line $i$}{\FindCompress{p}}
|
||||||
|
}
|
||||||
|
\caption{disjoint decomposition}\label{algo_disjdecomp}
|
||||||
|
\end{algorithm}
|
||||||
|
|
||||||
|
\ref{alg:test}
|
||||||
|
|
||||||
|
Elegant\LaTeX{} 项目组致力于打造一系列美观、优雅、简便的模板方便用户使用。目前由 \href{https://github.com/ElegantLaTeX/ElegantNote}{ElegantNote},\href{https://github.com/ElegantLaTeX/ElegantBook}{ElegantBook},\href{https://github.com/ElegantLaTeX/ElegantPaper}{ElegantPaper} 组成,分别用于排版笔记,书籍和工作论文。强烈推荐使用最新正式版本!本文将介绍本模板的一些设置内容以及基本使用方法。如果您有其他问题,建议或者意见,欢迎在 GitHub 上给我们提交 \href{https://github.com/ElegantLaTeX/ElegantBook/issues}{issues} 或者邮件联系我们。 \ref{sec:update}
|
||||||
|
|
||||||
我们的联系方式如下,建议加入用户 QQ 群提问,这样能更快获得准确的反馈,加群时请备注 \LaTeX{} 或者 Elegant\LaTeX{} 相关内容。
|
我们的联系方式如下,建议加入用户 QQ 群提问,这样能更快获得准确的反馈,加群时请备注 \LaTeX{} 或者 Elegant\LaTeX{} 相关内容。
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
@@ -70,7 +108,7 @@ Elegant\LaTeX{} 项目组致力于打造一系列美观、优雅、简便的模
|
|||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
|
|
||||||
\section{ElegantBook 更新说明}
|
\section{ElegantBook 更新说明}\label{sec:update}
|
||||||
|
|
||||||
此次为 3.x 最后一个版本,在 3.10 基础上,主要为了解决 \TeX{} Live 2020 中编译错误,具体内容有:
|
此次为 3.x 最后一个版本,在 3.10 基础上,主要为了解决 \TeX{} Live 2020 中编译错误,具体内容有:
|
||||||
|
|
||||||
@@ -220,7 +258,7 @@ Elegant\LaTeX{} 系列模板从创立至今已经有 9 年了,我们的模板
|
|||||||
\label{tab:donation}%
|
\label{tab:donation}%
|
||||||
\end{table}%
|
\end{table}%
|
||||||
|
|
||||||
另外,为了表示感谢,我们制作了捐赠纪念证,欢迎大家来信告知邮箱以及姓名(艺名),我们将通过邮件发送电子版纪念证。
|
另外,为了表示感谢,我们制作了捐赠纪念证,欢迎大家来信告知邮箱以及姓名(艺名),我们将通过邮件发送电子版纪念证。\ref{tab:donation} 是捐赠名单。
|
||||||
|
|
||||||
\begin{figure}[!htbp]
|
\begin{figure}[!htbp]
|
||||||
\centering
|
\centering
|
||||||
@@ -599,13 +637,15 @@ The content of introduction.
|
|||||||
|
|
||||||
\end{remark}
|
\end{remark}
|
||||||
|
|
||||||
\part{中文}
|
\part{模板设置}
|
||||||
|
|
||||||
\chapter{字体选项}
|
\chapter{字体选项}
|
||||||
字体选项独立成章的原因是,我们希望本模板的用户关心模板使用的字体,知晓自己使用的字体以及遇到字体相关的问题能更加便捷地找到答案。
|
字体选项独立成章的原因是,我们希望本模板的用户关心模板使用的字体,知晓自己使用的字体以及遇到字体相关的问题能更加便捷地找到答案。
|
||||||
|
|
||||||
\textcolor{red}{\bfseries 重要提示}:从 3.10 版本更新之后,沿用至今的 newtx 系列字体被重新更改为 cm 字体。并且新增中文字体(\lstinline{chinesefont})选项。
|
\textcolor{red}{\bfseries 重要提示}:从 3.10 版本更新之后,沿用至今的 newtx 系列字体被重新更改为 cm 字体。并且新增中文字体(\lstinline{chinesefont})选项。
|
||||||
|
|
||||||
|
OpenType 字体设置参考 Stone-Zeng \href{https://stone-zeng.github.io/2018-08-08-use-opentype-fonts/}{在 \LaTeX{} 中使用 OpenType 字体}。
|
||||||
|
|
||||||
\section{数学字体选项}
|
\section{数学字体选项}
|
||||||
|
|
||||||
本模板定义了一个数学字体选项(\lstinline{math}),可选项有三个:
|
本模板定义了一个数学字体选项(\lstinline{math}),可选项有三个:
|
||||||
@@ -761,6 +801,8 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
|
|||||||
(2)若 $f(x,y)$ 是 $\mathcal{R}^p\times\mathcal{R}^q$ 上的可积函数,则对几乎处处的 $x\in\mathcal{R}^p$,$f(x,y)$ 作为 $y$ 的函数是 $\mathcal{R}^q$ 上的可积函数,并且 $g(x)=\int_{\mathcal{R}^q}f(x,y) dy$ 是 $\mathcal{R}^p$ 上的可积函数。而且~\ref{eq:461} 成立。
|
(2)若 $f(x,y)$ 是 $\mathcal{R}^p\times\mathcal{R}^q$ 上的可积函数,则对几乎处处的 $x\in\mathcal{R}^p$,$f(x,y)$ 作为 $y$ 的函数是 $\mathcal{R}^q$ 上的可积函数,并且 $g(x)=\int_{\mathcal{R}^q}f(x,y) dy$ 是 $\mathcal{R}^p$ 上的可积函数。而且~\ref{eq:461} 成立。
|
||||||
\end{theorem}
|
\end{theorem}
|
||||||
|
|
||||||
|
\ref{thm:fubi}
|
||||||
|
|
||||||
\begin{note}
|
\begin{note}
|
||||||
在本模板中,引理(lemma),推论(corollary)的样式和定理~\ref{thm:fubi} 的样式一致,包括颜色,仅仅只有计数器的设置不一样。
|
在本模板中,引理(lemma),推论(corollary)的样式和定理~\ref{thm:fubi} 的样式一致,包括颜色,仅仅只有计数器的设置不一样。
|
||||||
\end{note}
|
\end{note}
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
\author{Ethan Deng \& Liam Huang}
|
\author{Ethan Deng \& Liam Huang}
|
||||||
\institute{Elegant\LaTeX{} Program}
|
\institute{Elegant\LaTeX{} Program}
|
||||||
\date{July 29, 2020}
|
\date{Aug. 4, 2020}
|
||||||
\version{4.0.3}
|
\version{4.0.5}
|
||||||
\bioinfo{Bio}{Information}
|
\bioinfo{Bio}{Information}
|
||||||
|
|
||||||
\extrainfo{Victory won\rq t come to us unless we go to it. }
|
\extrainfo{Victory won\rq t come to us unless we go to it. }
|
||||||
@@ -14,6 +14,13 @@
|
|||||||
\logo{logo-blue.png}
|
\logo{logo-blue.png}
|
||||||
\cover{cover.jpg}
|
\cover{cover.jpg}
|
||||||
|
|
||||||
|
\usepackage[symbols,nogroupskip,sort=none]{glossaries-extra}
|
||||||
|
|
||||||
|
\glsxtrnewsymbol[description={position}]{x}{\ensuremath{x}}
|
||||||
|
\glsxtrnewsymbol[description={velocity force it name position Subtraction Operator force it name position Subtraction Operator force it name position Subtraction Operator force it name position Subtraction Operator}]{v}{\ensuremath{v}}
|
||||||
|
\glsxtrnewsymbol[description={acceleration}]{a}{\ensuremath{a}}
|
||||||
|
\glsxtrnewsymbol[description={time}]{t}{\ensuremath{t}}
|
||||||
|
\glsxtrnewsymbol[description={force it name position Subtraction Operator}]{F}{\ensuremath{F}}
|
||||||
|
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
@@ -24,8 +31,11 @@
|
|||||||
\tableofcontents
|
\tableofcontents
|
||||||
|
|
||||||
\mainmatter
|
\mainmatter
|
||||||
|
\printunsrtglossary[type=symbols,style=long]
|
||||||
|
|
||||||
|
|
||||||
\chapter{Elegant\LaTeX{} Templates}
|
\chapter{Elegant\LaTeX{} Templates}
|
||||||
Elegant\LaTeX{} Program developers are intended to provide you beautiful, elegant, user-friendly templates. Currently, the Elegant\LaTeX{} is composed of \href{https://github.com/ElegantLaTeX/ElegantNote}{ElegantNote}, \href{https://github.com/ElegantLaTeX/ElegantBook}{ElegantBook}, \href{https://github.com/ElegantLaTeX/ElegantPaper}{ElegantPaper}, designed for typesetting notes, books, and working papers respectively. Latest releases are strongly recommended! This guide is aimed at briefly introducing the 101 of this template. For any other question, suggestion or comment, feel free to contact us on GitHub \href{https://github.com/ElegantLaTeX/ElegantBook/issues}{issues} or email us at \email{elegantlatex2e@gmail.com}.
|
Elegant\LaTeX{} Program developers are intended to provide you beautiful, elegant, user-friendly templates. Currently, the Elegant\LaTeX{} is composed of \href{https://github.com/ElegantLaTeX/ElegantNote}{ElegantNote}, \href{https://github.com/ElegantLaTeX/ElegantBook}{ElegantBook}, \href{https://github.com/ElegantLaTeX/ElegantPaper}{ElegantPaper}, designed for typesetting notes, books, and working papers respectively. Latest releases are strongly recommended! This guide is aimed at briefly introducing the 101 of this template. For any other question, suggestion or comment, feel free to contact us on GitHub \href{https://github.com/ElegantLaTeX/ElegantBook/issues}{issues} or email us at \email{elegantlatex2e@gmail.com}. $\gls{F}$
|
||||||
|
|
||||||
Contact Infos:
|
Contact Infos:
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
@@ -176,13 +186,12 @@ BTW, we provide Certificate of Donation for those who donated, tippers please le
|
|||||||
\includegraphics[width=0.7\textwidth]{cert.pdf}
|
\includegraphics[width=0.7\textwidth]{cert.pdf}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
\part{Hello world}
|
\part{HELLO WORLD}
|
||||||
\chapter{ElegantBook Settings}
|
|
||||||
|
|
||||||
This template is based on the Standard \LaTeX{} book class, so the options of book class work as well (Note that the option of papersize has no effect due to \lstinline{device} option). The default encoding is UTF-8 while \TeX{} Live is recommended. The test environment is Win10 + \TeX{} Live 2019, either \hologo{pdfLaTeX} or \lstinline{XeLaTeX} works fine. \lstinline{XeLaTeX} is preferred for Chinese articles.
|
This template is based on the Standard \LaTeX{} book class, so the options of book class work as well (Note that the option of papersize has no effect due to \lstinline{device} option). The default encoding is UTF-8 while \TeX{} Live is recommended. The test environment is Win10 + \TeX{} Live 2019, either \hologo{pdfLaTeX} or \lstinline{XeLaTeX} works fine. \lstinline{XeLaTeX} is preferred for Chinese articles.
|
||||||
|
|
||||||
\section{Languages}
|
\section{Languages}
|
||||||
We defined one option named \lstinline{lang} which has three alternative values, \lstinline{lang=en} (default) , \lstinline{lang=cn} and \lstinline{lang=it}\footnote{Provided by \href{https://github.com/VincentMVV}{VincentMVV}, detail in \href{https://github.com/ElegantLaTeX/ElegantBook/issues/85}{GitHub: Italian translation}.}. Different values will alter the captions of figure/table, abstract name, refname, etc. You can use this option as
|
We defined one option named \lstinline{lang} which has three alternative values, \lstinline{lang=en} (default) , \lstinline{lang=cn} and \lstinline{lang=it}\footnote{Provided by \href{https://github.com/VincentMVV}{VincentMVV}, detail in \href{https://github.com/ElegantLaTeX/ElegantBook/issues/85}{GitHub: Italian translation}.}. Different values will alter the captions of figure/table, abstract name, refname, etc. You can use this option as {\sffamily This is sffamily}
|
||||||
\begin{lstlisting}
|
\begin{lstlisting}
|
||||||
\documentclass[en]{elegantbook}
|
\documentclass[en]{elegantbook}
|
||||||
\documentclass[lang=en]{elegantbook}
|
\documentclass[lang=en]{elegantbook}
|
||||||
|
|||||||
106
elegantbook.cls
106
elegantbook.cls
@@ -8,7 +8,7 @@
|
|||||||
%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%
|
||||||
% % !Mode:: "TeX:UTF-8"
|
% % !Mode:: "TeX:UTF-8"
|
||||||
\NeedsTeXFormat{LaTeX2e}
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
\ProvidesClass{elegantbook}[2020/07/29 v4.0.3 ElegantBook document class]
|
\ProvidesClass{elegantbook}[2020/08/04 v4.0.5 ElegantBook document class]
|
||||||
|
|
||||||
\RequirePackage{kvoptions}
|
\RequirePackage{kvoptions}
|
||||||
\RequirePackage{etoolbox}
|
\RequirePackage{etoolbox}
|
||||||
@@ -187,7 +187,31 @@
|
|||||||
\newcommand{\cfs}{\normalfont}
|
\newcommand{\cfs}{\normalfont}
|
||||||
\fi
|
\fi
|
||||||
|
|
||||||
\RequirePackage{newtxtext}
|
|
||||||
|
\usepackage{fontspec}
|
||||||
|
\setmainfont{TeX Gyre TermesX}
|
||||||
|
\setsansfont{TeX Gyre Heros}
|
||||||
|
\setmonofont{Latin Modern Mono}
|
||||||
|
|
||||||
|
% Libertinus Serif/Libertinus Sans
|
||||||
|
|
||||||
|
% TeX Gyre TermesX/TeX Gyre Heros
|
||||||
|
|
||||||
|
\defaultfontfeatures[TeX Gyre TermesX,TeX Gyre Heros]{
|
||||||
|
Extension = .otf,
|
||||||
|
UprightFont = *-regular,
|
||||||
|
BoldFont = *-bold,
|
||||||
|
ItalicFont = *-italic,
|
||||||
|
BoldItalicFont = *-bolditalic
|
||||||
|
}
|
||||||
|
\defaultfontfeatures[Latin Modern Mono]{
|
||||||
|
Extension = .otf,
|
||||||
|
UprightFont = *-regular,
|
||||||
|
BoldFont = *-bold,
|
||||||
|
ItalicFont = *-oblique,
|
||||||
|
BoldItalicFont = *-boldoblique
|
||||||
|
}
|
||||||
|
|
||||||
\RequirePackage{anyfontsize}
|
\RequirePackage{anyfontsize}
|
||||||
\ifdefstring{\ELEGANT@math}{newtx}{
|
\ifdefstring{\ELEGANT@math}{newtx}{
|
||||||
\RequirePackage{newtxmath}
|
\RequirePackage{newtxmath}
|
||||||
@@ -211,7 +235,7 @@
|
|||||||
% ----- Handle Colors -----
|
% ----- Handle Colors -----
|
||||||
%% 章节以及页脚图形
|
%% 章节以及页脚图形
|
||||||
|
|
||||||
\RequirePackage{xcolor}
|
\RequirePackage[table]{xcolor}
|
||||||
\ifdefstring{\ELEGANT@color}{green}{
|
\ifdefstring{\ELEGANT@color}{green}{
|
||||||
\definecolor{structurecolor}{RGB}{0,120,2}%
|
\definecolor{structurecolor}{RGB}{0,120,2}%
|
||||||
\definecolor{main}{RGB}{0,120,2}%
|
\definecolor{main}{RGB}{0,120,2}%
|
||||||
@@ -325,7 +349,7 @@
|
|||||||
% \renewcommand{\qed}{\hfill\ensuremath{\square}}
|
% \renewcommand{\qed}{\hfill\ensuremath{\square}}
|
||||||
\RequirePackage{booktabs}
|
\RequirePackage{booktabs}
|
||||||
\RequirePackage{multicol,multirow}
|
\RequirePackage{multicol,multirow}
|
||||||
\RequirePackage{xcolor}
|
|
||||||
\RequirePackage{fancyvrb}
|
\RequirePackage{fancyvrb}
|
||||||
\RequirePackage{makecell,lipsum,hologo}
|
\RequirePackage{makecell,lipsum,hologo}
|
||||||
%%中文结构名字
|
%%中文结构名字
|
||||||
@@ -350,13 +374,13 @@
|
|||||||
\renewcommand{\listfigurename}{插图目录}
|
\renewcommand{\listfigurename}{插图目录}
|
||||||
\renewcommand{\listtablename}{表格目录}
|
\renewcommand{\listtablename}{表格目录}
|
||||||
\renewcommand{\bibname}{参考文献}
|
\renewcommand{\bibname}{参考文献}
|
||||||
\renewcommand{\appendixname}{附录~\thechapter}
|
\renewcommand{\appendixname}{附录~\thechapter\;}
|
||||||
\renewcommand{\indexname}{索\hspace{2em}引}
|
\renewcommand{\indexname}{索\hspace{2em}引}
|
||||||
\newcommand\figref[1]{\textbf{图}~\ref{#1}}
|
\newcommand\figref[1]{\textbf{图}~\ref{#1}}
|
||||||
\newcommand\tabref[1]{\textbf{表}~\ref{#1}}
|
\newcommand\tabref[1]{\textbf{表}~\ref{#1}}
|
||||||
\ifdefstring{\ELEGANT@scheme}{chinese}{
|
\ifdefstring{\ELEGANT@scheme}{chinese}{
|
||||||
\renewcommand{\chaptername}{第~\zhnumber{\arabic{chapter}}~章}}{
|
\renewcommand{\chaptername}{第\zhnumber{\arabic{chapter}}章}}{
|
||||||
\renewcommand{\chaptername}{第~\thechapter{}~章}}
|
\renewcommand{\chaptername}{第 \thechapter{} 章}}
|
||||||
\newcommand{\authorname}{\citshape 作者:}
|
\newcommand{\authorname}{\citshape 作者:}
|
||||||
\newcommand{\institutename}{\citshape 组织:}
|
\newcommand{\institutename}{\citshape 组织:}
|
||||||
\newcommand{\datename}{\citshape 时间:}
|
\newcommand{\datename}{\citshape 时间:}
|
||||||
@@ -388,8 +412,6 @@
|
|||||||
\setlength\parindent{2em}
|
\setlength\parindent{2em}
|
||||||
\newcommand\figref[1]{\textbf{Figure}~\ref{#1}}
|
\newcommand\figref[1]{\textbf{Figure}~\ref{#1}}
|
||||||
\newcommand\tabref[1]{\textbf{Table}~\ref{#1}}
|
\newcommand\tabref[1]{\textbf{Table}~\ref{#1}}
|
||||||
\renewcommand{\partname}{\color{structurecolor} Part}
|
|
||||||
\renewcommand{\chaptername}{Chapter \thechapter}
|
|
||||||
\newcommand{\authorname}{\textbf{Author: }}
|
\newcommand{\authorname}{\textbf{Author: }}
|
||||||
\newcommand{\institutename}{\textbf{Institute: }}
|
\newcommand{\institutename}{\textbf{Institute: }}
|
||||||
\newcommand{\datename}{\textbf{Date: }}
|
\newcommand{\datename}{\textbf{Date: }}
|
||||||
@@ -419,11 +441,13 @@
|
|||||||
}{\relax}
|
}{\relax}
|
||||||
|
|
||||||
\ifdefstring{\ELEGANT@lang}{it}{
|
\ifdefstring{\ELEGANT@lang}{it}{
|
||||||
|
% \RequirePackage[utf8]{inputenc}
|
||||||
\RequirePackage[italian]{babel}
|
\RequirePackage[italian]{babel}
|
||||||
|
% \RequirePackage[T1]{fontenc}
|
||||||
\setlength\parindent{2em}
|
\setlength\parindent{2em}
|
||||||
\newcommand\figref[1]{\textbf{Figura}~\ref{#1}}
|
\newcommand\figref[1]{\textbf{Figura}~\ref{#1}}
|
||||||
\newcommand\tabref[1]{\textbf{Tabella}~\ref{#1}}
|
\newcommand\tabref[1]{\textbf{Tabella}~\ref{#1}}
|
||||||
\renewcommand{\chaptername}{Capitolo \arabic{chapter}}
|
% \renewcommand{\chaptername}{Capitolo \thechapter}
|
||||||
\newcommand{\authorname}{\textbf{Autore: }}
|
\newcommand{\authorname}{\textbf{Autore: }}
|
||||||
\newcommand{\institutename}{\textbf{Istituto: }}
|
\newcommand{\institutename}{\textbf{Istituto: }}
|
||||||
\newcommand{\datename}{\textbf{Data: }}
|
\newcommand{\datename}{\textbf{Data: }}
|
||||||
@@ -453,18 +477,10 @@
|
|||||||
}{\relax}
|
}{\relax}
|
||||||
|
|
||||||
|
|
||||||
\RequirePackage{xpatch}
|
|
||||||
\xpatchcmd{\part}{
|
|
||||||
\thispagestyle{plain}}{
|
|
||||||
\thispagestyle{plain}}{}{}
|
|
||||||
\xpatchcmd{\@endpart}{
|
|
||||||
\vfil\newpage}{
|
|
||||||
\vfil\newpage}{}{}
|
|
||||||
|
|
||||||
\graphicspath{{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}}
|
\graphicspath{{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}}
|
||||||
|
|
||||||
\usepackage{tikz} %% load tikz without tikz
|
\RequirePackage{tikz} %% load tikz without tikz
|
||||||
\usetikzlibrary{backgrounds,calc,shadows}
|
\usetikzlibrary{backgrounds,calc,shadows,positioning,fit}
|
||||||
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
|
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
|
||||||
\node[shape=circle,draw,inner sep=1pt] (char) {#1};}}
|
\node[shape=circle,draw,inner sep=1pt] (char) {#1};}}
|
||||||
% https://tex.stackexchange.com/questions/7032/good-way-to-make-textcircled-numbers
|
% https://tex.stackexchange.com/questions/7032/good-way-to-make-textcircled-numbers
|
||||||
@@ -487,10 +503,10 @@
|
|||||||
\RequirePackage[toc,page,title,titletoc]{appendix}
|
\RequirePackage[toc,page,title,titletoc]{appendix}
|
||||||
|
|
||||||
\setcounter{secnumdepth}{5}
|
\setcounter{secnumdepth}{5}
|
||||||
|
\newcommand{\chapterextra}{\ifdefstring{\ELEGANT@lang}{cn}{}{\thechapter\enspace}}
|
||||||
\titleformat{\chapter}[\style]{\bfseries}
|
\titleformat{\chapter}[\style]{\bfseries}{
|
||||||
{\filcenter\LARGE\enspace\bfseries{\color{structurecolor}\IfAppendix{\appendixname}{\chaptername}\enspace}}{1pt}{\bfseries\color{structurecolor}\LARGE\filcenter}[]
|
\filcenter\LARGE\enspace\bfseries{\color{structurecolor} \chaptertitlename\ \chapterextra}}{1pt}{
|
||||||
|
\LARGE\bfseries\color{structurecolor}\filcenter}[]
|
||||||
\titleformat{\section}[hang]{\bfseries}{
|
\titleformat{\section}[hang]{\bfseries}{
|
||||||
\Large\bfseries{\color{structurecolor}\thesection}\enspace}{1pt}{%
|
\Large\bfseries{\color{structurecolor}\thesection}\enspace}{1pt}{%
|
||||||
\color{structurecolor}\Large\bfseries\filright}
|
\color{structurecolor}\Large\bfseries\filright}
|
||||||
@@ -704,7 +720,7 @@
|
|||||||
\end{tcolorbox}}
|
\end{tcolorbox}}
|
||||||
|
|
||||||
\RequirePackage{adforn}
|
\RequirePackage{adforn}
|
||||||
\newenvironment{problemset}[1][\chaptername~\problemsetname]{
|
\newenvironment{problemset}[1][\chaptername~\chapterextra\problemsetname]{
|
||||||
\begin{center}
|
\begin{center}
|
||||||
\phantomsection\addcontentsline{toc}{section}{\texorpdfstring{\chaptername\;\problemsetname}{\problemsetname}}
|
\phantomsection\addcontentsline{toc}{section}{\texorpdfstring{\chaptername\;\problemsetname}{\problemsetname}}
|
||||||
\textcolor{structurecolor}{\Large\bfseries\adftripleflourishleft~#1~\adftripleflourishright}
|
\textcolor{structurecolor}{\Large\bfseries\adftripleflourishleft~#1~\adftripleflourishright}
|
||||||
@@ -820,7 +836,7 @@
|
|||||||
|
|
||||||
|
|
||||||
\RequirePackage{listings}
|
\RequirePackage{listings}
|
||||||
\renewcommand{\ttdefault}{cmtt}
|
% \renewcommand{\ttdefault}{cmtt}
|
||||||
\lstdefinestyle{mystyle}{
|
\lstdefinestyle{mystyle}{
|
||||||
basicstyle=%
|
basicstyle=%
|
||||||
\ttfamily
|
\ttfamily
|
||||||
@@ -897,3 +913,41 @@
|
|||||||
\end{multicols}}{
|
\end{multicols}}{
|
||||||
\@starttoc{toc}}
|
\@starttoc{toc}}
|
||||||
\if@restonecol\twocolumn\fi}
|
\if@restonecol\twocolumn\fi}
|
||||||
|
|
||||||
|
|
||||||
|
\labelformat{section}{Section~#1}
|
||||||
|
\labelformat{theorem}{定理~#1}
|
||||||
|
\labelformat{algorithm}{算法~#1}
|
||||||
|
\labelformat{exercise}{习题~#1}
|
||||||
|
|
||||||
|
\RequirePackage{pagecolor}
|
||||||
|
\def\@part[#1]#2{%
|
||||||
|
\newcommand*{\mylmargin}{\dimexpr\oddsidemargin+1in\relax}
|
||||||
|
\ifnum \c@secnumdepth >-2\relax
|
||||||
|
\refstepcounter{part}%
|
||||||
|
\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
|
||||||
|
\else
|
||||||
|
\addcontentsline{toc}{part}{#1}%
|
||||||
|
\fi
|
||||||
|
\markboth{}{}%
|
||||||
|
{
|
||||||
|
\centering
|
||||||
|
\newpagecolor{structurecolor!10}
|
||||||
|
\interlinepenalty \@M
|
||||||
|
\normalfont
|
||||||
|
\vskip 30\p@
|
||||||
|
\hspace{-\the\mylmargin}
|
||||||
|
\fboxsep0pt
|
||||||
|
\colorbox{white}{
|
||||||
|
\begin{minipage}[c]{1.0\paperwidth}
|
||||||
|
\centering
|
||||||
|
\parbox{0.7\textwidth}{
|
||||||
|
\centering
|
||||||
|
\vspace*{1.5\baselineskip}
|
||||||
|
\Huge\scshape\bfseries \textcolor{structurecolor}{\thepart.\; #2}
|
||||||
|
\vspace*{0.7\baselineskip}}
|
||||||
|
\end{minipage}}}
|
||||||
|
\@endpart
|
||||||
|
\restorepagecolor}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user