diff options
Diffstat (limited to 'macros/latex/contrib/elegantbook/elegantbook-cn.tex')
-rw-r--r-- | macros/latex/contrib/elegantbook/elegantbook-cn.tex | 338 |
1 files changed, 271 insertions, 67 deletions
diff --git a/macros/latex/contrib/elegantbook/elegantbook-cn.tex b/macros/latex/contrib/elegantbook/elegantbook-cn.tex index 728e69fbe9..89f89bd2eb 100644 --- a/macros/latex/contrib/elegantbook/elegantbook-cn.tex +++ b/macros/latex/contrib/elegantbook/elegantbook-cn.tex @@ -1,15 +1,15 @@ -\documentclass[lang=cn,10pt]{elegantbook} +\documentclass[lang=cn,10pt,founder,newtx]{elegantbook} \title{ElegantBook:优美的 \LaTeX{} 书籍模板} \subtitle{Elegant\LaTeX{} 经典之作} \author{Ethan Deng \& Liam Huang} \institute{Elegant\LaTeX{} Program} -\date{April 9, 2022} -\version{4.3} +\date{Aug 15, 2022} +\version{4.4} \bioinfo{自定义}{信息} -\extrainfo{不要以为抹消过去,重新来过,即可发生什么改变。—— 比企谷八幡} +\extrainfo{要让一群人团结起来,需要的不是英明的领导,而是共同的敌人。—— 比企谷八幡} \setcounter{tocdepth}{3} @@ -21,8 +21,11 @@ \newcommand{\ccr}[1]{\makecell{{\color{#1}\rule{1cm}{1cm}}}} % 修改标题页的橙色带 -% \definecolor{customcolor}{RGB}{32,178,170} -% \colorlet{coverlinecolor}{customcolor} +\definecolor{customcolor}{RGB}{32,178,170} +\colorlet{coverlinecolor}{customcolor} +\usepackage{cprotect} + +\addbibresource[location=local]{reference.bib} % 参考文献,不要删除 \begin{document} @@ -35,21 +38,26 @@ \chapter{Elegant\LaTeX{} 系列模板介绍} -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} 或者邮件联系我们。 +Elegant\LaTeX{} 项目组致力于打造一系列美观、优雅、简便的模板方便用户使用。目前由 \href{https://github.com/ElegantLaTeX/ElegantNote}{ElegantNote},\href{https://github.com/ElegantLaTeX/ElegantBook}{ElegantBook},\href{https://github.com/ElegantLaTeX/ElegantPaper}{ElegantPaper} 组成,分别用于排版笔记,书籍和工作论文。大版本改动较大,请关注版本信息,在未开始使用模板钱,建议直接选择最新正式版本! -我们的联系方式如下,建议加入用户 QQ 群提问,这样能更快获得准确的反馈,加群时请备注 \LaTeX{} 或者 Elegant\LaTeX{} 相关内容。 +本文将介绍本模板的一些设置内容以及基本使用方法。如果您有其他问题,建议或者意见,欢迎在 GitHub 上给我们提交 \href{https://github.com/ElegantLaTeX/ElegantBook/issues}{issues} 或者邮件联系我们。我们的联系方式如下,建议加入用户 QQ 群提问,这样能更快获得准确的反馈,加群时请备注 \LaTeX{} 或者 Elegant\LaTeX{} 相关内容。 \begin{itemize} - \item 官网:\href{https://elegantlatex.org/}{https://elegantlatex.org/}(暂时歇业) + \item 官网:\href{https://elegantlatex.org/}{https://elegantlatex.org/} \item GitHub 地址:\href{https://github.com/ElegantLaTeX/}{https://github.com/ElegantLaTeX/} - \item Gitee 地址:\href{https://gitee.com/ElegantLaTeX}{https://gitee.com/ElegantLaTeX} \item CTAN 地址:\href{https://ctan.org/pkg/elegantbook}{https://ctan.org/pkg/elegantbook} \item 下载地址:\href{https://github.com/ElegantLaTeX/ElegantBook/releases}{正式发行版},\href{https://github.com/ElegantLaTeX/ElegantBook/archive/master.zip}{最新版} - \item 微博:Elegant\LaTeX{}(密码有点忘了) - \item 微信公众号:Elegant\LaTeX{}(不定期更新) - \item 用户 QQ 群:692108391(建议加群) + \item 微博:Elegant\LaTeX{} + \item 微信公众号:Elegant\LaTeX{} + \item Bilibili:\href{https://space.bilibili.com/516479629}{ElegantLaTeX} + \item 用户 QQ 群:692108391 \item 邮件:\email{elegantlatex2e@gmail.com} \end{itemize} +\begin{quotation} + \textbf{注意:} 由于 ElegantLaTeX 的模板涉及宏包和设定比较多,不建议没有 \LaTeX{} 基础的用户使用。我们会通过 \href{https://space.bilibili.com/516479629}{B 站}进行直播或者交流分享会,录屏也将发布在该账户下,如果大家在模板的使用上有问题,可以观看视频、加群咨询或者查看模板自带的文档说明(如果安装了 TeX Live,可以使用在命令行提示符下运行 \lstinline{texdoc elegantbook} 命令获得模板的说明文档。 +\end{quotation} + + \section{模板安装与更新} 你可以通过免安装的方式使用本模板,包括在线使用和本地(文件夹内)使用两种方式,也可以通过 \TeX{} 发行版安装使用。 @@ -90,8 +98,18 @@ tlmgr update --self --all --reinstall-forcibly-removed \section{关于提交} -出于某些因素的考虑,Elegant\LaTeX{} 项目自 2019 年 5 月 20 日开始,\textbf{不再接受任何非作者预约性质的提交}(pull request)!如果你想改进模板,你可以给我们提交 issues,或者可以在遵循协议(LPPL-1.3c)的情况下,克隆到自己仓库下进行修改。 +由于精力有限,本人维护模板的时间并不多,考虑到模板的用户还挺多,本模板自 2022 年 8 月开始,开放特性提交(features pull requests)!不过在提交之前,请务必在 issue 区将问题、解决方式以及对应的示例(最简单的使用示例)写清楚,我们会根据 issue 的信息,接受合适的提交。 + +\section{赞助} + +如果您非常喜爱我们的模板,你还可以选择赞助的方式支持这个项目,赞助主要用于网站域名和服务器的购买、QQ 用户群的维护以及对于管理员的奖励。赞赏费用的使用解释权归 ElegantLaTeX/EthanDeng 所有,不接受监督。 + +\begin{figure}[htbp] + \centering + \includegraphics[width=0.5\textwidth]{donate.jpg} +\end{figure} + \chapter{ElegantBook 设置说明} @@ -180,7 +198,7 @@ tlmgr update --self --all --reinstall-forcibly-removed \end{table} 如果需要自定义颜色的话请选择 \lstinline{nocolor} 选项或者使用 \lstinline{color=none},然后在导言区定义 structurecolor、main、second、third 颜色,具体方法如下: -\begin{lstlisting}[tabsize=4]] +\begin{lstlisting}[tabsize=4] \definecolor{structurecolor}{RGB}{0,0,0} \definecolor{main}{RGB}{70,70,70} \definecolor{second}{RGB}{115,45,2} @@ -197,13 +215,13 @@ tlmgr update --self --all --reinstall-forcibly-removed \centering \caption{封面元素信息} \begin{tabular}{p{0.07\textwidth}p{0.15\textwidth}|p{0.07\textwidth}p{0.15\textwidth}|p{0.07\textwidth}p{0.15\textwidth}} - \toprule + \hline 信息 & 命令 & 信息 & 命令 & 信息 & 命令 \\ - \midrule + \hline 标题 & \lstinline|\title| & 副标题 & \lstinline|\subtitle| & 作者 & \lstinline|\author| \\ 机构 & \lstinline|\institute| & 日期 & \lstinline|\date| & 版本 & \lstinline|\version| \\ 箴言 & \lstinline|\extrainfo| & 封面图 & \lstinline|\cover| & 徽标 & \lstinline|\logo| \\ - \bottomrule + \hline \end{tabular} \end{table} @@ -258,59 +276,140 @@ tlmgr update --self --all --reinstall-forcibly-removed \item \textit{定理类环境},包含标题和内容两部分,全部定理类环境的编号均以章节编号。根据格式的不同分为 3 种 \begin{itemize} \item \textcolor{main}{\textbf{definition}} 环境,颜色为 \textcolor{main}{main}; - \item \textcolor{second}{\textbf{theorem、lemma、corollary}} 环境,颜色为 \textcolor{second} {second}; + \item \textcolor{second}{\textbf{theorem、lemma、corollary、axiom、postulate}} 环境,颜色为 \textcolor{second} {second}; \item \textcolor{third}{\textbf{proposition}} 环境,颜色为 \textcolor{third}{third}。 \end{itemize} \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}。},三者均以粗体的引导词为开头,和普通段落格式一致。 + \item \textit{结论类环境},有 \textbf{conclusion、assumption、property、remark、solution} 环境\footnote{本模板还添加了一个 \lstinline|result| 选项,用于隐藏 \lstinline{solution} 和 \lstinline{proof} 环境,默认为显示(\lstinline{result=answer}),隐藏使用 \lstinline{result=noanswer}。},三者均以粗体的引导词为开头,和普通段落格式一致。 \end{itemize} +其中,定理类环境均有带星号的版本:\textcolor{main}{\textbf{definition*}}、\textcolor{second}{\textbf{theorem*}}、\textcolor{second}{\textbf{lemma*}}、\textcolor{second}{\textbf{corollary*}}、\textcolor{second}{\textbf{axiom*}}、\textcolor{second}{\textbf{postulate*}}、\textcolor{third}{\textbf{proposition*}},带星号的定理类环境不会编号。 + \subsection{定理类环境的使用} -由于本模板使用了 \lstinline{tcolorbox} 宏包来定制定理类环境,所以和普通的定理环境的使用有些许区别,定理的使用方法如下: +\subsubsection{\texttt{fancy} 模式} + +在 \lstinline{fancy} 模式下使用了 \lstinline{tcolorbox} 宏包来定制定理类环境,所以和普通的定理环境的使用有些许区别,有编号定理的使用方法如下: + \begin{lstlisting} +% 有名字,有标签 \begin{theorem}{theorem name}{label} - The content of theorem. + 这是一个有名字和标签的定理。 + 用 \ref{thm:label} 来引用这个定理。 +\end{theorem} +% 无名字,有标签 +\begin{theorem}{}{label no name} + 这是一个没有名字但是有标签的定理。 + 用 \ref{thm:label no name} 来引用这个定理。 +\end{theorem} +% 有名字,无标签 +\begin{theorem}{theorem name}{} + 这是一个有名字但是没有标签的定理。 + 这个定理不能被引用。 + 最后的 {} 可以省略不写。 +\end{theorem} +% 无名字,无标签 +\begin{theorem}{}{} + 这是一个没有名字也没有标签的定理。 + 这个定理不能被引用。 + 两个 {} 均可以省略不写。 \end{theorem} \end{lstlisting} -第一个必选项 \lstinline{theorem name} 是定理的名字,第二个必选项 \lstinline{label} 是交叉引用时所用到的标签,交叉引用的方法为 \verb|\ref{thm:label}|。请注意,交叉引用时必须加上前缀 \lstinline{thm:}。 +第一个选项 \lstinline{theorem name} 是定理的名字,如果定理没有名字请使用 \lstinline|{}|\cprotect\footnote{除非这个定理也没有标签,否则不能省略。}。第二个选项 \lstinline{label} 是交叉引用时所用到的标签,如果定理没有标签,可以不写 \lstinline|{label}| 或使用 \lstinline|{}|。交叉引用的方法为 \lstinline|\ref{thm:label}|。请注意,交叉引用时必须加上前缀 \lstinline{thm:}。其他相同用法的定理类环境见表 \ref{tab:theorem-class}。 -在用户多次反馈下,4.x 之后,引入了原生定理的支持方式,也就是使用可选项方式: +不编号的定理使用方法如下: \begin{lstlisting} -\begin{theorem}[theorem name] \label{thm:theorem-label} - The content of theorem. +% 有名字 +\begin{theorem*}{theorem name} + 这是一个不编号的有名字的定理。 + 这个定理不能被引用。 +\end{theorem*} +% 无名字 +\begin{theorem*}{} + 这是一个不编号且没有名字的定理。 + 最后的 {} 可以省略不写。 + 这个定理不能被引用。 +\end{theorem*} +\end{lstlisting} +其中的选项 \lstinline{theorem name} 是定理的名字,如果没有名字可以不写 \lstinline|{theorem name}| 或使用 \lstinline|{}| + +\begin{table}[htbp] + \centering + \caption{定理类环境} + \begin{tabular}{llll} + \toprule + 环境名 & 标签名 & 前缀 & 交叉引用 \\ + \midrule + definition & label & def & \lstinline|\ref{def:label}| \\ + theorem & label & thm & \lstinline|\ref{thm:label}| \\ + postulate & label & pos & \lstinline|\ref{pos:label}| \\ + axiom & label & axi & \lstinline|\ref{axi:label}|\\ + lemma & label & lem & \lstinline|\ref{lem:label}| \\ + corollary & label & cor & \lstinline|\ref{cor:label}| \\ + proposition & label & pro & \lstinline|\ref{pro:label}| \\ + \bottomrule + \end{tabular}% + \label{tab:theorem-class}% +\end{table}% + +在用户多次反馈下,在 4.1 版本引入了原生定理的支持方式,使用方法如下: + +\begin{lstlisting} +% 有名字,有标签 +\begin{theorem}[theorem name]\label{thm:label} + 这是一个有名字和标签的定理。 + 用 \ref{thm:label} 来引用这个定理。 +\end{theorem} +% 无名字,有标签 +\begin{theorem}\label{thm:label no name} + 这是一个没有名字但是有标签的定理。 + 用 \ref{thm:label no name} 来引用这个定理。 \end{theorem} -% or -\begin{theorem} \label{thm:theorem-withou-name} - The content of theorem without name. +% 有名字,无标签 +\begin{theorem}[theorem name] + 这是一个有名字但是没有标签的定理。 + 这个定理不能被引用。 +\end{theorem} +% 无名字,无标签 +\begin{theorem} + 这是一个没有名字也没有标签的定理。 + 这个定理不能被引用。 \end{theorem} \end{lstlisting} +这时引用不需要加前缀,\lstinline{\ref} 中的内容与 \lstinline{\label} 中的内容相同,换句话说,这时的使用方法与使用原生定理环境的时候几乎相同。 -其他相同用法的定理类环境有: +\subsubsection{\texttt{simple} 模式} + +在 \lstinline{simple} 模式下使用了 \lstinline{amsthm} 宏包,定理类环境使用方法与原生一致,定理的使用方法如下: + +\begin{lstlisting} +% 有名字,有标签 +\begin{theorem}[theorem name]\label{thm:label} + 这是一个有名字和标签的定理。 + 用 \ref{thm:label} 来引用这个定理。 +\end{theorem} +% 无名字,有标签 +\begin{theorem}\label{thm:label no name} + 这是一个没有名字但是有标签的定理。 + 用 \ref{thm:label no name} 来引用这个定理。 +\end{theorem} +% 有名字,无标签 +\begin{theorem}[theorem name] + 这是一个有名字但是没有标签的定理。 + 这个定理不能被引用。 +\end{theorem} +% 无名字,无标签 +\begin{theorem} + 这是一个没有名字也没有标签的定理。 + 这个定理不能被引用。 +\end{theorem} +\end{lstlisting} -\begin{table}[htbp] - \centering - \caption{定理类环境} - \begin{tabular}{llll} - \toprule - 环境名 & 标签名 & 前缀 & 交叉引用 \\ - \midrule - definition & label & def & \lstinline|\ref{def:label}| \\ - theorem & label & thm & \lstinline|\ref{thm:label}| \\ - lemma & label & lem & \lstinline|\ref{lem:label}| \\ - corollary & label & cor & \lstinline|\ref{cor:label}| \\ - proposition & label & pro & \lstinline|\ref{pro:label}| \\ - \bottomrule - \end{tabular}% - \label{tab:theorem-class}% - \end{table}% - % \subsection{算法环境} - % \begin{algorithm}\label{alg:test} % \Input{A bitmap $I$ of size $w \times l$} % \Output{A partition of the bitmap} @@ -340,13 +439,93 @@ tlmgr update --self --all --reinstall-forcibly-removed \subsection{修改计数器} -当前定理等环境计数器按章计数,如果想修改定理类环境按节计数,可以修改计数器选项 thmcnt: +当前定理等环境计数器按章计数,如果想修改定理类环境按节计数,可以修改计数器选项 \lstinline{thmcnt},可用选项为 \lstinline{chapter} (默认)与 \lstinline{section}: + +\begin{lstlisting} +\documentclass[section]{elegantbook} %or +\documentclass[thmcnt=section]{elegantbook} +\end{lstlisting} + +\subsection{自定义定理类环境} + +4.4 版本新增了一个自定义定理类环境的命令:\lstinline|\elegantnewtheorem|,它的参数含义如下: + +\begin{lstlisting} +% fancy 模式(默认) +\elegantnewtheorem{env}{title}{style}{prefix} +% simple 模式 +\elegantnewtheorem{env}{title}{style} +\end{lstlisting} +该命令可以同时定义编号环境 \lstinline|env| 和不编号环境 \lstinline|env*|。 + +其中 \lstinline|style| 支持的参数有:\lstinline|defstyle|,\lstinline|thmstyle|,\lstinline|prostyle|,分别对应“定义”,“定理”,“命题”三种样式。 + + +\begin{itemize} + \item 在炫彩模式(\lstinline{fancy})下,需要 4 个参数来定义一个新的定理类环境,分别是: + 定理类环境名,定理类环境的标题,定理类环境的样式,该定理类环境的前缀: + +\begin{lstlisting} +% 导言区 +\elegantnewtheorem{examplefancy}{自定义定理类环境}{thmstyle}{exfancy} +% 正文 +\begin{examplefancy}{定理名}{label} + 这里是自定义定理类环境 \ref{exfancy:label} +\end{examplefancy} +\begin{examplefancy*}{定理名} + 这里是无编号自定义定理类环境 +\end{examplefancy*} +\end{lstlisting} + 如果不给出第四个参数,或第四个参数置空的话,将会用定理类环境名来作为默认前缀,即 \begin{lstlisting} - \documentclass[section]{elegantbook} %or - \documentclass[thmcnt=section]{elegantbook} +% 导言区 +\elegantnewtheorem{test}{TEST}{thmstyle} +% 或 +\elegantnewtheorem{test}{TEST}{thmstyle}{} +% 正文 +\begin{test}{name}{label} + 默认前缀为 test。 + 使用 \ref{test:label} 来引用这个定理类环境。 +\end{test} \end{lstlisting} +这时会在终端以及 \verb|.log| 文件中输出一个警告信息来提示用户没有定义前缀: + +\begin{lstlisting}[language=bash] +Class elegantbook Warning: Because you didn't provide a prefix. +(elegantbook) We use test as the default prefix. +(elegantbook) You have to use +(elegantbook) \ref {test:label} to refer a +(elegantbook) \begin {test}{name}{label} environment. +(elegantbook) on input line 3. +\end{lstlisting} + + \item 在简单模式(\lstinline{simple})下,需要 3 个参数来定义一个新的定理类环境,分别是: + 定理类环境名,定理类环境的标题,定理类环境的样式,该定理类环境的前缀: +\begin{lstlisting} +% 导言区 +\elegantnewtheorem{examplesimple}{自定义定理类环境}{thmstyle} +% 正文 +\begin{examplesimple}[定理名]\label{exsimple:label} + 这里是自定义定理类环境 \ref{exsimple:label} +\end{examplesimple} +\begin{examplesimple*}[定理名] + 这里是无编号自定义定理类环境 +\end{examplesimple*} +\end{lstlisting} + + 如果此时错误地给出了第四个参数,那么将会在终端以及 \verb|.log| 文件中输出一个错误信息: +\begin{lstlisting} +% elegantbook-cn.tex +\elegantnewtheorem{test}{TEST}{thmstyle}{} +% .log file +./elegantbook-cn.tex:3: Class elegantbook Error: You can't set a prefix in mode ``simple''. +(elegantbook) Just use +(elegantbook) \elegantnewtheorem {test}{TEST}{thmstyle} . +\end{lstlisting} + +\end{itemize} \subsection{其他环境的使用} @@ -397,7 +576,25 @@ tlmgr update --self --all --reinstall-forcibly-removed \end{minipage} \section{参考文献} -文献部分,本模板调用了 biblatex 宏包,并提供了 biber(默认) 和 bibtex 两个后端选项,可以使用 \lstinline{bibend} 进行修改: + +\subsection{打印文献} + +之前我们将文献调用的命令放在模板里面,然后用户反馈 \lstinline{\cite} 命令无法自动补全,因此我们新版本将其拿到外面来,新版本打印参考文献的命令的方法是,在导言区(也即 \lstinline|\begin{document}| 之前),加入: + +\begin{lstlisting} + \lstinline|\addbibresource[location=local]{reference.bib}|。 +\end{lstlisting} + +然后再需要打印文献的地方使用: +\begin{lstlisting} + \printbibliography[heading=bibintoc, title=\ebibname] +\end{lstlisting} + +其中 \lstinline{reference.bib} 为参考文献存放的文件,需要放在项目文件夹下。 + +\subsection{修改文献格式} + +此外,本模板调用了 biblatex 宏包,并提供了 biber(默认) 和 bibtex 两个后端选项,可以使用 \lstinline{bibend} 进行修改: \begin{lstlisting} \documentclass[bibtex]{elegantbook} @@ -413,12 +610,13 @@ tlmgr update --self --all --reinstall-forcibly-removed \documentclass[citestyle=gb7714-2015, bibstyle=gb7714-2015]{elegantbook} \end{lstlisting} -如果需要添加排序方式,可以在导言区加入 +如果需要添加排序方式,可以在导言区加入下面命令: \begin{lstlisting} \ExecuteBibliographyOptions{sorting=ynt} \end{lstlisting} -启用国标之后,可以加入 \lstinline{sorting=gb7714-2015}。 +如果使用的是国标,可以将 \lstinline{ynt} 改为 \lstinline{gb7714-2015},使文献按照国标规定进行文献排序。 + \section{添加序章} @@ -483,7 +681,7 @@ The content of introduction. 效果如下: -\begin{problemset} +\begin{problemset}[我的题目] \item exercise 1 \item exercise 2 \item exercise 3 @@ -568,12 +766,12 @@ The content of introduction. 如果使用 \lstinline{newtx} 系列字体宏包,需要注意下连字符的问题。 \begin{equation} - \int_{R^q} f(x,y) dy.\emph{of\kern0pt f} + \int_{R^q} f(x,y) dy.\emph{of\kern0pt f} \sin x \end{equation} 的代码为 \begin{lstlisting} \begin{equation} - \int_{R^q} f(x,y) dy.\emph{of \kern0pt f} + \int_{R^q} f(x,y) dy.\emph{of\kern0pt f} \sin x \end{equation} \end{lstlisting} @@ -607,10 +805,6 @@ LaTeX Error: \item \lstinline{nofont}:后台会调用 \lstinline{ctex} 宏包并且使用 \lstinline{fontset=none} 选项,不设定中文字体,用户可以自行设置中文字体,具体见后文。 \end{enumerate} -\begin{remark} - 使用 \lstinline{founder} 选项或者 \lstinline{nofont} 时,必须使用 \hologo{XeLaTeX} 进行编译。 -\end{remark} - \subsection{方正字体选项} 由于使用 \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 用户请右键选择为全部用户安装,否则会找不到字体。} @@ -699,7 +893,7 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非 \int_{\mathcal{R}^p\times\mathcal{R}^q} f(x,y) dxdy=\int_{\mathcal{R}^p}\left(\int_{\mathcal{R}^q}f(x,y)dy\right)dx. \end{equation} -(2)若 $f(x,y)$ 是 $\mathcal{R}^p\times\mathcal{R}^q$ 上的可积函数,则对几乎处处的 $x\in\mathcal{R}^p$,$f(x,y)$ 作为 $y$ 的函数是 $\mathcal{R}^q$ 上的可积函数,并且 $g(x)=\int_{\mathcal{R}^q}f(x,y) dy$ 是 $\mathcal{R}^p$ 上的可积函数。而且~\ref{eq:461} 成立。 +(2)若 $f(x,y)$ 是 $\mathcal{R}^p\times\mathcal{R}^q$ 上的可积函数,则对几乎处处的 $x\in\mathcal{R}^p$,$f(x,y)$ 作为 $y$ 的函数是 $\mathcal{R}^q$ 上的可积函数,并且 $g(x)=\int_{\mathcal{R}^q}f(x,y) dy$ 是 $\mathcal{R}^p$ 上的可积函数。而且~\eqref{eq:461} 成立。 \end{theorem} \ref{thm:fubi} @@ -751,8 +945,6 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非 见前文介绍,可以使用 \lstinline{scheme=chinese} 设置。 \item \question{大佬,我想把正文字体改为亮色,背景色改为黑灰色。} 页面颜色可以使用 \lstinline{\pagecolor} 命令设置,文本命令可以参考\href{https://tex.stackexchange.com/questions/278544/xcolor-what-is-the-equivalent-of-default-text-color}{这里}进行设置。 - \item \question{\lstinline[breaklines]{Package ctex Error: CTeX fontset 'Mac' is unavailable.}} - 在 Mac 系统下,中文编译请使用 \hologo{XeLaTeX}。 \item \question{\lstinline{! LaTeX Error: Unknown option 'scheme=plain' for package 'ctex'.}} 你用的 C\TeX{} 套装吧?这个里面的 \lstinline{ctex} 宏包已经是已经是 10 年前的了,与本模板使用的 \lstinline{ctex} 宏集有很大区别。不建议 C\TeX{} 套装了,请卸载并安装 \TeX{} Live 2022。 \item \question{我该使用什么版本?} @@ -764,7 +956,7 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非 \item \question{请问交叉引用是什么?} 本群和本模板适合有一定 \LaTeX{} 基础的用户使用,新手请先学习 \LaTeX{} 的基础,理解各种概念,否则你将寸步难行。 \item \question{代码高亮环境能用其他语言吗?} - 可以的,ElegantBook 模板用的是 \lstinline{listings} 宏包,你可以在环境(\lstinline{lstlisting})之后加上语言(比如 Python 使用 \lstinline{language=Python} 选项),全局语言修改请使用 \lstinline{lsset} 命令,更多信息请参考宏包文档。 + 可以的,ElegantBook 模板用的是 \lstinline{listings} 宏包,你可以在环境(\lstinline{lstlisting})之后加上语言(比如 Python 使用 \lstinline{language=Python} 选项),全局语言修改请使用 \lstinline{lstset} 命令,更多信息请参考宏包文档。 \item \question{群主,什么时候出 Beamer 的模板(主题),ElegantSlide 或者 ElegantBeamer?} 由于 Beamer 中有一个很优秀的主题 \href{https://github.com/matze/mtheme}{Metropolis}。后续确定不会再出任何主题/模板,请大家根据需要修改已有主题。 \end{enumerate} @@ -773,11 +965,22 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非 根据用户的反馈,我们不断修正和完善模板。由于 3.00 之前版本与现在版本差异非常大,在此不列出 3.00 之前的更新内容。 +\datechange{2022/08/15}{版本 4.4 正式发布。} + +\begin{change} + \item \textbf{重要改动}:提供了一个定义定理类环境的命令 \lstinline|\elegantnewtheorem|; + \item \textbf{重要改动}:为所有内置定理类环境提供了带星号的版本,带星号的定理类环境不会编号,修复 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/167}{issue: \#167}; + \item \textbf{重要改动}:在 \lstinline{scheme=chinese} 下将目录中的“第 1 章”修改为“第一章”; + \item 将 TeX Gyre Termes 改为 TeX Gyre TermesX,使英文部分字形与 newtx 系列宏包更相近; + \item 重写了内置定理类环境的实现方法,修复了一些 bug,由于修改部分较大,如果引入了新的 bug,请及时在 QQ 群或 \href{https://github.com/ElegantLaTeX}{Github} 上进行反馈; + \item 删除 Gitee 仓库地址,恢复 GitHub 提交(pull requests); + \item 将参考文献命令添加到导言区,使编辑器能够对参考文献自动补全。 +\end{change} \datechange{2022/04/09}{版本 4.3 正式发布。} \begin{change} - \item 放弃 newtx 系列宏包的设置,改用 TeX Gyre Terms,并设置其他字体; + \item 放弃 newtx 系列宏包的设置,改用 TeX Gyre Termes,并设置其他字体; \item 修改定理类环境内部字体设置,修复环境内部中文无法加粗问题; \item 增加定理类环境的计数器选项 \lstinline{thmcnt},可选 \lstinline{chapter} 和 \lstinline{section}; \item 增加 \lstinline{bibend} 选项,可选 \lstinline{bibend=biber}(默认)和 \lstinline{bibend=bibtex}。 @@ -926,13 +1129,14 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非 \item 修改英文字体为 \lstinline{newtx} 系列,另外大型操作符号维持 cm 字体。 \item 中文字体改用 \lstinline{ctex} 宏包自动设置。 \item 删除 \lstinline{xeCJK} 字体设置,原因是不同系统字体不方便统一。 - \item 定理换用 \lstinline{tcolobox} 宏包定义,并基本维持原有的定理样式,优化显示效果,支持跨页;定理类名字重命名,如 etheorem 改为 theorem 等等。 + \item 定理换用 \lstinline{tcolorbox} 宏包定义,并基本维持原有的定理样式,优化显示效果,支持跨页;定理类名字重命名,如 etheorem 改为 theorem 等等。 \item 删去自定义的缩进命令 \lstinline{\Eindent}。 \item 添加参考文献宏包 \lstinline{natbib}。 \item 颜色名字重命名。 \end{change} \nocite{*} + \printbibliography[heading=bibintoc, title=\ebibname] \appendix |