\documentclass[fancy,11pt,twocol]{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.09} \extrainfo{Victory won\rq t come to us unless we go to it. } \logo{logo.png} \cover{cover.jpg} \begin{document} \maketitle \tableofcontents \clearpage \thispagestyle{empty} \mainmatter \hypersetup{pageanchor=true} \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}. Contact Infos: \begin{itemize} \item Homepage: \href{https://elegantlatex.org/}{https://elegantlatex.org/} \item Github: \href{https://github.com/ElegantLaTeX/}{https://github.com/ElegantLaTeX/} \item CTAN: \href{https://ctan.org/pkg/elegantbook}{https://ctan.org/pkg/elegantbook} \item Wiki: \href{https://github.com/ElegantLaTeX/ElegantBook/wiki}{https://github.com/ElegantLaTeX/ElegantBook/wiki} \item Download: \href{https://github.com/ElegantLaTeX/ElegantBook/releases}{release}, \href{https://github.com/ElegantLaTeX/ElegantBook/archive/master.zip}{latest version} \item Weibo: ElegantLaTeX \item Wechat: ElegantLaTeX \item QQ: 692108391 \item Email: \email{elegantlatex2e@gmail.com} \end{itemize} \section{ElegantBook Updates} What\rq s new in this version: \begin{enumerate} \item Remove \lstinline|\elegantpar|; \item Fix math symbol font settings; \item Introduce option \lstinline|twocol| for toc; \item Revise footnote layout; \item Other modifications. \end{enumerate} \begin{note} Users for 2.x, please refer to \href{https://github.com/ElegantLaTeX/ElegantBook/wiki/convert}{conversion}. \end{note} \section{Installation and Update} Both portable version and installation package are available for this template. For portable version, simply download lastest ElegantBook-master from Github or CTAN (to be more accurate, download \lstinline{elegantbook.cls}) and save the file(s) under your working directory. This way of installation is simple and convenient, but you have to manually update \lstinline{cls} now and then. If you are a \TeX{} Live 2019 user, using the \lstinline{tlshell}\footnote{namely, \TeX{} Live Manager} of \TeX{} Live 2019 direct installation package is strongly recommended. Simply search and open \lstinline{tlshell}, click on \lstinline{File -> Load Default Repository} or customize repository by \lstinline{Options}. Wait till the repository loads successfully, search \lstinline{elegantbook} by name, installation and update is just a click away. \begin{figure}[htbp] \centering \includegraphics[width=0.7\textwidth]{tlshell.png} \caption{Use \TeX{} Live Shell to Install ElegantBook Template} \end{figure} If you are a \TeX{} Live 2018 user and would like to update to \TeX{} Live 2019, the official solution is to uninstall 2018. If you want to save the bother of uninstallation and installation, please copy \lstinline{elegantbook.cls} to the installation directory of \TeX{} Live 2018 (default: \lstinline|C:\texlive\2018\texmf-dist\tex\latex\elegantbook| ), run \lstinline{texhash} in cmd. Excuse me? You are a C\TeX{} user? Sorry, this template is incompatible with C\TeX{}. For more details about the installation and usage of \TeX{} Live 2019, the compatibility of C\TeX{} and \TeX{} Live, please refer to OG (Official Guide) and/or \href{https://github.com/OsbertWang/install_latex/releases}{Install LaTeX v5.1} by OsbertWang. \section{Online Usage of Templates} Considering the online usage of the templates, all the templates are available on Overleaf. Those who enjoy smooth network may feel free to use the templates without \TeX{} Live and to visit your documents anywhere anytime. Search \lstinline{elegantlatex} on Overleaf or visit \href{https://www.overleaf.com/latex/templates?addsearch=elegantlatex}{search result}, choose the one you prefer and save it to your account, then you can edit yourself or corporate with others if you like. For more infomation about Overleaf, please refer to Overleaf OG. \section{User\rq s Selected Works Plan} Eight years have passed since the found of Elegant\LaTeX{} Program. It\rq s an honor that our templates are preferred by a lot of users. Hence, in order to promote more interactions among our users and know more about what you need, we are planning to provide a platform to display selected works of our users on Github or our homepage. If you want to show us your work(s), contact us via Email or other ways. Or if you have upload your work(s) on Github or Gitee etc., share the URL(s) with us. \centerline{\textcolor{red}{\bfseries Wanted!}} \section{About Pull Request} For some reasons, pull request is unacceptable since May 20, 2019. For those who want to help revise the templates, submit issues or clone to your own repository to modify under the constriction of LPPL-1.3c. \section{Recruit Support Members} Recruit Support Members for Elegant\LaTeX{} to translate template OGs(Chinese -> English), maintain wiki entries using Markdown, update Wechat articles. No deadline for this recruitment. So far, Elegant\LaTeX{} has four Support Members: \begin{itemize} \item OG Translator: \href{https://github.com/peggy2006xzyz}{YPY}; \item Wiki Maintainer: \href{https://github.com/izinngo}{Ingo Zinngo}, \href{https://github.com/xiaohao890809}{Xiaohao890809}; \item QQ Group Manager: \href{https://github.com/sikouhjw}{Sikouhjw}. \end{itemize} \section{Acknowledgement} The number of stars on Github for ElegantBook reached 100 on May 20, 2019\footnote{189 stars by August 18, 2019!}. Thank China\TeX{} and \href{http://www.latexstudio.net/}{\LaTeX{} studio} for their promotion. \LaTeX{} studio offers tons of valuable posts and templates for discovery. It is the most comprehensive website on \LaTeX{} in China. Thank \href{https://github.com/muzimuzhi}{muzimuzhi} for the revision of the template. If you like our template, star on Github. \begin{figure}[!ht] \centering \includegraphics[width=\textwidth]{star.png} \caption{Twinkle, Twinkle, Little Star} \end{figure} \begin{figure}[!ht] \centering \includegraphics[width=0.618\textwidth]{star-history.png} \caption{Github Star Trends for Elegant\LaTeX{} (by week)} \end{figure} \section{Donation} To express your love for our templates and/or our developers, please do not hesitate to tip us. Since last release of 3.08, we have received about a thousand RMB! (The emergence of a millionaire is on the way. Loading... ) \begin{figure}[!htbp] \centering \includegraphics[width=0.45\textwidth]{donate.jpg} \end{figure} The explanation right of the tip usage belongs to Elegant\LaTeX{} with no supervision. Feel free to tip us. Those who donate more than 10 RMB will be recorded in the Donation List. Thank all the tippers! \begin{table}[!h] \centering \caption{Donation List} \begin{tabular}{cccc} \toprule Tipper & Amount & Date & Channel \\ \midrule Lerh & 10 RMB & 2019/05/15 & Wechat \\ Yueguodipingxian & 10 RMB & 2019/05/15 & Wechat \\ Dapeng & 20 RMB & 2019/05/27 & Wechat\\ Anonymous & 10 RMB & 2019/05/30 & Wechat \\ \href{http://www.latexstudio.net/}{latexstudio.net} & 666 RMB & 2019/06/05 & Alipay \\ Cassis & 11 RMB & 2019/06/30 & Wechat \\ Anonymous & 10 RMB & 2019/07/23 & Wechat \\ \bottomrule \end{tabular}% \end{table}% \chapter{ElegantBook Settings} This template is based on the Standard \LaTeX{} book class, so the options of book class work as well (Note that the option of papersize has no effect due to \lstinline{device} option). The default encoding is UTF-8 while \TeX{} Live is recommended. The test environment is Win10 + \TeX{} Live 2019, either \lstinline{PDFLaTeX} or \lstinline{XeLaTeX} works fine. \section{Languages} We defined one option named \lstinline{lang} which has two alternative values, \lstinline{lang=en} (default) and \lstinline{lang=cn}. Different values will alter the captions of figure/table, abstract name, refname, etc. You can use this option as \begin{lstlisting} \documentclass[en]{elegantbook} \documentclass[lang=en]{elegantbook} \end{lstlisting} \begin{remark} Chinese Characters are acceptable whenever \lstinline{lang=en} or \lstinline{lang=cn}. If you would like to include Chinese characters under (\lstinline{lstlisting}) environment, please use \lstinline{XeLaTeX} to compile. \end{remark} \section{Device Mode Option} The option for device (\lstinline{device}) was originally used in ElegantNote, now we include this option in ElegantBook\footnote{Pictures have to be modified accordingly} as well. Activate iPad mode in the following way\footnote{Default size: normal, A4 paper}: \begin{lstlisting} \documentclass[pad]{elegantbook} %or \documentclass[device=pad]{elegantbook} \end{lstlisting} \section{Color Themes} This template contains 5 color themes, i.e. \textcolor{structure1}{\lstinline{green}}\footnote{Original default theme.}, \textcolor{structure2}{\lstinline{cyan}}, \textcolor{structure3}{\lstinline{blue}}(default), \textcolor{structure4}{\lstinline{gray}}, \textcolor{structure5}{\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}} \centering \begin{tabular}{ccccccc} \toprule & \textcolor{structure1}{green} & \textcolor{structure2}{cyan} & \textcolor{structure3}{blue} & \textcolor{structure4}{gray} & \textcolor{structure5}{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 \\ 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} and declare 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},\lstinline{hang}(default) and \lstinline{display} style. For the former, chapter title is displayed on a single line (\lstinline{hang}). For the latter, chapter title is displayed on a double line (\lstinline{display}).In this guide, we use \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 may change to \lstinline{simple} mode by \begin{lstlisting} \documentclass[simple]{elegantbook} %or \documentclass[mode=simple]{elegantbook} \end{lstlisting} In this template, we defined four different theorem class environments \begin{itemize} \item \textit{Theorem Environment}, including title and content, numbering corresponding to chapter. 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 numbering corresponding to chapter. \item \textit{Proof Environment}, including \textbf{proof, note} environment containing 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 an option \lstinline{result}, which can hide the \lstinline{solution} and \lstinline{proof} environments. You can switch between \lstinline{result=answer} and \lstinline{result=noanswer}} environment, all of which begin with boldfaced words, with format consistent with normal paragraphs. \end{itemize} \subsection{Theorem Class Environments} Since 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}{}{