什么是 TeX ?

TeX,在系统内程式化为T E X,是一个排版系统,由计算机科学家和斯坦福大学教授Donald Knuth [1]设计和编写,并于 1978 年首次发布。TeX 是一种排版复杂数学公式的流行方法;它被认为是最复杂的数字印刷系统之一。

TeX 的设计有两个主要目标:允许任何人以最小的努力制作高质量的书籍,并提供一个系统,可以在任何时间点在所有计算机上给出完全相同的结果(连同Metafont语言用于字体描述和计算机现代字体系列)。[3] TeX 是自由软件,这使得它可供广泛的用户使用。


MiKTeX是一种Microsoft Windows系统上运行的文字处理系统,由Christian Schenk开发。

MiKTeX 是适用于 Windows、Linux 和 macOS 的现代 TeX 发行版。


什么是TeX live?


什么是 TeXstudio ?

TeXstudio 是一个用于创建 LaTeX 文档的集成编写环境。我们的目标是让编写 LaTeX 尽可能简单和舒适。因此 TeXstudio 具有许多功能,如语法高亮、集成查看器、引用检查和各种助手。




%!TEX program = xelatex


%!TEX program = xelatex

\title{ElegantPaper: An Elegant \LaTeX{11} Template for Working Paper}
\author{\href{}{Dongsheng Deng} %
\thanks{Thank Peiyi Yao for good suggestions.} \\[0.5ex] %
Elegant\LaTeX{} Group}
\date{\small\itshape Version: 0.01 \\ Last update: \today}



This paper illustrates the usage of the ElegantPaper template, which is designed for writing working paper. This template is based on the standard \LaTeX{} article class. The goal of this template is to make the writing process easier and more comfortable. You can get rid of all the worries about format. Just enjoy it, if you have any questions or suggestions, please contact me at: \email{}.


This template is based on the standard \LaTeX{} article class, which means you can pass the arguments of article class to it (\verb|a4paper|, \verb|12pt| and etc.).

\subsection{Font Settings}
I change the default article font computer modern to \verb|newtx| series, and the default font size is set to \verb|11pt|.

\item \verb|newtxtext| package for text font, similar to times new roman font.
\item \verb|newtxmath| package for math font, close to \verb|times| and \verb|mtpro2| packages.
\item \verb|newtxtt| package for typewriter font, with option \verb|scale = 0.8|.

These packages operate perfectly but are inappropriate for big operators, for example \verb|\sum| and \verb|\prod|, thus, I change these operators back to computer modern font. Equation~\eqref{eq:binom} shows the effects of these fonts:
(a+b)^{n} = \sum_{k=0}^{n} C_{n}^{k} a^{n-k} b^k \label{eq:binom}

The \verb|\linespread| (controls line spacing) is set to 1.3, and I use \verb|microtype| to improve the font justification. \verb|type1cm| package is used to remove the font shape and font size warning messages.

\subsection{Custom Commands}

I don't change any default command or environment, which means you can use all the basic \LaTeX{} commands and environments as before. Besides, I define 3 commands
\item \verb|\email{#1}|: create the hyperlink to email address.
\item \verb|\figref{#1}|: same usage as \verb|\ref{#1}|, but start with label text <\textbf{Figure n}>.
\item \verb|\tabref{#1}|: same usage as \verb|\ref{#1}|, but start with label text <\textbf{Table n}>.

\subsection{List Environments}
When you are using \verb|itemize|, \verb|enumerate|, or \verb|description| environment, please add the \verb|noitemsep| option to these environments. For example, \\

\item Routing and resource discovery;
\item Resilient and scalable networks;
\item Distributed storage and search.
\item Routing and resource discovery;
\item Resilient and scalable computer networks;
\item Distributed storage and search.

I strongly recommend you to use the \verb|booktabs| package in your paper. It adds three commands to make the table prettier, ie. \verb|\toprule|, \verb|\midrule| and \verb|\bottomrule|. Here is an example.

\caption{Regression Result Example}
& \multicolumn{1}{c}{(1)} & \multicolumn{1}{c}{(2)} \\
& \multicolumn{1}{c}{price} & \multicolumn{1}{c}{price} \\
mpg & \multicolumn{1}{c}{-238.9***} & \multicolumn{1}{c}{-49.51} \\
& \multicolumn{1}{c}{(53.08)} & \multicolumn{1}{c}{(86.16)} \\
weight & \multicolumn{1}{c}{} & \multicolumn{1}{c}{1.747***} \\
& \multicolumn{1}{c}{} & \multicolumn{1}{c}{(0.641)} \\
constant & \multicolumn{1}{c}{11,253***} & \multicolumn{1}{c}{1,946} \\
& \multicolumn{1}{c}{(1,171)} & \multicolumn{1}{c}{(3,597)} \\
observations & \multicolumn{1}{c}{74} & \multicolumn{1}{c}{74} \\
R-squared & \multicolumn{1}{c}{0.220} & \multicolumn{1}{c}{0.293} \\
\multicolumn{3}{l}{\scriptsize Standard errors in parentheses} \\
\multicolumn{3}{l}{\scriptsize *** p<0.01, ** p<0.05, * p<0.1} \\

To include a graphic, you can use figure environment as usual. \figref{fig:mpg} shows the effect. You can put all your images in the sub directories (\verb|./image/|, \verb|./img/|, \verb|./figure/|, \verb|./fig/|) of your current working directory.

\caption{The Relationship between MPG and Weight\label{fig:mpg}}
\caption{The Relationship between MPG and Weight\label{fig:mpg}}

This template uses Bib\TeX{} to generate the bibliography, the default bibliography style is \verb|aer|. ~\cite{Chen2018} use data from a major peer-to-peer lending marketplace in China to study whether female and male investors evaluate loan performance differently. You can add bib items (from Google Scholar, Mendeley, EndNote, and etc.) to \verb|wp_ref.bib| file, and cite the bibkey in the \verb|tex| file.





参考 :