texlive[56319] Master/texmf-dist: qyxf-book (10sep20)

commits+karl at tug.org commits+karl at tug.org
Fri Sep 11 22:51:09 CEST 2020


Revision: 56319
          http://tug.org/svn/texlive?view=revision&revision=56319
Author:   karl
Date:     2020-09-11 22:51:09 +0200 (Fri, 11 Sep 2020)
Log Message:
-----------
qyxf-book (10sep20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/qyxf-book/LICENSE
    trunk/Master/texmf-dist/doc/latex/qyxf-book/README.md
    trunk/Master/texmf-dist/doc/latex/qyxf-book/README.zh.md
    trunk/Master/texmf-dist/tex/latex/qyxf-book/qyxf-book.cls

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/qyxf-book/figure/qyxf-cover.pdf
    trunk/Master/texmf-dist/doc/latex/qyxf-book/qyxf-book-doc.pdf
    trunk/Master/texmf-dist/doc/latex/qyxf-book/qyxf-book-doc.tex

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/qyxf-book/colors/
    trunk/Master/texmf-dist/doc/latex/qyxf-book/demo.pdf
    trunk/Master/texmf-dist/doc/latex/qyxf-book/demo.tex
    trunk/Master/texmf-dist/doc/latex/qyxf-book/figure/cover.pdf

Modified: trunk/Master/texmf-dist/doc/latex/qyxf-book/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/qyxf-book/LICENSE	2020-09-11 19:11:15 UTC (rev 56318)
+++ trunk/Master/texmf-dist/doc/latex/qyxf-book/LICENSE	2020-09-11 20:51:09 UTC (rev 56319)
@@ -1,6 +1,6 @@
 MIT License
 
-Copyright (c) 2020 钱院学辅
+Copyright (c) 2020 Qian Yuan Xue Fu
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

Modified: trunk/Master/texmf-dist/doc/latex/qyxf-book/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/qyxf-book/README.md	2020-09-11 19:11:15 UTC (rev 56318)
+++ trunk/Master/texmf-dist/doc/latex/qyxf-book/README.md	2020-09-11 20:51:09 UTC (rev 56319)
@@ -1,5 +1,8 @@
 # qyxf-book: Book Template for Qian Yuan Xue Fu
 
+![version](https://img.shields.io/ctan/v/qyxf-book?style=flat-square)
+![license](https://img.shields.io/ctan/l/qyxf-book?style=flat-square)
+
 > Warning: The template (including demo and docs) is currently designed only for Chinese typesetting. If you would like to use the template in other languages, please contact with us and offer help on that. Thanks.
 
 `qyxf-book` is a LaTeX document class (template) developed by *Qian Yuan Xue Fu* (QYXF), a student club of *Xi'an Jiaotong University* (XJTU). Up to now, the template is applied in several academic counseling materials ("course helpers") written by members of QYXF, including:

Modified: trunk/Master/texmf-dist/doc/latex/qyxf-book/README.zh.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/qyxf-book/README.zh.md	2020-09-11 19:11:15 UTC (rev 56318)
+++ trunk/Master/texmf-dist/doc/latex/qyxf-book/README.zh.md	2020-09-11 20:51:09 UTC (rev 56319)
@@ -1,11 +1,12 @@
 # 钱院学辅 LaTeX 书籍模板
 
+![version](https://img.shields.io/ctan/v/qyxf-book?style=flat-square)
+![license](https://img.shields.io/ctan/l/qyxf-book?style=flat-square)
+
 `qyxf-book` 是由钱院学辅开发的、用于排版中等以上体量资料的 LaTeX 文类。目前,该模板已被用于编写了[《大学物理题解》](https://github.com/qyxf/university-physics)、《理论力学题解》、[《计算方法撷英》](https://qyxf.site/2019/11/26/notes-on-computing-methods-published)等诸多资料。
 
 本份模板原在 [qyxf-sets 宏集](https://github.com/qyxf/qyxf-sets)项目中开发;因维护成本过高、效果不理想,现独立维护,并不再使用之前的 doc/doctrip 方式。现采用 MIT 协议许可,请大家放心地 fork、修改。
 
-![thumbnail](figure/thumbnail.png)
-
 ## 特点
 
 - 样式简洁、干净,适于排版学习资料;
@@ -16,4 +17,16 @@
 
 ## 使用说明
 
-目录下附带一份样例代码 `demo.tex`,编译即可得模板说明书及内容示例,请根据代码和编译得到的说明书学习使用本模板。
\ No newline at end of file
+目录下附带一份样例代码 `demo.tex`(在 CTAN 发行的版本中为 `qyxf-book-doc.tex`),编译即可得模板说明书及内容示例,请根据代码和编译得到的说明书学习使用本模板。
+
+![thumbnail](figure/thumbnail.png)
+
+## 发布平台
+
+模板分别在:
+
+- Gitee:<https://gitee.com/qyxf/qyxf-book>
+- GitHub:<https://github.com/qyxf/qyxf-book>
+- CTAN:<https://www.ctan.org/pkg/qyxf-book>
+
+发布,Gitee 为主要开发平台,后两者更新稍慢(CTAN 上的代码目录结构、文件名称与另两者略有区别)。
\ No newline at end of file

Deleted: trunk/Master/texmf-dist/doc/latex/qyxf-book/demo.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/qyxf-book/demo.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/qyxf-book/demo.tex	2020-09-11 19:11:15 UTC (rev 56318)
+++ trunk/Master/texmf-dist/doc/latex/qyxf-book/demo.tex	2020-09-11 20:51:09 UTC (rev 56319)
@@ -1,500 +0,0 @@
-% !TEX program = xelatex
-\documentclass[
-  10pt,
-  twoside,
-  openany,
-  b5paper, % 以上均为 ctexbook 提供的文类选项
-  colorscheme = basic % 请根据需要选择或定制配色方案
-]{qyxf-book}
-
-\title{钱院学辅 \LaTeX 书籍模板}
-\subtitle{\LaTeX{} book class of Qian Yuan Xue Fu}  % 可选
-\author{钱小辅}
-\date{2019 年 2 月 29 日}
-%\typo{AlphaGo}  % 排版人员信息,选填
-
-% 定制元信息
-\org{\Large\textit{西安交通大学}\\\textsc{Xi'an Jiaotong University}}
-\footorg{\textsc{Qian Yuan Xue Fu}}
-\cover{\includegraphics[width=.6\textwidth]{qyxf-logo.pdf}}
-\license{}  % 清空许可证信息
-
-% 调整封面标题大小
-\renewcommand{\titlefont}{\Huge\bfseries}
-\renewcommand{\subtitlefont}{\LARGE\itshape}
-
-\begin{document}
-
-\maketitle
-
-\tableofcontents
-
-\chapter{模板功能介绍}
-
-\section{模板概况}
-
-本模板名为 \verb|qyxf-book|,意即「\emph{钱院学辅之书}」,是西安交通大学钱学森书院学业辅导中心(简称「\emph{钱院学辅}」)自编资料时所采用的 \LaTeX 书籍模板。
-
-利用 \verb|qyxf-book| 模板,我们已经生成了如下一些作品,它们都发布于钱院学辅信息站
-\footnote{网址:\url{https://qyxf.site},其中最新资料发布于 \url{https://qyxf.site/latest/} 页面上。}
-上,点击以下各条链接即可在浏览器中预览、下载。因各份作品采用了不同版本的 \verb|qyxf-book| 复本,且有一些个性化的定制,故观感将略有差异。
-
-\begin{tcolorbox}
-  \begin{description}
-    \item [GRE备考指南] \url{https://qyxf.site/latest/GRE备考指南-v2.0.pdf}
-    \item [军事理论教程] \url{https://qyxf.site/latest/军事理论教程.pdf}
-    \item [分析力学笔记] \url{https://qyxf.site/latest/分析力学笔记-v1.0.pdf}
-    \item [大学物理题解] \url{https://qyxf.site/latest/大物题解(上).pdf}
-    \item [实变函数习题解答] \url{https://qyxf.site/latest/实变函数习题解答.pdf}
-    \item [计算方法撷英] \url{https://qyxf.site/latest/计算方法撷英-v1.1.pdf}
-    \item [计算机程序设计指南] \url{https://qyxf.site/latest/计算机设计程序指南.pdf}
-  \end{description}
-\end{tcolorbox}
-
-根据钱院学辅所编资料的题材与传播形式,本套模板的设计宗旨确定为:
-\begin{enumerate}
-  \item 实现钱院学辅自编资料所需功能,同时留出供其他用户定制的接口;
-  \item 保持页面样式的干净、整洁,不引入与作品内容的呈现无关的元素;
-  \item 保证文档的打印效果,以及在手机、平板等小屏设备上的阅读效果。
-\end{enumerate}
-
-\section{版本演进}
-
-至目前为止,\verb|qyxf-book| 已经发展了三代版本。当前模板的版本为 \textbf{v\styversion}。
-
-\subsection{V1 版本}
-最早的版本。在该版本中确定了模板当前的格局(封面、信息页等)。结构、样式上效仿于 \href{https://elegantlatex.org/}{Elegant\LaTeX} 系列模板,借用了其章节标题样式、配色选项,并定义了一套字体(中文采用 Adobe 系列字体,西文采用 Cambria + Calibri,数学字体采用 Cambria Math)。
-
-因技术水平,存在诸多兼容性问题,使用多有不便。仅有 \textbf{v1.0} 一个正式版本。
-
-\subsection{V2 版本}
-
-完全摆脱 Elegant\LaTeX{} 的框架,从头独立编写。与笔记模板 \verb|qyxf-note|、告示模板 \verb|qyxf-notice|(均已不再开发)共三个模板合并为 \verb|qyxf-sets| 宏集
-\footnote{代码仓库地址:\url{https://github.com/qyxf/qyxf-sets/}(已经存档,无法编辑)。}
-,采用 doc/docstrip 套件一同开发;后因这种方式的维护难度较大,\verb|qyxf-sets| 宏集停止开发,\verb|qyxf-book| 又分离出来独立开发。
-
-在 V1 的基础上趋于成熟,优化了字体、封面与章节标题样式,并初步定义了一些用户常用的环境(如数学定理)。利用 \verb|pgfornament| 重新设计了章节标题、页脚的样式,取消了配色(仅用灰度色系)。
-
-目前钱院学辅出品的大多数资料采用这一代模板编写。
-
-\begin{itemize}
-  \item \textbf{v2.0}:独立开发的首个版本,确定了整个模板的框架。
-  \item \textbf{v2.0a}:修正了说明文档的问题。
-  \item \textbf{v2.1}:定义了可选项 \verb|sourcefont| 以启用思源字体为中文字体,将默认字体交还 C\TeX 宏集处理。
-  \item \textbf{v2.2}(\verb|qyxf-sets|):实现了取消装饰的选项 \verb|nodecoration|;修正了字体设置卡顿的问题。
-  \item \textbf{v2.2}(\verb|qyxf-book|):分离出来之后采用同一版本号再发布一次,增加了 demo 文件。
-  \item \textbf{v2.3}:由 \href{https://github.com/SciZeal}{SciZeal} 补充了 demo 中的段落示例、\hologo{BibTeX} 示例等内容。
-\end{itemize}
-
-\subsection{V3 版本}
-
-当前版本。在 V2 版本之上进一步改进了之前的问题,并向通用、可定制的方向前进一大步。
-
-在字体方面,移除了中文字体备选项,完全采用 C\TeX 宏集的默认设置;西文及数学内容采用 \TeX 发行版附带的 XITS 字体,由此使模板本身完全摆脱对外部字体的依赖\footnote{字体的定制交由用户完成,本模板不参与其中。}。
-
-在样式方面,综合若干书籍及网页模板重设了各类元素的尺寸、间距,并完全移除了原由 \verb|pgfornament| 与 \verb|pgfornament-han| 宏包所实现的装饰\footnote{一方面,是因为 \TeX Live 2020 中这两个宏包未被容纳进来;另一方面,目前也发现装饰的存在不利于样式的修改、定制,且对阅读效果并无明显改善。}。
-
-此外,还新增了用户定制配色方案、元信息的功能,这将为钱院学辅之外的其他用户使用本模板提供方便。
-
-\subsection{我该用哪一个版本?}
-
-若需要编译由钱院学辅 2020 年 8 月前发布的资料之 \LaTeX 源码,请直接用源码中附带的 \verb|qyxf-book.cls| 文件编译,或下载 V2 系列最新版本 v2.3\footnote{链接:\url{https://gitee.com/qyxf/qyxf-book/releases/2.3}}。否则,请采用最新版本的模板套装\footnote{包括模板文件 \texttt{qyxf-book.cls} 及图片、配色方案等附件。}。
-
-
-\begin{alert}
-  请采用 \hologo{XeLaTeX} 编译使用本模板,其他场合下不保证本模板的功能正常;模板未来的开发之中也不会考虑对其他 \LaTeX 引擎的支持
-  \footnote{未来新开发出来的 \LaTeX 引擎可能会被考虑。}。
-\end{alert}
-
-\section{常用功能指南}
-
-\subsection{命令与环境}
-
-本模板提供了以下几个引导命令,主要用于题解、教辅的编写。这些命令都自带 \verb|\noindent| 控制序列,请放在段首使用。
-
-\begin{itemize}
-  \item \verb|\exercise{<id>}|:生成一个「练习」标记,接受一个参数 \verb|<id>| 作为编号
-        \footnote{模板中没有为这个命令设置自动编号,主要是因为编写题解的过程中常出现选题、
-        跳题的情况,且自动编号下不易从源代码中找到对应题目。}
-        (可留空),如 \verb|\exercise{1}| 将生成:\exercise{1}。
-  \item \verb|\solve|:生成一个「解」的标记:\solve。
-  \item \verb|\analysis|:生成一个「分析」的标记:\analysis。
-\end{itemize}
-
-除此之外,还提供了常见的用户环境,包括:
-\begin{itemize}
-  \item 定理类环境:定理 \verb|theorem|、引理 \verb|lemma|
-  \item 定义类环境:定义 \verb|definition|
-  \item 其他环境:注记 \verb|note|、警告 \verb|alert|
-\end{itemize}
-其中,定理、定义类环境属于数学环境,采用 \LaTeX 原生机制定义,仅在外围包裹一层装饰用的盒子;因此,可按照通常的写法编写数学环境,如:
-\begin{tcolorbox}
-  \begin{verbatim}
-\begin{theorem}[L'H\^opital 法则]
-\begin{equation}
-\lim_{x\to x_0} \frac{f(x)}{F(x)} =
-\lim_{x\to x_0} \frac{f'(x)}{F'(x)}.
-\end{equation}
-\end{theorem}
-\end{verbatim}
-\end{tcolorbox}
-将生成:
-\begin{theorem}[L'H\^opital 法则]
-\begin{equation}
-\lim_{x\to x_0} \frac{f(x)}{F(x)} =
-\lim_{x\to x_0} \frac{f'(x)}{F'(x)}.
-\end{equation}
-\end{theorem}
-
-\subsection{配色方案定制}
-
-本模板支持用户自定义的配色方案,写法请参考发布版本中 \verb|colors| 目录下的文件。目前随模板一同发布的配色方案包括:
-\begin{itemize}
-  \item \verb|basic|:基本的灰度配色方案,仿效于 \verb|qyxf-book| V2 版本的设计,默认值。
-  \item \verb|bootstrap-v4|:借鉴 BootStrap V4 中的配色方案。
-  \item \verb|black|:只有黑白两色,非常适合改造成其他的双色配色方案。
-  \item \verb|rbb|:红色 + 蓝色 + 黑色(Red Blue Black),在屏幕上比较醒目。
-\end{itemize}
-
-配色方案定制完成后,请在文档类中通过键值对的形式引用,如
-\begin{tcolorbox}
-\verb|colorsheme = rbb| 
-\end{tcolorbox}
-将启用 \verb|rbb| 配色方案。
-
-配色方案文件请\textbf{务必}放在待编译文件所在目录的 \verb|colors| 子目录下。
-
-若您需要编写自己的配色方案,请参考表 \ref{tab:color-scheme} 所示的各项接口;建议您采用 \verb|xcolor| 宏包所提供的混色语法(如 \verb|red!50!blue|)设置对应的值,其他写法目前尚不支持。
-
-\begin{table}[htbp]
-\centering\small
-\caption{配色方案接口表}\label{tab:color-scheme}
-\begin{tabular}{llcc}
-\toprule
-条目 & 接口宏 & \parbox{5em}{\centering \texttt{basic}\\方案默认值} & 备注 \\
-\midrule
-标题文字 & \verb|\@title at color| & \verb|black| & \\
-列表标记 & \verb|\@list at color| & \verb|black| & \\
-图表标题文字 & \verb|\@caption at color| & \verb|black| & \\
-链接文字 & \verb|\@link at color| & \verb|black| & \\
-杂项文字 & \verb|\@misc at color| & \verb|black| & \parbox{7em}{页码、引用标记、引导标记等} \\
-\midrule
-盒子背景 & \verb|\@box at background| & \verb|white| & \parbox{7em}{\texttt{tcolorbox} 环境默认定义,下同} \\
-盒子边框 & \verb|\@box at frame| & \verb|black!75| & \\
-盒子标题文字 & \verb|\@box at title@color| & \verb|white| & \\
-盒子标题背景 & \verb|\@box at title@background| & \verb|black!50| & \\
-盒子文字 & \verb|\@box at color| & \verb|black| & \\
-警告盒子背景 & \verb|\@alert at background| & \verb|white| & \parbox{7em}{对 \texttt{alert} 环境定义,下同} \\
-警告盒子文字 & \verb|\@alert at color| & \verb|black| & \\
-警告盒子边框 & \verb|\@alert at frame| & \verb|black| & \\
-警告盒子标题背景 & \verb|\@alert at title@background| & \verb|black| & \\
-警告盒子标题文字 & \verb|\@alert at title@color| & \verb|white| & \\
-\midrule
-定义环境背景 & \verb|\@define at background| & \verb|white| & \parbox{7em}{对 \texttt{define} 环境定义,下同} \\
-定义环境边框 & \verb|\@define at frame| & \verb|black!40| & \\
-定义环境文字 & \verb|\@define at color| & \verb|black| & \\
-定理环境背景 & \verb|\@theorem at background| & \verb|black!10| & \parbox{7em}{对各定理类环境定义,下同} \\
-定理环境边框 & \verb|\@theorem at frame| & \verb|black!80| & \\
-定理环境文字 & \verb|\@theorem at color| & \verb|black| & \\
-\bottomrule
-\end{tabular}
-\end{table}
-
-\subsection{元信息定制}
-
-本模板中要求填写几项元信息,如表 \ref{tab:metadata} 所示。请在使用时填写完整,以避免出现预料之外的情况。
-
-\begin{table}[htbp]
-  \centering\small
-  \caption{\texttt{qyxf-book} 中需求的元信息}
-  \label{tab:metadata}
-  \begin{tabular}{llcl}
-    \toprule
-    元信息       & 设置命令                & 可否置空  & 默认值                     \\
-    \midrule
-    标题         & \verb|\title| & \ding{55} & 无                         \\
-    副标题       & \verb|\subtitle| & \ding{51} & 无                         \\
-    作者         & \verb|\author| & \ding{55} & 无                         \\
-    创作日期     & \verb|\date| & \ding{55} & \verb|\today|    \\
-    排版者       & \verb|\typo| & \ding{51} & 无                         \\
-    \midrule
-    首页组织信息 & \verb|\org| & \ding{51} & \footnotesize\begin{tabular}[c]{@{}l@{}}
-      \verb|\textit{钱学森书院学业辅导中心}\\[1ex]| \\\verb|\textsc{Xi'an Jiaotong University}|\end{tabular} \\
-    \midrule
-    页脚组织信息 & \verb|\footorg| & \ding{51} & \verb|\textsc{Qian Yuan Xue Fu}|    \\
-    \midrule
-    许可证说明   & \verb|\license| & \ding{51} & \footnotesize\begin{tabular}[c]{@{}l@{}}
-      \verb|本作品采用\href{https://| \\
-      \verb|creativecommons.org/licenses/| \\
-      \verb|by-nc-nd/4.0/}{\bfseriesCC BY-| \\
-      \verb|NC-ND 4.0 协议}进行许可。使用| \\
-      \verb|者可以在给出作者署名及资料来源| \\
-      \verb|的前提下对本作品进行转载,但不| \\
-      \verb|得对本作品进行修改,亦不得基于| \\
-      \verb|本作品进行二次创作,不得将本作| \\
-      \verb|品运用于商业用途。|
-    \end{tabular} \\
-    \bottomrule
-  \end{tabular}
-\end{table}
-
-\subsection{封面定制}
-
-本模板提供了简易的封面定制接口,通过 \verb|\cover| 命令来填写封面上需要的内容。例如,需要将本模板中自带的 \verb|cover.pdf| 文件插入到封面中心,通过以下命令即可:
-
-\begin{tcolorbox}
-\begin{verbatim}
-\cover{\includegraphics[width=0.5\textwidth]{figure/cover.pdf}}
-\end{verbatim}
-\end{tcolorbox}
-若您希望使插入元素靠向上侧,则可这样实现:
-\begin{tcolorbox}
-\begin{verbatim}
-\cover{\includegraphics[width=0.5\textwidth]{figure/cover.pdf}%
-\vfill}
-\end{verbatim}
-\end{tcolorbox}
-后侧的 \verb|\vfill| 会将插入元素向上挤压。在另一方向上同理。除了插入图片之外,您也可以使用 \verb|\cover| 命令在首页上插入全局性命令,或使用 Ti$k$Z 环境按页面定位插入图片。
-
-此外,封面标题的字体大小、样式也可重新定义,字体接口及默认值如表 \ref{tab:preface-font} 所示。如有需要(如标题名称较长导致换行),请使用 \verb|\renewcommand| 命令修改。
-
-\begin{table}[htbp]
-  \centering
-  \caption{\texttt{qyxf-book} 提供的封面字体修改接口}
-  \label{tab:preface-font}
-  \begin{tabular}{ccc}
-    \toprule
-    接口                    & 对应元信息              & 默认值                  \\
-    \midrule
-    \verb|\titlefont| & \verb|\title| & \verb|\Huge\bfseries| \\
-    \verb|\subtitlefont| & \verb|\subtitle| & \verb|\huge\itshape| \\
-    \verb|\authorfont| & \verb|\author| & \verb|\LARGE\itshape| \\
-    \verb|\datefont| & \verb|\date| & \verb|\Large| \\
-    \bottomrule
-  \end{tabular}
-\end{table}
-
-\section{正文字体设置}
-
-\subsection{字体设置方案的考虑}
-
-不像其他功能完备的模板,\verb|qyxf-book| 没有提供除默认配置之外的其他「字体包」,仅给出了关闭默认字体配置的选项,其余工作完全交由用户决定
-\footnote{对于大多数用户而言,需要做的决定就是「什么也不用做,采用默认配置即可」。}
-、执行。对这一点,有两方面考虑:
-\begin{enumerate}
-  \item 钱院学辅的成员大多使用 Windows 系统,在其上为 \TeX 环境配置字体比较困难。大多数同学无法载入外部字体,使得之前版本中提供的字体配置选项相当「鸡肋」,几乎无人使用。
-  \item 对于少部分有能力自行配置字体的用户而言,预先定义的字体方案则往往不合其意,不如完全置空、由用户自行完成。
-\end{enumerate}
-因此,在当前版本的 \verb|qyxf-book| 模板中,完全移除了预定义的字体选项。如您认为有必要、也有能力自行配置字体,请阅读以下内容;否则,请遵循默认的字体配置。
-
-\subsection{西文字体设置}
-
-西文字体方面,目前采用 XITS 系列字体
-\footnote{无衬线体采用接近于 Helvetica 的 \TeX{} Gyre Heros。}
-。如您想变更西文字体,请完成以下两个步骤:
-
-\begin{enumerate}
-  \item 为 \verb|qyxf-book| 文类传入 \verb|xits = false| 的选项,此时西文字体将还原至 Computer Modern 字体;
-  \item 采用 \verb|fontspec| 宏包提供的 \verb|\setmainfont| 等命令设置字体。
-\end{enumerate}
-
-例如,下面的代码会将西文字体调整为 \TeX 发行版自带的 Libertinus 系列
-\footnote{其中并未设置数学字体,这种情况下模板将采用默认的数学字体。若需要调整数学字体,可采用 \texttt{unicode-math} 宏包配置。}
-:
-
-\begin{tcolorbox}
-\begin{verbatim}
-\documentclass[xits = false]{qyxf-book}
-% fontspec 宏包已载入,无需再声明
-\setmainfont{Libertinus Serif}
-\setsansfont{Libertinus Sans}
-\setmonofont{Libertinus Mono}
-\end{verbatim}
-\end{tcolorbox}
-
-\subsection{中文字体设置}
-
-中文字体方面,目前交由 C\TeX 宏集按系统自动选择默认字体。若您希望变更中文字体,同样需要两个步骤:
-\begin{enumerate}
-  \item 为 \verb|qyxf-book| 文类传入 \verb|noCJKfont| 选项,此时 C\TeX 宏集将把模板的中文字体设置清空;
-  \item 仅完成以上一步,文档是不能编译的,还需采用 C\TeX 宏集的接口来选择其他中文字体,或采用 \verb|xeCJK| 宏包提供的命令自行设置。
-\end{enumerate}
-
-C\TeX 宏集提供了几种预定义的字体设置,除系统字体之外还包括:
-\begin{itemize}
-  \item Fandol 字体 \verb|fandol|:包括宋、楷、黑、仿宋四套字体,在 \TeX 发行版中自带,无需安装;
-  \item 方正字体 \verb|founder|:包括方正书宋、方正黑体、方正楷体、方正仿宋等若干套字体,需自行安装,配置稍复杂;
-  \item Adobe 字体:包括宋、楷、黑、仿宋四套字体,需自行安装。
-\end{itemize}
-在正确配置相关字体的情况下,可直接采用 C\TeX 宏集提供的 \verb|\ctexset| 命令配置,如下面的命令将使得模板采用 Fandol 字体:
-\begin{tcolorbox}
-\begin{verbatim}
-\documentclass[noCJKfont]{qyxf-book}
-\ctexset{fontset = fandol}
-\end{verbatim}
-\end{tcolorbox}
-从方便使用的角度来说,Fandol 字体无需额外配置,显示效果也好于 Windows 系统的默认字体配置,但有缺字现象;对于需要印刷的作品,方正系列字体效果较好,字体完备
-\footnote{前提是:应安装对应于较完备的 GBK 字符集的字体文件。}
-,更适宜。
-
-除了直接调用 C\TeX 的配置外,也可采用由 \verb|xeCJK| 宏包
-\footnote{该宏包已经包含在模板中,其命令可以直接使用,无需在您的文档中载入。}
-提供的若干命令自行配置字体。例如,下列命令将使得模板采用思源系列中文字体
-\footnote{同样的,请确保相关字体已正确配置。}:
-\begin{tcolorbox}
-\begin{verbatim}
-\documentclass[noCJKfont]{qyxf-book}
-\setCJKmainfont[AutoFakeSlant]{Source Han Serif SC} % 伪斜体
-\setCJKsansfont[AutoFakeSlant]{Source Han Sans SC}
-\setCJKmonofont[AutoFakeSlant]{Source Han Sans SC}
-\end{verbatim}
-\end{tcolorbox}
-以上命令未配置与中文字体对应的字族(如 \verb|zhsong| 之类),在一般场合没有问题。若有需要,请参考 C\TeX 文档及 \verb|xeCJK| 宏包文档进行设置。
-
-\section{问题及改进}
-
-\subsection{已知问题}
-
-本模板目前还存在许多可改进之处,主要包括:
-\begin{enumerate}
-  \item 模板对 \verb|part| 级别的标题、目录样式未作任何定制;
-  \item 在参考文献方面,模板仅对 \LaTeX 自带的简易文献环境 \verb|thebibliorgraphy| 做了定制,未考虑 \hologo{BibTeX}
-        \footnote{在 v2.3 版本中曾在 demo 中引入了 \hologo{BibTeX} 的示例;后考虑到此方面并无需求,为了简化 demo 结构,在 V3 版本中又移除了。}
-        及 \verb|biblatex| 的样式支持;
-  \item 模板尚未引入对代码抄录宏包(如 \verb|listings|)的支持;
-  \item 配色方案还不完善,对部分元素的支持不佳。
-\end{enumerate}
-未做改动的原因很多,最大的原因是在钱院学辅排版的过程中对这些功能暂时没有需求
-\footnote{例如,在参考文献方面,许多资料甚至连 \texttt{thebibliorgraphy} 环境也不需要,用脚注就能解决问题。}。
-
-\subsection{帮帮我们!}
-
-如果您:
-\begin{itemize}
-  \item 对上述功能有需求,并有能力帮助我们完善;
-  \item 有其他好的建议、功能推荐;
-  \item 设计了新颖、实用的配色、字体方案;
-\end{itemize}
-请通过我们的代码仓库向我们提交建议与改动请求:\url{https://gitee.com/qyxf/qyxf-book},我们将酌情采纳、接收。
-
-同时,我们也欢迎您透过 fork 的形式修改出适合您自己的模板,分发给更多人使用。本模板按 MIT 许可证发行,据此您享有充分的自由。这也是对于我们模板的一种推广
-\footnote{模板滞销,帮帮我们!}
-与帮助!
-
-本模板目前由\textbf{黑山雁}维护,您也可以通过邮箱联系维护者:\url{yjr134 at 163.com}。
-
-\subsection{可解决的问题}
-
-在 \TeX\ Live 2019 中测试本模板时,发现 \textsc{Small Caps} 字族(\verb|\scfamily|)不能正常加载,回退到了普通字族;经过检查,发现默认采用的 XITS 字体在 \TeX\ Live 2019 中提供的版本(1.200)还未引入该字族,到 \TeX\ Live 2020 时对应的版本(1.300)方才完善了此部分。若您对于该字族有需求,请更新您的 \TeX 发行版。
-
-\chapter{内容示例}
-\section{用户环境示例}
-
-\begin{define}
-  极限就是超越自我。
-\end{define}
-
-\begin{theorem}
-  任何极限都可以直接观察得出。
-\end{theorem}
-
-\begin{lemma}
-  以上内容,纯属扯淡。
-\end{lemma}
-
-\begin{note}
-  好好学习,天天向上。
-\end{note}
-
-\begin{alert}
-  今天你学习了吗?
-\end{alert}
-
-\section{列表样式}
-\begin{itemize}
-  \item 这是第一层
-  \item 这也是第一层
-  \begin{itemize}
-    \item 这是第二层
-    \begin{itemize}
-      \item 这是第三层
-    \end{itemize}
-  \end{itemize}
-\end{itemize}
-
-\begin{enumerate}
-  \item 这是第一层
-  \item 这也是第一层
-  \begin{enumerate}
-    \item 这是第二层
-    \begin{enumerate}
-      \item 这是第三层
-    \end{enumerate}
-  \end{enumerate}
-\end{enumerate}
-
-\section{正文示例}
-
-\textbf{微分学}(\emph{differential calculus})是微积分的一部分,是通过\emph{导数}和\emph{微分}来研究曲线斜率、加速度、最大值和最小值的一门学科,也是探讨特定数量变化速率的学科。微分学是微积分的两个主要分支之一,另一个分支则是\textbf{积分学},探讨曲线下的面积。
-
-
-\begin{table}[htbp]
-  \centering
-  \caption{常用导数}
-  \begin{tabular}{cccc}
-    \toprule
-    \textbf{原函数} & \textbf{导函数}   & \textbf{原函数} & \textbf{导函数} \\
-    \midrule
-    $C$             & $0$               & $\ln x$         & $\frac{1}{x}$   \\
-    $x^\mu$         & $\mu x^{\mu - 1}$ & $\sin x$        & $\cos x$        \\
-    $e^x$           & $e^x$             & $\cos x$        & $-\sin x$       \\
-    \bottomrule
-  \end{tabular}
-\end{table}
-
-……几乎所有量化的学科中都有\textbf{微分}的应用。例如在物理学中,运动物体其\emph{位移}对时间的导数即为其\emph{速度},\emph{速度}对时间的导数就是\emph{加速度}、物体\emph{动量}对时间的导数即为物体所受的\emph{力},重新整理后可以得到牛顿第二运动定律 $F=ma$ 。化学反应的\emph{化学反应速率}也是导数。在运筹学中,会透过导数决定在运输或是设计上最有效率的做法。
-
-\begin{figure}[htbp]
-  \centering
-  \includegraphics[width=.3\textwidth]{cover.pdf}
-  \caption{V2 版本的封面图片}
-  \label{fig:qyxf-logo}
-\end{figure}
-
-导数常用来找函数的\emph{极值}。含有微分项的方程式称为\textbf{微分方程},是自然现象描述的基础。微分以及其广义概念出现在许多数学领域中,例如\emph{复分析}、\emph{泛函分析}、\emph{微分几何}、\emph{测度}及\emph{抽象代数}\footnote{以上内容摘自维基百科中文词条 --- 微分学:\url{https://zh.wikipedia.org/wiki/微分学}。}。
-
-\section{引导命令示例}
-
-\exercise{1} 试用配方法求解方程:
-\begin{equation}\label{eq:quadratic}
-  ax^2 + bx + c = 0
-\end{equation}
-
-\solve 首先,方程左右两侧同除以 $a$,得到
-\[ x^2 + \frac bax + \frac ca = 0 \]
-根据一次项来配方,按公式 $(x+A)^2=x^2+2Ax+A^2$ 配出常数项:
-\[ x^2 + \frac bax + \left(\frac b{2a}\right)^2 + \frac ca - \left(\frac b{2a}\right)^2 = 0 \]
-配方并移项得到
-\[ \left(x + \frac b{2a}\right)^2 = \frac {b^2}{4a^2} - \frac ca \]
-方程左右开方,得
-\[ x + \frac b{2a} = \pm \sqrt{\frac {b^2}{4a^2} - \frac ca} \]
-从而得到方程 \eqref{eq:quadratic} 之解为
-\begin{equation}
-  x = - \frac b{2a} \pm \sqrt{\frac {b^2}{4a^2} - \frac ca}
-\end{equation}
-该式即为一元二次方程的\textbf{通用求根公式}。
-
-
-\analysis 在这一问题中,需要注意以下几点 \cite{texbook,latex}:
-\begin{itemize}
-  \item ……
-  \item ……
-  \item ……
-\end{itemize}
-
-\begin{thebibliography}{99}
-  \bibitem{texbook} KNUTH~D~E. The \TeX book [M]. Addison-Wesley: Reading, 1986.
-  \bibitem{latex} 刘海洋. \LaTeX 入门 [M]. 人民邮电出版社: 北京, 2013.
-\end{thebibliography}
-
-\end{document}
\ No newline at end of file

Deleted: trunk/Master/texmf-dist/doc/latex/qyxf-book/figure/cover.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/latex/qyxf-book/figure/qyxf-cover.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/qyxf-book/figure/qyxf-cover.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/qyxf-book/figure/qyxf-cover.pdf	2020-09-11 19:11:15 UTC (rev 56318)
+++ trunk/Master/texmf-dist/doc/latex/qyxf-book/figure/qyxf-cover.pdf	2020-09-11 20:51:09 UTC (rev 56319)

Property changes on: trunk/Master/texmf-dist/doc/latex/qyxf-book/figure/qyxf-cover.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/qyxf-book/qyxf-book-doc.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/qyxf-book/qyxf-book-doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/qyxf-book/qyxf-book-doc.pdf	2020-09-11 19:11:15 UTC (rev 56318)
+++ trunk/Master/texmf-dist/doc/latex/qyxf-book/qyxf-book-doc.pdf	2020-09-11 20:51:09 UTC (rev 56319)

Property changes on: trunk/Master/texmf-dist/doc/latex/qyxf-book/qyxf-book-doc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/qyxf-book/qyxf-book-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/qyxf-book/qyxf-book-doc.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/qyxf-book/qyxf-book-doc.tex	2020-09-11 20:51:09 UTC (rev 56319)
@@ -0,0 +1,542 @@
+% !TEX program = xelatex
+\documentclass[
+  10pt,
+  twoside,
+  openany,
+  b5paper, % 以上均为 ctexbook 提供的文类选项
+  colorscheme = basic, % 请根据需要选择或定制配色方案
+]{qyxf-book}
+
+\title{钱院学辅 \LaTeX 书籍模板}
+\subtitle{\LaTeX{} book class of Qian Yuan Xue Fu}  % 可选
+\author{钱小辅}
+\date{2019 年 2 月 29 日}
+%\typo{AlphaGo}  % 排版人员信息,选填
+
+% 定制元信息
+\org{\Large\textit{西安交通大学}\\\textsc{Xi'an Jiaotong University}}
+\footorg{\textsc{Qian Yuan Xue Fu}}
+\cover{\includegraphics[width=.6\textwidth]{qyxf-logo.pdf}}
+\license{}  % 清空许可证信息
+
+% 调整封面标题大小
+\renewcommand{\titlefont}{\Huge\bfseries}
+\renewcommand{\subtitlefont}{\LARGE\itshape}
+
+\begin{document}
+
+\maketitle
+
+\tableofcontents
+
+\chapter{模板功能介绍}
+
+\section{模板概况}
+
+本模板名为 \verb|qyxf-book|,意即「\emph{钱院学辅之书}」,是西安交通大学钱学森书院学业辅导中心(简称「\emph{钱院学辅}」)自编资料时所采用的 \LaTeX 书籍模板。
+
+利用 \verb|qyxf-book| 模板,我们已经生成了如下一些作品,它们都发布于钱院学辅信息站
+\footnote{网址:\url{https://qyxf.site},其中最新资料发布于 \url{https://qyxf.site/latest/} 页面上。}
+上,点击以下各条链接即可在浏览器中预览、下载。因各份作品采用了不同版本的 \verb|qyxf-book| 复本,且有一些个性化的定制,故观感将略有差异。
+
+\begin{tcolorbox}
+  \begin{description}
+    \item [GRE备考指南] \url{https://qyxf.site/latest/GRE备考指南-v2.0.pdf}
+    \item [军事理论教程] \url{https://qyxf.site/latest/军事理论教程.pdf}
+    \item [分析力学笔记] \url{https://qyxf.site/latest/分析力学笔记-v1.0.pdf}
+    \item [大学物理题解] \url{https://qyxf.site/latest/大物题解(上).pdf}
+    \item [实变函数习题解答] \url{https://qyxf.site/latest/实变函数习题解答.pdf}
+    \item [计算方法撷英] \url{https://qyxf.site/latest/计算方法撷英-v1.1.pdf}
+    \item [计算机程序设计指南] \url{https://qyxf.site/latest/计算机设计程序指南.pdf}
+  \end{description}
+\end{tcolorbox}
+
+根据钱院学辅所编资料的题材与传播形式,本套模板的设计宗旨确定为:
+\begin{enumerate}
+  \item 实现钱院学辅自编资料所需功能,同时留出供其他用户定制的接口;
+  \item 保持页面样式的干净、整洁,不引入与作品内容的呈现无关的元素;
+  \item 保证文档的打印效果,以及在手机、平板等小屏设备上的阅读效果。
+\end{enumerate}
+
+\section{版本演进}
+
+至目前为止,\verb|qyxf-book| 已经发展了三代版本。当前模板的版本为 \textbf{v\styversion}。
+
+\subsection{V1 版本}
+最早的版本。在该版本中确定了模板当前的格局(封面、信息页等)。结构、样式上效仿于 \href{https://elegantlatex.org/}{Elegant\LaTeX} 系列模板,借用了其章节标题样式、配色选项,并定义了一套字体(中文采用 Adobe 系列字体,西文采用 Cambria + Calibri,数学字体采用 Cambria Math)。
+
+因技术水平,存在诸多兼容性问题,使用多有不便。仅有 \textbf{v1.0} 一个正式版本。
+
+\subsection{V2 版本}
+
+完全摆脱 Elegant\LaTeX{} 的框架,从头独立编写。与笔记模板 \verb|qyxf-note|、告示模板 \verb|qyxf-notice|(均已不再开发)共三个模板合并为 \verb|qyxf-sets| 宏集
+\footnote{代码仓库地址:\url{https://github.com/qyxf/qyxf-sets/}(已经存档,无法编辑)。}
+,采用 doc/docstrip 套件一同开发;后因这种方式的维护难度较大,\verb|qyxf-sets| 宏集停止开发,\verb|qyxf-book| 又分离出来独立开发。
+
+在 V1 的基础上趋于成熟,优化了字体、封面与章节标题样式,并初步定义了一些用户常用的环境(如数学定理)。利用 \verb|pgfornament| 重新设计了章节标题、页脚的样式,取消了配色(仅用灰度色系)。
+
+目前钱院学辅出品的大多数资料采用这一代模板编写。
+
+\begin{itemize}
+  \item \textbf{v2.0}:独立开发的首个版本,确定了整个模板的框架。
+  \item \textbf{v2.0a}:修正了说明文档的问题。
+  \item \textbf{v2.1}:定义了可选项 \verb|sourcefont| 以启用思源字体为中文字体,将默认字体交还 C\TeX 宏集处理。
+  \item \textbf{v2.2}(\verb|qyxf-sets|):实现了取消装饰的选项 \verb|nodecoration|;修正了字体设置卡顿的问题。
+  \item \textbf{v2.2}(\verb|qyxf-book|):分离出来之后采用同一版本号再发布一次,增加了 demo 文件。
+  \item \textbf{v2.3}:由 \href{https://github.com/SciZeal}{SciZeal} 补充了 demo 中的段落示例、\hologo{BibTeX} 示例等内容。
+\end{itemize}
+
+\subsection{V3 版本}
+
+当前版本。在 V2 版本之上进一步改进了之前的问题,并向通用、可定制的方向前进一大步。
+
+在字体方面,移除了中文字体备选项,完全采用 C\TeX 宏集的默认设置;西文及数学内容采用 \TeX 发行版附带的 XITS 字体,使模板进一步减少了对外部字体的依赖\footnote{字体的定制交由用户完成,本模板不参与其中。}。
+
+在样式方面,综合若干书籍及网页模板重设了各类元素的尺寸、间距,并完全移除了原由 \verb|pgfornament| 与 \verb|pgfornament-han| 宏包所实现的装饰\footnote{一方面,是因为 \TeX Live 2020 中这两个宏包未被容纳进来;另一方面,目前也发现装饰的存在不利于样式的修改、定制,且对阅读效果并无明显改善。}。
+
+此外,还新增了用户定制配色方案、元信息的功能,这将为钱院学辅之外的其他用户使用本模板提供方便。
+
+\subsection{我该用哪一个版本?}
+
+若需要编译由钱院学辅 2020 年 8 月前发布的资料之 \LaTeX 源码,请直接用源码中附带的 \verb|qyxf-book.cls| 文件编译,或下载 V2 系列最新版本 v2.3\footnote{链接:\url{https://gitee.com/qyxf/qyxf-book/releases/2.3}}。否则,请采用最新版本的模板文件。
+
+\begin{alert}
+  请采用 \hologo{XeLaTeX} 编译使用本模板,其他场合下不保证本模板的功能正常;模板未来的开发之中也不会考虑对其他 \LaTeX 引擎的支持
+  \footnote{未来新开发出来的 \LaTeX 引擎可能会被考虑。}。
+\end{alert}
+
+\section{常用功能指南}
+
+\subsection{命令与环境}
+
+本模板提供了以下几个引导命令,主要用于题解、教辅的编写。这些命令都自带 \verb|\noindent| 控制序列,请放在段首使用。
+
+\begin{itemize}
+  \item \verb|\exercise{<id>}|:生成一个「练习」标记,接受一个参数 \verb|<id>| 作为编号
+        \footnote{模板中没有为这个命令设置自动编号,主要是因为编写题解的过程中常出现选题、
+        跳题的情况,且自动编号下不易从源代码中找到对应题目。}
+        (可留空),如 \verb|\exercise{1}| 将生成:\exercise{1}。
+  \item \verb|\solve|:生成一个「解」的标记:\solve。(其可以接受一个可选参数来替换「解」字
+  \footnote{你可以通过这个特性定义自己需要的标记命令,下面的分析标记同理。})
+  ,如 \verb|\solve[答]| 将生成:\solve[答]。
+  \item \verb|\analysis|:生成一个「分析」的标记:\analysis。(其可以接受一个参数来替换「分析」二字,如 \verb|\analysis[注记]| 将生成:\analysis[注记]。)
+\end{itemize}
+
+除此之外,还提供了常见的用户环境,包括:
+\begin{itemize}
+  \item 定理类环境:定理 \verb|theorem|、引理 \verb|lemma|
+  \item 定义类环境:定义 \verb|definition|
+  \item 其他环境:注记 \verb|note|、警告 \verb|alert|
+\end{itemize}
+其中,定理、定义类环境属于数学类环境,采用 \LaTeX 原生机制定义,仅在外围包裹一层装饰用的盒子;因此,可按照通常的写法编写数学类环境,如:
+\begin{tcolorbox}
+  \begin{verbatim}
+\begin{theorem}[L'H\^opital 法则]
+\begin{equation}
+\lim_{x\to x_0} \frac{f(x)}{F(x)} =
+\lim_{x\to x_0} \frac{f'(x)}{F'(x)}.
+\end{equation}
+\end{theorem}
+\end{verbatim}
+\end{tcolorbox}
+将生成:
+\begin{theorem}[L'H\^opital 法则]
+\begin{equation}
+\lim_{x\to x_0} \frac{f(x)}{F(x)} =
+\lim_{x\to x_0} \frac{f'(x)}{F'(x)}.
+\end{equation}
+\end{theorem}
+
+\subsection{配色方案定制}
+
+\subsubsection{预定义配色方案}
+
+目前,模板中已预定义的配色方案包括:
+\begin{itemize}
+  \item \verb|basic|:默认的灰度配色方案,与 \verb|qyxf-book| V2 版本中的配色接近。
+  \item \verb|black|:只有黑白两色的配色方案。可以很容易的调整为\emph{自定义双色方案}。
+  \item \verb|rbb|:红色 + 蓝色 + 黑色(Red Blue Black)的配色方案。可以很容易的调整为\emph{自定义三色方案}。
+  \item \verb|bootstrap-v4|:借鉴 BootStrap V4 中的配色方案。
+\end{itemize}
+欲使用以上的方案,请在文档类中通过键值对的形式引用,如
+\begin{tcolorbox}
+\verb|colorsheme = rbb| 
+\end{tcolorbox}
+将启用 \verb|rbb| 配色方案。
+
+\subsubsection{双色\&三色方案快速生成}
+为方便用户快速修改预定义配色方案,模板为双色方案 \verb|black| 和三色方案 \verb|rbb| 设计了两个文类选项:
+\begin{itemize}
+  \item \verb|primary|:主色,相当于 \verb|black| 中的黑色及 \verb|rbb| 中的蓝色;
+  \item \verb|seconadry|:辅助色,只对 \verb|rbb| 方案生效,相当于 \verb|rbb| 中的红色。
+\end{itemize}
+若您想快速定义一个自己的双色或三色配色方案,可直接通过以上两个文类选项设置。例如,若您希望使用橙 + 黑的双色主题,可通过以下的文类选项实现:
+\begin{tcolorbox}
+\begin{verbatim}
+\documentclass[
+  colorscheme = black,  % 载入双色主题,此时主色为黑色
+  primary = orange  % 将主色改为橙色
+]{qyxf-book}
+\end{verbatim}
+\end{tcolorbox}
+而如果您希望使用橙 + 紫 + 黑的三色主题,则可通过以下的文类选项实现:
+\begin{tcolorbox}
+\begin{verbatim}
+  \documentclass[
+    colorscheme = rbb,  % 载入三色主题
+    primary = orange,  % 将主色改为橙色
+    secondary = violet  % 将辅助色改为紫色
+  ]{qyxf-book}
+\end{verbatim}
+\end{tcolorbox}
+
+\begin{alert}
+请采用 \verb|xcolor| 宏包所提供的混色语法(如 \verb|red!50!blue|)设置对应的值,其他写法目前尚不支持。下同。
+\end{alert}
+
+\subsubsection{自定义配色方案}
+
+若您需要编写自己的配色方案,请通过 \verb|\renewcommand| 命令修改表 \ref{tab:color-scheme} 所示的各项接口,在预定义主题的基础上修改相应颜色值。
+\begin{table}[htbp]
+\centering\small
+\caption{配色方案接口表}\label{tab:color-scheme}
+\begin{tabular}{llcc}
+\toprule
+条目 & 接口宏 & \parbox{5em}{\centering \texttt{basic}\\方案默认值} & 备注 \\
+\midrule
+标题文字 & \verb|\TitleColor| & \verb|black| & \\
+列表标记 & \verb|\ListColor| & \verb|black| & \\
+图表标题文字 & \verb|\CaptionColor| & \verb|black| & \\
+链接文字 & \verb|\LinkColor| & \verb|black| & \\
+杂项文字 & \verb|\MiscColor| & \verb|black| & \parbox{7em}{页码、引用标记、引导标记等} \\
+\midrule
+盒子背景 & \verb|\BoxBackground| & \verb|white| & \parbox{7em}{\texttt{tcolorbox} 环境默认定义,下同} \\
+盒子边框 & \verb|\BoxFrame| & \verb|black!75| & \\
+盒子标题文字 & \verb|\BoxTitleColor| & \verb|white| & \\
+盒子标题背景 & \verb|\BoxTitleBackground| & \verb|black!50| & \\
+盒子文字 & \verb|\BoxColor| & \verb|black| & \\
+警告盒子背景 & \verb|\AlertBackground| & \verb|white| & \parbox{7em}{对 \texttt{alert} 环境定义,下同} \\
+警告盒子文字 & \verb|\AlertColor| & \verb|black| & \\
+警告盒子边框 & \verb|\AlertFrame| & \verb|black| & \\
+警告盒子标题背景 & \verb|\AlertTitleBackground| & \verb|black| & \\
+警告盒子标题文字 & \verb|\AlertTitleColor| & \verb|white| & \\
+\midrule
+定义环境背景 & \verb|\DefineBackground| & \verb|white| & \parbox{7em}{对 \texttt{define} 环境定义,下同} \\
+定义环境边框 & \verb|\DefineFrame| & \verb|black!40| & \\
+定义环境文字 & \verb|\DefineColor| & \verb|black| & \\
+定理环境背景 & \verb|\TheoremBackground| & \verb|black!10| & \parbox{7em}{对各定理类环境定义,下同} \\
+定理环境边框 & \verb|\TheoremFrame| & \verb|black!80| & \\
+定理环境文字 & \verb|\TheoremColor| & \verb|black| & \\
+\bottomrule
+\end{tabular}
+\end{table}
+
+需要注意的是,在重定义链接及盒子环境的配色时,可能因设置命令提前展开接口而无法生效;在此情况下,请使用 \verb|\selectcolor| 命令强制更新这些颜色的值。例如,要变更链接颜色 \verb|\LinkColor| 及盒子文字颜色 \verb|\BoxColor| 为 \verb|red!50|,请通过以下命令实现:
+
+\begin{tcolorbox}
+\begin{verbatim}
+\renewcommand{\LinkColor}{red!50}
+\renewcommand{\BoxColor}{red!50}
+\selectcolor  % 更新颜色
+\end{verbatim}
+\end{tcolorbox}
+
+\subsection{元信息定制}
+
+本模板中要求填写几项元信息,如表 \ref{tab:metadata} 所示。请在使用时填写完整,以避免出现预料之外的情况。
+
+\begin{table}[htbp]
+  \centering\small
+  \caption{\texttt{qyxf-book} 中需求的元信息}
+  \label{tab:metadata}
+  \begin{tabular}{llcl}
+    \toprule
+    元信息       & 设置命令                & 可否置空  & 默认值                     \\
+    \midrule
+    标题         & \verb|\title| & \ding{55} & 无                         \\
+    副标题       & \verb|\subtitle| & \ding{51} & 无                         \\
+    作者         & \verb|\author| & \ding{55} & 无                         \\
+    创作日期     & \verb|\date| & \ding{55} & \verb|\today|    \\
+    排版者       & \verb|\typo| & \ding{51} & 无                         \\
+    \midrule
+    首页组织信息 & \verb|\org| & \ding{51} & \footnotesize\begin{tabular}[c]{@{}l@{}}
+      \verb|\textit{钱学森书院学业辅导中心}\\[1ex]| \\\verb|\textsc{Xi'an Jiaotong University}|\end{tabular} \\
+    \midrule
+    页脚组织信息 & \verb|\footorg| & \ding{51} & \verb|\textsc{Qian Yuan Xue Fu}|    \\
+    \midrule
+    许可证说明   & \verb|\license| & \ding{51} & \footnotesize\begin{tabular}[c]{@{}l@{}}
+      \verb|本作品采用\href{https://| \\
+      \verb|creativecommons.org/licenses/| \\
+      \verb|by-nc-nd/4.0/}{\bfseriesCC BY-| \\
+      \verb|NC-ND 4.0 协议}进行许可。使用| \\
+      \verb|者可以在给出作者署名及资料来源| \\
+      \verb|的前提下对本作品进行转载,但不| \\
+      \verb|得对本作品进行修改,亦不得基于| \\
+      \verb|本作品进行二次创作,不得将本作| \\
+      \verb|品运用于商业用途。|
+    \end{tabular} \\
+    \bottomrule
+  \end{tabular}
+\end{table}
+
+\subsection{封面定制}
+
+本模板提供了简易的封面定制接口,通过 \verb|\cover| 命令来填写封面上需要的内容。例如,需要将本模板中自带的 \verb|qyxf-logo.pdf| 文件插入到封面中心,通过以下命令即可:
+
+\begin{tcolorbox}
+\begin{verbatim}
+\cover{\includegraphics[width=0.5\textwidth]%
+{figure/qyxf-logo.pdf}}
+\end{verbatim}
+\end{tcolorbox}
+若您希望使插入元素靠向上侧,则可这样实现:
+\begin{tcolorbox}
+\begin{verbatim}
+\cover{\includegraphics[width=0.5\textwidth]%
+{figure/qyxf-logo.pdf}\vfill}
+\end{verbatim}
+\end{tcolorbox}
+后侧的 \verb|\vfill| 会将插入元素向上挤压。在另一方向上同理。除了插入图片之外,您也可以使用 \verb|\cover| 命令在首页上插入全局性命令,或使用 Ti$k$Z 环境按页面定位插入图片。
+
+此外,封面标题的字体大小、样式也可重新定义,字体接口及默认值如表 \ref{tab:preface-font} 所示。如有需要(如标题名称较长导致换行),请使用 \verb|\renewcommand| 命令修改。
+
+\begin{table}[htbp]
+  \centering
+  \caption{\texttt{qyxf-book} 提供的封面字体修改接口}
+  \label{tab:preface-font}
+  \begin{tabular}{ccc}
+    \toprule
+    接口                    & 对应元信息              & 默认值                  \\
+    \midrule
+    \verb|\titlefont| & \verb|\title| & \verb|\Huge\bfseries| \\
+    \verb|\subtitlefont| & \verb|\subtitle| & \verb|\huge\itshape| \\
+    \verb|\authorfont| & \verb|\author| & \verb|\LARGE\itshape| \\
+    \verb|\datefont| & \verb|\date| & \verb|\Large| \\
+    \bottomrule
+  \end{tabular}
+\end{table}
+
+\section{正文字体设置}
+
+\subsection{字体设置方案的考虑}
+
+不像其他功能完备的模板,\verb|qyxf-book| 没有提供除默认配置之外的其他「字体包」,仅给出了关闭默认字体配置的选项,其余工作完全交由用户决定
+\footnote{对于大多数用户而言,需要做的决定就是「什么也不用做,采用默认配置即可」。}
+、执行。对这一点,有两方面考虑:
+\begin{enumerate}
+  \item 钱院学辅的成员大多使用 Windows 系统,在其上为 \TeX 环境配置字体比较困难。大多数同学无法载入外部字体,使得之前版本中提供的字体配置选项相当「鸡肋」,几乎无人使用。
+  \item 对于少部分有能力自行配置字体的用户而言,预先定义的字体方案则往往不合其意,不如完全置空、由用户自行完成。
+\end{enumerate}
+因此,在当前版本的 \verb|qyxf-book| 模板中,完全移除了预定义的字体选项。如您认为有必要、也有能力自行配置字体,请阅读以下内容;否则,请遵循默认的字体配置。
+
+\subsection{西文字体设置}
+
+西文字体方面,目前采用与 Times 系列字体相近的 XITS 系列字体
+\footnote{无衬线体采用接近于 Helvetica 的 \TeX{} Gyre Heros。}
+。如您想变更西文字体,请完成以下两个步骤:
+
+\begin{enumerate}
+  \item 为 \verb|qyxf-book| 文类传入 \verb|xits = false| 的选项,此时西文字体将还原至 Computer Modern 字体;
+  \item 采用 \verb|fontspec| 宏包提供的 \verb|\setmainfont| 等命令设置字体。
+\end{enumerate}
+
+例如,下面的代码会将西文字体调整为 \TeX 发行版自带的 Libertinus 系列
+\footnote{其中并未设置数学字体,这种情况下模板将采用默认的数学字体。若需要调整数学字体,可采用 \texttt{unicode-math} 宏包配置。}
+:
+
+\begin{tcolorbox}
+\begin{verbatim}
+\documentclass[xits = false]{qyxf-book}
+% fontspec 宏包已载入,无需再声明
+\setmainfont{Libertinus Serif}
+\setsansfont{Libertinus Sans}
+\setmonofont{Libertinus Mono}
+\end{verbatim}
+\end{tcolorbox}
+
+\subsection{中文字体设置}
+
+中文字体方面,目前交由 C\TeX 宏集按系统自动选择默认字体。若您希望变更中文字体,同样需要两个步骤:
+\begin{enumerate}
+  \item 为 \verb|qyxf-book| 文类传入 \verb|noCJKfont| 选项,此时 C\TeX 宏集将把模板的中文字体设置清空;
+  \item 仅完成以上一步,文档是不能编译的,还需采用 C\TeX 宏集的接口来选择其他中文字体,或采用 \verb|xeCJK| 宏包提供的命令自行设置。
+\end{enumerate}
+
+C\TeX 宏集提供了几种预定义的字体设置,除系统字体之外还包括:
+\begin{itemize}
+  \item Fandol 字体 \verb|fandol|:包括宋、楷、黑、仿宋四套字体,在 \TeX 发行版中自带,无需安装;
+  \item 方正字体 \verb|founder|:包括方正书宋、方正黑体、方正楷体、方正仿宋等若干套字体,需自行安装,配置稍复杂;
+  \item Adobe 字体:包括宋、楷、黑、仿宋四套字体,需自行安装。
+\end{itemize}
+在正确配置相关字体的情况下,可直接采用 C\TeX 宏集提供的 \verb|\ctexset| 命令配置,如下面的命令将使得模板采用 Fandol 字体:
+\begin{tcolorbox}
+\begin{verbatim}
+\documentclass[noCJKfont]{qyxf-book}
+\ctexset{fontset = fandol}
+\end{verbatim}
+\end{tcolorbox}
+从方便使用的角度来说,Fandol 字体无需额外配置,显示效果也好于 Windows 系统的默认字体配置,但有缺字现象;对于需要印刷的作品,方正系列字体效果较好,字体完备
+\footnote{前提是:应安装对应于较完备的 GBK 字符集的字体文件。}
+,更适宜。
+
+除了直接调用 C\TeX 的配置外,也可采用由 \verb|xeCJK| 宏包
+\footnote{该宏包已经包含在模板中,其命令可以直接使用,无需在您的文档中载入。}
+提供的若干命令自行配置字体。例如,下列命令将使得模板采用思源系列中文字体
+\footnote{同样的,请确保相关字体已正确配置。}:
+\begin{tcolorbox}
+\begin{verbatim}
+\documentclass[noCJKfont]{qyxf-book}
+\setCJKmainfont[AutoFakeSlant]{Source Han Serif SC} % 伪斜体
+\setCJKsansfont[AutoFakeSlant]{Source Han Sans SC}
+\setCJKmonofont[AutoFakeSlant]{Source Han Sans SC}
+\end{verbatim}
+\end{tcolorbox}
+以上命令未配置与中文字体对应的字族(如 \verb|zhsong| 之类),在一般场合没有问题。若有需要,请参考 C\TeX 文档及 \verb|xeCJK| 宏包文档进行设置。
+
+\section{问题及改进}
+
+\subsection{已知问题}
+
+本模板目前还存在许多可改进之处,主要包括:
+\begin{enumerate}
+  \item 模板对 \verb|part| 级别的标题、目录样式未作任何定制;
+  \item 在参考文献方面,模板仅对 \LaTeX 自带的简易文献环境 \verb|thebibliorgraphy| 做了定制,未考虑 \hologo{BibTeX}
+        \footnote{在 v2.3 版本中曾在 demo 中引入了 \hologo{BibTeX} 的示例;后考虑到此方面并无需求,为了简化 demo 结构,在 V3 版本中又移除了。}
+        及 \verb|biblatex| 的样式支持;
+  \item 模板尚未引入对代码抄录宏包(如 \verb|listings|)的支持;
+  \item 配色方案还不完善,对部分元素的支持不佳。
+\end{enumerate}
+未做改动的原因很多,最大的原因是在钱院学辅排版的过程中对这些功能暂时没有需求
+\footnote{例如,在参考文献方面,许多资料甚至连 \texttt{thebibliorgraphy} 环境也不需要,用脚注就能解决问题。}。
+
+\subsection{帮帮我们!}
+
+如果您:
+\begin{itemize}
+  \item 对上述功能有需求,并有能力帮助我们完善;
+  \item 有其他好的建议、功能推荐;
+  \item 设计了新颖、实用的配色、字体方案;
+\end{itemize}
+请通过我们的代码仓库向我们提交建议与改动请求:\url{https://gitee.com/qyxf/qyxf-book},我们将酌情采纳、接收。
+
+同时,我们也欢迎您透过 fork 的形式修改出适合您自己的模板,分发给更多人使用。本模板按 MIT 许可证发行,据此您享有充分的自由。这也是对于我们模板的一种推广
+\footnote{模板滞销,帮帮我们!}
+与帮助!
+
+本模板目前由\textbf{黑山雁}维护,您也可以通过邮箱联系维护者:\url{yjr134 at 163.com}。
+
+\subsection{可解决的问题}
+
+在 \TeX\ Live 2019 中测试本模板时,发现 \textsc{Small Caps} 字族(\verb|\scfamily|)不能正常加载,回退到了普通字族;经过检查,发现默认采用的 XITS 字体在 \TeX\ Live 2019 中提供的版本(1.200)还未引入该字族,到 \TeX\ Live 2020 时对应的版本(1.300)方才完善了此部分。若您对于该字族有需求,请更新您的 \TeX 发行版。
+
+\chapter{内容示例}
+\section{用户环境示例}
+
+\begin{define}
+  极限就是超越自我。
+\end{define}
+
+\begin{theorem}
+  任何极限都可以直接观察得出。
+\end{theorem}
+
+\begin{lemma}
+  以上内容,纯属扯淡。
+\end{lemma}
+
+\begin{note}
+  好好学习,天天向上。
+\end{note}
+
+\begin{alert}
+  今天你学习了吗?
+\end{alert}
+
+\section{列表样式}
+\begin{itemize}
+  \item 这是第一层
+  \item 这也是第一层
+  \begin{itemize}
+    \item 这是第二层
+    \begin{itemize}
+      \item 这是第三层
+    \end{itemize}
+  \end{itemize}
+\end{itemize}
+
+\begin{enumerate}
+  \item 这是第一层
+  \item 这也是第一层
+  \begin{enumerate}
+    \item 这是第二层
+    \begin{enumerate}
+      \item 这是第三层
+    \end{enumerate}
+  \end{enumerate}
+\end{enumerate}
+
+\section{正文示例}
+
+\textbf{微分学}(\emph{differential calculus})是微积分的一部分,是通过\emph{导数}和\emph{微分}来研究曲线斜率、加速度、最大值和最小值的一门学科,也是探讨特定数量变化速率的学科。微分学是微积分的两个主要分支之一,另一个分支则是\textbf{积分学},探讨曲线下的面积。
+
+
+\begin{table}[htbp]
+  \centering
+  \caption{常用导数}
+  \begin{tabular}{cccc}
+    \toprule
+    \textbf{原函数} & \textbf{导函数}   & \textbf{原函数} & \textbf{导函数} \\
+    \midrule
+    $C$             & $0$               & $\ln x$         & $\frac{1}{x}$   \\
+    $x^\mu$         & $\mu x^{\mu - 1}$ & $\sin x$        & $\cos x$        \\
+    $e^x$           & $e^x$             & $\cos x$        & $-\sin x$       \\
+    \bottomrule
+  \end{tabular}
+\end{table}
+
+……几乎所有量化的学科中都有\textbf{微分}的应用。例如在物理学中,运动物体其\emph{位移}对时间的导数即为其\emph{速度},\emph{速度}对时间的导数就是\emph{加速度}、物体\emph{动量}对时间的导数即为物体所受的\emph{力},重新整理后可以得到牛顿第二运动定律 $F=ma$ 。化学反应的\emph{化学反应速率}也是导数。在运筹学中,会透过导数决定在运输或是设计上最有效率的做法。
+
+\begin{figure}[htbp]
+  \centering
+  \includegraphics[width=.3\textwidth]{qyxf-cover.pdf}
+  \caption{V2 版本的封面图片}
+  \label{fig:qyxf-logo}
+\end{figure}
+
+导数常用来找函数的\emph{极值}。含有微分项的方程式称为\textbf{微分方程},是自然现象描述的基础。微分以及其广义概念出现在许多数学领域中,例如\emph{复分析}、\emph{泛函分析}、\emph{微分几何}、\emph{测度}及\emph{抽象代数}\footnote{以上内容摘自维基百科中文词条 --- 微分学:\url{https://zh.wikipedia.org/wiki/微分学}。}。
+
+\section{引导命令示例}
+
+\exercise{1} 试用配方法求解方程:
+\begin{equation}\label{eq:quadratic}
+  ax^2 + bx + c = 0
+\end{equation}
+
+\solve 首先,方程左右两侧同除以 $a$,得到
+\[ x^2 + \frac bax + \frac ca = 0 \]
+根据一次项来配方,按公式 $(x+A)^2=x^2+2Ax+A^2$ 配出常数项:
+\[ x^2 + \frac bax + \left(\frac b{2a}\right)^2 + \frac ca - \left(\frac b{2a}\right)^2 = 0 \]
+配方并移项得到
+\[ \left(x + \frac b{2a}\right)^2 = \frac {b^2}{4a^2} - \frac ca \]
+方程左右开方,得
+\[ x + \frac b{2a} = \pm \sqrt{\frac {b^2}{4a^2} - \frac ca} \]
+从而得到方程 \eqref{eq:quadratic} 之解为
+\begin{equation}
+  x = - \frac b{2a} \pm \sqrt{\frac {b^2}{4a^2} - \frac ca}
+\end{equation}
+该式即为一元二次方程的\textbf{通用求根公式}。
+
+
+\analysis 在这一问题中,需要注意以下几点 \cite{texbook,latex}:
+\begin{itemize}
+  \item ……
+  \item ……
+  \item ……
+\end{itemize}
+
+\begin{thebibliography}{99}
+  \bibitem{texbook} KNUTH~D~E. The \TeX book [M]. Addison-Wesley: Reading, 1986.
+  \bibitem{latex} 刘海洋. \LaTeX 入门 [M]. 人民邮电出版社: 北京, 2013.
+\end{thebibliography}
+
+\end{document}
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/doc/latex/qyxf-book/qyxf-book-doc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/qyxf-book/qyxf-book.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/qyxf-book/qyxf-book.cls	2020-09-11 19:11:15 UTC (rev 56318)
+++ trunk/Master/texmf-dist/tex/latex/qyxf-book/qyxf-book.cls	2020-09-11 20:51:09 UTC (rev 56319)
@@ -4,10 +4,10 @@
 % --------------------------
 
 \NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\newcommand{\styversion}{3.0}
+\newcommand{\styversion}{3.1.0}
 \newcommand{\styname}{qyxf-book}
 \ProvidesClass{qyxf-book}
-  [2020/08/27 v3.0 Qian Yuan Xue Fu book template]
+  [2020/09/11 v3.1.0 Qian Yuan Xue Fu book template]
 \typeout{The book template provided by Qian Yuan Xue Fu}
 
 % 设定 key-val 选项
@@ -16,6 +16,8 @@
 
 % 选项定制与处理
 \DeclareStringOption[basic]{colorscheme}[basic]
+\DeclareStringOption{primary}
+\DeclareStringOption{secondary}
 \DeclareBoolOption[true]{xits}
 \DeclareVoidOption{noCJKfont}{\PassOptionsToClass{fontset=none}{ctexbook}}
 
@@ -46,9 +48,6 @@
 \fi
 \RequirePackage{hologo}
 
-% etoolbox
-\RequirePackage{etoolbox}
-
 % 正文样式设置
 \RequirePackage[normalem]{ulem}
 
@@ -67,42 +66,116 @@
 
 % caption 样式设定
 \RequirePackage{caption}
-\DeclareCaptionFormat{colored}{\small{\bfseries\color{\@caption at color}#1} #3}
+\DeclareCaptionFormat{colored}{\small{\bfseries\color{\CaptionColor}#1} #3}
 \captionsetup{
   format = colored,
   skip = 1ex
 }
 
+% 处理配色方案
+\RequirePackage{etoolbox}
+\ifdefempty{\QYXF at primary}{\relax}{\newcommand{\PrimaryColor}{\QYXF at primary}}
+\ifdefempty{\QYXF at secondary}{\relax}{\newcommand{\SecondaryColor}{\QYXF at secondary}}
+
 % color scheme 默认值
+
 % for titles amd text
-\newcommand{\@title at color}{black}
-\newcommand{\@list at color}{black}
-\newcommand{\@caption at color}{black}
-\newcommand{\@link at color}{black}
-\newcommand{\@misc at color}{black}
+\newcommand{\TitleColor}{black}
+\newcommand{\ListColor}{black}
+\newcommand{\CaptionColor}{black}
+\newcommand{\LinkColor}{black}
+\newcommand{\MiscColor}{black}
 % for boxes
-\newcommand{\@box at background}{white}
-\newcommand{\@box at frame}{black!75}
-\newcommand{\@box at title@color}{white}
-\newcommand{\@box at title@background}{black!50}
-\newcommand{\@box at color}{black}
-\newcommand{\@alert at background}{white}
-\newcommand{\@alert at color}{black}
-\newcommand{\@alert at frame}{black}
-\newcommand{\@alert at title@background}{black}
-\newcommand{\@alert at title@color}{white}
+\newcommand{\BoxBackground}{white}
+\newcommand{\BoxFrame}{black!75}
+\newcommand{\BoxTitleColor}{white}
+\newcommand{\BoxTitleBackground}{black!50}
+\newcommand{\BoxColor}{black}
+\newcommand{\AlertBackground}{white}
+\newcommand{\AlertColor}{black}
+\newcommand{\AlertFrame}{black}
+\newcommand{\AlertTitleBackground}{black}
+\newcommand{\AlertTitleColor}{white}
 % for theorems
-\newcommand{\@define at background}{white}
-\newcommand{\@define at frame}{black!40}
-\newcommand{\@define at color}{black}
-\newcommand{\@theorem at background}{black!10}
-\newcommand{\@theorem at frame}{black!80}
-\newcommand{\@theorem at color}{black}
+\newcommand{\DefineBackground}{white}
+\newcommand{\DefineFrame}{black!40}
+\newcommand{\DefineColor}{black}
+\newcommand{\TheoremBackground}{black!10}
+\newcommand{\TheoremFrame}{black!80}
+\newcommand{\TheoremColor}{black}
 
 % 读取 color scheme
-\ifdefstring{\QYXF at colorscheme}{basic}{\relax}{%
-  \newcommand\schemepath{colors/\QYXF at colorscheme.tex} 
-  \input{\schemepath}}
+\RequirePackage{xstring}
+\IfEqCase{\QYXF at colorscheme}{%
+  {basic}{\relax}% Basic theme
+  {black}{% BLack theme (bicolor)
+    % main colors
+    \providecommand\PrimaryColor{black}
+    % for titles amd text
+    \renewcommand\TitleColor{\PrimaryColor}
+    \renewcommand\ListColor{\PrimaryColor}
+    \renewcommand\CaptionColor{\PrimaryColor}
+    \renewcommand\LinkColor{\PrimaryColor}
+    \renewcommand\MiscColor{\PrimaryColor}
+    % for boxes
+    \renewcommand\BoxBackground{white}
+    \renewcommand\BoxTitleColor{\PrimaryColor}
+    \renewcommand\BoxTitleBackground{white}
+    \renewcommand\BoxFrame{\PrimaryColor}
+    \renewcommand\AlertTitleColor{white}
+    \renewcommand\AlertTitleBackground{\PrimaryColor}
+    % for theorems
+    \renewcommand\DefineFrame{\PrimaryColor}
+    \renewcommand\TheoremBackground{white}
+    \renewcommand\TheoremFrame{\PrimaryColor}
+  }%
+  {rbb}{% Red-Blue-Black theme (tricolor)
+    % main colors
+    \providecommand\PrimaryColor{blue}
+    \providecommand\SecondaryColor{red}
+    % for titles amd text
+    \renewcommand\TitleColor{\PrimaryColor}
+    \renewcommand\ListColor{\PrimaryColor}
+    \renewcommand\CaptionColor{\PrimaryColor}
+    \renewcommand\LinkColor{\SecondaryColor}
+    \renewcommand\MiscColor{\PrimaryColor}
+    % for boxes
+    \renewcommand\BoxBackground{white}
+    \renewcommand\BoxFrame{\PrimaryColor}
+    \renewcommand\BoxTitleBackground{\PrimaryColor}
+    \renewcommand\AlertColor{\SecondaryColor}
+    \renewcommand\AlertFrame{\SecondaryColor}
+    \renewcommand\AlertTitleBackground{\SecondaryColor}
+    % for theorems
+    \renewcommand\DefineFrame{black}
+    \renewcommand\TheoremBackground{white}
+    \renewcommand\TheoremFrame{\PrimaryColor}
+  }%
+  {bootstrap-v4}{% Bootstrap V4 theme
+    % for titles amd text
+    \renewcommand\TitleColor{black!85}
+    \renewcommand\ListColor{blue!50!cyan}
+    \renewcommand\CaptionColor{cyan!80!olive}
+    \renewcommand\LinkColor{blue!67!green!}
+    \renewcommand\MiscColor{blue!50!cyan}
+    % for boxes
+    \renewcommand\BoxBackground{cyan!20!white}
+    \renewcommand\BoxFrame{blue!30!teal}
+    \renewcommand\BoxTitleBackground{blue!55!cyan}
+    \renewcommand\BoxColor{blue!45!teal!80!black}
+    \renewcommand\AlertBackground{red!10!white}
+    \renewcommand\AlertColor{red!40!black!90!white}
+    \renewcommand\AlertFrame{red!75!teal}
+    \renewcommand\AlertTitleBackground{red!80!cyan}
+    % for theorems
+    \renewcommand\DefineBackground{green!8!white!94!black}
+    \renewcommand\DefineFrame{green!10!white!90!black}
+    \renewcommand\DefineColor{green!40!black!90!white}
+    \renewcommand\TheoremBackground{-blue!20!black!96!green}
+    \renewcommand\TheoremFrame{-blue!30!black!90!green}
+    \renewcommand\TheoremColor{red!57!green!90!black}
+  }%
+}[\ClassWarning{\styname}{Color scheme `\QYXF at colorscheme' not found, `basic' theme is used then.}]
 
 % tcolorbox 样式设定
 \tcbset{
@@ -109,12 +182,12 @@
   enhanced,
   noparskip,
   after = \noindent,
-  colback = \@box at background,
+  colback = \BoxBackground,
   title filled,
-  colbacktitle = \@box at title@background,
-  colframe = \@box at frame,
-  coltitle = \@box at title@color,
-  coltext = \@box at color,
+  colbacktitle = \BoxTitleBackground,
+  colframe = \BoxFrame,
+  coltitle = \BoxTitleColor,
+  coltext = \BoxColor,
   fonttitle = \bfseries,
   arc = 0.25em,
   boxrule = 0.5pt,
@@ -130,28 +203,28 @@
 }
 
 % 引导命令
-\newcommand{\exercise}[1]{\noindent\textbf{\color{\@misc at color}练习 #1}\ }
-\newcommand{\solve}{\noindent\textbf{\color{\@misc at color}\uline{解}}\ }
-\newcommand{\analysis}{\noindent\textbf{\color{\@misc at color}\uline{分析}}\ }
+\newcommand{\exercise}[1]{\noindent\textbf{\color{\MiscColor}练习 #1}\ }
+\newcommand{\solve}[1][解]{\noindent\textbf{\color{\MiscColor}#1}\ }
+\newcommand{\analysis}[1][分析]{\noindent\emph{\color{\MiscColor}#1}\ }
 
 % 定理环境及样式设定
 \newtheorem{theorem}{定理}
 \newtheorem{lemma}[theorem]{引理}
 \newtheorem{define}{定义}
-\BeforeBeginEnvironment{theorem}{\begin{tcolorbox}[colback=\@theorem at background,colframe=\@theorem at frame,coltext=\@theorem at color]}
+\BeforeBeginEnvironment{theorem}{\begin{tcolorbox}[colback=\TheoremBackground,colframe=\TheoremFrame,coltext=\TheoremColor]}
 \AfterEndEnvironment{theorem}{\end{tcolorbox}}
-\BeforeBeginEnvironment{lemma}{\begin{tcolorbox}[colback=\@theorem at background,colframe=\@theorem at frame,coltext=\@theorem at color]}
+\BeforeBeginEnvironment{lemma}{\begin{tcolorbox}[colback=\TheoremBackground,colframe=\TheoremFrame,coltext=\TheoremColor]}
 \AfterEndEnvironment{lemma}{\end{tcolorbox}}
-\BeforeBeginEnvironment{define}{\begin{tcolorbox}[colback=\@define at background,colframe=\@define at frame,coltext=\@define at color]}
+\BeforeBeginEnvironment{define}{\begin{tcolorbox}[colback=\DefineBackground,colframe=\DefineFrame,coltext=\DefineColor]}
 \AfterEndEnvironment{define}{\end{tcolorbox}}
 \newtcolorbox{note}{title={注记}}
 \newtcolorbox{alert}{
   title = {警告},
-  colback = \@alert at background,
-  colframe = \@alert at frame,
-  colbacktitle = \@alert at title@background,
-  coltitle = \@alert at title@color,
-  coltext = \@alert at color
+  colback = \AlertBackground,
+  colframe = \AlertFrame,
+  colbacktitle = \AlertTitleBackground,
+  coltitle = \AlertTitleColor,
+  coltext = \AlertColor
 }
 
 % 页面设置
@@ -174,18 +247,21 @@
 }
 \hypersetup{
   colorlinks = true,
-  linkcolor = \@link at color,
-  anchorcolor = \@misc at color,
-  urlcolor = \@link at color,
-  citecolor = \@misc at color
+  linkcolor = \LinkColor,
+  anchorcolor = \MiscColor,
+  urlcolor = \LinkColor,
+  citecolor = \MiscColor
 }
 
 % 章节标题与目录样式
 \RequirePackage{titlesec,titletoc}
 \ctexset{section={name={\S,}}}
-\titleformat{\chapter}[block]{\color{\@title at color}\centering\bfseries\fontsize{2.25em}{1.2ex}}{\CTEXthechapter}{1em}{}
-\titleformat*{\section}{\color{\@title at color}\fontsize{1.75em}{1.225ex}\bfseries\centering}
-\titleformat*{\subsection}{\color{\@title at color}\fontsize{1.5em}{1.43ex}\bfseries}
+\titleformat{\chapter}[block]{\color{\TitleColor}\centering\bfseries\fontsize{2.25em}{1.2ex}}{\CTEXthechapter}{1em}{}
+\titleformat*{\section}{\color{\TitleColor}\fontsize{1.75em}{1.225ex}\bfseries\centering}
+\titleformat*{\subsection}{\color{\TitleColor}\fontsize{1.5em}{1.43ex}\bfseries}
+\titleformat*{\subsubsection}{\color{\TitleColor}\fontsize{1.25em}{1.4ex}\bfseries}
+\titleformat*{\paragraph}{\color{\TitleColor}\bfseries}
+\titleformat*{\subparagraph}{\color{\TitleColor}}
 \titlespacing{\chapter}{0pt}{*1}{*4}
 \titlecontents{chapter}[24pt]{\hspace{-2pc}\filright}
               {\normalsize\bfseries\contentspush{\thecontentslabel\ }}
@@ -200,7 +276,7 @@
 
 % 页眉页脚设置
 \newcommand{\footerbox}{%
-  {\color{\@misc at color}\bfseries\thepage}\\[-\baselineskip]
+  {\color{\MiscColor}\bfseries\thepage}\\[-\baselineskip]
   \uline{\hphantom{\@footorginfo}}\\
   \@footorginfo}
 \RequirePackage{fancyhdr}
@@ -218,20 +294,19 @@
 % 列表样式设置
 \RequirePackage[shortlabels]{enumitem}
 \RequirePackage{pifont}
-\newcommand{\arrowmark}{\ding{228}}
 \setlist{nosep, partopsep=0.5ex}
-\setlist[itemize,1]{label={\color{\@list at color}\arrowmark}, left=0.8em}
-\setlist[itemize,2]{label={\color{\@list at color}\ding{111}}, left=2.8em}
-\setlist[itemize,3]{label={\color{\@list at color}\ding{109}}, left=4.8em}
-\setlist[enumerate,1]{label={\color{\@list at color}\textbf{\arabic*}.}, left=0.8em}
-\setlist[enumerate,2]{label={\color{\@list at color}{\arabic*}.}, left=2.8em}
-\setlist[enumerate,3]{label={\color{\@list at color}({\arabic*})}, left=4.8em}
-\setlist[description]{style=nextline, font=\color{\@list at color}\bfseries}
+\setlist[itemize,1]{label={\color{\ListColor}\ding{228}}, left=0.8em}
+\setlist[itemize,2]{label={\color{\ListColor}\ding{111}}, left=2.8em}
+\setlist[itemize,3]{label={\color{\ListColor}\ding{109}}, left=4.8em}
+\setlist[enumerate,1]{label={\color{\ListColor}\textbf{\arabic*}.}, left=0.8em}
+\setlist[enumerate,2]{label={\color{\ListColor}{\arabic*}.}, left=2.8em}
+\setlist[enumerate,3]{label={\color{\ListColor}({\arabic*})}, left=4.8em}
+\setlist[description]{style=nextline, font=\color{\ListColor}\bfseries}
 
 % 参考文献定制
 \RequirePackage[square,numbers]{natbib}
-\renewcommand{\citenumfont}[1]{{\color{\@link at color}#1}}
-\renewcommand{\bibnumfmt}[1]{{\color{\@list at color}[#1]}}
+\renewcommand{\citenumfont}[1]{{\color{\LinkColor}#1}}
+\renewcommand{\bibnumfmt}[1]{{\color{\ListColor}[#1]}}
 \AtBeginEnvironment{thebibliography}{\addcontentsline{toc}{chapter}{\bibname}}
 
 % 杂项
@@ -274,12 +349,12 @@
   \begin{titlepage}
   \null
   \begin{center}\large
-  \begin{tcolorbox}[blanker,borderline west={1mm}{0pt}{\@box at frame},%
+  \begin{tcolorbox}[blanker,borderline west={1mm}{0pt}{\BoxFrame},%
   left=20pt,top=1ex,bottom=1ex,after skip=0pt,no shadow]
-  {\color{\@title at color}\titlefont\@title}
-  \ifdefempty\@subtitle{}{\\[1ex]{\color{\@title at color}\subtitlefont\@subtitle}}
+  {\color{\TitleColor}\titlefont\@title}
+  \ifdefempty\@subtitle{}{\\[1ex]{\color{\TitleColor}\subtitlefont\@subtitle}}
   \end{tcolorbox}
-  \begin{tcolorbox}[blanker,borderline west={1mm}{0pt}{\@title at color},%
+  \begin{tcolorbox}[blanker,borderline west={1mm}{0pt}{\TitleColor},%
   left=20pt,top=2ex,bottom=1ex,before skip=0pt,after skip=0pt,no shadow]
   {\authorfont\@author}\\\datefont\@date
   \end{tcolorbox}
@@ -293,12 +368,13 @@
   \hypersetup{pageanchor=true}
   \null\vfill
   \begin{tcolorbox}[title={\bfseries 作品信息}]
-  \arrowmark \textbf{标题:}\@title{}
-  \ifdefempty\@subtitle{}{: \textit{\@subtitle}}\\
-  \arrowmark \textbf{作者:}\@author\\
-  \ifdefempty{\@typo}{}{\arrowmark \textbf{校对排版:}\@typo\\}
-  \arrowmark \textbf{出品时间:}\@date\\
-  \arrowmark \textbf{总页数:}\pageref{LastPage}
+  \begin{itemize}
+    \item \textbf{标题:}\@title{}\ifdefempty\@subtitle{}{: \textit{\@subtitle}}
+    \item \textbf{作者:}\@author%
+    \ifdefempty{\@typo}{}{\item \textbf{校对排版:}\@typo}
+    \item \textbf{出品时间:}\@date
+    \item \textbf{总页数:}\pageref{LastPage}
+  \end{itemize}
   \end{tcolorbox}
   \ifdefempty\@licenseinfo{}{%
     \begin{tcolorbox}[title={\bfseries 许可证说明}]
@@ -330,4 +406,21 @@
 \setcounter{page}{1}
 }
 
+% 修正配色方案重定义问题
+\newcommand{\selectcolor}{
+  \hypersetup{
+    linkcolor = \LinkColor,
+    anchorcolor = \MiscColor,
+    urlcolor = \LinkColor,
+    citecolor = \MiscColor
+  }
+  \tcbset{
+    colback = \BoxBackground,
+    colbacktitle = \BoxTitleBackground,
+    colframe = \BoxFrame,
+    coltitle = \BoxTitleColor,
+    coltext = \BoxColor
+  }
+}
+
 \endinput



More information about the tex-live-commits mailing list.