Skip to content

Commit

Permalink
update .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanDeng committed Oct 17, 2019
1 parent 9734a29 commit aa3f1fb
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 113 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*.cb
*.cb2
.*.lb
delete-temp-files.bat
elegantpaper-cn.pdf
elegantpaper-en.pdf

Expand Down
5 changes: 0 additions & 5 deletions delete-temp-files.bat

This file was deleted.

4 changes: 2 additions & 2 deletions elegantpaper-cn.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%!TEX program = xelatex
% 完整编译方法 1: pdflatex -> bibtex -> pdflatex -> pdflatex
% 完整编译方法 2: xelatex -> bibtex -> xelatex -> xelatex
\documentclass[lang=cn,11pt,authoryear,a4paper]{elegantpaper}
\documentclass[lang=cn,11pt,a4paper]{elegantpaper}

\title{ElegantPaper: 一个优美的 \LaTeX{} 工作论文模板}
\author{Ethan DENG \\ Fudan University \and Dongsheng DENG \\ PA Technology}
Expand Down Expand Up @@ -91,7 +91,7 @@ \section{协作人员招募}


\section{致谢}
截止到 2019 年 10 月 10 日,ElegantPaper v0.08 版本发布,ElegantPaper 模板在 Github 上的收藏数(star)达到了 157。在此特别感谢 China\TeX{} 以及 \href{http://www.latexstudio.net/}{\LaTeX{} 工作室}对于本系列模板的大力宣传与推广。
截止到 2019 年 10 月 17 日,ElegantPaper v0.08 版本发布,ElegantPaper 模板在 Github 上的收藏数(star)达到了 164。在此特别感谢 China\TeX{} 以及 \href{http://www.latexstudio.net/}{\LaTeX{} 工作室}对于本系列模板的大力宣传与推广。

如果你喜欢我们的模板,你可以在 Github 上收藏(Star)我们的模板。
\begin{figure}[htbp]
Expand Down
207 changes: 104 additions & 103 deletions elegantpaper-en.tex
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
%!TEX program = pdflatex
% Full chain: pdflatex -> bibtex -> pdflatex -> pdflatex
\documentclass[11pt,en]{elegantpaper}
\documentclass[11pt,en,authoryear]{elegantpaper}

\title{ElegantPaper: An Elegant \LaTeX{} Template for Working Papers}
\author{\href{https://ddswhu.me/}{Dongsheng Deng}}
\author{Ethan DENG \\ Fudan University \and Dongsheng DENG \\ PA Technology}
\institute{\href{https://github.com/ElegantLaTeX}{Elegant\LaTeX{} Program}}
\version{0.07}

\version{0.08}
\date{\today}


Expand All @@ -14,140 +15,142 @@
\maketitle

\begin{abstract}
This paper illustrates the usage of the \href{https://github.com/ElegantLaTeX/ElegantPaper}{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, suggestions or bug reports, you can visit \href{https://github.com/ElegantLaTeX/ElegantPaper/issues}{ElegantPaper/issues}. Looking for other templates designed by Elegant\LaTeX{} Group? Please visit: \href{https://github.com/ElegantLaTeX}{https://github.com/ElegantLaTeX}.\par
This documentation illustrates the usage of the \href{https://github.com/ElegantLaTeX/ElegantPaper}{ElegantPaper} template. This template is based on the standard \LaTeX{} article class, which is designed for working paper writing. With this template, you can get rid of all the worries about the format and merely focus on writing. For any question, please leave a message on \href{https://github.com/ElegantLaTeX/ElegantPaper/issues}{Github::ElegantPaper/issues}. Want to know more about Elegant\LaTeX{} Templates? Please visit: \href{https://github.com/ElegantLaTeX}{https://github.com/ElegantLaTeX}.\par
\keywords{Elegant\LaTeX{}, Working Paper, Template}
\end{abstract}


\section{Introduction}

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{10pt} and etc.)( \lstinline{11pt} is recommended). It supports different engines, You can choose either \lstinline{PDFLaTeX} or \lstinline{XeLaTeX}\footnote{with \lstinline{ctex} package for Chinese fonts settings.}.
This template is based on the standard \LaTeX{} article class, hence the arguments of article class are acceptable (\lstinline{a4paper}, \lstinline{10pt} and etc.). Alternative engines are \hologo{pdfLaTeX} and \hologo{XeLaTeX}.

The effect of math fonts is as follows:
\begin{equation}
(a+3b)^{n} = \sum_{k=0}^{n} C_{n}^{k} a^{n-k} (3b)^k \label{eq:binom}
\end{equation}
\begin{lstlisting}
\documentclass[a4paper,11pt]{elegantpaper}
\end{lstlisting}
\textbf{Note:} ElegantPaper is available on \href{https://www.overleaf.com/latex/templates/elegantpaper-template/yzghrqjhmmmr}{Overleaf} and \href{https://gitee.com/ElegantLaTeX/ElegantPaper}{gitee}.

\subsection{Global Options}
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
Language mode option \lstinline{lang} allows two alternative inputs, \lstinline{lang=en} (default) for English or \lstinline{lang=cn} for Chinese. \lstinline{lang=cn} will make the caption of figure/table, abstract name, refname etc. Chinese. You can use this option as
\begin{lstlisting}
\documentclass[lang=en]{elegantpaper}
\documentclass{en}{elegantpaper} % both ok
\documentclass[lang=cn]{elegantpaper} % or
\documentclass{cn}{elegantpaper}
\end{lstlisting}
\textbf{Note:} Under the English mode \lstinline{lang=en}, Chinese characters are not allowed. To type in Chinese, please load \lstinline{ctex} or \lstinline{xeCJK} package at the preamble as:
\begin{lstlisting}
\usepackage[UTF8,scheme=plain]{ctex}
\end{lstlisting}

\subsection{Custom Commands}
\subsection{Fonts}
This template sets \lstinline{newtxtext} and \lstinline{newtxmath} for English and math fonts respectively.
\begin{equation}
(a+3b)^{n} = \sum_{k=0}^{n} C_{n}^{k} a^{n-k} (3b)^k\label{eq:binom}
\end{equation}

I didn't change any default command or environment, which means you can use all the basic \LaTeX{} commands and environments as before. Besides, I defined 4 commands
\subsection{Custom Commands}
Default \LaTeX{} commands and environments are all the same in this template\footnote{To ensure the codes are replicatable. We recommend users pay more attention to the contents other than formats. This is the meaning of the existence of the template.}. We created four new commands:
\begin{enumerate}
\item \lstinline{\email}: create the hyperlink to email address.
\item \lstinline{\figref}: same usage as \lstinline{\ref}, but start with label text <\textbf{Figure n}>.
\item \lstinline{\tabref}: same usage as \lstinline{\ref}, but start with label text <\textbf{Table n}>.
\item \lstinline{\keywords}: create the keywords in the abstract section.
\end{enumerate}{}
\end{enumerate}


\subsection{Bibliography}
This template used \hologo{BibTeX} to generate the bibliography, the default bibliography style is \lstinline{aer} under the option \lstinline{lang=en}. Citation example: ~\cite{en3} used 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 \hologo{BibTeX}, you must create a file named \lstinline{wpref.bib}, and add bib items (from Google Scholar, Mendeley, EndNote, and etc.) to \lstinline{wpref.bib} file, and cite the bibkey in the \lstinline{tex} file. Note that \hologo{BibTeX} has to be added.

\subsection{List Environments}
You can use \lstinline{itemize}, \lstinline{enumerate}, or \lstinline{description} environment as below\\
\begin{minipage}[c]{0.51\linewidth}
Three options for the references, \lstinline{cite=numbers} (default), \lstinline{cite=super} and \lstinline{cite=authoryear}. Those who major in science and engineering use \lstinline{numbers} and \lstinline{super} more often, while those who major in arts use \lstinline{authoryear} more frequently. To switch different options, use
\begin{lstlisting}
\begin{itemize}
\item Routing and resource discovery;
\item Resilient and scalable networks;
\item Distributed storage and search.
\end{itemize}
\documentclass[cite=super]{elegantpaper} % super style ref style
\documentclass[super]{elegantpaper}

\documentclass[cite=authoryear]{elegantpaper} % author-year ref style
\documentclass[authoryear]{elegantpaper}
\end{lstlisting}
\end{minipage}
\begin{minipage}[c]{0.48\linewidth}

\section{Recruit Support Members}

Recruit support members for Elegant\LaTeX{} to translate template official guide, maintain wiki entries(Markdown), update Wechat articles. No deadline for this recruitment.

So far, Elegant\LaTeX{} has four support members:
\begin{itemize}
\item Routing and resource discovery;
\item Resilient and scalable networks;
\item Distributed storage and search.
\item OG Translator: \href{https://github.com/peggy2006xzyz}{YPY};
\item Wiki Maintainer: \href{https://github.com/izinngo}{Ingo Zinngo}, \href{https://github.com/xiaohao890809}{Xiaohao890809};
\item QQ Group Manager: \href{https://github.com/sikouhjw}{Sikouhjw}.
\end{itemize}
\end{minipage}

\subsection{Table}
I strongly recommend you to use the \lstinline{booktabs} package in your paper. It adds three commands to make the table prettier, \lstinline{\toprule}, \lstinline{\midrule} and \lstinline{\bottomrule}. \tabref{tab:reg} is an example.
\begin{lstlisting}
\begin{table}[htbp]
\small
\centering
\caption{Auto MPG and Price \label{tab:reg}}
\begin{tabular}{lcc}
\toprule
& (1) & (2) \\
\midrule
mpg & -238.90*** & -49.51 \\
& (53.08) & (86.16) \\
weight & & 1.75*** \\
& & (0.641) \\
constant & 11,253*** & 1,946 \\
& (1,171) & (3,597) \\
obs & 74 & 74 \\
$R^2$ & 0.220 & 0.293 \\
\bottomrule
\multicolumn{3}{l}{\scriptsize Standard errors in parentheses} \\
\multicolumn{3}{l}{\scriptsize *** p<0.01, ** p<0.05, * p<0.1} \\
\end{tabular}%
\end{table}%
\end{lstlisting}
\begin{table}[htbp]
\small
\centering
\caption{Auto MPG and Price \label{tab:reg}}
\begin{tabular}{lcc}
\toprule
& (1) & (2) \\
\midrule
mpg & -238.90*** & -49.51 \\
& (53.08) & (86.16) \\
weight & & 1.75*** \\
& & (0.641) \\
constant & 11,253*** & 1,946 \\
& (1,171) & (3,597) \\
obs & 74 & 74 \\
$R^2$ & 0.220 & 0.293 \\
\bottomrule
\multicolumn{3}{l}{\scriptsize Standard errors in parentheses} \\
\multicolumn{3}{l}{\scriptsize *** p<0.01, ** p<0.05, * p<0.1} \\
\end{tabular}%
\end{table}%

Thank them all!!!

\section{Acknowledgement}
The number of stars on Github for ElegantPaper reached 164 on Oct 17, 2019 at the release of ElegantPaper v0.08.
Thank China\TeX{} and \href{http://www.latexstudio.net/}{\LaTeX{} studio} for their promotion.

\subsection{Graphics}
To include a graphic, you can use figure environment as usual. \figref{fig:scatter} shows the effect. You can put all your images in the sub directories (\lstinline{./image/}, \lstinline{./img/}, \lstinline{./figure/}, \lstinline{./fig/}) of your current working directory.
\begin{lstlisting}
\begin{figure}[htbp]
If you like our templates, star on Github.
\begin{figure}[!ht]
\centering
\includegraphics[width=0.6\textwidth]{scatter.pdf}
\caption{Scatter Plot Example \label{fig:scatter}}
\includegraphics[width=\textwidth]{star.png}
\caption{Twinkle, Twinkle, Little Star}
\end{figure}
\end{lstlisting}
\begin{figure}[htbp]

\section{Donation}
To express your love for our templates and/or our developers, please do not hesitate to tip us.
\begin{figure}[!htbp]
\centering
\includegraphics[width=0.6\textwidth]{scatter.pdf}
\caption{Scatter Plot Example \label{fig:scatter}}
\includegraphics[width=0.4\textwidth]{donate.jpg}
\end{figure}

\subsection{Bibliography}
This template used Bib\TeX{} to generate the bibliography, the default bibliography style is \lstinline{aer}. Let's take a glance at the citation effect, ~\cite{en3} used 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 Bib\TeX{}, you must create a file named \lstinline{wpref.bib}, and add bib items (from Google Scholar, Mendeley, EndNote, and etc.) to \lstinline{wpref.bib} file, and cite the bibkey in the \lstinline{tex} file. The Bib\TeX{} will automatically generate the bibliography for you for the reference you cited. If you want to add some noncited references or all of them to the bibliography, you can use
\begin{lstlisting}
\nocite{EINAV2010, Havrylchyk2018} % add two noncited references
\nocite{*} % list all the references of the bib file.
\end{lstlisting}

\textbf{The explanation right of the tip usage belongs to Elegant\LaTeX{} with no supervision. Feel free to tip us.} Those who donate more than 10 RMB will be recorded in the donation list. Thank all the tippers!

\begin{table}[!h]
\centering
\caption{Donation List}
\begin{tabular}{cccc}
\toprule
Tipper & Amount & Date & Channel \\
\midrule
Lerh & 10 RMB & 2019/05/15 & Wechat \\
Yueguodipingxian & 10 RMB & 2019/05/15 & Wechat \\
Dapeng & 20 RMB & 2019/05/27 & Wechat\\
Anonymous & 10 RMB & 2019/05/30 & Wechat \\
\href{http://www.latexstudio.net/}{latexstudio.net} & 666 RMB & 2019/06/05 & Alipay \\
Cassis & 11 RMB & 2019/06/30 & Wechat \\
Some Jun & 10 RMB & 2019/07/23 & Wechat \\
Some Meng & 19 RMB & 2019/08/28 & Wechat \\
Qu DouDou & 10 RMB & 2019/08/28 & Wechat \\
Li Bo & 100 RMB & 2019/10/06 & Wechat\\
Njustsll & 10 RMB & 2019/10/11 & Wechat \\
\bottomrule
\end{tabular}%
\end{table}%

\section{A Minimal Example}
In this section, we give a simple example using this template.
\section{FAQ}

\begin{enumerate}[label=\arabic*).]
\item \textit{How to remove the information of version?}\\
Please comment \lstinline|\version{x.xx}|.
\item \textit{How to remove the information of date?}\\
Please type in \lstinline|\date{}|.
\item \textit{How to add several authors?}\\
Use \lstinline{\and} in \lstinline{\author} and use \lstinline{\\} to start a new line.
\begin{lstlisting}
\author{author 1\\ org. 1 \and author 2 \\ org. 2 }
\end{lstlisting}
\item \textit{How to display bilingual abstracts?}\\
Please refer to \href{https://github.com/ElegantLaTeX/ElegantPaper/issues/5}{Github::ElegantPaper/issues/5}
\end{enumerate}

\section{Minimal Example}
A minimal example is as follows:
\begin{lstlisting}
\documentclass[lang=en]{elegantpaper}
\documentclass[a4paper,11pt]{elegantpaper}

% title information
\title{A Working Paper Example}
\author{ddswhu}
\title{Working Paper Example}
\author{Author Name}
\institute{Elegant\LaTeX{} Group}

\version{1.00}
\date{\today}

Expand All @@ -166,14 +169,12 @@ \section{Introduction}
\section{Conclusion}
The content of conclusion section.

% include the noncited reference
\nocite{ref1, ref2}
\bibliography{wpref}

\end{document}
\end{lstlisting}

\nocite{en1,en2}

\bibliography{wpref}

\end{document}
6 changes: 3 additions & 3 deletions elegantpaper.cls
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
% Lastest Version: https://github.com/ElegantLaTeX/ElegantPaper

% --- Class structure: identification part
\ProvidesClass{elegantpaper}[2019/10/11 v0.08 ElegantLaTeX Paper class]
\ProvidesClass{elegantpaper}[2019/10/17 v0.08 ElegantLaTeX Paper class]
\NeedsTeXFormat{LaTeX2e}

\RequirePackage{kvoptions}
Expand Down Expand Up @@ -57,7 +57,7 @@
\RequirePackage[shortlabels,inline]{enumitem}
\setlist{nolistsep}

\RequirePackage[sort&compress]{natbib}
\RequirePackage[\ELEGANT@cite,sort&compress]{natbib}
% \PassOptionsToPackage{\ELEGANT@cite}{natbib}
\setlength{\bibsep}{0.0pt}
\def\bibfont{\footnotesize}
Expand Down Expand Up @@ -277,7 +277,7 @@
keywordstyle=\color{winered},
frame=tlbr,framesep=4pt,framerule=0pt,
commentstyle=\color{commentcolor},
emph={elegantpaper,fontenc,fontspec,xeCJK,FiraMono,xunicode,newtxmath,figure,fig,image,img,table,itemize,enumerate,newtxtext,newtxtt,ctex,microtype,description,times,newtx,booktabs,tabular,PDFLaTeX,XeLaTeX,type1cm,BibTeX,cite,gbt7714},
emph={elegantpaper,fontenc,fontspec,xeCJK,FiraMono,xunicode,newtxmath,figure,fig,image,img,table,itemize,enumerate,newtxtext,newtxtt,ctex,microtype,description,times,newtx,booktabs,tabular,PDFLaTeX,XeLaTeX,type1cm,BibTeX,cite,gbt7714,lang},
emphstyle={\color{frenchplum}},
morekeywords={DeclareSymbolFont,SetSymbolFont,toprule,midrule,bottomrule,institute,version,includegraphics,setmainfont,setsansfont,setmonofont ,setCJKmainfont,setCJKsansfont,setCJKmonofont,RequirePackage,figref,tabref,email,maketitle,keywords,zhdate,zhtoday},
tabsize=2,
Expand Down
Binary file removed image/star-history.png
Binary file not shown.
Binary file modified image/star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit aa3f1fb

Please sign in to comment.