diff --git a/elegantbook-en.pdf b/elegantbook-en.pdf new file mode 100644 index 0000000..3b9758a Binary files /dev/null and b/elegantbook-en.pdf differ diff --git a/elegantbook-en.tex b/elegantbook-en.tex new file mode 100644 index 0000000..00c3eff --- /dev/null +++ b/elegantbook-en.tex @@ -0,0 +1,362 @@ +\documentclass[green,en]{elegantbook} + +\title{An Elegant \LaTeX{} Template for Books} +\subtitle{Classic Elegant\LaTeX{} Template} + +\author{Ethan Deng \& Liam Huang} +\institute{Elegant\LaTeX{} Program} +\date{\today} + +\version{3.06} +\equote{Victory won\rq t come to us unless we go to it. --- M. Moore} +\logo{logo.png} +\cover{cover.jpg} + + +\begin{document} +\maketitle +%\pagenumbering{arabic} +\tableofcontents +\mainmatter +\hypersetup{pageanchor=true} + +\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. + +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. + + +\section{ElegantBook 更新说明} +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} + \item Remove custom font settings and use the \lstinline{ctex} package or system font instead; + \item Add English and Chinese modes(\lstinline{lang=cn/en}); + \item \lstinline{PDFLaTeX} 与 \lstinline{XeLaTeX} Support; + \item Use the \lstinline{tcolorbox} package to re-written the theorem class environments, which can span over pages; + \item Theorem class environments name updated, and cross-references fixed; + \item Color name updated, link color unified; + \item New Elegant\LaTeX{} Logo; + \item New cover and decorations, remove the watermark; + \item Fix appendix; + \item Add gray theme: \lstinline{color=plain}; + \item Add code highlighting; + \item Beautify the list environment. +\end{enumerate} + + +\chapter{ElegantBook Settings} + +\section{Compilation Methods} +This template is based on the Standard LaTeX book class, so the options of book class also work. The default encoding is UTF-8, and \TeX{} Live is recommended. The test environment is Win10 + \TeX{} Live 2018. +\subsection[Compile with PDFLaTeX]{Compile with \lstinline{PDFLaTeX}} + +If you choose \lstinline{PDFLaTeX} to process your book, the default article font computer modern has changed to \lstinline{newtx} series, and the default font size is set to \lstinline{11pt}. The fonts are settings with: + +\begin{itemize} + \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{FiraMono} package for typewriter fonts, with option \lstinline{scale=0.8}. + \item \lstinline{ctex} package for Chinese fonts, with option \lstinline{scheme=plain}. +\end{itemize} + +A full compilation chain:\lstinline[breaklines]{PDFLaTeX -> BibTeX -> PDFLaTeX*2}。 + + +\subsection[Compile with XeLaTeX]{Compile with \lstinline{XeLaTeX}} +If you choose \lstinline{XeLaTeX} to process your book, we use \lstinline{fontspec} package and \lstinline{xeCJK} package. we used fonts available in Windows, if you are using Linux or Mac OS, please substitute these fonts with that of your system. + +\begin{lstlisting}[frame=single] +\RequirePackage{fontenc} +\RequirePackage[no-math]{fontspec} +\setmainfont{Times New Roman}[NFSSFamily=ntxtlf] +\setsansfont{Arial} +%\setmonofont[Scale=0.9]{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.9]{Microsoft YaHei} +\XeTeXlinebreaklocale "zh" +\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt +\RequirePackage{newtxmath} +\end{lstlisting} + +A full compilation chain:\lstinline[breaklines]{XeLaTeX -> BibTeX -> XeLaTeX*2}。 + + +\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 + +\begin{lstlisting}[frame=none] +\documentclass[cn]{elegantbook} +\documentclass[lang=cn]{elegantbook} +\documentclass[en]{elegantbook} +\documentclass[lang=en]{elegantbook} +\end{lstlisting} + +\begin{remark} +You can input Chinese Character in either \lstinline{lang=en} or \lstinline{lang=cn}. If you are using (\lstinline{lstlisting}) environment, and it contains Chinese characters, please use \lstinline{XeLaTeX}. +\end{remark} + + +\section{Color Themes} +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} as + +\begin{lstlisting}[frame=single] +\documentclass[green]{elegantbook} %or +\documentclass[color=green]{elegantbook} +\end{lstlisting} + +其中 \textcolor{gray}{plain} 主题为全灰色。如果需要自定义颜色的话请选择 \lstinline{nocolor} 选项或者使用 \lstinline{color=none},然后在导言区定义 main、second、third 颜色,具体的方法如下: + +\begin{lstlisting}[frame=single] +\definecolor{main}{RGB}{70,70,70} +\definecolor{second}{RGB}{115,45,2} +\definecolor{third}{RGB}{0,80,80} +\end{lstlisting} + +\begin{table}[htp] +\caption{ElegantBook 模板中的三套颜色主题\label{tab:color thm}} +\centering +\begin{tabular}{ccccc} +\toprule + & \textcolor{main1}{green} & \textcolor{main2}{cyan} & \textcolor{main3}{blue} & 主要使用的环境\\ +\midrule +main & \makecell{{\color{main1}\rule{1cm}{1cm}}}& \makecell{{\color{main2}\rule{1cm}{1cm}}}&\makecell{ {\color{main3}\rule{1cm}{1cm}}}& definition \\ + +second &\makecell{ {\color{second1}\rule{1cm}{1cm}}}& \makecell{{\color{second2}\rule{1cm}{1cm}}}&\makecell{ {\color{second3}\rule{1cm}{1cm}}}&theorem \ lemma \ corollary\\ + +third &\makecell{ {\color{third1}\rule{1cm}{1cm}}}& \makecell{{\color{third2}\rule{1cm}{1cm}}}&\makecell{ {\color{third3}\rule{1cm}{1cm}}}&proposition\\ +\bottomrule +\end{tabular} +\end{table} + +\section{章标题显示风格} + +本模板内置 2 套\textit{章标题显示风格},包含 \lstinline{hang}(默认)与 \lstinline{display} 两种风格,区别在于章标题单行显示(\lstinline{hang})与双行显示(\lstinline{display}),本说明使用了 \lstinline{hang}。调用方式为 + +\begin{lstlisting}[frame=single] +\documentclass[hang]{elegantbook} %or +\documentclass[titlestyle=hang]{elegantbook} +\end{lstlisting} + +\section{数学环境简介} + +在我们这个模板中,定义了四大类环境 + +\begin{itemize} +\item \textit{定理类环境},包含标题和内容两部分,全部定理类环境的编号均以章节编号。根据格式的不同分为 3 种 + \begin{itemize} + \item \textcolor{main}{\textbf{definition}} 环境,颜色为 \textcolor{main}{main}; + \item \textcolor{second}{\textbf{theorem、lemma、corollary}} 环境,颜色为主颜色 \textcolor{second} {second}; + \item \textcolor{third}{\textbf{proposition}} 环境,颜色为 \textcolor{third}{third}。 + \end{itemize} +\item \textit{示例类环境},有 \textbf{example、exercise、problem} 环境(对应于例,练习,例题),自动编号,编号以章节为单位。 +\item \textit{证明类环境},有 \textbf{proof、note} 环境,特点是,有引导符或者结尾符,\textbf{note} 环境有引导符号,\textbf{proof} 环境有证明完毕符号。 +\item \textit{结论类环境},有 \textbf{conclusion、assumption、property,remark、solution} 环境,三者均以粗体的引导词为开头,和普通段落格式一致。 +\end{itemize} + +\subsection{定理类环境的使用} +由于本模板使用了 \lstinline{tcolorbox} 宏包来定制定理类环境,所以和普通的定理环境的使用有些许区别,定理的使用方法如下: + +\begin{lstlisting}[frame=single] +\begin{theorem}{}{