Debian Codegraph @

texmf-dist/doc/latex/elegantpaper/elegantpaper-en.tex

raw
1 \documentclass[11pt,en]{elegantpaper}
2
3 \title{ElegantPaper: An Elegant \LaTeX{} Template for Working Papers}
4 \author{Author1 \\ Institute1 \and Author2 \\ Institute2}
5 \institute{\href{https://github.com/ElegantLaTeX}{Elegant\LaTeX{} Program}}
6
7 \version{0.12}
8 \date{Feb. 27, 2026}
9
10 % cmd for this doc
11 \usepackage{array}
12 \newcommand{\ccr}[1]{\makecell{{\color{#1}\rule{1cm}{1cm}}}}
13
14 \addbibresource[location=local]{reference.bib} % reference file
15 \begin{document}
16
17 \maketitle
18
19 \begin{abstract}
20 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
21 \keywords{Elegant\LaTeX{}, Working Paper, Template}
22 \end{abstract}
23
24 \textcolor{red}{\bfseries Caution: This template will no longer be maintained since January 1st, 2023. However, due to its user base, maintenance has resumed and the template has been re-released as of 2026.}
25
26 \section*{Update Notes}
27
28 This version changes two important parts: fonts and bibliography.
29
30 \textbf{Fonts}: Due to the newtx package updates, we change the font settings for all the templates of ElegantLaTeX. Under \hologo{XeLaTeX}, we use \lstinline{fontspec} package to set the font to TeX Gyre Terms/Heros.
31
32 \textbf{Bibliography}: The bib file is no longer \lstinline{wpref.bib}, it's same with ElegantBook bibfile, \lstinline{reference.bib}. Besides, we use biblatex/biber rather than bibtex to handler bibliography, you can use bibstyle and citestyle to set the styles. For convenience, we offer a \lstinline{bibend} option, which can take values of \lstinline{biber} (default) and \lstinline{bibtex}, please refer to Bibliography section and biblatex package document for more information.
33
34 \section{Introduction}
35
36 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}.
37
38 \begin{lstlisting}
39 \documentclass[a4paper,11pt]{elegantpaper}
40 \end{lstlisting}
41 \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}.
42
43 \subsection{Global Options}
44 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
45 \begin{lstlisting}
46 \documentclass[lang=cn]{elegantpaper} % or
47 \documentclass[cn]{elegantpaper}
48 \end{lstlisting}
49 \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:
50 \begin{lstlisting}
51 \usepackage[UTF8,scheme=plain]{ctex}
52 \end{lstlisting}
53
54 \subsection{Math Fonts}
55
56 This template defines a new option (\lstinline{math}), with three options:
57
58 \begin{enumerate}
59 \item \lstinline{math=cm} (default), use \LaTeX{} default math font (recommended).
60 \item \lstinline{math=newtx}, use \lstinline{newtxmath} math font (may bring about bugs).
61 \item \lstinline{math=mtpro2}, use \lstinline{mtpro2} package to set math font.
62 \end{enumerate}
63
64
65 \subsection{Custom Commands}
66 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:
67 \begin{enumerate}
68 \item \lstinline{\email}: create the hyperlink to email address.
69 \item \lstinline{\figref}: same usage as \lstinline{\ref}, but start with label text \textbf{Figure n}.
70 \item \lstinline{\tabref}: same usage as \lstinline{\ref}, but start with label text \textbf{Table n}.
71 \item \lstinline{\keywords}: create the keywords in the abstract section.
72 \end{enumerate}
73
74
75 \subsection{Bibliography}
76
77 This template uses biblatex to generate the bibliography, the default citestyle and bibliography style are both \lstinline{numeric}. Let's take a glance at the citation effect. ~\cite{en1} use data from a major peer-to-peer lending \cite{en3} marketplace in China to study whether female and male investors evaluate loan performance differently \parencite{en2}.
78
79 If you want to use biblatex, you must create a file named \lstinline{reference.bib}, add bib items (from Google Scholar, Mendeley, EndNote, and etc.) to \lstinline{reference.bib} file, then cite the bibkey in the \lstinline{tex} file. The biber will automatically generate the bibliography for the reference you cited.
80
81
82 To change the bibliography style, this version introduces two options: \lstinline{citestyle} and \lstinline{bibstyle}, please refer to \href{https://ctan.org/pkg/biblatex}{CTAN:biblatex} for more detail about these options. You can change your bibliography style as
83
84 \begin{lstlisting}
85 \documentclass[citestyle=numeric-comp, bibstyle=authoryear]{elegantpaper}
86 \end{lstlisting}
87
88 We also add the \lstinline{bibend} option to this template, you can choose \lstinline{biber} (default) or \lstinline{bibtex} as you like, \lstinline{biber} is recommended.
89
90 \begin{lstlisting}
91 \documentclass[bibtex]{elegantpaper} % or
92 \documentclass[bibend=bibtex]{elegantpaper}
93 \end{lstlisting}
94
95
96
97 \subsection{Use newtx fonts}
98 If you use \lstinline{newtx} fonts, you can use the \lstinline{math} option as
99 \begin{lstlisting}
100 \documentclass[math=newtx]{elegantpaper}
101 \end{lstlisting}
102
103
104 \subsubsection{Hyphens}
105 Since the template uses \lstinline{newtx}, please pay attention to the hyphens. For instance,
106 \begin{equation}
107 \int_{R^q} f(x,y) dy.\emph{of\kern0pt f}
108 \end{equation}
109
110 The corresponding code is:
111 \begin{lstlisting}
112 \begin{equation}
113 \int_{R^q} f(x,y) dy.\emph{of \kern0pt f}
114 \end{equation}
115 \end{lstlisting}
116
117 \subsubsection{Symbol Fonts}
118 Feedback from ElegantBook users claims that error occurs when using our templates with \lstinline{yhmath}, \lstinline{esvect} and other packages.
119 \begin{lstlisting}
120 LaTeX Error:
121 Too many symbol fonts declared.
122 \end{lstlisting}
123
124 The reason is that the template redefines font for math so that no new math font is allowed to be added. To use \lstinline{yhmath} and/or \lstinline{esvect}, please locate \lstinline{yhmath} or \lstinline{esvect} in \lstinline{elegantpaper.cls}, uncomment corresponding related code.
125
126
127 \section{FAQ}
128
129 \begin{enumerate}[label=\arabic*).]
130 \item \textit{How to remove the information of version?}\\
131 Please comment \lstinline|\version{x.xx}|.
132 \item \textit{How to remove the information of date?}\\
133 Please type in \lstinline|\date{}|.
134 \item \textit{How to add several authors?}\\
135 Use \lstinline{\and} in \lstinline{\author} and use \lstinline{\\} to start a new line.
136 \begin{lstlisting}
137 \author{author 1\\ org. 1 \and author 2 \\ org. 2 }
138 \end{lstlisting}
139 \item \textit{How to display bilingual abstracts?}\\
140 Please refer to \href{https://github.com/ElegantLaTeX/ElegantPaper/issues/5}{GitHub::ElegantPaper/issues/5}
141 \end{enumerate}
142
143 \section{Acknowledgement}
144
145 Thank \href{https://github.com/sikouhjw}{sikouhjw} and \href{https://github.com/syvshc}{syvshc} for their quick response to Github issues and continuously support work for ElegantLaTeX. Thank ChinaTeX and \href{http://www.latexstudio.net/}{LaTeX Studio} for their promotion.
146
147
148
149 \printbibliography[heading=bibintoc, title=\ebibname]
150
151 \appendix
152 %\appendixpage
153 \addappheadtotoc
154
155
156 \end{document}