\documentclass[noanswer,fancy,blue,11pt]{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.07} \equote{Victory won\rq t come to us unless we go to it. --- M. Moore} \logo{logo.png} \cover{cover.jpg} \begin{document} \maketitle \tableofcontents \clearpage \thispagestyle{empty} \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}. This guide describes some settings of this template and how to use it. If you have any other questions, suggestions or comments, please feel free to contact us, our email is \email{elegantlatex2e@gmail.com}. \section{ElegantBook Updates} Over these years, we've received a lot of feedbacks 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; \item Add English and Chinese modes; \item \lstinline{PDFLaTeX} and \lstinline{XeLaTeX} support; \item Use the \lstinline{tcolorbox} package to re-written the theorem class environments; \item Theorem class environments name updated, and cross-references fixed; \item renew color themes and add gray and black theme; \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 code highlighting; \item Beautify the list environments; \item Add simple theorem mode; \item Add base hide option. \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. \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 captions of figure/table, abstract name, refname etc. Chinese. You can use this option as \begin{lstlisting} \documentclass[en]{elegantbook} \documentclass[lang=en]{elegantbook} \end{lstlisting} \begin{remark} You can input Chinese Characters 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 5 color themes,they are \textcolor{main1}{\lstinline{green}}\footnote{original default theme.}、\textcolor{main2}{\lstinline{cyan}}、\textcolor{main3}{\lstinline{blue}}(default)、\textcolor{main4}{\lstinline{gray}}、\textcolor{main5}{\lstinline{black}}. You can choose \lstinline{green} with \begin{lstlisting} \documentclass[green]{elegantbook} %or \documentclass[color=green]{elegantbook} \end{lstlisting} \begin{table}[htbp] \caption{ElegantBook Themes\label{tab:color thm}\label{tab:color thm}} \centering \begin{tabular}{ccccccc} \toprule & \textcolor{main1}{green} & \textcolor{main2}{cyan} & \textcolor{main3}{blue} & \textcolor{main4}{gray} & \textcolor{main5}{black} & Main Environments\\ \midrule structure & \makecell{{\color{structure1}\rule{1cm}{1cm}}} & \makecell{{\color{structure2}\rule{1cm}{1cm}}} & \makecell{{\color{structure3}\rule{1cm}{1cm}}} & \makecell{{\color{structure4}\rule{1cm}{1cm}}} & \makecell{{\color{structure5}\rule{1cm}{1cm}}} & chapter \ section \ subsection \\ main & \makecell{{\color{main1}\rule{1cm}{1cm}}} & \makecell{{\color{main2}\rule{1cm}{1cm}}} & \makecell{{\color{main3}\rule{1cm}{1cm}}} & \makecell{{\color{main4}\rule{1cm}{1cm}}} & \makecell{{\color{main5}\rule{1cm}{1cm}}} & definition \ exercise \ problem \ solution \\ second & \makecell{{\color{second1}\rule{1cm}{1cm}}} & \makecell{{\color{second2}\rule{1cm}{1cm}}} & \makecell{{\color{second3}\rule{1cm}{1cm}}} & \makecell{{\color{second4}\rule{1cm}{1cm}}} & \makecell{{\color{second5}\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}}} & \makecell{{\color{third4}\rule{1cm}{1cm}}} & \makecell{{\color{third5}\rule{1cm}{1cm}}} & proposition\\ \bottomrule \end{tabular} \end{table} If you want to customize the colors, please select \lstinline{nocolor} or use \lstinline{color=none} , then define the main, second, and third colors in the preamble section as follows: \begin{lstlisting}[frame=single] \definecolor{structurecolor}{RGB}{60,113,183} \definecolor{main}{RGB}{0,166,82}% \definecolor{second}{RGB}{255,134,24}% \definecolor{third}{RGB}{0,174,247}% \end{lstlisting} \section{Chapter Title Display Styles} This template contains 2 sets of \textit{title display styles},which including \lstinline{hang}(default) and \lstinline{display} style, The difference is that the chapter heading is displayed on a single line (\lstinline{hang}) and on a double line (\lstinline{display}) , and this guide uses \lstinline{hang} . To change display style \begin{lstlisting} \documentclass[hang]{elegantbook} %or \documentclass[titlestyle=hang]{elegantbook} \end{lstlisting} \section{Theorem Class Environments} We defined two sets of theorem modes, \lstinline{simple} style and \lstinline{fancy} style (default), you can change to \lstinline{simple} mode by \begin{lstlisting} \documentclass[simple]{elegantbook} %or \documentclass[mode=simple]{elegantbook} \end{lstlisting} In this template, we defined four categories of theorem class environments \begin{itemize} \item \textit{Theorem Environment}, including title and contents, numbering within chapter. There are three types depending on the format \begin{itemize} \item \textcolor{main}{\textbf{definition}} environment, the color is \textcolor{main}{main}; \item \textcolor{second}{\textbf{theorem, lemma, corollary}} environment, the color is \textcolor{second} {second}; \item \textcolor{third}{\textbf{proposition}} environment, the color is \textcolor{third}{third}. \end{itemize} \item \textit{Example Environments}, including \textbf{example, exercise, problem} environment, auto numering within chapter. \item \textit{Proof Environment}, including \textbf{proof, note} environment, they contain introductory symbol (\textbf{note} environment) or ending symbol (\textbf{proof} environment). \item \textit{Conclusion Environments}, including \textbf{conclusion, assumption, property, remark, solution}\footnote{We also define and key \lstinline{result}, which can hide the \lstinline{solution} and \lstinline{proof} environments. You can switch by \lstinline{result=answer} or \lstinline{result=noanswer}} environment, all of these begin with boldfaced words, and the contents are the same as a normal paragraph. \end{itemize} \subsection{Theorem Class Environments} The template uses the \lstinline{tcolorbox} package to customize the theorem class environments, it is slightly different from the normal theorem environments. The usage is as follows: \begin{lstlisting} \begin{theorem}{}{