English

EthanDeng
2019-02-28 22:58:05 +08:00
parent 04b4028a47
commit a3c6cba0b7
16 changed files with 183 additions and 84 deletions

7
Bibliography.md Normal file

@@ -0,0 +1,7 @@
This template uses `BibTeX` to generate the bibliography, the default bibliography style is `aer`. Lets take a glance at the citation effect, Chen et al. (2018) 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 BibTeX, you must create a file named `reference.bib`, and add bib items (from Google Scholar, Mendeley, EndNote, and etc.) to `reference.bib` file, and cite the bibkey in the `tex` file. The `BibTeX` 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
```tex
\nocite{EINAV2010, Havrylchyk2018}
```

@@ -1,11 +1,14 @@
This template contains 5 color themes, green, cyan, blue, sakura, black. Where
green is the default color theme, if you dont need color, you can choose black
theme. The color theme is enabled in the same way as before:
This template contains 4 color themes,they are green (default), cyan, blue, plain, and there is a customization color option `nocolor`. You can choose green with
```tex
\documentclass[green]{elegantnote}
\documentclass[color=green]{elegantnote}
....
\documentclass[black]{elegantnote}
\documentclass[color=black]{elegantnote}
\documentclass[green]{elegantbook} %or
\documentclass[color=green]{elegantbook}
```
where plain theme is gray for all theorem class environments and paper structures. If you want to customize the colors, please select `nocolor` or use `color=none` , then define the main, second, and third colors in the preamble section as follows:
```tex
\definecolor{main}{RGB}{70,70,70}
\definecolor{second}{RGB}{115,45,2}
\definecolor{third}{RGB}{0,80,80}
```

@@ -1,9 +1,33 @@
You can use `PDFLaTeX` or `XeLaTeX` to process your notes.
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.
+ If you are using PDFLaTeX, `ctex` package is used;
+ If you are using XeLaTeX , `xeCJK` package is called when processing Chinese characters.
## Compile with `PDFLaTeX`
The test environment is Win10 + TeX Live 2018. If you are using a Mac/Linux
system and compiled with `XeLaTeX`, please change the font in elegantnote.cls with your system font.
If you choose PDFLaTeX to process your book, the default article font computer modern has changed to `newtx` series, and the default font size is set to 12pt. The fonts are settings with:
__Note:__ If you are using `PDFLaTeX`, you do not need to change the font settings.
+ `newtxtext` package for text fonts, similar to Times New Roman font.
+ `newtxmath` package for math fonts, close to `times` package.
+ `FiraMono` package for typewriter fonts, with option `scale=0.7`.
+ `ctex` package for Chinese fonts, with option `scheme=plain`.
A full compilation chain `PDFLaTe`X -> `BibTeX` -> `PDFLaTeX`*2.
## Compile with `XeLaTeX`
If you choose `XeLaTeX` to process your book, we use `fontspec` package and `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.
```tex
\RequirePackage{fontenc}
\RequirePackage[no-math]{fontspec}
\setmainfont{Times New Roman}[NFSSFamily=ntxtlf]
\setsansfont{Arial}
%\setmonofont[Scale=0.7]{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.7]{Microsoft YaHei}
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt
\RequirePackage{newtxmath}
```
A full compilation chain `XeLaTeX` -> `BibTeX` -> `XeLaTeX`*2.

5
CoverLogo.md Normal file

@@ -0,0 +1,5 @@
The cover image used in this template is from [pixabay.com](https://pixabay.com/en/tea-time-poetry-coffee-reading-3240766/)<sup>[1](#myfootnote1)</sup>. The image is completely free and can be used in any circumstance. The cover image size is 1280*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: [befunky.com](https://www.befunky.com/create/crop-photo/).
This Logo ratio is 1:1, that is square picture. In the replacement of the picture, please choose the appropriate picture to replace.
<a name="myfootnote1">1</a>: Thank ChinaTEX for providing free image source site, and [pexels.com](https://www.pexels.com/) is also recommended.

@@ -1,19 +0,0 @@
To make the notes more comfortable to read, we designed four output options (of different sizes) that correspond to different reading devices: Pad, Kindle, PC and A4paper. The options of output for different devices are
```tex
\documentclass[device=pad]{elegantnote}
\documentclass[device=kindle]{elegantnote}
\documentclass[device=pc]{elegantnote}
\documentclass[device=normal]{elegantnote}
```
__Note:__ You can also select the device by using a direct assignment method, such as:
```tex
\documentclass[pad]{elegantnote}
\documentclass[kindle]{elegantnote}
\documentclass[pc]{elegantnote}
\documentclass[normal]{elegantnote}
```
Note that if you want a normal A4paper size PDF, you need to select `device=normal` instead of `device=pc` , because `device=pc` is actually set to double page mode on your computer.

8
DisplayStyles.md Normal file

@@ -0,0 +1,8 @@
This template contains 2 sets of _title display styles_,which including `hang`(default) and display style,
The difference is that the chapter heading is displayed on a single line (`hang`) and on a double line (`display`) , and this guide uses `hang`. To change display style
```tex
\documentclass[hang]{elegantbook} %or
\documentclass[titlestyle=hang]{elegantbook}
```

@@ -1,9 +0,0 @@
This template added good for eye mode (geye), the default is none, you can switch to good eye mode using:
```tex
\documentclass[geye]{elegantnote} % or
\documentclass[mode=geye]{elegantnote}
```
__Remark:__ In this version, only one background color is added. If you are expected to add other colors, you can [create issues](https://github.com/ElegantLaTeX/ElegantNote/issues/new) or [pull requests](https://github.com/ElegantLaTeX/ElegantNote/compare) at [Github/ElegantNote](https://github.com/ElegantLaTeX/ElegantNote).

@@ -1,14 +1,22 @@
This template was originally designed to take notes and was conceived in 2013. In the first version, we designed a series of beautiful theorem environments and introduced 3 different color themes. But when taking notes using this template, we found there were so many theorem blocks which makes the notes not pretty. So we decided to update the ElegantNote to the ElegantBook template. The design of ElegantNote stopped there.
On the occasion of this release, we, ElegantLaTeX 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 ElegantLaTeX is currently composed of [ElegantNote](https://github.com/ElegantLaTeX/ElegantNote), [ElegantBook](https://github.com/ElegantLaTeX/ElegantBook), [ElegantPaper](https://github.com/ElegantLaTeX/ElegantPaper) for typesetting notes, books, and working papers respectively.
In 2018, after being "urged" by some users, ElegantBook received a major update, the original floating theorem environments are rewritten with tcolorbox package. After that, we want to completely redesign the ElegantNote template. We are in favor of more compact, simpler theorem environments, and aim to design an Elegant LaTeX template which is more suitable for note taking and note reading.
The latest version is available on [Github:ElegantBook/releases](https://github.com/ElegantLaTeX/ElegantBook/releases). 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.
With the advice and inspiration of some friends, we redesigned the new ElegantNote template based on the Standard LaTeX article class! The new template has the following features:
## ElegantBook Updates
+ good for eye mode: with green page color;
+ different devices: Pad (default), Kindle, PC (double-page) and normal (A4);
+ 5 color themes: green (default), cyan, blue, sakura, black;
+ languages support: Chinese (default), English;
+ support `PDFLaTeX` and `XeLaTeX` ;
+ prettier captions, list environments, and unified fonts.
Over these years, weve 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 wasnt 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 weve removed that from the new version, users dont have to install any fonts. Lets take a look at the ElegantBook template 3.x updates:
1. Remove custom font settings and use the `ctex` package or system font instead;
2. Add English and Chinese modes`lang=cn/en`);
3. `PDFLaTeX` and `XeLaTeX` Support;
4. Use the `tcolorbox` package to re-written the theorem class environments, which can span over pages;
5. Theorem class environments name updated, and cross-references fixed;
6. Color name updated, link color unified;
7. New ElegantLaTeX Logo;
8. New cover and decorations, remove the watermark;
9. Fix appendix;
10. Add gray theme: `color=plain`;
11. Add code highlighting;
12. Beautify the list environment.
____

@@ -1,10 +1,10 @@
This template contains two sets of language environments, changing the language environment will change the title of table/figure (figure, table), article structure words (such as the table of contents, references, etc.), and the environment introductory words (such as Theorem, Lemma, etc.). The different language modes are enabled as follows:
We defined one option named `lang`, this option has two alternative values, `lang=en` (default) or `lang=cn`. `lang=cn` will make the caption of figure/table, abstract name, refname etc. Chinese, while `lang=en` will keep all these stuff English, as the default article class sets. You can use this option as
```tex
\documentclass[cn]{elegantnote}
\documentclass[lang=cn]{elegantnote}
\documentclass[en]{elegantnote}
\documentclass[lang=en]{elegantnote}
\documentclass[cn]{elegantbook}
\documentclass[lang=cn]{elegantbook}
\documentclass[en]{elegantbook}
\documentclass[lang=en]{elegantbook}
```
Note You can input Chinese Characters in either environment.
__Remark__: You can input Chinese Character in either `lang=en` or `lang=cn`. If you are using (lstlisting) environment, and it contains Chinese characters, please use `XeLaTeX`.

3
Lists.md Normal file

@@ -0,0 +1,3 @@
This template uses tikz to customize `itemize` and `enumerate` environments, the `itemize` environment customized to the third depth, and `enumerate` environment customized to fourth depth. The effect is as follows
![](item.png)

@@ -1,20 +1,39 @@
Here is a minimal example.
```tex
\documentclass[geye,green,pad,en]{elegantnote}
\documentclass{elegantbook}
\title{A Note Example}
\author{ddswhu}
\institute{Elegant\LaTeX{} Program}
\version{1.00}
% title info
\title{Title}
\subtitle{Subtitle is here}
% bio info
\author{Your Name}
\institute{XXX University}
\date{\today}
% extra info
\version{1.00}
\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
\mainmatter
\hypersetup{pageanchor=true}
\section{Introduction}
Example Text.
% add preface chapter here if needed
\chapter{Example Chapter Title}
The content of chapter one.
\bibliography{reference}
\appendix
\chapter{Appendix Chapter Title}
The content of appendix 1.
\end{document}
```

8
Preface.md Normal file

@@ -0,0 +1,8 @@
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
```tex
\chapter*{Preface}
\addcontentsline{toc}{chapter}{Preface}
\markboth{Preface}{}
The content of Preface.
```

@@ -1,8 +1,47 @@
This template used the `amsthm` to create theorems, there are 4 types of theorem environments
In this template, we defined four categories of theorem class environments
+ __Theorem-Class__: theorem, lemma, proposition, corollary;
+ __Definition-Class__: definition, conjecture, example;
+ __Remark-Class__: remark, note, case;
+ __Proof-Class__: proof.
+ __Theorem Environment__, including title and contents, numbering within chapter. There are three types depending on the format
+ definition environment, the color is main;
+ theorem, lemma, corollary environment, the color is second;
+ proposition environment, the color is third.
+ __Example Environments__, including example, exercise, problem environment, auto numering within chapter.
+ __Proof Environment__, including proof, note environment, they contain introductory symbol (note environment) or ending symbol (proof environment).
+ __Conclusion Environments__, including conclusion, assumption, property, remark, solution environment, all of these begin with boldfaced words, and the contents are the same as a normal paragraph.
__Remark:__ With the option `lang=cn`, the introductory words of the theorem class environments will be changed to Chinese.
## Theorem Class Environments
The template uses the `tcolorbox` package to customize the theorem class environments, it is slightly different from the normal theorem environments. The usage is as follows:
```tex
\begin{theorem}{<theorem name>}{<label>}
The content of theorem.
\end{theorem}
```
The first parameter `<theorem name>` is the name of the theorem, and the second parameter `label` is the label used in cross-reference with `ref{thm:label}`. Note that cross-references must be prefixed with thm:.
Other theorem class environments with the same usage are:
| Environment | Label text | Prefix | Cross-reference|
|-------------|--------|------|-------------------|
| definition | label | def | `\ref{def:label}` |
| theorem | label | thm | `\ref{thm:label}` |
| lemma | label | lem | `\ref{lem:label}` |
| corrlary | label | cor | `\ref{cor:label}` |
| proposition | label | pro | `\ref{pro:label}` |
## Cross-reference
The other three math environments can be used directly since there are no options for them, the `example` environment usage:
```tex
\begin{example}
This is the content of example environment.
\end{example}
```
These are all the same environments, except that
+ example, exercise, problem environments numbering within chapter;
+ note with introductory symbol, proof with ending symbol;
+ conclusion environment with boldfaced keywords and normal paragraph content.

@@ -21,14 +21,18 @@
## English Version
* [Introduction](https://github.com/ElegantLaTeX/ElegantBook/wiki/Introduction)
* Features Overview
* How To Use
* [Installation](https://github.com/ElegantLaTeX/ElegantBook/wiki/Installation)
* [Good for Eye Mode](https://github.com/ElegantLaTeX/ElegantBook/wiki/GoodforEyeMode)
* [Device Options](https://github.com/ElegantLaTeX/ElegantBook/wiki/DeviceOptions)
* [Compilation Methods](https://github.com/ElegantLaTeX/ElegantBook/wiki/CompilationMethods)
* [Languages](https://github.com/ElegantLaTeX/ElegantBook/wiki/Languages)
* [Color Themes](https://github.com/ElegantLaTeX/ElegantBook/wiki/ColorThemes)
* [Languages](https://github.com/ElegantLaTeX/ElegantBook/wiki/Languages)
* [Compilation Methods](https://github.com/ElegantLaTeX/ElegantBook/wiki/CompilationMethods)
* [Display Styles](https://github.com/ElegantLaTeX/ElegantBook/wiki/DisplayStyles)
* [Theorem Class Environments](https://github.com/ElegantLaTeX/ElegantBook/wiki/TheoremClassEnvironments)
* [Cover and Logo](https://github.com/ElegantLaTeX/ElegantBook/wiki/CoverLogo)
* [Lists](https://github.com/ElegantLaTeX/ElegantBook/wiki/Lists)
* [Bibliography](https://github.com/ElegantLaTeX/ElegantBook/wiki/Bibliography)
* [Preface](https://github.com/ElegantLaTeX/ElegantBook/wiki/Preface)
* [Minimal Example](https://github.com/ElegantLaTeX/ElegantBook/wiki/MinimalExample)
* Author
* [Github](https://github.com/EthanDeng)
@@ -37,7 +41,7 @@
## Links/相关链接
* [Github](https://github.com/ElegantLaTeX/ElegantBook)
* [CTAN](https://ctan.org/pkg/elegantnote)
* [CTAN](https://ctan.org/pkg/elegantbook)
* [Email](mailto:elegantlatex2e@gmail.com)
* [Issues](https://github.com/ElegantLaTeX/ElegantBook/issues/new)
* [Pull Request](https://github.com/ElegantLaTeX/ElegantBook/compare)

@@ -24,13 +24,13 @@ The content of theorem.
用时所用到的标签,交叉引用的方法为 `\ref{thm:label}`。请注意,交叉引用时必
须加上前缀 `thm`:。其他相同用法的定理类环境有:
| 环境名 | 标签名 | 前缀 | 交叉引用 | |
|-------------|--------|------|-------------------|---|
| definition | label | def | `\ref{def:label}` | |
| theorem | label | thm | `\ref{thm:label}` | |
| lemma | label | lem | `\ref{lem:label}` | |
| corrlary | label | cor | `\ref{cor:label}` | |
| proposition | label | pro | `\ref{pro:label}` | |
| 环境名 | 标签名 | 前缀 | 交叉引用 |
|-------------|--------|------|-------------------|
| definition | label | def | `\ref{def:label}` |
| theorem | label | thm | `\ref{thm:label}` |
| lemma | label | lem | `\ref{lem:label}` |
| corrlary | label | cor | `\ref{cor:label}` |
| proposition | label | pro | `\ref{pro:label}` |
## 其他数学环境的使用

@@ -2,7 +2,6 @@
景。封面图片的尺寸为 1280*1024, 更换图片的时候请 __严格__ 按照封面图片尺寸进
行裁剪。推荐一个免费的在线图片裁剪网站 [befunky.com](https://www.befunky.com/create/crop-photo/)。
本文用到的 Logo 比例为 1:1也即正方形图片在更换图片的时候请选择合
适的图片进行替换。
本文用到的 Logo 比例为 1:1也即正方形图片在更换图片的时候请选择合适的图片进行替换。
<a name="myfootnote1">1</a>: 感谢 ChinaTEX 提供免费图源网站,另外还推荐 [pexels.com](https://www.pexels.com/)。