version 3.08 release

This commit is contained in:
EthanDeng
2019-05-28 22:31:22 +08:00
parent 16bcf11414
commit 87f4d64810
6 changed files with 623 additions and 110 deletions

View File

@@ -1,4 +1,4 @@
\documentclass[noanswer,fancy,blue,11pt]{elegantbook}
\documentclass[fancy,blue,11pt]{elegantbook}
\title{An Elegant \LaTeX{} Template for Books}
\subtitle{Classic Elegant\LaTeX{} Template}
@@ -6,15 +6,13 @@
\author{Ethan Deng \& Liam Huang}
\institute{Elegant\LaTeX{} Program}
\date{\today}
\version{3.07}
\version{3.08}
\equote{Victory won\rq t come to us unless we go to it. --- M. Moore}
\extrainfo{Victory won\rq t come to us unless we go to it. }
\logo{logo.png}
\cover{cover.jpg}
\begin{document}
\maketitle
@@ -25,55 +23,138 @@
\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}.
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}.
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}
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:
What\rq s new in this version:
\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.
\item Fix \lstinline|\part|.
\item Introduce pad mode.
\item Support mtpro2 package.
\item Revise default format of references to numbers.
\item Include environment for chapter introduction.
\item Include environment for problem set.
\item Include margin note using \lstinline{\elegantpar} (beta).
\item Reduce line spacing for equations.
\item Turn \lstinline{\equote} into \lstinline{\extrainfo}, with multi-line display.
\item Polish documentation by including acknowledgement, etc.
\end{enumerate}
\begin{note}
Since the latest version has witnessed huge reconstruction (with cover change in version 3.06), 3.x is backward incompatible with 2.x. For those who would like to convert documents compiled with earlier version (3.06 or 2.x) to be compatible with latest version, please refer to \href{https://github.com/ElegantLaTeX/ElegantBook/wiki/convert}{conversion}. Questions about version 2.x will not be answered henceforth.
\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, installation directory, etc., please refer to OG (Official Guide).
\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.
\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.
Thank our best support members for their selfless work!
\begin{itemize}
\item OG Translator: \href{https://github.com/peggy2006xzyz}{YPY};
\item Wiki Maintainer: \href{https://github.com/izinngo}{Ingo Zinngo};
\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 and was included in the \href{https://github.com/trending/tex?since=daily}{Trending} under the \TeX{} catagory. It is a remarkable moment for Elegant\LaTeX{} !!!
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 muzimuzhi for the revision of the template.
If you like our template, star on Github.
\begin{figure}[htbp]
\centering
\includegraphics[width=\textwidth]{star.png}
\caption{Twinkle, Twinkle, Little Star}
\end{figure}
Recently some users have expressed their love for our templates and want to tip us. QR code for donation is now available.
\begin{figure}[htbp]
\centering
\includegraphics[width=0.5\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}[htbp]
\centering
\caption{Donation List}
\begin{tabular}{cccc}
\toprule
Tipper & Amount & Date & Channel \\
\midrule
Lerh & 10 RMB & 2019/5/15 & Wechat \\
Yueguodipingxian & 10 RMB & 2019/5/15 & Wechat \\
Dapeng & 20 RMB & 2019/5/27 & Wechat\\
\bottomrule
\end{tabular}%
\end{table}%
\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.
This template is based on the Standard \LaTeX{} book class, so the options of book class work as well. The default encoding is UTF-8 while \TeX{} Live is recommended. The test environment is Win10 + \TeX{} Live 2019.
\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
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}
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}.
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,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
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}
@@ -85,11 +166,11 @@ This template contains 5 color themes,they are \textcolor{main1}{\lstinline{gre
\centering
\begin{tabular}{ccccccc}
\toprule
& \textcolor{main1}{green}
& \textcolor{main2}{cyan}
& \textcolor{main3}{blue}
& \textcolor{main4}{gray}
& \textcolor{main5}{black}
& \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}}}
@@ -120,7 +201,7 @@ third & \makecell{{\color{third1}\rule{1cm}{1cm}}}
\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:
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}%
@@ -131,46 +212,45 @@ If you want to customize the colors, please select \lstinline{nocolor} or use \l
\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
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 can change to \lstinline{simple} mode by
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 categories of theorem class environments
In this template, we defined four different theorem class environments
\begin{itemize}
\item \textit{Theorem Environment}, including title and contents, numbering within chapter. There are three types depending on the format
\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 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.
\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}
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:
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}{<theorem name>}{<label>}
The content of theorem.
\end{theorem}
\end{lstlisting}
The first parameter \lstinline{<theorem name>} is the name of the theorem, and the second parameter \lstinline{label} is the label used in cross-reference with \verb|ref{thm:label}|. Note that cross-references must be prefixed with \lstinline{thm:}.
The first parameter \lstinline{<theorem name>} represents the name of the theorem, and the second parameter \lstinline{label} represents the label used in cross-reference with \verb|ref{thm:label}|. Note that cross-references must be prefixed with \lstinline{thm:}.
Other theorem class environments with the same usage are:
Other theorem class environments with the same usage includes:
\begin{table}[htbp]
\centering
@@ -191,7 +271,7 @@ Other theorem class environments with the same usage are:
\subsection{Other Customized Environments}
The other three math environments can be used directly since there are no options for them, the \lstinline{example} environment usage:
The other three math environments can be called directly since there are no additional option for them, e.g. \lstinline{example}:
\begin{lstlisting}
\begin{example}
This is the content of example environment.
@@ -204,16 +284,16 @@ The effect is as follows:
This is the content of example environment.
\end{example}
These are all the same environments, except that
These are all similar environments with slight differences lies in:
\begin{itemize}
\item example, exercise, problem environments numbering within chapter;
\item note with introductory symbol, proof with ending symbol;
\item conclusion environment with boldfaced keywords and normal paragraph content.
\item Example, exercise, problem environments number within chapter;
\item Note begins with introductory symbol and proof ends with ending symbol;
\item Conclusion environment and so on are normal paragraph environments with boldfaced introductory words.
\end{itemize}
\section{Base Hide Option}
We defined an option to hide the base below the chapter, you can use it by
Hiding the end-of-chapter base is optional, simply type in:
\begin{lstlisting}
\documentclass[hide]{elegantbook} %or
\documentclass[base=hide]{elegantbook}
@@ -222,12 +302,12 @@ We defined an option to hide the base below the chapter, you can use it by
\section{Cover and Logo}
The cover image used in this template is from \href{https://pixabay.com/en/tea-time-poetry-coffee-reading-3240766/}{pixabay.com}\footnote{Thank China\TeX{} for providing free image source site, and \href{https://www.pexels.com/}{pexels.com} is also recommended.}. The image is completely free and can be used in any circumstance. The cover image size is $1280 \times 1024$, when changing the cover, please crop it according to the size of the cover picture strictly. Here is a free online image clipping site: \href{https://www.befunky.com/create/crop-photo/}{befunky.com}.
The cover image used in this template is from \href{https://pixabay.com/en/tea-time-poetry-coffee-reading-3240766/}{pixabay.com}\footnote{Thank China\TeX{} for providing free image source, \href{https://www.pexels.com/}{pexels.com} is strongly recommended.}. The image is completely free and can be used under any circumstance. The cover image size is $1280 \times 1024$. If you would like to change the cover, please crop it according to the size of the cover picture strictly.One free online image clipping site: \href{https://www.befunky.com/create/crop-photo/}{befunky.com}.
This Logo ratio is 1:1, that is square picture. In the replacement of the picture, please choose the appropriate picture to replace.
Aspect ratio of the logo is 1:1 in this guide, i.e. a square picture. To replace the logo, do remember to choose the appropriate picture.
\section{List Environments}
This template uses \lstinline{tikz} to customize \lstinline{itemize} and \lstinline{enumerate} environments, the \lstinline{itemize} environment customized to the third depth, and \lstinline{enumerate} environment customized to fourth depth. The effect is as follows\\[2ex]
This template uses \lstinline{tikz} to customize \lstinline{itemize} and \lstinline{enumerate} environments, with \lstinline{itemize} environment customized to the third depth and \lstinline{enumerate} environment customized to fourth depth. The effect is as follows\\[2ex]
\begin{minipage}[b]{0.49\textwidth}
\begin{itemize}
\item first item of nesti;
@@ -259,16 +339,23 @@ This template uses \lstinline{tikz} to customize \lstinline{itemize} and \lstinl
\section{Bibliography}
This template uses \hologo{BibTeX} to generate the bibliography, the default bibliography style is \lstinline{aer}. Let's take a glance at the citation effect, ~\cite{en1} use data from a major peer-to-peer lending marketplace in China to study whether female and male investors evaluate loan performance differently.
This template uses \hologo{BibTeX} to generate the bibliography, the default bibliography style is \lstinline{aer}. Let's take a glance at the citation effect. ~\cite{en1} use data from a major peer-to-peer lending marketplace in China to study whether female and male investors evaluate loan performance differently.
If you want to use \hologo{BibTeX}, you must create a file named \lstinline{reference.bib}, and add bib items (from Google Scholar, Mendeley, EndNote, and etc.) to \lstinline{reference.bib} file, and cite the bibkey in the \lstinline{tex} file. The Bib\TeX{} will automatically generate the bibliography for you for the reference you cited. If you want to add some noncited reference to the bibliography, you can use
If you want to use \hologo{BibTeX}, you must create a file named \lstinline{reference.bib}, add bib items (from Google Scholar, Mendeley, EndNote, and etc.) to \lstinline{reference.bib} file, then cite the bibkey in the \lstinline{tex} file. The Bib\TeX{} will automatically generate the bibliography for the reference you cited. If you want to add some noncited reference to the bibliography, you can use
\begin{lstlisting}[frame=single]
\nocite{EINAV2010,Havrylchyk2018} %or include some bibitems
\nocite{*} %include all the bibitems
\end{lstlisting}
Two more options \lstinline{cite=numbers} and \lstinline{cite=authoryear} are available in this new version, with the default setting as \lstinline{numbers} since those major in science and technology use \lstinline{numbers} more often. For those who major in liberal arts want to use \lstinline{authoryear}, please type in:
\begin{lstlisting}
\nocite{EINAV2010, Havrylchyk2018}
\documentclass[cite=authoryear]{elegantbook} %or
\documentclass[authoryear]{elegantbook}
\end{lstlisting}
\section{Preface}
If you want to add a preface before the first chapter without changing the number of chapter, you can use it before the first chapter
If you want to add a preface before the first chapter with the number of chapter unchanged, please add the preface in the following way:
\begin{lstlisting}
\chapter*{Preface}
\addcontentsline{toc}{chapter}{Preface}
@@ -276,6 +363,53 @@ If you want to add a preface before the first chapter without changing the numbe
The content of Preface.
\end{lstlisting}
\section{Introduction Environment}
We create a introduction environment to display the structure of chapter. The basic useage is as follows
\begin{lstlisting}
\begin{introduction}
\item Definition of Theorem
\item Ask for help
\item Optimization Problem
\item Property of Cauchy Series
\item Angle of Corner
\end{introduction}
\end{lstlisting}
you will get:
\begin{introduction}
\item Definition of Theorem
\item Ask for help
\item Optimization Problem
\item Property of Cauchy Series
\item Angle of Corner
\end{introduction}
You can change the title of this environment by modifying the optional argument of this environment
\begin{lstlisting}
\begin{introduction}[Brief Introduction]
...
\end{introduction}
\end{lstlisting}
\section{Problem Set}
The environment \lstinline{problemset} is used at the end of each chapter to display corresponding exercises. Just type in the following sentences:
\begin{lstlisting}
\begin{problemset}
\item exercise 1
\item exercise 2
\item exercise 3
\end{problemset}
\end{lstlisting}
And you will get:
\begin{problemset}
\item exercise 1
\item exercise 2
\item exercise 3
\end{problemset}
\begin{remark}
If you want to customize the title of \lstinline{problemset}, please change the optional argument like introduction environment.
\end{remark}
\chapter{ElegantBook Writing Sample}
\begin{introduction}
@@ -365,6 +499,97 @@ Let's continue using our application training example. In this case, we'd want t
\item Distributed storage and search.
\end{itemize}
\begin{problemset}
\item Solve the equation $5(- 3x - 2) - (x - 3) = -4(4x + 5) + 13$.
\item Find the distance between the points (-4 , -5) and (-1 , -1).
\item Find the slope of the line $5x - 5y = 7$.
\end{problemset}
\chapter{Margin Notes}
For version 3.08, we introduce margin note option and \lstinline{\elegantpar} (Beta). In this template, margin note option \lstinline{marginpar} is included. If \lstinline{marginpar=margintrue}, the width of both sides will reduce at least 1.5cm. If \lstinline{marginpar=marginfalse}, the width of sides will remain unchanged. Margin note option works under \lstinline{device=normal} only.
Margin note option can be activated using \lstinline{\marginpar} built in \LaTeX{} or \lstinline{\marginnote} command in \lstinline{marginnote}. For more information, refer to \href{https://en.wikibooks.org/wiki/LaTeX/Footnotes_and_Margin_Notes#Margin_Notes}{Margin Notes} or \LaTeX{} books.
\lstinline{\elegantpar} is introduced in this version. Note that TikZ overlay is used in this command, hence you have to compile three times to get the right display effect.
%\setlength{\marginparwidth}{2.5cm}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et \elegantpar{dolore magna aliqua}{This is Beautiful the elegantpar Style for English Text}. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\begin{equation}
E = m\elegantpar{c^{2}}{
\begin{equation*}E=mc^2\end{equation*}}
\end{equation}
\chapter{FAQ}
\begin{custom}{Question}
I want to customize font and background color.
\end{custom}
\begin{solution}
Please use \lstinline{\pagecolor} to change background color, refer to \href{https://tex.stackexchange.com/questions/278544/xcolor-what-is-the-equivalent-of-default-text-color}{this} to customize font.
\end{solution}
\begin{custom}{Question}
Which version should I choose?
\end{custom}
\begin{solution}
Please use \href{https://github.com/ElegantLaTeX/ElegantBook/releases}{Latest Release} via GitHub or \TeX{} Live 2019.
\end{solution}
\begin{custom}{Question}
Which editor should I choose?
\end{custom}
\begin{solution}
You can use \TeX{} Live 2019 built-in \TeX works or \TeX Studio. You may refer to \href{https://github.com/EthanDeng/texworks-autocomplete}{\TeX{}works autocomplete}. \TeX{} Live 2019 + \TeX{}studio is strongly recommended. I myself use VS Code and Sublime Text. Related configurations can be found at \href{https://github.com/EthanDeng/vscode-latex}{vscode-latex} and \href{https://github.com/EthanDeng/sublime-text-latex}{sublime-text-latex}.
\end{solution}
\begin{custom}{Question}
Hello, we want to use ElegantBook to write a book about machine learning and would like your authorization.
\end{custom}
\begin{solution}
Feel free to use our templates by pointing out our copyright. For other issues, please refer to LPPL-1.3c. If you want to show us your work, share the URL with us afterwards.
\end{solution}
\begin{custom}{Question}
I would like to use the former cover!
\end{custom}
\begin{solution}
Cover option is forthcoming.
\end{solution}
\begin{custom}{Question}
What is cross reference?
\end{custom}
\begin{solution}
This template is aimed at who are not a complete beginner for \LaTeX{}. Please learn more about \LaTeX{} before using this template.
\end{solution}
\begin{custom}{Question}
Is the language for code highlighting optional?
\end{custom}
\begin{solution}
Yes, \lstinline{listings} package is used in ElegantBook, hence language is optional. For global setting, use \lstinline{\lstset}. For more information, please refer to package documentations.
\end{solution}
\nocite{en1,en2,en3}
\bibliography{reference}
@@ -395,7 +620,7 @@ This appendix covers some of the basic mathematics used in econometrics. We brie
\date{\today}
% extra info
\version{1.00}
\equote{Victory won\rq t come to us unless we go to it. --- M. Moore}
\extrainfo{Victory won\rq t come to us unless we go to it. --- M. Moore}
\logo{logo.png}
\cover{cover.jpg}