From ae7a9ae8f6b6642ae296a4c639fff3181bc74bad Mon Sep 17 00:00:00 2001 From: EthanDeng Date: Sun, 12 Apr 2020 12:00:13 +0800 Subject: [PATCH] update 3.11 --- elegantbook-cn.tex | 65 +++++++++++++---------------- elegantbook-en.tex | 65 +++++++++++++++-------------- elegantbook.cls | 102 +++++++++++++++++---------------------------- 3 files changed, 103 insertions(+), 129 deletions(-) diff --git a/elegantbook-cn.tex b/elegantbook-cn.tex index ea84794..ee6da60 100644 --- a/elegantbook-cn.tex +++ b/elegantbook-cn.tex @@ -1,15 +1,15 @@ -\documentclass[cn,11pt,chinese]{elegantbook} +\documentclass[cn,11pt,chinese,founder]{elegantbook} \title{ElegantBook:优美的 \LaTeX{} 书籍模板} \subtitle{Elegant\LaTeX{} 经典之作} \author{Ethan Deng \& Liam Huang} \institute{Elegant\LaTeX{} Program} -\date{February 10, 2020} -\version{3.10} +\date{April 12, 2020} +\version{3.11} \bioinfo{自定义}{信息} -\extrainfo{Victory won\rq t come to us unless we go to it. --- M. Moore} +\extrainfo{温柔正确的人总是难以生存,因为这世界既不温柔,也不正确。—— 比企谷八幡} \logo{logo-blue.png} \cover{cover.jpg} @@ -17,11 +17,6 @@ % 本文档命令 \usepackage{array} \newcommand{\ccr}[1]{\makecell{{\color{#1}\rule{1cm}{1cm}}}} -% 修改目录深度 -\setcounter{tocdepth}{2} - -\usepackage{cleveref} -\crefformat{chapter}{#2第\zhnumber{#1}章#3} \begin{document} @@ -74,22 +69,17 @@ \chapter{Elegant\LaTeX{} 系列模板介绍} \section{ElegantBook 更新说明} -此次更新主要有 +此次为 3.x 最后一个版本,在 3.10 基础上,主要为了解决 \TeX{} Live 2020 中编译错误,具体内容有: + \begin{enumerate} - \item 增加数学字体选项 \lstinline{math},可选项为 \lstinline{newtx} 和 \lstinline{cm}。\\ - \textbf{重要提示}:原先通过 \lstinline{newtxmath} 宏包设置的数学字体改为 \LaTeX{} 默认数学字体,如果需要保持原来的字体,需要显式声明数学字体(\lstinline{math=newtx}); - \item 新增中文字体选项 \lstinline{chinesefont},可选项为 \lstinline{ctexfont}、\lstinline{founder} 和 \lstinline{nofont}。 - \item 将封面作者信息设置为可选,并且增加自定义信息命令 \lstinline{\bioinfo}; - \item 在说明文档中增加版本历史,新增 \lstinline{\datechange} 命令和 \lstinline{change} 环境; - \item 增加汉化章节选项 \lstinline{scheme},可选项为汉化 \lstinline{chinese}; - \item 由于 \lstinline{\lvert} 问题已经修复,重新调整 \lstinline{ctex} 宏包和 \lstinline{amsmath} 宏包位置。 - \item 修改页眉设置,去除了 \lstinline{\lastpage} 以避免 page anchor 问题,加入 \lstinline{\frontmatter}。 - \item 修改参考文献选项 \lstinline{cite},可选项为数字 \lstinline{numbers}、 作者-年份 \lstinline{authoryear} 以及上标 \lstinline{super}。 - \item 新增参考文献样式选项 \lstinline{bibstyle},并将英文模式下参考文献样式 \lstinline{apalike} 设置为默认值,中文仍然使用 \lstinline{gbt7714} 宏包设置。 + \item \textbf{重要修正}:修复因为 \lstinline{gbt7714} 宏包更新导致的 \lstinline{natbib option clash} 错误; + \item 由于 \lstinline{pgfornament} 宏包未被 \TeX Live 2020 收录,因此删除 base 相关的内容; + \item 修复部分环境的空格问题; + \item 增加了意大利语言选项 \lstinline{lang=it}。 \end{enumerate} \begin{note} -如果你之前使用了本模板,在使用新版本时,需要删除文档中的 \lstinline|\hypersetup{pageanchor=true}|,并且在 \lstinline{\maketitle} 和 \lstinline{\tableofcontents} 之间添加 \lstinline{\frontmatter}。2.x 版本的用户请仔细查看\href{https://github.com/ElegantLaTeX/ElegantBook/wiki/convert}{跨版本转换}。 +如果你使用旧版本切换到新版本时,遇到问题时,请核对文档中是否有 \lstinline{pageanchor} 字样。如果有,请删除文档中的 \lstinline|\hypersetup{pageanchor=true}|,并且在 \lstinline{\maketitle} 和 \lstinline{\tableofcontents} 之间添加 \lstinline{\frontmatter}。2.x 版本的用户请仔细查看\href{https://github.com/ElegantLaTeX/ElegantBook/wiki/convert}{跨版本转换}。 \end{note} \section{模板安装与更新} @@ -217,7 +207,11 @@ \section{捐赠} 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 & 微信 \\ + * 者 & 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 & 微信 \\ \hline \end{tabular}% \label{tab:donation}% @@ -227,15 +221,15 @@ \section{捐赠} \begin{figure}[!htbp] \centering -\includegraphics[width=0.7\textwidth]{cert.pdf} +\includegraphics[width=0.6\textwidth]{cert.pdf} \end{figure} -\chapter{ElegantBook 设置说明}\label{chap:foo} +\chapter{ElegantBook 设置说明} -\cref{chap:foo}本模板基于基础的 book 文类,所以 book 的选项对于本模板也是有效的(纸张无效,因为模板有设备选项)。默认编码为 UTF-8,推荐使用 \TeX{} Live 编译。本文编写环境为 Win10 (64bit) + \TeX{} Live 2019,支持 \hologo{pdfLaTeX} 以及 \hologo{XeLaTeX} 编译。中文请尽量使用 \hologo{XeLaTeX} 编译。 +本模板基于基础的 book 文类,所以 book 的选项对于本模板也是有效的(纸张无效,因为模板有设备选项)。默认编码为 UTF-8,推荐使用 \TeX{} Live 编译。本文编写环境为 Win10 (64bit) + \TeX{} Live 2020,支持 \hologo{pdfLaTeX} 以及 \hologo{XeLaTeX} 编译。中文请尽量使用 \hologo{XeLaTeX} 编译。 \section{语言模式} -本模板内含两套语言环境,改变语言环境会改变图表标题的引导词(图,表),文章结构词(比如目录,参考文献等),以及定理环境中的引导词(比如定理,引理等)。不同语言模式的启用如下: +本模板内含三套语言环境 \lstinline{lang=cn}、\lstinline{lang=en} 以及 \lstinline{lang=it}\footnote{由 \href{https://github.com/VincentMVV}{VincentMVV} 提供意大利语翻译,具体的内容见 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/85}{Italian translation}。},改变语言环境会改变图表标题的引导词(图,表),文章结构词(比如目录,参考文献等),以及定理环境中的引导词(比如定理,引理等)。不同语言模式的启用如下: \begin{lstlisting} \documentclass[cn]{elegantbook} \documentclass[lang=cn]{elegantbook} @@ -426,14 +420,6 @@ \subsection{其他环境的使用} \item 结论(conclusion)等环境都是普通段落环境,引导词加粗。 \end{itemize} -\section{装饰物} - -本模板为章节后和页面下方的装饰物(base)添加了隐藏选项,有 \lstinline{show}(默认) 和 \lstinline{hide} 两个选项。 -\begin{lstlisting} -\documentclass[hide]{elegantbook} %or -\documentclass[base=hide]{elegantbook} -\end{lstlisting} - \section{列表环境} 本模板借助于 \lstinline{tikz} 定制了 \lstinline{itemize} 和 \lstinline{enumerate} 环境,其中 \lstinline{itemize} 环境修改了 3 层嵌套,而 \lstinline{enumerate} 环境修改了 4 层嵌套(仅改变颜色)。示例如下\\[2ex] \begin{minipage}[b]{0.49\textwidth} @@ -847,6 +833,16 @@ \chapter{版本更新历史} 根据用户的反馈,我们不断修正和完善模板。截止到此次更新,ElegantBook 模板在 GitHub 上有将近 100 次提交,正式发行版本(release)有 16 次。由于 3.00 之前版本与现在版本差异非常大,在此不列出 3.00 之前的更新内容。 +\datechange{2020/04/12}{版本 3.11 正式发布,\textcolor{red}{此版本为 3.x 最后版本。}} + +\begin{change} + \item \textbf{重要修正}:修复因为 \lstinline{gbt7714} 宏包更新导致的 \lstinline{natbib option clash} 错误; + \item 由于 \lstinline{pgfornament} 宏包未被 \TeX{} Live 2020 收录,因此删除 base 相关的内容; + \item 修复部分环境的空格问题; + \item 增加了意大利语言选项 \lstinline{lang=it}。 +\end{change} + + \datechange{2020/02/10}{版本 3.10 正式发布} \begin{change} @@ -962,7 +958,6 @@ \chapter{版本更新历史} \item 颜色名字重命名。 \end{change} - \nocite{*} \bibliography{reference} \appendix diff --git a/elegantbook-en.tex b/elegantbook-en.tex index 120716d..e3f7e0a 100644 --- a/elegantbook-en.tex +++ b/elegantbook-en.tex @@ -1,12 +1,12 @@ -\documentclass[lang=en,11pt,fancy]{elegantbook} +\documentclass[lang=en,11pt,fancy,authoryear]{elegantbook} \title{An Elegant \LaTeX{} Template for Books} \subtitle{Classic Elegant\LaTeX{} Template} \author{Ethan Deng \& Liam Huang} \institute{Elegant\LaTeX{} Program} -\date{February 10, 2020} -\version{3.10} +\date{April 12, 2020} +\version{3.11} \bioinfo{Bio}{Information} \extrainfo{Victory won\rq t come to us unless we go to it. } @@ -29,7 +29,7 @@ \chapter{Elegant\LaTeX{} Templates} Contact Infos: \begin{itemize} \item Homepage: \href{https://elegantlatex.org/}{https://elegantlatex.org/} - \item Github: \href{https://github.com/ElegantLaTeX/}{https://github.com/ElegantLaTeX/} + \item GitHub: \href{https://github.com/ElegantLaTeX/}{https://github.com/ElegantLaTeX/} \item CTAN: \href{https://ctan.org/pkg/elegantbook}{https://ctan.org/pkg/elegantbook} \item Wiki: \href{https://github.com/ElegantLaTeX/ElegantBook/wiki}{https://github.com/ElegantLaTeX/ElegantBook/wiki} \item Download: \href{https://github.com/ElegantLaTeX/ElegantBook/releases}{release}, \href{https://github.com/ElegantLaTeX/ElegantBook/archive/master.zip}{latest version} @@ -41,18 +41,14 @@ \chapter{Elegant\LaTeX{} Templates} \section{ElegantBook Updates} -What\rq s new in this version: + +Version 3.11 is the last version of 3.x, it's base upon 3.10, mainly to resolve \TeX{} Live 2020 compilation errors caused by \lstinline{gbt7714} compatibility issues. What\rq s new in this version: + \begin{enumerate} - \item Introduce \lstinline{math} for math font, optional styles are \lstinline{newtx} and \lstinline{cm}.\\ - \textbf{Notice}: The math font \lstinline{newtxmath} in previous versions is reset to default \LaTeX{} math font, to keep previous math font, please declare \lstinline{math=newtx}. - \item Introduce \lstinline{chinesefont} option, with \lstinline{founder}, \lstinline{ctexfont} and \lstinline{nofont} available. - \item Turn author information on the cover optional and add customized command \lstinline{\bioinfo}. - \item Add version history with command \lstinline{\datechange} and environment \lstinline{change}. - \item Add Chinese chapter style \lstinline{scheme} with option \lstinline{chinese}. - \item Since the bug raised by \lstinline{\lvert} is fixed, exchange package positions of \lstinline{ctex} and \lstinline{amsmath}. - \item Drop \lstinline{\lastpage} from header to avoid page anchor bug and adding \lstinline{\frontmatter}. - \item Revise bibliography option \lstinline{cite} with optional styles \lstinline{numbers},\lstinline{authoryear} and \lstinline{super}. - \item Introduce bibliography style option \lstinline{bibstyle}, with default bib style \lstinline{apalike} for English mode and \lstinline{gbt7714} package for Chinese mode. + \item \textbf{Fix}: Fix \lstinline{natbib option clash} problems caused by \lstinline{gbt7714} updates; + \item Remove \lstinline{base} decorations and its options since \lstinline{pgfornament} package is not included in \TeX{} Live 2020; + \item Fix spacing problem in some environments; + \item Add Italian language option, \lstinline{lang=it}. \end{enumerate} @@ -71,7 +67,7 @@ \subsection{To Use Templates Online} \end{remark} \subsection{To Use Portable Version} -For portable version, simply download lastest ElegantBook-master from Github or CTAN (to be more accurate, download \lstinline{elegantbook.cls}) and save the file(s) under your working directory. This way of installation is simple and convenient, but you have to manually update \lstinline{cls} now and then. +For portable version, simply download lastest ElegantBook-master from GitHub or CTAN (to be more accurate, download \lstinline{elegantbook.cls}) and save the file(s) under your working directory. This way of installation is simple and convenient, but you have to manually update \lstinline{cls} now and then. \subsection{To Use Local Installation Version} If you are a \TeX{} Live 2019 user, using the \lstinline{tlshell}\footnote{namely, \TeX{} Live Manager} of \TeX{} Live 2019 direct installation package is strongly recommended. Simply search and open \lstinline{tlshell}, click on \lstinline{File -> Load Default Repository} or customize repository by \lstinline{Options}. Wait till the repository loads successfully, search \lstinline{elegantbook} by name, installation and update is just a click away. @@ -101,7 +97,7 @@ \subsection{Other Release Versions} 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{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. You can visit current available works \href{https://github.com/ElegantLaTeX/Archive/tree/master/Collections}{here}. +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. You can visit current available works \href{https://github.com/ElegantLaTeX/Archive/tree/master/Collections}{here}. \section{About Pull Request} For some reasons, pull requests will NOT by accepted since May 20, 2019. For those who want to help improve the templates, submit issues or clone to your own repository to modify under LPPL-1.3c. @@ -119,9 +115,9 @@ \section{Recruit Support Members} BTW, thank \href{https://github.com/stone-zeng}{Xiangdong Zeng}, \href{https://github.com/latexers}{Zhuluren}, etc. for their help. \section{Acknowledgement} -The number of stars on Github for ElegantBook reached 100 on May 20, 2019\footnote{372 stars by February 8, 2020!}.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{372 stars by February 8, 2020!}.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. -If you like our template, star on Github. +If you like our template, star on GitHub. \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 1,500 RMB! (The emergence of a millionaire is on the way. Loading... ) @@ -162,7 +158,11 @@ \section{Donation} 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 \\ + *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}% @@ -180,14 +180,14 @@ \chapter{ElegantBook Settings} 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 \hologo{pdfLaTeX} or \lstinline{XeLaTeX} works fine. \lstinline{XeLaTeX} is preferred for Chinese articles. \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 +We defined one option named \lstinline{lang} which has three alternative values, \lstinline{lang=en} (default) , \lstinline{lang=cn} and \lstinline{lang=it}\footnote{Provided by \href{https://github.com/VincentMVV}{VincentMVV}, detail in \href{https://github.com/ElegantLaTeX/ElegantBook/issues/85}{GitHub: Italian translation}.}. Different values will alter the captions of figure/table, abstract name, refname, etc. You can use this option as \begin{lstlisting} \documentclass[en]{elegantbook} \documentclass[lang=en]{elegantbook} \end{lstlisting} \begin{remark} -Chinese Characters are acceptable whenever \lstinline{lang=en} or \lstinline{lang=cn}. If you would like to include Chinese characters under (\lstinline{lstlisting}) environment, please use \hologo{XeLaTeX} to compile. +Chinese Characters are acceptable \textbf{ONLY} in \lstinline{lang=cn}. If you would like to include Chinese characters under (\lstinline{lstlisting}) environment, please use \hologo{XeLaTeX} to compile. \end{remark} \section{Device Mode Option} @@ -366,13 +366,6 @@ \subsection{Other Customized Environments} \item Conclusion and other environments are normal paragraph environments with boldfaced introductory words. \end{itemize} -\section{Base Hide Option} -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} -\end{lstlisting} - \section{List Environments} 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] @@ -719,6 +712,17 @@ \chapter{FAQ} \chapter{Version History} We revised our templates now and then. This section shows the version story of ElegantBook. We have nearly 100 submits and 16 releases on GitHub since uploaded. +\datechange{2020/04/12}{release of v3.11, \textcolor{red}{\textbf{LAST} version of 3.x}.} + +\begin{enumerate} + \item \textbf{Fix}: Fix \lstinline{natbib option clash} problems caused by \lstinline{gbt7714} updates; + \item Remove \lstinline{base} decorations and its options since \lstinline{pgfornament} package is not included in \TeX{} Live 2020; + \item Fix spacing problem in some environments; + \item Add Italian language option, \lstinline{lang=it}. +\end{enumerate} + + + \datechange{2020/02/10}{release of v3.10} \begin{change} @@ -744,8 +748,7 @@ \chapter{Version History} \item Revise \lstinline{problemset}. \end{change} - -\nocite{en1,en2,en3} +\nocite{en2,en3} \bibliography{reference} \appendix diff --git a/elegantbook.cls b/elegantbook.cls index babdc6e..8f93c49 100644 --- a/elegantbook.cls +++ b/elegantbook.cls @@ -8,7 +8,7 @@ %%%%%%%%%%%%%%%%%%%%% % % !Mode:: "TeX:UTF-8" \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{elegantbook}[2020/04/11 v4.0.0 ElegantBook document class] +\ProvidesClass{elegantbook}[2020/04/12 v3.11 ElegantBook document class] \RequirePackage{kvoptions} \RequirePackage{etoolbox} @@ -20,7 +20,6 @@ \DeclareStringOption[en]{lang} \DeclareStringOption[answer]{result} \DeclareStringOption[fancy]{mode} -\DeclareStringOption[show]{base} \DeclareStringOption[normal]{device} \DeclareStringOption[cm]{math} \DeclareStringOption[marginfalse]{marginpar} @@ -43,6 +42,7 @@ \DeclareVoidOption{en}{\ekv{lang=en}} \DeclareVoidOption{cn}{\ekv{lang=cn}} +\DeclareVoidOption{it}{\ekv{lang=it}} \DeclareVoidOption{fancy}{\ekv{mode=fancy}} \DeclareVoidOption{simple}{\ekv{mode=simple}} @@ -50,9 +50,6 @@ \DeclareVoidOption{answer}{\ekv{result=answer}} \DeclareVoidOption{noanswer}{\ekv{result=noanswer}} -\DeclareVoidOption{hide}{\ekv{base=hide}} -\DeclareVoidOption{show}{\ekv{base=show}} - \DeclareVoidOption{normal}{\ekv{device=normal}} \DeclareVoidOption{pad}{\ekv{device=pad}} @@ -158,6 +155,11 @@ \else \newcommand{\citshape}{\itshape} \fi +\ifcsname kaishu\endcsname + \newcommand{\cnormal}{\kaishu} +\else + \newcommand{\cnormal}{\normalfont} +\fi \ifcsname fangsong\endcsname \newcommand{\cfs}{\fangsong} @@ -251,21 +253,6 @@ \definecolor{winered}{rgb}{0.5,0,0} \definecolor{bule}{RGB}{18,29,57} - -\newcommand{\base}[2]{% - \nointerlineskip \vspace{0.1\baselineskip}\hspace{\fill} - {\color{#1} - \resizebox{0.3\linewidth}{1.5ex} - {{% - {\begin{tikzpicture} - \node (C) at (0,0) {}; - \node (D) at (4,0) {}; - \path (C) to [ornament=#2] (D); - \end{tikzpicture}}}}}% - \hspace{\fill} - \par\nointerlineskip \vspace{0.1\baselineskip} -} - % ----- Title Style ----- \ifdefstring{\ELEGANT@titlestyle}{hang}{\def\style{hang}}{\relax} \ifdefstring{\ELEGANT@titlestyle}{display}{\def\style{display}}{\relax} @@ -289,9 +276,8 @@ \newcommand{\question}[1]{{\par\citshape #1}\\[0.2ex]} -\RequirePackage[\ELEGANT@cite,sort&compress]{natbib} -\setlength{\bibsep}{0.0pt} -\def\bibfont{\footnotesize} +\ifdefstring{\ELEGANT@lang}{cn}{\relax}{ + \RequirePackage[\ELEGANT@cite,sort&compress]{natbib}} \RequirePackage{enumerate} % list/itemize/enumerate setting @@ -332,7 +318,6 @@ \RequirePackage{xcolor} \RequirePackage{fancyvrb} \RequirePackage{makecell,lipsum,hologo,setspace} - %%中文结构名字 \ifdefstring{\ELEGANT@lang}{cn}{ \renewcommand{\contentsname}{目录} @@ -350,11 +335,16 @@ \ifdefstring{\ELEGANT@scheme}{chinese}{ \renewcommand{\chaptername}{第~\zhnumber{\arabic{chapter}}~章}}{ \renewcommand{\chaptername}{第~\thechapter{}~章}} - \newcommand{\authorname}{\textit{作者:}} - \newcommand{\institutename}{\textit{组织:}} - \newcommand{\datename}{\textit{时间:}} - \newcommand{\versionname}{\textit{版本:}} - \RequirePackage[\ELEGANT@cite]{gbt7714} + \newcommand{\authorname}{\citshape 作者:} + \newcommand{\institutename}{\citshape 组织:} + \newcommand{\datename}{\citshape 时间:} + \newcommand{\versionname}{\citshape 版本:} + \RequirePackage{gbt7714} + \ifdefstring{\ELEGANT@cite}{authoryear}{ + \bibliographystyle{gbt7714-author-year}}{ + \bibliographystyle{gbt7714-numerical}} + \ifdefstring{\ELEGANT@cite}{numbers}{ + \citestyle{numbers}}{\relax} \newcommand{\notename}{笔记} \renewcommand*{\proofname}{证明} \newcommand{\problemname}{例题} @@ -374,10 +364,9 @@ \newcommand{\propertyname}{性质} \newcommand{\introductionname}{内容提要} \newcommand{\problemsetname}{习题} - \newcommand\bioinfo[2]{\gdef\@bioinfo{\textit{#1}:#2}} + \newcommand\bioinfo[2]{\gdef\@bioinfo{{\citshape #1}:#2}} \newcommand{\updatename}{更新:} - \newcommand{\historyname}{版本更新历史} -}{\relax} + \newcommand{\historyname}{版本更新历史}}{\relax} \ifdefstring{\ELEGANT@lang}{en}{ \setlength\parindent{2em} \newcommand\figref[1]{\textbf{Figure}~\ref{#1}} @@ -447,6 +436,8 @@ \newcommand{\historyname}{Cronologia delle versioni} }{\relax} +\setlength{\bibsep}{0.0pt} +\def\bibfont{\footnotesize} \RequirePackage{xpatch} \xpatchcmd{\part}{ @@ -458,7 +449,7 @@ \graphicspath{{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}} -\usepackage{pgfornament} %% load tikz without tikz +\usepackage{tikz} %% load tikz without tikz \usetikzlibrary{backgrounds,calc,shadows} \newcommand*\circled[1]{\tikz[baseline=(char.base)]{ \node[shape=circle,draw,inner sep=1pt] (char) {#1};}} @@ -502,7 +493,7 @@ \setcounter{secnumdepth}{5} \titleformat{\chapter}[\style]{\bfseries} -{\filcenter\LARGE\enspace\bfseries{\color{structurecolor}\IfAppendix{\appendixname}{\chaptername}\enspace}}{1pt}{\bfseries\color{structurecolor}\LARGE\filcenter}[\ifdefstring{\ELEGANT@base}{hide}{}{\filcenter\base{structurecolor}{88}}] +{\filcenter\LARGE\enspace\bfseries{\color{structurecolor}\IfAppendix{\appendixname}{\chaptername}\enspace}}{1pt}{\bfseries\color{structurecolor}\LARGE\filcenter}[] \titleformat{\section}[hang]{\bfseries}{ \Large\bfseries{\color{structurecolor}\thesection}\enspace}{1pt}{% @@ -744,29 +735,14 @@ \RequirePackage{fancyhdr} \fancyhf{} -\ifdefstring{\ELEGANT@base}{hide}{ - \fancyfoot[c]{\color{structurecolor}\scriptsize\thepage} - \if@twoside - \fancyhead[ER]{\color{structurecolor}\citshape\leftmark} - \fancyhead[OL]{\color{structurecolor}\citshape\rightmark} - \else - \fancyhead[R]{\color{structurecolor}\citshape\rightmark} - \fi -}{\relax} - - -\ifdefstring{\ELEGANT@base}{show}{ - \fancyfoot[c]{\catcode`\$=3\relax\base{structurecolor}{88}} - \if@twoside - \fancyhead[EL,OR]{\color{structurecolor}--\;\thepage\;--} - \fancyhead[ER]{\color{structurecolor}\citshape\leftmark} - \fancyhead[OL]{\color{structurecolor}\citshape\rightmark} - \else - \fancyhead[R]{\color{structurecolor}--\;\thepage\;--} - \fancyhead[L]{\color{structurecolor}\citshape\rightmark} - \fi -}{\relax} +\fancyfoot[c]{\color{structurecolor}\scriptsize\thepage} +\if@twoside + \fancyhead[ER]{\color{structurecolor}\cnormal\leftmark} + \fancyhead[OL]{\color{structurecolor}\cnormal\rightmark} +\else + \fancyhead[R]{\color{structurecolor}\cnormal\rightmark} +\fi \renewcommand{\headrule}{\color{structurecolor}\hrule width\textwidth} \pagestyle{fancy} @@ -818,12 +794,12 @@ {\renewcommand{\arraystretch}{0.618} \begin{tabular}{l} % \ifcsname @author\endcsname \authorname \@author\\\fi - \ifx\@author\empty\else\authorname\@author\\ \fi - \ifcsname @institute\endcsname \institutename \@institute\\ \fi + \ifx\@author\empty\else\authorname\cnormal\@author\\ \fi + \ifcsname @institute\endcsname \institutename \cnormal\@institute\\ \fi % \ifcsname @date\endcsname \@date\\\fi - \ifx\@date\empty\else\datename\@date \\ \fi - \ifcsname @version\endcsname \versionname \@version\\ \fi - \ifcsname @bioinfo\endcsname \@bioinfo\\ \fi + \ifx\@date\empty\else\datename\cnormal\@date \\ \fi + \ifcsname @version\endcsname \cnormal\versionname\@version\\ \fi + \ifcsname @bioinfo\endcsname \cnormal\@bioinfo\\ \fi \end{tabular}} \end{minipage} \begin{minipage}[c]{0.27\linewidth} @@ -840,7 +816,7 @@ \vfill \begin{center} \setstretch{1.3} - \parbox[t]{0.7\textwidth}{\centering \itshape + \parbox[t]{0.7\textwidth}{\centering \citshape \ifcsname @extrainfo\endcsname\@extrainfo\fi} \end{center} \vfill @@ -869,7 +845,7 @@ 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,booktabs,tabular,PDFLaTeX,XeLaTeX,type1cm,BibTeX,device,color,mode,lang,amsthm,tcolorbox,titlestyle,cite,ctex,listings,base,math,scheme,toc,esint,chinesefont,amsmath,bibstyle,gbt7714,natbib}, + emph={elegantpaper,fontenc,fontspec,xeCJK,FiraMono,xunicode,newtxmath,figure,fig,image,img,table,itemize,enumerate,newtxtext,newtxtt,ctex,microtype,description,times,booktabs,tabular,PDFLaTeX,XeLaTeX,type1cm,BibTeX,device,color,mode,lang,amsthm,tcolorbox,titlestyle,cite,ctex,listings,base,math,scheme,toc,esint,chinesefont,amsmath,bibstyle,natbib}, 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,frontmatter,tableofcontents,elegantpar,heiti,kaishu,lstset,pagecolor,zhnumber,marginpar,part,equote,marginnote,bioinfo,datechange,listofchange,lvert,lastpage,songti,heiti,fangsong,setCJKfamilyfont,textbf}, frame=single,