An Elegant L TEX Template For Books
An Elegant L TEX Template For Books
An Elegant L TEX Template For Books
1 ElegantLATEX Templates 1
1.1 ElegantBook Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Installation and Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 About Pull Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 ElegantBook Settings 3
2.1 Languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Device Mode Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 Color Themes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.4 Cover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.5 Chapter Title Display Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.6 Introduction of Math Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.7 List Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.8 Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.9 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.10 Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.11 Content Option and Depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.12 Introduction Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Chapter 2 Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.13 Margin Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4 FAQ 14
5 Version History 15
A Mathematical Tools 17
A.1 Summation Operator and Description Statistics . . . . . . . . . . . . . . . . . . . . . . . . . 17
Chapter 1 ElegantLATEX Templates
ElegantLATEX Program developers are intended to provide you beautiful, elegant, user-friendly templates.
Currently, the ElegantLATEX is composed of ElegantNote, ElegantBook, 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 issues or email us at elegantlatex2e@gmail.com.
Contact Infos:
Homepage: https://elegantlatex.org/
GitHub: https://github.com/ElegantLaTeX/
CTAN: https://ctan.org/pkg/elegantbook
Wiki: https://github.com/ElegantLaTeX/ElegantBook/wiki
Download: release, latest version
Weibo: ElegantLATEX
Wechat: ElegantLATEX
QQ: 692108391
Email: elegantlatex2e@gmail.com
2
Chapter 2 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 device option). The default encoding is UTF-8 while TEX
Live is recommended. The test environment is Win10 + TEX Live 2021, either pdfLATEX or XELATEX works fine.
XELATEX is preferred for Chinese articles.
2.1 Languages
We defined one option named lang which has two basic values, lang=en (default) , lang=cn. Different
values will alter the captions of figure/table, abstract name, refname, etc. You can use this option as
\documentclass[en]{elegantbook}
\documentclass[lang=en]{elegantbook}
Besides the two basic language translation, our user provide more options, here is a short brief introduction
to these translation. Since I am not familiar with these languages, I can’t guarantee that the translations are
correct, please comment on GitHub if you have some questions.
Italian translation lang=it, provided by VincentMVV , please refer to Italian translation;
French translation lang=fr, provided by abfek66 , please refer to Italian translation;
Dutch Translation lang=nl, provided by inktvis75 , please refer to Dutch Translation;
Hungarian translation lang=hu, provided by palkotamas, please refer to Hungarian translation;
Deutsch translation lang=de, provided by Lisa, please refer toDeutsch translation;
Spanish translation lang=es, provided by Gustavo A. Corradi, please refer to Spanish translation;
Mongolian translation lang=mn, provided by Altantsooj, please refer to Mongolian translation.
Remark Chinese Characters are acceptable ONLY in lang=cn.
\documentclass[green]{elegantbook} %or
\documentclass[color=green]{elegantbook}
third proposition
If you want to customize the colors, please select nocolor or use color=none and declare the main,
second, and third colors in the preamble section as follows:
\definecolor{structurecolor}{RGB}{60,113,183}
\definecolor{main}{RGB}{0,166,82}%
\definecolor{second}{RGB}{255,134,24}%
\definecolor{third}{RGB}{0,174,247}%
2.4 Cover
You can change the color of the horizontal bar of the cover by
4
2.5 Chapter Title Display Styles
\definecolor{customcolor}{RGB}{32,178,170}
\colorlet{coverlinecolor}{customcolor}
2.4.3 Logo
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.
5
2.6 Introduction of Math Environments
Example Environments, including example, exercise, problem environment, auto numbering corre-
sponding to chapter.
Proof Environment, including proof, note environment containing introductory symbol (note environ-
ment) or ending symbol (proof environment).
Conclusion Environments, including conclusion, assumption, property, remark and solution4 envi-
ronments, all of which begin with boldfaced words, with format consistent with normal paragraphs.
The first parameter <theorem name> represents the name of the theorem, and the second parameter label
represents the label used in cross-reference with ref{thm:label}. Note that cross-references must be prefixed
with thm:.
From version 4.1, you can write your theorem environments as follows:
\begin{theorem}[theorem name]\label{thm:label text}
The content of theorem.
\end{theorem}
% or
\begin{theorem}
The content of theorem.
\end{theorem}
4We also define an option result, which can hide the solution and proof environments. You can switch between result=answer
and result=noanswer.
6
2.7 List Environments
\end{example}
2.8 Fonts
Alert After v3.10, newtx is reset to cm, together with other two options, the math font option offers:
1. math=cm(default), use LATEX default math font (recommended).
2. math=newtx, use newtxmath math font (may bring about bugs).
3. math=mtpro2, use mtpro2 package to set math font.
If you use newtx fonts, type in:
\documentclass[math=newtx]{elegantbook}
When you are using newtx, please pay attention to the hyphens. For instance,
Z
f (x, y)dy.off (2.1)
Rq
The corresponding code is:
\begin{equation}
\int_{R^q} f(x,y) dy.\emph{of \kern0pt f}
\end{equation}
7
2.9 Bibliography
LaTeX Error:
Too many symbol fonts declared.
The reason is that the template redefines font for math so that no new math font is allowed to be added. To
use yhmath and/or esvect, please locate yhmath or esvect in elegantbook.cls, uncomment corresponding
related code.
%%% use yhmath pkg, uncomment following code
% \let\oldwidering\widering
% \let\widering\undefined
% \RequirePackage{yhmath}
% \let\widering\oldwidering
2.9 Bibliography
This template uses biblatex to generate the bibliography, the default citestyle and bibliography style are
both numeric. Let’s take a glance at the citation effect. [3] use data from a major peer-to-peer lending [2]
marketplace in China to study whether female and male investors evaluate loan performance differently [1].
If you want to use biblatex, you must create a file named reference.bib, add bib items (from Google
Scholar, Mendeley, EndNote, and etc.) to reference.bib file, then cite the bibkey in the tex file. The biber
will automatically generate the bibliography for the reference you cited.
To change the bibliography style, this version introduces citestyle and bibstyle, please refer to
CTAN:biblatex for more detail about these options. You can change your bibliography style as
\documentclass[citestyle=numeric-comp, bibstyle=authoryear]{elegantbook}
2.10 Preface
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:
\chapter*{Introduction}
\markboth{Introduction}{Introduction}
The content of introduction.
8
2.12 Introduction Environment
Introduction
h Definition of Theorem h Property of Cauchy Series
h Ask for help h Angle of Corner
h Optimization Problem
You can change the title of this environment by modifying the optional argument of this environment:
\begin{introduction}[Brief Introduction]
...
\end{introduction}
The environment problemset is used at the end of each chapter to display corresponding exercises. Just
type in the following sentences:
\begin{problemset}
\item exercise 1
\item exercise 2
\item exercise 3
\end{problemset}
K Chapter 2 Exercise k
1. exercise 1
2. exercise 2
3. exercise 3
4. math equation test:
a2 + b2 = c2i (1, 2)[1, 23] (2.2)
Remark If you want to customize the title of problemset, please change the optional argument like in
introduction environment. In this version the problemset environment automatically appears in the table of
contents but not in the header or footer(to be fixed).
9
2.13 Margin Notes
Solution If you want to customize the title of problemset, please change the optional argument like in
introduction environment. In this version the problemset environment automatically appears in the table of
contents but not in the header or footer(to be fixed).
% equation
\marginpar{
\begin{equation}
a^2 + b^2 = c^2
\end{equation}
}
For tables and figures, note that floating environment is not allowed. You have to use includegraphics
or table and use \captionof to name it. To get centralized figures or tables, use \centerline or center.
To learn more, please refer to Caption of Figure in Marginpar.
% graph with centerline command
\marginpar{
\centerline{
\includegraphics[width=0.2\textwidth]{logo.png}
}
\captionof{figure}{your figure caption}
}
10
Chapter 3 ElegantBook Writing Sample
Introduction
h Theorem Class Envrionments h List Environments
h Cross Reference h Logo and Base
h Math Environments h a2 + b2 = c2
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac,
adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id,
vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et
malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum
urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium
quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean faucibus. Morbi dolor nulla,
malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis
nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum.
3.1 Nulla malesuada porttitor diam. Donec felis erat, congue non, volutpat at, tincidunt tristique, libero.
Vivamus viverra fermentum felis. Donec nonummy pellentesque ante. Phasellus adipiscing semper elit. Proin
fermentum massa ac quam. Sed diam turpis, molestie vitae, placerat a, molestie nec, leo. Maecenas lacinia.
Nam ipsum ligula, eleifend at, accumsan nec, suscipit a, ipsum. Morbi blandit ligula feugiat magna. Nunc
eleifend consequat lorem. Sed lacinia nulla vitae enim. Pellentesque tincidunt purus vel magna. Integer non
enim. Praesent euismod nunc eu purus. Donec bibendum quam in tellus. Nullam cursus pulvinar lectus. Donec
3.2 Second section
Proof Let z be some element of xH ∩ yH. Then z = xa for some a ∈ H, and z = yb for some b ∈ H.
If h is any element of H then ah ∈ H and a−1 h ∈ H, since H is a subgroup of G. But zh = x(ah) and
xh = z(a−1 h) for all h ∈ H. Therefore zH ⊂ xH and xH ⊂ zH, and thus xH = zH. Similarly yH = zH,
and thus xH = yH, as required.
Regression analysis is a powerful statistical method that allows you to examine the relationship between
two or more variables of interest. While there are many types of regression analysis, at their core they all
examine the influence of one or more independent variables on a dependent variable. The process of performing
a regression allows you to confidently determine which factors matter most, which factors can be ignored, and
how these factors influence each other.
Let’s continue using our application training example. In this case, we’d want to measure the historical
levels of satisfaction with the events from the past three years or so, as well as any information possible in
regards to the independent variables.
12
Chapter 3 Exercise
Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel, wisi. Morbi auctor lorem non justo. Nam
lacus libero, pretium at, lobortis vitae, ultricies et, tellus. Donec aliquet, tortor sed accumsan bibendum, erat
ligula aliquet magna, vitae ornare odio metus a mi. Morbi ac orci et nisl hendrerit mollis. Suspendisse ut
massa. Cras nec ante. Pellentesque a nulla. Cum sociis natoque penatibus et magnis dis parturient montes,
nascetur ridiculus mus. Aliquam tincidunt urna. Nulla ullamcorper vestibulum turpis. Pellentesque cursus
luctus mauris.
Routing and resource discovery;
Language Models
Vector Space Models
Resilient and scalable computer networks;
Distributed storage and search.
K Chapter 3 Exercise k
1. Solve the equation 5(−3x − 2) − (x − 3) = −4(4x + 5) + 13.
2. Find the distance between the points (−4, −5) and (−1, −1).
3. Find the slope of the line 5x − 5y = 7.
13
Chapter 4 FAQ
We revised our templates now and then. This section shows the version story of ElegantBook. We have
nearly 100 submits and 17 releases on GitHub since uploaded.
[1] Charles T Carlstrom and Timothy S Fuerst. “Agency Costs, Net Worth, and Business Fluctuations: A
Computable General Equilibrium Analysis”. In: The American Economic Review (1997), pp. 893–910.
issn: 0002-8282.
[2] Qiang Li, Liwen Chen, and Yong Zeng. “The Mechanism and Effectiveness of Credit Scoring of P2P
Lending Platform: Evidence from Renrendai.com”. In: China Finance Review International 8.3 (2018),
pp. 256–274.
[3] Vincenzo Quadrini. “Financial Frictions in Macroeconomic Fluctuations”. In: FRB Richmond Economic
Quarterly 97.3 (2011), pp. 209–254.
Appendix A Mathematical Tools
This appendix covers some of the basic mathematics used in econometrics. We briefly discuss the properties
of summation operators, study the properties of linear and some nonlinear equations, and review the ratios and
percentages. We also introduce some special functions that are common in econometrics applications, including
quadratic functions and natural logarithms. The first four sections require only basic algebraic techniques. The
fifth section briefly reviews differential Calculus Although Calculus is not necessary to understand much of this
book, it is used in some of the end-of-chapter appendices and in some of the more advanced topics in part 3.