renew 3.06

This commit is contained in:
EthanDeng
2019-02-25 00:55:40 +08:00
parent a6617a8259
commit baf92783b1
6 changed files with 270 additions and 163 deletions

View File

@@ -10,7 +10,7 @@
![Github Version](https://img.shields.io/github/release/ElegantLaTeX/ElegantBook.svg) ![Github Version](https://img.shields.io/github/release/ElegantLaTeX/ElegantBook.svg)
![Repo Size](https://img.shields.io/github/repo-size/ElegantLaTeX/ElegantBook.svg) ![Repo Size](https://img.shields.io/github/repo-size/ElegantLaTeX/ElegantBook.svg)
ElegantBook is designed for Books. Just enjoy it! If you have any questions, suggestions or bug reports, you can create issues, pull requests or email us at elegantlatex2e@gmail.com. ElegantBook is designed for Books. Just enjoy it! If you have any questions, suggestions or bug reports, you can create issues, pull requests or contact us at elegantlatex2e@gmail.com.
如果你有其他问题、建议或者报告 bug可以提交 issues 或者给我们发邮件elegantlatex2e@gmail.com。 如果你有其他问题、建议或者报告 bug可以提交 issues 或者给我们发邮件elegantlatex2e@gmail.com。

Binary file not shown.

View File

@@ -1,4 +1,4 @@
\documentclass[green,cn]{elegantbook} \documentclass[cn]{elegantbook}
\title{ElegantBook优美的 \LaTeX{} 书籍模板} \title{ElegantBook优美的 \LaTeX{} 书籍模板}
\subtitle{Elegant\LaTeX{} 经典之作} \subtitle{Elegant\LaTeX{} 经典之作}
@@ -15,8 +15,10 @@
\begin{document} \begin{document}
\maketitle \maketitle
%\pagenumbering{arabic}
\tableofcontents \tableofcontents
\clearpage
\thispagestyle{empty}
\mainmatter \mainmatter
\hypersetup{pageanchor=true} \hypersetup{pageanchor=true}
@@ -54,16 +56,15 @@
本模板基于基础的 book 文类,所以 book 的选项对于本模板也是有效的。默认编码为 UTF-8推荐使用 \TeX{} Live 编译。本文编写环境为 Win10 (64bit) + \TeX{} Live 2018支持 \lstinline{PDFLaTeX} 以及 \lstinline{XeLaTeX} 编译。 本模板基于基础的 book 文类,所以 book 的选项对于本模板也是有效的。默认编码为 UTF-8推荐使用 \TeX{} Live 编译。本文编写环境为 Win10 (64bit) + \TeX{} Live 2018支持 \lstinline{PDFLaTeX} 以及 \lstinline{XeLaTeX} 编译。
\subsection[选择 PDFLaTeX 编译]{选择 \lstinline{PDFLaTeX} 编译} \subsection[选择 PDFLaTeX 编译]{选择 \lstinline{PDFLaTeX} 编译}
如果你使用 \lstinline{PDFLaTeX} 编译,默认的 Computer Modern 字体被换成了 \lstinline{newtx} 系列字体,默认的字体字号是 11 pt。关于字体设置的宏包主要用到了 如果你使用 \lstinline{PDFLaTeX} 编译,默认的 Computer Modern 字体被换成了 \lstinline{newtx} 系列字体,默认的字体字号是 12 pt。关于字体设置的宏包主要用到了
\begin{itemize} \begin{itemize}
\item \lstinline{newtxtext} 用于文档正文字体,类似于 Times New Roman 字体。 \item \lstinline{newtxtext} 用于文档正文字体,类似于 Times New Roman 字体。
\item \lstinline{newtxmath} 用于数学字体,搭配 \lstinline{newtxtext} 非常合适。 \item \lstinline{newtxmath} 用于数学字体,搭配 \lstinline{newtxtext} 非常合适。
\item \lstinline{FiraMono} 用于打字机字体,并使用了 \lstinline{scale=0.8} 选项。 \item \lstinline{FiraMono} 用于打字机字体,并使用了 \lstinline{scale=0.7} 选项。
\item \lstinline{ctex} 用于中文字体设置,并使用了 \lstinline{scheme=plain} 选项。 \item \lstinline{ctex} 用于中文字体设置,并使用了 \lstinline{scheme=plain} 选项。
\end{itemize} \end{itemize}
一次完整的编译:\lstinline[breaklines]{PDFLaTeX -> BibTeX -> PDFLaTeX*2} 一次完整的编译:\lstinline[breaklines]{PDFLaTeX -> BibTeX -> PDFLaTeX*2}
\subsection[选择 XeLaTeX 编译]{选择 \lstinline{XeLaTeX} 编译} \subsection[选择 XeLaTeX 编译]{选择 \lstinline{XeLaTeX} 编译}
如果你选择 \lstinline{XeLaTeX} 编译的话,那么设置字体的宏包为 \lstinline{fontspec}\lstinline{xeCJK}。由于模板中使用的字体是 Windows 中的字体,所以如果你使用其他操作系统,比如 Linux 或者 Mac OS那么你需要把所用字体替换为你系统中的字体。设置字体的命令 如果你选择 \lstinline{XeLaTeX} 编译的话,那么设置字体的宏包为 \lstinline{fontspec}\lstinline{xeCJK}。由于模板中使用的字体是 Windows 中的字体,所以如果你使用其他操作系统,比如 Linux 或者 Mac OS那么你需要把所用字体替换为你系统中的字体。设置字体的命令
@@ -72,12 +73,12 @@
\RequirePackage[no-math]{fontspec} \RequirePackage[no-math]{fontspec}
\setmainfont{Times New Roman}[NFSSFamily=ntxtlf] \setmainfont{Times New Roman}[NFSSFamily=ntxtlf]
\setsansfont{Arial} \setsansfont{Arial}
%\setmonofont[Scale=0.9]{Courier New} %\setmonofont[Scale=0.7]{Courier New}
\RequirePackage{xeCJK} \RequirePackage{xeCJK}
\RequirePackage{xunicode} \RequirePackage{xunicode}
\setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}]{SimSun} \setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}]{SimSun}
\setCJKsansfont[BoldFont={SimHei},ItalicFont={KaiTi}]{KaiTi} \setCJKsansfont[BoldFont={SimHei},ItalicFont={KaiTi}]{KaiTi}
\setCJKmonofont[BoldFont={SimHei},ItalicFont={KaiTi},Scale=0.9]{Microsoft YaHei} \setCJKmonofont[BoldFont={SimHei},ItalicFont={KaiTi},Scale=0.7]{Microsoft YaHei}
\XeTeXlinebreaklocale "zh" \XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt \XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt
\RequirePackage{newtxmath} \RequirePackage{newtxmath}
@@ -87,7 +88,8 @@
\section{语言模式} \section{语言模式}
本模板内含两套语言环境,改变语言环境会改变图表标题的引导词(图,表),文章结构词(比如目录,参考文献等),以及定理环境中的引导词(比如定理,引理等)。不同语言模式的启用如下: 本模板内含两套语言环境,改变语言环境会改变图表标题的引导词(图,表),文章结构词(比如目录,参考文献等),以及定理环境中的引导词(比如定理,引理等)。不同语言模式的启用如下:
\begin{lstlisting}[frame=none]
\begin{lstlisting}[frame=single]
\documentclass[cn]{elegantbook} \documentclass[cn]{elegantbook}
\documentclass[lang=cn]{elegantbook} \documentclass[lang=cn]{elegantbook}
\documentclass[en]{elegantbook} \documentclass[en]{elegantbook}
@@ -107,7 +109,7 @@
\documentclass[color=green]{elegantbook} \documentclass[color=green]{elegantbook}
\end{lstlisting} \end{lstlisting}
其中 \textcolor{gray}{plain} 主题为全灰色。如果需要自定义颜色的话请选择 \lstinline{nocolor} 选项或者使用 \lstinline{color=none},然后在导言区定义 main、second、third 颜色,具体方法如下: 其中 \textcolor{gray}{plain} 主题为全灰色。如果需要自定义颜色的话请选择 \lstinline{nocolor} 选项或者使用 \lstinline{color=none},然后在导言区定义 main、second、third 颜色,具体方法如下:
\begin{lstlisting}[frame=single] \begin{lstlisting}[frame=single]
\definecolor{main}{RGB}{70,70,70} \definecolor{main}{RGB}{70,70,70}
@@ -116,7 +118,7 @@
\end{lstlisting} \end{lstlisting}
\begin{table}[htp] \begin{table}[htp]
\caption{ElegantBook 模板中的三套颜色主题\label{tab:color thm}} \caption{ElegantBook 模板中的颜色主题\label{tab:color thm}}
\centering \centering
\begin{tabular}{ccccc} \begin{tabular}{ccccc}
\toprule \toprule
@@ -148,7 +150,7 @@ third &\makecell{ {\color{third1}\rule{1cm}{1cm}}}& \makecell{{\color{third2}\ru
\item \textit{定理类环境},包含标题和内容两部分,全部定理类环境的编号均以章节编号。根据格式的不同分为 3 种 \item \textit{定理类环境},包含标题和内容两部分,全部定理类环境的编号均以章节编号。根据格式的不同分为 3 种
\begin{itemize} \begin{itemize}
\item \textcolor{main}{\textbf{definition}} 环境,颜色为 \textcolor{main}{main} \item \textcolor{main}{\textbf{definition}} 环境,颜色为 \textcolor{main}{main}
\item \textcolor{second}{\textbf{theorem、lemma、corollary}} 环境,颜色为主颜色 \textcolor{second} {second} \item \textcolor{second}{\textbf{theorem、lemma、corollary}} 环境,颜色为 \textcolor{second} {second}
\item \textcolor{third}{\textbf{proposition}} 环境,颜色为 \textcolor{third}{third} \item \textcolor{third}{\textbf{proposition}} 环境,颜色为 \textcolor{third}{third}
\end{itemize} \end{itemize}
\item \textit{示例类环境},有 \textbf{example、exercise、problem} 环境(对应于例,练习,例题),自动编号,编号以章节为单位。 \item \textit{示例类环境},有 \textbf{example、exercise、problem} 环境(对应于例,练习,例题),自动编号,编号以章节为单位。
@@ -172,13 +174,24 @@ The content of theorem.
\end{theorem} \end{theorem}
其他相同用法的定理类环境有: 其他相同用法的定理类环境有:
\begin{itemize}
\item 定义definition环境前缀为\lstinline{def} \begin{table}[htbp]
\item 定理theorem环境前缀为\lstinline{thm} \centering
\item 引理lemma环境前缀为\lstinline{lem} \caption{定理类环境}
\item 推论corrlary环境前缀为\lstinline{cor} \begin{tabular}{llll}
\item 命题proposition环境前缀为\lstinline{pro} \toprule
\end{itemize} 环境名 & 标签名 & 前缀 & 交叉引用 \\
\midrule
definition & label & def & \lstinline|\ref{def:label}| \\
theorem & label & thm & \lstinline|\ref{thm:label}| \\
lemma & label & lem & \lstinline|\ref{lem:label}| \\
corrlary & label & cor & \lstinline|\ref{cor:label}| \\
proposition & label & pro & \lstinline|\ref{pro:label}| \\
\bottomrule
\end{tabular}%
\label{tab:theorem-class}%
\end{table}%
\subsection{其他数学环境的使用} \subsection{其他数学环境的使用}
其他三种数学环境因为没有选项,可以直接使用,比如 \lstinline{example} 环境的使用: 其他三种数学环境因为没有选项,可以直接使用,比如 \lstinline{example} 环境的使用:
@@ -200,13 +213,13 @@ This is the content of example environment.
这几个都是同一类环境,区别在于 这几个都是同一类环境,区别在于
\begin{itemize} \begin{itemize}
\item 示例example环境、练习exercise与例题problem会自动以章节编号; \item 示例环境example、练习exercise与例题problem章节自动编号;
\item 注意note环境有提醒引导符证明proof环境有证明结束符 \item 注意note环境有提醒引导符证明proof环境有证明结束符
\item 结论conclusion等环境都是普通段落环境除了引导词加粗没有其他格式 \item 结论conclusion等环境都是普通段落环境引导词加粗。
\end{itemize} \end{itemize}
\section{关于图片} \section{封面和徽标}
本模板使用的封面图片来源于 \href{https://pixabay.com/en/tea-time-poetry-coffee-reading-3240766/}{pixabay.com}\footnote{感谢 China\TeX{} 提供免费图源网站,另外还推荐 \href{https://www.pexels.com/}{pexels.com}},图片完全免费,可用于任何场景。封面图片的尺寸为 $1280 \times 1024$, 更换图片的时候请\textbf{严格}按照封面图片尺寸进行裁剪。推荐一个免费的在线图片裁剪网站 \href{https://www.befunky.com/create/crop-photo/}{befunky.com} 本模板使用的封面图片来源于 \href{https://pixabay.com/en/tea-time-poetry-coffee-reading-3240766/}{pixabay.com}\footnote{感谢 China\TeX{} 提供免费图源网站,另外还推荐 \href{https://www.pexels.com/}{pexels.com}},图片完全免费,可用于任何场景。封面图片的尺寸为 $1280 \times 1024$, 更换图片的时候请\textbf{严格}按照封面图片尺寸进行裁剪。推荐一个免费的在线图片裁剪网站 \href{https://www.befunky.com/create/crop-photo/}{befunky.com}
@@ -245,7 +258,10 @@ This is the content of example environment.
\section{参考文献} \section{参考文献}
此模板使用了 Bib\TeX{} 来生成参考文献,默认使用的文献样式 aer 样式。参考文献示例:~\cite{Chen2018} 使用了中国一个大型的 P2P 平台(人人贷)的数据来检验男性投资者和女性投资者在投资表现上是否有显著差异。你可以在谷歌学术MendeleyEndnote 中获得文献条目bib item然后把它们添加到 \lstinline{reference.bib} 中。在文中引用的时候引用它们的键值bib key即可。注意需要在编译的过程中添加 Bib\TeX{} 编译。 此模板使用了 Bib\TeX{} 来生成参考文献,默认使用的文献样式bib style\lstinline{aer}。参考文献示例:~\cite{Chen2018} 使用了中国一个大型的 P2P 平台(人人贷)的数据来检验男性投资者和女性投资者在投资表现上是否有显著差异。
你可以在谷歌学术MendeleyEndnote 中获得文献条目bib item然后把它们添加到 \lstinline{reference.bib} 中。在文中引用的时候引用它们的键值bib key即可。注意需要在编译的过程中添加 Bib\TeX{} 编译。如果你想在参考文献中添加未引用的文献,可以使用
\section{添加序章} \section{添加序章}
@@ -332,7 +348,7 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
柯西列的性质 柯西列的性质
\begin{enumerate} \begin{enumerate}
\item $\{x_k\}$ 是柯西列,则其子列 $\{x_k^i\}$ 也是柯西列。 \item $\{x_k\}$ 是柯西列,则其子列 $\{x_k^i\}$ 也是柯西列。
\item $x_k\in \mathcal{R}^n$$\rho(x,y)$ 是欧几里得空间,则柯西列收敛$(\mathcal{R}^n,\rho)$ 空间是完备的。 \item $x_k\in \mathcal{R}^n$$\rho(x,y)$ 是欧几里得空间,则柯西列收敛,$(\mathcal{R}^n,\rho)$ 空间是完备的。
\end{enumerate} \end{enumerate}
\end{property} \end{property}
@@ -357,4 +373,41 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
\sum_{i=1}^n x_i \equiv x_1 + x_2 +\cdots + x_n \sum_{i=1}^n x_i \equiv x_1 + x_2 +\cdots + x_n
\end{equation} \end{equation}
\chapter{最小示例}
\begin{lstlisting}[frame=single]
\documentclass{elegantbook}
% title info
\title{Title}
\subtitle{Subtitle is here}
% bio info
\author{Your Name}
\institute{XXX University}
\date{\today}
% extra info
\version{1.00}
\equote{Victory won\rq t come to us unless we go to it. --- M. Moore}
\logo{logo.png}
\cover{cover.jpg}
\begin{document}
\maketitle
\tableofcontents
\mainmatter
\hypersetup{pageanchor=true}
% add preface chapter here if needed
\chapter{Example Chapter Title}
The content of chapter one.
\bibliography{reference}
\appendix
\chapter{Appendix Chapter Title}
The content of appendix 1.
\end{document}
\end{lstlisting}
\end{document} \end{document}

Binary file not shown.

View File

@@ -1,4 +1,4 @@
\documentclass[green,en]{elegantbook} \documentclass{elegantbook}
\title{An Elegant \LaTeX{} Template for Books} \title{An Elegant \LaTeX{} Template for Books}
\subtitle{Classic Elegant\LaTeX{} Template} \subtitle{Classic Elegant\LaTeX{} Template}
@@ -15,19 +15,21 @@
\begin{document} \begin{document}
\maketitle \maketitle
%\pagenumbering{arabic}
\tableofcontents \tableofcontents
\clearpage
\thispagestyle{empty}
\mainmatter \mainmatter
\hypersetup{pageanchor=true} \hypersetup{pageanchor=true}
\chapter{Elegant\LaTeX{} Templates} \chapter{Elegant\LaTeX{} Templates}
on the occasion of this release, we, Elegant\LaTeX{} Program, want to reintroduce our work to you. We are committed to creating a series of beautiful, elegant, easy to use \LaTeX{} templates for users. The Elegant\LaTeX{} is currently composed of \href{https://github.com/ElegantLaTeX/ElegantNote}{ElegantNote}, \href{https://github.com/ElegantLaTeX/ElegantBook}{ElegantBook}, \href{https://github.com/ElegantLaTeX/ElegantPaper}{ElegantPaper} for typesetting notes, books, and working papers respectively. On the occasion of this release, we, Elegant\LaTeX{} Program, want to reintroduce our work to you. We are committed to creating a series of beautiful, elegant, easy to use \LaTeX{} templates for users. The Elegant\LaTeX{} is currently composed of \href{https://github.com/ElegantLaTeX/ElegantNote}{ElegantNote}, \href{https://github.com/ElegantLaTeX/ElegantBook}{ElegantBook}, \href{https://github.com/ElegantLaTeX/ElegantPaper}{ElegantPaper} for typesetting notes, books, and working papers respectively.
The latest version is available on \href{https://github.com/ElegantLaTeX/ElegantBook/releases}{Github: ElegantBook/releases}. This guide describes some of the settings for this template and how to use it. If you have any other questions, suggestions or comments, please feel free to contact us. The latest version is available on \href{https://github.com/ElegantLaTeX/ElegantBook/releases}{Github:ElegantBook/releases}. This guide describes some settings of this template and how to use it. If you have any other questions, suggestions or comments, please feel free to contact us.
\section{ElegantBook 更新说明} \section{ElegantBook Updates}
Over these years, we've received a lot of feedback from users, with major issues related to font installation, coding support, theorem class environments floats, theorem cross-page, cross-references, and etc. We really think about these problems, it wasn't elegant to let the user install the font for visual beauty since users got into a lot of trouble, which went against the concept of our template. So we've removed that from the new version, users don't have to install any fonts. Let's take a look at the ElegantBook template 3.x updates: Over these years, we've received a lot of feedback from users, with major issues related to font installation, coding support, theorem class environments floats, theorem cross-page, cross-references, and etc. We really think about these problems, it wasn't elegant to let the user install the font for visual beauty since users got into a lot of trouble, which went against the concept of our template. So we've removed that from the new version, users don't have to install any fonts. Let's take a look at the ElegantBook template 3.x updates:
\begin{enumerate} \begin{enumerate}
@@ -40,7 +42,7 @@ Over these years, we've received a lot of feedback from users, with major issues
\item New Elegant\LaTeX{} Logo; \item New Elegant\LaTeX{} Logo;
\item New cover and decorations, remove the watermark; \item New cover and decorations, remove the watermark;
\item Fix appendix; \item Fix appendix;
\item Add gray theme: \lstinline{color=plain} \item Add gray theme: \lstinline{color=plain};
\item Add code highlighting; \item Add code highlighting;
\item Beautify the list environment. \item Beautify the list environment.
\end{enumerate} \end{enumerate}
@@ -57,11 +59,11 @@ If you choose \lstinline{PDFLaTeX} to process your book, the default article fon
\begin{itemize} \begin{itemize}
\item \lstinline{newtxtext} package for text fonts, similar to times new roman font. \item \lstinline{newtxtext} package for text fonts, similar to times new roman font.
\item \lstinline{newtxmath} package for math fonts, close to \lstinline{times} package. \item \lstinline{newtxmath} package for math fonts, close to \lstinline{times} package.
\item \lstinline{FiraMono} package for typewriter fonts, with option \lstinline{scale=0.8}. \item \lstinline{FiraMono} package for typewriter fonts, with option \lstinline{scale=0.7}.
\item \lstinline{ctex} package for Chinese fonts, with option \lstinline{scheme=plain}. \item \lstinline{ctex} package for Chinese fonts, with option \lstinline{scheme=plain}.
\end{itemize} \end{itemize}
A full compilation chain\lstinline[breaklines]{PDFLaTeX -> BibTeX -> PDFLaTeX*2} A full compilation chain\lstinline[breaklines]{PDFLaTeX -> BibTeX -> PDFLaTeX*2}.
\subsection[Compile with XeLaTeX]{Compile with \lstinline{XeLaTeX}} \subsection[Compile with XeLaTeX]{Compile with \lstinline{XeLaTeX}}
@@ -72,22 +74,22 @@ If you choose \lstinline{XeLaTeX} to process your book, we use \lstinline{fontsp
\RequirePackage[no-math]{fontspec} \RequirePackage[no-math]{fontspec}
\setmainfont{Times New Roman}[NFSSFamily=ntxtlf] \setmainfont{Times New Roman}[NFSSFamily=ntxtlf]
\setsansfont{Arial} \setsansfont{Arial}
%\setmonofont[Scale=0.9]{Courier New} %\setmonofont[Scale=0.7]{Courier New}
\RequirePackage{xeCJK} \RequirePackage{xeCJK}
\RequirePackage{xunicode} \RequirePackage{xunicode}
\setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}]{SimSun} \setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}]{SimSun}
\setCJKsansfont[BoldFont={SimHei},ItalicFont={KaiTi}]{KaiTi} \setCJKsansfont[BoldFont={SimHei},ItalicFont={KaiTi}]{KaiTi}
\setCJKmonofont[BoldFont={SimHei},ItalicFont={KaiTi},Scale=0.9]{Microsoft YaHei} \setCJKmonofont[BoldFont={SimHei},ItalicFont={KaiTi},Scale=0.7]{Microsoft YaHei}
\XeTeXlinebreaklocale "zh" \XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt \XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt
\RequirePackage{newtxmath} \RequirePackage{newtxmath}
\end{lstlisting} \end{lstlisting}
A full compilation chain\lstinline[breaklines]{XeLaTeX -> BibTeX -> XeLaTeX*2} A full compilation chain\lstinline[breaklines]{XeLaTeX -> BibTeX -> XeLaTeX*2}.
\section{Languages} \section{Languages}
we defined one option named \lstinline{lang}, this option has two alternative values, \lstinline{lang=en} (default) or \lstinline{lang=cn}. \lstinline{lang=cn} will make the caption of figure/table, abstract name, refname etc. Chinese, while \lstinline{lang=en} will keep all these stuff English, as the default article class sets. You can use this option as We defined one option named \lstinline{lang}, this option has two alternative values, \lstinline{lang=en} (default) or \lstinline{lang=cn}. \lstinline{lang=cn} will make the caption of figure/table, abstract name, refname etc. Chinese, while \lstinline{lang=en} will keep all these stuff English, as the default article class sets. You can use this option as
\begin{lstlisting}[frame=none] \begin{lstlisting}[frame=none]
\documentclass[cn]{elegantbook} \documentclass[cn]{elegantbook}
@@ -102,15 +104,14 @@ You can input Chinese Character in either \lstinline{lang=en} or \lstinline{lang
\section{Color Themes} \section{Color Themes}
This template contains 4 color themesthey are \textcolor{main1}{\lstinline{green}} (default), \textcolor{main2}{\lstinline{cyan}}, \textcolor{main3}{\lstinline{blue}}, \textcolor{gray}{\lstinline{plain}}, and there is a customization color option \lstinline{nocolor}. You can choose \lstinline{green} as This template contains 4 color themes,they are \textcolor{main1}{\lstinline{green}} (default), \textcolor{main2}{\lstinline{cyan}}, \textcolor{main3}{\lstinline{blue}}, \textcolor{gray}{\lstinline{plain}}, and there is a customization color option \lstinline{nocolor}. You can choose \lstinline{green} with
\begin{lstlisting}[frame=single] \begin{lstlisting}[frame=single]
\documentclass[green]{elegantbook} %or \documentclass[green]{elegantbook} %or
\documentclass[color=green]{elegantbook} \documentclass[color=green]{elegantbook}
\end{lstlisting} \end{lstlisting}
其中 \textcolor{gray}{plain} 主题为全灰色。如果需要自定义颜色的话请选择 \lstinline{nocolor} 选项或者使用 \lstinline{color=none},然后在导言区定义 mainsecond、third 颜色,具体的方法如下: where \textcolor{gray}{plain} theme is gray for all theorem class environments and paper structures. If you want to customize the colors, please select \lstinline{nocolor} or use \lstinline{color=none} , then define the main, second, and third colors in the preamble section as follows:
\begin{lstlisting}[frame=single] \begin{lstlisting}[frame=single]
\definecolor{main}{RGB}{70,70,70} \definecolor{main}{RGB}{70,70,70}
\definecolor{second}{RGB}{115,45,2} \definecolor{second}{RGB}{115,45,2}
@@ -118,11 +119,11 @@ This template contains 4 color themesthey are \textcolor{main1}{\lstinline{gr
\end{lstlisting} \end{lstlisting}
\begin{table}[htp] \begin{table}[htp]
\caption{ElegantBook 模板中的三套颜色主题\label{tab:color thm}} \caption{ElegantBook Themes\label{tab:color thm}}
\centering \centering
\begin{tabular}{ccccc} \begin{tabular}{ccccc}
\toprule \toprule
& \textcolor{main1}{green} & \textcolor{main2}{cyan} & \textcolor{main3}{blue} & 主要使用的环境\\ & \textcolor{main1}{green} & \textcolor{main2}{cyan} & \textcolor{main3}{blue} & Main Environments\\
\midrule \midrule
main & \makecell{{\color{main1}\rule{1cm}{1cm}}}& \makecell{{\color{main2}\rule{1cm}{1cm}}}&\makecell{ {\color{main3}\rule{1cm}{1cm}}}& definition \\ main & \makecell{{\color{main1}\rule{1cm}{1cm}}}& \makecell{{\color{main2}\rule{1cm}{1cm}}}&\makecell{ {\color{main3}\rule{1cm}{1cm}}}& definition \\
@@ -133,33 +134,35 @@ third &\makecell{ {\color{third1}\rule{1cm}{1cm}}}& \makecell{{\color{third2}\ru
\end{tabular} \end{tabular}
\end{table} \end{table}
\section{章标题显示风格} \section{Chapter Title Display Styles}
本模板内置 2 套\textit{章标题显示风格},包含 \lstinline{hang}(默认)与 \lstinline{display} 两种风格,区别在于章标题单行显示(\lstinline{hang})与双行显示(\lstinline{display}),本说明使用了 \lstinline{hang}。调用方式为 This template contains 2 sets of \textit{title display styles},which including \lstinline{hang}(default) and \lstinline{display} style,
The difference is that the chapter heading is displayed on a single line (\lstinline{hang}) and on a double line (\lstinline{display}) , and this guide uses \lstinline{hang} . To change display style
\begin{lstlisting}[frame=single] \begin{lstlisting}[frame=single]
\documentclass[hang]{elegantbook} %or \documentclass[hang]{elegantbook} %or
\documentclass[titlestyle=hang]{elegantbook} \documentclass[titlestyle=hang]{elegantbook}
\end{lstlisting} \end{lstlisting}
\section{数学环境简介} \section{Theorem Class Environments}
在我们这个模板中,定义了四大类环境 In this template, we defined four categories of theorem class environments
\begin{itemize} \begin{itemize}
\item \textit{定理类环境},包含标题和内容两部分,全部定理类环境的编号均以章节编号。根据格式的不同分为 3 种 \item \textit{Theorem Environment}, including title and contents, numbering within chapter. There are three types depending on the format
\begin{itemize} \begin{itemize}
\item \textcolor{main}{\textbf{definition}} 环境,颜色为 \textcolor{main}{main} \item \textcolor{main}{\textbf{definition}} environment, the color is \textcolor{main}{main};
\item \textcolor{second}{\textbf{theoremlemmacorollary}} 环境,颜色为主颜色 \textcolor{second} {second} \item \textcolor{second}{\textbf{theorem, lemma, corollary}} environment, the color is \textcolor{second} {second};
\item \textcolor{third}{\textbf{proposition}} 环境,颜色为 \textcolor{third}{third} \item \textcolor{third}{\textbf{proposition}} environment, the color is \textcolor{third}{third}.
\end{itemize} \end{itemize}
\item \textit{示例类环境},有 \textbf{exampleexerciseproblem} 环境(对应于例,练习,例题),自动编号,编号以章节为单位。 \item \textit{Example Environments}, including \textbf{example, exercise, problem} environment, auto numering within chapter.
\item \textit{证明类环境},有 \textbf{proofnote} 环境,特点是,有引导符或者结尾符,\textbf{note} 环境有引导符号,\textbf{proof} 环境有证明完毕符号。 \item \textit{Proof Environment}, including \textbf{proof, note} environment, they contain introductory symbol (\textbf{note} environment) or ending symbol (\textbf{proof} environment).
\item \textit{结论类环境},有 \textbf{conclusionassumptionpropertyremarksolution} 环境,三者均以粗体的引导词为开头,和普通段落格式一致。 \item \textit{Conclusion Environments}, including \textbf{conclusion, assumption, property, remark, solution} environment, all of these begin with boldfaced words, and the contents are the same as a normal paragraph.
\end{itemize} \end{itemize}
\subsection{定理类环境的使用} \subsection{Theorem Class Environments}
由于本模板使用了 \lstinline{tcolorbox} 宏包来定制定理类环境,所以和普通的定理环境的使用有些许区别,定理的使用方法如下: The template uses the \lstinline{tcolorbox} package to customize the theorem class environments, it is slightly different from the normal theorem environments. The usage is as follows:
\begin{lstlisting}[frame=single] \begin{lstlisting}[frame=single]
\begin{theorem}{<theorem name>}{<label>} \begin{theorem}{<theorem name>}{<label>}
@@ -167,23 +170,34 @@ The content of theorem.
\end{theorem} \end{theorem}
\end{lstlisting} \end{lstlisting}
第一个必选项 \lstinline{<theorem name>} 是定理的名字,第二个必选项 \lstinline{<label>} 是交叉引用时所用到的标签,交叉引用的方法为 \verb|\ref{thm:label}|。请注意,交叉引用时必须加上前缀 \lstinline{thm:}。效果如下: The first parameter \lstinline{<theorem name>} is the name of the theorem, and the second parameter \lstinline{label} is the label used in cross-reference with \verb|ref{thm:label}|. Note that cross-references must be prefixed with \lstinline{thm:}. The effect is as follows:
\begin{theorem}{<theorem name>}{<label>} \begin{theorem}{<theorem name>}{<label>}
The content of theorem. The content of theorem.
\end{theorem} \end{theorem}
其他相同用法的定理类环境有: Other theorem class environments with the same usage are:
\begin{itemize}
\item 定义definition环境前缀为\lstinline{def}
\item 定理theorem环境前缀为\lstinline{thm}
\item 引理lemma环境前缀为\lstinline{lem}
\item 推论corrlary环境前缀为\lstinline{cor}
\item 命题proposition环境前缀为\lstinline{pro}
\end{itemize}
\subsection{其他数学环境的使用} \begin{table}[htbp]
其他三种数学环境因为没有选项,可以直接使用,比如 \lstinline{example} 环境的使用: \centering
\caption{Theorem Class Environments}
\begin{tabular}{llll}
\toprule
Environment & Label text & Prefix & Cross-reference \\
\midrule
definition & label & def & \lstinline|\ref{def:label}| \\
theorem & label & thm & \lstinline|\ref{thm:label}| \\
lemma & label & lem & \lstinline|\ref{lem:label}| \\
corrlary & label & cor & \lstinline|\ref{cor:label}| \\
proposition & label & pro & \lstinline|\ref{pro:label}| \\
\bottomrule
\end{tabular}%
\label{tab:theorem-class}%
\end{table}%
\subsection{Other Customized Environments}
The other three math environments can be used directly since there are no options for them, the \lstinline{example} environment usage:
\begin{lstlisting}[frame=single] \begin{lstlisting}[frame=single]
\begin{example} \begin{example}
@@ -191,31 +205,29 @@ This is the content of example environment.
\end{example} \end{example}
\end{lstlisting} \end{lstlisting}
效果如下: The effect is as follows:
\begin{example} \begin{example}
This is the content of example environment. This is the content of example environment.
\end{example} \end{example}
These are all the same environments, except that
这几个都是同一类环境,区别在于
\begin{itemize} \begin{itemize}
\item 示例(example)环境、练习(exercise)与例题(problem)会自动以章节编号; \item example, exercise, problem environments numbering within chapter;
\item 注意(note环境有提醒引导符证明proof环境有证明结束符 \item note with introductory symbol, proof with ending symbol;
\item 结论(conclusion)等环境都是普通段落环境,除了引导词加粗没有其他格式。 \item conclusion environment with boldfaced keywords and normal paragraph content.
\end{itemize} \end{itemize}
\section{关于图片} \section{Cover and Logo}
本模板使用的封面图片来源于 \href{https://pixabay.com/en/tea-time-poetry-coffee-reading-3240766/}{pixabay.com}\footnote{感谢 China\TeX{} 提供免费图源网站,另外还推荐 \href{https://www.pexels.com/}{pexels.com}},图片完全免费,可用于任何场景。封面图片的尺寸为 $1280 \times 1024$, 更换图片的时候请\textbf{严格}按照封面图片尺寸进行裁剪。推荐一个免费的在线图片裁剪网站 \href{https://www.befunky.com/create/crop-photo/}{befunky.com} The cover image used in this template is from \href{https://pixabay.com/en/tea-time-poetry-coffee-reading-3240766/}{pixabay.com}\footnote{Thank China\TeX{} for providing free image source site, and \href{https://www.pexels.com/}{pexels.com} is also recommended.}. The image is completely free and can be used in any circumstance. The cover image size is $1280 \times 1024$, when changing the cover, please crop it according to the size of the cover picture strictly. Here is a free online image clipping site: \href{https://www.befunky.com/create/crop-photo/}{befunky.com}.
本文用到的 Logo 比例为 1:1也即正方形图片在更换图片的时候请选择合适的图片进行替换。 This Logo ratio is 1:1, that is square picture. In the replacement of the picture, please choose the appropriate picture to replace.
\section{列表环境} \section{List Environments}
本模板借助于 \lstinline{tikz} 定制了 \lstinline{itemize} \lstinline{enumerate} 环境,其中 \lstinline{itemize} 环境修改了 3 层嵌套,而 \lstinline{enumerate} 环境修改了 4 层嵌套(仅改变颜色)。示例如下\\[2ex] This template uses \lstinline{tikz} to customize \lstinline{itemize} and \lstinline{enumerate} environments, the \lstinline{itemize} environment customized to the third depth, and \lstinline{enumerate} environment customized to fourth depth. The effect is as follows\\[2ex]
\begin{minipage}[b]{0.49\textwidth} \begin{minipage}[b]{0.49\textwidth}
\begin{itemize} \begin{itemize}
\item first item of nesti; \item first item of nesti;
@@ -245,118 +257,157 @@ This is the content of example environment.
\end{enumerate} \end{enumerate}
\end{minipage} \end{minipage}
\section{参考文献} \section{Bibliography}
此模板使用了 Bib\TeX{} 来生成参考文献,默认使用的文献样式 aer 样式。参考文献示例:~\cite{Chen2018} 使用了中国一个大型的 P2P 平台人人贷的数据来检验男性投资者和女性投资者在投资表现上是否有显著差异。你可以在谷歌学术MendeleyEndnote 中获得文献条目bib item然后把它们添加到 \lstinline{reference.bib} 中。在文中引用的时候引用它们的键值bib key即可。注意需要在编译的过程中添加 Bib\TeX{} 编译。 This template uses Bib\TeX{} to generate the bibliography, the default bibliography style is \lstinline{aer}. Let's take a glance at the citation effect, ~\cite{Chen2018} use data from a major peer-to-peer lending marketplace in China to study whether female and male investors evaluate loan performance differently.
\section{添加序章} If you want to use Bib\TeX{}, you must create a file named \lstinline{reference.bib}, and add bib items (from Google Scholar, Mendeley, EndNote, and etc.) to \lstinline{reference.bib} file, and cite the bibkey in the \lstinline{tex} file. The Bib\TeX{} will automatically generate the bibliography for you for the reference you cited. If you want to add some noncited reference to the bibliography, you can use
如果你想在第一章前面添加序章,不改变原本章节序号,你可以在第一章内容前面使用 \begin{lstlisting}
\nocite{EINAV2010, Havrylchyk2018}
\begin{lstlisting}[frame=single]
\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction}
\markboth{Introduction}{}
The content of introduction chapter.
\end{lstlisting} \end{lstlisting}
\chapter{ElegantBook 写作示例} \section{Preface}
\section{Lebesgue 积分} If you want to add a preface before the first chapter without changing the number of chapter, you can use it before the first chapter
在前面各章做了必要的准备后,本章开始介绍新的积分。在 Lebesgue 测度理论的基础上建立了 Lebesgue 积分,其被积函数和积分域更一般,可以对有界函数和无界函数统一处理。正是由于 Lebesgue 积分的这些特点,使得 Lebesgue 积分比 Riemann 积分具有在更一般条件下的极限定理和累次积分交换积分顺序的定理,这使得 Lebesgue 积分不仅在理论上更完善,而且在计算上更灵活有效。
Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非负简单函数,非负可测函数和一般可测函数积分的方式。 \begin{lstlisting}[frame=single]
\chapter*{Preface}
\addcontentsline{toc}{chapter}{Preface}
\markboth{Preface}{}
The content of Preface.
\end{lstlisting}
由于现代数学的许多分支如概率论、泛函分析、调和分析等常常用到一般空间上的测度与积分理论,在本章最后一节将介绍一般的测度空间上的积分。 \chapter{ElegantBook Writing Sample}
\lipsum[1]
% source: https://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/Theorems.html
\subsection{积分的定义} \section{Writing Sample}
我们将通过三个步骤定义可测函数的积分。首先定义非负简单函数的积分。以下设 $E$ $\mathcal{R}^n$ 中的可测集。 We will define the integral of a measurable function in three steps. First, we define the integral of a nonnegative simple function. Let $E$ be the measurable set in $\mathcal{R}^N$.
\begin{definition}{可积性}{int} \begin{definition}{Left Coset}{}
$ f(x)=\sum\limits_{i=1}^{k} a_i \chi_{A_i}(x)$ $E$ 上的非负简单函数,其中 $\{A_1,A_2,\ldots,A_k\}$ $E$ 上的一个可测分割,$a_1,a_2,\ldots,a_k$ 是非负实数。定义 $f$$E$ 上的积分为 Let $H$ be a subgroup of a group~$G$. A \emph{left coset} of $H$ in $G$ is a subset of $G$ that is of the form $xH$, where $x \in G$ and $xH = \{ xh : h \in H \}$. Similarly a \emph{right coset} of $H$ in $G$ is a subset of $G$ that is of the form $Hx$, where $Hx = \{ hx : h \in H \}$
\begin{equation}
\label{inter}
\int_{E} f dx = \sum_{i=1}^k a_i m(A_i) .
\end{equation}
一般情况下 $0 \leq \int_{E} f dx \leq \infty$。若 $\int_{E} f dx < \infty$,则称 $f$$E$ 上可积。
\end{definition} \end{definition}
一个自然的问题是Lebesgue 积分与我们所熟悉的 Riemann 积分有什么联系和区别?在 4.4 在我们将详细讨论 Riemann 积分与 Lebesgue 积分的关系。这里只看一个简单的例子。设 $D(x)$ 是区间 $[0,1]$ 上的 Dirichlet 函数。即 $D(x)=\chi_{Q_0}(x)$,其中 $Q_0$ 表示 $[0,1]$ 中的有理数的全体。根据非负简单函数积分的定义,$D(x)$$[0,1]$ 上的 Lebesgue 积分为
\begin{equation}
\label{inter2}
\int_0^1 D(x)dx = \int_0^1 \chi_{Q_0} (x) dx = m(Q_0) = 0
\end{equation}
$D(x)$$[0,1]$ 上是 Lebesgue 可积的并且积分值为零。但 $D(x)$$[0,1]$ 上不是 Riemann 可积的。
有界变差函数是与单调函数有密切联系的一类函数。有界变差函数可以表示为两个单调递增函数之差。与单调函数一样,有界变差函数几乎处处可导。与单调函数不同,有界变差函数类对线性运算是封闭的,它们构成一线空间。练习题 \ref{exer:43} 是一个性质的证明。
\begin{exercise}\label{exer:43}
$f\in L(\mathcal{R}^1)$$g$$\mathcal{R}^1$ 上的有界可测函数。证明函数
\begin{equation}
\label{ex:1}
I(t) = \int_{\mathcal{R}^1} f(x+t)g(x)dx \quad t \in \mathcal{R}^1
\end{equation}
$\mathcal{R}^1$ 上的连续函数。
\end{exercise}
\begin{theorem}{Fubini 定理}{fubi}
1$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$ 上的非负可测函数。并且
\begin{equation}
\label{eq:461}
\int_{\mathcal{R}^p\times\mathcal{R}^q} f(x,y) dxdy=\int_{\mathcal{R}^p}\left(\int_{\mathcal{R}^q}f(x,y)dy\right)dx.
\end{equation}
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}
\begin{note} \begin{note}
在本模板中引理lemma推论corollary )的样式和定理~\ref{thm:fubi} 的样式一致,包括颜色,仅仅只有计数器的设置不一样。 Note that a subgroup~$H$ of a group $G$ is itself a left coset of $H$ in $G$.
\end{note} \end{note}
我们说一个实变或者复变量的实值或者复值函数是在区间上平方可积的,如果其绝对值的平方在该区间上的积分是有限的。所有在勒贝格积分意义下平方可积的可测函数构成一个希尔伯特空间,也就是所谓的 $L^2$ 空间,几乎处处相等的函数归为同一等价类。形式上,$L^2$ 是平方可积函数的空间和几乎处处为 0 的函数空间的商空间。 \lipsum[2]
\begin{proposition}{最优性原理}{max} \begin{theorem}{Lagrange's Theorem}{}
如果 $u^*$$[s,T]$ 上为最优解,则 $u^*$$[s,T]$ 任意子区间都是最优解,假设区间为 $[t_0,t_1]$ 的最优解为 $u^*$ ,则 $u(t_0)=u^{*}(t_0)$,即初始条件必须还是在 $u^*$ 上。 Let $G$ be a finite group, and let $H$ be a subgroup of $G$. Then the order of $H$ divides the order of $G$.
\end{theorem}
\lipsum[3]
\begin{proposition}{Size of Left Coset}{}
Let $H$ be a finite subgroup of a group $G$. Then each left coset of $H$ in $G$ has the same number of elements as $H$.
\end{proposition} \end{proposition}
我们知道最小二乘法可以用来处理一组数据,可以从一组测定的数据中寻求变量之间的依赖关系,这种函数关系称为经验公式。本课题将介绍最小二乘法的精确定义及如何寻求点与点之间近似成线性关系时的经验公式。假定实验测得变量之间的 $n$ 个数据,则在平面上,可以得到 $n$ 个点,这种图形称为 “散点图”,从图中可以粗略看出这些点大致散落在某直线近旁, 我们认为其近似为一线性函数,下面介绍求解步骤。 \begin{proof}
Let $z$ be some element of $xH \cap yH$. Then $z = xa$ for some $a \in H$, and $z = yb$ for some $b \in H$. If $h$ is any element of $H$ then $ah \in H$ and $a^{-1}h \in H$, since $H$ is a subgroup of $G$. But $zh = x(ah)$ and $xh = z(a^{-1}h)$ for all $h \in H$. Therefore $zH \subset xH$ and $xH \subset zH$, and thus $xH = zH$. Similarly $yH = zH$, and thus $xH = yH$, as required.
\end{proof}
\begin{figure}[htbp] \begin{figure}[htbp]
\centering \centering
\includegraphics[width=0.6\textwidth]{scatter.pdf} \includegraphics[width=0.6\textwidth]{scatter.pdf}
\caption{散点图示例 $\hat{y}=a+bx$ \label{fig:scatter}} \caption{Matplotlib: Scatter Plot Example\label{fig:scatter}}
\end{figure} \end{figure}
以最简单的一元线性模型来解释最小二乘法。什么是一元线性模型呢?监督学习中,如果预测的变量是离散的,我们称其为分类(如决策树,支持向量机等),如果预测的变量是连续的,我们称其为回归。回归分析中,如果只包括一个自变量和一个因变量,且二者的关系可用一条直线近似表示,这种回归分析称为一元线性回归分析。如果回归分析中包括两个或两个以上的自变量,且因变量和自变量之间是线性关系,则称为多元线性回归分析。对于二维空间线性是一条直线;对于三维空间线性是一个平面,对于多维空间线性是一个超平面。 Regression analysis is a powerful statistical method that allows you to examine the relationship between two or more variables of interest. While there are many types of regression analysis, at their core they all examine the influence of one or more independent variables on a dependent variable. The process of performing a regression allows you to confidently determine which factors matter most, which factors can be ignored, and how these factors influence each other.
\begin{property} Let's continue using our application training example. In this case, we'd want to measure the historical levels of satisfaction with the events from the past three years or so, as well as any information possible in regards to the independent variables.
柯西列的性质
\begin{enumerate}
\item $\{x_k\}$ 是柯西列,则其子列 $\{x_k^i\}$ 也是柯西列。 \begin{table}[htbp]
\item $x_k\in \mathcal{R}^n$$\rho(x,y)$ 是欧几里得空间,则柯西列是收敛的,$(\mathcal{R}^n,\rho)$ 空间是完备的。 \small
\end{enumerate} \centering
\end{property} \caption{Auto MPG and Price \label{tab:reg}}
\begin{tabular}{lcc}
\toprule
& (1) & (2) \\
\midrule
mpg & -238.90*** & -49.51 \\
& (53.08) & (86.16) \\
weight & & 1.75*** \\
& & (0.641) \\
constant & 11,253*** & 1,946 \\
& (1,171) & (3,597) \\
obs & 74 & 74 \\
$R^2$ & 0.220 & 0.293 \\
\bottomrule
\multicolumn{3}{l}{\scriptsize Standard errors in parentheses} \\
\multicolumn{3}{l}{\scriptsize *** p<0.01, ** p<0.05, * p<0.1} \\
\end{tabular}%
\end{table}%
\lipsum[1-2]
\begin{itemize}
\item Routing and resource discovery;
\begin{itemize}
\item Language Models
\item Vector Space Models
\end{itemize}
\item Resilient and scalable computer networks;
\item Distributed storage and search.
\end{itemize}
\begin{conclusion}
回归分析regression analysis) 是确定两种或两种以上变量间相互依赖的定量关系的一种统计分析方法。运用十分广泛,回归分析按照涉及的变量的多少,分为一元回归和多元回归分析;按照因变量的多少,可分为简单回归分析和多重回归分析;按照自变量和因变量之间的关系类型,可分为线性回归分析和非线性回归分析。
\end{conclusion}
\nocite{EINAV2010,Havrylchyk2018} \nocite{EINAV2010,Havrylchyk2018}
\bibliography{reference} \bibliography{reference}
\appendix \appendix
\chapter{基本数学工具} \chapter{Mathematical Tools}
本附录包括了计量经济学中用到的一些基本数学,我们扼要论述了求和算子的各种性质,研究了线性和某些非线性方程的性质,并复习了比例和百分数。我们还介绍了一些在应用计量经济学中常见的特殊函数,包括二次函数和自然对数,前 4 节只要求基本的代数技巧,第 5 节则对微分学进行了简要回顾;虽然要理解本书的大部分内容,微积分并非必需,但在一些章末附录和第 3 篇某些高深专题中,我们还是用到了微积分。 This appendix covers some of the basic mathematics used in econometrics. We briefly discuss the properties of summation operators, study the properties of linear and some nonlinear equations, and review the ratios and percentages. We also introduce some special functions that are common in econometrics applications, including quadratic functions and natural logarithms. The first four sections require only basic algebraic techniques. The fifth section briefly reviews differential Calculus Although Calculus is not necessary to understand much of this book, it is used in some of the end-of-chapter appendices and in some of the more advanced topics in part 3.
\section{求和算子与描述统计量} \section{Summation Operator and Description Statistics}
\textbf{求和算子} 是用以表达多个数求和运算的一个缩略符号,它在统计学和计量经济学分析中扮演着重要作用。如果 $\{x_i: i=1, 2, \ldots, n\}$ 表示 $n$ 个数的一个序列,那么我们就把这 $n$ 个数的和写为 \textbf{Summation Operator} is an abbreviation used to express the summation of numbers, it plays an important role in statistics and econometrics analysis. If $\{x_i: i=1, 2, \ldots, n\}$ is a sequence of $n$ numbers, the summation of the $n$ numbers is
\begin{equation} \begin{equation}
\sum_{i=1}^n x_i \equiv x_1 + x_2 +\cdots + x_n \sum_{i=1}^n x_i \equiv x_1 + x_2 +\cdots + x_n
\end{equation} \end{equation}
\chapter{A Minimal Example}
\begin{lstlisting}[frame=single]
\documentclass{elegantbook}
% title info
\title{Title}
\subtitle{Subtitle is here}
% bio info
\author{Your Name}
\institute{XXX University}
\date{\today}
% extra info
\version{1.00}
\equote{Victory won\rq t come to us unless we go to it. --- M. Moore}
\logo{logo.png}
\cover{cover.jpg}
\begin{document}
\maketitle
\tableofcontents
\mainmatter
\hypersetup{pageanchor=true}
% add preface chapter here if needed
\chapter{Example Chapter Title}
The content of chapter one.
\bibliography{reference}
\appendix
\chapter{Appendix Chapter Title}
The content of appendix 1.
\end{document}
\end{lstlisting}
\end{document} \end{document}

View File

@@ -3,13 +3,13 @@
%% Copyright 2013-2019 ElegantLaTeX (elegantlatex2e@gmail.com) %% Copyright 2013-2019 ElegantLaTeX (elegantlatex2e@gmail.com)
%% %%
%% This work may be distributed and/or modified freely %% This work may be distributed and/or modified freely
%% available at https://github.com/ElegantLaTeX %% available at https://github.com/ElegantLaTeX/ElegantBook
% % % %
%% Last Modification 2019-01-22 %% Last Modification 2019-02-25
%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%
% % !Mode:: "TeX:UTF-8" % % !Mode:: "TeX:UTF-8"
\NeedsTeXFormat{LaTeX2e} \NeedsTeXFormat{LaTeX2e}
\ProvidesClass{elegantbook}[2019/01/22 v3.05 ElegantBook document class] \ProvidesClass{elegantbook}[2019/02/24 v3.06 ElegantBook document class]
\RequirePackage{kvoptions} \RequirePackage{kvoptions}
\RequirePackage{etoolbox} \RequirePackage{etoolbox}
@@ -24,7 +24,7 @@
\DeclareVoidOption{cyan}{\ekv{color = cyan}} \DeclareVoidOption{cyan}{\ekv{color = cyan}}
\DeclareVoidOption{blue}{\ekv{color = blue}} \DeclareVoidOption{blue}{\ekv{color = blue}}
\DeclareVoidOption{plain}{\ekv{color = plain}} \DeclareVoidOption{plain}{\ekv{color = plain}}
% \DeclareVoidOption{nocolor}{\ekv{color = none}} \DeclareVoidOption{nocolor}{\ekv{color = none}}
\DeclareVoidOption{en}{\ekv{lang=en}} \DeclareVoidOption{en}{\ekv{lang=en}}
\DeclareVoidOption{cn}{\ekv{lang=cn}} \DeclareVoidOption{cn}{\ekv{lang=cn}}
% ----- Math option ----- % ----- Math option -----
@@ -40,7 +40,7 @@
\ProcessKeyvalOptions*\relax \ProcessKeyvalOptions*\relax
% \ProcessOptions*\relax % \ProcessOptions*\relax
\LoadClass[12pt,a4paper,openany]{book} \LoadClass[12pt,a4paper,oneside,openany]{book}
\RequirePackage{indentfirst} \RequirePackage{indentfirst}
\setlength\parindent{2em} \setlength\parindent{2em}
@@ -57,7 +57,7 @@
\RequirePackage{xunicode} \RequirePackage{xunicode}
\setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}]{SimSun} \setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}]{SimSun}
\setCJKsansfont[BoldFont={SimHei},ItalicFont={KaiTi}]{KaiTi} \setCJKsansfont[BoldFont={SimHei},ItalicFont={KaiTi}]{KaiTi}
\setCJKmonofont[BoldFont={SimHei},ItalicFont={KaiTi},Scale=0.9]{Microsoft YaHei} \setCJKmonofont[BoldFont={SimHei},ItalicFont={KaiTi},Scale=0.7]{Microsoft YaHei}
\XeTeXlinebreaklocale "zh" \XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt \XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt
\RequirePackage{newtxmath} \RequirePackage{newtxmath}
@@ -77,7 +77,7 @@
\RequirePackage{newtxmath} \RequirePackage{newtxmath}
\RequirePackage[UTF8, scheme=plain]{ctex} \RequirePackage[UTF8, scheme=plain]{ctex}
\fi \fi
\RequirePackage[scale=0.8]{FiraMono} \RequirePackage[scale=0.7]{FiraMono}
% %
% font setting for text and math % font setting for text and math
@@ -242,8 +242,8 @@
\RequirePackage{geometry} \RequirePackage{geometry}
\geometry{ \geometry{
a4paper, a4paper,
left=27mm, %% or inner=23mm % left=27mm, %% or inner=23mm
right=27mm, %% or outer=18mm % right=27mm, %% or outer=18mm
top=25.4mm, bottom=25.4mm, top=25.4mm, bottom=25.4mm,
headheight=2.17cm, headheight=2.17cm,
headsep=4mm, headsep=4mm,
@@ -278,13 +278,16 @@
\titleformat{\chapter}[\style]{\bfseries} \titleformat{\chapter}[\style]{\bfseries}
{\filcenter\LARGE\enspace\bfseries{\color{main}\IfAppendix{\appendixname}{\chaptername}\enspace}}{1pt}{\bfseries\color{main}\LARGE\filcenter}[\filcenter\base{main}{88}] {\filcenter\LARGE\enspace\bfseries{\color{main}\IfAppendix{\appendixname}{\chaptername}\enspace}}{1pt}{\bfseries\color{main}\LARGE\filcenter}[\filcenter\base{main}{88}]
\titleformat{\section}[hang]{\bfseries} \titleformat{\section}[hang]{\bfseries}
{\hspace{-2.45em}\Large\bfseries{\color{main}\thesection}\enspace}{1pt}{\color{main}\Large\bfseries\filright} {\hspace{-2.45em}\Large\bfseries{\color{main}\thesection}\enspace}{1pt}{\color{main}\Large\bfseries\filright}
\titleformat{\subsection}[hang]{\bfseries} \titleformat{\subsection}[hang]{\bfseries}
{\hspace{-2.45em}\large\bfseries\color{main}\thesubsection\enspace}{1pt}{\color{main}\large\bfseries\filright} {\hspace{-2.45em}\large\bfseries\color{main}\thesubsection\enspace}{1pt}{\color{main}\large\bfseries\filright}
\titleformat{\subsubsection}[hang]{\bfseries}
{\hspace{-2.45em}\large\bfseries\color{main}\thesubsection\enspace}{1pt}{\color{main}\large\bfseries\filright}
\titlespacing{\chapter}{0pt}{0pt}{1.5\baselineskip} \titlespacing{\chapter}{0pt}{0pt}{1.5\baselineskip}
%\titlespacing{\subsection}{0pt}{0.5\baselineskip}{-\baselineskip} %\titlespacing{\subsection}{0pt}{0.5\baselineskip}{-\baselineskip}
@@ -494,9 +497,9 @@
breaklines=true, breaklines=true,
keywordstyle=\bf\color{winered}\ttfamily, keywordstyle=\bf\color{winered}\ttfamily,
commentstyle=\color{gray}, commentstyle=\color{gray},
emph={elegantpaper,fontenc,fontspec,xeCJK,FiraMono,xunicode,newtxmath,figure,fig,image,img,table,itemize,enumerate,newtxtext,newtxtt,ctex,microtype,description,times,newtx,booktabs,tabular,PDFLaTeX,XeLaTeX,type1cm,BibTeX,device,color,mode,lang,amsthm}, emph={elegantpaper,fontenc,fontspec,xeCJK,FiraMono,xunicode,newtxmath,figure,fig,image,img,table,itemize,enumerate,newtxtext,newtxtt,ctex,microtype,description,times,newtx,booktabs,tabular,PDFLaTeX,XeLaTeX,type1cm,BibTeX,device,color,mode,lang,amsthm,tcolorbox,titlestyle},
emphstyle={\color{frenchplum}}, emphstyle={\color{frenchplum}},
morekeywords={DeclareSymbolFont,SetSymbolFont,toprule,midrule,bottomrule,institute,version,includegraphics,setmainfont,setsansfont,setmonofont ,setCJKmainfont,setCJKsansfont,setCJKmonofont,RequirePackage,figref,tabref,email,maketitle,keywords,definecolor}, morekeywords={DeclareSymbolFont,SetSymbolFont,toprule,midrule,bottomrule,institute,version,includegraphics,setmainfont,setsansfont,setmonofont ,setCJKmainfont,setCJKsansfont,setCJKmonofont,RequirePackage,figref,tabref,email,maketitle,keywords,definecolor,equote,logo,cover,subtitle,appendix,chapter,hypersetup,mainmatter,tableofcontents},
frame=none, frame=none,
tabsize=2, tabsize=2,
rulecolor=\color{main}, rulecolor=\color{main},