1
1
%!TEX program = xelatex
2
2
% 完整编译: xelatex -> bibtex -> xelatex -> xelatex
3
- \documentclass [lang=cn,11pt,a4paper ]{elegantpaper }
3
+ \documentclass [lang=cn,11pt,a4paper,cite=authoryear ]{elegantpaper }
4
4
5
5
\title {ElegantPaper: 一个优美的 \LaTeX {} 工作论文模板}
6
6
\author {Ethan DENG \\ Fudan University \and Dongsheng DENG \\ PA Technology}
7
7
\institute {\href {https://elegantlatex.org/}{Elegant\LaTeX {} 项目组}}
8
8
9
- \version {0.08 }
9
+ \version {0.09 }
10
10
\date {\zhtoday }
11
11
12
- \usepackage {appendix }
13
- \renewcommand {\appendixtocname }{附录}
14
- \renewcommand {\appendixpagename }{附录}
12
+
13
+ % 本文档命令
14
+ \usepackage {array }
15
+ \newcommand {\ccr }[1]{\makecell {{\color {#1}\rule {1cm}{1cm}}}}
16
+
15
17
\begin {document }
16
18
17
19
\maketitle
18
20
19
21
\begin {abstract }
20
- 本文为 \href {https://github.com/ElegantLaTeX/ElegantPaper/}{ElegantPaper} 的说明文档。此模板基于 \LaTeX {} 的 article 类,专为工作论文写作而设计。设计这个模板的初衷是让作者不用关心工作论文的格式,专心写作,从而有更加舒心的写作体验。如果你有其他问题、建议或者报告 bug,可以在 \href {https://github.com/ElegantLaTeX/ElegantPaper/issues}{Github ::ElegantPaper/issues} 留言。如果你想了解更多 Elegant\LaTeX {} 项目组设计的模板,请访问 \href {https://github.com/ElegantLaTeX/}{Github ::ElegantLaTeX}。
22
+ 本文为 \href {https://github.com/ElegantLaTeX/ElegantPaper/}{ElegantPaper} 的说明文档。此模板基于 \LaTeX {} 的 article 类,专为工作论文写作而设计。设计这个模板的初衷是让作者不用关心工作论文的格式,专心写作,从而有更加舒心的写作体验。如果你有其他问题、建议或者报告 bug,可以在 \href {https://github.com/ElegantLaTeX/ElegantPaper/issues}{GitHub ::ElegantPaper/issues} 留言。如果你想了解更多 Elegant\LaTeX {} 项目组设计的模板,请访问 \href {https://github.com/ElegantLaTeX/}{GitHub ::ElegantLaTeX}。
21
23
\keywords {Elegant\LaTeX {},工作论文,模板}
22
24
\end {abstract }
23
25
@@ -48,12 +50,49 @@ \subsection{全局选项}
48
50
\usepackage[UTF8,scheme=plain]{ctex}
49
51
\end {lstlisting }
50
52
51
- \subsection {英文与数学字体 }
53
+ \subsection {数学字体选项 }
54
+
55
+ 本模板定义了一个数学字体选项(\lstinline {math}),可选项有三个:
56
+ \begin {enumerate }
57
+ \item \lstinline {math=cm}(默认),使用 \LaTeX {} 默认数学字体(推荐,无需声明);
58
+ \item \lstinline {math=newtx},使用 \lstinline {newtxmath} 设置数学字体(潜在问题比较多)。
59
+ \item \lstinline {math=mtpro2},使用 \lstinline {mtpro2} 宏包设置数学字体,要求用户已经成功安装此宏包。
60
+ \end {enumerate }
61
+
62
+ \subsection {中文字体选项 }
63
+ 模板提供中文字体选项 \lstinline {chinesefont},可选项有
64
+ \begin {enumerate }
65
+ \item \lstinline {ctexfont}:默认选项,使用 \lstinline {ctex} 宏包根据系统自行选择字体,可能存在字体缺失的问题,更多内容参考 \lstinline {ctex} 宏包\href {https://ctan.org/pkg/ctex}{官方文档}\footnote {可以使用命令提示符,输入 \lstinline {texdoc ctex} 调出本地 \lstinline {ctex} 宏包文档}。
66
+ \item \lstinline {founder}:方正字体选项,调用 \lstinline {ctex} 宏包并且使用 \lstinline {fontset=none} 选项,然后设置字体为方正四款免费字体,方正字体下载注意事项见后文。
67
+ \item \lstinline {nofont}:调用 \lstinline {ctex} 宏包并且使用 \lstinline {fontset=none} 选项,不设定中文字体,用户可以自行设置中文字体,具体见后文。
68
+ \end {enumerate }
69
+
70
+ \noindent \textbf {注意: } 使用 \lstinline {founder} 选项或者 \lstinline {nofont} 时,必须使用 \hologo {XeLaTeX} 进行编译。
71
+
72
+ \subsubsection {方正字体选项 }
73
+ 由于使用 \lstinline {ctex} 宏包默认调用系统已有的字体,部分系统字体缺失严重,因此,用户希望能够使用其它字体,我们推荐使用方正字体。方正的 {\songti 方正书宋}、{\heiti 方正黑体}、{\kaishu 方正楷体}、{\fangsong 方正仿宋}四款字体均可免费试用,且可用于商业用途。用户可以自行从\href {http://www.foundertype.com/}{方正字体官网}下载此四款字体,在下载的时候请\textbf {务必 }注意选择 GBK 字符集,也可以使用 \href {https://www.latexstudio.net/}{\LaTeX {} 工作室}提供的\href {https://pan.baidu.com/s/1BgbQM7LoinY7m8yeP25Y7Q}{方正字体,提取码为:njy9} 进行安装。安装时,{\kaishu Win 10 用户请右键选择为全部用户安装,否则会找不到字体。}
74
+
75
+ \begin {figure }[!htb]
76
+ \centering
77
+ \includegraphics [width=0.9\textwidth ]{founder.png}
78
+ \end {figure }
79
+
80
+ \subsubsection {其他中文字体 }
81
+ 如果你想完全自定义字体\footnote {这里仍然以方正字体为例。},你可以选择 \lstinline {chinesefont=nofont},然后在导言区设置
82
+ \ begin{lstlisting}
83
+ \setCJKmainfont[BoldFont={FZHei-B01},ItalicFont={FZKai-Z03}]{FZShuSong-Z01}
84
+ \setCJKsansfont[BoldFont={FZHei-B01},ItalicFont={FZHei-B01}]{FZHei-B01}
85
+ \setCJKmonofont[BoldFont={FZHei-B01},ItalicFont={FZHei-B01}]{FZFangSong-Z02}
86
+ \setCJKfamilyfont{zhsong}{FZShuSong-Z01}
87
+ \setCJKfamilyfont{zhhei}{FZHei-B01}
88
+ \setCJKfamilyfont{zhkai}{FZKai-Z03}
89
+ \setCJKfamilyfont{zhfs}{FZFangSong-Z02}
90
+ \newcommand*{\songti}{\CJKfamily{zhsong}}
91
+ \newcommand*{\heiti}{\CJKfamily{zhhei}}
92
+ \newcommand*{\kaishu}{\CJKfamily{zhkai}}
93
+ \newcommand*{\fangsong}{\CJKfamily{zhfs}}
94
+ \end {lstlisting }
52
95
53
- 本模板使用 \lstinline {newtxtext} 和 \lstinline {newtxmath} 分别设置全文的英文文本字体和数学字体。数学字体的效果如下:
54
- \begin {equation }
55
- (a+3b)^{n} = \sum _{k=0}^{n} C_{n}^{k} a^{n-k} (3b)^k\label {eq:binom }
56
- \end {equation }
57
96
58
97
\subsection {自定义命令 }
59
98
此模板并没有修改任何默认的 \LaTeX {} 命令或者环境\footnote {目的是保证代码的可复用性,请用户关注内容,不要太在意格式,这才是本工作论文模板的意义。}。另外,我自定义了 4 个命令:
@@ -85,17 +124,15 @@ \section{协作人员招募}
85
124
目前 ElegantLaTeX 共有 4 名协作人员,分别是
86
125
\begin {itemize }
87
126
\item 官方文档翻译: \href {https://github.com/peggy2006xzyz}{YPY};
88
- \item Github 维基维护: \href {https://github.com/izinngo}{Ingo Zinngo}、\href {https://github.com/xiaohao890809}{追寻原风景};
127
+ \item GitHub 维基维护: \href {https://github.com/izinngo}{Ingo Zinngo}、\href {https://github.com/xiaohao890809}{追寻原风景};
89
128
\item QQ 群管理员: \href {https://github.com/sikouhjw}{Sikouhjw}.
90
129
\end {itemize }
91
130
92
131
在此感谢他们无私的奉献!
93
132
94
133
95
134
\section {致谢 }
96
- 截止到 2019 年 10 月 17 日,ElegantPaper v0.08 版本发布,ElegantPaper 模板在 Github 上的收藏数(star)达到了 164。在此特别感谢 China\TeX {} 以及 \href {http://www.latexstudio.net/}{\LaTeX {} 工作室}对于本系列模板的大力宣传与推广。
97
-
98
- 如果你喜欢我们的模板,你可以在 Github 上收藏(Star)我们的模板。
135
+ 截止到 2020 年 04 月 12 日,ElegantPaper v0.09 版本发布,ElegantPaper 模板在 GitHub 上的收藏数(star)达到了 277。在此特别感谢 China\TeX {} 以及 \href {http://www.latexstudio.net/}{\LaTeX {} 工作室}对于本系列模板的大力宣传与推广。如果你喜欢我们的模板,你可以在 GitHub 上收藏(Star)我们的模板。
99
136
\begin {figure }[htbp]
100
137
\centering
101
138
\includegraphics [width=\textwidth ]{star.png}
@@ -112,26 +149,45 @@ \section{捐赠}
112
149
113
150
\textbf {赞赏费用的使用解释权归 Elegant\LaTeX {} 所有,并且不接受监督,请自愿理性打赏 }。10 元以上的赞赏,我们将列入捐赠榜,谢谢各位金主!
114
151
115
- \begin {table }[!htbp]
152
+
153
+ \begin {table }[!htb]
116
154
\centering
117
155
\caption {Elegant\LaTeX {} 系列模板捐赠榜}
118
- \begin {tabular }{crcc}
119
- \toprule
120
- 捐赠者 & 金额 & 时间 & 渠道 \\
121
- \midrule
122
- Lerh & 10 元 & 2019/05/15 & 微信 \\
123
- 越过地平线 & 10 元 & 2019/05/15 & 微信 \\
124
- 大熊 & 20 元 & 2019/05/27 & 微信 \\
125
- * 空 & 10 元 & 2019/05/30 & 微信\\
126
- \href {http://www.latexstudio.net/}{latexstudio.net} & 666 元 & 2019/06/05 & 支付宝\\
127
- Cassis & 11 元 & 2019/06/30 & 微信\\
128
- * 君 & 10 元 & 2019/07/23 & 微信\\
129
- * 萌 & 19 元 & 2019/08/28 & 微信 \\
130
- 曲豆豆 & 10 元 & 2019/08/28 & 微信 \\
131
- 李博 & 100 元 & 2019/10/06 & 微信\\
132
- Njustsll & 10 元 & 2019/10/11 & 微信 \\
133
- \bottomrule
134
- \end {tabular }%
156
+ \begin {tabular }{*{4}{>{\scriptsize }c}|*{4}{>{\scriptsize }c}}
157
+ \hline
158
+ \textbf {捐赠者 } & \textbf {金额 } & \textbf {时间 } & \textbf {渠道 } & \textbf {捐赠者 } & \textbf {金额 } & \textbf {时间 } & \textbf {渠道 } \\
159
+ \hline
160
+ Lerh & 10 RMB & 2019/05/15 & 微信 & 越过地平线 & 10 RMB & 2019/05/15 & 微信 \\
161
+ 银桑 & 20 RMB & 2019/05/27 & 微信 & *空 & 10 RMB & 2019/05/30 & 微信 \\
162
+ latexstudio.net & 666 RMB & 2019/06/05 & 支付宝 & A*n & 40 RMB & 2019/06/15 & 微信 \\
163
+ * 夏 & 22 RMB & 2019/06/15 & 微信 & * 倩 & 21 RMB & 2019/06/15 & 微信 \\
164
+ Cassis & 11 RMB & 2019/06/30 & 微信 & *君 & 10 RMB & 2019/07/23 & 微信 \\
165
+ P*u & 50 RMB & 2019/07/30 & 微信 & *萌 & 19 RMB & 2019/08/28 & 微信 \\
166
+ 曲豆豆 & 10 RMB & 2019/08/28 & 微信 & 李博 & 100 RMB & 2019/10/06 & 微信 \\
167
+ Njustsll & 10 RMB & 2019/10/11 & 微信 & 刘志阔 & 99.99 RMB & 2019/10/15 & 支付宝 \\
168
+ * 韬 & 16 RMB & 2019/10/17 & 微信 & 赤霓 & 12 RMB & 2019/10/17 & 支付宝 \\
169
+ 追寻原风景 & 10 RMB & 2019/10/28 & 微信 & 郭德良 & 88 RMB & 2019/11/03 & 微信 \\
170
+ 自强不息 & 20 RMB & 2019/11/04 & 支付宝 & 读书之虫 & 20 RMB & 2019/11/18 & 微信 \\
171
+ *等 & 10 RMB & 2019/11/18 & 微信 & *哲 & 20 RMB & 2019/11/18 & 微信 \\
172
+ 佚名 & 10 RMB & 2019/11/24 & 微信 & Jiye Qian & 66 RMB & 2019/12/04 & 微信 \\
173
+ * 阳 & 20 RMB & 2019/12/05 & 微信 & Catcher & 11 RMB & 2019/12/08 & 支付宝 \\
174
+ 希尔波特门徒 & 10 RMB & 2019/12/09 & 支付宝 & * 伟 & 10 RMB & 2019/12/09 & 微信 \\
175
+ Simon & 20 RMB & 2019/12/11 & 支付宝 & 流殇丶浅忆 & 66.60 RMB & 2019/12/18 & 支付宝 \\
176
+ 羽 & 10 RMB & 2019/12/20 & 支付宝 & * 琛 & 15 RMB & 2019/12/20 & 微信 \\
177
+ 随风 & 20 RMB & 2019/12/27 & 支付宝 & Ws & 23.30 RMB & 2019/12/28 & 微信 \\
178
+ 初八 & 100 RMB & 2020/01/02 & 支付宝 & p*e & 20 RMB & 2020/01/03 & 微信 \\
179
+ Shunmx & 100 RMB & 2020/01/03 & 微信 & hj & 10 RMB & 2020/01/03 & 微信 \\
180
+ F*5 & 10 RMB & 2020/01/03 & 微信 & S*m & 20.20 RMB & 2020/01/03 & 微信 \\
181
+ 二代青雉 & 13 RMB & 2020/01/14 & 支付宝 & *? & 66 RMB & 2020/01/15 & 微信 \\
182
+ Mr. Xiong & 20 RMB & 2020/01/17 & 微信 & *博 & 15 RMB & 2020/01/18 & 微信 \\
183
+ * 者 & 10 RMB & 2020/02/02 & 微信 & Jackie & 88.80 RMB & 2020/02/09 & 微信 \\
184
+ Henry\_ Sun、 & 50 RMB & 2020/02/14 & 支付宝 & * 桥 & 50 RMB & 2020/02/21 & 微信 \\
185
+ 昀琏 & 10 RMB & 2020/03/02 & 支付宝 & S*y & 10 RMB & 2020/03/15 & 微信 \\
186
+ * 哥 & 66.66 RMB & 2020/03/17 & 微信 & K*e & 30 RMB & 2020/03/30 & 微信\\
187
+ * 阳 & 20 RMB & 2020/04/02 & 微信 & 士*n & 30 RMB & 2020/04/11 & 微信 \\
188
+ \hline
189
+ \end {tabular }%
190
+ \label {tab:donation }%
135
191
\end {table }%
136
192
137
193
\section {常见问题 FAQ }
@@ -148,7 +204,7 @@ \section{常见问题 FAQ}
148
204
\author {author 1\\ org. 1 \and author 2 \\ org. 2 }
149
205
\end {lstlisting}
150
206
\item \textit {如何添加中英文摘要? }\\
151
- 请参考 \href {https://github.com/ElegantLaTeX/ElegantPaper/issues/5}{Github ::ElegantPaper/issues/5}
207
+ 请参考 \href {https://github.com/ElegantLaTeX/ElegantPaper/issues/5}{GitHub ::ElegantPaper/issues/5}
152
208
\end {enumerate }
153
209
154
210
\section {示例 }
@@ -160,44 +216,55 @@ \section{示例}
160
216
\item \href {https://github.com/EthanDeng/risk-awareness}{互联网金融风险与投资者风险意识 —— 来自网贷平台交易数据的证据}。
161
217
\end {enumerate }
162
218
163
- 这是一个最小示例文档(Minimal Example):
164
- \ begin{lstlisting}
165
- \documentclass[lang=cn,a4paper,11pt]{elegantpaper}
166
-
167
- % title information
168
- \title{Working Paper Example}
169
- \author{Author Name}
170
- \institute{Elegant\LaTeX{} Group}
171
219
172
- \version{1.00 }
173
- \date{\today }
220
+ \nocite {* }
221
+ \bibliography {wpref }
174
222
175
- \begin{document}
223
+ \appendix
224
+ % \appendixpage
225
+ \addappheadtotoc
226
+ \section {使用 newtx 系列字体 }
176
227
177
- \maketitle
228
+ 如果需要使用原先版本的 \lstinline { newtx} 系列字体,可以通过显示声明数学字体:
178
229
179
- \begin{abstract}
180
- Your abstract goes here.
181
- \keywords{keyword1, keyword2}
182
- \end{abstract}
230
+ \ begin{lstlisting}
231
+ \documentclass[math=newtx]{elegantbook}
232
+ \end {lstlisting }
183
233
184
- \section{Introduction}
185
- The content of introduction section.
234
+ \subsection {连字符 }
186
235
187
- \section{Conclusion}
188
- The content of conclusion section.
236
+ 如果使用 \lstinline {newtx} 系列字体宏包,需要注意下连字符的问题。
237
+ \begin {equation }
238
+ \int _{R^q} f(x,y) dy.\emph {of\kern 0pt f }
239
+ \end {equation }
240
+ 的代码为
241
+ \ begin{lstlisting}
242
+ \begin{equation}
243
+ \int_{R^q} f(x,y) dy.\emph{of \kern0pt f}
244
+ \end{equation}
245
+ \end {lstlisting }
189
246
190
- \bibliography{wpref }
247
+ \subsection { 宏包冲突 }
191
248
192
- \end{document}
249
+ 另外在 ElegantBook 模板中,有用户反馈模板在使用 \lstinline {yhmath} 以及 \lstinline {esvect} 等宏包时会报错:
250
+ \ begin{lstlisting}
251
+ LaTeX Error:
252
+ Too many symbol fonts declared.
193
253
\end {lstlisting }
194
254
195
- \nocite {*}
196
- \bibliography {wpref}
255
+ 原因是在使用 \lstinline {newtxmath} 宏包时,重新定义了数学字体用于大型操作符,达到了 {\heiti 最多 16 个数学字体} 的上限,在调用其他宏包的时候,无法新增数学字体。为了减少调用非常用宏包,在此给出如何调用 \lstinline {yhmath} 以及 \lstinline {esvect} 宏包的方法。
256
+
257
+ 请在 \lstinline {elegantpaper.cls} 内搜索 \lstinline {yhmath} 或者 \lstinline {esvect},将你所需要的宏包加载语句\textit {取消注释}即可。
258
+ \ begin{lstlisting}
259
+ %%% use yhmath pkg, uncomment following code
260
+ % \let\oldwidering\widering
261
+ % \let\widering\undefined
262
+ % \RequirePackage{yhmath}
263
+ % \let\widering\oldwidering
264
+
265
+ %%% use esvect pkg, uncomment following code
266
+ % \RequirePackage{esvect}
267
+ \end {lstlisting }
197
268
198
- \appendix
199
- \appendixpage
200
- \addappheadtotoc
201
- \section {How I became inspired }
202
269
203
270
\end {document }
0 commit comments