diff --git a/elegantpaper-cn.pdf b/elegantpaper-cn.pdf index d50fb6b..29c04fb 100644 Binary files a/elegantpaper-cn.pdf and b/elegantpaper-cn.pdf differ diff --git a/elegantpaper-cn.tex b/elegantpaper-cn.tex index 5a8ece5..ee0685f 100644 --- a/elegantpaper-cn.tex +++ b/elegantpaper-cn.tex @@ -5,7 +5,7 @@ \author{\href{https://ddswhu.me/}{邓 东 升}\thanks{感谢 Peiyi Yao 的帮助与建议。}} \institute{\href{https://elegantlatex.org/}{Elegant\LaTeX{} 项目组}} -\version{0.05x} +\version{0.06} \date{\today} @@ -35,7 +35,7 @@ \subsection{字体设置} \begin{itemize} \item \lstinline{newtxtext} 用于文档正文字体,类似于 Times New Roman 字体。 \item \lstinline{newtxmath} 用于数学字体,搭配 \lstinline{newtx} 非常合适,类似于过时的 \lstinline{times} 宏包的效果。 - \item \lstinline{FiraMono} 用于打字机字体,并使用了 \lstinline{scale=0.8} 选项。 + \item \lstinline{FiraMono} 用于打字机字体,并使用了 \lstinline{scale=0.7} 选项。 \item \lstinline{ctex} 用于中文字体设置,并使用了 \lstinline{scheme=plain} 选项。 \end{itemize} @@ -47,12 +47,12 @@ \subsection{字体设置} \RequirePackage[no-math]{fontspec} \setmainfont{Times New Roman}[NFSSFamily=ntxtlf] \setsansfont{Arial} -%\setmonofont[Scale=0.9]{Courier New} +%\setmonofont[Scale=0.7]{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} +\setCJKmonofont[BoldFont={SimHei},ItalicFont={KaiTi},Scale=0.7]{Microsoft YaHei} \XeTeXlinebreaklocale "zh" \XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt \RequirePackage{newtxmath} diff --git a/elegantpaper-en.pdf b/elegantpaper-en.pdf index 185dbc3..c4de271 100644 Binary files a/elegantpaper-en.pdf and b/elegantpaper-en.pdf differ diff --git a/elegantpaper-en.tex b/elegantpaper-en.tex index 2a77273..3903ccc 100644 --- a/elegantpaper-en.tex +++ b/elegantpaper-en.tex @@ -4,7 +4,7 @@ \title{ElegantPaper: An Elegant \LaTeX{} Template for Working Papers} \author{\href{https://ddswhu.me/}{Dongsheng Deng}\thanks{Thanks Peiyi Yao for good suggestions.}} \institute{\href{https://github.com/ElegantLaTeX}{Elegant\LaTeX{} Program}} -\version{0.05x} +\version{0.06} \date{\today} @@ -36,7 +36,7 @@ \subsection{Font Settings} \begin{itemize} \item \lstinline{newtxtext} package for text fonts, similar to times new roman font. \item \lstinline{newtxmath} package for math fonts, close to \lstinline{times} package. - \item \lstinline{FiraMono} package for typewriter fonts, with option \lstinline{scale=0.8}. + \item \lstinline{FiraMono} package for typewriter fonts, with option \lstinline{scale=0.7}. \item \lstinline{ctex} package for Chinese fonts, with option \lstinline{scheme=plain}. \end{itemize} @@ -48,12 +48,12 @@ \subsection{Font Settings} \RequirePackage[no-math]{fontspec} \setmainfont{Times New Roman}[NFSSFamily=ntxtlf] \setsansfont{Arial} -%\setmonofont[Scale=0.9]{Courier New} +%\setmonofont[Scale=0.7]{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} +\setCJKmonofont[BoldFont={SimHei},ItalicFont={KaiTi},Scale=0.7]{Microsoft YaHei} \XeTeXlinebreaklocale "zh" \XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt \RequirePackage{newtxmath} diff --git a/elegantpaper.cls b/elegantpaper.cls index f29afd1..4ab2e95 100644 --- a/elegantpaper.cls +++ b/elegantpaper.cls @@ -1,11 +1,11 @@ -% Current Version: 0.05 +% Current Version: 0.06 % Author: Dongsheng Deng % Homepage: https://ddswhu.me/ % Email: elegantlatex2e@gmail.com % Lastest Version: https://github.com/ElegantLaTeX/ElegantPaper \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{elegantpaper}[2019/02/15 v0.05 ElegantLaTeX Paper class] +\ProvidesClass{elegantpaper}[2019/02/25 v0.06 ElegantLaTeX Paper class] \LoadClass[11pt]{article} @@ -98,12 +98,12 @@ \RequirePackage[no-math]{fontspec} \setmainfont{Times New Roman}[NFSSFamily=ntxtlf] \setsansfont{Arial} - %\setmonofont[Scale=0.9]{Courier New} + %\setmonofont[Scale=0.7]{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} + \setCJKmonofont[BoldFont={SimHei},ItalicFont={KaiTi},Scale=0.7]{Microsoft YaHei} \XeTeXlinebreaklocale "zh" \XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt \RequirePackage{newtxmath} @@ -123,7 +123,7 @@ \RequirePackage{newtxmath} \RequirePackage[UTF8, scheme=plain]{ctex} \fi -\RequirePackage[scale=0.8]{FiraMono} +\RequirePackage[scale=0.7]{FiraMono} \ifdefstring{\ELEGANT@lang}{cn}{ \theoremstyle{plain}% default @@ -178,9 +178,13 @@ \AtBeginEnvironment{verbatim}{\microtypesetup{activate=false}} +\def\IfEmpty#1{% + \edef\1{\the#1} + \ifx\1\empty +} \newtoks\version \newtoks\institute - +\def \ifempty#1{\def\temp{#1} \ifx\temp\empty } \renewcommand\maketitle{\par \begingroup \renewcommand\thefootnote{\@fnsymbol\c@footnote}% @@ -207,12 +211,14 @@ \global\let\@maketitle\relax \global\let\@thanks\@empty \global\let\@author\@empty + \global\let\@ELEGANT@version\@empty \global\let\@date\@empty \global\let\@title\@empty \global\let\title\relax \global\let\author\relax \global\let\date\relax \global\let\and\relax + \global\let\ELEGANT@version\relax } \def\@maketitle{% \newpage @@ -228,13 +234,19 @@ \@author\\ \the\institute \end{tabular}\par}% - \vskip 1.5em% - {\small\itshape \versiontext \the\version}% - \vskip .1em% - {\small\itshape \updatetext \@date}% +\vskip 1.5em% +\IfEmpty\version +\else +{\small\itshape \versiontext \the\version} +\fi +\ifx\@date\empty +\else +\vskip 0.1em% + {\small\itshape \updatetext \@date}% +\fi \end{center}% \par - \vskip 1.5em} +} @@ -249,16 +261,12 @@ \let\prod\prodop - - - - \RequirePackage{listings} \definecolor{lightgrey}{rgb}{0.9,0.9,0.9} \definecolor{frenchplum}{RGB}{190,20,83} \lstset{language=[LaTeX]TeX, texcsstyle=*\bf\color{winered}\ttfamily, - basicstyle=\footnotesize\ttfamily, + basicstyle=\ttfamily, numbers=none, breaklines=true, keywordstyle=\bf\color{winered}\ttfamily,