Skip to content

Commit

Permalink
version 0.06
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanDeng committed Feb 24, 2019
1 parent 26885d0 commit 97644d6
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 24 deletions.
Binary file modified elegantpaper-cn.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions elegantpaper-cn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}


Expand Down Expand Up @@ -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}

Expand All @@ -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}
Expand Down
Binary file modified elegantpaper-en.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions elegantpaper-en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}


Expand Down Expand Up @@ -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}

Expand All @@ -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}
Expand Down
40 changes: 24 additions & 16 deletions elegantpaper.cls
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
% Current Version: 0.05
% Current Version: 0.06
% Author: Dongsheng Deng
% Homepage: https://ddswhu.me/
% Email: [email protected]
% 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}

Expand Down Expand Up @@ -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}
Expand All @@ -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
Expand Down Expand Up @@ -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}%
Expand All @@ -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
Expand All @@ -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}
}



Expand All @@ -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,
Expand Down

0 comments on commit 97644d6

Please sign in to comment.