mirror of
https://github.com/ElegantLaTeX/ElegantBook.git
synced 2026-01-26 12:24:36 +08:00
renew environment name
This commit is contained in:
@@ -8,22 +8,23 @@
|
|||||||
\date{\today}
|
\date{\today}
|
||||||
\version{3.09}
|
\version{3.09}
|
||||||
|
|
||||||
|
|
||||||
\extrainfo{Victory won\rq t come to us unless we go to it. --- M. Moore}
|
\extrainfo{Victory won\rq t come to us unless we go to it. --- M. Moore}
|
||||||
|
|
||||||
\logo{logo-blue.png}
|
\logo{logo-blue.png}
|
||||||
\cover{cover.jpg}
|
\cover{cover.jpg}
|
||||||
|
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
\maketitle
|
\maketitle
|
||||||
|
|
||||||
\frontmatter
|
\frontmatter
|
||||||
|
\chapter*{引言}
|
||||||
|
|
||||||
|
这是引言部分
|
||||||
|
|
||||||
\tableofcontents
|
\tableofcontents
|
||||||
|
|
||||||
\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} 或者邮件联系我们。
|
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} 或者邮件联系我们。
|
||||||
@@ -82,12 +83,12 @@ Elegant\LaTeX{} 项目组致力于打造一系列美观、优雅、简便的模
|
|||||||
我们把三套模板全部上传到 \href{https://www.overleaf.com/}{Overleaf} 上了,网络便利的用户可以直接通过 Overleaf 在线使用我们的模板。使用 Overleaf 的好处是无需安装 \TeX{} Live 2019,可以随时随地访问自己的文件。查找模板,请在 Overleaf 模板库里面搜索 \lstinline{elegantlatex} 即可,你也可以直接访问\href{https://www.overleaf.com/latex/templates?addsearch=elegantlatex}{搜索结果}。选择适当的模板之后,将其 \lstinline{Open as Template},即可把模板存到自己账户下,然后可以自由编辑以及与别人一起协作。更多关于 Overleaf 的介绍和使用,请参考 Overleaf 的\href{https://www.overleaf.com/learn}{官方文档}。
|
我们把三套模板全部上传到 \href{https://www.overleaf.com/}{Overleaf} 上了,网络便利的用户可以直接通过 Overleaf 在线使用我们的模板。使用 Overleaf 的好处是无需安装 \TeX{} Live 2019,可以随时随地访问自己的文件。查找模板,请在 Overleaf 模板库里面搜索 \lstinline{elegantlatex} 即可,你也可以直接访问\href{https://www.overleaf.com/latex/templates?addsearch=elegantlatex}{搜索结果}。选择适当的模板之后,将其 \lstinline{Open as Template},即可把模板存到自己账户下,然后可以自由编辑以及与别人一起协作。更多关于 Overleaf 的介绍和使用,请参考 Overleaf 的\href{https://www.overleaf.com/learn}{官方文档}。
|
||||||
|
|
||||||
\begin{remark}
|
\begin{remark}
|
||||||
Overleaf 上,中文需要使用 \hologo{XeLaTeX} 进行编译,英文可以使用 \hologo{pdfLaTeX} 与 \hologo{XeLaTeX} 进行编译。
|
Overleaf 上,中文需要使用 \hologo{XeLaTeX} 进行编译,英文建议使用 \hologo{pdfLaTeX} 编译。
|
||||||
\end{remark}
|
\end{remark}
|
||||||
|
|
||||||
\section{用户作品计划}
|
\section{用户作品计划}
|
||||||
|
|
||||||
Elegant\LaTeX{} 系列模板从创立至今已经有 8 年了,我们的模板也受到了很多用户的喜爱,在此,为了促进模板用户之间的交流,了解用户需求,完善本模板,我们将建立一个区域专门展示用户的文档,包括但不限于 Github 和官网等。如果你愿意将自己的作品展示出来,请邮件或者其他方式联系我们。如果自己代码已经传到 Github 或者 Gitee 等网站,可以提供对应网址。
|
Elegant\LaTeX{} 系列模板从创立至今已经有 8 年了,我们的模板也受到了很多用户的喜爱,在此,为了促进模板用户之间的交流,了解用户需求,完善本模板,我们将建立一个区域专门展示用户的文档,包括但不限于 GitHub 和官网等。如果你愿意将自己的作品展示出来,请邮件或者其他方式联系我们。如果自己代码已经传到 GitHub 或者 Gitee 等网站,可以提供对应网址。
|
||||||
|
|
||||||
\centerline{\textcolor{red}{\bfseries 广告位招租!}}
|
\centerline{\textcolor{red}{\bfseries 广告位招租!}}
|
||||||
|
|
||||||
@@ -171,6 +172,10 @@ Elegant\LaTeX{} 系列模板从创立至今已经有 8 年了,我们的模板
|
|||||||
只有中文环境(\lstinline{lang=cn})才可以输入中文。另外如果抄录环境(\lstinline{lstlisting})中有中文字符,请务必使用 \hologo{XeLaTeX} 编译。
|
只有中文环境(\lstinline{lang=cn})才可以输入中文。另外如果抄录环境(\lstinline{lstlisting})中有中文字符,请务必使用 \hologo{XeLaTeX} 编译。
|
||||||
\end{remark}
|
\end{remark}
|
||||||
|
|
||||||
|
\begin{note}
|
||||||
|
Hellow
|
||||||
|
\end{note}
|
||||||
|
|
||||||
\section{设备选项}
|
\section{设备选项}
|
||||||
最早我们在 ElegantNote 模板中加入了设备选项(\lstinline{device}),后来,我们觉得这个设备选项的设置可以应用到 ElegantBook 中\footnote{不过因为 ElegantBook 模板封面图片的存在,在修改页面设计时,需要对图片进行裁剪。},而且 Book 一般内容比较多,如果在 iPad 上看无需切边,放大,那用户的阅读体验将会得到巨大提升。你可以使用下面的选项将版面设置为 iPad 设备模式\footnote{默认为 normal 模式,也即 A4 纸张大小。}
|
最早我们在 ElegantNote 模板中加入了设备选项(\lstinline{device}),后来,我们觉得这个设备选项的设置可以应用到 ElegantBook 中\footnote{不过因为 ElegantBook 模板封面图片的存在,在修改页面设计时,需要对图片进行裁剪。},而且 Book 一般内容比较多,如果在 iPad 上看无需切边,放大,那用户的阅读体验将会得到巨大提升。你可以使用下面的选项将版面设置为 iPad 设备模式\footnote{默认为 normal 模式,也即 A4 纸张大小。}
|
||||||
\begin{lstlisting}
|
\begin{lstlisting}
|
||||||
@@ -391,6 +396,14 @@ This is the content of example environment.
|
|||||||
The content of introduction.
|
The content of introduction.
|
||||||
\end{lstlisting}
|
\end{lstlisting}
|
||||||
|
|
||||||
|
\section{修改目录层级}
|
||||||
|
|
||||||
|
默认本模板目录深度为 1,你可以在导言区使用
|
||||||
|
\begin{lstlisting}
|
||||||
|
\setcounter{tocdepth}{2}
|
||||||
|
\end{lstlisting}
|
||||||
|
将其修改为 2 级目录(章与节)显示。
|
||||||
|
|
||||||
\section{章节摘要}
|
\section{章节摘要}
|
||||||
模板新增了一个章节摘要环境(introduction),使用示例
|
模板新增了一个章节摘要环境(introduction),使用示例
|
||||||
\begin{lstlisting}
|
\begin{lstlisting}
|
||||||
@@ -575,9 +588,9 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
|
|||||||
是 $\mathcal{R}^1$ 上的连续函数。
|
是 $\mathcal{R}^1$ 上的连续函数。
|
||||||
\end{exercise}
|
\end{exercise}
|
||||||
|
|
||||||
\begin{problem}
|
%\begin{problem}
|
||||||
即 $D(x)$ 在 $[0,1]$ 上是 Lebesgue 可积的并且积分值为零。但 $D(x)$ 在 $[0,1]$ 上不是 Riemann 可积的。
|
%即 $D(x)$ 在 $[0,1]$ 上是 Lebesgue 可积的并且积分值为零。但 $D(x)$ 在 $[0,1]$ 上不是 Riemann 可积的。
|
||||||
\end{problem}
|
%\end{problem}
|
||||||
|
|
||||||
\begin{example}
|
\begin{example}
|
||||||
即 $D(x)$ 在 $[0,1]$ 上是 Lebesgue 可积的并且积分值为零。但 $D(x)$ 在 $[0,1]$ 上不是 Riemann 可积的。
|
即 $D(x)$ 在 $[0,1]$ 上是 Lebesgue 可积的并且积分值为零。但 $D(x)$ 在 $[0,1]$ 上不是 Riemann 可积的。
|
||||||
@@ -722,8 +735,6 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
|
|||||||
|
|
||||||
\begin{solution}
|
\begin{solution}
|
||||||
首先,我们{\heiti 强烈建议你不要去修改字体}!如果你一定坚持修改字体,请在 \lstinline{newtxtext} 宏包加载前加入中文字体设置(\lstinline{xeCJK} 宏包)。
|
首先,我们{\heiti 强烈建议你不要去修改字体}!如果你一定坚持修改字体,请在 \lstinline{newtxtext} 宏包加载前加入中文字体设置(\lstinline{xeCJK} 宏包)。
|
||||||
|
|
||||||
如果你选择自定义字体,请设置好 \lstinline{\kaishu},\lstinline{\heiti} 等命令,否则会报错。如果你看不懂我现在说的,请停止你的字体自定义行为。
|
|
||||||
\end{solution}
|
\end{solution}
|
||||||
|
|
||||||
\begin{custom}{问题}
|
\begin{custom}{问题}
|
||||||
@@ -783,7 +794,7 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
|
|||||||
|
|
||||||
\chapter{最小示例}
|
\chapter{最小示例}
|
||||||
|
|
||||||
\begin{lstlisting}
|
\begin{lstlisting}[frame=none]
|
||||||
\documentclass[lang=cn,11pt]{elegantbook}
|
\documentclass[lang=cn,11pt]{elegantbook}
|
||||||
% title info
|
% title info
|
||||||
\title{Title}
|
\title{Title}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
\documentclass[fancy,11pt]{elegantbook}
|
\documentclass[11pt,simple]{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}
|
||||||
@@ -14,14 +14,12 @@
|
|||||||
\cover{cover.jpg}
|
\cover{cover.jpg}
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
\maketitle
|
\maketitle
|
||||||
\tableofcontents
|
|
||||||
\clearpage
|
|
||||||
\thispagestyle{empty}
|
|
||||||
\mainmatter
|
|
||||||
\hypersetup{pageanchor=true}
|
|
||||||
|
|
||||||
|
\frontmatter
|
||||||
|
\tableofcontents
|
||||||
|
|
||||||
|
\mainmatter
|
||||||
\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}.
|
||||||
|
|
||||||
|
|||||||
221
elegantbook.cls
221
elegantbook.cls
@@ -1,6 +1,6 @@
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%% start of file `elegantbook.cls'.
|
%% start of file `elegantbook.cls'.
|
||||||
%% Copyright 2013-2019 ElegantLaTeX (elegantlatex2e@gmail.com)
|
%% Copyright 2013-2020 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/ElegantBook
|
%% available at https://github.com/ElegantLaTeX/ElegantBook
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%
|
||||||
% % !Mode:: "TeX:UTF-8"
|
% % !Mode:: "TeX:UTF-8"
|
||||||
\NeedsTeXFormat{LaTeX2e}
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
\ProvidesClass{elegantbook}[2019/08/18 v3.09 ElegantBook document class]
|
\ProvidesClass{elegantbook}[2020/01/14 v3.10 ElegantBook document class]
|
||||||
|
|
||||||
\RequirePackage{kvoptions}
|
\RequirePackage{kvoptions}
|
||||||
\RequirePackage{etoolbox}
|
\RequirePackage{etoolbox}
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
\DeclareStringOption[fancy]{mode}
|
\DeclareStringOption[fancy]{mode}
|
||||||
\DeclareStringOption[show]{base}
|
\DeclareStringOption[show]{base}
|
||||||
\DeclareStringOption[normal]{device}
|
\DeclareStringOption[normal]{device}
|
||||||
\DeclareStringOption[newtxmath]{math}
|
\DeclareStringOption[cm]{math}
|
||||||
\DeclareStringOption[marginfalse]{marginpar}
|
\DeclareStringOption[marginfalse]{marginpar}
|
||||||
\DeclareStringOption[onecol]{toc}
|
\DeclareStringOption[onecol]{toc}
|
||||||
% ----- backward compatibility
|
% ----- backward compatibility
|
||||||
@@ -57,6 +57,7 @@
|
|||||||
|
|
||||||
\DeclareVoidOption{newtxmath}{\ekv{math=newtx}}
|
\DeclareVoidOption{newtxmath}{\ekv{math=newtx}}
|
||||||
\DeclareVoidOption{mtpro2}{\ekv{math=mtpro2}}
|
\DeclareVoidOption{mtpro2}{\ekv{math=mtpro2}}
|
||||||
|
\DeclareVoidOption{cm}{\ekv{math=cm}}
|
||||||
|
|
||||||
\DeclareVoidOption{margintrue}{\ekv{marginpar=margintrue}}
|
\DeclareVoidOption{margintrue}{\ekv{marginpar=margintrue}}
|
||||||
\DeclareVoidOption{marginfalse}{\ekv{marginpar=marginfalse}}
|
\DeclareVoidOption{marginfalse}{\ekv{marginpar=marginfalse}}
|
||||||
@@ -89,14 +90,11 @@
|
|||||||
headsep=4mm,
|
headsep=4mm,
|
||||||
footskip=12mm
|
footskip=12mm
|
||||||
}
|
}
|
||||||
|
|
||||||
\ifdefstring{\ELEGANT@marginpar}{margintrue}{
|
\ifdefstring{\ELEGANT@marginpar}{margintrue}{
|
||||||
\geometry{
|
\geometry{
|
||||||
marginparwidth=5cm, marginparsep=5mm,
|
marginparwidth=5cm, marginparsep=5mm,
|
||||||
left=2cm,right=7cm,
|
left=2cm,right=7cm,
|
||||||
}
|
}}}
|
||||||
}{\relax}
|
|
||||||
}{\relax}
|
|
||||||
|
|
||||||
\ifdefstring{\ELEGANT@device}{pad}{
|
\ifdefstring{\ELEGANT@device}{pad}{
|
||||||
\geometry{
|
\geometry{
|
||||||
@@ -310,6 +308,23 @@
|
|||||||
\newcommand{\datename}{\textit{时间:}}
|
\newcommand{\datename}{\textit{时间:}}
|
||||||
\newcommand{\versionname}{\textit{版本:}}
|
\newcommand{\versionname}{\textit{版本:}}
|
||||||
\RequirePackage[\ELEGANT@cite]{gbt7714}
|
\RequirePackage[\ELEGANT@cite]{gbt7714}
|
||||||
|
\newcommand{\notename}{笔记}
|
||||||
|
\renewcommand*{\proofname}{证明}
|
||||||
|
\newcommand{\problemname}{例题}
|
||||||
|
\newcommand{\definitionname}{定义}
|
||||||
|
\newcommand{\theoremname}{定理}
|
||||||
|
\newcommand{\axiomname}{公理}
|
||||||
|
\newcommand{\postulatename}{公设}
|
||||||
|
\newcommand{\lemmaname}{引理}
|
||||||
|
\newcommand{\propositionname}{命题}
|
||||||
|
\newcommand{\corollaryname}{推论}
|
||||||
|
\newcommand{\examplename}{例}
|
||||||
|
\newcommand{\exercisename}{练习}
|
||||||
|
\newcommand{\remarkname}{注}
|
||||||
|
\newcommand{\assumptionname}{假设}
|
||||||
|
\newcommand{\conclusionname}{结论}
|
||||||
|
\newcommand{\solutionname}{解}
|
||||||
|
\newcommand{\propertyname}{性质}
|
||||||
}{\relax}
|
}{\relax}
|
||||||
\ifdefstring{\ELEGANT@lang}{en}{
|
\ifdefstring{\ELEGANT@lang}{en}{
|
||||||
\setlength\parindent{2em}
|
\setlength\parindent{2em}
|
||||||
@@ -321,18 +336,37 @@
|
|||||||
\newcommand{\datename}{\textbf{Date: }}
|
\newcommand{\datename}{\textbf{Date: }}
|
||||||
\newcommand{\versionname}{\textbf{Version: }}
|
\newcommand{\versionname}{\textbf{Version: }}
|
||||||
\bibliographystyle{\ELEGANT@bibstyle}
|
\bibliographystyle{\ELEGANT@bibstyle}
|
||||||
|
\newcommand{\notename}{Note}
|
||||||
|
\newcommand{\proofname}{Proof}
|
||||||
|
\newcommand{\problemname}{Problem}
|
||||||
|
\newcommand{\definitionname}{Definition}
|
||||||
|
\newcommand{\theoremname}{Theorem}
|
||||||
|
\newcommand{\axiomname}{Axiom}
|
||||||
|
\newcommand{\postulatename}{Postulate}
|
||||||
|
\newcommand{\lemmaname}{Lemma}
|
||||||
|
\newcommand{\propositionname}{Proposition}
|
||||||
|
\newcommand{\corollaryname}{Corollary}
|
||||||
|
\newcommand{\examplename}{Example}
|
||||||
|
\newcommand{\exercisename}{Exercise}
|
||||||
|
\newcommand{\remarkname}{Remark}
|
||||||
|
\newcommand{\assumptionname}{Assumption}
|
||||||
|
\newcommand{\conclusionname}{Conclusion}
|
||||||
|
\newcommand{\solutionname}{Solution}
|
||||||
|
\newcommand{\propertyname}{Property}
|
||||||
}{\relax}
|
}{\relax}
|
||||||
|
|
||||||
\RequirePackage{xpatch}
|
\RequirePackage{xpatch}
|
||||||
\xpatchcmd{\part}{\thispagestyle{plain}}
|
\xpatchcmd{\part}{
|
||||||
{\thispagestyle{plain}}{}{}
|
\thispagestyle{plain}}{
|
||||||
\xpatchcmd{\@endpart}{\vfil\newpage}{\vfil\newpage
|
\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/}}
|
||||||
|
|
||||||
\RequirePackage{tikz}
|
\usepackage{pgfornament} %% load tizk without tikz
|
||||||
\usetikzlibrary{backgrounds,calc,shadows}
|
\usetikzlibrary{backgrounds,calc,shadows}
|
||||||
\usepackage[object=vectorian]{pgfornament} %%
|
|
||||||
|
|
||||||
\newcommand*{\eitemi}{\tikz \draw [baseline, ball color=structurecolor,draw=none] circle (2pt);}
|
\newcommand*{\eitemi}{\tikz \draw [baseline, ball color=structurecolor,draw=none] circle (2pt);}
|
||||||
\newcommand*{\eitemii}{\tikz \draw [baseline, fill=structurecolor,draw=none,circular drop shadow] circle (2pt);}
|
\newcommand*{\eitemii}{\tikz \draw [baseline, fill=structurecolor,draw=none,circular drop shadow] circle (2pt);}
|
||||||
@@ -402,7 +436,6 @@
|
|||||||
|
|
||||||
% \newlength{\normalparindent}
|
% \newlength{\normalparindent}
|
||||||
% \setlength{\normalparindent}{\parindent}
|
% \setlength{\normalparindent}{\parindent}
|
||||||
|
|
||||||
\ifdefstring{\ELEGANT@mode}{fancy}{
|
\ifdefstring{\ELEGANT@mode}{fancy}{
|
||||||
\tcbset{
|
\tcbset{
|
||||||
common/.style={
|
common/.style={
|
||||||
@@ -417,60 +450,53 @@
|
|||||||
breakable,
|
breakable,
|
||||||
top=8pt,
|
top=8pt,
|
||||||
before skip=8pt,
|
before skip=8pt,
|
||||||
attach boxed title to top left={yshift=-0.11in,xshift=0.15in},
|
attach boxed title to top left={
|
||||||
boxed title style={boxrule=0pt,colframe=white,arc=0pt,outer arc=0pt},
|
yshift=-0.11in,
|
||||||
separator sign={.},
|
xshift=0.15in},
|
||||||
},
|
boxed title style={
|
||||||
|
boxrule=0pt,
|
||||||
|
colframe=white,
|
||||||
|
arc=0pt,
|
||||||
|
outer arc=0pt},
|
||||||
|
separator sign={.},},
|
||||||
defstyle/.style={
|
defstyle/.style={
|
||||||
common,
|
common,
|
||||||
colframe=main,
|
colframe=main,
|
||||||
colback=main!5,
|
colback=main!5,
|
||||||
colbacktitle=main,
|
colbacktitle=main,
|
||||||
overlay unbroken and last={\node[anchor=south east, outer sep=0pt] at (\linewidth-width,0) {\textcolor{main}{$\clubsuit$}}; }
|
overlay unbroken and last={
|
||||||
},
|
\node[anchor=south east, outer sep=0pt] at (\linewidth-width,0) {
|
||||||
|
\textcolor{main}{$\clubsuit$}};}},
|
||||||
thmstyle/.style={
|
thmstyle/.style={
|
||||||
common,
|
common,
|
||||||
colframe=second,
|
colframe=second,
|
||||||
colback=second!5,
|
colback=second!5,
|
||||||
colbacktitle=second,
|
colbacktitle=second,
|
||||||
overlay unbroken and last={\node[anchor=south east, outer sep=0pt] at (\linewidth-width,0) {\textcolor{second}{$\heartsuit$}}; }
|
overlay unbroken and last={
|
||||||
},
|
\node[anchor=south east, outer sep=0pt] at (\linewidth-width,0) {
|
||||||
|
\textcolor{second}{$\heartsuit$}};}},
|
||||||
propstyle/.style={
|
propstyle/.style={
|
||||||
common,
|
common,
|
||||||
colframe=third,
|
colframe=third,
|
||||||
colback=third!5,
|
colback=third!5,
|
||||||
colbacktitle=third,
|
colbacktitle=third,
|
||||||
overlay unbroken and last={\node[anchor=south east, outer sep=0pt] at (\linewidth-width,0) {\textcolor{third}{$\spadesuit$}}; }
|
overlay unbroken and last={
|
||||||
},
|
\node[anchor=south east, outer sep=0pt] at (\linewidth-width,0) {
|
||||||
}
|
\textcolor{third}{$\spadesuit$}};}},}
|
||||||
|
|
||||||
\newtcbtheorem[auto counter,number within=chapter]{definition}{
|
\newtcbtheorem[auto counter,number within=chapter]{definition}{\definitionname}{defstyle}{def}
|
||||||
\ifdefstring{\ELEGANT@lang}{en}{Definition}{定义}
|
|
||||||
}{defstyle}{def}
|
|
||||||
|
|
||||||
\newtcbtheorem[auto counter,number within=chapter]{theorem}{
|
\newtcbtheorem[auto counter,number within=chapter]{theorem}{\theoremname}{thmstyle}{thm}
|
||||||
\ifdefstring{\ELEGANT@lang}{en}{Theorem}{定理}
|
|
||||||
}{thmstyle}{thm}
|
|
||||||
|
|
||||||
\newtcbtheorem[auto counter,number within=chapter]{postulate}{
|
\newtcbtheorem[auto counter,number within=chapter]{postulate}{\postulatename}{thmstyle}{pos}
|
||||||
\ifdefstring{\ELEGANT@lang}{en}{Postulate}{公设}
|
|
||||||
}{thmstyle}{pos}
|
|
||||||
|
|
||||||
\newtcbtheorem[auto counter,number within=chapter]{axiom}{
|
\newtcbtheorem[auto counter,number within=chapter]{axiom}{\axiomname}{thmstyle}{axi}
|
||||||
\ifdefstring{\ELEGANT@lang}{en}{Axiom}{公理}
|
|
||||||
}{thmstyle}{axi}
|
|
||||||
|
|
||||||
\newtcbtheorem[auto counter,number within=chapter]{proposition}{
|
\newtcbtheorem[auto counter,number within=chapter]{proposition}{\propositionname}{propstyle}{pro}
|
||||||
\ifdefstring{\ELEGANT@lang}{en}{Proposition}{命题}
|
|
||||||
}{propstyle}{pro}
|
|
||||||
|
|
||||||
\newtcbtheorem[auto counter,number within=chapter]{corollary}{
|
\newtcbtheorem[auto counter,number within=chapter]{corollary}{\corollaryname}{thmstyle}{cor}
|
||||||
\ifdefstring{\ELEGANT@lang}{en}{Corollary}{推论}
|
|
||||||
}{thmstyle}{cor}
|
|
||||||
|
|
||||||
\newtcbtheorem[auto counter,number within=chapter]{lemma}{
|
\newtcbtheorem[auto counter,number within=chapter]{lemma}{\lemmaname}{thmstyle}{lem}
|
||||||
\ifdefstring{\ELEGANT@lang}{en}{Lemma}{引理}
|
|
||||||
}{thmstyle}{lem}
|
|
||||||
|
|
||||||
}{\relax}
|
}{\relax}
|
||||||
|
|
||||||
@@ -478,50 +504,34 @@
|
|||||||
\let\openbox\relax
|
\let\openbox\relax
|
||||||
\RequirePackage{amsthm}
|
\RequirePackage{amsthm}
|
||||||
\let\proof\relax
|
\let\proof\relax
|
||||||
|
% \let\proofname\relax
|
||||||
\let\endproof\relax
|
\let\endproof\relax
|
||||||
|
|
||||||
% declare a new theorem style
|
% declare a new theorem style
|
||||||
\newtheoremstyle{edefstyle}%
|
\newtheoremstyle{edefstyle}{3pt}{3pt}{\itshape}{}{
|
||||||
{3pt}% Space above
|
\bfseries\color{main}}{}{0.5em}{
|
||||||
{3pt}% Space below
|
\thmname{#1} \thmnumber{#2} \thmnote{(#3)}}
|
||||||
{\itshape}% Body font
|
|
||||||
{}% Indent amount
|
|
||||||
{\bfseries\color{main}}% Theorem head font
|
|
||||||
{}% Punctuation after theorem head
|
|
||||||
{0.5em}% Space after theorem head
|
|
||||||
{\thmname{#1} \thmnumber{#2} \thmnote{(#3)}}% Theorem head spec (can be left empty, meaning ‘normal’)
|
|
||||||
% -------------------------------------------------%
|
% -------------------------------------------------%
|
||||||
\newtheoremstyle{ethmstyle}%
|
\newtheoremstyle{ethmstyle}{3pt}{3pt}{\itshape}{}{
|
||||||
{3pt}% Space above
|
\bfseries\color{second}}{}{.5em}{
|
||||||
{3pt}% Space below
|
\thmname{#1} \thmnumber{#2} \thmnote{(#3)}}
|
||||||
{\itshape}% Body font
|
|
||||||
{}% Indent amount
|
|
||||||
{\bfseries\color{second}}% Theorem head font
|
|
||||||
{}% Punctuation after theorem head
|
|
||||||
{.5em}% Space after theorem head
|
|
||||||
{\thmname{#1} \thmnumber{#2} \thmnote{(#3)}}% Theorem head spec (can be left empty, meaning ‘normal’)
|
|
||||||
% -------------------------------------------------%
|
% -------------------------------------------------%
|
||||||
\newtheoremstyle{eprostyle}%
|
\newtheoremstyle{eprostyle}{3pt}{3pt}{\itshape}{}{
|
||||||
{3pt}% Space above
|
\bfseries\color{third}}{}{.5em}{
|
||||||
{3pt}% Space below
|
\thmname{#1} \thmnumber{#2} \thmnote{(#3)}}
|
||||||
{\itshape}% Body font
|
|
||||||
{}% Indent amount
|
|
||||||
{\bfseries\color{third}}% Theorem head font
|
|
||||||
{}% Punctuation after theorem head
|
|
||||||
{.5em}% Space after theorem head
|
|
||||||
{\thmname{#1} \thmnumber{#2} \thmnote{(#3)}}% Theorem head spec (can be left empty, meaning ‘normal’)
|
|
||||||
|
|
||||||
\theoremstyle{edefstyle}
|
\theoremstyle{edefstyle}
|
||||||
\newtheorem{edefinition}{\ifdefstring{\ELEGANT@lang}{en}{Definition}{定义}}[chapter]
|
\newtheorem{edefinition}{\ifdefstring{\ELEGANT@lang}{en}{Definition}{定义}}[chapter]
|
||||||
|
|
||||||
\theoremstyle{ethmstyle}
|
\theoremstyle{ethmstyle}
|
||||||
\newtheorem{etheorem}{\ifdefstring{\ELEGANT@lang}{en}{Theorem}{定理}}[chapter]
|
\newtheorem{etheorem}{\theoremname }[chapter]
|
||||||
\newtheorem{elemma}{\ifdefstring{\ELEGANT@lang}{en}{Lemma}{引理}}[chapter]
|
\newtheorem{elemma}{\lemmaname }[chapter]
|
||||||
\newtheorem{ecorollary}{\ifdefstring{\ELEGANT@lang}{en}{Corollary}{推论}}[chapter]
|
\newtheorem{ecorollary}{\corollaryname }[chapter]
|
||||||
\newtheorem{epostulate}{\ifdefstring{\ELEGANT@lang}{en}{Postulate}{公设}}[chapter]
|
\newtheorem{epostulate}{\postulatename }[chapter]
|
||||||
\newtheorem{eaxiom}{\ifdefstring{\ELEGANT@lang}{en}{Axiom}{公理}}[chapter]
|
\newtheorem{eaxiom}{\axiomname }[chapter]
|
||||||
|
|
||||||
\theoremstyle{eprostyle}
|
\theoremstyle{eprostyle}
|
||||||
\newtheorem{eproposition}{\ifdefstring{\ELEGANT@lang}{en}{Proposition}{命题}}[chapter]
|
\newtheorem{eproposition}{\propositionname }[chapter]
|
||||||
|
|
||||||
\newenvironment{theorem}[2]
|
\newenvironment{theorem}[2]
|
||||||
{\ifstrempty{#1}{\etheorem}{\etheorem[#1]}\ifstrempty{#2}{}{\label{thm:#2}}}
|
{\ifstrempty{#1}{\etheorem}{\etheorem[#1]}\ifstrempty{#2}{}{\label{thm:#2}}}
|
||||||
@@ -584,43 +594,32 @@
|
|||||||
\newcounter{prob}[chapter]
|
\newcounter{prob}[chapter]
|
||||||
\setcounter{prob}{0}
|
\setcounter{prob}{0}
|
||||||
\renewcommand{\theprob}{\thechapter.\arabic{prob}}
|
\renewcommand{\theprob}{\thechapter.\arabic{prob}}
|
||||||
\newenvironment{problem}[1][]{
|
\newenvironment{problem}[1]{
|
||||||
\refstepcounter{prob}\par\noindent\textbf{\color{main}{%
|
\refstepcounter{prob}\par\noindent\textbf{\color{main}{%
|
||||||
\ifdefstring{\ELEGANT@lang}{en}{Problem}{例题}
|
\problemname }
|
||||||
}\theprob #1 \,}\rmfamily %
|
\theprob #1 \,}\rmfamily}{
|
||||||
}{
|
\par\medskip\ignorespacesafterend}
|
||||||
\par\medskip\ignorespacesafterend %
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\newenvironment{note}{\par\noindent{\makebox[0pt][r]{\scriptsize\color{red!90}\textdbend\quad}\textbf{\color{second}%
|
\newenvironment{note}{
|
||||||
\ifdefstring{\ELEGANT@lang}{en}{Note}{注意}\,
|
\par\noindent\makebox[-3pt][r]{
|
||||||
}}\itshape}{\par}
|
\scriptsize\color{red!90}\textdbend\quad}
|
||||||
|
\textbf{\color{second}\notename\,}
|
||||||
|
\itshape}{\par}
|
||||||
|
|
||||||
\newenvironment{proof}{\par\noindent\textbf{\color{second}%
|
\newenvironment{proof}{
|
||||||
\ifdefstring{\ELEGANT@lang}{en}{Proof}{证明}\;
|
\par\noindent\textbf{\color{second}\proofname\;}
|
||||||
}\color{black!90}\small}{
|
\color{black!90}\small}{
|
||||||
% \hfill$\Box$\quad
|
% \hfill$\Box$\quad
|
||||||
\par}
|
\par}
|
||||||
\newenvironment{remark}{\noindent\textbf{\color{second}%
|
|
||||||
\ifdefstring{\ELEGANT@lang}{en}{Remark}{注}\,
|
\newenvironment{solution}{\par\noindent\textbf{\color{main}\solutionname}\itshape}{\vskip2ex\par}
|
||||||
}}{\par}
|
\newenvironment{remark}{\noindent\textbf{\color{second}\remarkname}}{\par}
|
||||||
\newenvironment{assumption}{\par\noindent\textbf{\color{third}%
|
\newenvironment{assumption}{\par\noindent\textbf{\color{third}\assumptionname}}{\par}
|
||||||
\ifdefstring{\ELEGANT@lang}{en}{Assumption}{假设}\,
|
\newenvironment{conclusion}{\par\noindent\textbf{\color{third}\conclusionname}}{\par}
|
||||||
}}{\par}
|
\newenvironment{property}{\par\noindent\textbf{\color{third}\propertyname}}{\par}
|
||||||
\newenvironment{conclusion}{\par\noindent\textbf{\color{third}%
|
\newenvironment{custom}[1]{\par\noindent\textbf{\color{third} #1 }}{\par}
|
||||||
\ifdefstring{\ELEGANT@lang}{en}{Conclusion}{结论}\,
|
|
||||||
}}{\par}
|
|
||||||
\newenvironment{solution}{\par\noindent\textbf{\color{main}%
|
|
||||||
\ifdefstring{\ELEGANT@lang}{en}{Solution}{解}\;
|
|
||||||
}\itshape}{\vskip2ex\par}
|
|
||||||
\newenvironment{property}{\par\noindent\textbf{\color{third}%
|
|
||||||
\ifdefstring{\ELEGANT@lang}{en}{Property}{性质}\;
|
|
||||||
}}{\par}
|
|
||||||
\newenvironment{custom}[1]{\par\noindent\textbf{\color{third}
|
|
||||||
\ifdefstring{\ELEGANT@lang}{en}{#1}{#1}\,
|
|
||||||
}}{\par}
|
|
||||||
|
|
||||||
\RequirePackage{multicol}
|
\RequirePackage{multicol}
|
||||||
\tcbset{
|
\tcbset{
|
||||||
@@ -631,7 +630,7 @@
|
|||||||
colframe=structurecolor,
|
colframe=structurecolor,
|
||||||
fonttitle=\bfseries,
|
fonttitle=\bfseries,
|
||||||
colbacktitle=structurecolor,
|
colbacktitle=structurecolor,
|
||||||
fontupper=\sffamily,
|
fontupper=\itshape,
|
||||||
attach boxed title to top center={yshift=-3mm,yshifttext=-1mm},
|
attach boxed title to top center={yshift=-3mm,yshifttext=-1mm},
|
||||||
boxrule=0pt,
|
boxrule=0pt,
|
||||||
toprule=0.5pt,
|
toprule=0.5pt,
|
||||||
@@ -804,7 +803,7 @@
|
|||||||
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,tcolorbox,titlestyle,cite,marginnote,ctex,listings,base},
|
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,cite,marginnote,ctex,listings,base},
|
||||||
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,extrainfo,logo,cover,subtitle,appendix,chapter,hypersetup,mainmatter,tableofcontents,elegantpar,heiti,kaishu,lstset,pagecolor,zhnumber,marginpar,part,equote,marginnote},
|
morekeywords={DeclareSymbolFont,SetSymbolFont,toprule,midrule,bottomrule,institute,version,includegraphics,setmainfont,setsansfont,setmonofont ,setCJKmainfont,setCJKsansfont,setCJKmonofont,RequirePackage,figref,tabref,email,maketitle,keywords,definecolor,extrainfo,logo,cover,subtitle,appendix,chapter,hypersetup,mainmatter,frontmatter,tableofcontents,elegantpar,heiti,kaishu,lstset,pagecolor,zhnumber,marginpar,part,equote,marginnote},
|
||||||
frame=single,
|
frame=single,
|
||||||
tabsize=2,
|
tabsize=2,
|
||||||
rulecolor=\color{structurecolor},
|
rulecolor=\color{structurecolor},
|
||||||
|
|||||||
Reference in New Issue
Block a user