### Install ElegantPaper via tlmgr command line Source: https://github.com/elegantlatex/elegantpaper/wiki/Installation Run these commands as administrator to set the TeX Live repository and install the elegantpaper package. ```shell tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet tlmgr install elegantpaper ``` -------------------------------- ### Add multiple authors with \and and \\ Source: https://github.com/elegantlatex/elegantpaper/blob/master/elegantpaper-en.tex Add multiple authors to the document. Use \and to separate authors and \\ to start a new line for each author's organization. ```latex \author{author 1\\ org. 1 \and author 2 \\ org. 2 } ``` -------------------------------- ### Create a booktabs table with \toprule, \midrule, \bottomrule Source: https://github.com/elegantlatex/elegantpaper/wiki/Tables Use with the booktabs package to create a publication-quality table with \toprule, \midrule, and \bottomrule. The example shows a regression table with multiple columns, standard errors in parentheses, and significance stars. ```tex \begin{table}[htbp] \small \centering \caption{燃油效率与汽⻋价格} \begin{tabular}{lcc} \toprule & (1) & (2) \\ \midrule 燃油效率 & -238.90*** & -49.51 \\ & (53.08) & (86.16) \\ 汽车重量 & & 1.75*** \\ & & (0.641) \\ 常数项 & 11,253*** & 1,946 \\ & (1,171) & (3,597) \\ 观测数 & 74 & 74 \\ $R^2$ & 0.220 & 0.293 \\ \bottomrule \multicolumn{3}{l}{\scriptsize 括号内为标准误} \\ \multicolumn{3}{l}{\scriptsize *** p<0.01, ** p<0.05, * p<0.1} \\ \end{tabular}% \label{tab:reg}% \end{table}% ``` -------------------------------- ### Include graphic with figure environment Source: https://github.com/elegantlatex/elegantpaper/wiki/Graphics Use the figure environment to include a graphic. Place images in subdirectories like ./image/, ./img/, ./figure/, or ./fig/ of the current working directory. The example loads scatter.pdf at 60% of text width with a caption and label. ```tex \begin{figure}[htbp] \centering \includegraphics[width=0.6\textwidth]{scatter.pdf} \caption{Scatter Plot Example \label{fig:scatter}} \end{figure} ``` -------------------------------- ### Basic document class declaration Source: https://github.com/elegantlatex/elegantpaper/blob/master/elegantpaper-en.tex Declares the ElegantPaper class with A4 paper and 11pt font size. This is the standard starting point for a document using this template. ```latex \documentclass[a4paper,11pt]{elegantpaper} ``` -------------------------------- ### Equation with hyphen spacing using \kern0pt Source: https://github.com/elegantlatex/elegantpaper/blob/master/elegantpaper-en.tex Example of an equation that uses hyphens correctly with the newtx font. The \kern0pt command is used to adjust spacing around the hyphen in the text 'of f'. ```latex \begin{equation} \int_{R^q} f(x,y) dy.\emph{of \kern0pt f} \end{equation} ``` -------------------------------- ### XeLaTeX font configuration with fontspec and xeCJK Source: https://github.com/elegantlatex/elegantpaper/wiki/FontSettings This snippet shows the font setup for XeLaTeX compilation, using fontspec and xeCJK packages. It sets Times New Roman as the main font, Arial as sans, and defines Chinese fonts (SimSun, KaiTi, Microsoft YaHei) with bold and italic variants. It also includes XeTeX linebreak settings and loads newtxmath. Note that the fonts are Windows-specific and may need substitution on Linux or macOS. ```tex \RequirePackage{fontenc} \RequirePackage[no-math]{fontspec} \setmainfont{Times New Roman}[NFSSFamily=ntxtlf] \setsansfont{Arial} %\setmonofont[Scale=0.9]{Courier New} \RequirePackage{xeCJK} \RequirePackage{xunicode} \setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}]{SimSun} \setCJKsansfont[BoldFont={SimHei},ItalicFont={KaiTi}]{KaiTi} \setCJKmonofont[BoldFont={SimHei},ItalicFont={KaiTi},Scale=0.9]{Microsoft YaHei} \XeTeXlinebreaklocale "zh" \XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt \RequirePackage{newtxmath} ``` -------------------------------- ### Load standard net repository in TeX Live Manager Source: https://github.com/elegantlatex/elegantpaper/wiki/Installation In the TeX Live Manager GUI, choose this repository option to load the standard net repository. ```shell Load standard net repository: http://mirror.ctan.org/systems/texlive/tlnet ``` -------------------------------- ### Create a bulleted list with itemize Source: https://github.com/elegantlatex/elegantpaper/wiki/Lists Use the itemize environment to create a bulleted list. Each \item command adds a bullet point. ```latex \begin{itemize} \item Routing and resource discovery; \item Resilient and scalable networks; \item Distributed storage and search. \end{itemize} ``` -------------------------------- ### Using bibtex as bibliography backend Source: https://github.com/elegantlatex/elegantpaper/blob/master/elegantpaper-en.tex Selects the bibtex backend instead of the default biber. Both forms are equivalent. biber is recommended. ```latex \documentclass[bibtex]{elegantpaper} % or \documentclass[bibend=bibtex]{elegantpaper} ``` -------------------------------- ### Enable newtx fonts with math option Source: https://github.com/elegantlatex/elegantpaper/blob/master/elegantpaper-en.tex Use the newtx font package with the math option by passing math=newtx to the document class. This is required to enable newtx fonts in the template. ```latex \documentclass[math=newtx]{elegantpaper} ``` -------------------------------- ### Loading ctex for Chinese support Source: https://github.com/elegantlatex/elegantpaper/blob/master/elegantpaper-en.tex Loads the ctex package with UTF8 encoding and plain scheme to enable Chinese characters in English mode. This is required when using lang=en and typing Chinese. ```latex \usepackage[UTF8,scheme=plain]{ctex} ``` -------------------------------- ### Minimal ElegantPaper LaTeX Document Source: https://github.com/elegantlatex/elegantpaper/wiki/MinimalExample A complete minimal LaTeX document using the elegantpaper class. It includes title information, abstract with keywords, sections, and a bibliography with noncited references. ```tex \documentclass[lang=en]{elegantpaper} % title information \title{A Working Paper Example} \author{ddswhu} \institute{Elegant\LaTeX{} Group} \version{1.00} \date{\today} \begin{document} \maketitle \begin{abstract} Your abstract goes here. \keywords{keyword1, keyword2} \end{abstract} \section{Introduction} The content of introduction section. \section{Conclusion} The content of conclusion section. % include the noncited reference \nocite{ref1, ref2} \bibliography{wpref} \end{document} ``` -------------------------------- ### Language mode options (lang=cn) Source: https://github.com/elegantlatex/elegantpaper/blob/master/elegantpaper-en.tex Sets the language to Chinese using the lang option. Both forms are equivalent. Under English mode (default), Chinese characters are not allowed. ```latex \documentclass[lang=cn]{elegantpaper} % or \documentclass[cn]{elegantpaper} ``` -------------------------------- ### Update and uninstall ElegantPaper via tlmgr Source: https://github.com/elegantlatex/elegantpaper/wiki/Installation Use these commands to update or uninstall the elegantpaper package. ```shell tlmgr update elegantpaper tlmgr uninstall elegantpaper ``` -------------------------------- ### Set lang option in elegantpaper class Source: https://github.com/elegantlatex/elegantpaper/wiki/Languages Use the lang option to set the language of captions, abstract name, and references. lang=en (default) keeps them English, while lang=cn makes them Chinese. The second line shows an alternative syntax that is also accepted. ```tex \documentclass[lang=en]{elegantpaper} \documentclass{en}{elegantpaper} % both ok ``` -------------------------------- ### Changing bibliography style with citestyle and bibstyle Source: https://github.com/elegantlatex/elegantpaper/blob/master/elegantpaper-en.tex Sets the citation style to numeric-comp and the bibliography style to authoryear. These options are passed to biblatex. ```latex \documentclass[citestyle=numeric-comp, bibstyle=authoryear]{elegantpaper} ``` -------------------------------- ### Add noncited references with \nocite Source: https://github.com/elegantlatex/elegantpaper/wiki/Bibliography Adds noncited references to the bibliography. Place this command in the tex file to include references that are not cited in the text. ```tex \nocite{EINAV2010, Havrylchyk2018} ``` -------------------------------- ### LaTeX error: Too many symbol fonts declared Source: https://github.com/elegantlatex/elegantpaper/blob/master/elegantpaper-en.tex Error message that occurs when using yhmath or esvect packages with the template. The template redefines the math font, preventing additional math fonts from being loaded. ```latex LaTeX Error: Too many symbol fonts declared. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.