mirror of
https://github.com/ElegantLaTeX/ElegantBook.git
synced 2026-01-26 20:34:36 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9fbc62984 | ||
|
|
d3ddd4f232 |
11
README.md
Normal file
11
README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Author : ddswhu & Liam Huang-->
|
||||
<!-- Program Email: elegantlatex2e@gmail.com -->
|
||||
|
||||
# Introduction
|
||||
|
||||
ElegantNote is designed for Books. Just enjoy it! If you have any questions, suggestions or bug reports, you can visit [ElegantBook/issues](https://github.com/ElegantLaTeX/ElegantBook/issues). Looking for other templates designed by ElegantLaTeX Group? Please visit: [https://github.com/ElegantLaTeX](https://github.com/ElegantLaTeX).
|
||||
|
||||
|
||||
如果你有其他问题、建议或者报告 bug,可以在 [ElegantBook/issues](https://github.com/ElegantLaTeX/ElegantBook/issues) 留言。如果你想了解更多由 ElegantLaTeX 项目组设计的模板,请访问 [https://github.com/ElegantLaTeX](https://github.com/ElegantLaTeX)。
|
||||
|
||||
This work is released under the LaTeX Project Public License, v1.3c or later.
|
||||
2
base.tex
2
base.tex
@@ -1,6 +1,4 @@
|
||||
|
||||
%% tikz setting
|
||||
\tikzset{x=1pt,y=1pt}
|
||||
\tikzset{elegant/.style={fill=main,draw=main},
|
||||
null/.style={fill=white,draw=none}}
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
%% This work may be distributed and/or modified freely
|
||||
%% available at https://github.com/ElegantLaTeX
|
||||
% %
|
||||
%% Last Modification 2019-01-15
|
||||
%% Last Modification 2019-01-22
|
||||
%%%%%%%%%%%%%%%%%%%%%
|
||||
% % !Mode:: "TeX:UTF-8"
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesClass{elegantbook}[2019/01/15 v3.04 ElegantBook document class]
|
||||
\ProvidesClass{elegantbook}[2019/01/22 v3.05 ElegantBook document class]
|
||||
|
||||
\RequirePackage{kvoptions}
|
||||
\RequirePackage{etoolbox}
|
||||
@@ -39,16 +39,40 @@
|
||||
% \ProcessOptions*\relax
|
||||
\LoadClass[12pt,a4paper,openany]{book}
|
||||
|
||||
|
||||
\RequirePackage[UTF8,space=auto,scheme=plain]{ctex}
|
||||
\RequirePackage{indentfirst}
|
||||
\setlength\parindent{2em}
|
||||
|
||||
% font setting for text and math
|
||||
\RequirePackage[T1]{fontenc}
|
||||
\RequirePackage{ifxetex}
|
||||
\ifxetex
|
||||
\RequirePackage{fontenc}
|
||||
\RequirePackage[no-math]{fontspec}
|
||||
\setmainfont{Times New Roman}[NFSSFamily=ntxtlf]
|
||||
\setsansfont{Arial}
|
||||
%\setmonofont[Scale=0.9]{Courier New}
|
||||
\RequirePackage{xeCJK}
|
||||
\RequirePackage{xunicode}
|
||||
\setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}]{SimSun}
|
||||
\setCJKsansfont[BoldFont={SimHei},ItalicFont={KaiTi}]{KaiTi}
|
||||
\setCJKmonofont[BoldFont={SimHei},ItalicFont={KaiTi},Scale=0.9]{Microsoft YaHei}
|
||||
\XeTeXlinebreaklocale "zh"
|
||||
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt
|
||||
\RequirePackage{newtxmath}
|
||||
%\DeclareSymbolFont{operators}{OT1}{ntxtlf}{m}{n}
|
||||
%\SetSymbolFont{operators}{bold}{OT1}{ntxtlf}{b}{n}
|
||||
\else
|
||||
\RequirePackage{fontenc}
|
||||
\RequirePackage{newtxtext}
|
||||
\RequirePackage{newtxmath}
|
||||
\RequirePackage[scale=0.85]{newtxtt}
|
||||
\RequirePackage[UTF8, scheme=plain]{ctex}
|
||||
\fi
|
||||
\RequirePackage[scale=0.8]{FiraMono}
|
||||
%
|
||||
|
||||
% font setting for text and math
|
||||
% \RequirePackage[T1]{fontenc}
|
||||
% \RequirePackage{newtxtext}
|
||||
% \RequirePackage{newtxmath}
|
||||
% \RequirePackage[scale=0.85]{newtxtt}
|
||||
\RequirePackage{type1cm}
|
||||
|
||||
\DeclareSymbolFont{cmlargesymbols}{OMX}{cmex}{m}{n}
|
||||
@@ -93,7 +117,7 @@
|
||||
}
|
||||
|
||||
\providecommand{\base}{
|
||||
\begin{tikzpicture}[scale=0.2]
|
||||
\begin{tikzpicture}[x=1pt,y=1pt,scale=0.2]
|
||||
\triz{0}{0}
|
||||
\ellz{128}
|
||||
\intz{149}
|
||||
@@ -116,6 +140,11 @@
|
||||
\newtoks\enend
|
||||
\newtoks\zhend
|
||||
|
||||
\RequirePackage{enumerate}
|
||||
% list/itemize/enumerate setting
|
||||
\RequirePackage[shortlabels]{enumitem}
|
||||
\setlist{nolistsep}
|
||||
|
||||
|
||||
%%中文结构名字
|
||||
\renewcommand{\contentsname}{目\hspace{2em}录}
|
||||
@@ -166,11 +195,7 @@
|
||||
linktoc=all,
|
||||
bookmarksnumbered=true,
|
||||
bookmarksopen=true,
|
||||
pdfsubject=\@author \@title Book,
|
||||
pdftitle = {\the\zhtitle\the\zhend},
|
||||
pdfauthor = {\@author}
|
||||
pdfkeywords={ElegantBook},
|
||||
pdfcreator={XeLaTeX with ElegantBook class},
|
||||
colorlinks,
|
||||
linkcolor=main,
|
||||
citecolor=winered,
|
||||
@@ -219,7 +244,7 @@
|
||||
|
||||
\tcbset{
|
||||
common/.style={
|
||||
fontupper=\kaishu,
|
||||
fontupper=\itshape,
|
||||
lower separated=false,
|
||||
coltitle=white,
|
||||
colback=gray!10,
|
||||
|
||||
BIN
elegantbook.pdf
BIN
elegantbook.pdf
Binary file not shown.
@@ -8,9 +8,9 @@
|
||||
\zhend{模板}
|
||||
\entitle{Elegant\LaTeX{} Book}
|
||||
\enend{Template}
|
||||
\version{3.04}
|
||||
\version{3.05}
|
||||
\myquote{Victory won\rq t come to us unless we go to it.}
|
||||
\logo{ElegantLaTeX_green.pdf}
|
||||
\logo{logo.pdf}
|
||||
\cover{cover.pdf}
|
||||
|
||||
%green color
|
||||
@@ -44,7 +44,7 @@
|
||||
\section{ElegantBook 更新说明}
|
||||
在这几年间,我们收到了很多用户的反馈,主要的问题涉及到字体安装,编码支持,定理浮动,定理跨页,交叉引用等等。我们思前想后,原先让用户安装字体以追求视觉上的美观并不完美,用户陷入了巨大的麻烦,这违背了我们的模板初衷。因此我们在新版中删除了这部分,用户无需安装任何字体。让我们来看下此次 ElegantBook 模板 3.x 更新的主要内容有:
|
||||
|
||||
\begin{enumerate}[noitemsep]
|
||||
\begin{enumerate}
|
||||
\item 删除了自定义字体设置,改用 \texttt{ctex} 宏包用以支持中文;
|
||||
\item 使用 \texttt{tcolorbox} 宏包改写了原先的定理类环境,目前定理环境等均可以跨页;
|
||||
\item 重新命名了定理类环境的名称(theorem,definition,proposition 等);
|
||||
@@ -57,7 +57,7 @@
|
||||
\section{未来更新计划}
|
||||
|
||||
|
||||
\begin{enumerate}[noitemsep]
|
||||
\begin{enumerate}
|
||||
\item 重新设计 base 图标;
|
||||
\item 重新设计一个好看的封面。
|
||||
\item 将基础模板改为英文模板,添加选项使其支持中文。
|
||||
@@ -108,9 +108,9 @@ third &\makecell{ {\color{third1}\rule{1cm}{1cm}}}& \makecell{{\color{third2}\ru
|
||||
|
||||
在我们这个模板中,定义了三大类环境
|
||||
|
||||
\begin{enumerate}[noitemsep]
|
||||
\begin{enumerate}
|
||||
\item 定理类环境,包含标题和内容两部分。根据格式的不同分为3种
|
||||
\begin{itemize}[noitemsep]
|
||||
\begin{itemize}
|
||||
\item {\color{main}\bfseries definition} 环境,含有一个可选项,编号以章节为单位,颜色为 {\color{main}main};
|
||||
\item {\color{second}\bfseries theorem、lemma、corollary} 环境,颜色为主颜色 {\color{second}second},编号均以章节为单位;
|
||||
\item {\color{third}\bfseries proposition} 环境,含有一个可选项,编号以章节为单位,颜色为 {\color{third}{third}}。
|
||||
@@ -192,31 +192,36 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
|
||||
|
||||
考虑函数 $y=a+bx$, 其中 $a$ 和 $b$ 是待定常数。如果离散点完全的在一直线上,可以认为变量之间的关系为一元函数。但一般说来,这些点不可能在同一直线上。但是它只能用直线来描述时,计算值与实际值会产生偏差。当然要求偏差越小越好,但由于偏差可正可负,因此不能认为总偏差时,拟合函数很好地反映了变量之间的关系,但是因为此时每个偏差的绝对值可能很大。为了改进这一缺陷,就考虑用平均值来代替。但是由于绝对值不易作解析运算,因此,进一步用残差平方和函数来度量总偏差。偏差的平方和最小可以保证每个偏差都不会很大。于是问题归结为确定拟合函数中的常数和使残差平方和函数最小。
|
||||
|
||||
\begin{figure}[!htbp]
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\includegraphics[width=0.6\textwidth]{mpg.png}
|
||||
\caption{MPG 和 Weight 的关系图\label{fig:mpg}}
|
||||
\includegraphics[width=0.6\textwidth]{scatter.pdf}
|
||||
\caption{散点图示例 $\hat{y}=a+bx$ \label{fig:scatter}}
|
||||
\end{figure}
|
||||
|
||||
|
||||
|
||||
以最简单的一元线性模型来解释最小二乘法。什么是一元线性模型呢?监督学习中,如果预测的变量是离散的,我们称其为分类(如决策树,支持向量机等),如果预测的变量是连续的,我们称其为回归。回归分析中,如果只包括一个自变量和一个因变量,且二者的关系可用一条直线近似表示,这种回归分析称为一元线性回归分析。如果回归分析中包括两个或两个以上的自变量,且因变量和自变量之间是线性关系,则称为多元线性回归分析。对于二维空间线性是一条直线;对于三维空间线性是一个平面,对于多维空间线性是一个超平面。
|
||||
|
||||
|
||||
\begin{property}
|
||||
柯西列的性质
|
||||
\begin{enumerate}[noitemsep]
|
||||
\begin{enumerate}
|
||||
\item $\{x_k\}$ 是柯西列,则其子列 $\{x_k^i\}$ 也是柯西列。
|
||||
\item $x_k\in \mathcal{R}^n$,$\rho(x,y)$ 是欧几里得空间,则柯西列是收敛的,$(\mathcal{R}^n,\rho)$ 空间是完备的。
|
||||
\end{enumerate}
|
||||
\end{property}
|
||||
|
||||
|
||||
\begin{conclusion}
|
||||
回归分析(regression analysis) 是确定两种或两种以上变量间相互依赖的定量关系的一种统计分析方法。运用十分广泛,回归分析按照涉及的变量的多少,分为一元回归和多元回归分析;按照因变量的多少,可分为简单回归分析和多重回归分析;按照自变量和因变量之间的关系类型,可分为线性回归分析和非线性回归分析。如果在回归分析中,只包括一个自变量和一个因变量,且二者的关系可用一条直线近似表示,这种回归分析称为一元线性回归分析。如果回归分析中包括两个或两个以上的自变量,且自变量之间存在线性相关,则称为多重线性回归分析。
|
||||
\end{conclusion}
|
||||
|
||||
The arts refers to the theory and physical expression of creativity found in human societies and cultures. Major constituents of the arts include literature (including drama, poetry, and prose), performing arts (among them dance, music, and theatre), and visual arts (including drawing, painting, filmmaking, architecture, ceramics, sculpting, and photography).
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}
|
||||
\draw[->] (-3,0) -- (4.2,0) node[right] {$x$};
|
||||
\draw[->] (0,-3) -- (0,4.2) node[above] {$y$};
|
||||
\draw[scale=0.5,domain=-3:3,smooth,variable=\x,blue] plot ({\x},{\x*\x});
|
||||
\draw[scale=0.5,domain=-3:3,smooth,variable=\y,red] plot ({\y*\y},{\y});
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
\nocite{EINAV2010,Havrylchyk2018}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
BIN
figure/icon.png
BIN
figure/icon.png
Binary file not shown.
|
Before Width: | Height: | Size: 32 KiB |
3702
figure/logo.pdf
Normal file
3702
figure/logo.pdf
Normal file
File diff suppressed because one or more lines are too long
BIN
figure/logo.png
BIN
figure/logo.png
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 90 KiB |
BIN
image/mpg.png
BIN
image/mpg.png
Binary file not shown.
|
Before Width: | Height: | Size: 91 KiB |
BIN
image/scatter.pdf
Normal file
BIN
image/scatter.pdf
Normal file
Binary file not shown.
27
image/scatter.py
Normal file
27
image/scatter.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# This file is the source file of the scatter.pdf
|
||||
# source page: https://matplotlib.org/gallery/shapes_and_collections/scatter.html
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
# Fixing random state for reproducibility
|
||||
np.random.seed(19680801)
|
||||
|
||||
|
||||
N = 50
|
||||
x = np.random.rand(N)
|
||||
y = np.random.rand(N)
|
||||
colors = np.random.rand(N)
|
||||
area = (30 * np.random.rand(N))**2 # 0 to 15 point radii
|
||||
|
||||
ax = plt.subplot(111)
|
||||
ax.scatter(x, y, s=area, c=colors, alpha=0.5)
|
||||
|
||||
# Hide the right and top spines
|
||||
ax.spines['right'].set_visible(False)
|
||||
ax.spines['top'].set_visible(False)
|
||||
|
||||
# Only show ticks on the left and bottom spines
|
||||
ax.yaxis.set_ticks_position('left')
|
||||
ax.xaxis.set_ticks_position('bottom')
|
||||
|
||||
plt.savefig('scatter.pdf', transparent=True)
|
||||
Reference in New Issue
Block a user