summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/easybook/doc/easybook-demo.pdfbin308548 -> 308574 bytes
-rw-r--r--macros/latex/contrib/easybook/doc/easybook-demo.tex13
-rw-r--r--macros/latex/contrib/easybook/doc/easybook.pdfbin232038 -> 224777 bytes
-rw-r--r--macros/latex/contrib/easybook/doc/easybook.tex51
-rw-r--r--macros/latex/contrib/easybook/doc/pages/chapter2.tex4
-rw-r--r--macros/latex/contrib/easybook/doc/pages/chapter3.tex6
-rw-r--r--macros/latex/contrib/easybook/easybook.cls31
-rw-r--r--macros/latex/contrib/xsim/HISTORY10
-rw-r--r--macros/latex/contrib/xsim/README6
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-549540.pdfbin0 -> 60853 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-549540.tex153
-rw-r--r--macros/latex/contrib/xsim/xsim-manual.cls4
-rw-r--r--macros/latex/contrib/xsim/xsim-manual.pdfbin1308757 -> 1353979 bytes
-rw-r--r--macros/latex/contrib/xsim/xsim.sty4
-rw-r--r--macros/latex/contrib/xsim/xsim.style.layouts.code.tex121
15 files changed, 346 insertions, 57 deletions
diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.pdf b/macros/latex/contrib/easybook/doc/easybook-demo.pdf
index bbed292f08..6ec49c1b3c 100644
--- a/macros/latex/contrib/easybook/doc/easybook-demo.pdf
+++ b/macros/latex/contrib/easybook/doc/easybook-demo.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.tex b/macros/latex/contrib/easybook/doc/easybook-demo.tex
index 38f111ac34..e96706fd81 100644
--- a/macros/latex/contrib/easybook/doc/easybook-demo.tex
+++ b/macros/latex/contrib/easybook/doc/easybook-demo.tex
@@ -1,6 +1,6 @@
\documentclass[
zihao = -4,
- font = myfont,
+ font = noto,
paper = a4paper,
openany
]{easybook}
@@ -14,7 +14,8 @@
% multoc = true,
% withpart = true,
% perpart = true,
- perpage = true
+ perpage = true,
+ % notomath = false
},
link =
{
@@ -56,9 +57,9 @@
},
hdrset =
{
- \fancyhead[EC]{\color{Teal}\kaishu\leftmark}
- \fancyhead[OC]{\color{Teal}\kaishu\rightmark}
- \fancyhead[EL,OR]{\color{Teal}\thepage}
+ \fancyhead[EC]{\color{DarkViolet}\kaishu\leftmark}
+ \fancyhead[OC]{\color{DarkViolet}\kaishu\rightmark}
+ \fancyhead[EL,OR]{\color{DarkViolet}\thepage}
},
tocset =
{
@@ -95,7 +96,7 @@
\edge~\url{https://latexstudio.net} \\
\url{https://ctan.org/pkg/easybook}
}
- \date{2021/01/31\hskip\ccwd\relax v1.21k}
+ \date{2021/02/01\hskip\ccwd\relax v1.22}
}
\begin{document}
diff --git a/macros/latex/contrib/easybook/doc/easybook.pdf b/macros/latex/contrib/easybook/doc/easybook.pdf
index 0e88a82d68..4ff8a3ab79 100644
--- a/macros/latex/contrib/easybook/doc/easybook.pdf
+++ b/macros/latex/contrib/easybook/doc/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/doc/easybook.tex b/macros/latex/contrib/easybook/doc/easybook.tex
index 013a7555e7..3da60e77e2 100644
--- a/macros/latex/contrib/easybook/doc/easybook.tex
+++ b/macros/latex/contrib/easybook/doc/easybook.tex
@@ -8,7 +8,7 @@
\title{\sffamily easybook书籍文档类}
\author{瞿毅}
-\date{2021/01/31\hskip\ccwd\relax v1.21k\thanks{\url{https://gitee.com/texl3/easybook}}}
+\date{2021/02/01\hskip\ccwd\relax v1.22\thanks{\url{https://gitee.com/texl3/easybook}}}
\begin{document}
\maketitle
@@ -36,22 +36,22 @@
xelatex -shell-escape easybook-demo
\end{frameverb}
-需注意,正确\textsf{编译索引}需要增加 \opt{-shell-escape} 命令行选项。若不需要索引和参考文献,可以在正文中注释掉命令。若出现以下警告,再编译一次即可。
+需注意,正确\textbf{编译索引}需要增加 \opt{-shell-escape} 命令行选项。若不需要索引和参考文献,可以在正文中注释掉命令。若出现以下警告,再编译一次即可。
\begin{frameverb}
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
\end{frameverb}
-\subsection{字体设置}\label{subsec1}
-默认使用\CTeX 预置中文字库,当开启 \opt{font = myfont} 选项时需要安装开源字体,中文使用方正系列的{\songti 方正书宋}、{\heiti 方正黑体}、{\kaishu 方正楷体}和{\fangsong 方正仿宋},英文使用思源系列的{\rmfamily Noto Serif}、{\sffamily Noto Sans}和{\ttfamily Noto Sans Mono},数学字体使用 \pkg{notomath}。相关选项可以见小节 \ref{subsec2},字体点击此处下载\href{https://wws.lanzous.com/b01ns361i}{下载地址}。
+\subsection{字体设置}\label{font settings}
+默认使用\CTeX 预置中文字库,当开启 \opt{font = noto} 选项时需要安装开源字体,中文使用方正系列的{\songti 方正书宋}、{\heiti 方正黑体}、{\kaishu 方正楷体}和{\fangsong 方正仿宋},英文使用思源系列的{\rmfamily Noto Serif}、{\sffamily Noto Sans}和{\ttfamily Noto Sans Mono},数学字体使用 \pkg{notomath}。相关选项可以见小节 \ref{document class options} 中的 \opt{font} 选项,字体点击此处下载\href{https://wws.lanzous.com/b01ns361i}{下载地址}。
-如果您不想使用\CTeX 默认字体和方正、思源字体,\textsf{自定义字体}需启用选项 \opt{font = none},并可在导言区设置中文字体,粗体与斜体不设置会产生警告。
+如果您不想使用\CTeX 默认字体和方正、思源字体,\textbf{自定义字体}需启用选项 \opt{font = none},并可在导言区设置中文字体,粗体与斜体不设置会产生警告。
\begin{ctexexam}
\setCJKmainfont{SimSun}[BoldFont = SimHei,ItalicFont = KaiTi]
\setCJKsansfont{SimHei}
\setCJKmonofont{FangSong}
\end{ctexexam}
-\section{文档类选项}\label{subsec2}
+\section{文档类选项}\label{document class options}
标准 \cls{book} 文类与 \cls{ctexbook} 文类的选项同样适用于本文档。除此之外选项分为两类
\begin{itemize}
\item 带有 \rexptarget\rexpstar{} 号的选项,需要在引入文档类的时候设定。
@@ -71,21 +71,21 @@
\end{function}
\begin{function}[rEXP,added = 2021-01-05]{entitle}
-部分标题编号由中文数字变为大写罗马数字,章标题编号由中文数字变为阿拉伯数字。比如\textsf{第一部分}变为\textsf{第I部分},\textsf{第一章}变为\textsf{第1章}。
+部分标题编号由中文数字变为大写罗马数字,章标题编号由中文数字变为阿拉伯数字。比如\textbf{第一部分}变为\textbf{第I部分},\textbf{第一章}变为\textbf{第1章}。
\end{function}
\begin{function}[rEXP,added = 2021-01-05]{english}
-使各类标题变为英文形式。包括章节标题、图表标题和定理标题等。如\textsf{第一章}变为\textsf{Chapter 1},\textsf{图1.1} 变为 \textsf{Table 1.1}。
+使各类标题变为英文形式。包括章节标题、图表标题和定理标题等。如\textbf{第一章}变为\textbf{Chapter 1},\textbf{图1.1} 变为 \textbf{Table 1.1}。
\end{function}
\begin{function}[rEXP,added = 2021-01-05]{enstyle}
同时开启 \opt{newline}、\opt{entitle} 和 \opt{english} 三个选项以符合英文原生风格。
\end{function}
-\begin{function}[rEXP,added = 2021-01-05,updated = 2021-01-12]{font}
+\begin{function}[rEXP,added = 2021-01-05,updated = 2021-02-01]{font}
\begin{syntax}
- font = <adobe|founder|mac|windows|linux|(overleaf)|none|myfont>
+ font = <adobe|founder|mac|windows|linux|(overleaf)|noto|none>
\end{syntax}
\changes{v1.21b}{2021/01/12}{默认字体与\CTeX 一致,不再是自定义字体。}
-传递给 \cls{ctexbook} 设置字体,最好不要使用原有的 \opt{fontset} 选项,默认情况下使用自定义字体而不开启这个选项,可根据安装的字体及电脑系统选取。\opt{myfont} 与 \opt{none} 选项的相关描述见小节 \ref{subsec1},\opt{overleaf} 是一个各系统通用选项,会检测系统环境选取对应字体。
+传递给 \cls{ctexbook} 设置字体,最好不要使用原有的 \opt{fontset} 选项,默认情况下使用自定义字体而不开启这个选项,可根据安装的字体及电脑系统选取。\opt{noto} 与 \opt{none} 选项的相关描述见小节 \ref{font settings},\opt{overleaf} 是一个各系统通用选项,会检测系统环境选取对应字体。
\end{function}
\begin{function}[rEXP,added = 2021-01-05,updated = 2021-01-13]{paper}
@@ -112,16 +112,18 @@
\end{function}
\subsection{风格}
-\begin{function}[EXP,added = 2021-01-05,updated = 2021-01-12]{style/color,style/capdash,style/multoc,style/withpart,style/perchap,style/perpage}
+\begin{function}[EXP,added = 2021-01-05,updated = 2021-02-01]{style/color,style/capdash,style/multoc,style/withpart,style/perpart,style/perpage,style/notomath}
\begin{syntax}
color = <(none)|forest|energy|cyberpunk>
capdash = <true|(false)>
multoc = <true|(false)>
withpart = <true|(false)>
- perchap = <true|(false)>
+ perpart = <true|(false)>
perpage = <true|(false)>
+ notomath = <(true)|false>
\end{syntax}
\changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。}
+\changes{v1.22}{2021/02/01}{noto风格的数学字体独立出来,可自定义设置。}
\opt{style} 选项控制文章的风格。
\end{function}
@@ -132,16 +134,17 @@
\tn{definecolor}\oarg{类型}\marg{名称}\marg{模式列表}\marg{参数列表}
\end{syntax}
\changes{v1.10}{2021/01/08}{可以自定义主题颜色。}
- 主题颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改,类似地更改超链接颜色见小节 \ref{subsec3}。
+ 主题颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改,类似地更改超链接颜色见小节 \ref{hyperlinks}。
\end{function}
- \item[capdash] 将图表代码标题风格由例如\textsf{图1.1}变为\textsf{图1\textendash 1}的形式。
+ \item[capdash] 将图表代码标题风格由例如\textbf{图1.1}变为\textbf{图1\textendash 1}的形式。
\item[multoc] 开启双栏目录,可与 \opt{onecolumn} 和 \opt{twocolumn} 选项配合出单栏正文、单栏目录,双栏正文、单栏目录,单栏正文、双栏目录和双栏正文、双栏目录四种方式 。
\item[withpart] 使章跟随每一部分编号,默认不跟随。
- \item[perchap] 使脚注跟随每一章编号,默认不跟随。
+ \item[perpart] 使脚注跟随每一部分编号,默认不跟随。
\item[perpage] 使脚注跟随每一页编号,默认不跟随。
+ \item[notomath] 使用 \opt{noto} 风格的数学字体,将会加载 \pkg{newtxmath} 宏包。
\end{optdesc}
-\subsection{超链接}\label{subsec3}
+\subsection{超链接}\label{hyperlinks}
\begin{function}[EXP,added = 2021-01-05,updated = 2021-01-08]{link/hyperlink,link/linkcolor,link/linktopage}
\begin{syntax}
hyperlink = <(edge)|various|none>
@@ -183,7 +186,7 @@
\item[mathspread] 数学环境行距。
\item[capspread] 图表代码标题行距。
\item[fnspread] 脚注行距。
- \item[fnspread] 脚注与脚注线间的距离,需带有长度单位。
+ \item[fnsep] 脚注与脚注线间的距离,需带有长度单位。
\end{optdesc}
\subsection{其它字体}
@@ -221,15 +224,15 @@
\begin{optdesc}
\item[backend] 参考文献处理后端,默认用传统的 \hologo{BibTeX} 处理参考文献。
\item[bibstyle] 参考文献格式为中国的参考文献推荐标准GB/T 7714-2015,有顺序编码制和著者-出版年制两种风格,理工科类一般使用顺序编码制,文科类一般使用著者-出版年制。若使用其它格式,使用 \hologo{BibTeX} 处理时需确保正确的 \opt{bst} 文件,使用 \hologo{biber} 处理可使用 \pkg{biblatex} 宏包支持的参考文献风格名称。
- \item[citestyle] 引用参考文献的格式,对 \opt{backend = bibtex} 选项\textsf{无效},可使用 \pkg{biblatex} 宏包支持的引用文献风格名称。
+ \item[citestyle] 引用参考文献的格式,对 \opt{backend = bibtex} 选项\textbf{无效},可使用 \pkg{biblatex} 宏包支持的引用文献风格名称。
\item[bibfile] 参考文献的数据文件,使用 \hologo{biber} 处理时要带有 \opt{bib} 后缀,默认为一个在 \opt{ref} 文件夹中以 \opt{refs.bib} 命名的文件。
- \item[\tn{printbibliography}] 两种方式\textsf{均使用}此命令打印参考文献,其中可选项仅在 \hologo{biber} 处理时有效。
+ \item[\tn{printbibliography}] 两种方式\textbf{均使用}此命令打印参考文献,其中可选项仅在 \hologo{biber} 处理时有效。
\end{optdesc}
\subsection{定理样式}
\begin{function}[EXP,added = 2021-01-12,updated = 2021-01-18]{thmset/thmbox,thmset/numberwith,thmset/headpunct,thmset/bodyfont,thmset/notefont,thmset/headfont,thmset/headindent,thmset/spaceabove,thmset/spacebelow,thmset/spacepost}
\begin{syntax}
- thmbox = <true|(false))>
+ thmbox = <true|(false)>
numberwith = <(chapter)|section|其它环境|空置>
headpunct = <(未设置)>
bodyfont = <(未设置)>
@@ -371,8 +374,8 @@
\end{ctexexam}
\end{function}
-\subsubsection{排序列表}\label{ssubsec1}
-使用 \opt{enumerate} 环境可创建排序列表,使用 \opt{enumerate*} 环境产生行内部列表,可以使用\textsf{A、a、I、i和1}作为可选项为 \opt{enumerate} 与 \opt{enumerate*} 格式化标签。若生成\textsf{Item I、Item II、Item III}格式可以这样
+\subsubsection{排序列表}\label{sort list}
+使用 \opt{enumerate} 环境可创建排序列表,使用 \opt{enumerate*} 环境产生行内部列表,可以使用\textbf{A、a、I、i和1}作为可选项为 \opt{enumerate} 与 \opt{enumerate*} 格式化标签。若生成\textbf{Item I、Item II、Item III}格式可以这样
\begin{ctexexam}
\begin{enumerate*}[(a)]
\begin{enumerate}[\bfseries{Item} I]
@@ -413,7 +416,7 @@
\tn{item} <习题内容>
\tn{end}\marg{exercise}
\end{syntax}
-习题环境 \opt{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号环境时不进行编号。三个可选参数中颜色为自定义或 \pkg{xcolor} 包含的颜色名称(深色),正文编号格式与小节 \ref{ssubsec1} 排序列表相同,标题名默认为摘要,参数只能\textsf{从右往左}省略。
+习题环境 \opt{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号环境时不进行编号。三个可选参数中颜色为自定义或 \pkg{xcolor} 包含的颜色名称(深色),正文编号格式与小节 \ref{sort list} 排序列表相同,标题名默认为摘要,参数只能\textbf{从右往左}省略。
\begin{ctexexam}
\begin{exercise}[black][1.][习题]
\item 习题内容
diff --git a/macros/latex/contrib/easybook/doc/pages/chapter2.tex b/macros/latex/contrib/easybook/doc/pages/chapter2.tex
index 43af513c95..c81e0d01bc 100644
--- a/macros/latex/contrib/easybook/doc/pages/chapter2.tex
+++ b/macros/latex/contrib/easybook/doc/pages/chapter2.tex
@@ -10,14 +10,14 @@
\end{outline}
\section{定理}\index{d@定理}
-\begin{theorem}[(高斯公式\footnote{选自高等数学公式。})]\label{theo1}\index{d@定理!g@高斯公式}
+\begin{theorem}[(高斯公式\footnote{选自高等数学公式。})]\label{gauss formula}\index{d@定理!g@高斯公式}
设空间闭区域$\Omega$是由分片光滑的闭曲面$\Sigma$围成,若函数$P(x,y,z)$,$Q(x,y,z)$,$R(x,y,z)$在$\Omega$上具有一节连续偏导数,则有
\begin{align}
\iiint_\Omega\left(\frac{\partial P}{\partial x}+\frac{\partial Q}{\partial y}+\frac{\partial R}{\partial x}\right)\mathrm{d}V & =\oiint_\Sigma P\mathrm{d}y\mathrm{d}z+Q\mathrm{d}z\mathrm{d}x+R\mathrm{d}x\mathrm{d}y
\\
& =\oiint_\Sigma \left(P\cos\alpha+Q\cos\beta+R\cos\gamma\right)\mathrm{d}S
\end{align}
-这里$\Sigma$是整个边界曲面$\Omega$的外侧,$\cos\alpha,\cos\beta,\cos\gamma$是$\Sigma$在点$(x,y,z)$处的法向量的方向余弦。引用这个公式如\cref{theo1}。
+这里$\Sigma$是整个边界曲面$\Omega$的外侧,$\cos\alpha,\cos\beta,\cos\gamma$是$\Sigma$在点$(x,y,z)$处的法向量的方向余弦。引用这个公式如\cref{gauss formula}。
\end{theorem}
\begin{definition}[(Stokes formula)]\label{defi1}\index{d@定理!s@Stokes formula}
diff --git a/macros/latex/contrib/easybook/doc/pages/chapter3.tex b/macros/latex/contrib/easybook/doc/pages/chapter3.tex
index df8ca09eaf..04fa95dc34 100644
--- a/macros/latex/contrib/easybook/doc/pages/chapter3.tex
+++ b/macros/latex/contrib/easybook/doc/pages/chapter3.tex
@@ -2,7 +2,7 @@
\documentclass[../easybook-demo]{subfiles}
\begin{document}
-\chapter{其它格式}\label{chap1}
+\chapter{其它格式}\label{chap:other formats}
\section{代码}\index{d@代码}
\zhlipsum[42][name = aspirin]
@@ -42,8 +42,8 @@ HN-[::+60]CH_3)=-(-HO)=)}\]
\subsection{边注}\index{y@引用!b@边注}
对乙酰氨基酚和布洛芬\marginnote{这是一个边注。}于1956年和1959年相继问世以后,阿司匹林的使用率开始下降。
-\subsection{引用章节}\label{sec1}\index{y@引用!s@索引}
-兽医有时用阿司匹林来镇痛或抗血栓,主要给狗用\cref{chap1},有时给马用\cref{sec1},不过现在一般会用副作用较少的新疗法。
+\subsection{引用章节}\label{subsec:reference section}\index{y@引用!s@索引}
+兽医有时用阿司匹林来镇痛或抗血栓,主要给狗用\cref{chap:other formats},有时给马用\cref{subsec:reference section},不过现在一般会用副作用较少的新疗法。
\subsection{参考文献}\index{y@引用!c@参考文献}
这是一个参考文献引用的范例\cite{1979Prospect}。引用多个文献,将引用标号中的多个文献序号按升序排列,若其中有2个以上的连续序号,则改用范围序号,例如\cite{1979Prospect,1989The,2010An}。
diff --git a/macros/latex/contrib/easybook/easybook.cls b/macros/latex/contrib/easybook/easybook.cls
index 85a5dda53a..c89eaa7325 100644
--- a/macros/latex/contrib/easybook/easybook.cls
+++ b/macros/latex/contrib/easybook/easybook.cls
@@ -9,7 +9,7 @@
%% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/01/31}{1.21k}{}
+\ProvidesExplClass{easybook}{2021/02/01}{1.22}{}
\cs_generate_variant:Nn \keys_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -26,7 +26,7 @@
\bool_set_false:N \l__draft_bool
\bool_set_false:N \l__newline_bool
\bool_set_false:N \l__enstyle_bool
-\bool_set_false:N \l__myfont_bool
+\bool_set_false:N \l__font_noto_bool
\bool_set_true:N \l__zhtitle_bool
\bool_set_true:N \l__lang_chinese_bool
\bool_set_true:N \l__page_twoside_bool
@@ -55,9 +55,9 @@
{\__put_ctexbook:n {fontset = ubuntu}},
font/none .code:n =
{\__put_ctexbook:n {fontset = #1}},
- font/myfont .code:n =
+ font/noto .code:n =
{
- \bool_set_true:N \l__myfont_bool
+ \bool_set_true:N \l__font_noto_bool
\__put_ctexbook:n {fontset = none}
},
font .initial:n = overleaf,
@@ -98,6 +98,7 @@
\bool_new:N \l__chap_withpart_bool
\bool_new:N \l__foot_perpart_bool
\bool_new:N \l__foot_perpage_bool
+\bool_new:N \l__notomath_bool
\tl_new:N \g__config_tl
\ctex_define:n
@@ -130,7 +131,10 @@
perpart .initial:n = false,
perpage .bool_set:N = \l__foot_perpage_bool,
perpage .default:n = true,
- perpage .initial:n = false
+ perpage .initial:n = false,
+ notomath .bool_set:N = \l__notomath_bool,
+ notomath .default:n = true,
+ notomath .initial:n = true
}
\RequirePackage[svgnames]{xcolor}
@@ -139,18 +143,14 @@
\RequirePackage[hang,stable]{footmisc}
\RequirePackage{setspace,zhlineskip}
\RequirePackage{amsthm,thmtools,cases}
-\RequirePackage[noto,upint]{newtxmath}
-\RequirePackage{chemformula}
-\RequirePackage{chemfig}
-\RequirePackage{siunitx,bm}
+\RequirePackage{chemformula,chemfig,siunitx}
\RequirePackage[normalem]{ulem}
\RequirePackage[protrusion = false]{microtype}
-\RequirePackage{rotfloat}
\RequirePackage{geometry,marginnote}
+\RequirePackage{rotfloat,graphicx}
\RequirePackage{nccfoots,tablefootnote}
\RequirePackage{fancyhdr,titletoc}
\RequirePackage{caption,bicaption,subcaption}
-\RequirePackage{graphicx}
\RequirePackage{zhlipsum,fontawesome,pifont}
\RequirePackage{tabularx,multirow,makecell,booktabs}
\RequirePackage{paralist,tasks}
@@ -168,6 +168,11 @@
\cs_new:Npn \edge{\textcolor[HTML]{00c2ff}{\faEdge}}
\ctex_at_end_preamble:n
{
+ \bool_if:NT \l__notomath_bool
+ {
+ \RequirePackage[noto,upint]{newtxmath}
+ \RequirePackage{bm}
+ }
\tl_if_empty:NF \g__config_tl
{\file_input:n {\g__config_tl}}
}
@@ -219,7 +224,7 @@
\cs_new_protected:Npx \__set_zhfont_fangsong:n #1
{\__set_zhfont_fangsong:nn {#1}{\__option_zhfont:}}
-\bool_if:NT \l__myfont_bool
+\bool_if:NT \l__font_noto_bool
{
\__setmainfont:nn {NotoSerif}
{
@@ -749,7 +754,7 @@
{font = \color{ctex@emph}\sf,labelwidth = *,leftmargin = 2\ccwd}
\newlist{outlinelist}{itemize}{1}
\setlist[outlinelist]
- {label = \color{ctex@emph}\upshape\ding{112},itemsep = .5ex plus .1ex,leftmargin = *}
+ {label = \color{ctex@emph}\upshape\ding{111},itemsep = .5ex plus .1ex,leftmargin = *}
\skip_set:Nn \pltopsep{.75ex plus .1ex}
\skip_set:Nn \plpartopsep{0ex}
\skip_set:Nn \plitemsep{.75ex plus .1ex}
diff --git a/macros/latex/contrib/xsim/HISTORY b/macros/latex/contrib/xsim/HISTORY
index 0d3f7d417a..c898ca033c 100644
--- a/macros/latex/contrib/xsim/HISTORY
+++ b/macros/latex/contrib/xsim/HISTORY
@@ -7,15 +7,15 @@ Clemens Niederberger
Web: https://github.com/cgnieder/xsim
E-Mail: contact@mychemistry.eu
--------------------------------------------------------------------------
-Copyright 2017--2020 Clemens Niederberger
+Copyright 2017--2021 Clemens Niederberger
This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3
+conditions of the LaTeX Project Public License, either version 1.3c
of this license or (at your option) any later version.
The latest version of this license is in
http://www.latex-project.org/lppl.txt
-and version 1.3 or later is part of all distributions of LaTeX
-version 2005/12/01 or later.
+and version 1.3c or later is part of all distributions of LaTeX
+version 2008/05/04 or later.
This work has the LPPL maintenance status `maintained'.
@@ -176,3 +176,5 @@ HISTORY:
- make `no-files' the default
- new examples
- various small fixes
+ v0.20a 2021/02/01 - re-add missing `layouts' style
+ - add example texsx-549540
diff --git a/macros/latex/contrib/xsim/README b/macros/latex/contrib/xsim/README
index 3407220a29..82ac42689c 100644
--- a/macros/latex/contrib/xsim/README
+++ b/macros/latex/contrib/xsim/README
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
-XSIM 2021/01/31 v0.20
+XSIM 2021/02/01 v0.20a
XSIMVERB 2021/01/31 v0.3
eXercise Sheets IMproved
@@ -26,9 +26,10 @@ The Current Maintainer of this work is Clemens Niederberger.
The xsim package consists of the code files:
xsim.sty
xsimverb.sty
+ xsim.style.layouts.code.tex
--------------------------------------------------------------------------
The xsim package consists of the documentation files:
- README HISTORY
+ README, HISTORY
xsim-manual.tex, xsim-manual.pdf
xsim-manual.cls
--------------------------------------------------------------------------
@@ -66,6 +67,7 @@ The xsim package consists of the example files:
xsim.texsx-395273.tex, xsim.texsx-395273.pdf
xsim.texsx-466584.tex, xsim.texsx-466584.pdf
xsim.texsx-498299.tex, xsim.texsx-498299.pdf
+ xsim.texsx-549540.tex, xsim.texsx-549540.pdf
xsim.texsx-576998.tex, xsim.texsx-576998.pdf
xsim.texsx-580636.tex, xsim.texsx-580636.pdf
xsim.texwelt-6698.tex, xsim.texwelt-6698.pdf
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-549540.pdf b/macros/latex/contrib/xsim/examples/xsim.texsx-549540.pdf
new file mode 100644
index 0000000000..3dbe7bb716
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-549540.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-549540.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-549540.tex
new file mode 100644
index 0000000000..332e3d9920
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-549540.tex
@@ -0,0 +1,153 @@
+% https://tex.stackexchange.com/q/549540/
+\documentclass[12pt]{article}
+\usepackage[T1]{fontenc}
+
+\usepackage{parskip}
+\usepackage{geometry}
+\geometry{ a4paper, left=5mm, right=5mm, top=15mm }
+
+\usepackage{amsmath,amssymb}
+
+\usepackage{multicol}
+\setlength{\columnsep}{1mm}
+\setlength{\columnseprule}{0.2pt}
+
+\usepackage[most]{tcolorbox}
+
+\usepackage{siunitx}
+\usepackage{xsim}
+\usepackage{tasks}
+
+\makeatletter
+\newtcolorbox{examtitle}[2][]{
+ halign=flush center,
+ colframe=gray!70!black,
+ fonttitle=\Large,
+ enhanced,
+ breakable,
+ colback=white,
+ attach boxed title to top right={yshift=-2pt}, title={#2},
+ boxed title size=standard,
+ boxrule=0pt,
+ boxed title style={
+ sharp corners,
+ rounded corners=northeast,
+ colback=tcbcolframe,
+ boxrule=0pt},
+ sharp corners=north,
+ overlay unbroken={
+ \path[fill=tcbcolback]
+ ([xshift=2pt]title.south west)
+ to[out=180, in=0] ([xshift=-1.5cm]title.west)--
+ (title.west-|frame.west) |-
+ ([xshift=2pt]title.south west)--cycle;
+ \path[fill=tcbcolframe] (title.south west)
+ to[out=180, in=0] ([xshift=-1.5cm]title.west)--
+ (title.west-|frame.west)
+ [rounded corners=\kvtcb@arc] |-
+ (title.north-|frame.north)
+ [sharp corners] -| (title.south west);
+ \draw[line width=.5mm, rounded corners=\kvtcb@arc,
+ tcbcolframe]
+ (title.north east) rectangle
+ (frame.south west);
+ },
+ overlay first={
+ \path[fill=tcbcolback]
+ ([xshift=2pt]title.south west)
+ to[out=180, in=0] ([xshift=-1.5cm]title.west)--
+ (title.west-|frame.west) |-
+ ([xshift=2pt]title.south west)--cycle;
+ \path[fill=tcbcolframe] (title.south west)
+ to[out=180, in=0] ([xshift=-1.5cm]title.west)--
+ (title.west-|frame.west)
+ [rounded corners=\kvtcb@arc] |-
+ (title.north-|frame.north)
+ [sharp corners] -| (title.south west);
+ \draw[line width=.5mm, rounded corners=\kvtcb@arc,
+ tcbcolframe]
+ (frame.south west) |- (title.north) -|
+ (frame.south east);
+ },
+ overlay middle={
+ \draw[line width=.5mm, tcbcolframe]
+ (frame.north west)--(frame.south west)
+ (frame.north east)--(frame.south east);
+ },
+ overlay last={
+ \draw[line width=.5mm, rounded corners=\kvtcb@arc,
+ tcbcolframe]
+ (frame.north west) |- (frame.south) -|
+ (frame.north east);
+ },
+ #1
+}
+\makeatother
+
+\xsimsetup{
+ load-style = layouts ,
+ exercise/template = minimal ,
+ exercise/the-counter = \arabic{exercise}. ,
+ exercise/end-hook = \vspace{\baselineskip}
+}
+
+\NewTasksEnvironment[
+ label = (\Alph*) ,
+ label-format = \bfseries ,
+ label-width = 21pt
+]{choices}[\choice]
+
+\DeclareExerciseProperty{answer}
+\newcommand*\answer[1]{%
+ \SetExpandedExerciseProperty{answer}{ \thetask\ \unexpanded{#1}}%
+ #1%
+}
+
+\newcommand*\getanswers{%
+ \def\betweenanswers{\def\betweenanswers{\hspace{2em}}}%
+ \ForEachUsedExerciseByID{%
+ \betweenanswers##3\ExercisePropertyGet{##1}{##2}{answer}%
+ }%
+}
+
+\begin{document}
+
+\begin{examtitle}{Test 1}
+ Angles in parallel lines
+\end{examtitle}
+
+\begin{multicols*}{2}
+\begin{exercise}
+ If the ratio of two supplementary angles is $\frac{4}{11}$, what is the
+ measure of the small angle?
+ \begin{choices}(5)
+ \choice \ang{36}
+ \choice \ang{44}
+ \choice \answer{\ang{48}}
+ \choice \ang{52}
+ \choice \ang{60}
+ \end{choices}
+ \end{exercise}
+ \begin{exercise}
+ Is this really a question?
+ \begin{choices}(4)
+ \choice \answer{yes}
+ \choice no
+ \choice maybe
+ \choice no idea
+ \end{choices}
+ \end{exercise}
+ \begin{exercise}
+ This really is a question!
+ \begin{choices}(4)
+ \choice yes
+ \choice \answer{no}
+ \choice maybe
+ \choice no idea
+ \end{choices}
+ \end{exercise}
+ \subsection*{Answers}
+ \getanswers
+\end{multicols*}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/xsim-manual.cls b/macros/latex/contrib/xsim/xsim-manual.cls
index ed32a87fb3..600a7f60eb 100644
--- a/macros/latex/contrib/xsim/xsim-manual.cls
+++ b/macros/latex/contrib/xsim/xsim-manual.cls
@@ -941,7 +941,8 @@
\xsim@add@example{texsx-391530}{Exercises and sub-exercises}
\xsim@add@example{texsx-395273}{Different aspects of exercises, highlighted solutions}
\xsim@add@example{texsx-466584}{Flushright Solutions}
-\xsim@add@example{texsx-498299}{Multiple choice questions with automated solutions}
+\xsim@add@example{texsx-498299}{Multiple choice questions with automated solutions (1)}
+\xsim@add@example{texsx-549540}{Multiple choice questions with automated solutions (2)}
\xsim@add@example{texsx-576998}{Exercises at the end of section and sectionwise solutions}
\xsim@add@example{texsx-580636}{Multiple hints per exercise with backlinks}
\xsim@add@example{texwelt-6698}{Custom list of exercises}
@@ -995,6 +996,7 @@
\xsim@add@version{0.19a} {2020-03-19}
\xsim@add@version{0.19b} {2020-04-04}
\xsim@add@version{0.20} {2021-01-31}
+\xsim@add@version{0.20a} {2021-02-01}
% ----------------------------------------------------------------------------
\newrobustcmd*\xsimauxfileinfo{%
diff --git a/macros/latex/contrib/xsim/xsim-manual.pdf b/macros/latex/contrib/xsim/xsim-manual.pdf
index 93245d124d..f78f19be58 100644
--- a/macros/latex/contrib/xsim/xsim-manual.pdf
+++ b/macros/latex/contrib/xsim/xsim-manual.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/xsim.sty b/macros/latex/contrib/xsim/xsim.sty
index 94866005c4..e1953059a7 100644
--- a/macros/latex/contrib/xsim/xsim.sty
+++ b/macros/latex/contrib/xsim/xsim.sty
@@ -29,10 +29,10 @@
\ExplSyntaxOn
-\tl_const:Nn \c_xsim_date_tl {2021/01/31}
+\tl_const:Nn \c_xsim_date_tl {2021/02/01}
\tl_const:Nn \c_xsim_version_major_number_tl {0}
\tl_const:Nn \c_xsim_version_minor_number_tl {20}
-\tl_const:Nn \c_xsim_version_subrelease_tl {}
+\tl_const:Nn \c_xsim_version_subrelease_tl {a}
\tl_const:Nx \c_xsim_version_number_tl
{
\c_xsim_version_major_number_tl .
diff --git a/macros/latex/contrib/xsim/xsim.style.layouts.code.tex b/macros/latex/contrib/xsim/xsim.style.layouts.code.tex
new file mode 100644
index 0000000000..31f5810bce
--- /dev/null
+++ b/macros/latex/contrib/xsim/xsim.style.layouts.code.tex
@@ -0,0 +1,121 @@
+% ----------------------------------------------------------------------------
+% the XSIM package - layouts style
+%
+% eXercise Sheets IMproved
+%
+% ----------------------------------------------------------------------------
+% Clemens Niederberger
+% Web: https://github.com/cgnieder/xsim
+% E-Mail: contact@mychemistry.eu
+% ----------------------------------------------------------------------------
+% Copyright 2017--2020 Clemens Niederberger
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% ----------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% ----------------------------------------------------------------------------
+\xsimstyle{layouts}[2019/10/12]
+
+\RequirePackage{needspace}
+
+\DeclareExerciseEnvironmentTemplate{runin}
+ {%
+ \par\vspace{\baselineskip}
+ \Needspace*{2\baselineskip}
+ \noindent
+ \textbf{\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}}%
+ \GetExercisePropertyT{subtitle}{ \textit{#1}} % <<< notice the space
+ \IfInsideSolutionF{%
+ \GetExercisePropertyT{points}{%
+ \marginpar{%
+ \printgoal{\PropertyValue}%
+ \GetExercisePropertyT{bonus-points}{+\printgoal{\PropertyValue}}%
+ \,\IfExerciseGoalSingularTF{points}
+ {\XSIMtranslate{point}}
+ {\XSIMtranslate{points}}%
+ }%
+ }%
+ }%
+ }
+ {}
+
+\RequirePackage{array}
+
+\DeclareExerciseEnvironmentTemplate{margin}
+ {%
+ \trivlist
+ \item[\llap{%
+ \smash{%
+ \tabular[t]{@{}r@{}}
+ \textbf{\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}}
+ \IfExercisePropertySetT{points}{%
+ \tabularnewline
+ (%
+ \printgoal{\GetExerciseProperty{points}}%
+ \GetExercisePropertyT{bonus-points}{+\printgoal{#1}}%
+ \,\XSIMtranslate{point-abbr}%
+ )%
+ }%
+ \endtabular
+ }%
+ }]\relax
+ }
+ {\endtrivlist}
+
+\DeclareExerciseEnvironmentTemplate{inline}
+ {%
+ \textbf{\GetExerciseProperty{counter}}%
+ \IfInsideSolutionF{%
+ \GetExercisePropertyT{points}{ % <<< notice the space
+ (\printgoal{\PropertyValue}%
+ \GetExercisePropertyT{bonus-points}{+\printgoal{\PropertyValue}}%
+ \,\IfExerciseGoalSingularTF{points}
+ {\XSIMtranslate{point}}
+ {\XSIMtranslate{points}})%
+ }%
+ } % <<< notice the space
+ }
+ {}
+
+\DeclareExerciseEnvironmentTemplate{minimal}
+ {\par\UseExerciseTemplate{begin}{inline}}
+ {\UseExerciseTemplate{end}{inline}\par}
+
+\DeclareExerciseEnvironmentTemplate{centered}
+ {%
+ \par\vspace{\baselineskip}
+ \Needspace*{2\baselineskip}
+ \noindent
+ \hfil\textbf{\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}}%
+ \GetExercisePropertyT{subtitle}{ \textit{#1}}\hfil
+ \par\noindent
+ \IfInsideSolutionF{%
+ \GetExercisePropertyT{points}{%
+ \marginpar{%
+ \printgoal{\PropertyValue}%
+ \GetExercisePropertyT{bonus-points}{+\printgoal{\PropertyValue}}%
+ \,\IfExerciseGoalSingularTF{points}
+ {\XSIMtranslate{point}}
+ {\XSIMtranslate{points}}%
+ }%
+ }%
+ }%
+ }
+ {}
+
+% ----------------------------------------------------------------------------
+\endinput
+
+2020/02/23 - added: inline, centered
+ - adapt to removed \par from the generic environments