diff options
author | Karl Berry <karl@freefriends.org> | 2019-08-18 20:46:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-08-18 20:46:55 +0000 |
commit | 56c371d7fc852f154dcf8b66e2b8320661be6208 (patch) | |
tree | e60b38a28e115c79513b307b3227313555b97778 | |
parent | 2eeb14790650dc914a3a310a620dedbeac90ef18 (diff) |
elegantbook (18aug19)
git-svn-id: svn://tug.org/texlive/trunk@51901 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/elegantbook/README.md | 65 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/elegantbook/elegantbook-cn.pdf | bin | 1280616 -> 1294115 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/elegantbook/elegantbook-cn.tex | 239 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/elegantbook/elegantbook-en.pdf | bin | 1256075 -> 1290888 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/elegantbook/elegantbook-en.tex | 189 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/elegantbook/image/star-history.png | bin | 0 -> 20961 bytes | |||
-rw-r--r-- | Master/texmf-dist/tex/latex/elegantbook/elegantbook.cls | 231 |
7 files changed, 462 insertions, 262 deletions
diff --git a/Master/texmf-dist/doc/latex/elegantbook/README.md b/Master/texmf-dist/doc/latex/elegantbook/README.md index 574386973bf..507bd30321e 100644 --- a/Master/texmf-dist/doc/latex/elegantbook/README.md +++ b/Master/texmf-dist/doc/latex/elegantbook/README.md @@ -1,7 +1,7 @@ <!-- Author : Dongsheng Deng & Liam Huang--> <!-- Program Email: elegantlatex2e@gmail.com --> -# ElegantBook +# ElegantBook: An Elegant LaTeX Template for Books [Homepage](https://elegantlatex.org/) | [Github](https://github.com/ElegantLaTeX/ElegantBook) | [CTAN](https://ctan.org/pkg/elegantbook) | [Download](https://github.com/ElegantLaTeX/ElegantBook/releases) | [Wiki](https://github.com/ElegantLaTeX/ElegantBook/wiki) | [Weibo](https://weibo.com/elegantlatex) @@ -12,14 +12,69 @@ ElegantBook is designed for books. Just enjoy it! If you have any questions, suggestions or bug reports, you can create issues or contact us at elegantlatex2e@gmail.com. -如果你有其他问题、建议或者报告 bug,可以提交 issues 或者给我们发邮件:elegantlatex2e@gmail.com。最近我们新建了一个 QQ 用户交流群(Q 群:692108391),欢迎加入。 +ElegantBook 是为 LaTeX 书籍写作而设计的模板,如果你有其他问题、建议或者报告 bug,可以提交 issues 或者给我们发邮件:elegantlatex2e@gmail.com。QQ 用户交流群:692108391,欢迎加入。 -**注意:** 由于新版本进行了重构,并且 3.6 版本对于封面进行了改版,3.6 以后的版本并不兼容之前版本,如果你想把之前版本的文件转为 3.6 以后的版本,请查看[跨版本转换](https://github.com/ElegantLaTeX/ElegantBook/wiki/convert)。 +## 重要提示 + +**Version Note** Users for 2.x, please refer to [Version Convert](https://github.com/ElegantLaTeX/ElegantBook/wiki/convert). + +**版本提醒:** 由于新版本进行了重构,并且 3.6 版本对于封面进行了改版,3.6 以后的版本并不兼容之前版本,如果你想把之前版本的文件转为 3.6 以后的版本,请查看[跨版本转换](https://github.com/ElegantLaTeX/ElegantBook/wiki/convert)。 + +**Important Info** For some reasons, pull request is unacceptable since May 20, 2019. For those who want to help revise the templates, submit issues or clone to your own repository to modify under the constriction of LPPL-1.3c. **重要提示:出于某些因素的考虑,ElegantLaTeX 项目自 2019 年 5 月 20 日开始,不再接受任何非作者预约性质的提交(pull request)!如果你想改进模板,你可以给我们提交 issue,或者可以在遵循协议的情况下,克隆到自己仓库下进行修改**。 -# License + + +## Acknowledgement 致谢 + +The number of stars on Github for ElegantBook reached 100 on May 20, 2019. + +2019 年 5 月 20 日,ElegantBook 模板在 Github 上的 Star 数达到了 100,这对于 ElegantLaTeX 系列模板是一个非常重要的里程碑! + +Thank ChinaTeX and [LaTeX Studio](http://www.latexstudio.net/) for their promotion. LaTeX studio offers tons of valuable posts and templates for discovery. It is the most comprehensive website on LaTeX in China. Thank [muzimuzhi](https://github.com/muzimuzhi) for the revision of the template. + +在此特别感谢 ChinaTeX 以及 [LaTeX 工作室](http://www.latexstudio.net/)对于本系列模板的大力宣传与推广。LaTeX 工作室网站上有很多精彩的帖子和精致的模板,欢迎大家去挖掘里面的宝藏。这也是我所见到的国内最全面的 LaTeX 相关的网站。特别感谢 [muzimuzhi](https://github.com/muzimuzhi) 对于模板的完善。 + +If you like our template, star on Github. + +如果你喜欢我们的模板,你可以在 Github 上收藏我们的模板。 + + +## 捐赠 + +To express your love for our templates and/or our developers, please do not hesitate to tip us. Since last release of 3.08, we have received about a thousand RMB! (The emergence of a millionaire is on the way. Loading... ) + +如果您非常喜爱我们的模板或者我,你还可以选择捐赠以表达您对我们模板和我的支持。本模板自 3.08 版本发布了捐赠信息之后,收到了近千元的捐赠(四舍五入就是一个亿),非常感谢! + +![](https://github.com/ElegantLaTeX/ElegantBook/wiki/donate.jpg) + +The explanation right of the tip usage belongs to ElegantLaTeX with no supervision. Feel free to tip us. Those who donate more than 10 RMB will be recorded in the Donation List. Thank all the tippers! + +**赞赏费用的使用解释权归 ElegantLaTeX 所有,并且不接受监督,请自愿理性打赏**。10 元以上的赞赏,我们将列入捐赠榜,谢谢各位金主! + +| 捐赠者/Tipper | 金额/Amount | 时间/Date | 渠道/Channel | +| :------: | :----: | :----: | :------: | +| Lerh | 10 RMB | 2019/05/15 | 微信/Wechat | +| 越过地平线 | 10 RMB | 2019/05/15 | 微信/Wechat | +| 大熊 | 20 RMB | 2019/05/27 | 微信/Wechat | +| 佚名 | 10 RMB | 2019/05/30 | 微信/Wechat | +| [latexstudio.net](http://www.latexstudio.net/) | 666 RMB | 2019/06/05 | 支付宝/Alipay | +| Cassis | 11 RMB | 2019/06/30 | 微信/Wechat | +| 佚名 | 10 RMB | 2019/07/23 | 微信/Wechat | + +Thank you all. + +再次感谢大家对于模板的喜爱! + +## License 协议 This work is released under the LaTeX Project Public License, v1.3c or later. -本模板发布遵循 LaTeX 项目公共许可证 1.3 c 或更高版本。 +本模板发布遵循 LaTeX 项目公共许可证 1.3 c 或更高版本。如果是衍生作品,请务必加入协议声明和模板信息(github、CTAN 地址)。 + +## Derived Works 衍生与拓展开发 + ++ [ElegantBookdown](https://github.com/XiangyunHuang/ElegantBookdown):[XiangyunHuang](https://github.com/XiangyunHuang) 开发并维护的基于 ElegantBook 的 Bookdown 模板。 ++ [bookdownplus](https://github.com/pzhaonet/bookdownplus):应网友要求,[pzhaonet](https://github.com/pzhaonet) 在 bookdownplus 收录了 ElegantPaper 模板,并为 Mac 做了字体适配。 ++ [PanBook](https://github.com/annProg/PanBook):[annProg](https://github.com/annProg) 开发并维护的基于 Markdown 写作的工作流,收录了 ElegantBook 和 ElegantPaper 模板。 diff --git a/Master/texmf-dist/doc/latex/elegantbook/elegantbook-cn.pdf b/Master/texmf-dist/doc/latex/elegantbook/elegantbook-cn.pdf Binary files differindex 161a1fe7f12..e5d763c9b95 100644 --- a/Master/texmf-dist/doc/latex/elegantbook/elegantbook-cn.pdf +++ b/Master/texmf-dist/doc/latex/elegantbook/elegantbook-cn.pdf diff --git a/Master/texmf-dist/doc/latex/elegantbook/elegantbook-cn.tex b/Master/texmf-dist/doc/latex/elegantbook/elegantbook-cn.tex index 6132899e278..beb8d3c08a9 100644 --- a/Master/texmf-dist/doc/latex/elegantbook/elegantbook-cn.tex +++ b/Master/texmf-dist/doc/latex/elegantbook/elegantbook-cn.tex @@ -1,4 +1,4 @@ -\documentclass[cn,11pt]{elegantbook} +\documentclass[cn,11pt,twocol]{elegantbook} \title{ElegantBook:优美的 \LaTeX{} 书籍模板} \subtitle{Elegant\LaTeX{} 经典之作} @@ -6,21 +6,19 @@ \author{Ethan Deng \& Liam Huang} \institute{Elegant\LaTeX{} Program} \date{\today} -\version{3.08} +\version{3.09} \extrainfo{Victory won\rq t come to us unless we go to it. --- M. Moore} \logo{logo.png} \cover{cover.jpg} - - \begin{document} \maketitle + \tableofcontents -% \thispagestyle{empty} \mainmatter \hypersetup{pageanchor=true} @@ -30,7 +28,8 @@ Elegant\LaTeX{} 项目组致力于打造一系列美观、优雅、简便的模板方便用户使用。目前由 \href{https://github.com/ElegantLaTeX/ElegantNote}{ElegantNote},\href{https://github.com/ElegantLaTeX/ElegantBook}{ElegantBook},\href{https://github.com/ElegantLaTeX/ElegantPaper}{ElegantPaper} 组成,分别用于排版笔记,书籍和工作论文。强烈推荐使用最新正式版本!本文将介绍本模板的一些设置内容以及基本使用方法。如果您有其他问题,建议或者意见,欢迎在 Github 上给我们提交 \href{https://github.com/ElegantLaTeX/ElegantBook/issues}{issues} 或者邮件联系我们。 -我们的相关联系方式: + +我们的联系方式: \begin{itemize} \item 官网:\href{https://elegantlatex.org/}{https://elegantlatex.org/} \item Github 网址:\href{https://github.com/ElegantLaTeX/}{https://github.com/ElegantLaTeX/} @@ -45,22 +44,18 @@ Elegant\LaTeX{} 项目组致力于打造一系列美观、优雅、简便的模 \section{ElegantBook 更新说明} -此次更新主要涉及 + +此次更新主要有 \begin{enumerate} -\item 修复 \lstinline|\part| 命令; -\item 增加 pad 模式; -\item 增加 mtpro2 宏包选项支持; -\item 修改参考文献默认为 numbers 格式; -\item 增加章节介绍 introduction 环境; -\item 增加章节习题 problemset 环境; -\item 增加旁注,\lstinline{\elegantpar} 命令(测试); -\item 减少公式前后距离; -\item \lstinline{\equote} 改为 \lstinline{\extrainfo},并且多行显示; -\item 完善文档,增加致谢等部分。 +\item 删除 \lstinline{\elegantpar} 命令; +\item 修复符号字体设置; +\item 增加双栏目录选项; +\item 修改脚注格式; +\item 其他。 \end{enumerate} \begin{note} -由于新版本进行了重构,3.x 版本并不兼容 2.x 版本,并且在 3.06 版本更新过封面,如果你想把 3.06 版本(包括 2.x 版本)之前的文件转为最新版本兼容的文件,请仔细查看\href{https://github.com/ElegantLaTeX/ElegantBook/wiki/convert}{跨版本转换}。今后不再回答关于 2.x 版本的问题。 +2.x 版本的用户请仔细查看\href{https://github.com/ElegantLaTeX/ElegantBook/wiki/convert}{跨版本转换}。 \end{note} \section{模板安装与更新} @@ -83,7 +78,7 @@ Elegant\LaTeX{} 项目组致力于打造一系列美观、优雅、简便的模 更多关于 \TeX{} Live 2019 的安装使用以及 C\TeX{} 与 \TeX{} Live 的兼容、系统路径问题,请参考官方文档以及啸行的\href{https://github.com/OsbertWang/install_latex/releases}{一份简短的安装 \LaTeX{} 的介绍}。 \section{在线使用模板} -考虑到用户的在线合作需求,我们把三套模板全部上传到 \href{https://www.overleaf.com/}{Overleaf} 上了,网络通畅的用户可以直接通过 Overleaf 在线使用我们的模板。这样的好处是无需安装 \TeX{} Live 2019,可以随时随地访问自己的文件。查找模板,请在 Overleaf 模板库里面搜索 \lstinline{elegantlatex} 即可,你也可以直接访问\href{https://www.overleaf.com/latex/templates?addsearch=elegantlatex}{搜索结果}。选择适当的模板之后,将其 \lstinline{Open as Template},即可把模板存到自己账户下,然后可以自由编辑以及与别人一起协作。更多关于 Overleaf 的介绍和使用,请参考 Overleaf 的\href{https://www.overleaf.com/learn}{官方文档}。 +我们把三套模板全部上传到 \href{https://www.overleaf.com/}{Overleaf} 上了,网络便利的用户可以直接通过 Overleaf 在线使用我们的模板。使用 Overleaf 的好处是无需安装 \TeX{} Live 2019,可以随时随地访问自己的文件。查找模板,请在 Overleaf 模板库里面搜索 \lstinline{elegantlatex} 即可,你也可以直接访问\href{https://www.overleaf.com/latex/templates?addsearch=elegantlatex}{搜索结果}。选择适当的模板之后,将其 \lstinline{Open as Template},即可把模板存到自己账户下,然后可以自由编辑以及与别人一起协作。更多关于 Overleaf 的介绍和使用,请参考 Overleaf 的\href{https://www.overleaf.com/learn}{官方文档}。 \begin{remark} Overleaf 上,中文需要使用 \lstinline{XeLaTeX} 进行编译,英文可以使用 \lstinline{PDFLaTeX} 与 \lstinline{XeLaTeX} 进行编译。 @@ -92,18 +87,28 @@ Overleaf 上,中文需要使用 \lstinline{XeLaTeX} 进行编译,英文可 \section{用户作品计划} Elegant\LaTeX{} 系列模板从创立至今已经有 8 年了,我们的模板也受到了很多用户的喜爱,在此,为了促进模板用户之间的交流,了解用户需求,完善本模板,我们将建立一个区域专门展示用户的文档,包括但不限于 Github 和官网等。如果你愿意将自己的作品展示出来,请邮件或者其他方式联系我们。如果自己代码已经传到 Github 或者 Gitee 等网站,可以提供对应网址。 + +\centerline{\textcolor{red}{\bfseries 广告位招租!}} + \section{关于提交} 出于某些因素的考虑,Elegant\LaTeX{} 项目自 2019 年 5 月 20 日开始,\textbf{不再接受任何非作者预约性质的提交}(pull request)!如果你想改进模板,你可以给我们提交 issues,或者可以在遵循协议(LPPL-1.3c)的情况下,克隆到自己仓库下进行修改。 \section{协作人员招募} 招募 Elegant\LaTeX{} 的协作人员,没有工资。工作内容:翻译 Elegant\LaTeX{} 系列模板相关的文稿(中文->英文),维护模板的 wiki(主要涉及 Markdown 语法),如果有公众号文稿写作经历的话,也可以帮忙写微信稿。本公告长期有效。 -\section{致谢} -2019 年 5 月 20 日,ElegantBook 模板在 Github 上的 star 数达到了 100,并且 21 日上了 Github 网站 \TeX{} 语言的\href{https://github.com/trending/tex?since=daily}{日趋势榜单}。这对于 Elegant\LaTeX{} 系列模板都是一个里程碑! +目前 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 QQ 群管理员: \href{https://github.com/sikouhjw}{Sikouhjw}. +\end{itemize} -在此特别感谢 China\TeX{} 以及 \href{http://www.latexstudio.net/}{\LaTeX{} 工作室}对于本系列模板的大力宣传与推广。\LaTeX{} 工作室网站上有很多精彩的帖子和精致的模板,欢迎大家去挖掘里面的宝藏。这也是国内最全面的 \LaTeX{} 相关的网站。 +在此感谢他们无私的奉献! -特别感谢 \href{https://github.com/muzimuzhi}{muzimuzhi} 对于模板的完善。 +\section{致谢} +2019 年 5 月 20 日,ElegantBook 模板在 Github 上的收藏数(star)达到了 100\footnote{截止 2019 年 8 月 18 日 3.09 版本正式发布,star 数为 189。}。 + +在此特别感谢 China\TeX{} 以及 \href{http://www.latexstudio.net/}{\LaTeX{} 工作室}对于本系列模板的大力宣传与推广。\LaTeX{} 工作室网站上有很多精彩的帖子和精致的模板,欢迎大家去挖掘里面的宝藏。这也是国内最全面的 \LaTeX{} 相关的网站。也非常感谢 \href{https://github.com/muzimuzhi}{muzimuzhi} 对于模板的完善。 如果你喜欢我们的模板,你可以在 Github 上收藏我们的模板。 \begin{figure}[htbp] @@ -112,34 +117,43 @@ Elegant\LaTeX{} 系列模板从创立至今已经有 8 年了,我们的模板 \caption{一键三连求赞} \end{figure} -之前我们模板从未发布过捐赠/打赏信息,近期有用户反映他们对我们模板非常喜爱,想打赏没有支付码,不禁感叹,这世道变了啊,还有主动打赏的,那么我们就“勉为其难”地发布我们的打赏二维码吧! +\begin{figure}[htbp] +\centering +\includegraphics[width=0.618\textwidth]{star-history.png} +\caption{Elegant\LaTeX{} 系列模板上线 Github 之后上每周 Star 数变化} +\end{figure} + +\section{捐赠} +如果您非常喜爱我们的模板或者我,你还可以选择捐赠以表达您对我们模板和我的支持。本模板自 3.08 版本发布了捐赠信息之后,收到了近千元的捐赠(四舍五入就是一个亿),非常感谢! \begin{figure}[htbp] \centering \includegraphics[width=0.5\textwidth]{donate.jpg} \end{figure} -赞赏费用的使用解释权归 Elegant\LaTeX{} 所有,并且不接受监督,请自愿理性打赏,10 元以上的赞赏,我们将列入捐赠榜,谢谢各位金主! +\textbf{赞赏费用的使用解释权归 Elegant\LaTeX{} 所有,并且不接受监督,请自愿理性打赏}。10 元以上的赞赏,我们将列入捐赠榜,谢谢各位金主! -\begin{table}[htbp] +\begin{table}[!htbp] \centering \caption{捐赠榜} - \begin{tabular}{cccc} + \begin{tabular}{crcc} \toprule 捐赠者 & 金额 & 时间 & 渠道 \\ \midrule - Lerh & 10 元 & 2019/5/15 & 微信 \\ - 越过地平线 & 10 元 & 2019/5/15 & 微信 \\ - 大熊 & 20 元 & 2019/5/27 & 微信 \\ + Lerh & 10 元 & 2019/05/15 & 微信 \\ + 越过地平线 & 10 元 & 2019/05/15 & 微信 \\ + 大熊 & 20 元 & 2019/05/27 & 微信 \\ + 佚名 & 10 元 & 2019/05/30 & 微信\\ + \href{http://www.latexstudio.net/}{latexstudio.net} & 666 元 & 2019/06/05 & 支付宝\\ + Cassis & 11 元 & 2019/06/30 & 微信\\ + 佚名 & 10 元 & 2019/07/23 & 微信\\ \bottomrule \end{tabular}% \end{table}% -再次感谢大家对于模板的喜爱! \chapter{ElegantBook 设置说明} - -本模板基于基础的 book 文类,所以 book 的选项对于本模板也是有效的。默认编码为 UTF-8,推荐使用 \TeX{} Live 编译。本文编写环境为 Win10 (64bit) + \TeX{} Live 2019,支持 \lstinline{PDFLaTeX} 以及 \lstinline{XeLaTeX} 编译。 +本模板基于基础的 book 文类,所以 book 的选项对于本模板也是有效的(纸张无效,因为模板有设备选项)。默认编码为 UTF-8,推荐使用 \TeX{} Live 编译。本文编写环境为 Win10 (64bit) + \TeX{} Live 2019,支持 \lstinline{PDFLaTeX} 以及 \lstinline{XeLaTeX} 编译。 \section{语言模式} @@ -244,8 +258,8 @@ third & \makecell{{\color{third1}\rule{1cm}{1cm}}} \item \textcolor{second}{\textbf{theorem、lemma、corollary}} 环境,颜色为 \textcolor{second} {second}; \item \textcolor{third}{\textbf{proposition}} 环境,颜色为 \textcolor{third}{third}。 \end{itemize} -\item \textit{示例类环境},有 \textbf{example、exercise、problem} 环境(对应于例,练习,例题),自动编号,编号以章节为单位。 -\item \textit{证明类环境},有 \textbf{proof、note} 环境,特点是,有引导符或者结尾符,\textbf{note} 环境有引导符号,\textbf{proof} 环境有证明完毕符号。 +\item \textit{示例类环境},有 \textbf{example、problem、exercise} 环境(对应于例、例题、练习),自动编号,编号以章节为单位,其中 \textbf{exercise} 有提示符。 +\item \textit{提示类环境},有 \textbf{note} 环境,特点是:无编号,有引导符。 \item \textit{结论类环境},有 \textbf{conclusion、assumption、property,remark、solution} 环境\footnote{本模板还添加了一个 result 选项,用于隐藏 \lstinline{solution} 和 \lstinline{proof} 环境,默认为显示(\lstinline{result=answer}),隐藏使用 \lstinline{result=noanswer}。},三者均以粗体的引导词为开头,和普通段落格式一致。 \end{itemize} @@ -271,7 +285,7 @@ The content of theorem. definition & label & def & \lstinline|\ref{def:label}| \\ theorem & label & thm & \lstinline|\ref{thm:label}| \\ lemma & label & lem & \lstinline|\ref{lem:label}| \\ - corrlary & label & cor & \lstinline|\ref{cor:label}| \\ + corollary & label & cor & \lstinline|\ref{cor:label}| \\ proposition & label & pro & \lstinline|\ref{pro:label}| \\ \bottomrule \end{tabular}% @@ -296,13 +310,13 @@ This is the content of example environment. \begin{itemize} \item 示例环境(example)、练习(exercise)与例题(problem)章节自动编号; - \item 注意(note)环境有提醒引导符,证明(proof)环境有证明结束符; + \item 注意(note),练习(exercise)环境有提醒引导符; \item 结论(conclusion)等环境都是普通段落环境,引导词加粗。 \end{itemize} \section{装饰物} -本模板为章节后的装饰物(base)添加了隐藏选项,有 \lstinline{show} 和 \lstinline{hide} 两个选项。 +本模板为章节后和页面下方的装饰物(base)添加了隐藏选项,有 \lstinline{show} 和 \lstinline{hide} 两个选项。 \begin{lstlisting} \documentclass[hide]{elegantbook} %or \documentclass[base=hide]{elegantbook} @@ -310,7 +324,7 @@ This is the content of example environment. \section{封面和徽标} -本模板使用的封面图片来源于 \href{https://pixabay.com/en/tea-time-poetry-coffee-reading-3240766/}{pixabay.com}\footnote{感谢 China\TeX{} 提供免费图源网站,另外还推荐 \href{https://www.pexels.com/}{pexels.com}。},图片完全免费,可用于任何场景。封面图片的尺寸为 $1280 \times 1024$, 更换图片的时候请\textbf{严格}按照封面图片尺寸进行裁剪。推荐一个免费的在线图片裁剪网站 \href{https://www.befunky.com/create/crop-photo/}{befunky.com}。 +本模板使用的封面图片来源于 \href{https://pixabay.com/en/tea-time-poetry-coffee-reading-3240766/}{pixabay.com}\footnote{感谢 China\TeX{} 提供免费图源网站,另外还推荐 \href{https://www.pexels.com/}{pexels.com}。},图片完全免费,可用于任何场景。封面图片的尺寸为 $1280 \times 1024$, 更换图片的时候请\textbf{严格}按照封面图片尺寸进行裁剪。推荐一个免费的在线图片裁剪网站 \href{https://www.fotor.com/cn}{fotor.com}。用户 QQ 群内有一些合适尺寸的封面,欢迎取用。 本文用到的 Logo 比例为 1:1,也即正方形图片,在更换图片的时候请选择合适的图片进行替换。 @@ -355,9 +369,11 @@ This is the content of example environment. \nocite{*} %include all the bibitems \end{lstlisting} -本模板还添加了 \lstinline{cite=numbers} 和 \lstinline{cite=authoryear} 两个参考文献选项,用于设置参考文献格式的设置,默认为 \lstinline{numbers}。据我们所知,理工科类一般使用 \lstinline{numbers},而文科类使用 \lstinline{authoryear} 比较多,所以我们将 \lstinline{numbers} 作为默认格式。如果需要改为 \lstinline{authoryear} ,可以使用 +本模板还添加了 \lstinline{cite=numbers} 、\lstinline{cite=super} 和 \lstinline{cite=authoryear} 三个参考文献选项,用于设置参考文献格式的设置,默认为 \lstinline{numbers}。据我们所知,理工科类一般使用数字形式 \lstinline{numbers} 或者上标形式 \lstinline{super},而文科类使用作者--年份 \lstinline{authoryear} 比较多,所以我们将 \lstinline{numbers} 作为默认格式。如果需要改为 \lstinline{cite=super} 或者 \lstinline{authoryear} ,可以使用 \begin{lstlisting} -\documentclass[cite=authoryear]{elegantbook} %or +\documentclass[cite=super]{elegantbook} % set cite for super style ref style +\documentclass[super]{elegantbook} +\documentclass[cite=authoryear]{elegantbook} % set cite for author year ref style \documentclass[authoryear]{elegantbook} \end{lstlisting} @@ -398,7 +414,6 @@ The content of introduction. \end{introduction} \end{lstlisting} - \section{章后习题} 前面我们介绍了例题和练习两个环境,这里我们再加一个,章后习题(\lstinline{problemset})环境,用于在每一章结尾,显示本章的练习。使用方法如下 @@ -419,9 +434,85 @@ The content of introduction. \end{problemset} \begin{remark} -如果你想把 \lstinline{problemset} 环境的标题改为其他文字,你可以类似于 introduction 环境修改 problemset 的可选参数。 +如果你想把 \lstinline{problemset} 环境的标题改为其他文字,你可以类似于 introduction 环境修改 problemset 的可选参数。另外,目前这个环境会自动出现在目录中,但是不会出现在页眉页脚信息中(待解决)。 +\end{remark} + + +\section{旁注} +在 3.08 版本中,我们引入了 旁注设置选项 \lstinline{marginpar=margintrue} 以及测试命令 \lstinline{\elegantpar} ,但是由此带来一堆问题。我们决定在 3.09 版本中将其删除,并且,在旁注命令得到大幅度优化之前,不会将此命令再次引入书籍模板中。对此造成各位用户的不方便,非常抱歉!不过我们保留了 \lstinline{marginpar} 这个选项,你可以使用 \lstinline{marginpar=margintrue} 获得保留右侧旁注的版面设计。然后使用系统自带的 \lstinline{\marginpar} 或者 \lstinline{marginnote} 宏包的 \lstinline{\marginnote} 命令。 + +\begin{remark} +在使用旁注的时候,需要注意的是,文本和公式可以直接在旁注中使用。 + +\begin{lstlisting} +% text +\marginpar{margin paragraph text} + +% equation +\marginpar{ + \begin{equation} + a^2 + b^2 = c^2 + \end{equation} +} +\end{lstlisting} + +但是浮动体(表格、图片)需要注意,不能用浮动体环境,需要使用直接插图命令或者表格命令环境。然后使用 \lstinline{\captionof} 为其设置标题。为了得到居中的图表,可以使用 \lstinline{\centerline} 命令或者 \lstinline{center} 环境。更多详情请参考:\href{https://tex.stackexchange.com/questions/5583/caption-of-figure-in-marginpar-and-caption-of-wrapfigure-in-margin}{Caption of Figure in Marginpar}。 + +\begin{lstlisting} +% graph with centerline command +\marginpar{ + \centerline{ + \includegraphics[width=0.2\textwidth]{logo.png} + } + \captionof{figure}{your figure caption} +} + +% graph with center environment +\marginpar{ + \begin{center} + \includegraphics[width=0.2\textwidth]{logo.png} + \captionof{figure}{your figure caption} + \end{center} +} +\end{lstlisting} + \end{remark} +\section{连字符} +由于模板使用了 \lstinline{newtx} 系列字体宏包,所以在使用本模板的时候,需要注意下连字符的问题。 +\begin{equation} + \int_{R^q} f(x,y) dy.\emph{of\kern0pt f} +\end{equation} +的代码为 +\begin{lstlisting} +\begin{equation} + \int_{R^q} f(x,y) dy.\emph{of \kern0pt f} +\end{equation} +\end{lstlisting} + +\section{符号字体} +在 3.08 版本中,用户反馈模板在和 \lstinline{yhmath} 以及 \lstinline{esvect} 等宏包搭配使用的时候会出现报错: +\begin{lstlisting} +LaTeX Error: + Too many symbol fonts declared. +\end{lstlisting} + +原因是模板重新定义了数学字体,达到了 {\heiti 最多 16 个数学字体} 的上限,在调用其他宏包的时候,无法新增数学字体。为了减少调用非常用宏包,在此给出如何调用 \lstinline{yhmath} 以及 \lstinline{esvect} 宏包的方法。 + +请在 \lstinline{elegantbook.cls} 内搜索 \lstinline{yhmath} 或者 \lstinline{esvect},将你所需要的宏包加载语句取消注释即可。 +\begin{lstlisting} +%%% 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} +\end{lstlisting} + + + \chapter{ElegantBook 写作示例} \begin{introduction} @@ -443,9 +534,8 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非 我们将通过三个步骤定义可测函数的积分。首先定义非负简单函数的积分。以下设 $E$ 是 $\mathcal{R}^n$ 中的可测集。 - \begin{definition}{可积性}{int} -设 $ f(x)=\sum\limits_{i=1}^{k} a_i \chi_{A_i}(x)\oint_{a}^b\ointop_{a}^b\prod_{i=1}^n$ 是 $E$ 上的非负简单函数,其中 $\{A_1,A_2,\ldots,A_k\}$ 是 $E$ 上的一个可测分割,$a_1,a_2,\ldots,a_k$ 是非负实数。定义 $f$ 在 $E$ 上的积分为 $\int_{a}^b f(x)$ +设 $ 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$ 上的积分为 $\int_{a}^b f(x)$ \begin{equation} \label{inter} \int_{E} f dx = \sum_{i=1}^k a_i m(A_i) \pi \alpha\beta\sigma\gamma\nu\xi\epsilon\varepsilon. \oint_{a}^b\ointop_{a}^b\prod_{i=1}^n @@ -453,6 +543,7 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非 一般情况下 $0 \leq \int_{E} f dx \leq \infty$。若 $\int_{E} f dx < \infty$,则称 $f$ 在 $E$ 上可积。 \end{definition} + 一个自然的问题是,Lebesgue 积分与我们所熟悉的 Riemann 积分有什么联系和区别?在 4.4 在我们将详细讨论 Riemann 积分与 Lebesgue 积分的关系。这里只看一个简单的例子。设 $D(x)$ 是区间 $[0,1]$ 上的 Dirichlet 函数。即 $D(x)=\chi_{Q_0}(x)$,其中 $Q_0$ 表示 $[0,1]$ 中的有理数的全体。根据非负简单函数积分的定义,$D(x)$ 在 $[0,1]$ 上的 Lebesgue 积分为 \begin{equation} \label{inter2} @@ -477,6 +568,14 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非 即 $D(x)$ 在 $[0,1]$ 上是 Lebesgue 可积的并且积分值为零。但 $D(x)$ 在 $[0,1]$ 上不是 Riemann 可积的。 \end{problem} +\begin{example} +即 $D(x)$ 在 $[0,1]$ 上是 Lebesgue 可积的并且积分值为零。但 $D(x)$ 在 $[0,1]$ 上不是 Riemann 可积的。 +\end{example} + +\begin{proof} +测试证明环境 +\end{proof} + \begin{solution} 即 $D(x)$ 在 $[0,1]$ 上是 Lebesgue 可积的并且积分值为零。但 $D(x)$ 在 $[0,1]$ 上不是 Riemann 可积的。 \end{solution} @@ -528,30 +627,6 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非 \item 设 $A = (a_{ij})$ 是数域 $K$ 上的一个 $n$ 级上三角矩阵,证明:如果 $a_{11} = a_{22} = \cdots = a_{nn}$,并且至少有一个 $a_{kl} \not = 0 (k < l)$,则 $A$ 一定不能对角化。 \end{problemset} -\chapter{旁注} -在 3.08 版本,我们加入了旁注(边注)等设置以及 \lstinline{\elegantpar} 命令,不过目前处于测试阶段。如果你想整个文档都加入旁注,一般的方法是,重新设置旁注的大小。本模板加入了一个旁注选项 \lstinline{marginpar},如果加入旁注 \lstinline{marginpar=margintrue},则会减少版芯两边的宽度(减少至 1.5cm),如果不加入旁注 \lstinline{marginpar=marginfalse}(默认),则维持两边距离不变。旁注选项仅对 \lstinline{device=normal} 试用,pad 模式并不支持。 - -旁注命令可以使用 \LaTeX{} 自带的 \lstinline{\marginpar} 命令或者 \lstinline{marginnote} 宏包的 \lstinline{\marginnote} 命令,旁注的使用,请参考维基百科:\href{https://en.wikibooks.org/wiki/LaTeX/Footnotes_and_Margin_Notes#Margin_Notes}{旁注}或者 \LaTeX {}书籍。 - -本模板还添加了一个 \lstinline{\elegantpar} 命令,需要注意的是,由于这个命令使用了 TikZ 中的层叠效果(overlay),所以为了得到正确的旁注显示,你需要多次编译(3 次)。\lstinline{\elegantpar} 命令的效果如下。 - -%\setlength{\marginparwidth}{2.5cm} -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et \elegantpar{dolore magna aliqua}{This is Beautiful the elegantpar Style for English Text}. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - -\begin{equation} -a^{2}+b^{2} = \elegantpar{c^{2}}{勾股定理 -\begin{equation*}a^2+b^2=c^2\end{equation*}} -\end{equation} - - 若夫日出而林霏开,云归而岩穴暝,晦明变化者,山间之朝暮也。野芳发而幽香,佳木秀而繁阴,风霜高洁,水落而石出者,山间之四时也。朝而往,暮而归,四时之景不同,而乐亦无穷也。 - - 至于负者歌于途,行者休于树,前者呼,后者应,\elegantpar{伛偻提携}{指搀扶着走的小孩子},往来而不绝者,滁人游也。临溪而渔,溪深而鱼肥。酿泉为酒,泉香而酒洌;山肴野蔌,杂然而前陈者,太守宴也。宴酣之乐,非丝非竹,射者中,弈者胜,觥筹交错,起坐而喧哗者,众宾欢也。苍颜白发,颓然乎其间者,太守醉也。$2\elegantpar{x}{方程的解与数学符号的选择无关}=3$。 - \chapter{常见问题集} \begin{custom}{问题} @@ -568,7 +643,7 @@ a^{2}+b^{2} = \elegantpar{c^{2}}{勾股定理 \end{custom} \begin{solution} -3.07 中在 \lstinline{gbt7714} 宏包使用时,加入了 \lstinline{authoryear} 选项,这个使得 \lstinline{natbib} 设置了 \lstinline{numbers} 也无法生效。3.08 版本中,模板增加了 \lstinline{numbers} 和 \lstinline{authoryear} 文献选项,你可以参考前文设置说明。 +3.07 中在 \lstinline{gbt7714} 宏包使用时,加入了 \lstinline{authoryear} 选项,这个使得 \lstinline{natbib} 设置了 \lstinline{numbers} 也无法生效。3.08 和 3.09 版本中,模板新增加了 \lstinline{numbers} 、\lstinline{super} 和 \lstinline{authoryear} 文献选项,你可以参考前文设置说明。 \end{solution} \begin{custom}{问题} @@ -580,6 +655,14 @@ a^{2}+b^{2} = \elegantpar{c^{2}}{勾股定理 \end{solution} \begin{custom}{问题} +\lstinline[breaklines]{Package ctex Error: CTeX fontset `Mac' is unavailable.} +\end{custom} + +\begin{solution} +在 Mac 系统下,中文编译请使用 \lstinline{XeLaTeX}。 +\end{solution} + +\begin{custom}{问题} \lstinline{! LaTeX Error: Unknown option `scheme=plain' for package `ctex'.} \end{custom} @@ -626,7 +709,9 @@ a^{2}+b^{2} = \elegantpar{c^{2}}{勾股定理 \end{custom} \begin{solution} -首先,我们{\heiti 强烈建议你不要去修改字体}!如果你一定坚持修改字体,请在 \lstinline{newtxtext} 宏包加载前加入中文字体设置(\lstinline{xeCJK} 宏包)。如果你选择自定义字体,请设置好 \lstinline{\kaishu},\lstinline{\heiti} 等命令,否则会报错。如果你看不懂我现在说的,请停止你的字体自定义行为。 +首先,我们{\heiti 强烈建议你不要去修改字体}!如果你一定坚持修改字体,请在 \lstinline{newtxtext} 宏包加载前加入中文字体设置(\lstinline{xeCJK} 宏包)。 + +如果你选择自定义字体,请设置好 \lstinline{\kaishu},\lstinline{\heiti} 等命令,否则会报错。如果你看不懂我现在说的,请停止你的字体自定义行为。 \end{solution} \begin{custom}{问题} @@ -650,7 +735,7 @@ a^{2}+b^{2} = \elegantpar{c^{2}}{勾股定理 \end{custom} \begin{solution} -可以的,ElegantBook 模板用的是 \lstinline{listings} 宏包,你可以在环境之后加上语言,全局语言修改请使用 \lstinline{\lstset} 命令,更多信息请参考宏包文档。 +可以的,ElegantBook 模板用的是 \lstinline{listings} 宏包,你可以在环境(\lstinline{lstlisting})之后加上语言(比如 Python 使用 \lstinline{language=Python} 选项),全局语言修改请使用 \lstinline{\lstset} 命令,更多信息请参考宏包文档。 \end{solution} @@ -662,14 +747,6 @@ a^{2}+b^{2} = \elegantpar{c^{2}}{勾股定理 这个问题问的人比较多,我这里给个明确的答案。由于 Beamer 中有一个很优秀的主题 \href{https://github.com/matze/mtheme}{Metropolis}。我觉得在我们找到非常好的创意之前不会发布正式的 Beamer 主题,如果你非常希望得到 Elegant\LaTeX{} “官方”的主题,请在用户 QQ 群内下载我们测试主题 PreElegantSlide(未来不一定按照这个制作)。正式版制作计划在 2020 年之后。 \end{solution} -\begin{custom}{问题} -群主好棒,想嫁! -\end{custom} - -\begin{solution} -我取向正常! -\end{solution} - \nocite{*} @@ -688,8 +765,6 @@ a^{2}+b^{2} = \elegantpar{c^{2}}{勾股定理 \sum_{i=1}^n x_i \equiv x_1 + x_2 +\cdots + x_n \end{equation} - - \chapter{最小示例} \begin{lstlisting} diff --git a/Master/texmf-dist/doc/latex/elegantbook/elegantbook-en.pdf b/Master/texmf-dist/doc/latex/elegantbook/elegantbook-en.pdf Binary files differindex e6aa90fb346..ddd962011aa 100644 --- a/Master/texmf-dist/doc/latex/elegantbook/elegantbook-en.pdf +++ b/Master/texmf-dist/doc/latex/elegantbook/elegantbook-en.pdf diff --git a/Master/texmf-dist/doc/latex/elegantbook/elegantbook-en.tex b/Master/texmf-dist/doc/latex/elegantbook/elegantbook-en.tex index f367a03da8f..1976c97a390 100644 --- a/Master/texmf-dist/doc/latex/elegantbook/elegantbook-en.tex +++ b/Master/texmf-dist/doc/latex/elegantbook/elegantbook-en.tex @@ -1,4 +1,4 @@ -\documentclass[fancy,blue,11pt]{elegantbook} +\documentclass[fancy,11pt,twocol]{elegantbook} \title{An Elegant \LaTeX{} Template for Books} \subtitle{Classic Elegant\LaTeX{} Template} @@ -6,7 +6,7 @@ \author{Ethan Deng \& Liam Huang} \institute{Elegant\LaTeX{} Program} \date{\today} -\version{3.08} +\version{3.09} \extrainfo{Victory won\rq t come to us unless we go to it. } @@ -42,20 +42,15 @@ Contact Infos: \section{ElegantBook Updates} What\rq s new in this version: \begin{enumerate} - \item Fix \lstinline|\part|. - \item Introduce pad mode. - \item Support mtpro2 package. - \item Revise default format of references to numbers. - \item Include environment for chapter introduction. - \item Include environment for problem set. - \item Include margin note using \lstinline{\elegantpar} (beta). - \item Reduce line spacing for equations. - \item Turn \lstinline{\equote} into \lstinline{\extrainfo}, with multi-line display. - \item Polish documentation by including acknowledgement, etc. + \item Remove \lstinline|\elegantpar|; + \item Fix math symbol font settings; + \item Introduce option \lstinline|twocol| for toc; + \item Revise footnote layout; + \item Other modifications. \end{enumerate} \begin{note} - Since the latest version has witnessed huge reconstruction (with cover change in version 3.06), 3.x is backward incompatible with 2.x. For those who would like to convert documents compiled with earlier version (3.06 or 2.x) to be compatible with latest version, please refer to \href{https://github.com/ElegantLaTeX/ElegantBook/wiki/convert}{conversion}. Questions about version 2.x will not be answered henceforth. + Users for 2.x, please refer to \href{https://github.com/ElegantLaTeX/ElegantBook/wiki/convert}{conversion}. \end{note} \section{Installation and Update} @@ -75,7 +70,7 @@ If you are a \TeX{} Live 2018 user and would like to update to \TeX{} Live 2019, Excuse me? You are a C\TeX{} user? Sorry, this template is incompatible with C\TeX{}. -For more details about the installation and usage of \TeX{} Live 2019, the compatibility of C\TeX{} and \TeX{} Live, installation directory, etc., please refer to OG (Official Guide). +For more details about the installation and usage of \TeX{} Live 2019, the compatibility of C\TeX{} and \TeX{} Live, please refer to OG (Official Guide) and/or \href{https://github.com/OsbertWang/install_latex/releases}{Install LaTeX v5.1} by OsbertWang. \section{Online Usage of Templates} Considering the online usage of the templates, all the templates are available on Overleaf. Those who enjoy smooth network may feel free to use the templates without \TeX{} Live and to visit your documents anywhere anytime. Search \lstinline{elegantlatex} on Overleaf or visit \href{https://www.overleaf.com/latex/templates?addsearch=elegantlatex}{search result}, choose the one you prefer and save it to your account, then you can edit yourself or corporate with others if you like. For more infomation about Overleaf, please refer to Overleaf OG. @@ -83,57 +78,69 @@ Considering the online usage of the templates, all the templates are available o \section{User\rq s Selected Works Plan} Eight years have passed since the found of Elegant\LaTeX{} Program. It\rq s an honor that our templates are preferred by a lot of users. Hence, in order to promote more interactions among our users and know more about what you need, we are planning to provide a platform to display selected works of our users on Github or our homepage. If you want to show us your work(s), contact us via Email or other ways. Or if you have upload your work(s) on Github or Gitee etc., share the URL(s) with us. +\centerline{\textcolor{red}{\bfseries Wanted!}} + \section{About Pull Request} For some reasons, pull request is unacceptable since May 20, 2019. For those who want to help revise the templates, submit issues or clone to your own repository to modify under the constriction of LPPL-1.3c. \section{Recruit Support Members} -Recruit Support Members for Elegant\LaTeX{} to translate template OGs(Chinese -> English), maintain wiki entries using MarkDown, update Wechat articles. No deadline for this recruitment. +Recruit Support Members for Elegant\LaTeX{} to translate template OGs(Chinese -> English), maintain wiki entries using Markdown, update Wechat articles. No deadline for this recruitment. -Thank our best support members for their selfless work! +So far, Elegant\LaTeX{} has four Support Members: \begin{itemize} \item OG Translator: \href{https://github.com/peggy2006xzyz}{YPY}; - \item Wiki Maintainer: \href{https://github.com/izinngo}{Ingo Zinngo}; + \item Wiki Maintainer: \href{https://github.com/izinngo}{Ingo Zinngo}, \href{https://github.com/xiaohao890809}{Xiaohao890809}; \item QQ Group Manager: \href{https://github.com/sikouhjw}{Sikouhjw}. \end{itemize} \section{Acknowledgement} -The number of stars on Github for ElegantBook reached 100 on May 20, 2019 and was included in the \href{https://github.com/trending/tex?since=daily}{Trending} under the \TeX{} catagory. It is a remarkable moment for Elegant\LaTeX{} !!! - -Thank China\TeX{} and \href{http://www.latexstudio.net/}{\LaTeX{} studio} for their promotion. \LaTeX{} studio offers tons of valuable posts and templates for discovery. It is the most comprehensive website on \LaTeX{} in China. +The number of stars on Github for ElegantBook reached 100 on May 20, 2019\footnote{189 stars by August 18, 2019!}. -Thank muzimuzhi for the revision of the template. +Thank China\TeX{} and \href{http://www.latexstudio.net/}{\LaTeX{} studio} for their promotion. \LaTeX{} studio offers tons of valuable posts and templates for discovery. It is the most comprehensive website on \LaTeX{} in China. Thank \href{https://github.com/muzimuzhi}{muzimuzhi} for the revision of the template. If you like our template, star on Github. -\begin{figure}[htbp] +\begin{figure}[!ht] \centering \includegraphics[width=\textwidth]{star.png} \caption{Twinkle, Twinkle, Little Star} \end{figure} -Recently some users have expressed their love for our templates and want to tip us. QR code for donation is now available. -\begin{figure}[htbp] + +\begin{figure}[!ht] \centering - \includegraphics[width=0.5\textwidth]{donate.jpg} + \includegraphics[width=0.618\textwidth]{star-history.png} + \caption{Github Star Trends for Elegant\LaTeX{} (by week)} +\end{figure} + +\section{Donation} +To express your love for our templates and/or our developers, please do not hesitate to tip us. Since last release of 3.08, we have received about a thousand RMB! (The emergence of a millionaire is on the way. Loading... ) +\begin{figure}[!htbp] + \centering + \includegraphics[width=0.45\textwidth]{donate.jpg} \end{figure} The explanation right of the tip usage belongs to Elegant\LaTeX{} with no supervision. Feel free to tip us. Those who donate more than 10 RMB will be recorded in the Donation List. Thank all the tippers! -\begin{table}[htbp] + +\begin{table}[!h] \centering \caption{Donation List} \begin{tabular}{cccc} \toprule Tipper & Amount & Date & Channel \\ \midrule - Lerh & 10 RMB & 2019/5/15 & Wechat \\ - Yueguodipingxian & 10 RMB & 2019/5/15 & Wechat \\ - Dapeng & 20 RMB & 2019/5/27 & Wechat\\ + Lerh & 10 RMB & 2019/05/15 & Wechat \\ + Yueguodipingxian & 10 RMB & 2019/05/15 & Wechat \\ + Dapeng & 20 RMB & 2019/05/27 & Wechat\\ + Anonymous & 10 RMB & 2019/05/30 & Wechat \\ + \href{http://www.latexstudio.net/}{latexstudio.net} & 666 RMB & 2019/06/05 & Alipay \\ + Cassis & 11 RMB & 2019/06/30 & Wechat \\ + Anonymous & 10 RMB & 2019/07/23 & Wechat \\ \bottomrule \end{tabular}% \end{table}% \chapter{ElegantBook Settings} -This template is based on the Standard \LaTeX{} book class, so the options of book class work as well. The default encoding is UTF-8 while \TeX{} Live is recommended. The test environment is Win10 + \TeX{} Live 2019. - +This template is based on the Standard \LaTeX{} book class, so the options of book class work as well (Note that the option of papersize has no effect due to \lstinline{device} option). The default encoding is UTF-8 while \TeX{} Live is recommended. The test environment is Win10 + \TeX{} Live 2019, either \lstinline{PDFLaTeX} or \lstinline{XeLaTeX} works fine. \section{Languages} We defined one option named \lstinline{lang} which has two alternative values, \lstinline{lang=en} (default) and \lstinline{lang=cn}. Different values will alter the captions of figure/table, abstract name, refname, etc. You can use this option as @@ -235,7 +242,7 @@ In this template, we defined four different theorem class environments \item \textcolor{second}{\textbf{theorem, lemma, corollary}} environment, the color is \textcolor{second} {second}; \item \textcolor{third}{\textbf{proposition}} environment, the color is \textcolor{third}{third}. \end{itemize} -\item \textit{Example Environments}, including \textbf{example, exercise, problem} environment, auto-numbering corresponding to chapter. +\item \textit{Example Environments}, including \textbf{example, exercise, problem} environment, auto numbering corresponding to chapter. \item \textit{Proof Environment}, including \textbf{proof, note} environment containing introductory symbol (\textbf{note} environment) or ending symbol (\textbf{proof} environment). \item \textit{Conclusion Environments}, including \textbf{conclusion, assumption, property, remark, solution}\footnote{We also define an option \lstinline{result}, which can hide the \lstinline{solution} and \lstinline{proof} environments. You can switch between \lstinline{result=answer} and \lstinline{result=noanswer}} environment, all of which begin with boldfaced words, with format consistent with normal paragraphs. \end{itemize} @@ -293,7 +300,7 @@ These are all similar environments with slight differences lies in: \end{itemize} \section{Base Hide Option} -Hiding the end-of-chapter base is optional, simply type in: +Hiding the end-of-chapter and end-of-page base is optional, simply type in: \begin{lstlisting} \documentclass[hide]{elegantbook} %or \documentclass[base=hide]{elegantbook} @@ -302,12 +309,12 @@ Hiding the end-of-chapter base is optional, simply type in: \section{Cover and Logo} -The cover image used in this template is from \href{https://pixabay.com/en/tea-time-poetry-coffee-reading-3240766/}{pixabay.com}\footnote{Thank China\TeX{} for providing free image source, \href{https://www.pexels.com/}{pexels.com} is strongly recommended.}. The image is completely free and can be used under any circumstance. The cover image size is $1280 \times 1024$. If you would like to change the cover, please crop it according to the size of the cover picture strictly.One free online image clipping site: \href{https://www.befunky.com/create/crop-photo/}{befunky.com}. +The cover image used in this template is from \href{https://pixabay.com/en/tea-time-poetry-coffee-reading-3240766/}{pixabay.com}\footnote{Thank China\TeX{} for providing free image source, \href{https://www.pexels.com/}{pexels.com} is strongly recommended.}. The image is completely free and can be used under any circumstance. The cover image size is $1280 \times 1024$. If you would like to change the cover, please crop it according to the size of the cover picture strictly. One free online image clipping site: \href{https://www.fotor.com/cn}{fotor.com}. Feel free to join our QQ Group to get more elegant covers. Aspect ratio of the logo is 1:1 in this guide, i.e. a square picture. To replace the logo, do remember to choose the appropriate picture. \section{List Environments} -This template uses \lstinline{tikz} to customize \lstinline{itemize} and \lstinline{enumerate} environments, with \lstinline{itemize} environment customized to the third depth and \lstinline{enumerate} environment customized to fourth depth. The effect is as follows\\[2ex] +This template uses \lstinline{tikz} to customize the list environments, with \lstinline{itemize} environment customized to the third depth and \lstinline{enumerate} environment customized to fourth depth. The effect is as follows\\[2ex] \begin{minipage}[b]{0.49\textwidth} \begin{itemize} \item first item of nesti; @@ -347,9 +354,11 @@ If you want to use \hologo{BibTeX}, you must create a file named \lstinline{refe \nocite{*} %include all the bibitems \end{lstlisting} -Two more options \lstinline{cite=numbers} and \lstinline{cite=authoryear} are available in this new version, with the default setting as \lstinline{numbers} since those major in science and technology use \lstinline{numbers} more often. For those who major in liberal arts want to use \lstinline{authoryear}, please type in: +Three more options \lstinline{cite=numbers}, \lstinline{cite=super} and \lstinline{cite=authoryear} are available in this new version, with the default setting as \lstinline{numbers} since those major in science and technology use \lstinline{numbers} and/or \lstinline{cite=super} more often. For those who want to use \lstinline{cite=super} or \lstinline{authoryear}, please type in: \begin{lstlisting} -\documentclass[cite=authoryear]{elegantbook} %or +\documentclass[cite=super]{elegantbook} % set cite for super style +\documentclass[super]{elegantbook} +\documentclass[cite=authoryear]{elegantbook} % set cite for author-year style \documentclass[authoryear]{elegantbook} \end{lstlisting} @@ -383,7 +392,7 @@ you will get: \item Angle of Corner \end{introduction} -You can change the title of this environment by modifying the optional argument of this environment +You can change the title of this environment by modifying the optional argument of this environment: \begin{lstlisting} \begin{introduction}[Brief Introduction] ... @@ -406,9 +415,81 @@ And you will get: \item exercise 3 \end{problemset} \begin{remark} -If you want to customize the title of \lstinline{problemset}, please change the optional argument like introduction environment. +If you want to customize the title of \lstinline{problemset}, please change the optional argument like in introduction environment. In this version the \lstinline{problemset} environment automatically appears in the table of contents but not in the header or footer. \end{remark} +\section{Margin Notes} +In 3.08, we introduced \lstinline{marginpar=margintrue} and \lstinline{\elegantpar} (Beta) with piles of bugs. Hence we decide to remove them in 3.09 and will suspend the options till revolutionary optimization. Sorry for all the bugs! However, we retain the option \lstinline{marginpar} for users to get margin motes by activating \lstinline{marginpar=margintrue} and using \lstinline{\marginpar} or \lstinline{marginnote} packages. + +\begin{remark} + +Note that text and equation are both available in the margin notes. +\begin{lstlisting} +% text +\marginpar{margin paragraph text} + +% equation +\marginpar{ +\begin{equation} + a^2 + b^2 = c^2 +\end{equation} +} +\end{lstlisting} + +For tables and figures, note that floating environment is not allowed. You have to use \lstinline{includegraphics} or \lstinline{table} and use \lstinline{\captionof} to name it. To get centralized figures or tables, use \lstinline{\centerline} or \lstinline{center}. To learn more, please refer to \href{https://tex.stackexchange.com/questions/5583/caption-of-figure-in-marginpar-and-caption-of-wrapfigure-in-margin}{Caption of Figure in Marginpar}. + +\begin{lstlisting} +% graph with centerline command +\marginpar{ + \centerline{ + \includegraphics[width=0.2\textwidth]{logo.png} + } + \captionof{figure}{your figure caption} +} + +% graph with center environment +\marginpar{ + \begin{center} + \includegraphics[width=0.2\textwidth]{logo.png} + \captionof{figure}{your figure caption} + \end{center} +} +\end{lstlisting} + +\end{remark} + +\section{Hyphens} +Since the template uses \lstinline{newtx}, please pay attention to the hyphens. For instance, +\begin{equation} +\int_{R^q} f(x,y) dy.\emph{of\kern0pt f} +\end{equation} + +The corresponding code is: +\begin{lstlisting} +\begin{equation} +\int_{R^q} f(x,y) dy.\emph{of \kern0pt f} +\end{equation} +\end{lstlisting} + +\section{Symbol Fonts} +Feedback from some 3.08 users claims that error occurs when using our templates with \lstinline{yhmath}, \lstinline{esvect} and other packages. +\begin{lstlisting} +LaTeX Error: +Too many symbol fonts declared. +\end{lstlisting} + +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{elegantbook.cls}, uncomment corresponding related code. +\begin{lstlisting} +%%% 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} +\end{lstlisting} + \chapter{ElegantBook Writing Sample} @@ -430,7 +511,7 @@ If you want to customize the title of \lstinline{problemset}, please change the We will define the integral of a measurable function in three steps. First, we define the integral of a nonnegative simple function. Let $E$ be the measurable set in $\mathcal{R}^N$. \begin{definition}{Left Coset}{} -Let $H$ be a subgroup of a group~$G$. A \emph{left coset} of $H$ in $G$ is a subset of $G$ that is of the form $xH$, where $x \in G$ and $xH = \{ xh : h \in H \}$. Similarly a \emph{right coset} of $H$ in $G$ is a subset of $G$ that is of the form $Hx$, where $Hx = \{ hx : h \in H \}$ +Let $H$ be a subgroup of a group~$G$. A \emph{left coset} of $H$ in $G$ is a subset of $G$ that is of the form $xH$, where $x \in G$ and $xH = \{ xh : h \in H \}$. Similarly a \emph{right coset} of $H$ in $G$ is a subset of $G$ that is of the form $Hx$, where $Hx = \{ hx : h \in H \}$ $\hbar$ \end{definition} \begin{note} @@ -505,25 +586,6 @@ Let's continue using our application training example. In this case, we'd want t \item Find the slope of the line $5x - 5y = 7$. \end{problemset} -\chapter{Margin Notes} -For version 3.08, we introduce margin note option and \lstinline{\elegantpar} (Beta). In this template, margin note option \lstinline{marginpar} is included. If \lstinline{marginpar=margintrue}, the width of both sides will reduce at least 1.5cm. If \lstinline{marginpar=marginfalse}, the width of sides will remain unchanged. Margin note option works under \lstinline{device=normal} only. - -Margin note option can be activated using \lstinline{\marginpar} built in \LaTeX{} or \lstinline{\marginnote} command in \lstinline{marginnote}. For more information, refer to \href{https://en.wikibooks.org/wiki/LaTeX/Footnotes_and_Margin_Notes#Margin_Notes}{Margin Notes} or \LaTeX{} books. - -\lstinline{\elegantpar} is introduced in this version. Note that TikZ overlay is used in this command, hence you have to compile three times to get the right display effect. - -%\setlength{\marginparwidth}{2.5cm} -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et \elegantpar{dolore magna aliqua}{This is Beautiful the elegantpar Style for English Text}. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - -\begin{equation} -E = m\elegantpar{c^{2}}{ - \begin{equation*}E=mc^2\end{equation*}} -\end{equation} \chapter{FAQ} @@ -536,6 +598,13 @@ E = m\elegantpar{c^{2}}{ \end{solution} +\begin{custom}{Question} + \lstinline[breaklines]{Package ctex Error: CTeX fontset `Mac' is unavailable.} +\end{custom} + +\begin{solution} + Under Mac, please use \lstinline{XeLaTeX} for Chinese documents. +\end{solution} \begin{custom}{Question} Which version should I choose? @@ -587,7 +656,7 @@ E = m\elegantpar{c^{2}}{ \end{custom} \begin{solution} - Yes, \lstinline{listings} package is used in ElegantBook, hence language is optional. For global setting, use \lstinline{\lstset}. For more information, please refer to package documentations. + Yes, \lstinline{listings} package is used in ElegantBook, hence language is optional(e.g. \lstinline{language=Python}). For global setting, use \lstinline{\lstset}. For more information, please refer to package documentations. \end{solution} diff --git a/Master/texmf-dist/doc/latex/elegantbook/image/star-history.png b/Master/texmf-dist/doc/latex/elegantbook/image/star-history.png Binary files differnew file mode 100644 index 00000000000..b47076d1b9d --- /dev/null +++ b/Master/texmf-dist/doc/latex/elegantbook/image/star-history.png diff --git a/Master/texmf-dist/tex/latex/elegantbook/elegantbook.cls b/Master/texmf-dist/tex/latex/elegantbook/elegantbook.cls index 7c8ddde691b..6441e3d2d37 100644 --- a/Master/texmf-dist/tex/latex/elegantbook/elegantbook.cls +++ b/Master/texmf-dist/tex/latex/elegantbook/elegantbook.cls @@ -8,7 +8,7 @@ %%%%%%%%%%%%%%%%%%%%% % % !Mode:: "TeX:UTF-8" \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{elegantbook}[2019/05/26 v3.08 ElegantBook document class] +\ProvidesClass{elegantbook}[2019/08/18 v3.09 ElegantBook document class] \RequirePackage{kvoptions} \RequirePackage{etoolbox} @@ -25,6 +25,7 @@ \DeclareStringOption[numbers]{cite} \DeclareStringOption[newtxmath]{math} \DeclareStringOption[marginfalse]{marginpar} +\DeclareStringOption[onecol]{toc} % ----- backward compatibility \DeclareVoidOption{green}{\ekv{color=green}} \DeclareVoidOption{cyan}{\ekv{color=cyan}} @@ -56,6 +57,10 @@ \DeclareVoidOption{margintrue}{\ekv{marginpar=margintrue}} \DeclareVoidOption{marginfalse}{\ekv{marginpar=marginfalse}} + +\DeclareVoidOption{onecol}{\ekv{toc=onecol}} +\DeclareVoidOption{twocol}{\ekv{toc=twocol}} + % ----- Math option ----- \newcommand\mailto[1]{\href{mailto:#1}{\nolinkurl{#1}}} @@ -88,45 +93,25 @@ \RequirePackage{ifxetex} -\ifxetex - \RequirePackage{fontenc} -\else - \RequirePackage[T1]{fontenc} -\fi \RequirePackage{newtxtext} -\ifdefstring{\ELEGANT@math}{newtxmath}{ -\RequirePackage{newtxmath} -}{\relax} - - - -% font setting for text and math -% \RequirePackage[T1]{fontenc} -% \RequirePackage{newtxtext} -% \RequirePackage{newtxmath} -% \RequirePackage[scale=0.85]{newtxtt} \RequirePackage{anyfontsize} \ifdefstring{\ELEGANT@math}{newtxmath}{ -\DeclareSymbolFont{CMletters} {OML}{cmm} {m}{it}% -\DeclareSymbolFont{CMsymbols} {OMS}{cmsy}{m}{n}% -\DeclareSymbolFont{CMlargesymbols}{OMX}{cmex}{m}{n}% -% \let\sum\relax -% \DeclareMathSymbol{\sum}{\mathop}{CMlargesymbols}{"50}% -% \let\int\relax -% \DeclareMathSymbol{\int}{\mathop}{CMlargesymbols}{"5A}% -\let\intop\relax\let\sumop\relax\let\ointop\relax\let\prodop\relax +\RequirePackage{newtxmath} +\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{\intop}{\mathop}{CMlargesymbols}{"52} -\DeclareMathSymbol{\ointop}{\mathop}{CMlargesymbols}{"48} \DeclareMathSymbol{\prodop}{\mathop}{CMlargesymbols}{"51} -% \let\partial\relax -% \DeclareMathSymbol{\partial}{\mathord}{CMletters}{"40}% -% \let\in\relax -%\DeclareMathSymbol{\in}{\mathrel}{CMsymbols}{"32}% -% \let\pi\relax -% \DeclareMathSymbol{\pi}{\mathord}{CMletters}{"19} }{\relax} % ----- Handle Colors ----- @@ -227,7 +212,7 @@ \RequirePackage{enumerate} % list/itemize/enumerate setting -\RequirePackage[shortlabels]{enumitem} +\RequirePackage[shortlabels,inline]{enumitem} \setlist{nolistsep} % caption settings @@ -239,7 +224,20 @@ \setlength{\abovedisplayskip}{3pt} \setlength{\belowdisplayskip}{3pt} \setcounter{tocdepth}{1} +\RequirePackage[flushmargin]{footmisc} +\setlength{\footnotesep}{12pt} } + +\ifdefstring{\ELEGANT@toc}{twocol}{ +\renewcommand{\tableofcontents}{% +\setlength{\columnsep}{2em} +%\setlength{\columnseprule}{.8pt} +\begin{multicols}{2}[\chapter*{\contentsname}]% + \@starttoc{toc}% +\end{multicols}} +}{\relax} + + %% 常用宏包 \linespread{1.3} @@ -247,31 +245,35 @@ %\RequirePackage{enumerate} \RequirePackage{amsmath,mathrsfs,amsfonts,amssymb} \RequirePackage{booktabs} -\RequirePackage{multicol} +\RequirePackage{multicol,multirow} \RequirePackage{xcolor} \RequirePackage{fancyvrb} \RequirePackage{makecell,lipsum,hologo,setspace} %%中文结构名字 \ifdefstring{\ELEGANT@lang}{cn}{ -\renewcommand{\contentsname}{目\hspace{2em}录} -\renewcommand{\figurename}{图} -\renewcommand{\tablename}{表} -\renewcommand{\partname}{\color{structurecolor}} -\renewcommand{\thepart}{第\zhnumber{\arabic{part}}部分} -\renewcommand{\listfigurename}{插图目录} -\renewcommand{\listtablename}{表格目录} -\renewcommand{\bibname}{参考文献} -\renewcommand{\appendixname}{附录} -\renewcommand{\indexname}{索\hspace{2em}引} -\newcommand\figref[1]{\textbf{图}~\ref{#1}} -\newcommand\tabref[1]{\textbf{表}~\ref{#1}} -\renewcommand{\chaptername}{第 \thechapter\;章} -\ifdefstring{\ELEGANT@cite}{authoryear}{ -\RequirePackage[authoryear]{gbt7714}}{\relax} -\ifdefstring{\ELEGANT@cite}{numbers}{ -\RequirePackage[numbers]{gbt7714}}{\relax} -% \bibliographystyle{aer} + \renewcommand{\contentsname}{目\hspace{2em}录} + \renewcommand{\figurename}{图} + \renewcommand{\tablename}{表} + \renewcommand{\partname}{\color{structurecolor}} + \renewcommand{\thepart}{第\zhnumber{\arabic{part}}部分} + \renewcommand{\listfigurename}{插图目录} + \renewcommand{\listtablename}{表格目录} + \renewcommand{\bibname}{参考文献} + \renewcommand{\appendixname}{附录} + \renewcommand{\indexname}{索\hspace{2em}引} + \newcommand\figref[1]{\textbf{图}~\ref{#1}} + \newcommand\tabref[1]{\textbf{表}~\ref{#1}} + \renewcommand{\chaptername}{第 \thechapter\,章} + \ifdefstring{\ELEGANT@cite}{authoryear}{ + \RequirePackage[authoryear]{gbt7714} + }{\relax} + \ifdefstring{\ELEGANT@cite}{numbers}{ + \RequirePackage[numbers]{gbt7714} + }{\relax} + \ifdefstring{\ELEGANT@cite}{super}{ + \RequirePackage[super]{gbt7714} + }{\relax} }{\relax} \ifdefstring{\ELEGANT@lang}{en}{ \newcommand\figref[1]{\textbf{Figure}~\ref{#1}} @@ -306,7 +308,6 @@ %% device settings \RequirePackage{geometry} -\RequirePackage{marginnote} \ifdefstring{\ELEGANT@device}{normal}{ \geometry{ a4paper, @@ -317,8 +318,8 @@ } \ifdefstring{\ELEGANT@marginpar}{margintrue}{ \geometry{ - marginparwidth=6cm, marginparsep=5mm, - left=1.5cm,right=7.5cm, + marginparwidth=5cm, marginparsep=5mm, + left=2cm,right=7cm, } }{\relax} }{\relax} @@ -404,21 +405,21 @@ colframe=main, colback=main!5, colbacktitle=main, - overlay unbroken and last={\node[anchor=south east, outer sep=6pt] at (\textwidth-width,0) {\textcolor{main}{$\clubsuit$}}; } + overlay unbroken and last={\node[anchor=south east, outer sep=0pt] at (\linewidth-width,0) {\textcolor{main}{$\clubsuit$}}; } }, thmstyle/.style={ common, colframe=second, colback=second!5, colbacktitle=second, - overlay unbroken and last={\node[anchor=south east, outer sep=6pt] at (\textwidth-width,0) {\textcolor{second}{$\heartsuit$}}; } + overlay unbroken and last={\node[anchor=south east, outer sep=0pt] at (\linewidth-width,0) {\textcolor{second}{$\heartsuit$}}; } }, propstyle/.style={ common, colframe=third, colback=third!5, colbacktitle=third, - overlay unbroken and last={\node[anchor=south east, outer sep=6pt] at (\textwidth-width,0) {\textcolor{third}{$\spadesuit$}}; } + overlay unbroken and last={\node[anchor=south east, outer sep=0pt] at (\linewidth-width,0) {\textcolor{third}{$\spadesuit$}}; } }, } @@ -521,9 +522,9 @@ \setcounter{exam}{0} \renewcommand{\theexam}{\thechapter.\arabic{exam}} \newenvironment{example}[1][]{ - \refstepcounter{exam}\par\noindent\textbf{\color{main}{ + \refstepcounter{exam}\par\noindent\textbf{\color{main}{% \ifdefstring{\ELEGANT@lang}{en}{Example}{例} - }\theexam #1 }\rmfamily % + }\theexam #1 \,}\rmfamily % }{ \par\medskip\ignorespacesafterend % } @@ -533,9 +534,9 @@ \setcounter{exer}{0} \renewcommand{\theexer}{\thechapter.\arabic{exer}} \newenvironment{exercise}[1][]{ - \refstepcounter{exer}\par\noindent\makebox[-3pt][r]{\scriptsize\color{red!90}\HandPencilLeft\quad}\textbf{\color{main}{ + \refstepcounter{exer}\par\noindent\makebox[-3pt][r]{\scriptsize\color{red!90}\HandPencilLeft\quad}\textbf{\color{main}{% \ifdefstring{\ELEGANT@lang}{en}{Exercise}{练习} - }\theexer #1 }\rmfamily % + }\theexer #1 \,}\rmfamily % }{ \par\medskip\ignorespacesafterend % } @@ -547,39 +548,39 @@ \newenvironment{problem}[1][]{ \refstepcounter{prob}\par\noindent\textbf{\color{main}{% \ifdefstring{\ELEGANT@lang}{en}{Problem}{例题} - }\theprob #1 }\rmfamily % + }\theprob #1 \,}\rmfamily % }{ \par\medskip\ignorespacesafterend % } -\newenvironment{note}{\par\noindent{\makebox[0pt][r]{\scriptsize\color{red!90}\textdbend\quad}\textbf{\color{second} - \ifdefstring{\ELEGANT@lang}{en}{Note}{注意} +\newenvironment{note}{\par\noindent{\makebox[0pt][r]{\scriptsize\color{red!90}\textdbend\quad}\textbf{\color{second}% + \ifdefstring{\ELEGANT@lang}{en}{Note}{注意}\, }}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}}{\par} -\newenvironment{proof}{\par\noindent\textbf{\color{second} - \ifdefstring{\ELEGANT@lang}{en}{Proof}{证明} +\newenvironment{proof}{\par\noindent\textbf{\color{second}% + \ifdefstring{\ELEGANT@lang}{en}{Proof}{证明}\; }\color{black!90}\small}{ %\hfill$\Box$\quad \par} -\newenvironment{remark}{\noindent\textbf{\color{second} - \ifdefstring{\ELEGANT@lang}{en}{Remark}{注} +\newenvironment{remark}{\noindent\textbf{\color{second}% + \ifdefstring{\ELEGANT@lang}{en}{Remark}{注}\, }}{\par} -\newenvironment{assumption}{\par\noindent\textbf{\color{third} - \ifdefstring{\ELEGANT@lang}{en}{Assumption}{假设} +\newenvironment{assumption}{\par\noindent\textbf{\color{third}% + \ifdefstring{\ELEGANT@lang}{en}{Assumption}{假设}\, }}{\par} -\newenvironment{conclusion}{\par\noindent\textbf{\color{third} - \ifdefstring{\ELEGANT@lang}{en}{Conclusion}{结论} +\newenvironment{conclusion}{\par\noindent\textbf{\color{third}% + \ifdefstring{\ELEGANT@lang}{en}{Conclusion}{结论}\, }}{\par} -\newenvironment{solution}{\par\noindent\textbf{\color{main} - \ifdefstring{\ELEGANT@lang}{en}{Solution}{解} +\newenvironment{solution}{\par\noindent\textbf{\color{main}% + \ifdefstring{\ELEGANT@lang}{en}{Solution}{解}\; }\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}}{\vskip2ex\par} -\newenvironment{property}{\par\noindent\textbf{\color{third} - \ifdefstring{\ELEGANT@lang}{en}{Property}{性质} +\newenvironment{property}{\par\noindent\textbf{\color{third}% + \ifdefstring{\ELEGANT@lang}{en}{Property}{性质}\; }}{\par} \newenvironment{custom}[1]{\par\noindent\textbf{\color{third} - \ifdefstring{\ELEGANT@lang}{en}{#1}{#1} + \ifdefstring{\ELEGANT@lang}{en}{#1}{#1}\, }}{\par} \RequirePackage{multicol} @@ -612,13 +613,17 @@ \end{tcolorbox}} \RequirePackage{adforn} -\newenvironment{problemset}[1][\ifdefstring{\ELEGANT@lang}{en}{\textbf{\chaptername\; Exercise}}{\textbf{\chaptername\; 习题}}]{ +\newenvironment{problemset}[1][\ifdefstring{\ELEGANT@lang}{en}{\textbf{\chaptername\, Exercise}}{\textbf{\chaptername\, 习题}}]{ \begin{center} +\ifdefstring{\ELEGANT@lang}{en}{\addcontentsline{toc}{section}{\texorpdfstring{\chaptername\,}{Chapter} Exercise} }{\addcontentsline{toc}{section}{\texorpdfstring{\chaptername\,}{章节}习题}} \textcolor{structurecolor}{\Large\bfseries\adftripleflourishleft~#1~\adftripleflourishright} \end{center} \begin{enumerate}[label=\textcolor{structurecolor}{\arabic*.}]}{% \end{enumerate}} +\def\relsec{\endgroup start} +\def\endrelsec{end\begingroup\def \@currenvir {relsec}} + \ifdefstring{\ELEGANT@result}{noanswer}{ \AtBeginDocument{ \excludecomment{solution} @@ -633,23 +638,39 @@ \RequirePackage{lastpage} \fancyhf{} -\if@twoside -\fancyhead[EL,OR]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}--\thepage/\pageref*{LastPage}--} -\fancyhead[ER]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\leftmark{}} -\fancyhead[OL]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\rightmark} -\else -\fancyhead[R]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}--\thepage/\pageref*{LastPage}--} -\fancyhead[L]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\rightmark} -\fi -\fancyfoot[c]{\base{structurecolor}{88}} +\ifdefstring{\ELEGANT@base}{hide}{ + \if@twoside + \fancyhead[ER,OR]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\rightmark} + \fancyhead[El,OL]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\leftmark} + \else + \fancyhead[L]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\leftmark} + \fancyhead[R]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\rightmark} + \fancyfoot[c]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}--\;\thepage/\pageref*{LastPage}\;--} + \fi +}{\relax} + + +\ifdefstring{\ELEGANT@base}{show}{ + \fancyfoot[c]{\catcode`\$=3\relax\base{structurecolor}{88}} + \if@twoside + \fancyhead[ER,OL]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}--\;\thepage/\pageref*{LastPage}\;--} + \fancyhead[EL]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\leftmark} + \fancyhead[OR]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\rightmark} + \else + \fancyhead[R]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}--\;\thepage/\pageref*{LastPage}\;--} + \fancyhead[L]{\color{structurecolor}\ifdefstring{\ELEGANT@lang}{en}{\itshape}{\kaishu}\leftmark} + \fi +}{\relax} + + \renewcommand{\headrule}{\color{structurecolor}\hrule width\textwidth} \pagestyle{fancy} \renewcommand{\headrulewidth}{1pt} % \renewcommand{\headrule}{} \fancypagestyle{plain}{\renewcommand{\headrulewidth}{0pt}\fancyhf{}\renewcommand{\headrule}{}} -\renewcommand{\sectionmark}[1]{\markright{\thesection\; #1}{} } -\renewcommand{\chaptermark}[1]{\markboth{\chaptername \; #1\;}{}} +\renewcommand{\sectionmark}[1]{\markright{\thesection\, #1}{} } +\renewcommand{\chaptermark}[1]{\markboth{\chaptername \, #1\,}{}} %%封面 \newcommand*{\extrainfo}[1]{\def\@extrainfo{#1}} @@ -727,7 +748,6 @@ - \RequirePackage{listings} \renewcommand{\ttdefault}{cmtt} \lstdefinestyle{mystyle}{ @@ -746,9 +766,9 @@ breaklines=true, keywordstyle=\color{winered}, commentstyle=\color{gray}, - emph={elegantpaper,fontenc,fontspec,xeCJK,FiraMono,xunicode,newtxmath,figure,fig,image,img,table,itemize,enumerate,newtxtext,newtxtt,ctex,microtype,description,times,newtx,booktabs,tabular,PDFLaTeX,XeLaTeX,type1cm,BibTeX,device,color,mode,lang,amsthm,tcolorbox,titlestyle,cite,marginnote,ctex,listings}, + emph={elegantpaper,fontenc,fontspec,xeCJK,FiraMono,xunicode,newtxmath,figure,fig,image,img,table,itemize,enumerate,newtxtext,newtxtt,ctex,microtype,description,times,newtx,booktabs,tabular,PDFLaTeX,XeLaTeX,type1cm,BibTeX,device,color,mode,lang,amsthm,tcolorbox,titlestyle,cite,marginnote,ctex,listings,base}, emphstyle={\color{frenchplum}}, - morekeywords={DeclareSymbolFont,SetSymbolFont,toprule,midrule,bottomrule,institute,version,includegraphics,setmainfont,setsansfont,setmonofont ,setCJKmainfont,setCJKsansfont,setCJKmonofont,RequirePackage,figref,tabref,email,maketitle,keywords,definecolor,extrainfo,logo,cover,subtitle,appendix,chapter,hypersetup,mainmatter,tableofcontents,elegantpar,numbers,authoryear,heiti,kaishu,lstset,pagecolor,zhnumber,marginpar,part,equote}, + morekeywords={DeclareSymbolFont,SetSymbolFont,toprule,midrule,bottomrule,institute,version,includegraphics,setmainfont,setsansfont,setmonofont ,setCJKmainfont,setCJKsansfont,setCJKmonofont,RequirePackage,figref,tabref,email,maketitle,keywords,definecolor,extrainfo,logo,cover,subtitle,appendix,chapter,hypersetup,mainmatter,tableofcontents,elegantpar,heiti,kaishu,lstset,pagecolor,zhnumber,marginpar,part,equote,marginnote}, frame=single, tabsize=2, rulecolor=\color{structurecolor}, @@ -756,25 +776,6 @@ columns=flexible, % backgroundcolor=\color{lightgrey} } - +\newcommand\bmmax{0} \RequirePackage{bm} -\newif\ifstartedinmathmode -\newcommand{\elegantpar}[2]{% - \relax\ifmmode\startedinmathmodetrue\else\startedinmathmodefalse\fi - {\color{second}\ifstartedinmathmode \ensuremath{\bm\langle #1 \bm\rangle}\else $\bm\langle$#1$\bm\rangle$\fi}% - \begin{tikzpicture}[remember picture, baseline=-0.75ex]% - \node[coordinate] (inText) {};% - \end{tikzpicture}% - \marginnote{% - \renewcommand{\baselinestretch}{1.0}% - \begin{tikzpicture}[remember picture]% - \draw node[fill= third!20, rounded corners,text width=\marginparwidth] (inNote){\footnotesize #2};% - \end{tikzpicture}% - }% - \begin{tikzpicture}[remember picture, overlay]% - \draw[draw = second] - ([yshift=-0.55em] inText) - -| ([xshift=-0.55em] inNote.west) - -| (inNote.west);% - \end{tikzpicture}% -} + |