mirror of
https://github.com/ElegantLaTeX/ElegantBook.git
synced 2026-01-26 12:24:36 +08:00
version 3.09
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
\documentclass[cn,11pt]{elegantbook}
|
||||
\documentclass[cn,11pt,twocol]{elegantbook}
|
||||
|
||||
\title{ElegantBook:优美的 \LaTeX{} 书籍模板}
|
||||
\subtitle{Elegant\LaTeX{} 经典之作}
|
||||
@@ -28,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/}
|
||||
@@ -48,10 +49,13 @@ Elegant\LaTeX{} 项目组致力于打造一系列美观、优雅、简便的模
|
||||
\begin{enumerate}
|
||||
\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,13 +87,16 @@ 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 语法),如果有公众号文稿写作经历的话,也可以帮忙写微信稿。本公告长期有效。
|
||||
|
||||
目前 ElegantLaTeX 共有 3 名协作人员,分别是
|
||||
目前 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}{追寻原风景};
|
||||
@@ -99,11 +106,9 @@ Elegant\LaTeX{} 系列模板从创立至今已经有 8 年了,我们的模板
|
||||
在此感谢他们无私的奉献!
|
||||
|
||||
\section{致谢}
|
||||
2019 年 5 月 20 日,ElegantBook 模板在 Github 上的 star 数达到了 100,并且 21 日上了 Github 网站 \TeX{} 语言的\href{https://github.com/trending/tex?since=daily}{日趋势榜单}。这对于 Elegant\LaTeX{} 系列模板都是一个里程碑!
|
||||
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} 对于模板的完善。
|
||||
在此特别感谢 China\TeX{} 以及 \href{http://www.latexstudio.net/}{\LaTeX{} 工作室}对于本系列模板的大力宣传与推广。\LaTeX{} 工作室网站上有很多精彩的帖子和精致的模板,欢迎大家去挖掘里面的宝藏。这也是国内最全面的 \LaTeX{} 相关的网站。也非常感谢 \href{https://github.com/muzimuzhi}{muzimuzhi} 对于模板的完善。
|
||||
|
||||
如果你喜欢我们的模板,你可以在 Github 上收藏我们的模板。
|
||||
\begin{figure}[htbp]
|
||||
@@ -112,7 +117,14 @@ 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
|
||||
@@ -139,10 +151,9 @@ Elegant\LaTeX{} 系列模板从创立至今已经有 8 年了,我们的模板
|
||||
\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{语言模式}
|
||||
@@ -163,10 +174,6 @@ Elegant\LaTeX{} 系列模板从创立至今已经有 8 年了,我们的模板
|
||||
\documentclass[device=pad]{elegantbook}
|
||||
\end{lstlisting}
|
||||
|
||||
\begin{equation}
|
||||
\int_{R^q} f(x,y) dy.\emph{of\kern0pt f}
|
||||
\end{equation}
|
||||
|
||||
\section{颜色主题}
|
||||
本模板内置 5 组颜色主题,分别为 \textcolor{structure1}{\lstinline{green}}\footnote{为原先默认主题。}、\textcolor{structure2}{\lstinline{cyan}}、\textcolor{structure3}{\lstinline{blue}}(默认)、\textcolor{structure4}{\lstinline{gray}}、\textcolor{structure5}{\lstinline{black}}。另外还有一个自定义的选项 \lstinline{nocolor}。调用颜色主题 \lstinline{green} 的方法为
|
||||
\begin{lstlisting}
|
||||
@@ -309,7 +316,7 @@ This is the content of example environment.
|
||||
|
||||
\section{装饰物}
|
||||
|
||||
本模板为章节后的装饰物(base)添加了隐藏选项,有 \lstinline{show} 和 \lstinline{hide} 两个选项。
|
||||
本模板为章节后和页面下方的装饰物(base)添加了隐藏选项,有 \lstinline{show} 和 \lstinline{hide} 两个选项。
|
||||
\begin{lstlisting}
|
||||
\documentclass[hide]{elegantbook} %or
|
||||
\documentclass[base=hide]{elegantbook}
|
||||
@@ -317,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,也即正方形图片,在更换图片的时候请选择合适的图片进行替换。
|
||||
|
||||
@@ -362,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}
|
||||
|
||||
@@ -425,21 +434,70 @@ 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 版本中将其删除,并且,在旁注命令得到大幅度优化之前,不会将此命令再次引入书籍模板中。对此造成各位用户的不方便,非常抱歉!
|
||||
在 3.08 版本中,我们引入了 旁注设置选项 \lstinline{marginpar=margintrue} 以及测试命令 \lstinline{\elegantpar} ,但是由此带来一堆问题。我们决定在 3.09 版本中将其删除,并且,在旁注命令得到大幅度优化之前,不会将此命令再次引入书籍模板中。对此造成各位用户的不方便,非常抱歉!不过我们保留了 \lstinline{marginpar} 这个选项,你可以使用 \lstinline{marginpar=margintrue} 获得保留右侧旁注的版面设计。然后使用系统自带的 \lstinline{\marginpar} 或者 \lstinline{marginnote} 宏包的 \lstinline{\marginnote} 命令。
|
||||
|
||||
\section{其他}
|
||||
\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}
|
||||
|
||||
根据 \href{https://github.com/muzimuzhi}{muzimuzhi} 的解释是,模板重新定义了数学字体,达到了 {\heiti 最多 16 个数学字体} 的上限,在调用其他宏包的时候,无法新增数学字体。为了减少调用非常用宏包,在此给出如何调用 \lstinline{yhmath} 以及 \lstinline{esvect} 宏包的方法。
|
||||
原因是模板重新定义了数学字体,达到了 {\heiti 最多 16 个数学字体} 的上限,在调用其他宏包的时候,无法新增数学字体。为了减少调用非常用宏包,在此给出如何调用 \lstinline{yhmath} 以及 \lstinline{esvect} 宏包的方法。
|
||||
|
||||
请在 \lstinline{elegantbook.cls} 内搜索 \lstinline{yhmath} 或者 \lstinline{esvect},将你所需要的宏包加载语句取消注释即可。
|
||||
\begin{lstlisting}
|
||||
@@ -454,6 +512,7 @@ LaTeX Error:
|
||||
\end{lstlisting}
|
||||
|
||||
|
||||
|
||||
\chapter{ElegantBook 写作示例}
|
||||
|
||||
\begin{introduction}
|
||||
@@ -475,8 +534,6 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
|
||||
|
||||
我们将通过三个步骤定义可测函数的积分。首先定义非负简单函数的积分。以下设 $E$ 是 $\mathcal{R}^n$ 中的可测集。
|
||||
|
||||
\begin{itemize}
|
||||
\item 名词解释
|
||||
\begin{definition}{可积性}{int}
|
||||
设 $ 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}
|
||||
@@ -485,9 +542,6 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
|
||||
\end{equation}
|
||||
一般情况下 $0 \leq \int_{E} f dx \leq \infty$。若 $\int_{E} f dx < \infty$,则称 $f$ 在 $E$ 上可积。
|
||||
\end{definition}
|
||||
\item 测试 2
|
||||
\end{itemize}
|
||||
|
||||
|
||||
|
||||
一个自然的问题是,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 积分为
|
||||
@@ -589,7 +643,7 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
|
||||
\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}{问题}
|
||||
@@ -600,6 +654,14 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
|
||||
页面颜色可以使用 \lstinline{\pagecolor} 命令设置,文本命令可以参考\href{https://tex.stackexchange.com/questions/278544/xcolor-what-is-the-equivalent-of-default-text-color}{这里}进行设置。
|
||||
\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}
|
||||
@@ -673,7 +735,7 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
|
||||
\end{custom}
|
||||
|
||||
\begin{solution}
|
||||
可以的,ElegantBook 模板用的是 \lstinline{listings} 宏包,你可以在环境之后加上语言,全局语言修改请使用 \lstinline{\lstset} 命令,更多信息请参考宏包文档。
|
||||
可以的,ElegantBook 模板用的是 \lstinline{listings} 宏包,你可以在环境(\lstinline{lstlisting})之后加上语言(比如 Python 使用 \lstinline{language=Python} 选项),全局语言修改请使用 \lstinline{\lstset} 命令,更多信息请参考宏包文档。
|
||||
\end{solution}
|
||||
|
||||
|
||||
@@ -685,14 +747,6 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
|
||||
这个问题问的人比较多,我这里给个明确的答案。由于 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{*}
|
||||
|
||||
@@ -711,11 +765,6 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
|
||||
\sum_{i=1}^n x_i \equiv x_1 + x_2 +\cdots + x_n
|
||||
\end{equation}
|
||||
|
||||
\begin{lstlisting}[language=Python]
|
||||
if x==0:
|
||||
print(x)
|
||||
\end{lstlisting}
|
||||
|
||||
\chapter{最小示例}
|
||||
|
||||
\begin{lstlisting}
|
||||
|
||||
@@ -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}
|
||||
@@ -43,11 +43,14 @@ Contact Infos:
|
||||
What\rq s new in this version:
|
||||
\begin{enumerate}
|
||||
\item Remove \lstinline|\elegantpar|;
|
||||
\item Fix symbol font settings (by \href{muzimuzhi}{https://github.com/muzimuzhi});
|
||||
\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}
|
||||
@@ -67,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.
|
||||
@@ -75,40 +78,49 @@ 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}, \href{Xiaohao890809}{https://github.com/xiaohao890809};
|
||||
\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{} !!!
|
||||
The number of stars on Github for ElegantBook reached 100 on May 20, 2019\footnote{189 stars by August 18, 2019!}.
|
||||
|
||||
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 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}
|
||||
@@ -128,8 +140,7 @@ The explanation right of the tip usage belongs to Elegant\LaTeX{} with no superv
|
||||
|
||||
\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
|
||||
@@ -289,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}
|
||||
@@ -298,7 +309,7 @@ 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.
|
||||
|
||||
@@ -343,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}
|
||||
|
||||
@@ -379,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]
|
||||
...
|
||||
@@ -402,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}
|
||||
|
||||
@@ -513,6 +598,13 @@ Let's continue using our application training example. In this case, we'd want t
|
||||
\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?
|
||||
@@ -564,7 +656,7 @@ Let's continue using our application training example. In this case, we'd want t
|
||||
\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}
|
||||
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
|
||||
\RequirePackage{enumerate}
|
||||
% list/itemize/enumerate setting
|
||||
\RequirePackage[shortlabels]{enumitem}
|
||||
\RequirePackage[shortlabels,inline]{enumitem}
|
||||
\setlist{nolistsep}
|
||||
|
||||
% caption settings
|
||||
@@ -226,6 +226,8 @@
|
||||
\setlength{\abovedisplayskip}{3pt}
|
||||
\setlength{\belowdisplayskip}{3pt}
|
||||
\setcounter{tocdepth}{1}
|
||||
\RequirePackage[flushmargin]{footmisc}
|
||||
\setlength{\footnotesep}{12pt}
|
||||
}
|
||||
|
||||
\ifdefstring{\ELEGANT@toc}{twocol}{
|
||||
@@ -252,25 +254,28 @@
|
||||
|
||||
%%中文结构名字
|
||||
\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}
|
||||
\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}}
|
||||
@@ -313,6 +318,12 @@
|
||||
headsep=4mm,
|
||||
footskip=12mm
|
||||
}
|
||||
\ifdefstring{\ELEGANT@marginpar}{margintrue}{
|
||||
\geometry{
|
||||
marginparwidth=5cm, marginparsep=5mm,
|
||||
left=2cm,right=7cm,
|
||||
}
|
||||
}{\relax}
|
||||
}{\relax}
|
||||
|
||||
\ifdefstring{\ELEGANT@device}{pad}{
|
||||
@@ -609,7 +620,7 @@
|
||||
\RequirePackage{adforn}
|
||||
\newenvironment{problemset}[1][\ifdefstring{\ELEGANT@lang}{en}{\textbf{\chaptername\, Exercise}}{\textbf{\chaptername\, 习题}}]{
|
||||
\begin{center}
|
||||
% \ifdefstring{\ELEGANT@lang}{en}{\addcontentsline{toc}{section}{\chaptername\, Exercise} }{\addcontentsline{toc}{section}{\chaptername\, 习题}}
|
||||
\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*.}]}{%
|
||||
@@ -632,16 +643,32 @@
|
||||
\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]{\catcode`\$=3\relax\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}
|
||||
@@ -744,9 +771,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},
|
||||
|
||||
BIN
image/star-history.png
Normal file
BIN
image/star-history.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
Reference in New Issue
Block a user