From c98e9ebef816f09dc54c52a01df4f978e1b210fc Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 13 Apr 2020 03:03:00 +0000 Subject: CTAN sync 202004130303 --- .../latex/contrib/elegantnote/elegantnote-cn.pdf | Bin 449393 -> 549340 bytes .../latex/contrib/elegantnote/elegantnote-cn.tex | 147 +++++++++------ .../latex/contrib/elegantnote/elegantnote-en.pdf | Bin 490683 -> 568882 bytes .../latex/contrib/elegantnote/elegantnote-en.tex | 85 +++++---- macros/latex/contrib/elegantnote/elegantnote.cls | 203 ++++++++++++--------- macros/latex/contrib/elegantnote/image/founder.png | Bin 0 -> 89052 bytes macros/latex/contrib/elegantnote/image/star.png | Bin 47972 -> 47825 bytes 7 files changed, 265 insertions(+), 170 deletions(-) create mode 100644 macros/latex/contrib/elegantnote/image/founder.png (limited to 'macros/latex/contrib/elegantnote') diff --git a/macros/latex/contrib/elegantnote/elegantnote-cn.pdf b/macros/latex/contrib/elegantnote/elegantnote-cn.pdf index 9ea0ad9a3c..7968f10162 100644 Binary files a/macros/latex/contrib/elegantnote/elegantnote-cn.pdf and b/macros/latex/contrib/elegantnote/elegantnote-cn.pdf differ diff --git a/macros/latex/contrib/elegantnote/elegantnote-cn.tex b/macros/latex/contrib/elegantnote/elegantnote-cn.tex index e4316dc12e..35f7325446 100644 --- a/macros/latex/contrib/elegantnote/elegantnote-cn.tex +++ b/macros/latex/contrib/elegantnote/elegantnote-cn.tex @@ -1,14 +1,15 @@ %!TEX program = xelatex -\documentclass[cn,hazy,blue,screen,14pt]{elegantnote} - +\documentclass[cn,hazy,blue,14pt,screen]{elegantnote} \title{ElegantNote:一个优美的 \LaTeX{} 笔记模板} \author{邓东升} \institute{Elegant\LaTeX{} Program} -\version{2.20} +\version{2.30} \date{\zhtoday} +\usepackage{array} + \begin{document} \maketitle @@ -20,19 +21,25 @@ \section{ElegantNote 使用说明} -新版 ElegantNote 是基于标准的 \LaTeX{} 文类 article 重新设计的,格式更加简化的笔记模板!本模板支持两种编译方式,\hologo{pdfLaTeX} 和 \hologo{XeLaTeX}\footnote{模板测试环境为 Win10 + \TeX{} Live 2019。},英文模式下请使用 \hologo{pdfLaTeX} 进行编译,中文模式下推荐使用 \hologo{XeLaTeX}。 +新版 ElegantNote 是基于标准的 \LaTeX{} 文类 article 重新设计的,格式更加简化的笔记模板!本模板支持两种编译方式,\hologo{pdfLaTeX} 和 \hologo{XeLaTeX},英文模式下请使用 \hologo{pdfLaTeX} 进行编译,中文模式下推荐使用 \hologo{XeLaTeX}。 新模板有下面几个特性: + \begin{itemize} - \item 纸张模式:朦胧模式(hazy)和护眼模式(geye); - \item 适配不同设备,包括 Pad(默认),Screen\footnote{\textcolor{red}{本次更新新增内容。}}(幻灯片),Kindle,PC(双页),通用(A4 纸张); + \item 纸张模式:护眼模式(geye)和朦胧模式(hazy); + \item 适配不同设备,包括 Pad(默认),Screen(幻灯片),Kindle,PC(双页),通用(A4 纸张); \item 5 套颜色主题,分别是:\textcolor{eblue}{blue}(默认)、\textcolor{egreen}{green}、\textcolor{ecyan}{cyan}、 \textcolor{sakura}{sakura} 和 \textcolor{black}{black}; \item 语言支持:中文(默认),英文; \item 支持 \hologo{pdfLaTeX} 和 \hologo{XeLaTeX} 编译; \item 更加美观的图表标题格式,列表环境,数学字体等; - \item 全局字体大小支持:8pt, 9pt, 10pt, 11pt, 12pt, 14pt, 17pt, 和 20pt。 + \item 全局字体大小支持:8pt, 9pt, 10pt, 11pt, 12pt, 14pt, 17pt, 和 20pt; + \item 支持 \lstinline{newtx} 以及 \lstinline{mtpro2} 数学字体设置; + \item 中文字体支持方正字体或者自定义字体; + \item 英文模式通过 \lstinline{bibstyle} 选项(默认为 \lstinline{apalike})支持参考文献格式修改; + \item 支持参考格式显示格式修改 \lstinline{cite} 可选为 \lstinline{authoryear}、\lstinline{numbers} (默认)和 \lstinline{super}。 \end{itemize} +本次更新:修复 \TeX{} Live 2020 更新之后因 \lstinline{gbt7714} 宏包更新用法导致模板出错的问题。 \subsection{模板模式} @@ -57,7 +64,7 @@ 为了让笔记方便在不同设备上阅读,免去切边,缩放等操作,本模板适配不同的设备,分别为 Pad(默认),Kindle,PC,A4。 -\textcolor{red}{\kaishu 新增}:为了方便展示笔记,2.40 版本新增了 \lstinline{device=screen} 设备选项,大小为 MS Powerpoint 的纸张大小,比例为 4:3(2019/12/06)。 +\textcolor{red}{\kaishu 新增}:为了方便展示笔记,2.20 版本新增了 \lstinline{device=screen} 设备选项,大小为 MS Powerpoint 的纸张大小,比例为 4:3(2019/12/06)。 不同屏幕的选择为 \begin{lstlisting}[frame=none] @@ -83,9 +90,54 @@ \end{note} +\subsection{数学字体选项} + +本模板定义了一个数学字体选项(\lstinline{math}),可选项有三个: +\begin{enumerate} + \item \lstinline{math=cm}(默认),使用 \LaTeX{} 默认数学字体(推荐,无需声明); + \item \lstinline{math=newtx},使用 \lstinline{newtxmath} 设置数学字体(潜在问题比较多)。 + \item \lstinline{math=mtpro2},使用 \lstinline{mtpro2} 宏包设置数学字体,要求用户已经成功安装此宏包。 +\end{enumerate} + + +\subsection{中文字体选项} +模板提供中文字体选项 \lstinline{chinesefont},可选项有 +\begin{enumerate} +\item \lstinline{ctexfont}:默认选项,使用 \lstinline{ctex} 宏包根据系统自行选择字体,可能存在字体缺失的问题,更多内容参考 \lstinline{ctex} 宏包\href{https://ctan.org/pkg/ctex}{官方文档}\footnote{可以使用命令提示符,输入 \lstinline{texdoc ctex} 调出本地 \lstinline{ctex} 宏包文档}。 +\item \lstinline{founder}:方正字体选项,调用 \lstinline{ctex} 宏包并且使用 \lstinline{fontset=none} 选项,然后设置字体为方正四款免费字体,方正字体下载注意事项见后文。 +\item \lstinline{nofont}:调用 \lstinline{ctex} 宏包并且使用 \lstinline{fontset=none} 选项,不设定中文字体,用户可以自行设置中文字体,具体见后文。 +\end{enumerate} + +\noindent \textbf{注意:} 使用 \lstinline{founder} 选项或者 \lstinline{nofont} 时,必须使用 \hologo{XeLaTeX} 进行编译。 + +\subsubsection{方正字体选项} +由于使用 \lstinline{ctex} 宏包默认调用系统已有的字体,部分系统字体缺失严重,因此,用户希望能够使用其它字体,我们推荐使用方正字体。方正的{\songti 方正书宋}、{\heiti 方正黑体}、{\kaishu 方正楷体}、{\fangsong 方正仿宋}四款字体均可免费试用,且可用于商业用途。用户可以自行从\href{http://www.foundertype.com/}{方正字体官网}下载此四款字体,在下载的时候请\textbf{务必}注意选择 GBK 字符集,也可以使用 \href{https://www.latexstudio.net/}{\LaTeX{} 工作室}提供的\href{https://pan.baidu.com/s/1BgbQM7LoinY7m8yeP25Y7Q}{方正字体,提取码为:njy9} 进行安装。安装时,{\kaishu Win 10 用户请右键选择为全部用户安装,否则会找不到字体。} + +\begin{figure}[!htb] +\centering +\includegraphics[width=0.9\textwidth]{founder.png} +\end{figure} + +\subsubsection{其他中文字体} +如果你想完全自定义字体\footnote{这里仍然以方正字体为例。},你可以选择 \lstinline{chinesefont=nofont},然后在导言区设置 +\begin{lstlisting} +\setCJKmainfont[BoldFont={FZHei-B01},ItalicFont={FZKai-Z03}]{FZShuSong-Z01} +\setCJKsansfont[BoldFont={FZHei-B01},ItalicFont={FZHei-B01}]{FZHei-B01} +\setCJKmonofont[BoldFont={FZHei-B01},ItalicFont={FZHei-B01}]{FZFangSong-Z02} +\setCJKfamilyfont{zhsong}{FZShuSong-Z01} +\setCJKfamilyfont{zhhei}{FZHei-B01} +\setCJKfamilyfont{zhkai}{FZKai-Z03} +\setCJKfamilyfont{zhfs}{FZFangSong-Z02} +\newcommand*{\songti}{\CJKfamily{zhsong}} +\newcommand*{\heiti}{\CJKfamily{zhhei}} +\newcommand*{\kaishu}{\CJKfamily{zhkai}} +\newcommand*{\fangsong}{\CJKfamily{zhfs}} +\end{lstlisting} + + \subsection[颜色主题]{颜色主题\footnote{测试章节脚注。}} -本模板内置 5 套颜色主题,分别是 \textcolor{eblue}{blue}(默认),\textcolor{egreen}{green}, \textcolor{ecyan}{cyan}, \textcolor{sakura}{sakura}, \textcolor{black}{black}。如果不需要颜色,可以选择黑色(black)主题。颜色主题的设置方法: +本模板内置 5 套颜色主题,分别是 \textcolor{eblue}{blue}(默认),\textcolor{egreen}{green}, \textcolor{ecyan}{cyan}, \textcolor{sakura}{sakura} 和 \textcolor{black}{black}。如果不需要颜色,可以选择黑色(black)主题。颜色主题的设置方法: \begin{lstlisting}[frame=none] \documentclass[green]{elegantnote} \documentclass[color=green]{elegantnote} @@ -130,7 +182,7 @@ 我们将通过三个步骤定义可测函数的积分。首先定义非负简单函数的积分。以下设 $E$ 是 $\mathcal{R}^n$ 中的可测集。 \begin{definition}[可积性] -设 $ f(x)=\sum\limits_{i=1}^{k} a_i \chi_{A_i}(x)$ 是 $E$ 上的非负简单函数,其中 $\{A_1,A_2,\ldots$, $A_k\}$ 是 $E$ 上的一个可测分割,$a_1,a_2,\ldots,a_k$ 是非负实数。定义 $f$ 在 $E$ 上的积分为 +设 $ f(x)=\sum\limits_{i=1}^{k} a_i \chi_{A_i}(x)$ 是 $E$ 上的非负简单函数,其中 $\{A_1,A_2,\ldots$, $A_k\}$ 是 $E$ 上的一个可测分割,$a_1,a_2,\ldots,a_k$ 是非负实数。定义 $f$ 在 $E$ 上的积分为 1. 3 \begin{equation} \label{inter} \int_{E} f dx = \sum_{i=1}^k a_i m(A_i). @@ -187,7 +239,7 @@ Let $z$ be some element of $xH \cap yH$. Then $z = xa$ for some $a \in H$, and 目前 ElegantLaTeX 共有 4 名协作人员,分别是 \begin{itemize} \item 官方文档翻译: \href{https://github.com/peggy2006xzyz}{YPY}; - \item Github 维基维护: \href{https://github.com/izinngo}{Ingo Zinngo}、\href{https://github.com/xiaohao890809}{追寻原风景}; + \item GitHub 维基维护: \href{https://github.com/izinngo}{Ingo Zinngo}、\href{https://github.com/xiaohao890809}{追寻原风景}; \item QQ 群管理员: \href{https://github.com/sikouhjw}{Sikouhjw}. \end{itemize} @@ -196,9 +248,8 @@ Let $z$ be some element of $xH \cap yH$. Then $z = xa$ for some $a \in H$, and \section{致谢} -截止到 2019 年 12 月 08 日,ElegantNote 2.40 版本发布,ElegantNote 模板在 Github 上的收藏数(star)达到了 176。在此特别感谢 China\TeX{} 以及 \href{http://www.latexstudio.net/}{\LaTeX{} 工作室}对于本系列模板的大力宣传与推广。 +截止到 2020 年 04 月 12 日,ElegantNote 2.30 版本发布,ElegantNote 模板在 GitHub 上的收藏数(star)达到了 263。在此特别感谢 China\TeX{} 以及 \href{http://www.latexstudio.net/}{\LaTeX{} 工作室}对于本系列模板的大力宣传与推广。如果你喜欢我们的模板,你可以在 GitHub 上收藏(Star)我们的模板。 -如果你喜欢我们的模板,你可以在 Github 上收藏(Star)我们的模板。 \begin{figure}[htbp] \centering \includegraphics[width=\textwidth]{star.png} @@ -218,24 +269,41 @@ Let $z$ be some element of $xH \cap yH$. Then $z = xa$ for some $a \in H$, and \textbf{赞赏费用的使用解释权归 Elegant\LaTeX{} 所有,并且不接受监督,请自愿理性打赏}。10 元以上的赞赏,我们将列入捐赠榜,并且发放捐赠纪念证(全部),谢谢各位金主! \begin{table}[htbp] + \scriptsize \centering \caption{Elegant\LaTeX{} 系列模板捐赠榜} - \begin{tabular}{cccccccc} + \begin{tabular}{*{8}{>{\scriptsize}c}} \toprule \textbf{捐赠者} & \textbf{金额} & \textbf{时间} & \textbf{渠道} & \textbf{捐赠者} & \textbf{金额} & \textbf{时间} & \textbf{渠道} \\ \midrule - Lerh & 10 RMB & 2019/5/15 & 微信 & 刘志阔 & 99.99 RMB & 2019/10/15 & 支付宝 \\ - 越过地平线 & 10 RMB & 2019/5/15 & 微信 & *涛 & 16 RMB & 2019/10/17 & 微信 \\ - 银桑 & 20 RMB & 2019/5/27 & 微信 & 赤霓 & 12 RMB & 2019/10/17 & 支付宝 \\ - *空 & 10 RMB & 2019/5/30 & 微信 & 追寻原风景 & 10 RMB & 2019/10/28 & 微信 \\ - latexstudio.net & 666 RMB & 2019/6/5 & 支付宝 & 郭德良 & 88 RMB & 2019/11/3 & 微信 \\ - Cassis & 11 RMB & 2019/6/30 & 微信 & 自强不息 & 20 RMB & 2019/11/4 & 支付宝 \\ - *君 & 10 RMB & 2019/7/23 & 微信 & 读书之虫 & 20 RMB & 2019/11/18 & 微信 \\ - P*u & 50 RMB & 2019/7/30 & 微信 & *等 & 10 RMB & 2019/11/18 & 微信 \\ - *萌 & 19 RMB & 2019/8/28 & 微信 & *哲 & 20 RMB & 2019/11/18 & 微信 \\ - 曲豆豆 & 10 RMB & 2019/8/28 & 微信 & 佚名 & 10 RMB & 2019/11/24 & 微信 \\ - 李博 & 100 RMB & 2019/10/6 & 微信 & Jiye Qian & 66 RMB & 2019/12/4 & 微信 \\ - Njustsll & 10 RMB & 2019/10/11 & 微信 & 阳仔 & 20 RMB & 2019/12/5 & 微信 \\ + Lerh & 10 RMB & 2019/05/15 & 微信 & 越过地平线 & 10 RMB & 2019/05/15 & 微信 \\ + 银桑 & 20 RMB & 2019/05/27 & 微信 & *空 & 10 RMB & 2019/05/30 & 微信 \\ + latexstudio.net & 666 RMB & 2019/06/05 & 支付宝 & A*n & 40 RMB & 2019/06/15 & 微信 \\ + * 夏 & 22 RMB & 2019/06/15 & 微信 & * 倩 & 21 RMB & 2019/06/15 & 微信 \\ + Cassis & 11 RMB & 2019/06/30 & 微信 & *君 & 10 RMB & 2019/07/23 & 微信 \\ + P*u & 50 RMB & 2019/07/30 & 微信 & *萌 & 19 RMB & 2019/08/28 & 微信 \\ + 曲豆豆 & 10 RMB & 2019/08/28 & 微信 & 李博 & 100 RMB & 2019/10/06 & 微信 \\ + Njustsll & 10 RMB & 2019/10/11 & 微信 & 刘志阔 & 99.99 RMB & 2019/10/15 & 支付宝 \\ + * 韬 & 16 RMB & 2019/10/17 & 微信 & 赤霓 & 12 RMB & 2019/10/17 & 支付宝 \\ + 追寻原风景 & 10 RMB & 2019/10/28 & 微信 & 郭德良 & 88 RMB & 2019/11/03 & 微信 \\ + 自强不息 & 20 RMB & 2019/11/04 & 支付宝 & 读书之虫 & 20 RMB & 2019/11/18 & 微信 \\ + *等 & 10 RMB & 2019/11/18 & 微信 & *哲 & 20 RMB & 2019/11/18 & 微信 \\ + 佚名 & 10 RMB & 2019/11/24 & 微信 & Jiye Qian & 66 RMB & 2019/12/04 & 微信 \\ + * 阳 & 20 RMB & 2019/12/05 & 微信 & Catcher & 11 RMB & 2019/12/08 & 支付宝 \\ + 希尔波特门徒 & 10 RMB & 2019/12/09 & 支付宝 & * 伟 & 10 RMB & 2019/12/09 & 微信 \\ + Simon & 20 RMB & 2019/12/11 & 支付宝 & 流殇丶浅忆 & 66.60 RMB & 2019/12/18 & 支付宝 \\ + 羽 & 10 RMB & 2019/12/20 & 支付宝 & * 琛 & 15 RMB & 2019/12/20 & 微信 \\ + 随风 & 20 RMB & 2019/12/27 & 支付宝 & Ws & 23.30 RMB & 2019/12/28 & 微信 \\ + 初八 & 100 RMB & 2020/01/02 & 支付宝 & p*e & 20 RMB & 2020/01/03 & 微信 \\ + Shunmx & 100 RMB & 2020/01/03 & 微信 & hj & 10 RMB & 2020/01/03 & 微信 \\ + F*5 & 10 RMB & 2020/01/03 & 微信 & S*m & 20.20 RMB & 2020/01/03 & 微信 \\ + 二代青雉 & 13 RMB & 2020/01/14 & 支付宝 & *? & 66 RMB & 2020/01/15 & 微信 \\ + Mr. Xiong & 20 RMB & 2020/01/17 & 微信 & *博 & 15 RMB & 2020/01/18 & 微信 \\ + * 者 & 10 RMB & 2020/02/02 & 微信 & Jackie & 88.80 RMB & 2020/02/09 & 微信 \\ + Henry\_Sun、 & 50 RMB & 2020/02/14 & 支付宝 & * 桥 & 50 RMB & 2020/02/21 & 微信 \\ + 昀琏 & 10 RMB & 2020/03/02 & 支付宝 & S*y & 10 RMB & 2020/03/15 & 微信 \\ + * 哥 & 66.66 RMB & 2020/03/17 & 微信 & K*e & 30 RMB & 2020/03/30 & 微信\\ + * 阳 & 20 RMB & 2020/04/02 & 微信 & 士*n & 30 RMB & 2020/04/11 & 微信 \\ \bottomrule \end{tabular}% \label{tab:donation}% @@ -248,9 +316,9 @@ Let $z$ be some element of $xH \cap yH$. Then $z = xa$ for some $a \in H$, and \item \textit{如何删除版本信息?}\\ 导言区不写 \lstinline|\version{x.xx}| 即可。 \item \textit{如何删除日期?}\\ - 需要注意的是,与版本 \lstinline{\version} 不同的是,导言区不写或注释 \lstinline{\date} 的话,仍然会打印出当日日期,原因是 \lstinline{\date} 有默认参数。如果不需要日期的话,日期可以留空即可,也即 \lstinline|\date{}|。 + 与版本 \lstinline{\version} 不同的是,导言区不写或注释 \lstinline{\date} 的话,仍然会打印出当日日期,原因是 \lstinline{\date} 有默认参数。如果不需要日期的话,日期可以留空即可,也即 \lstinline|\date{}|。 \item \textit{如何获得中文日期?}\\ - 为了获得中文日期,必须在中文模式下\footnote{英文模式下,由于未加载中文宏包,无法输入中文。},使用 \lstinline|\date{\zhdate{2019/10/11}}|,如果需要当天的汉化日期,可以使用 \lstinline|\date{\zhtoday}|,这两个命令都来源于 \href{https://ctan.org/pkg/zhnumber}{\lstinline{zhnumber}} 宏包。 + 为了获得中文日期,必须在中文模式下,使用 \lstinline|\date{\zhdate{2019/12/09}}|,如果需要当天的汉化日期,可以使用 \lstinline|\date{\zhtoday}|,这两个命令都来源于 \href{https://ctan.org/pkg/zhnumber}{\lstinline{zhnumber}} 宏包。 \item \textit{如何添加多个作者?}\\ 在 \lstinline{\author} 里面使用 \lstinline{\and},作者单位可以用 \lstinline{\\} 换行。 \begin{lstlisting} @@ -258,27 +326,4 @@ Let $z$ be some element of $xH \cap yH$. Then $z = xa$ for some $a \in H$, and \end{lstlisting} \end{enumerate} - -\section{示例} - -\begin{lstlisting} -\documentclass[cn,hazy,blue,screen,14pt]{elegantnote} - -\title{ElegantNote Example} -\author{ddswhu} -\institute{Elegant\LaTeX{} Program} -% \version{1.00} -\date{} - -\begin{document} - -\maketitle - -\section{Introduction} - -The content of Introduction. - -\end{document} -\end{lstlisting} - \end{document} diff --git a/macros/latex/contrib/elegantnote/elegantnote-en.pdf b/macros/latex/contrib/elegantnote/elegantnote-en.pdf index 6a68df6671..7269b9a2d4 100644 Binary files a/macros/latex/contrib/elegantnote/elegantnote-en.pdf and b/macros/latex/contrib/elegantnote/elegantnote-en.pdf differ diff --git a/macros/latex/contrib/elegantnote/elegantnote-en.tex b/macros/latex/contrib/elegantnote/elegantnote-en.tex index 287911158f..198c0530a9 100644 --- a/macros/latex/contrib/elegantnote/elegantnote-en.tex +++ b/macros/latex/contrib/elegantnote/elegantnote-en.tex @@ -5,7 +5,7 @@ \author{Dongsheng Deng} \institute{Elegant\LaTeX{} Program} -\version{2.20} +\version{2.30} \date{\today} \begin{document} @@ -25,9 +25,13 @@ The new template has the following features: \item languages support: Chinese (default), English; \item support \hologo{pdfLaTeX} and \hologo{XeLaTeX}; \item prettier captions, list environments, and unified fonts; - \item custmized global font size: 8pt, 9pt, 10pt, 11pt, 12pt, 14pt, 17pt and 20pt. + \item custmized global font size: 8pt, 9pt, 10pt, 11pt, 12pt, 14pt, 17pt and 20pt; + \item support for math font options for \lstinline{newtx} and \lstinline{mtpro2}; + \item with the option of \lstinline{bibstyle} (default: apalike) for changing style of bibliography; + \item change the citation style with \lstinline{cite} option: \lstinline{authoryear}, \lstinline{numbers} and \lstinline{super}. \end{itemize} +This update is to resolve \TeX{} Live 2020 compilation errors caused by \lstinline{gbt7714} compatibility issues. \subsection{Optional Modes} @@ -79,6 +83,17 @@ You can also select the device by using a direct assignment method, such as: To get a normal A4paper size PDF, please select \lstinline{device=normal}. \end{note} +\subsection{Math Fonts} + +This template defines a new option (\lstinline{math}), with three options: + +\begin{enumerate} + \item \lstinline{math=cm} (default), use \LaTeX{} default math font (recommended). + \item \lstinline{math=newtx}, use \lstinline{newtxmath} math font (may bring about bugs). + \item \lstinline{math=mtpro2}, use \lstinline{mtpro2} package to set math font. +\end{enumerate} + + \subsection[Color Themes]{Color Themes\footnote{Test for chapter footnote.}} This template contains 5 color themes, \textcolor{egreen}{green}, \textcolor{ecyan}{cyan}, \textcolor{eblue}{blue}(default), \textcolor{sakura}{sakura} and \textcolor{black}{black}. If you don't need color, you can choose black theme. The color theme is enabled in the same way as before: @@ -205,10 +220,10 @@ So far, Elegant\LaTeX{} has four support members: Thank them all!!! \section{Acknowledgement} -The number of stars on Github for ElegantPaper reached 176 on Dec. 8, 2019 at the release of ElegantNote v2.40. +The number of stars on GitHub for ElegantPaper reached 176 on April 12, 2020 at the release of ElegantNote v2.20. Thank China\TeX{} and \href{http://www.latexstudio.net/}{\LaTeX{} studio} for their promotion. -If you like our templates, star on Github. +If you like our templates, star on GitHub. \begin{figure}[!ht] \centering \includegraphics[width=\textwidth]{star.png} @@ -226,23 +241,40 @@ To express your love for our templates and/or our developers, please do not hesi \begin{table}[htbp] \centering + \scriptsize \caption{Donation List} \begin{tabular}{cccccccc} \toprule \textbf{Tipper} & \textbf{Amount} & \textbf{Date} & \textbf{Channel} & \textbf{Tipper} & \textbf{Amount} & \textbf{Date} & \textbf{Channel} \\ \midrule - Lerh & 10 RMB & 2019/5/15 & Wechat & LIU ZhiKuo & 100 RMB & 2019/10/15 & Alipay \\ - DiPingXian & 10 RMB & 2019/5/15 & Wechat & * Tao & 16 RMB & 2019/10/17 & Wechat \\ - YinSang & 20 RMB & 2019/5/27 & Wechat & ChiHong & 12 RMB & 2019/10/17 & Alipay \\ - * Kong & 10 RMB & 2019/5/30 & Wechat & YuanFengJing & 10 RMB & 2019/10/28 & Wechat \\ - latexstudio.net & 666 RMB & 2019/6/05 & Alipay & GUO DeLiang & 88 RMB & 2019/11/03 & Wechat \\ - Cassis & 11 RMB & 2019/6/30 & Wechat & ZiQiangBuXi & 20 RMB & 2019/11/03 & Alipay \\ - * Jun & 10 RMB & 2019/7/23 & Wechat & DuShuZhiChong & 20 RMB & 2019/11/18 & Wechat \\ - P*u & 50 RMB & 2019/7/30 & Wechat & * Deng & 10 RMB & 2019/11/18 & Wechat \\ - * Meng & 19 RMB & 2019/8/28 & Wechat & * Zhe & 20 RMB & 2019/11/18 & Wechat \\ - QuDouDou & 10 RMB & 2019/8/28 & Wechat & anonymous & 10 RMB & 2019/11/24 & Wechat \\ - LI Bo & 100 RMB & 2019/10/06 & Wechat & Jiye Qian & 66 RMB & 2019/12/04 & Wechat \\ - Njustsll & 10 RMB & 2019/10/11 & Wechat & Boy Yang & 20 RMB & 2019/12/05 & Wechat \\ + Lerh & 10 RMB & 2019/05/15 & Wechat & yueguodipingxian & 10 RMB & 2019/05/15 & Wechat \\ + yinsang & 20 RMB & 2019/05/27 & Wechat & *kong & 10 RMB & 2019/05/30 & Wechat \\ + latexstudio.net & 666 RMB & 2019/06/05 & Alipay & A*n & 40 RMB & 2019/06/15 & Wechat \\ + * xia & 22 RMB & 2019/06/15 & Wechat & * qian & 21 RMB & 2019/06/15 & Wechat \\ + Cassis & 11 RMB & 2019/06/30 & Wechat & * jun & 10 RMB & 2019/07/23 & Wechat \\ + P*u & 50 RMB & 2019/07/30 & Wechat & * 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 & Liu Zhikuo & 99.99 RMB & 2019/10/15 & Alipay \\ + * tao & 16 RMB & 2019/10/17 & Wechat & Chini & 12 RMB & 2019/10/17 & Alipay \\ + yuanfengjing & 10 RMB & 2019/10/28 & Wechat & Guo Deliang & 88 RMB & 2019/11/03 & Wechat \\ + ziqiangbuxi & 20 RMB & 2019/11/04 & Alipay & dushuzhichong & 20 RMB & 2019/11/18 & Wechat \\ + * deng & 10 RMB & 2019/11/18 & Wechat & * zhe & 20 RMB & 2019/11/18 & Wechat \\ + anonymous & 10 RMB & 2019/11/24 & Wechat & Jiye Qian & 66 RMB & 2019/12/04 & Wechat \\ + * yang & 20 RMB & 2019/12/05 & Wechat & Catcher & 11 RMB & 2019/12/08 & Alipay \\ + xierbotementu & 10 RMB & 2019/12/09 & Alipay & * wei & 10 RMB & 2019/12/09 & Wechat \\ + Simon & 20 RMB & 2019/12/11 & Alipay & liushangqianyi & 66.60 RMB & 2019/12/18 & Alipay \\ + yu & 10 RMB & 2019/12/20 & Alipay & *chen & 15 RMB & 2019/12/20 & Wechat \\ + suifeng & 20 RMB & 2019/12/27 & Alipay & Ws & 23.30 RMB & 2019/12/28 & Wechat \\ + chuba & 100 RMB & 2020/01/02 & Alipay & p*e & 20 RMB & 2020/01/03 & Wechat \\ + Shunmx & 100 RMB & 2020/01/03 & Wechat & hj & 10 RMB & 2020/01/03 & Wechat \\ + F*5 & 10 RMB & 2020/01/03 & Wechat & S*m & 20.20 RMB & 2020/01/03 & Wechat \\ + erdaiqingzhi & 13 RMB & 2020/01/14 & Alipay & *? & 66 RMB & 2020/01/15 & Wechat \\ + Mr. Xiong & 20 RMB & 2020/01/17 & Wechat & *bo & 15 RMB & 2020/01/18 & Wechat \\ + *Zhe & 10 RMB & 2020/02/02 & Wechat & Jackie & 88.80 RMB & 2020/02/09 & Wechat \\ + Henry\_Sun & 50 RMB & 2020/02/14 & Alipay & * Qiao & 50 RMB & 2020/02/21 & Wechat \\ + YunLian & 10 RMB & 2020/03/02 & Alipay & S*y & 10 RMB & 2020/03/15 & Wechat \\ + * Ge & 66.66 RMB & 2020/03/17 & Wechat & K*e & 30 RMB & 2020/03/30 & Wechat\\ + * Yang & 20 RMB & 2020/04/02 & Wechat & Shi*n & 30 RMB & 2020/04/11 & Wechat \\ \bottomrule \end{tabular}% \label{tab:donation}% @@ -263,26 +295,5 @@ To express your love for our templates and/or our developers, please do not hesi \end{lstlisting} \end{enumerate} -\section{A Minimal Example} - -\begin{lstlisting} -\documentclass[en,hazy,blue,screen,14pt]{elegantnote} - -\title{ElegantNote Example} -\author{ddswhu} -\institute{Elegant\LaTeX{} Program} -% \version{1.00} -\date{} - -\begin{document} - -\maketitle - -\section{Introduction} - -The content of Introduction. - -\end{document} -\end{lstlisting} \end{document} diff --git a/macros/latex/contrib/elegantnote/elegantnote.cls b/macros/latex/contrib/elegantnote/elegantnote.cls index 549745689e..fac84ea40d 100644 --- a/macros/latex/contrib/elegantnote/elegantnote.cls +++ b/macros/latex/contrib/elegantnote/elegantnote.cls @@ -4,57 +4,60 @@ % Lastest Version: https://github.com/ElegantLaTeX/ElegantNote % --- Class structure: identification part -\ProvidesClass{elegantnote}[2018/12/09 ElegantNote v2.20 class] +\ProvidesClass{elegantnote}[2020/04/12 ElegantNote v2.30 class] \NeedsTeXFormat{LaTeX2e} \RequirePackage{kvoptions} -\RequirePackage{ifthen} -\RequirePackage{ifxetex} \RequirePackage{etoolbox} \RequirePackage{calc} -\SetupKeyvalOptions{ - family=ELEGANT, - prefix=ELEGANT@, - setkeys=\kvsetkeys} - +\SetupKeyvalOptions{family=ELEGANT,prefix=ELEGANT@,setkeys=\kvsetkeys} \newcommand{\ekv}[1]{\kvsetkeys{ELEGANT}{#1}} -% ----- Colors ----- \DeclareStringOption[blue]{color} -\DeclareStringOption[pad]{device} -\DeclareStringOption[cn]{lang} -\DeclareStringOption{mode} -% ----- backward compatibility \DeclareVoidOption{green}{\ekv{color=green}} \DeclareVoidOption{cyan}{\ekv{color=cyan}} \DeclareVoidOption{blue}{\ekv{color=blue}} \DeclareVoidOption{sakura}{\ekv{color=sakura}} \DeclareVoidOption{black}{\ekv{color=black}} - +\DeclareStringOption[pad]{device} \DeclareVoidOption{pc}{\ekv{device=pc}} \DeclareVoidOption{pad}{\ekv{device=pad}} \DeclareVoidOption{kindle}{\ekv{device=kindle}} \DeclareVoidOption{normal}{\ekv{device=normal}} \DeclareVoidOption{screen}{\ekv{device=screen}} +\DeclareStringOption[cn]{lang} \DeclareVoidOption{cn}{\ekv{lang=cn}} \DeclareVoidOption{en}{\ekv{lang=en}} +\DeclareStringOption{mode} \DeclareVoidOption{geye}{\ekv{mode=geye}} \DeclareVoidOption{hazy}{\ekv{mode=hazy}} +\DeclareStringOption[ctexfont]{chinesefont} +\DeclareVoidOption{ctexfont}{\ekv{chinesefont=ctexfont}} +\DeclareVoidOption{founder}{\ekv{chinesefont=founder}} +\DeclareVoidOption{nofont}{\ekv{chinesefont=nofont}} + \DeclareStringOption[numbers]{cite} \DeclareVoidOption{numbers}{\ekv{cite=numbers}} \DeclareVoidOption{authoryear}{\ekv{cite=authoryear}} \DeclareVoidOption{super}{\ekv{cite=super}} +\DeclareStringOption[apalike]{bibstyle} + \DeclareStringOption[11pt]{fontsize} \DeclareVoidOption{10pt}{\ekv{fontsize=10pt}} \DeclareVoidOption{11pt}{\ekv{fontsize=11pt}} \DeclareVoidOption{12pt}{\ekv{fontsize=12pt}} +\DeclareStringOption[cm]{math} +\DeclareVoidOption{newtx}{\ekv{math=newtx}} +\DeclareVoidOption{mtpro2}{\ekv{math=mtpro2}} +\DeclareVoidOption{cm}{\ekv{math=cm}} + \DeclareDefaultOption{ \PassOptionsToClass{\CurrentOption}{article} } @@ -62,35 +65,79 @@ \LoadClass{article} - -\RequirePackage{amsmath,amsthm} \PassOptionsToPackage{no-math}{fontspec} +\RequirePackage{amsmath,amsthm} + +\RequirePackage{iftex} + \ifdefstring{\ELEGANT@lang}{cn}{% - \RequirePackage[ - UTF8, - scheme=plain, - punct=kaiming]{ctex} +\ifXeTeX + \ifdefstring{\ELEGANT@chinesefont}{founder}{ + \RequirePackage[UTF8,scheme=plain,fontset=none]{ctex} + \setCJKmainfont[BoldFont={FZHei-B01},ItalicFont={FZKai-Z03}]{FZShuSong-Z01} + \setCJKsansfont[BoldFont={FZHei-B01},ItalicFont={FZHei-B01}]{FZHei-B01} + \setCJKmonofont[BoldFont={FZHei-B01},ItalicFont={FZHei-B01}]{FZFangSong-Z02} + \setCJKfamilyfont{zhsong}{FZShuSong-Z01} + \setCJKfamilyfont{zhhei}{FZHei-B01} + \setCJKfamilyfont{zhkai}{FZKai-Z03} + \setCJKfamilyfont{zhfs}{FZFangSong-Z02} + \newcommand*{\songti}{\CJKfamily{zhsong}} + \newcommand*{\heiti}{\CJKfamily{zhhei}} + \newcommand*{\kaishu}{\CJKfamily{zhkai}} + \newcommand*{\fangsong}{\CJKfamily{zhfs}}}{\relax} + + \ifdefstring{\ELEGANT@chinesefont}{nofont}{ + \RequirePackage[UTF8,scheme=plain,fontset=none]{ctex}}{\relax} + + \ifdefstring{\ELEGANT@chinesefont}{ctexfont}{ + \RequirePackage[UTF8,scheme=plain]{ctex}}{\relax} + \else + \ifdefstring{\ELEGANT@chinesefont}{ctexfont}{ + \RequirePackage[UTF8,scheme=plain]{ctex}}{\relax} + \fi + \AfterEndPreamble{ + % \renewcommand{\itshape}{\kaishu} + \setlength\parindent{2\ccwd}} }{\relax} -% newtxtext and newtxmath pkg -\RequirePackage{newtxtext} -\RequirePackage{newtxmath} -\RequirePackage{esint} +\ifcsname kaishu\endcsname + \newcommand{\citshape}{\kaishu} +\else + \newcommand{\citshape}{\itshape} +\fi +\ifcsname kaishu\endcsname + \newcommand{\cnormal}{\kaishu} +\else + \newcommand{\cnormal}{\normalfont} +\fi +\ifcsname fangsong\endcsname + \newcommand{\cfs}{\fangsong} +\else + \newcommand{\cfs}{\normalfont} +\fi -%%% use yhmath pkg, uncomment following code -% \let\oldwidering\widering -% \let\widering\undefined -% \RequirePackage{yhmath} -% \let\widering\oldwidering -%%% use esvect pkg, uncomment following code -% \RequirePackage{esvect} +\RequirePackage{newtxtext} +\ifdefstring{\ELEGANT@math}{newtx}{ + \RequirePackage{newtxmath} + \let\Bbbk\relax + \RequirePackage{esint} + %%% use yhmath pkg, uncomment following code + % \let\oldwidering\widering + % \let\widering\undefined + % \RequirePackage{yhmath} + % \let\widering\oldwidering + + %%% use esvect pkg, uncomment following code + % \RequirePackage{esvect} + + \DeclareSymbolFont{CMlargesymbols}{OMX}{cmex}{m}{n} + \let\sumop\relax\let\prodop\relax + \DeclareMathSymbol{\sumop}{\mathop}{CMlargesymbols}{"50} + \DeclareMathSymbol{\prodop}{\mathop}{CMlargesymbols}{"51} +}{\relax} -\DeclareSymbolFont{CMlargesymbols}{OMX}{cmex}{m}{n} -\let\sumop\relax\let\prodop\relax -\DeclareMathSymbol{\sumop}{\mathop}{CMlargesymbols}{"50} -\DeclareMathSymbol{\prodop}{\mathop}{CMlargesymbols}{"51} \RequirePackage{indentfirst} \RequirePackage{anyfontsize} @@ -148,29 +195,19 @@ } \let\openbox\relax -\newtheoremstyle{plain}{3pt}{3pt}{% - \ifdefstring{\ELEGANT@lang}{en}{% - \itshape}{% - \kaishu}}{}{% +\newtheoremstyle{plain}{\topsep}{\topsep}{\citshape}{}{% \color{ecolor}\bfseries}{}{% 0.5em}{% \thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}} -\newtheoremstyle{definition}{3pt}{3pt}{% - \ifdefstring{\ELEGANT@lang}{en}{% - \itshape}{% - \kaishu}}{}{% +\newtheoremstyle{definition}{\topsep}{\topsep}{\citshape}{}{% \color{ecolor}\bfseries}{}{% 0.5em}{} -\newtheoremstyle{remark}{3pt}{3pt}{ - \ifdefstring{\ELEGANT@lang}{en}{ - \itshape}{ - \kaishu}}{}{ +\newtheoremstyle{remark}{\topsep}{\topsep}{\cnormal}{}{ \color{ecolor}\bfseries}{}{ 0.5em}{} - % caption settings \RequirePackage{caption} \captionsetup{ @@ -182,26 +219,6 @@ \RequirePackage[shortlabels,inline]{enumitem} \setlist{nolistsep} - -\RequirePackage[sort&compress]{natbib} -\setlength{\bibsep}{0.0pt} -\def\bibfont{\footnotesize} - - -% headings -\RequirePackage{fancyhdr} -\fancyhf{} -\pagestyle{fancy} -\rfoot{\footnotesize\textcolor{gray}{\thepage}} -\renewcommand{\headrulewidth}{0pt} -\renewcommand{\footrulewidth}{0pt} - -\fancypagestyle{plain}{% - \renewcommand{\headrulewidth}{0pt}% - \fancyhf{}% - \fancyfoot[R]{ - \footnotesize \textcolor{gray}{\thepage}}} - \RequirePackage[flushmargin,stable]{footmisc} \setlength{\footnotesep}{12pt} @@ -230,7 +247,6 @@ \definecolor{ecyan}{RGB}{0,175,152} \definecolor{eblue}{RGB}{20,50,104} \definecolor{sakura}{RGB}{255,183,197} -% \definecolor{black}{RGB}{255,183,197} %% device settings %% default=pad @@ -279,12 +295,28 @@ footskip=0.6cm}}{% \relax} +% headings +\RequirePackage{fancyhdr} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} + +\fancypagestyle{fancy-note}{ + \fancyhf{} % clear header/footer settings + \fancyfoot[C]{\footnotesize\textcolor{gray}{\thepage}} +} + +\fancypagestyle{plain}{% + \fancyhf{} + \fancyfoot[R]{\footnotesize\textcolor{gray}{\thepage}}} + +\pagestyle{fancy-note} + \ifdefstring{\ELEGANT@lang}{cn}{% \theoremstyle{plain}% default \newtheorem{theorem}{定理}[section] % \newtheorem{lemma}[theorem]{引理} % - \newtheorem{proposition}[theorem]{性质} % + \newtheorem{proposition}[theorem]{命题} % \newtheorem*{corollary}{推论} % \theoremstyle{definition} % \newtheorem{definition}{定义}[section] % @@ -304,8 +336,13 @@ \setlength{\parindent}{2em} \newcommand{\keywords}[1]{% \vskip2ex\par\noindent\normalfont{\bfseries 关键词: } #1} - \RequirePackage[\ELEGANT@cite]{gbt7714}}{% - \relax} + \RequirePackage{gbt7714} + \ifdefstring{\ELEGANT@cite}{authoryear}{ + \bibliographystyle{gbt7714-author-year}}{ + \bibliographystyle{gbt7714-numerical}} + \ifdefstring{\ELEGANT@cite}{numbers}{ + \citestyle{numbers}}{\relax} + }{\relax} \ifdefstring{\ELEGANT@lang}{en}{ \theoremstyle{plain}% default @@ -325,9 +362,12 @@ \normalfont\bfseries\color{ecolor} Proof} \newcommand\versiontext{Version: }% \newcommand\updatetext{Update: }% - \bibliographystyle{aer}}{% + \RequirePackage[\ELEGANT@cite,sort&compress]{natbib} + \bibliographystyle{\ELEGANT@bibstyle}}{% \relax} +\setlength{\bibsep}{0.0pt} +\def\bibfont{\footnotesize} \def\IfEmpty#1{% \edef\1{\the#1} @@ -392,17 +432,11 @@ \IfEmpty\version \else - {\normalfont\ifdefstring{\ELEGANT@lang}{en}{ - \itshape}{% - \kaishu} - \versiontext\the\version \\} + {\normalfont\citshape\versiontext\the\version \\} \fi \ifx\@date\empty \else - {\normalfont\ifdefstring{\ELEGANT@lang}{en}{ - \itshape}{% - \kaishu} - \updatetext\@date}% + {\normalfont\citshape\updatetext\@date}% \fi \end{center}% \par} @@ -434,7 +468,7 @@ \lstdefinestyle{estyle}{ basicstyle=% \ttfamily - \lst@ifdisplaystyle\footnotesize\fi} + \lst@ifdisplaystyle\small\fi} % \lstset{ % basicstyle=\scriptsize\ttfamily, @@ -481,11 +515,16 @@ device, color, mode, + chinesefont, + cite, + bibstyle, + math, lang, amsthm}, emphstyle={\color{frenchplum}}, morekeywords={% DeclareSymbolFont, + setCJKfamilyfont, SetSymbolFont, toprule, midrule, diff --git a/macros/latex/contrib/elegantnote/image/founder.png b/macros/latex/contrib/elegantnote/image/founder.png new file mode 100644 index 0000000000..7f68e73c6a Binary files /dev/null and b/macros/latex/contrib/elegantnote/image/founder.png differ diff --git a/macros/latex/contrib/elegantnote/image/star.png b/macros/latex/contrib/elegantnote/image/star.png index fee5d42451..26fbd607df 100644 Binary files a/macros/latex/contrib/elegantnote/image/star.png and b/macros/latex/contrib/elegantnote/image/star.png differ -- cgit v1.2.3