add introduction environment

This commit is contained in:
EthanDeng
2019-05-05 09:56:16 +08:00
parent 824977a888
commit 6018efc5d6
5 changed files with 50 additions and 1 deletions

Binary file not shown.

View File

@@ -1,4 +1,4 @@
\documentclass[cn,11pt,fancy]{elegantbook}
\documentclass[cn,11pt,fancy,hide]{elegantbook}
\title{ElegantBook优美的 \LaTeX{} 书籍模板}
@@ -279,6 +279,14 @@ The content of introduction.
\chapter{ElegantBook 写作示例}
\begin{introduction}
\item 积分定义~\ref{def:int}
\item Fubini 定理~\ref{thm:fubi}
\item 最优性原理~\ref{pro:max}
\item 柯西列性质~\ref{property:cauchy}
\item 韦达定理
\end{introduction}
\section{Lebesgue 积分}
在前面各章做了必要的准备后,本章开始介绍新的积分。在 Lebesgue 测度理论的基础上建立了 Lebesgue 积分,其被积函数和积分域更一般,可以对有界函数和无界函数统一处理。正是由于 Lebesgue 积分的这些特点,使得 Lebesgue 积分比 Riemann 积分具有在更一般条件下的极限定理和累次积分交换积分顺序的定理,这使得 Lebesgue 积分不仅在理论上更完善,而且在计算上更灵活有效。

Binary file not shown.

View File

@@ -277,6 +277,17 @@ The content of Preface.
\end{lstlisting}
\chapter{ElegantBook Writing Sample}
\begin{introduction}
\item Theorem Class Envrionments
\item Cross Reference
\item Math Environments
\item List Environments
\item Logo and Base
\item $a^2+b^2=c^2$
\end{introduction}
\lipsum[1]
% source: https://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/Theorems.html

View File

@@ -540,6 +540,36 @@
\ifdefstring{\ELEGANT@lang}{en}{#1}{#1}
}}{\par}
\RequirePackage{multicol}
\tcbset{
introduction/.style={
enhanced,
breakable,
colback=structurecolor!10,
colframe=structurecolor,
fonttitle=\bfseries,
colbacktitle=structurecolor,
fontupper=\ifdefstring{\ELEGANT@lang}{en}{\sffamily}{\kaishu},
attach boxed title to top center={yshift=-3mm,yshifttext=-1mm},
boxrule=0pt,
toprule=0.5pt,
bottomrule=0.5pt,
top=8pt,
before skip=8pt,
sharp corners
},
}
\newenvironment{introduction}[1][\ifdefstring{\ELEGANT@lang}{en}{Introduction}{}]{
\begin{tcolorbox}[introduction,title={#1}]
\begin{multicols}{2}
\begin{itemize}[label=\textcolor{structurecolor}{\scriptsize\SquareShadowBottomRight}]
}{%
\end{itemize}
\end{multicols}
\end{tcolorbox}}
\ifdefstring{\ELEGANT@result}{noanswer}{
\AtBeginDocument{
\excludecomment{solution}