Skip to content

Commit 0351167

Browse files
committed
v0.03
1 parent 8242ffe commit 0351167

File tree

6 files changed

+34
-36
lines changed

6 files changed

+34
-36
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ ElegantPaper is designed for writing a working paper, especially for economics s
88
other templates designed by ElegantLATEX Group? Please visit: [ElegantLaTeX Resource](https://ddswhu.me/resource/).
99

1010

11-
此模板基于 LaTeX 的 article 类,专为工作论文写作而设计。设计这个模板的初衷是让作者不用关心工作论文的格式,专心写作,从而有更加舒适,简便的写作体验。我是 ddswhu,如果你有其他问题或者建议,请联系我,我的邮箱是:ddswhu@outlook.com。如果你想了解更多由 ElegantLATEX 项目组设计的模板,请访问 [ElegantLaTeX 资源中心](https://ddswhu.me/resource/)
11+
此模板基于 LaTeX 的 article 类,专为工作论文写作而设计。设计这个模板的初衷是让作者不用关心工作论文的格式,专心写作,从而有更加舒适,简便的写作体验。我是 ddswhu,如果你有其他问题或者建议,请联系我,我的邮箱是:ddswhu@outlook.com。如果你想了解更多由 ElegantLaTeX 项目组设计的模板,请访问 [ElegantLaTeX 资源中心](https://ddswhu.me/resource/)
1212

1313
This work is released under the LaTeX Project Public License, v1.3c or later.

elegantpaper-cn.pdf

12 KB
Binary file not shown.

elegantpaper-cn.tex

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
\author{\href{https://ddswhu.me/}{邓 东 升}}
66

77
\institute{Elegant\LaTeX{} 项目组}
8-
\version{0.02}
8+
\version{0.03}
99
\date{\today}
1010

1111

@@ -16,32 +16,31 @@
1616
\maketitle
1717

1818
\begin{abstract}
19-
\noindent \itshape 本文为 ElegantPaper 的说明文档(中文)。此模板基于 \LaTeX{} 的 article 类,专为工作论文写作而设计。设计这个模板的初衷是让作者不用关心工作论文的格式,专心写作,从而有更加舒适,简便的写作体验。如果你有其他问题或者建议,请联系我,我的邮箱是:\email{ddswhu@outlook.com}。如果你想了解更多由 Elegant\LaTeX{} 项目组设计的模板,请访问 \href{https://ddswhu.me/resource/}{Elegant\LaTeX{} 资源中心}。
19+
\noindent \sffamily 本文为 ElegantPaper 的说明文档(中文)。此模板基于 \LaTeX{} 的 article 类,专为工作论文写作而设计。设计这个模板的初衷是让作者不用关心工作论文的格式,专心写作,从而有更加舒适,简便的写作体验。如果你有其他问题或者建议,请联系我,我的邮箱是:\email{ddswhu@outlook.com}。如果你想了解更多由 Elegant\LaTeX{} 项目组设计的模板,请访问 \href{https://ddswhu.me/resource/}{Elegant\LaTeX{} 资源中心}。
2020
\end{abstract}
2121

2222
\section{模板介绍}
2323

24-
此模板是基于 \LaTeX{} 的标准文档类设计,也即意味着你可以在在文类选项使用文档(article)类型的选项,比如 \texttt{a4paper, 12pt} 等等。本模板支持 \lstinline{pdflatex} 和 \lstinline{xelatex} 两种编译方式。
24+
此模板是基于 \LaTeX{} 的标准文档类设计,也即意味着你可以在在文类选项使用文档(article)类型的选项,比如 \texttt{a4paper, 12pt} 等等。本模板支持 \lstinline{PDFLaTeX} 和 \lstinline{XeLaTeX} 两种编译方式。
2525

2626
\subsection{全局选项}
27-
我在这个模板中定义了一个语言选项 \lstinline{lang},可以选择英文模式 \lstinline{lange=en}(默认)或者中文模式 \lstinline{lang=cn}。当选择中文模式时,图表的标题引导词以及参考文献,定理引导词等信息会变成中文。你可以通过下面两种方式来选择语言模式:
28-
27+
我在这个模板中定义了一个语言选项 \lstinline{lang},可以选择英文模式 \lstinline{lang=en}(默认)或者中文模式 \lstinline{lang=cn}。当选择中文模式时,图表的标题引导词以及参考文献,定理引导词等信息会变成中文。你可以通过下面两种方式来选择语言模式:
2928
\begin{lstlisting}
3029
\documentclass[lang=cn]{elegantpaper}
3130
\documentclass{cn}{elegantpaper} % 两者皆可
3231
\end{lstlisting}
3332

3433
\subsection{字体设置}
35-
\noindent\textbf{选择 PDFLaTeX 编译:} 如果你使用 PDFLaTeX 编译,默认的 Computer Modern 字体被换成了 \lstinline{newtx} 系列字体,默认的字体字号是 11 pt。关于字体设置的宏包主要用到了
36-
34+
\subsubsection{选择 \lstinline{PDFLaTeX} 编译}
35+
如果你使用 \lstinline{PDFLaTeX} 编译,默认的 Computer Modern 字体被换成了 \lstinline{newtx} 系列字体,默认的字体字号是 11 pt。关于字体设置的宏包主要用到了:
3736
\begin{itemize}
3837
\item \lstinline{newtxtext} 用于文档正文字体,类似于 Times New Roman 字体。
3938
\item \lstinline{newtxmath} 用于数学字体,搭配 \lstinline{newtx} 非常合适,类似于过时的 \lstinline{times} 宏包的效果。
4039
\item \lstinline{newtxtt} 用于打字机字体, 并使用了 \lstinline{scale=0.8} 选项缩放字体。
4140
\item \lstinline{ctex} 用于中文字体设置,并使用了 \lstinline{scheme=plain} 选项。
4241
\end{itemize}
4342

44-
\noindent\textbf{选择 XeLaTeX 编译}
43+
\subsubsection{选择 \lstinline{XeLaTeX} 编译}
4544
如果你选择 \lstinline{XeLaTeX} 编译的话,那么设置字体的宏包为 \lstinline{fontspec} 和 \lstinline{xeCJK}。由于模板中使用的字体是 Windows 中的字体,所以如果你使用其他操作系统,比如 Linux 或者 Mac OS,那么你需要把所用字体替换为你系统中的字体。设置字体的命令:
4645

4746
\begin{lstlisting}
@@ -59,27 +58,29 @@ \subsection{字体设置}
5958
\DeclareSymbolFont{operators}{\encodingdefault}{\familydefault}{m}{n}
6059
\end{lstlisting}
6160

61+
\subsubsection{其他设置}
62+
6263
这几个包由于都是一个系列的,字体搭配起来非常合适,字体宽度非常契合!唯独数学字体中的大型运算符,比如求和符号和积分符号不是很好看,为此,我把它们又改回了原先的字体效果。公式~(\ref{eq:binom}) 展示了最终的数学字体的效果。
6364
\begin{equation}
6465
(a+3b)^{n} = \sum_{k=0}^{n} C_{n}^{k} a^{n-k} (3b)^k \label{eq:binom}
6566
\end{equation}
6667

67-
我把行距设定为 1.3,并且使用了 \lstinline{microtype} 包调整字体的间距,为了去除字体字号,字形警告信息,我使用了 \lstinline{type1cm}。
68+
我把行距设定为 1.3,并且使用了 \lstinline{microtype} 宏包调整字体的间距,为了去除字体字号,字形警告信息,我使用了 \lstinline{type1cm} 宏包
6869

6970

7071
\subsection{自定义命令}
7172
在此模板中,并没有修改任何默认的命令或者环境,所以,你可以在此模板使用原来的命令和环境。另外,我自定义了 3 个命令:
7273

7374
\begin{enumerate}
7475
\item \lstinline{\email}: 创建邮箱地址的链接;
75-
\item \lstinline{\figref}: 用法和 \lstinline{\ref} 类似,但是会在插图的标题前添加 <\textbf{图 n}>
76-
\item \lstinline{\tabref}: 用法和 \lstinline{\ref} 类似,但是会在表格的标题前添加 <\textbf{表 n}>.
76+
\item \lstinline{\figref}: 用法和 \lstinline{\ref} 类似,但是会在插图的标题前添加 <\textbf{图 n}>
77+
\item \lstinline{\tabref}: 用法和 \lstinline{\ref} 类似,但是会在表格的标题前添加 <\textbf{表 n}>
7778
\end{enumerate}{}
7879

7980

8081

8182
\subsection{列表环境}
82-
你可以使用列表环境(\lstinline{itemize}、\lstinline{enumerate}、\lstinline{description},示例如下\\[2ex]
83+
你可以使用列表环境(\lstinline{itemize}、\lstinline{enumerate}、\lstinline{description},示例如下\\[2ex]
8384
\begin{minipage}[c]{0.51\linewidth}
8485
\begin{lstlisting}
8586
\begin{itemize}
@@ -179,13 +180,13 @@ \subsection{参考文献}
179180

180181

181182
\section{示例}
182-
在这部分,我们将给出一个示例文档
183+
在这部分,我提供一个示例文档
183184

184185
\begin{lstlisting}
185186
\documentclass[lang=cn]{elegantpaper}
186187

187188
% 标题信息
188-
\title[lang=en]{工作论文示例展示}
189+
\title{工作论文示例展示}
189190
\author{ddswhu}
190191
\institute{Elegant\LaTeX{} 项目组}
191192
\version{1.00}
@@ -200,12 +201,10 @@ \section{示例}
200201
\end{abstract}
201202

202203
\section{引言}
203-
204204
这一部分是引言的内容。
205205

206206
\section{结论}
207-
208-
这是结论部分
207+
这是结论部分。
209208

210209
% 在参考文献部分显示未引用的文献
211210
\nocite{ref1, ref2}

elegantpaper-en.pdf

20.9 KB
Binary file not shown.

elegantpaper-en.tex

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
%!TEX program = pdflatex
22
\documentclass[en]{elegantpaper}
33

4-
\title{ElegantPaper: An Elegant \LaTeX{} Template for Working Paper}
4+
\title{ElegantPaper: An Elegant \LaTeX{} Template for Working Papers}
55
\author{\href{https://ddswhu.me/}{Dongsheng Deng}}
66
\institute{Elegant\LaTeX{} Program}
7-
\version{0.02}
7+
\version{0.03}
88
\date{\today}
99

1010

@@ -13,12 +13,12 @@
1313
\maketitle
1414

1515
\begin{abstract}
16-
This paper illustrates the usage of the ElegantPaper template, which is designed for writing a 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 the format. Just enjoy it, if you have any questions or suggestions, please contact me at: \email{ddswhu@outlook.com}. Looking for other templates designed by Elegant\LaTeX{} Group? Please visit: \href{https://ddswhu.me/resource/}{Elegant\LaTeX{} Resource}.
16+
\sffamily This paper illustrates the usage of the ElegantPaper template, which is designed for writing a 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 the format. Just enjoy it, if you have any questions or suggestions, please contact me at: \email{ddswhu@outlook.com}. Looking for other templates designed by Elegant\LaTeX{} Group? Please visit: \href{https://ddswhu.me/resource/}{Elegant\LaTeX{} Resource}.
1717
\end{abstract}
1818

1919
\section{Introduction}
2020

21-
This template is based on the standard \LaTeX{} article class, which means you can pass the arguments of article class to it (\lstinline{a4paper}, \lstinline{12pt} and etc.). It supports different engines, You can choose either \lstinline{pdflatex} or \lstinline{xelatex}.
21+
This template is based on the standard \LaTeX{} article class, which means you can pass the arguments of article class to it (\lstinline{a4paper}, \lstinline{12pt} and etc.). It supports different engines, You can choose either \lstinline{PDFLaTeX} or \lstinline{XeLaTeX}.
2222

2323
\subsection{Global Options}
2424
I 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 caption of figure/table, abstract name, refname etc. Chinese, while \lstinline{lang=en} will keep all these stuff English, as the default article class sets. You can use this option as
@@ -29,16 +29,17 @@ \subsection{Global Options}
2929
\end{lstlisting}
3030

3131
\subsection{Font Settings}
32-
\noindent\textbf{Using PDFLaTeX:} If you choose PDFLaTeX to process your paper, the default article font computer modern has changed to \lstinline{newtx} series, and the default font size is set to \lstinline{11pt}.
33-
32+
\subsubsection{Compile with \lstinline{PDFLaTeX}}
33+
If you choose \lstinline{PDFLaTeX} to process your paper, the default article font computer modern has changed to \lstinline{newtx} series, and the default font size is set to \lstinline{11pt}. The fonts are settings with:
3434
\begin{itemize}
3535
\item \lstinline{newtxtext} package for text fonts, similar to times new roman font.
3636
\item \lstinline{newtxmath} package for math fonts, close to \lstinline{times} package.
3737
\item \lstinline{newtxtt} package for typewriter fonts, with option \lstinline{scale=0.8}.
3838
\item \lstinline{ctex} package for Chinese fonts, with option \lstinline{scheme=plain}.
3939
\end{itemize}
4040

41-
\noindent\textbf{Using XeLaTeX:} If you choose XeLaTeX to process your paper, I use \lstinline{fontspec} package and \lstinline{xeCJK} package. I used fonts available in Windows, if you are using Linux or Mac OS, please substitute these fonts with that of your system. The font setting part
41+
\subsubsection{Compile with \lstinline{XeLaTeX}}
42+
If you choose \lstinline{XeLaTeX} to process your paper, I use \lstinline{fontspec} package and \lstinline{xeCJK} package. I used fonts available in Windows, if you are using Linux or Mac OS, please substitute these fonts with that of your system. The font setting part
4243

4344
\begin{lstlisting}
4445
\RequirePackage{fontenc}
@@ -55,7 +56,7 @@ \subsection{Font Settings}
5556
\DeclareSymbolFont{operators}{\encodingdefault}{\familydefault}{m}{n}
5657
\end{lstlisting}
5758

58-
59+
\subsubsection{Other Settings}
5960
These packages operate perfectly but are inappropriate for big operators, for example \lstinline{\sum} and \lstinline{\prod}, thus, I change these operators back to computer modern font. Equation~(\eqref{eq:binom}) shows the effects of these fonts:
6061
\begin{equation}
6162
(a+3b)^{n} = \sum_{k=0}^{n} C_{n}^{k} a^{n-k} (3b)^k \label{eq:binom}
@@ -180,7 +181,7 @@ \section{A Minimal Example}
180181
\documentclass[lang=en]{elegantpaper}
181182

182183
% title information
183-
\title[lang=en]{A Working Paper Example}
184+
\title{A Working Paper Example}
184185
\author{ddswhu}
185186
\institute{Elegant\LaTeX{} Group}
186187
\version{1.00}
@@ -195,20 +196,18 @@ \section{A Minimal Example}
195196
\end{abstract}
196197

197198
\section{Introduction}
198-
199-
The text of introduction section.
199+
The content of introduction section.
200200

201201
\section{Conclusion}
202-
203-
The text of conclusion section.
202+
The content of conclusion section.
204203

205204
% include the noncited reference
206205
\nocite{ref1, ref2}
207206
\bibliography{wpref}
208207
\end{document}
209208
\end{lstlisting}
210209

211-
\nocite{EINAV2010,Havrylchyk2018}
210+
\nocite{EINAV2010, Havrylchyk2018}
212211
\bibliography{wpref}
213212

214213
\end{document}

elegantpaper.cls

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
% Current Version: 0.02
1+
% Current Version: 0.03
22
% Author: ddswhu
33
% Homepage: https://ddswhu.me/
44
% Email: ddswhu@outlook.com
55
% Lastest Version: https://github.com/EthanDeng/ElegantPaper
66

77
\NeedsTeXFormat{LaTeX2e}
8-
\ProvidesClass{elegantpaper}[2018/1/12 v0.02 ElegantLaTeX Paper class]
8+
\ProvidesClass{elegantpaper}[2018/1/13 v0.03 ElegantLaTeX Paper class]
99

1010
\LoadClass[11pt]{article}
1111

@@ -209,9 +209,9 @@
209209
breaklines=true,
210210
keywordstyle=\bf\color{winered}\ttfamily,
211211
commentstyle=\color{gray},
212-
emph={elegantpaper,fontenc,fontspec,xeCJK,xunicode,newtxmath,figure,fig,image,img,table,itemize,enumerate,newtxtext,newtxtt,ctex,microtype,description,times,newtx,booktabs,tabular},
212+
emph={elegantpaper,fontenc,fontspec,xeCJK,xunicode,newtxmath,figure,fig,image,img,table,itemize,enumerate,newtxtext,newtxtt,ctex,microtype,description,times,newtx,booktabs,tabular,PDFLaTeX,XeLaTeX,type1cm},
213213
emphstyle={\color{frenchplum}},
214-
morekeywords={DeclareSymbolFont,toprule,midrule,bottomrule,institute,version,includegraphics,setmainfont,setsansfont,setmonofont ,setCJKmainfont,setCJKsansfont,setCJKmonofont,RequirePackage,figref,tabref,email},
214+
morekeywords={DeclareSymbolFont,toprule,midrule,bottomrule,institute,version,includegraphics,setmainfont,setsansfont,setmonofont ,setCJKmainfont,setCJKsansfont,setCJKmonofont,RequirePackage,figref,tabref,email,maketitle},
215215
frame=none,
216216
tabsize=2,
217217
backgroundcolor=\color{lightgrey}

0 commit comments

Comments
 (0)