theorem modification complete

This commit is contained in:
EthanDeng
2019-04-15 01:45:30 +08:00
parent 8dd28f18c7
commit 4733c40279
6 changed files with 99 additions and 71 deletions

View File

@@ -1,5 +1,5 @@
@echo off @echo off
del /q *.aux *.bbl *.blg *.log *.out *.toc *.bcf *.xml *.synctex *.nlo *.nls *.bak *.ind *.idx *.ilg *.lof *.lot *.ent-x *.tmp *.ltx *.los *.lol *.loc *.listing *.gz *.userbak *.nav *.snm *.vrb del /q *.aux *.bbl *.blg *.log *.out *.toc *.bcf *.xml *.synctex *.nlo *.nls *.bak *.ind *.idx *.ilg *.lof *.lot *.ent-x *.tmp *.ltx *.los *.lol *.loc *.listing *.gz *.userbak *.nav *.snm *.vrb *.synctex(busy)
del /q *.nav *.snm *.vrb *.fls *.xdv *.fdb_latexmk del /q *.nav *.snm *.vrb *.fls *.xdv *.fdb_latexmk

Binary file not shown.

View File

@@ -1,4 +1,4 @@
\documentclass[cn]{elegantbook} \documentclass[cn,fancy,11pt]{elegantbook}
\title{ElegantBook优美的 \LaTeX{} 书籍模板} \title{ElegantBook优美的 \LaTeX{} 书籍模板}
@@ -8,9 +8,6 @@
\institute{Elegant\LaTeX{} Program} \institute{Elegant\LaTeX{} Program}
\date{\today} \date{\today}
%\definecolor{main}{RGB}{0,127,0}
%\definecolor{second}{RGB}{204,102,0}
%\definecolor{third}{RGB}{0,127,127}
\version{3.07} \version{3.07}
\equote{Victory won\rq t come to us unless we go to it. --- M. Moore} \equote{Victory won\rq t come to us unless we go to it. --- M. Moore}
@@ -21,7 +18,7 @@
\begin{document} \begin{document}
\maketitle \maketitle
\tableofcontents \tableofcontents
\clearpage
% \thispagestyle{empty} % \thispagestyle{empty}
\mainmatter \mainmatter
@@ -61,40 +58,10 @@
\section{编译方式} \section{编译方式}
本模板基于基础的 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} 编译}
如果你使用 \lstinline{PDFLaTeX} 编译,默认的 Computer Modern 字体被换成了 \lstinline{newtx} 系列字体,默认的字体字号是 12 pt。关于字体设置的宏包主要用到了
\begin{itemize}
\item \lstinline{newtxtext} 用于文档正文字体,类似于 Times New Roman 字体。
\item \lstinline{newtxmath} 用于数学字体,搭配 \lstinline{newtxtext} 非常合适。
\item \lstinline{FiraMono} 用于打字机字体,并使用了 \lstinline{scale=0.7} 选项。
\item \lstinline{ctex} 用于中文字体设置,并使用了 \lstinline{scheme=plain} 选项。
\end{itemize}
一次完整的编译:\lstinline[breaklines]{PDFLaTeX -> BibTeX -> PDFLaTeX*2}
\subsection[选择 XeLaTeX 编译]{选择 \lstinline{XeLaTeX} 编译}
如果你选择 \lstinline{XeLaTeX} 编译的话,那么设置字体的宏包为 \lstinline{fontspec}\lstinline{xeCJK}。由于模板中使用的字体是 Windows 中的字体,所以如果你使用其他操作系统,比如 Linux 或者 Mac OS那么你需要把所用字体替换为你系统中的字体。设置字体的命令
\begin{lstlisting}[frame=single]
\RequirePackage{fontenc}
\RequirePackage[no-math]{fontspec}
\setmainfont{Times New Roman}[NFSSFamily=ntxtlf]
\setsansfont{Arial}
%\setmonofont[Scale=0.7]{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.7]{Microsoft YaHei}
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt
\RequirePackage{newtxmath}
\end{lstlisting}
一次完整的编译:\lstinline[breaklines]{XeLaTeX -> BibTeX -> XeLaTeX*2}
\section{语言模式} \section{语言模式}
本模板内含两套语言环境,改变语言环境会改变图表标题的引导词(图,表),文章结构词(比如目录,参考文献等),以及定理环境中的引导词(比如定理,引理等)。不同语言模式的启用如下: 本模板内含两套语言环境,改变语言环境会改变图表标题的引导词(图,表),文章结构词(比如目录,参考文献等),以及定理环境中的引导词(比如定理,引理等)。不同语言模式的启用如下:
\begin{lstlisting}[frame=single] \begin{lstlisting}[frame=single]
\documentclass[cn]{elegantbook} \documentclass[cn]{elegantbook}
\documentclass[lang=cn]{elegantbook} \documentclass[lang=cn]{elegantbook}
@@ -109,14 +76,12 @@
\section{颜色主题} \section{颜色主题}
本模板内置 4 组颜色主题,分别为 \textcolor{main1}{\lstinline{green}}(默认)、\textcolor{main2}{\lstinline{cyan}}\textcolor{main3}{\lstinline{blue}}\textcolor{gray}{\lstinline{plain}},另外还有一个自定义的选项 \lstinline{nocolor}。调用颜色主题 \lstinline{green} 的方法为 本模板内置 4 组颜色主题,分别为 \textcolor{main1}{\lstinline{green}}(默认)、\textcolor{main2}{\lstinline{cyan}}\textcolor{main3}{\lstinline{blue}}\textcolor{gray}{\lstinline{plain}},另外还有一个自定义的选项 \lstinline{nocolor}。调用颜色主题 \lstinline{green} 的方法为
\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},然后在导言区定义 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}
\definecolor{second}{RGB}{115,45,2} \definecolor{second}{RGB}{115,45,2}
@@ -142,7 +107,6 @@ third &\makecell{ {\color{third1}\rule{1cm}{1cm}}}& \makecell{{\color{third2}\ru
\section{章标题显示风格} \section{章标题显示风格}
本模板内置 2 套\textit{章标题显示风格},包含 \lstinline{hang}(默认)与 \lstinline{display} 两种风格,区别在于章标题单行显示(\lstinline{hang})与双行显示(\lstinline{display}),本说明使用了 \lstinline{hang}。调用方式为 本模板内置 2 套\textit{章标题显示风格},包含 \lstinline{hang}(默认)与 \lstinline{display} 两种风格,区别在于章标题单行显示(\lstinline{hang})与双行显示(\lstinline{display}),本说明使用了 \lstinline{hang}。调用方式为
\begin{lstlisting}[frame=single] \begin{lstlisting}[frame=single]
\documentclass[hang]{elegantbook} %or \documentclass[hang]{elegantbook} %or
\documentclass[titlestyle=hang]{elegantbook} \documentclass[titlestyle=hang]{elegantbook}
@@ -166,7 +130,6 @@ third &\makecell{ {\color{third1}\rule{1cm}{1cm}}}& \makecell{{\color{third2}\ru
\subsection{定理类环境的使用} \subsection{定理类环境的使用}
由于本模板使用了 \lstinline{tcolorbox} 宏包来定制定理类环境,所以和普通的定理环境的使用有些许区别,定理的使用方法如下: 由于本模板使用了 \lstinline{tcolorbox} 宏包来定制定理类环境,所以和普通的定理环境的使用有些许区别,定理的使用方法如下:
\begin{lstlisting}[frame=single] \begin{lstlisting}[frame=single]
\begin{theorem}{<theorem name>}{<label>} \begin{theorem}{<theorem name>}{<label>}
The content of theorem. The content of theorem.
@@ -201,7 +164,6 @@ The content of theorem.
\subsection{其他数学环境的使用} \subsection{其他数学环境的使用}
其他三种数学环境因为没有选项,可以直接使用,比如 \lstinline{example} 环境的使用: 其他三种数学环境因为没有选项,可以直接使用,比如 \lstinline{example} 环境的使用:
\begin{lstlisting}[frame=single] \begin{lstlisting}[frame=single]
\begin{example} \begin{example}
This is the content of example environment. This is the content of example environment.
@@ -267,7 +229,6 @@ This is the content of example environment.
此模板使用了 \BibTeX{} 来生成参考文献默认使用的文献样式bib style\lstinline{aer}。参考文献示例:~\cite{Chen2018} 使用了中国一个大型的 P2P 平台(人人贷)的数据来检验男性投资者和女性投资者在投资表现上是否有显著差异。 此模板使用了 \BibTeX{} 来生成参考文献默认使用的文献样式bib style\lstinline{aer}。参考文献示例:~\cite{Chen2018} 使用了中国一个大型的 P2P 平台(人人贷)的数据来检验男性投资者和女性投资者在投资表现上是否有显著差异。
你可以在谷歌学术MendeleyEndnote 中获得文献条目bib item然后把它们添加到 \lstinline{reference.bib} 中。在文中引用的时候引用它们的键值bib key即可。注意需要在编译的过程中添加 \BibTeX{} 编译。如果你想在参考文献中添加未引用的文献,可以使用 你可以在谷歌学术MendeleyEndnote 中获得文献条目bib item然后把它们添加到 \lstinline{reference.bib} 中。在文中引用的时候引用它们的键值bib key即可。注意需要在编译的过程中添加 \BibTeX{} 编译。如果你想在参考文献中添加未引用的文献,可以使用
\begin{lstlisting}[frame=single] \begin{lstlisting}[frame=single]
\nocite{EINAV2010,Havrylchyk2018} \nocite{EINAV2010,Havrylchyk2018}
\end{lstlisting} \end{lstlisting}
@@ -275,12 +236,11 @@ This is the content of example environment.
\section{添加序章} \section{添加序章}
如果你想在第一章前面添加序章,不改变原本章节序号,你可以在第一章内容前面使用 如果你想在第一章前面添加序章,不改变原本章节序号,你可以在第一章内容前面使用
\begin{lstlisting}[frame=single] \begin{lstlisting}[frame=single]
\chapter*{序章} \chapter*{Introduction}
\addcontentsline{toc}{chapter}{序章} \addcontentsline{toc}{chapter}{Introduction}
\markboth{序章}{} \markboth{Introduction}{}
序章的内容。 The content of introduction.
\end{lstlisting} \end{lstlisting}
\chapter{ElegantBook 写作示例} \chapter{ElegantBook 写作示例}
@@ -313,6 +273,7 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
$D(x)$$[0,1]$ 上是 Lebesgue 可积的并且积分值为零。但 $D(x)$$[0,1]$ 上不是 Riemann 可积的。 $D(x)$$[0,1]$ 上是 Lebesgue 可积的并且积分值为零。但 $D(x)$$[0,1]$ 上不是 Riemann 可积的。
有界变差函数是与单调函数有密切联系的一类函数。有界变差函数可以表示为两个单调递增函数之差。与单调函数一样,有界变差函数几乎处处可导。与单调函数不同,有界变差函数类对线性运算是封闭的,它们构成一线空间。练习题 \ref{exer:43} 是一个性质的证明。 有界变差函数是与单调函数有密切联系的一类函数。有界变差函数可以表示为两个单调递增函数之差。与单调函数一样,有界变差函数几乎处处可导。与单调函数不同,有界变差函数类对线性运算是封闭的,它们构成一线空间。练习题 \ref{exer:43} 是一个性质的证明。
\begin{exercise}\label{exer:43} \begin{exercise}\label{exer:43}
@@ -324,6 +285,14 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
$\mathcal{R}^1$ 上的连续函数。 $\mathcal{R}^1$ 上的连续函数。
\end{exercise} \end{exercise}
\begin{problem}
$D(x)$$[0,1]$ 上是 Lebesgue 可积的并且积分值为零。但 $D(x)$$[0,1]$ 上不是 Riemann 可积的。
\end{problem}
\begin{solution}
$D(x)$$[0,1]$ 上是 Lebesgue 可积的并且积分值为零。但 $D(x)$$[0,1]$ 上不是 Riemann 可积的。
\end{solution}
\begin{theorem}{Fubini 定理}{fubi} \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$ 上的非负可测函数。并且 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} \begin{equation}

Binary file not shown.

View File

@@ -1,4 +1,4 @@
\documentclass[noanswer]{elegantbook} \documentclass[noanswer,fancy,hide]{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}
@@ -310,6 +310,10 @@ Note that a subgroup~$H$ of a group $G$ is itself a left coset of $H$ in $G$.
\begin{theorem}{Lagrange's Theorem}{} \begin{theorem}{Lagrange's Theorem}{}
Let $G$ be a finite group, and let $H$ be a subgroup of $G$. Then the order of $H$ divides the order of $G$. Let $G$ be a finite group, and let $H$ be a subgroup of $G$. Then the order of $H$ divides the order of $G$.
\begin{enumerate}
\item fwfew
\item fwefw
\end{enumerate}
\end{theorem} \end{theorem}
\lipsum[3] \lipsum[3]

View File

@@ -17,21 +17,32 @@
\newcommand{\ekv}[1]{\kvsetkeys{ELEGANT}{#1}} \newcommand{\ekv}[1]{\kvsetkeys{ELEGANT}{#1}}
% ----- Colors ----- % ----- Colors -----
\DeclareStringOption[green]{color} \DeclareStringOption[blue]{color}
\DeclareStringOption[en]{lang} \DeclareStringOption[en]{lang}
\DeclareStringOption[answer]{result} \DeclareStringOption[answer]{result}
\DeclareStringOption[fancy]{mode}
\DeclareStringOption[show]{base}
% ----- backward compatibility % ----- backward compatibility
\DeclareVoidOption{green}{\ekv{color = green}} \DeclareVoidOption{green}{\ekv{color = green}}
\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{gray}{\ekv{color = gray}}
\DeclareVoidOption{black}{\ekv{color = black}}
\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}}
\DeclareVoidOption{fancy}{\ekv{mode=fancy}}
\DeclareVoidOption{simple}{\ekv{mode=simple}}
\DeclareVoidOption{answer}{\ekv{result = answer}} \DeclareVoidOption{answer}{\ekv{result = answer}}
\DeclareVoidOption{noanswer}{\ekv{result = noanswer}} \DeclareVoidOption{noanswer}{\ekv{result = noanswer}}
\DeclareVoidOption{hide}{\ekv{base = hide}}
\DeclareVoidOption{show}{\ekv{base = show}}
% ----- Math option ----- % ----- Math option -----
\newcommand\mailto[1]{\href{mailto:#1}{\nolinkurl{#1}}} \newcommand\mailto[1]{\href{mailto:#1}{\nolinkurl{#1}}}
@@ -45,7 +56,7 @@
\ProcessKeyvalOptions*\relax \ProcessKeyvalOptions*\relax
% \ProcessOptions*\relax % \ProcessOptions*\relax
\LoadClass[12pt,a4paper,oneside,openany]{book} \LoadClass[a4paper,oneside,openany]{book}
\RequirePackage{indentfirst,comment} \RequirePackage{indentfirst,comment}
\setlength\parindent{2em} \setlength\parindent{2em}
@@ -117,11 +128,16 @@
\definecolor{second}{RGB}{180,50,131}% \definecolor{second}{RGB}{180,50,131}%
\definecolor{third}{RGB}{7,127,128}% \definecolor{third}{RGB}{7,127,128}%
}{\relax} }{\relax}
\ifdefstring{\ELEGANT@color}{plain}{ \ifdefstring{\ELEGANT@color}{gray}{
\definecolor{main}{RGB}{50,50,50}% \definecolor{main}{RGB}{50,50,50}%
\definecolor{second}{RGB}{50,50,50}% \definecolor{second}{RGB}{50,50,50}%
\definecolor{third}{RGB}{50,50,50}% \definecolor{third}{RGB}{50,50,50}%
}{\relax} }{\relax}
\ifdefstring{\ELEGANT@color}{black}{
\definecolor{main}{RGB}{0,0,0}%
\definecolor{second}{RGB}{0,0,0}%
\definecolor{third}{RGB}{0,0,0}%
}{\relax}
%green color %green color
\definecolor{main1}{RGB}{0,120,2} \definecolor{main1}{RGB}{0,120,2}
@@ -183,7 +199,7 @@
\linespread{1.3} \linespread{1.3}
\RequirePackage{graphicx} \RequirePackage{graphicx}
%\RequirePackage{enumerate} %\RequirePackage{enumerate}
\RequirePackage{amsmath,mathrsfs,amsfonts} \RequirePackage{amsmath,mathrsfs,amsfonts,amssymb}
\RequirePackage{booktabs} \RequirePackage{booktabs}
\RequirePackage{multicol} \RequirePackage{multicol}
\RequirePackage{xcolor} \RequirePackage{xcolor}
@@ -274,7 +290,7 @@
\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}[\ifdefstring{\ELEGANT@base}{hide}{}{\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}
@@ -297,11 +313,12 @@
\RequirePackage[shortlabels]{enumitem} \RequirePackage[shortlabels]{enumitem}
\setlist{nolistsep} \setlist{nolistsep}
\RequirePackage[many]{tcolorbox}
\RequirePackage[many]{tcolorbox}
\ifdefstring{\ELEGANT@mode}{fancy}{
\tcbset{ \tcbset{
common/.style={ common/.style={
fontupper=\itshape, fontupper=\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\upshape\kaishu},
lower separated=false, lower separated=false,
coltitle=white, coltitle=white,
colback=gray!10, colback=gray!10,
@@ -357,6 +374,51 @@
\ifdefstring{\ELEGANT@lang}{en}{Lemma}{} \ifdefstring{\ELEGANT@lang}{en}{Lemma}{}
}{thmstyle}{lem} }{thmstyle}{lem}
}{\relax}
\ifdefstring{\ELEGANT@mode}{simple}{
\let\openbox\relax
\RequirePackage{amsthm}
\let\proof\relax
\let\endproof\relax
% declare a new theorem style
\newtheoremstyle{ethmstyle}%
{3pt}% Space above
{3pt}% Space below
{\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\upshape\kaishu}}% Body font
{}% Indent amount
{\bfseries\color{main}}% 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{ethmstyle}
\newtheorem{etheorem}{\ifdefstring{\ELEGANT@lang}{en}{Theorem}{}}[chapter]
\newtheorem{edefinition}{\ifdefstring{\ELEGANT@lang}{en}{Definition}{}}[chapter]
\newtheorem{elemma}{\ifdefstring{\ELEGANT@lang}{en}{Lemma}{}}[chapter]
\newtheorem{ecorollary}{\ifdefstring{\ELEGANT@lang}{en}{Corollary}{}}[chapter]
\newtheorem{eproposition}{\ifdefstring{\ELEGANT@lang}{en}{Proposition}{}}[chapter]
\newenvironment{theorem}[2]
{\ifstrempty{#1}{\etheorem}{\etheorem[#1]}\ifstrempty{#2}{}{\label{thm:#2}}}
{\endetheorem}
\newenvironment{definition}[2]
{\ifstrempty{#1}{\edefinition}{\edefinition[#1]}\ifstrempty{#2}{}{\label{def:#2}}}
{\endedefinition}
\newenvironment{lemma}[2]
{\ifstrempty{#1}{\elemma}{\elemma[#1]}\ifstrempty{#2}{}{\label{lem:#2}}}
{\endelemma}
\newenvironment{corollary}[2]
{\ifstrempty{#1}{\ecorollary}{\ecorollary[#1]}\ifstrempty{#2}{}{\label{cor:#2}}}
{\endecorollary}
\newenvironment{proposition}[2]
{\ifstrempty{#1}{\eproposition}{\eproposition[#1]}\ifstrempty{#2}{}{\label{pro:#2}}}
{\endeproposition}
}{\relax}
%% Example with counter %% Example with counter
\newcounter{exam}[chapter] \newcounter{exam}[chapter]
@@ -423,12 +485,7 @@
\newenvironment{custom}[1]{\par\noindent\textbf{\color{main} \newenvironment{custom}[1]{\par\noindent\textbf{\color{main}
\ifdefstring{\ELEGANT@lang}{en}{#1:}{#1} \ifdefstring{\ELEGANT@lang}{en}{#1:}{#1}
}}{\par} }}{\par}
% \ifdefstring{\ELEGANT@result}{answer}{
% \AtBeginDocument{
% \includecomment{solution}
% \includecomment{proof}
% }
% }{\relax}
\ifdefstring{\ELEGANT@result}{noanswer}{ \ifdefstring{\ELEGANT@result}{noanswer}{
\AtBeginDocument{ \AtBeginDocument{
\excludecomment{solution} \excludecomment{solution}
@@ -513,34 +570,32 @@
\RequirePackage{listings} \RequirePackage{listings}
\renewcommand{\ttdefault}{cmtt} \renewcommand{\ttdefault}{cmtt}
\lstdefinestyle{mystyle}{ \lstdefinestyle{mystyle}{
basicstyle=% basicstyle=%
\ttfamily \ttfamily
\lst@ifdisplaystyle\footnotesize\fi \lst@ifdisplaystyle\small\fi
} }
\lstset{basicstyle=\scriptsize\ttfamily,style=mystyle} \lstset{basicstyle=\ttfamily,style=mystyle}
\definecolor{lightgrey}{rgb}{0.9,0.9,0.9} \definecolor{lightgrey}{rgb}{0.9,0.9,0.9}
\definecolor{frenchplum}{RGB}{190,20,83} \definecolor{frenchplum}{RGB}{190,20,83}
\lstset{language=[LaTeX]TeX, \lstset{language=[LaTeX]TeX,
texcsstyle=*\bfseries\color{winered}\ttfamily, texcsstyle=*\color{winered},
basicstyle=\ttfamily,
numbers=none, numbers=none,
breaklines=true, breaklines=true,
keywordstyle=\bfseries\color{winered}\ttfamily, keywordstyle=\color{winered},
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}, 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,equote,logo,cover,subtitle,appendix,chapter,hypersetup,mainmatter,tableofcontents}, 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}, % backgroundcolor=\color{lightgrey}
} }
\bibliographystyle{aer}