3 Commits
v3.03 ... v3.04

Author SHA1 Message Date
EthanDeng
7d4c6673ad date 2019-01-15 18:36:00 +08:00
EthanDeng
8f09be2d61 format 2019-01-15 18:19:15 +08:00
EthanDeng
d79866f1cb v3.04 2019-01-15 17:24:28 +08:00
3 changed files with 378 additions and 404 deletions

View File

@@ -1,15 +1,15 @@
%%%%%%%%%%%%%%%%%%%%%%
%% start of file `elegantbook.cls'.
%% Copyright 2013-2019 ElegantLaTeX (ddswhu@126.com)
%% Copyright 2013-2019 ElegantLaTeX (elegantlatex2e@gmail.com)
%%
%% This work may be distributed and/or modified freely
%% available at https://ddswhu.me/resource/
%% available at https://github.com/ElegantLaTeX
% %
%% Last Modification 2018-01-08
%% Last Modification 2019-01-15
%%%%%%%%%%%%%%%%%%%%%
% % !Mode:: "TeX:UTF-8"
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{elegantbook}[2018/01/08 v3.03 ElegantBook document class]
\ProvidesClass{elegantbook}[2019/01/15 v3.04 ElegantBook document class]
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -40,8 +40,8 @@
\LoadClass[12pt,a4paper,openany]{book}
\usepackage[UTF8,space=auto,scheme=plain]{ctex}
\usepackage{indentfirst}
\RequirePackage[UTF8,space=auto,scheme=plain]{ctex}
\RequirePackage{indentfirst}
\setlength\parindent{2em}
% font setting for text and math
@@ -51,6 +51,16 @@
\RequirePackage[scale=0.85]{newtxtt}
\RequirePackage{type1cm}
\DeclareSymbolFont{cmlargesymbols}{OMX}{cmex}{m}{n}
\DeclareMathSymbol{\intop}{\mathop}{cmlargesymbols}{"5A}
\def\int{\intop\nolimits}
\DeclareMathSymbol{\ointop}{\mathop}{cmlargesymbols}{"49}
\def\oint{\ointop\nolimits}
\DeclareMathSymbol{\sumop}{\mathop}{cmlargesymbols}{"58}
\let\sum\sumop
\DeclareMathSymbol{\prodop}{\mathop}{cmlargesymbols}{"59}
\let\prod\prodop
% ----- Handle Colors -----
%%
@@ -74,7 +84,9 @@
\definecolor{third}{RGB}{7,127,128}%
}{\relax}
% corlor definition
\definecolor{winered}{rgb}{0.5,0,0}
\definecolor{bule}{RGB}{18,29,57}
\AtBeginDocument{
\input{base.tex}
@@ -104,9 +116,6 @@
\newtoks\enend
\newtoks\zhend
%%
%%
\renewcommand{\contentsname}{\hspace{2em}}
@@ -119,54 +128,38 @@
\renewcommand{\appendixname}{}
\renewcommand{\indexname}{\hspace{2em}}
% more pretty font
%%
\linespread{1.3}
\RequirePackage{microtype}
\RequirePackage{booktabs}
\RequirePackage{multicol}
\RequirePackage{xcolor}
\RequirePackage{graphicx}
\RequirePackage{fancyvrb}
\graphicspath{{image/}{figure/}{fig/}{img/}}
%%
\RequirePackage{graphicx}
\RequirePackage{enumerate}
\RequirePackage{amsmath,mathrsfs,amsfonts}
\RequirePackage{booktabs}
\linespread{1.3}
\RequirePackage{multicol}
\RequirePackage{xcolor}
\RequirePackage{fancyvrb}
\graphicspath{{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}}
\newcommand*{\myquote}[1]{\def\@myquote{#1}}
\newcommand*{\logo}[1]{
\def\@logo{\includegraphics[width=0.3\textwidth]{#1}
}
}
%%
\RequirePackage{wallpaper}
\newcommand*{\cover}[1]{\def\@cover{
\ThisTileWallPaper{\paperwidth}{\paperheight}{#1}
}
}
\RequirePackage{natbib}
\setlength{\bibsep}{0.0pt}
\def\bibfont{\footnotesize}
%%
\RequirePackage{geometry}
\geometry{
a4paper,
left=27mm, %% or inner=23mm
right=27mm, %% or outer=18mm
top=25.4mm, bottom=25.4mm,
headheight=2.17cm,
headsep=4mm,
footskip=12mm
}
\RequirePackage{hyperref}
\AtBeginDocument{
\hypersetup{
pdftitle = {\the\zhtitle\the\zhend},
pdfauthor = {\@author}
}
}
\hypersetup{
breaklinks,
unicode,
@@ -174,6 +167,8 @@
bookmarksnumbered=true,
bookmarksopen=true,
pdfsubject=\@author \@title Book,
pdftitle = {\the\zhtitle\the\zhend},
pdfauthor = {\@author}
pdfkeywords={ElegantBook},
pdfcreator={XeLaTeX with ElegantBook class},
colorlinks,
@@ -185,16 +180,6 @@
linktocpage
}
\RequirePackage{geometry}
\geometry{
a4paper,
left=27mm, %% or inner=23mm
right=27mm, %% or outer=18mm
top=25.4mm, bottom=25.4mm,
headheight=2.17cm,
headsep=4mm,
footskip=12mm
}
%%
\RequirePackage[center,pagestyles]{titlesec}
@@ -216,25 +201,20 @@
%\titlespacing{\subsection}{0pt}{0.5\baselineskip}{-\baselineskip}
% caption settings
\RequirePackage{caption}
\captionsetup{labelfont = bf}
\RequirePackage[font=small,labelfont={bf}]{caption}
\captionsetup[table]{skip=3pt}
\captionsetup[figure]{skip=3pt}
\newcommand\figref[1]{\textbf{Figure}~\ref{#1}}
\newcommand\tabref[1]{\textbf{Table}~\ref{#1}}
% list/itemize/enumerate setting
\RequirePackage[shortlabels]{enumitem}
\setlist{nolistsep}
% caption settings
\RequirePackage[font=small,labelfont={bf}]{caption}
\captionsetup[table]{skip=3pt}
\captionsetup[figure]{skip=3pt}
\definecolor{bule}{RGB}{18,29,57}
\RequirePackage[most]{tcolorbox}
\tcbset{
@@ -274,40 +254,43 @@
\newtcbtheorem[auto counter,number within=chapter]{definition}{}{defstyle}{def}
\newtcbtheorem[auto counter,number within=chapter]{theorem}{}{thmstyle}{thm}
\newtcbtheorem[auto counter,number within=chapter]{proposition}{}{propstyle}{prop}
\newtcbtheorem[auto counter,number within=chapter]{proposition}{}{propstyle}{pro}
\newtcbtheorem[auto counter,number within=chapter]{corollary}{}{thmstyle}{cor}
\newtcbtheorem[auto counter,number within=chapter]{lemma}{}{thmstyle}{lemma}
\newtcbtheorem[auto counter,number within=chapter]{lemma}{}{thmstyle}{lem}
%% Example with counter
\newcounter{example}[chapter]
\renewcommand{\theexample}{\thechapter.\arabic{example}}
\newenvironment{example}{\par\noindent\textbf{\,\refstepcounter{example}\theexample}\color{black!90}}{\par}
\newcounter{exam}[chapter]
\setcounter{exam}{0}
\renewcommand{\theexam}{\thechapter.\arabic{exam}}
\newenvironment{example}[1][]{
\refstepcounter{exam}\par\medskip\noindent \textbf{\color{main}{}~\theexam #1:}\rmfamily %
}{
\par\medskip\ignorespacesafterend %
}
%% Exercise with counter
\newcounter{exercise}[chapter]
\renewcommand{\theexercise}{\thechapter.\arabic{exercise}}
\newenvironment{exercise}{\par\noindent\textbf{\,\refstepcounter{exercise}\theexercise}}{\par}
\newcounter{exer}[chapter]
\setcounter{exer}{0}
\renewcommand{\theexer}{\thechapter.\arabic{exer}}
\newenvironment{exercise}[1][]{
\refstepcounter{exer}\par\medskip\noindent \textbf{\color{main}{}~\theexer #1:}\rmfamily %
}{
\par\medskip\ignorespacesafterend %
}
%%define the note and proof environment
\RequirePackage{pifont,manfnt}
\newenvironment{note}{\par\noindent{\makebox[0pt][r]{\scriptsize\color{red!90}\textdbend\quad}\textbf{}}\itshape}{\par}
\newenvironment{proof}{\par\noindent\textbf{}\color{black!90}\small}{\hfill$\Box$\quad\par}
\newenvironment{remark}{\noindent\textbf{}}{\par}
\newenvironment{assumption}{\par\noindent\textbf{}}{\par}
\newenvironment{conclusion}{\par\noindent\textbf{}}{\par}
\newenvironment{solution}{\par\noindent\textbf{}}{\par}
\newenvironment{property}{\par\noindent\textbf{}}{\par}
\newenvironment{note}{\par\noindent{\makebox[0pt][r]{\scriptsize\color{red!90}\textdbend\quad}\textbf{\color{main}{}}}\itshape}{\par}
\newenvironment{proof}{\par\noindent\textbf{\color{main}{}}\color{black!90}\small}{\hfill$\Box$\quad\par}
\newenvironment{remark}{\noindent\textbf{\color{main}{}}}{\par}
\newenvironment{assumption}{\par\noindent\textbf{\color{main}{}}}{\par}
\newenvironment{conclusion}{\par\noindent\textbf{\color{main}{}}}{\par}
\newenvironment{solution}{\par\noindent\textbf{\color{main}{}}}{\par}
\newenvironment{property}{\par\noindent\textbf{\color{main}{}}}{\par}
%
\RequirePackage{fancyhdr}
\RequirePackage{lastpage}
\fancyhf{}
@@ -322,26 +305,19 @@
\renewcommand{\sectionmark}[1]{\markright{\thesection\; #1}{} }
\renewcommand{\chaptermark}[1]{\markboth{\chaptername \; #1\;}{}}
\DeclareSymbolFont{cmlargesymbols}{OMX}{cmex}{m}{n}
\DeclareMathSymbol{\intop}{\mathop}{cmlargesymbols}{"5A}
\def\int{\intop\nolimits}
\DeclareMathSymbol{\ointop}{\mathop}{cmlargesymbols}{"49}
\def\oint{\ointop\nolimits}
\DeclareMathSymbol{\sumop}{\mathop}{cmlargesymbols}{"58}
\let\sum\sumop
\DeclareMathSymbol{\prodop}{\mathop}{cmlargesymbols}{"59}
\let\prod\prodop
\newcommand\figref[1]{\textbf{Figure}~\ref{#1}}
\newcommand\tabref[1]{\textbf{Table}~\ref{#1}}
%%
\newcommand*{\myquote}[1]{\def\@myquote{#1}}
\newcommand*{\logo}[1]{
\def\@logo{\includegraphics[width=0.3\textwidth]{#1}
}
}
%%
\RequirePackage{wallpaper}
\newcommand*{\cover}[1]{\def\@cover{
\ThisTileWallPaper{\paperwidth}{\paperheight}{#1}
}
}
\def\maketitle{%
\thispagestyle{empty}
@@ -368,7 +344,7 @@
\color{second}
\rule{0.45\textwidth}{1pt}\\
{\color{main}\@author}\\
{\color{main}\today}\\
{\color{main}\@date}\\
: \hyperlink{\the\email}{\the\email}\\
\rule{0.45\textwidth}{1pt}
\end{flushright}
@@ -381,7 +357,3 @@
\RequirePackage{natbib}
\setlength{\bibsep}{0.0pt}
\def\bibfont{\footnotesize}

Binary file not shown.

View File

@@ -1,13 +1,14 @@
\documentclass{elegantbook}
\author{ddswhu \& Liam Huang}
\email{ddswhu@outlook.com}
\date{\today}
\email{elegantlatex2e@gmail.com}
\usepackage{ntheorem}
\zhtitle{优美的 \LaTeX{} 书籍}
\zhend{模板}
\entitle{Elegant\LaTeX{} Book}
\enend{Template}
\version{3.03}
\version{3.04}
\myquote{Victory won\rq t come to us unless we go to it.}
\logo{ElegantLaTeX_green.pdf}
\cover{cover.pdf}
@@ -35,30 +36,31 @@
\mainmatter
\chapter{Elegant\LaTeX{} 系列模板介绍}
值此版本发行之际,我们 Elegant\LaTeX{} 项目组向大家重新介绍一下我们的工作我们致力于打造一系列美观、优雅、简便的模板方便用户使用。Elegant\LaTeX{} 系列模板目前由 ElegantNoteElegantBookElegantPaperElegantBeamer 组成,分别用于排版笔记,书籍工作论文和幻灯片讲稿。这些子项目的名词是一体的,请在使用这些名词的时候不要将其断开(如 Elegant Note 是不正确的写法。并且Elegant\LaTeX{} Book 指的即是 ElegantBook。
值此版本发行之际,我们 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} 组成,分别用于排版笔记,书籍工作论文。这些子项目的名词是一体的,请在使用这些名词的时候不要将其断开(如 Elegant Note 是不正确的写法。并且Elegant\LaTeX{} Book 指的即是 ElegantBook。
请用户在作者的主页下载最新版本,下载地址:\href{https://ddswhu.me/resource/}{https://ddswhu.me/resource/}。本文将介绍本模板的一些设置内容以及基本使用方法。如果您在使用此模板,欢迎把您使用此模板制作的成品发一份给我们,谢谢!如果您有其他问题,建议或者意见,欢迎联系我\mailto{ddswhu@outlook.com}
请用户在作者的主页下载最新版本,下载地址:\href{https://github.com/ElegantLaTeX/ElegantBook/releases}{Github/ElegantBook/Releases}。本文将介绍本模板的一些设置内容以及基本使用方法。如果您在使用此模板,欢迎把您使用此模板制作的成品发一份给我们,谢谢!如果您有其他问题,建议或者意见,欢迎联系我
\section{ElegantBook 更新说明}
在这几年间,我们收到了很多用户的反馈,主要的问题涉及到字体安装,编码支持,定理浮动,定理跨页,交叉引用等等。我们思前想后,原先让用户安装字体以追求视觉上的美观并不完美,用户陷入了巨大的麻烦,这违背了我们的模板初衷。因此我们在新版中删除了这部分,用户无需安装任何字体。让我们来看下此次 ElegantBook 模板 3.0 更新的主要内容有:
在这几年间,我们收到了很多用户的反馈,主要的问题涉及到字体安装,编码支持,定理浮动,定理跨页,交叉引用等等。我们思前想后,原先让用户安装字体以追求视觉上的美观并不完美,用户陷入了巨大的麻烦,这违背了我们的模板初衷。因此我们在新版中删除了这部分,用户无需安装任何字体。让我们来看下此次 ElegantBook 模板 3.x 更新的主要内容有:
\begin{enumerate}[noitemsep]
\item 删除了自定义字体设置,改用 \texttt{ctex} 宏包用以支持中文
\item 使用 \texttt{tcolorbox} 宏包改写了原先的定理类环境,目前定理环境等均可以跨页
\item 重新命名了定理类环境的名称theoremdefinitionproposition 等)
\item 重新命名了颜色的名字firstsecondthird
\item 删除了自定义字体设置,改用 \texttt{ctex} 宏包用以支持中文
\item 使用 \texttt{tcolorbox} 宏包改写了原先的定理类环境,目前定理环境等均可以跨页
\item 重新命名了定理类环境的名称theoremdefinitionproposition 等)
\item 重新命名了颜色的名字firstsecondthird
\item 重新绘制 ElegantLaTeX 的 Logo
\item 更新类定理环境,包括其交叉引用;
\item 特别修正附录相关内容。
\end{enumerate}
\section{未来更新计划}
\begin{enumerate}[noitemsep]
\item 设计一个适合的 LOGO
\item 重新设计 base 图标;
\item 重新设计一个好看的封面。
\item 将基础模板改为英文模板,添加选项使其支持中文。
\item 将最早的 ElegantNote 重新设计为简版发布。
\item 添加一个简化风格plain的颜色主题。
\end{enumerate}
@@ -138,7 +140,7 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
我们将通过三个步骤定义可测函数的积分。首先定义非负简单函数的积分。以下设 $E$$\mathcal{R}^n$ 中的可测集。
\begin{definition}{可积性}{inter}
\begin{definition}{可积性}{int}
$ 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$ 上的积分为
\begin{equation}
\label{inter}
@@ -155,9 +157,9 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
$D(x)$$[0,1]$ 上是 Lebesgue 可积的并且积分值为零。但 $D(x)$$[0,1]$ 上不是 Riemann 可积的。
有界变差函数是与单调函数有密切联系的一类函数。有界变差函数可以表示为两个单调递增函数之差。与单调函数一样,有界变差函数几乎处处可导。与单调函数不同,有界变差函数类对线性运算是封闭的,它们构成一线空间。
有界变差函数是与单调函数有密切联系的一类函数。有界变差函数可以表示为两个单调递增函数之差。与单调函数一样,有界变差函数几乎处处可导。与单调函数不同,有界变差函数类对线性运算是封闭的,它们构成一线空间。练习题 \ref{exer:43} 是一个性质的证明。
\begin{exercise}
\begin{exercise}\label{exer:43}
$f\in L(\mathcal{R}^1)$$g$$\mathcal{R}^1$ 上的有界可测函数。证明函数
\begin{equation}
\label{ex:1}
@@ -166,7 +168,7 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
$\mathcal{R}^1$ 上的连续函数。
\end{exercise}
\begin{theorem}{Fubini 定理}{31}
\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}
@@ -176,7 +178,7 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
\end{theorem}
\begin{note}
在本模板中引理lemma推论corollary )的样式和定理的样式一致,包括颜色,仅仅只有计数器的设置不一样。
在本模板中引理lemma推论corollary )的样式和定理~\ref{thm:fubi} 的样式一致,包括颜色,仅仅只有计数器的设置不一样。
\end{note}
我们说一个实变或者复变量的实值或者复值函数是在区间上平方可积的,如果其绝对值的平方在该区间上的积分是有限的。所有在勒贝格积分意义下平方可积的可测函数构成一个希尔伯特空间,也就是所谓的 $L^2$ 空间,几乎处处相等的函数归为同一等价类。形式上,$L^2$ 是平方可积函数的空间和几乎处处为 0 的函数空间的商空间。