From 84465d50d746dfed1bfbe7bb5065279665fa87de Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 26 Jul 2021 03:01:05 +0000 Subject: CTAN sync 202107260301 --- .../themes/beamertheme-simpledarkblue/LICENSE | 25 ++ .../themes/beamertheme-simpledarkblue/README.md | 20 ++ .../beamercolorthemeSimpleDarkBlue.sty | 34 ++ .../beamerfontthemeSimpleDarkBlue.sty | 35 ++ .../beamertheme-simpledarkblue-sample.pdf | Bin 0 -> 41507 bytes .../beamertheme-simpledarkblue-sample.tex | 163 ++++++++++ .../beamerthemeSimpleDarkBlue.sty | 31 ++ macros/latex/contrib/easybook/easybook.dtx | 362 +++++++++------------ macros/latex/contrib/easybook/easybook.pdf | Bin 602784 -> 593817 bytes macros/latex/contrib/macrolist/README.md | 2 +- macros/latex/contrib/macrolist/macrolist.dtx | 53 ++- macros/latex/contrib/macrolist/macrolist.pdf | Bin 184302 -> 192607 bytes macros/latex/contrib/media9/ChangeLog | 5 + macros/latex/contrib/media9/doc/media9.pdf | Bin 3748241 -> 3748257 bytes macros/latex/contrib/media9/media9.sty | 8 +- macros/latex/contrib/media9/pdfbase.sty | 228 ++++++------- macros/latex/contrib/semantex/semantex.pdf | Bin 385078 -> 385078 bytes macros/latex/contrib/semantex/semantex.sty | 6 +- macros/latex/contrib/semantex/semantex.tex | 2 +- macros/latex/contrib/semantex/stripsemantex.sty | 2 +- 20 files changed, 629 insertions(+), 347 deletions(-) create mode 100644 macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/LICENSE create mode 100644 macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/README.md create mode 100644 macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamercolorthemeSimpleDarkBlue.sty create mode 100644 macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamerfontthemeSimpleDarkBlue.sty create mode 100644 macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamertheme-simpledarkblue-sample.pdf create mode 100644 macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamertheme-simpledarkblue-sample.tex create mode 100644 macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamerthemeSimpleDarkBlue.sty (limited to 'macros/latex') diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/LICENSE b/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/LICENSE new file mode 100644 index 0000000000..a84c395662 --- /dev/null +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/LICENSE @@ -0,0 +1,25 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to + diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/README.md b/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/README.md new file mode 100644 index 0000000000..9da9fcca74 --- /dev/null +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/README.md @@ -0,0 +1,20 @@ +# Simple Beamer Theme + +A simple and clear beamer template. + +**Website:** + +https://github.com/PM25/SimpleDarkBlue-BeamerTheme + +**Lead author:** + +Pin-Yen Huang (pyhuang97@gmail.com) + +**Compiled sample document:** + +beamertheme-simpledarkblue-sample.pdf + +## License + +This is free and unencumbered software released into the public domain. +For more information, please see the file `LICENSE` or refer to . diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamercolorthemeSimpleDarkBlue.sty b/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamercolorthemeSimpleDarkBlue.sty new file mode 100644 index 0000000000..06711c3d9e --- /dev/null +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamercolorthemeSimpleDarkBlue.sty @@ -0,0 +1,34 @@ +% !TEX TS-program = xelatex +% !TEX encoding = UTF-8 Unicode + +%---------------------------------------------------------------------------------------- +% File: beamercolorthemeSimpleDarkBlue.sty +% Author: Pin-Yen Huang (pyhuang97@gmail.com) +% link: https://github.com/PM25/SimpleDarkBlue-BeamerTheme +% This is free and unencumbered software released into the +% public domain; see for details. +%---------------------------------------------------------------------------------------- + +\definecolor{InvisibleRed}{rgb}{0.92, 0.9, 0.9} +\definecolor{InvisibleGreen}{rgb}{0.9, 0.92, 0.9} +\definecolor{InvisibleBlue}{rgb}{0.9, 0.9, 0.92} + +\definecolor{LightBlue}{rgb}{0.4, 0.55, 0.65} + +\definecolor{MediumRed}{rgb}{0.92549, 0.34509, 0.34509} +\definecolor{MediumGreen}{rgb}{0.36862, 0.66666, 0.65882} +\definecolor{MediumBlue}{rgb}{0.01176, 0.31372, 0.43529} + +\definecolor{DarkBlue}{rgb}{0.05, 0.15, 0.3} + +\usecolortheme[named=DarkBlue]{structure} + +\setbeamercolor{palette primary}{bg=DarkBlue,fg=white} +\setbeamercolor{palette secondary}{bg=MediumBlue,fg=white} +\setbeamercolor{palette tertiary}{bg=LightBlue,fg=white} +\setbeamercolor{block title}{bg=MediumBlue} +\setbeamercolor{block body}{bg=InvisibleBlue} +\setbeamercolor{block title example}{bg=MediumGreen} +\setbeamercolor{block body example}{bg=InvisibleGreen} +\setbeamercolor{block title alerted}{bg=MediumRed} +\setbeamercolor{block body alerted}{bg=InvisibleRed} \ No newline at end of file diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamerfontthemeSimpleDarkBlue.sty b/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamerfontthemeSimpleDarkBlue.sty new file mode 100644 index 0000000000..00dd65f4d0 --- /dev/null +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamerfontthemeSimpleDarkBlue.sty @@ -0,0 +1,35 @@ +% !TEX TS-program = xelatex +% !TEX encoding = UTF-8 Unicode + +%---------------------------------------------------------------------------------------- +% File: beamerfontthemeSimpleDarkBlue.sty +% Author: Pin-Yen Huang (pyhuang97@gmail.com) +% link: https://github.com/PM25/SimpleDarkBlue-BeamerTheme +% This is free and unencumbered software released into the +% public domain; see for details. +%---------------------------------------------------------------------------------------- + +\mode + +\setbeamerfont{structure}{family=\sffamily,series=\mdseries} + +\setbeamerfont{title}{size=\LARGE,parent=structure} +\setbeamerfont{subtitle}{size=\normalsize,parent=title} + +\setbeamerfont{date}{size=\scriptsize,series=\mdseries,parent=structure} +\setbeamerfont{author}{size=\Large,series=\mdseries,parent=structure} +\setbeamerfont{institute}{size=\scriptsize,series=\mdseries,parent=structure} + +\setbeamerfont{section in toc}{size=\Large,parent=structure} +\setbeamerfont{section in head/foot}{size=\tiny,parent=structure} +\setbeamerfont{subsection in toc}{size=\large,parent={section in toc}} + +\setbeamerfont{frametitle}{parent=structure,size=\LARGE} +\setbeamerfont{framesubtitle}{parent=frametitle,size=\Large} + +\setbeamerfont{caption}{size=\footnotesize} +\setbeamerfont{item}{parent=structure,series=\mdseries} +\setbeamerfont{block title}{size=\large,series=\mdseries,parent={structure,block body}} + +\mode + diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamertheme-simpledarkblue-sample.pdf b/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamertheme-simpledarkblue-sample.pdf new file mode 100644 index 0000000000..658cfe5ed7 Binary files /dev/null and b/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamertheme-simpledarkblue-sample.pdf differ diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamertheme-simpledarkblue-sample.tex b/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamertheme-simpledarkblue-sample.tex new file mode 100644 index 0000000000..13c282eaae --- /dev/null +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamertheme-simpledarkblue-sample.tex @@ -0,0 +1,163 @@ +%---------------------------------------------------------------------------------------- +% PACKAGES AND THEMES +%---------------------------------------------------------------------------------------- + +\documentclass[aspectratio=169,xcolor=dvipsnames]{beamer} +\usetheme{SimpleDarkBlue} + +\usepackage{hyperref} +\usepackage{graphicx} % Allows including images +\usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables + +%---------------------------------------------------------------------------------------- +% TITLE PAGE +%---------------------------------------------------------------------------------------- + +\title[short title]{Simple Dark Blue Theme} % The short title appears at the bottom of every slide, the full title is only on the title page +\subtitle{Subtitle} + +\author[Pin-Yen] {Pin-Yen Huang} + +\institute[NTU] % Your institution as it will appear on the bottom of every slide, may be shorthand to save space +{ + Department of Computer Science and Information Engineering \\ + National Taiwan University % Your institution for the title page + \vskip 3pt +} +\date{July 25, 2021} % Date, can be changed to a custom date + + +%---------------------------------------------------------------------------------------- +% PRESENTATION SLIDES +%---------------------------------------------------------------------------------------- + +\begin{document} + +\begin{frame} + % Print the title page as the first slide + \titlepage +\end{frame} + +\begin{frame}{Overview} + % Throughout your presentation, if you choose to use \section{} and \subsection{} commands, these will automatically be printed on this slide as an overview of your presentation + \tableofcontents +\end{frame} + +%------------------------------------------------ +\section{First Section} +%------------------------------------------------ + +\begin{frame}{Bullet Points} + \begin{itemize} + \item Lorem ipsum dolor sit amet, consectetur adipiscing elit + \item Aliquam blandit faucibus nisi, sit amet dapibus enim tempus eu + \item Nulla commodo, erat quis gravida posuere, elit lacus lobortis est, quis porttitor odio mauris at libero + \item Nam cursus est eget velit posuere pellentesque + \item Vestibulum faucibus velit a augue condimentum quis convallis nulla gravida + \end{itemize} +\end{frame} + +%------------------------------------------------ + +\begin{frame}{Blocks of Highlighted Text} + In this slide, some important text will be \alert{highlighted} because it's important. Please, don't abuse it. + + \begin{block}{Block} + Sample text + \end{block} + + \begin{alertblock}{Alertblock} + Sample text in red box + \end{alertblock} + + \begin{examples} + Sample text in green box. The title of the block is ``Examples". + \end{examples} +\end{frame} + +%------------------------------------------------ + +\begin{frame}{Multiple Columns} + \begin{columns}[c] % The "c" option specifies centered vertical alignment while the "t" option is used for top vertical alignment + + \column{.45\textwidth} % Left column and width + \textbf{Heading} + \begin{enumerate} + \item Statement + \item Explanation + \item Example + \end{enumerate} + + \column{.5\textwidth} % Right column and width + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer lectus nisl, ultricies in feugiat rutrum, porttitor sit amet augue. Aliquam ut tortor mauris. Sed volutpat ante purus, quis accumsan dolor. + + \end{columns} +\end{frame} + +%------------------------------------------------ +\section{Second Section} +%------------------------------------------------ + +\begin{frame}{Table} + \begin{table} + \begin{tabular}{l l l} + \toprule + \textbf{Treatments} & \textbf{Response 1} & \textbf{Response 2} \\ + \midrule + Treatment 1 & 0.0003262 & 0.562 \\ + Treatment 2 & 0.0015681 & 0.910 \\ + Treatment 3 & 0.0009271 & 0.296 \\ + \bottomrule + \end{tabular} + \caption{Table caption} + \end{table} +\end{frame} + +%------------------------------------------------ + +\begin{frame}{Theorem} + \begin{theorem}[Mass--energy equivalence] + $E = mc^2$ + \end{theorem} +\end{frame} + +%------------------------------------------------ + +\begin{frame}{Figure} + Uncomment the code on this slide to include your own image from the same directory as the template .TeX file. + %\begin{figure} + %\includegraphics[width=0.8\linewidth]{test} + %\end{figure} +\end{frame} + +%------------------------------------------------ + +\begin{frame}[fragile] % Need to use the fragile option when verbatim is used in the slide + \frametitle{Citation} + An example of the \verb|\cite| command to cite within the presentation:\\~ + + This statement requires citation \cite{p1}. +\end{frame} + +%------------------------------------------------ + +\begin{frame}{References} + % Beamer does not support BibTeX so references must be inserted manually as below + \footnotesize{ + \begin{thebibliography}{99} + \bibitem[Smith, 2012]{p1} John Smith (2012) + \newblock Title of the publication + \newblock \emph{Journal Name} 12(3), 45 -- 678. + \end{thebibliography} + } +\end{frame} + +%------------------------------------------------ + +\begin{frame} + \Huge{\centerline{The End}} +\end{frame} + +%---------------------------------------------------------------------------------------- + +\end{document} \ No newline at end of file diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamerthemeSimpleDarkBlue.sty b/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamerthemeSimpleDarkBlue.sty new file mode 100644 index 0000000000..33b883f5da --- /dev/null +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-simpledarkblue/beamerthemeSimpleDarkBlue.sty @@ -0,0 +1,31 @@ +% !TEX TS-program = xelatex +% !TEX encoding = UTF-8 Unicode + +%---------------------------------------------------------------------------------------- +% File: beamerthemeSimpleDarkBlue.sty +% Author: Pin-Yen Huang (pyhuang97@gmail.com) +% link: https://github.com/PM25/SimpleDarkBlue-BeamerTheme +% This is free and unencumbered software released into the +% public domain; see for details. +%---------------------------------------------------------------------------------------- + +\mode + +% Settings +\usetheme{Madrid} +\useinnertheme{circles} +% \useoutertheme{simpleinfo} +% \useoutertheme{miniframes} % Alternatively: miniframes, infolines, split +\usefonttheme{SimpleDarkBlue} +\usecolortheme{SimpleDarkBlue} + +% \setbeamertemplate{footline} % To remove the footer line in all slides uncomment this line +\setbeamertemplate{footline}[page number] % To replace the footer line in all slides with a simple slide count uncomment this line +\setbeamertemplate{navigation symbols}{} % To remove the navigation symbols from the bottom of all slides uncomment this line +\setbeamertemplate{blocks}[rounded][shadow=true] +\setbeamertemplate{enumerate items}[default] +% table of contents (overview) +\setbeamertemplate{section in toc}[sections numbered] +\setbeamertemplate{subsection in toc}[default] + +\mode \ No newline at end of file diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index d018076e50..e2de071e35 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -12,6 +12,7 @@ %<*driver> \documentclass[fontset = fandol]{ctxdoc} \OnlyDescription +\hypersetup{linkcolor = violet} \begin{document} \DocInput{\jobname.dtx} \IndexLayout @@ -28,7 +29,7 @@ % % \title{\sffamily easybook 文档类手册} % \author{瞿毅} -% \date{2021/07/24\hskip 1em\relax v1.27o\thanks{\url{https://gitee.com/texl3/easybook}}} +% \date{2021/07/25\hskip 1em\relax v1.27p\thanks{\url{https://gitee.com/texl3/easybook}}} % % \maketitle % \begin{abstract} @@ -148,7 +149,7 @@ % cjkfont = % \end{syntax} % 中文字体采用 \CTeX 宏集包含的字库并与其一致,具体配置方案可以查看 \CTeX 使用手册。它与 \opt{fontset} 选项是等效的,如果没有指定 \opt{cjkfont} 的值,将会自动检测用户的操作系统并选择相应的字体。 -% \changes{v1.27o}{2021/07/12}{新增 \opt{cjkfont} 选项设置中文字体,原 \opt{font} 选项设置英文字体,中文字体使用 \CTeX 的字库。} +% \changes{v1.27p}{2021/07/12}{新增 \opt{cjkfont} 选项设置中文字体,原 \opt{font} 选项设置英文字体,中文字体使用 \CTeX 的字库。} % \end{function} % % 如果需要使用其它中文字体,可以在启用选项 \opt{cjkfont = none} 后,再使用 \pkg{xeCJK} 宏包的相关命令设置字体以及声明字体族: @@ -188,24 +189,27 @@ % \begin{syntax} % class = <(book)|article> % \end{syntax} -% 使用 \cls{easybook} 文档类可以有两种模式,默认为 \cls{book} 模式。选用 \opt{article} 会变为 \opt{oneside} 单面排版,同时使文档编号、结构等与标准 \cls{article} 文档类的特性相似,可用于短篇幅的文章,不需要再使用 \tn{chapter} 命令,此时节 \ref{sec:document command} 中目录命令的 \opt{chapter} 选项会失效,将以 \opt{section} 标题级别输出目录。也可以使用 \opt{book} 或 \opt{article} 选项指定文档类型。如果使用 \cls{ctexart} 配合 \pkg{easybase} 宏包,则宏包选项 \opt{book} 会失效。 +% 使用 \cls{easybook} 文档类可以有两种模式,默认为 book 模式。选用 \opt{article} 会变为 \opt{oneside} 单面排版,同时使文档编号、结构等与标准 \cls{article} 文档类的特性相似,可用于短篇幅的文章,不需要再使用 \tn{chapter} 命令,此时节 \ref{sec:document command} 中目录命令的 \opt{chapter} 选项会失效,将以 \opt{section} 标题级别输出目录。也可以使用 \opt{book} 或 \opt{article} 选项指定文档类型。如果使用 \cls{ctexart} 配合 \pkg{easybase} 宏包,则宏包选项 \opt{book} 会失效。 % \changes{v1.23}{2021/03/16}{增加 article 文章模式,可用于短篇幅的文章。} % \end{function} % % \section{文档命令} % \label{sec:document command} % \subsection{文区命令} -% \begin{function}[added = 2021-02-20,updated = 2021-04-29]{\frontmatter,\mainmatter,\backmatter,\cleardoublepage} +% \begin{function}[added = 2021-02-20,updated = 2021-07-25]{\frontmatter,\mainmatter,\backmatter,\cleardoublepage,\blankpagestyle} % \begin{syntax} % \tn{frontmatter*}\oarg{编号格式|(Roman)} % \tn{mainmatter*} % \tn{backmatter} % \tn{cleardoublepage}\oarg{页面风格|(empty)} +% \tn{blankpagestyle}\marg{页面风格} % \end{syntax} -% \tn{frontmatter} 为前言区命令,章标题不编号,页码可设置为例如 \opt{roman}、\opt{Alph} 等格式,带有星号的命令 \tn{frontmatter*} 不使用清双页命令 \tn{cleardoublepage}。\tn{mainmatter} 为主文区命令,章标题正常编号且页码为从 1 开始计数的阿拉伯数字,\tn{mainmatter*} 命令不使用 \tn{cleardoublepage}。\tn{backmatter} 为后记区命令,页码格式与编号保持不变,章标题不编号。在奇数页使用命令 \tn{cleardoublepage} 时可选参数为下一页多出的空白偶数页的页面风格,默认为 \opt{empty} 即空的页眉页脚。 +% \tn{frontmatter} 为前言区命令,章标题不编号,页码可设置为例如 \opt{roman}、\opt{Alph} 等格式,\tn{mainmatter} 为主文区命令,章标题正常编号且页码为从 1 开始计数的阿拉伯数字,它们带有星号的变体命令不使用 \tn{cleardoublepage} 命令。\tn{backmatter} 为后记区命令,页码格式与编号保持不变,章标题不编号。 % \changes{v1.23}{2021/02/20}{重新定义文档结构划分命令。} % \end{function} % +% 清双页命令 \tn{cleardoublepage} 可以确保下一页文本总在奇数页开始,在奇数页使用它会产生空白偶数页。文区命令 \tn{frontmatter} 和 \tn{mainmatter} 会用到清双页命令,在启用文类选项 \opt{openright} 时标题命令 \tn{part} 和 \tn{chapter} 也会用到清双页命令。此时可以使用 \tn{blankpagestyle} 命令全局指定多出空白页的默认页面风格,或使用可选参数局部指定。默认的风格为 \opt{empty},即空的页眉页脚。 +% % \subsection{目录命令} % \begin{function}[added = 2021-02-20,updated = 2021-06-06]{\tableofcontents,\listoffigures,\listoftables,\listoflstlistings} % \begin{syntax} @@ -427,7 +431,7 @@ % \end{function} % % \begin{optdesc} -% \item[line] 正文行距,\tn{ctexset} 原有的行距选项 \opt{linespread} 失效。 +% \item[line] 正文行距,\CTeX 原有的行距选项 \opt{linespread} 失效。 % \item[table] 表格行距,对传统表格环境 \env{tabular}、\env{tabularx} 以及 \pkg{tabularray} 宏包的 \env{tblr} 环境生效,同时 \env{tblr} 也自带有 \opt{stretch} 选项设置行距。 % \item[math] 数学环境行距,包括 \pkg{amsmath} 和 \pkg{mathtools} 宏包附带的环境,但并未加载 \pkg{mathtools} 宏包。 % \item[caption] 图表代码标题行距。 @@ -482,55 +486,42 @@ % \end{function} % % \begin{optdesc} -% \item[backend] 参考文献处理后端,默认用传统的 \hologo{BibTeX} 处理参考文献。 +% \item[backend] 参考文献处理后端,默认用传统的 \hologo{BibTeX} 处理参考文献\footnote{使用 \hologo{BibTeX} 引擎时加载 \pkg{natbib} 宏包,使用 \hologo{biber} 时将加载 \pkg{biblatex} 宏包。}。 % \item[bib-style] 参考文献格式为中国的参考文献推荐标准 GB/T 7714-2015,有顺序编码制和著者-出版年制两种风格,理工科类一般使用顺序编码制,文科类一般使用著者-出版年制。若使用其它格式,使用 \hologo{BibTeX} 处理时需确保正确的 \opt{bst} 文件,使用 \hologo{biber} 处理可使用 \pkg{biblatex} 宏包支持的参考文献风格名称。 % \item[cite-style] 标注参考文献的风格,选项 \opt{backend = bibtex} 下可使用 \opt{super}(数字上标标注,默认)或 \opt{numbers}(数字标注)等 \pkg{natbib} 宏包带有的标注风格,选项 \opt{backend = biblatex} 下可使用 \pkg{biblatex} 宏包支持的标注风格名称。 -% \item[datafile] 参考文献数据库的文件名,可以是单个文件也可以是以括号包裹并以英文逗号分隔的文件列表,使用 \hologo{biber} 处理时要带有 \opt{bib} 后缀,若不在当前文件夹名称需要包含路径。只有设置数据库的文件名才会载入 \pkg{natbib} 或 \pkg{biblatex} 宏包,之后才可使用相关配置命令,否则需要手动载入相关宏包配置参考文献。 +% \item[datafile] 参考文献数据库的文件名,可以是单个文件也可以是以括号包裹并以英文逗号分隔的文件列表,使用 \hologo{biber} 处理时要带有 \opt{bib} 后缀,若不在当前文件夹名称需要包含路径。不设置参考文献数据库名时 \opt{bibset} 中的选项会失效,即不自动载入 \pkg{natbib} 或 \pkg{biblatex} 宏包,此时需要手动载入相关宏包配置参考文献。 % \end{optdesc} % % \subsubsection{配置参考文献} -% \begin{function}[added = 2021-01-11,updated = 2021-04-09]{\printbibliography,\BibtexPreSet,\BibtexPostSet,\BiblatexPreSet,\BiblatexPostSet} +% \begin{function}[added = 2021-01-11,updated = 2021-04-09]{\printbibliography} % \begin{syntax} % \tn{printbibliography}\oarg{键值列表} % \end{syntax} -% 不设置参考文献数据库名时 \opt{bibset} 中的选项会失效,但是后三个命令保存了 \opt{bibset} 模块预置的参考文献选项与配置,与对应宏包配合使用它们时 \opt{bibset} 中的选项仍然有效,也可以不使用它们完全自行设置参考文献方案。设置参考文献数据库名时对它们重新定义也可以达到重新设置参考文献的效果。 +% 两种方式 \textbf{均使用} 此命令打印参考文献,不同处理后端此命令的 \meta{键值列表} 不同。使用 \hologo{BibTeX} 处理时选项与节 \ref{sec:document command} 目录的选项相同,使用 \hologo{biber} 处理时常用的选项如下: % \end{function} % +% \begin{function}{heading,title,prenote,section,type,filter} +% \begin{syntax} +% heading = +% title = <参考文献标题名> +% prenote = <参考文献前注> +% section = <整数|(0)> +% type = <条目类型> +% filter = <过滤器名> +% \end{syntax} +% \end{function} % \begin{optdesc} -% \item[\tn{printbibliography}] 两种方式 \textbf{均使用} 此命令打印参考文献,不同处理后端此命令的 \meta{键值列表} 不同。使用 \hologo{BibTeX} 处理时选项与节 \ref{sec:document command} 目录的选项相同,使用 \hologo{biber} 处理时常用的选项如下: -% \begin{function}{heading,title,prenote,section,type,filter} -% \begin{syntax} -% heading = -% title = <参考文献标题名> -% prenote = <参考文献前注> -% section = <整数|(0)> -% type = <条目类型> -% filter = <过滤器名> -% \end{syntax} -% \end{function} -% \begin{optdesc} -% \item[heading] 参考文献通常有一个章标题或者节标题,该选项选择由 \tn{defbibheading} 定义的标题名。缺省状态下使用标题名 \opt{bibintoc}。 -% \item[title] 如果标题定义支持的话,该选项覆盖由 \opt{heading} 选项提供的缺省标题名。 -% \item[prenote] 该选项选择由 \tn{defbibnote} 所定义的前注,缺省状态下不打印任何前注。 -% \item[section] 只打印在指定文节中引用的条目。该参考文献节从 1 开始编号,所有在 \env{refsection} 环境外给出的引用标记为第零节。 -% \item[type] 指定条目的打印类型。 -% \item[filter] 使用由 \tn{defbibfilter} 定义的 \opt{filter} 来过滤条目。 -% \end{optdesc} -% \item[\tn{BibtexPreSet}] 这是 \pkg{natbib} 宏包的前配置命令,需要与 \pkg{natbib} 配合并放在载入其之前使用,可以重新定义它向 \pkg{natbib} 传递宏包选项。 -% \item[\tn{BibtexPostSet}] 这是 \pkg{natbib} 宏包的后配置命令,需要与 \pkg{natbib} 配合并放在载入其之后使用,默认保存了参考文献风格和标题的设置。 -% \item[\tn{BiblatexPreSet}] 这是 \pkg{biblatex} 宏包的前配置命令,需要与 \pkg{biblatex} 配合并放在载入其之前使用,默认保存了参考文献风格的设置。若重新定义可使用 \tn{PassOptionsToPackage} 命令向 \pkg{biblatex} 传递它支持的各种参考文献选项。 -% \item[\tn{BiblatexPostSet}] 这是 \pkg{biblatex} 宏包的后配置命令,需要与 \pkg{biblatex} 配合并放在载入其之后使用,默认保存了参考文献标题的设置。 +% \item[heading] 参考文献通常有一个章标题或者节标题,该选项选择由 \tn{defbibheading} 定义的标题名。缺省状态下使用标题名 \opt{bibintoc}。 +% \item[title] 如果标题定义支持的话,该选项覆盖由 \opt{heading} 选项提供的缺省标题名。 +% \item[prenote] 该选项选择由 \tn{defbibnote} 所定义的前注,缺省状态下不打印任何前注。 +% \item[section] 只打印在指定文节中引用的条目。该参考文献节从 1 开始编号,所有在 \env{refsection} 环境外给出的引用标记为第零节。 +% \item[type] 指定条目的打印类型。 +% \item[filter] 使用由 \tn{defbibfilter} 定义的 \opt{filter} 来过滤条目。 % \end{optdesc} % -% 可能一些情况下您希望更加灵活地设置参考文献或由更多需求,下面举一个在导言区手动载入 \pkg{biblatex} 宏包的例子: +% 可能一些情况下您希望更加灵活地设置参考文献或有更多需求,下面举一个在导言区手动配置 \pkg{biblatex} 宏包的例子: % \begin{ctexexam} -% \bibset -% { -% bib-style = alphabetic, -% cite-style = numeric-comp -% } -% \BiblatexPreSet % 传递 biblatex 宏包的选项 -% \usepackage{biblatex} +% \usepackage[style = numeric]{biblatex} % \addbibresource{myrefs.bib} % \defbibheading{bibliography}[参考文献] % 定义参考文献标题 % {\chapter*{#1}\markboth{#1}{#1}} @@ -617,10 +608,12 @@ % \DeclareTheorem{定理环境名}{中文标题}[style = easy-theorem] % \declaretheorem[style = easy-theorem,name = 定理名]{定理环境名} % \end{ctexexam} +% % \tn{declaretheorem} 定义的定理环境需要手动增加盒子边框: % \begin{ctexexam} % \tcolorboxenvironment{定理环境名}{tc-theorem} % \end{ctexexam} +% % 定义一个新的定理样式可用于 \tn{declaretheorem} 的 \opt{style} 选项: % \begin{ctexexam} % \declaretheoremstyle[bodyfont = \rmfamily,spacepost = 0.5em]{定理样式名} @@ -671,7 +664,7 @@ % footnoterule = <脚注横线格式> % \end{syntax} % \ding{229} 以上选项路径为 \opt{hdrset/...} \\ -% \opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持。设置章节标志选项 \opt{chap-mark}、\opt{sec-mark} 和 \opt{subsec-mark} 时已做了情形考虑,不需要使用 \tn{markboth} 或 \tn{markright} 命令,其中参数 \#1 代表当前章、节或小节的标题。\opt{chap-mark} 和 \opt{sec-mark} 选项在 book 模式时有意义,\opt{sec-mark} 和 \opt{subsec-mark} 选项在 article 模式时有意义,这与标准文档类的行为一致。也可以直接重新定义这些标志命令,但此时 \opt{style/uppercase} 选项失效,这时可以用例如 \tn{MakeUppercase} 命令来设置标志内容的大小写。 +% \opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持。在 book 模式时使用章节页眉标志内容选项 \opt{chap-mark} 和 \opt{sec-mark},在 article 模式时使用 \opt{sec-mark} 和 \opt{subsec-mark} 选项,这与标准文档类的行为一致,标志内容中参数 \#1 代表当前章、节或小节的标题。也可以直接重新定义这些标志命令,但此时 \opt{style/uppercase} 选项失效,这时可以用例如 \tn{MakeUppercase} 命令来设置标志内容的大小写。 % \changes{v1.21}{2021/01/11}{修复单面文档时页眉横线消失的问题。} % \changes{v1.21}{2021/01/13}{增加配置页眉页脚的选项。} % \changes{v1.23}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 标志选项。} @@ -687,18 +680,23 @@ % sec-mark = \CTEXifname{\CTEXthesection——}{}#1 % } % \end{ctexexam} +% % \opt{headrule}、\opt{footrule} 和 \opt{footnoterule} 三个选项可以使用 \tn{hrule} \opt{width} \meta{长度} \opt{height} \meta{高度} 或下述 \tn{markrule} 命令来绘制横线,脚注线默认为空。当然,手动绘制横线时线条粗细选项 \opt{style/rulewidth} 会失效。 % -% \begin{function}[added = 2021-01-13,updated = 2021-06-14]{\easyhead,\easyfoot,\markrule} +% \begin{function}[added = 2021-01-13,updated = 2021-07-25]{\easyhead,\easyfoot,\markboth,\markright,\markrule} % \begin{syntax} % \tn{easyhead}\oarg{位置}\marg{内容} % \tn{easyfoot}\oarg{位置}\marg{内容} +% \tn{markboth}\marg{左页页眉内容}\marg{右页页眉内容} +% \tn{markright}\marg{右页页眉内容} % \tn{markrule}\oarg{长度|(\tn{textwidth})}\parg{颜色名}\marg{线宽|(0.75pt)}[<上间距>+<下间距>] % \end{syntax} % 命令 \tn{easyhead} 和 \tn{easyfoot} 的使用方法与 \tn{fancyhead} 和 \tn{fancyfoot} 完全相同,它们需要在 \opt{head-foot} 选项中使用,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共 12 个部分,可选参数中 \opt{E} 和 \opt{O} 代表偶数和奇数,\opt{L}、\opt{C} 和 \opt{R} 代表左、中和右部分。单面打印时,含有偶数的选项无效。 % \changes{v1.26}{2021/06/14}{增加页眉页脚的横线绘制命令 \tn{markrule}。} % \end{function} % +% \tn{markboth} 和 \tn{markright} 这两个命令用于手动设置页眉内容,一般紧随标题命令,特殊情况下可以使用它们得到需要的页眉标志。上述标志命令内容的选项便是基于这两个命令。如果是单面排版,则 \meta{左页页眉内容} 无效。 +% % 命令 \tn{markrule} 用于绘制页眉页脚横线,长度默认为页面文本区的宽度,上下间距为横线与上下方部件的间距,带有长度单位,间距长度之间用 + 号分开,若只有一部分则表示上间距,这个命令也可以在正文中绘制横线。下面举一个设置页眉内容的例子: % \begin{ctexexam} % \hdrset @@ -728,7 +726,7 @@ % \end{syntax} % \ding{229} 以上选项路径为 \opt{hdrset/...} \\ % \changes{v1.25}{2021/05/12}{增加脚注样式设置选项。} -% \changes{v1.27o}{2021/07/14}{增加脚注内容格式选项 \opt{fntext-form} 和脚注类型选项 \opt{footnotetype}。} +% \changes{v1.27p}{2021/07/14}{增加脚注内容格式选项 \opt{fntext-form} 和脚注类型选项 \opt{footnotetype}。} % \end{function} % % \begin{optdesc} @@ -877,7 +875,7 @@ % \end{syntax} % \pkg{enumitem} 宏包为系统预置的三种列表环境即排序列表 \env{enumerate}、常规列表 \env{itemize} 和 主题列表 \env{description} 提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置三种列表格式,或者直接使用可选参数的 \meta{键值列表},具体选项见 \pkg{enumitem} 宏包文档。 % -% 已为三种列表预置了三个级别,同种列表或不同种列表间的不同级别可相互嵌套,带有星号的环境为行内列表。默认列表标签与标准 \cls{book} 文档类一致,下面举几个更改列表标签以及其它格式的例子: +% 已为三种列表预置了三个级别,同种列表或不同种列表间的不同级别可相互嵌套,可以使用短编号的形式,带有星号的环境为行内列表。默认列表标签与标准文档类一致,下面举几个更改列表标签以及其它格式的例子: % \changes{v1.24}{2021/04/08}{重新优化列表环境的配置。} % \end{function} % @@ -916,7 +914,7 @@ % \tn{end}\{hangparas\} % \end{syntax} % \tn{hangpara} 命令使其后的一个段落保持悬挂缩进,\env{hangparas} 环境使其中的段落均保持悬挂缩进。缩进将以 \meta{缩进长度} 从每个段落的 \meta{缩进开始行数} 开始。 -% \changes{v1.27o}{2021/07/11}{增加悬挂缩进段落命令 \tn{hangpara} 和环境 \env{hangparas}。} +% \changes{v1.27p}{2021/07/11}{增加悬挂缩进段落命令 \tn{hangpara} 和环境 \env{hangparas}。} % \end{function} % % \subsection{代码} @@ -932,16 +930,17 @@ % % \subsection{习题} % \label{subsec:exercise} -% \begin{function}[added = 2021-01-05,updated = 2021-07-03]{exercise} +% \begin{function}[added = 2021-01-05,updated = 2021-07-25]{exercise} % \begin{syntax} -% \tn{begin}\{exercise\}*+\oarg{键值列表}\parg{键值列表}\oarg{键值列表} +% \tn{begin}\{exercise\}*+\oarg{键值列表1}\parg{键值列表2}\oarg{键值列表3} % \ \tn{item} <习题内容> % \tn{end}\{exercise\} % \end{syntax} -% 习题环境 \env{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号参数时不进行编号,使用 + 号参数独立编号并启用 \pkg{tcolorbox} 支持生成标题,并使 \opt{color} 生效,此时计数器使用的值为 \tn{thetcbcounter}。第三个 \meta{键值列表} 的选项与 \pkg{enumitem} 的排序列表相同,第一个 \meta{键值列表} 中包含的选项如下: +% 习题环境的标题使用 \env{tcbox} 行内盒子包装样式,内容则使用 \env{enumerate} 列表环境。它有 5 个可选参数,应当注意用法。当使用星号参数时标题不进行编号,使用 + 号参数时不使用预置标题,此时 \meta{键值列表1} 除了 \opt{label} 选项失效。 % \changes{v1.23}{2021/02/08}{增加准确的习题盒子标题目录锚点。} % \end{function} % +% \meta{键值列表2} 为 \pkg{tcolorbox} 的盒子样式选项,例如 \opt{boxsep} 和 \opt{fontupper}等。\meta{键值列表3} 的选项与 \pkg{enumitem} 的排序列表相同,不过第一个选项无法是短编号形式,这被 \opt{number} 选项代替。\meta{键值列表1} 也用于设置标题样式,包含的选项如下: % \begin{function}{color,title,number,numsep,label} % \begin{syntax} % color = <标题背景颜色名|(DeepSkyBlue)> @@ -950,7 +949,7 @@ % numsep = <编号与标题的间距|(0.5em)> % label = <标签内容> % \end{syntax} -% 第二个 \meta{键值列表} 在是否使用 + 号参数时用法不同,使用 + 号参数时为 \pkg{tcolorbox} 的盒子选项,例如 \opt{boxrule} 和 \opt{fontupper}。不使用 + 号参数时相当于设置 \tn{ctexset}\{section = {\#1}\} 键值选项列表,例如 \opt{format} 和 \opt{beforeskip}。\opt{number} 为短编号形式,应当包含 A、a、I、i、或 1 其中一个符号。\opt{label} 选项用于设置习题环境的引用标签,它与标签格式命令 \tn{labelformat} 对应的计数器是 eb@exercise。 +% \opt{number} 为短编号形式,应当包含 A、a、I、i、或 1 其中一个符号。\opt{label} 选项用于设置习题环境的引用标签,它与标签格式命令 \tn{labelformat} 对应的计数器是 eb@exercise。 % \end{function} % % \begin{function}{\setexercise,\exerprologue,\tcphantomifname} @@ -965,7 +964,7 @@ % \begin{ctexexam} % \tcphantomifname{\markright{\UseCounter{tcbcounter}{\quad 习题}}}{} % \exerprologue{习题前的一段文本} -% \begin{exercise}+[color = LightSkyBlue](after skip = 3.75ex)[itemsep = 1ex] +% \begin{exercise}+[color = LightSkyBlue](after skip = 2pc)[itemsep = 1ex] % \item 第一题 % \item 第二题 % \end{exercise} @@ -1071,6 +1070,16 @@ % \theoremhead{定理标题}\label{thm:theorem} % \end{ctexexam} % +% \subsection{图表题注} +% \begin{function}[added = 2021-07-25]{\caption,\captionof,\bicaption} +% \begin{syntax} +% \tn{caption*}\oarg{目录标题}\marg{标题} +% \tn{captionof*}\marg{题注类型}\oarg{目录标题}\marg{标题} +% \tn{bicaption*}\oarg{目录标题1}\marg{标题2}\oarg{目录标题1}\marg{标题2} +% \end{syntax} +% 题注命令 \tn{caption} 用于在图表上下方插入题注,需要在浮动体环境 \env{figure} 和 \env{table} 中使用,在浮动环境外可以使用 \tn{captionof} 命令,第一个参数指定题注类型。\tn{bicaption} 命令可以实现中英文双语题注,需要在导言区载入 \pkg{bicaption} 宏包,具体用法见说明文档。 +% \end{function} +% % \subsection{化学式} % \begin{function}[added = 2021-01-05]{\ch,\chemfig} % \begin{syntax} @@ -1085,12 +1094,12 @@ % \begin{syntax} % \tn{seteqcomp}\marg{键值列表} % \tn{symb*}\marg{符号}\oarg{引导符} -% \tn{begin}\{eqcomp\}\oarg{键值列表}\parg{键值列表} +% \tn{begin}\{eqcomp\}\oarg{键值列表1}\parg{键值列表2} % \ \tn{symb}\marg{符号}\oarg{引导符}<说明文字> % \tn{end}\{eqcomp\} % \end{syntax} -% 一些公式之后可以使用基于列表环境的 \env{eqcomp} 进行符号对照。\tn{symb} 需要在环境内使用,带有星号的命令可单独在文本段落使用。对照列表第二个 \meta{键值列表} 与 \pkg{enumitem} 的选项相同,一般较少用到,可以用于设置垂直间距等。第一个 \meta{键值列表} 也可以使用 \tn{seteqcomp} 全局设置,选项如下: -% \changes{v1.27o}{2021/07/22}{增加公式符号对照环境 \env{eqcomp} 和命令 \tn{symb}。} +% 一些公式之后可以使用基于列表环境的 \env{eqcomp} 进行符号对照。\tn{symb} 需要在环境内使用,带有星号的命令可单独在文本段落使用。对照列表的 \meta{键值列表2} 与 \pkg{enumitem} 的选项相同,一般较少用到,可以用于设置垂直间距等。\meta{键值列表1} 也可以使用 \tn{seteqcomp} 全局设置,它的选项如下: +% \changes{v1.27p}{2021/07/22}{增加公式符号对照环境 \env{eqcomp} 和命令 \tn{symb}。} % \end{function} % % \begin{function}{width,delim,space,item-align,delim-align,intro,font,mode} @@ -1161,78 +1170,42 @@ % 命令 \tn{marginnote} 可以生成简单的边注,如果只给定了 \meta{右文本},那么边注在奇偶数页文字相同。如果同时给定了 \meta{左文本},则偶数页使用 \meta{左文本} 的文字。 % \end{function} % -% \subsection{双语题注} -% \begin{function}[added = 2021-03-19]{\bicaption,\bicaptionbox} -% \begin{syntax} -% \tn{bicaption}\oarg{目录标题1}\marg{标题2}\oarg{目录标题1}\marg{标题2} -% \tn{bicaptionbox}\oarg{目录标题1}\marg{标题2}\oarg{目录标题1}\marg{标题2} -% \ \oarg{宽度}\oarg{内部位置}\marg{内容} -% \end{syntax} -% 可以实现图表浮动环境的中英文双语题注,使用此功能需要在导言区载入 \pkg{bicaption} 宏包,具体用法见说明文档。 -% \end{function} -% -% \subsection{插入文档} -% \begin{function}[added = 2021-03-14]{\includepdf} -% \begin{syntax} -% \tn{includepdf}\oarg{键值列表}\marg{文档名} -% \end{syntax} -% 该命令由 \pkg{pdfpages} 提供,将其他 pdf 文档插入当前文档,比如插入封面,可以指定插入页数、逻辑页和横向等,详情查看宏包文档。 -% \end{function} -% -% \subsection{指定行距的段落} -% \begin{function}[added = 2021-03-14]{spacing} -% \begin{syntax} -% \tn{begin}\{spacing\}\marg{浮点数} -% \ <段落内容> -% \tn{end}\{spacing\} -% \end{syntax} -% 该环境由 \pkg{setspace} 提供,可以指定环境内段落的行距,使用浮点数控制行距倍数。 -% \end{function} -% -% \subsection{下划线} -% \begin{function}[added = 2021-04-03]{\uline,\uuline,\uwave} -% \begin{syntax} -% \tn{uline}\marg{下划直线} -% \tn{uuline}\marg{下划双直线} -% \tn{uwave}\marg{下划波浪线} -% \end{syntax} -% \pkg{ulem} 宏包提供了多种下划线命令,下划线的粗细由命令 \tn{ULthickness} 控制,重新定义它需要使用 \tn{renewcommand} 命令。下划线的深度由 \tn{ULdepth} 控制,默认值 \tn{maxdimen} 是一个允许深度根据当前字体变化的特殊标志,当然也可以使用 \tn{setlength} 设定特定深度。 -% \end{function} -% +% \newcommand{\passto}[1]{\ttfamily[#1]} % \section{依赖的宏包} -% 以下为 \pkg{easybase} 直接调用的关键宏包,带有 \ding{75} 符号的宏包并未载入它们,仅做了预配置和兼容性处理,可根据需要在导言区手动载入以实现相关的功能。 +% 以下为 \pkg{easybase} 直接调用的关键宏包,方括号内为宏包已使用的选项。紫色的宏包表示截至当前在 \TeX~Live 2021 中存在更新,旧版本并不影响使用。带有 \ding{81} 符号的宏包并未载入它们,仅做了一些预配置,可在导言区手动载入以实现相关的功能。 % \begin{description}[font = \normalfont\sffamily] -% \item[ctex] 提供中文排版的通用框架。 -% \item[xcolor] 提供任意颜色的设定与混合,已载入了 \opt{svgnames} 颜色库。 % \item[amsmath] 提供 \LaTeX 中的数学功能。 -% \item[thmtools] 用于通常需要的排版定理支持。 -% \item[marginnote] 增强了边注输出的功能。 -% \item[spbmark] 定制上标和下标的格式。 -% \item[setspace] 提供对文档中行间距的支持。 +% \item[\color{violet}ctex\passto{heading}] 提供中文排版的通用框架。 % \item[chemformula] 提供了对化学式进行排版的命令。 -% \item[siunitx] 全面的国际标准单位支持。 -% \item[ulem] 提供可断行多样式的下划线命令。 +% \item[caption] 在浮动环境中自定义题注。 +% \item[enumitem\passto{shortlabels,inline}] 提供列表环境的布局控制。 +% \item[fancyhdr] 广泛控制页面的页眉和页脚。 +% \item[graphicx] 增强了对图形插入的支持。 % \item[geometry] 灵活完整的页面尺寸设置。 -% \item[pdfpages] 在 \LaTeX 中插入 pdf 文档。 +% \item[hyperref] 处理交叉引用命令以及在文档中生成超文本链接。 +% \item[listings] 可以在 \LaTeX 中排版程序/编程代码。 +% \item[marginnote] 增强了边注输出的功能。 % \item[multicol] 混合单栏和多栏排版。 -% \item[graphicx] 增强了对图形插入的支持。 -% \item[fancyhdr] 广泛控制页面的页眉和页脚。 +% \item[\color{violet}newtxmath\passto{upint}] 提供多种数学字体。 +% \item[pdfpages] 在 \LaTeX 中插入 pdf 文档。 +% \item[\color{violet}spbmark\passto{ctex}] 定制上标和下标的格式。 +% \item[\color{violet}siunitx] 全面的国际标准单位支持。 +% \item[setspace] 提供对文档中行间距的支持。 +% \item[\color{violet}tabularray] 完全分离表格的内容和样式,并且可以通过键值方式完全设置表格。 +% \item[thmtools] 用于通常需要的排版定理支持。 % \item[titletoc] 设置目录中的标题格式。 -% \item[caption] 在浮动环境中自定义题注。 -% \item[tabularray] 完全分离表格的内容和样式,并且可以通过键值方式完全设置表格。 -% \item[enumitem] 提供列表环境的布局控制。 -% \item[listings] 可以在 \LaTeX 中排版程序/编程代码。 -% \item[hyperref] 处理交叉引用命令以及在文档中生成超文本链接。 -% \item[\ding{75} tcolorbox] 为带有标题线的彩色和带框文本框提供了一个环境。 -% \item[\ding{75} imakeidx] 可以让文档同时生成和排版一个或多个索引。 -% \item[\ding{75} bicaption] 提供图表的双语题注。 -% \item[\ding{75} mathtools] 增强 \pkg{amsmath} 的数学功能。 -% \item[\ding{75} unicode-math] 处理使用 unicode 编码的数学字体。 +% \item[ulem\passto{normalem}] 提供可断行多样式的下划线命令。 +% \item[xcolor\passto{svgnames}] 提供任意颜色的设定与混合。 +% \item[\ding{81} bicaption\passto{list = off}] 提供图表的双语题注。 +% \item[\ding{81} imakeidx] 可以让文档同时生成和排版一个或多个索引。 +% \item[\ding{81} mathtools] 增强 \pkg{amsmath} 的数学功能。 +% \item[\color{violet}\ding{81} tcolorbox\passto{many}] 为带有标题线的彩色和带框文本框提供了一个环境。 +% \item[\ding{81} unicode-math] 处理使用 unicode 编码的数学字体。 % \end{description} % -% \newcommand\urlprefix{\newline\hspace*{\fill}} +% \newcommand{\urlprefix}{\newline\hspace*{\fill}} % \let\OldUrl\url -% \renewcommand\url[2][]{{\small\textit{#1}~\OldUrl{#2}}} +% \renewcommand{\url}[2][]{{\small\textit{#1}~\OldUrl{#2}}} % \begin{thebibliography}{99} % \bibitem{CTeX} % \textsc{CTEX.ORG}. @@ -1345,12 +1318,11 @@ %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/07/24}{1.27o} +\ProvidesExplClass{easybook}{2021/07/25}{1.27p} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool \bool_set_false:N \l__eb_title_newline_bool -\bool_set_true:N \l__eb_page_twoside_bool \bool_set_true:N \l__eb_class_book_bool \tl_new:N \g__eb_config_tl \tl_new:N \l__eb_font_choice_tl @@ -1375,26 +1347,13 @@ paper .value_required:n = true, paper/unknown .code:n = \PassOptionsToPackage{#1}{geometry}, - oneside .value_forbidden:n = true, - twoside .value_forbidden:n = true, - oneside .code:n = - { - \bool_set_false:N \l__eb_page_twoside_bool - \eb_put_ctexbook:n { oneside } - }, - twoside .code:n = - { - \bool_set_true:N \l__eb_page_twoside_bool - \eb_put_ctexbook:n { twoside } - }, - class .choice:, class .value_required:n = true, class/book .code:n = { }, class/article .code:n = { \bool_set_false:N \l__eb_class_book_bool - \keys_set:nn { easybook } { oneside } + \eb_put_ctexbook:n { oneside } }, book .meta:n = { class = book }, article .meta:n = { class = article }, @@ -1643,7 +1602,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/07/24}{1.27o} +\ProvidesExplPackage{easybase}{2021/07/25}{1.27p} {Typeset Chinese theses or books} \cs_generate_variant:Nn \int_to_arabic:n { v } @@ -1706,29 +1665,35 @@ \seq_set_split:Nnn \l_tmpa_seq { [ } {#1} \seq_pop_left:NN \l_tmpa_seq \l_tmpa_tl \seq_pop_right:NN \l_tmpa_seq \l_tmpb_tl - \eb_package_reload_check:nn { \l_tmpa_tl } + \IfFileExists{\l_tmpa_tl.sty} { - \IfFileExists{\l_tmpa_tl.sty} - { - \exp_last_unbraced:Nx \RequirePackage - { [\l_tmpb_tl }{\l_tmpa_tl} - }{} - } - } - { - \eb_package_reload_check:nn {#1} - { \IfFileExists{#1.sty}{\RequirePackage{#1}}{} } + \exp_last_unbraced:Nx \RequirePackage + { [\l_tmpb_tl }{\l_tmpa_tl} + }{} } + { \IfFileExists{#1.sty}{\RequirePackage{#1}}{} } } \cs_new_protected:Npn \eb_package_reload_check:nn #1#2 { \@ifpackageloaded{#1} - {\msg_warning:nnn { easybase } { package-reload } {#1}}{#2} + {\msg_warning:nnn { easybase } { package-reload } {#1}} + {#2\disable@package@load{#1}{}} } \msg_new:nnn { easybase } { package-reload } { - There~is~no~need~to~reload~the~#1~macro~package. \\ - Please~review~your~code. + The~macro~package~#1~has~been~reloaded. \\ + Please~pass~the~arguments~by \\ + the~\string\PassOptionsToPackage{\#1}{#1}\space~command. + } +\cs_set_eq:NN \eb@usepackage@save \usepackage +\RenewDocumentCommand{\usepackage}{O{}m} + { + \PassOptionsToPackage{#1}{#2} + \eb_clist_map_inline:nn {#2} + { + \eb_package_reload_check:nn {##1} + { \eb@usepackage@save{##1} } + } } \NewDocumentCommand{\LoadPackage}{O{}m} { @@ -1744,8 +1709,6 @@ \bool_if_exist:NF \l__eb_class_book_bool { \bool_set_true:N \l__eb_class_book_bool } -\bool_if_exist:NF \l__eb_page_twoside_bool - { \bool_set_true:N \l__eb_page_twoside_bool } \bool_if_exist:NF \l__eb_compile_draft_bool { \bool_set_false:N \l__eb_compile_draft_bool } \clist_new:N \g__eb_ctex_options_clist @@ -1768,7 +1731,8 @@ class/article .code:n = { \bool_set_false:N \l__eb_class_book_bool - \bool_set_false:N \l__eb_page_twoside_bool + \boolfalse{@twoside} + \boolfalse{@mparswitch} }, class .initial:n = book, book .meta:n = { class = book }, @@ -1934,14 +1898,18 @@ } } -\RenewDocumentCommand{\cleardoublepage}{O{empty}} +\cs_new_protected:Npn \blankpagestyle #1 + { \tl_set:Nn \l__eb_blank_pagestyle_tl {#1} } +\blankpagestyle{empty} +\RenewDocumentCommand{\cleardoublepage} + {O{\l__eb_blank_pagestyle_tl}} { \clearpage - \bool_if:NT \l__eb_page_twoside_bool + \ifbool{@twoside} { \int_if_odd:nF { \c@page } { \hbox:n { }\thispagestyle{#1}\clearpage } - } + }{} } \DeclareDocumentCommand{\frontmatter}{sO{Roman}} { @@ -1961,7 +1929,7 @@ \exp_args:Nc \NewDocumentCommand { eb@mark@#1@label@layout } {O{\use:c { CTEXthe#1 }}m} {\tl_set:cn { eb@mark@#1@label } {##1##2}} - \cs_new:cpn { eb_mark_#1_number_bool:n } ##1 + \cs_new:cpn { eb_mark_#1_name_bool:n } ##1 { \tl_if_in:nnTF {##1} { [ } { \use:c { eb@mark@#1@label@layout }##1 } @@ -1986,13 +1954,12 @@ head-foot .tl_set:N = \l__eb_fancyhf_content_tl, head-foot .initial:n = { - \bool_if:NTF \l__eb_page_twoside_bool + \ifbool{@twoside} { \easyhead[EC]{\color{ctex@frame}\kaishu\leftmark} \easyhead[OC]{\color{ctex@frame}\kaishu\rightmark} \easyhead[EL,OR]{\color{ctex@frame}\thepage} - } - { + }{ \easyhead[L]{\color{ctex@frame}\kaishu\leftmark} \easyhead[R]{\color{ctex@frame}\thepage} } @@ -2007,11 +1974,11 @@ subsec-mark .cs_set:Np = \eb_fancyhf_subsection_mark:n #1, subsec-mark .initial:n = { \CTEXifname{\eb@mark@subsection@label}{}#1 }, - chap-label .code:n = \eb_mark_chapter_number_bool:n {#1}, + chap-label .code:n = \eb_mark_chapter_name_bool:n {#1}, chap-label .initial:n = \hspace{1em}, - sec-label .code:n = \eb_mark_section_number_bool:n {#1}, + sec-label .code:n = \eb_mark_section_name_bool:n {#1}, sec-label .initial:n = \hspace{0.5em}, - subsec-label .code:n = \eb_mark_subsection_number_bool:n {#1}, + subsec-label .code:n = \eb_mark_subsection_name_bool:n {#1}, subsec-label .initial:n = \hspace{0.5em}, headrule .tl_gset:N = \headrule, @@ -2029,16 +1996,14 @@ { \bool_if:NTF \l__eb_mark_uppercase_bool { \eb_mark_uppercase:n } - { \eb_mark_nouppercase:n } { \use:c { eb_fancyhf_#1_mark:n } {#2} } + { \eb_mark_nouppercase:n } + { \use:c { eb_fancyhf_#1_mark:n } {#2} } } \cs_new:Npn \eb@level@markdouble #1#2 { \markboth {\eb_mark_uppercase_bool:nn {#1} {#2}} - { - \bool_if:NT \l__eb_page_twoside_bool - { \eb_mark_uppercase_bool:nn {#1} {#2} } - } + {\ifbool{@twoside}{\eb_mark_uppercase_bool:nn {#1} {#2}}{}} } \cs_new:Npn \eb@level@markright #1#2 { \markright{\eb_mark_uppercase_bool:nn {#1} {#2}} } @@ -2685,7 +2650,7 @@ \eb@level@section@mark{#1} } } -\cs_new_protected:Npn \eb_title_number_intoc_bool:nn #1#2 +\cs_new_protected:Npn \eb_title_number_intoc_spec:nn #1#2 { \IfBooleanTF{#1} { @@ -2698,14 +2663,14 @@ {\eb_title_mark_intoc:n { \eb@toc@title }} } } -\cs_new_protected:Npn \eb_biber_title_level_bool:n #1 +\cs_new_protected:Npn \eb_biber_title_level_spec:n #1 { \bool_if:NTF \l__eb_class_book_bool { \bichapter*{#1}{\l__eb_bib_en_bitoc_title_tl} } { \bisection*{#1}{\l__eb_bib_en_bitoc_title_tl} } \eb@level@section@mark{#1} } -\cs_new_protected:Npn \eb_toc_start_multicol_bool:n #1 +\cs_new_protected:Npn \eb_toc_start_multi_column_ext:n #1 { \bool_if:NTF \l__eb_toc_multi_column_bool { @@ -2720,11 +2685,11 @@ \group_begin: \tl_set_eq:Nc \eb@toc@title { list#4name } \IfValueT{#3}{\keys_set:nn { eb/listoc } {#3}} - \eb_title_number_intoc_bool:nn {#2} {#1} + \eb_title_number_intoc_spec:nn {#2} {#1} \dim_add:Nv \l__eb_toc_offset_dim { l__eb_toc_#4_offset_dim } \vspace*{\dim_use:N \l__eb_toc_offset_dim} - \eb_toc_start_multicol_bool:n {#5} + \eb_toc_start_multi_column_ext:n {#5} \group_end: } \clist_map_inline:nn @@ -2751,12 +2716,12 @@ \IfValueT{#2}{\keys_set:nn { eb/listoc } {#2}} \eb_title_mark_notoc:n { \eb@toc@title } \vspace*{\dim_use:N \l__eb_toc_offset_dim} - \eb_toc_start_multicol_bool:n { toc }#3 + \eb_toc_start_multi_column_ext:n { toc }#3 \IfBooleanT{#1} { \eb_title_mark_notoc:n { \eb@bitoc@title } \vspace*{\dim_use:N \l__eb_toc_offset_dim} - \eb_toc_start_multicol_bool:n { tec } + \eb_toc_start_multi_column_ext:n { tec } } \group_end: } @@ -2773,7 +2738,7 @@ \IfValueT{#3}{\keys_set:nn { eb/listoc } {#3}} \tl_set:Nn \imki@indexheaders { - \eb_title_number_intoc_bool:nn {#2} {#1} + \eb_title_number_intoc_spec:nn {#2} {#1} \cs_set_eq:NN \thispagestyle \use_none:n \cs_undefine:N \imki@firstpagestyle } @@ -3018,13 +2983,13 @@ \newlist{eb@exercise@list}{enumerate}{2} \newlist{eb@eqcomp@list}{description}{1} \setlist[eb@outline@list]{label = outline,itemsep = 0.5ex plus .1ex} -\setlist[eb@exercise@list]{labelsep = 0.5em} +\setlist[eb@exercise@list]{labelsep = 0.5em,nosep} \setlist[eb@eqcomp@list]{labelsep = 0em,nosep} \setlist[itemize,1]{label = bullet} \setlist[itemize,2]{label = endash} \setlist[itemize,3]{label = asterisk} \setlist[enumerate,1]{label = arabic,ref = \arabic*} -\setlist[enumerate,2]{label = alph,ref = enumii} +\setlist[enumerate,2]{label = alph,ref = enumii,labelwidth = *} \setlist[enumerate,3]{label = roman,ref = enumiii,labelwidth = *} \setlist[description]{font = sf,labelwidth = *,leftmargin = 2em} @@ -3303,10 +3268,9 @@ unknown .code:n = \eb_msg_unknown_option:n { bibset } } -\cs_new_protected:Npn \BibtexPreSet - { \PassOptionsToPackage{sort&compress}{natbib} } -\cs_new_protected:Npn \BibtexPostSet +\cs_new_protected:Npn \eb_natbib_bibtex_set: { + \LoadPackage[sort&compress]{natbib} \str_case:VnTF \l__eb_bib_all_style_tl { { numerical } @@ -3331,7 +3295,7 @@ \IfValueT{##3}{ \keys_set:nn { eb/listoc } {##3} } \tl_set:Nn \bibsection { - \eb_title_number_intoc_bool:nn {##2} {##1} + \eb_title_number_intoc_spec:nn {##2} {##1} \bool_if:NT \l__eb_toc_multi_column_bool { \begin{multicols}{\int_use:N \l__eb_toc_columns_int} } } @@ -3341,7 +3305,7 @@ } \cs_new_protected:Npn \eb_put_biblatex:n #1 { \PassOptionsToPackage{#1}{biblatex} } -\cs_new_protected:Npn \BiblatexPreSet +\cs_new_protected:Npn \eb_biblatex_biber_set: { \str_case:VnF \l__eb_bib_all_style_tl { @@ -3354,14 +3318,11 @@ { \eb_put_biblatex:n { style = \l__eb_bib_all_style_tl } } \tl_if_empty:NF \l__eb_bib_cite_style_tl { \eb_put_biblatex:n { citestyle = \l__eb_bib_cite_style_tl } } - \eb_put_biblatex:n { backend = biber } - } -\cs_new_protected:Npn \BiblatexPostSet - { + \LoadPackage[backend = biber]{biblatex} \clist_map_function:NN \l__eb_bib_datafile_clist \addbibresource \tl_gset:Nn \blx@default@theheading { bibintoc } \defbibheading{bibintoc}[\bibname] - {\eb_biber_title_level_bool:n {##1}} + {\eb_biber_title_level_spec:n {##1}} \skip_zero:N \bibitemsep } \eb_at_end_preamble:n @@ -3369,16 +3330,8 @@ \clist_if_empty:NF \l__eb_bib_datafile_clist { \bool_if:NTF \l__eb_backend_bibtex_bool - { - \BibtexPreSet - \LoadPackage{natbib} - \BibtexPostSet - } - { - \BiblatexPreSet - \LoadPackage{biblatex} - \BiblatexPostSet - } + { \eb_natbib_bibtex_set: } + { \eb_biblatex_biber_set: } } } @@ -3601,7 +3554,7 @@ } % %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/24}{1.27o} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/25}{1.27p} {Customization of tcolorbox for easybook} \cs_new_protected:Npn \eb_tcb_theorem_set:n #1 @@ -3639,9 +3592,8 @@ { blank,on~line,center, sharpish~corners, - fontupper = \Large\sffamily, - before~skip = 3.75ex plus.2ex minus .1ex, - after~skip = 3ex\tl_if_empty:NF \eb@tc@list@prologue { + 0.75ex } + fontupper = \Large\sffamily, + beforeafter~skip = 3.75ex plus .2ex minus .1ex } \tcbset { @@ -3696,7 +3648,7 @@ \NewDocumentEnvironment{exercise}{st+od()O{}+b} { \IfValueT{#3}{ \keys_set:nn { eb/exercise } {#3} } - \IfBooleanTF{#2} + \IfBooleanF{#2} { \eb@tc@exercise@box { @@ -3715,16 +3667,6 @@ } \eb@tc@exercise@title } - }{ - \group_begin: - \ctex_set:n { section/format += \centering } - \IfValueT{#4}{\ctex_set:nn { section } {#4}} - \IfBooleanTF{#1} - {\section*{\eb@tc@exercise@title}} - {\section{\eb@tc@exercise@title}} - \tl_set_eq:NN \theeb@exercise \thesection - \eb_exercise_label_noempty_use: - \group_end: } \tl_if_empty:NF \eb@tc@list@prologue { \eb@tc@list@prologue } \begin{eb@exercise@list}[\eb@tc@list@number,#5] diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf index 030fcea69d..000f2a5a9d 100644 Binary files a/macros/latex/contrib/easybook/easybook.pdf and b/macros/latex/contrib/easybook/easybook.pdf differ diff --git a/macros/latex/contrib/macrolist/README.md b/macros/latex/contrib/macrolist/README.md index 8eff3b4f96..ea16d986ea 100644 --- a/macros/latex/contrib/macrolist/README.md +++ b/macros/latex/contrib/macrolist/README.md @@ -1,4 +1,4 @@ -# The LaTeX package macrolist - version 1.1.1 (2021/07/23) +# The LaTeX package macrolist - version 1.2.0 (2021/07/23) > Copyright (C) 2021 Dennis Chen > diff --git a/macros/latex/contrib/macrolist/macrolist.dtx b/macros/latex/contrib/macrolist/macrolist.dtx index 3ccbc85edc..382faf2930 100644 --- a/macros/latex/contrib/macrolist/macrolist.dtx +++ b/macros/latex/contrib/macrolist/macrolist.dtx @@ -16,7 +16,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{macrolist}[2021/07/23 v1.1.1 Create lists of macros and perform operations on them] +\ProvidesPackage{macrolist}[2021/07/23 v1.2.0 Create lists of macros and perform operations on them] \RequirePackage{pgffor} % @@ -56,8 +56,7 @@ % \end{abstract} % % \section{Usage} -% -% The scope of lists is always global. This seems to provide the most +% The scope of lists is always global. This provides the most consistency and functionality for developers in places that are usually local (part of a group), such as environments and loops. % % \DescribeMacro{\newlist} % To create a list, pass in |\newlist{listname}| to create a list with the name \textsf{listname}. @@ -95,6 +94,50 @@ \csname macrolist@list@#1\the\numexpr #2\relax\endcsname% } % \fi +% \changes{v1.2.0}{2021/07/23}{Add listindexof and listcontains} +% \DescribeMacro{\listindexof} +% +% This works similar to \textsf{indexof} in almost any ordinary programming language. Write |\listindexof{list}{element}| to get the index of where \textsf{element} first appears in \textsf{list}. If it never does, then the macro will expand to \textsf{0}. +% +% The command uses |\ifx| instead of |\if|; this means that if you have |\macro| as an element with the definition \textsf{this is a macro} (assuming that \textsf{this is a macro} is not an element itself), then |\listindexof{listname}{this is a macro}| will expand to \textsf{0}. +% +% Because of the implementation of this macro, it can't actually be parsed as a number. (See the `Limitations' section for more information.) +% \iffalse +\newcommand{\listindexof}[2]{% + \def\macrolist@listindex{0}% + \macrolist@exists{#1}% + \def\macrolist@el{#2}% + \listforeach{#1}{\macrolist@listindexel}[\listsize{#1}][1]{% + \ifx\macrolist@el\macrolist@listindexel + \xdef\macrolist@listindex{\macrolist@index}% + \fi + }% + \macrolist@listindex% + \let\macrolist@listindex\relax% +} +% \fi +% +% \DescribeMacro{\listcontains} +% +% Writing |\listcontains{listname}{element}{true branch}{false branch}| checks whether list \textsf{listname} contains \textsf{element}, executing \textsf{true branch} if it does and \textsf{false branch} if it does not. +% +% \iffalse +\newcommand{\listcontains}[4]{% + \def\macrolist@listindex{0}% + \macrolist@exists{#1}% + \def\macrolist@el{#2}% + \listforeach{#1}{\macrolist@listindexel}[\listsize{#1}][1]{% + \ifx\macrolist@el\macrolist@listindexel + \xdef\macrolist@listindex{\macrolist@index}% + \fi + }% + \ifnum\macrolist@listindex>0\relax + #3% + \else + #4% + \fi +} +% \fi % % \DescribeMacro{\listadd} % @@ -299,6 +342,10 @@ %\end{document} % \end{verbatim} % +% \section{Limitations} +% +% The |\listindexof| macro cannot be parsed as a number. This is because we have to compare each element of the list to the passed in element and requires storing the index in a macro, which requires some unexpandable macros. (This is why we do not directly use |\listindexof| when defining |\listcontains|.) +% % \section{Implementation details} % % All internal macros are namespaced to prevent package conflicts. diff --git a/macros/latex/contrib/macrolist/macrolist.pdf b/macros/latex/contrib/macrolist/macrolist.pdf index 94986e435d..2ee450e2bc 100644 Binary files a/macros/latex/contrib/macrolist/macrolist.pdf and b/macros/latex/contrib/macrolist/macrolist.pdf differ diff --git a/macros/latex/contrib/media9/ChangeLog b/macros/latex/contrib/media9/ChangeLog index a9100127dc..69d95afb5e 100644 --- a/macros/latex/contrib/media9/ChangeLog +++ b/macros/latex/contrib/media9/ChangeLog @@ -1,3 +1,8 @@ +2021-07-25 + * v1.17 : media9.sty + * v0.48 : pdfbase.sty + * fix : improved xform generation with dvips + 2021-06-11 * v1.16 : media9.sty * v0.47 : pdfbase.sty diff --git a/macros/latex/contrib/media9/doc/media9.pdf b/macros/latex/contrib/media9/doc/media9.pdf index f33fdf28ac..a2c64debed 100644 Binary files a/macros/latex/contrib/media9/doc/media9.pdf and b/macros/latex/contrib/media9/doc/media9.pdf differ diff --git a/macros/latex/contrib/media9/media9.sty b/macros/latex/contrib/media9/media9.sty index ff12aefd37..6f670f770b 100644 --- a/macros/latex/contrib/media9/media9.sty +++ b/macros/latex/contrib/media9/media9.sty @@ -41,8 +41,8 @@ \RequirePackage{l3keys2e} -\def\g@mix@date@tl{2021/06/11} -\def\g@mix@version@tl{1.16} +\def\g@mix@date@tl{2021/07/25} +\def\g@mix@version@tl{1.17} \NeedsTeXFormat{LaTeX2e}[2020-10-01] \ProvidesExplPackage{media9}{\g@mix@date@tl}{\g@mix@version@tl} @@ -2409,8 +2409,8 @@ \RequirePackage{l3keys2e} -\def\g@mix@date@tl{2021/06/11} -\def\g@mix@version@tl{1.16} +\def\g@mix@date@tl{2021/07/25} +\def\g@mix@version@tl{1.17} \NeedsTeXFormat{LaTeX2e}[2020-10-01] \ProvidesExplPackage{media9}{\g@mix@date@tl}{\g@mix@version@tl} diff --git a/macros/latex/contrib/media9/pdfbase.sty b/macros/latex/contrib/media9/pdfbase.sty index eeab650bf6..fd21ee6c3b 100644 --- a/macros/latex/contrib/media9/pdfbase.sty +++ b/macros/latex/contrib/media9/pdfbase.sty @@ -84,7 +84,7 @@ % % \pbs_pdfxform:nnnnn % #1: add pgf/tikz resources (transparency, shading)? (1|0) %dvipdfmx/xetex -% #2: used as PDF annotation appearance? (1|0) %dvips/pdftex +% #2: (not used) % #3: additional resources %all BUT dvips % #4: additional dictionary entries % #5: savebox number @@ -158,8 +158,8 @@ \RequirePackage{l3keys2e} -\def\g@pbs@date@tl{2021/06/11} -\def\g@pbs@version@tl{0.47} +\def\g@pbs@date@tl{2021/07/25} +\def\g@pbs@version@tl{0.48} \NeedsTeXFormat{LaTeX2e}[2020-10-01] \ProvidesExplPackage{pdfbase}{\g@pbs@date@tl}{\g@pbs@version@tl} @@ -605,7 +605,7 @@ } } - \cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{ % #2 not used + \cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{ \group_begin: \hbox_set:Nn\l_tmpa_box{ \special{pdf:bxobj~@pbs@obj\int_use:N\g_pbs_obj_int\space @@ -1071,8 +1071,8 @@ output. } - \cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{ % #1, #3 not used (resources - \mode_leave_vertical: % are managed automatically) + \cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{% #1, #3 not used (resources + \mode_leave_vertical: % are managed automatically) %rescale box to fit within the papersize while distilling \tl_gset:cx{scale_{pbs@obj\int_use:N\g_pbs_obj_int}}{\fp_eval:n{min(1.0, \dim_ratio:nn{\paperwidth}{\box_wd:N#5}, @@ -1083,23 +1083,13 @@ }{ \tl_use:c{scale_{pbs@obj\int_use:N\g_pbs_obj_int}} } - \group_begin: - %mark bbox of box#5 - \hbox_set:Nn\l_tmpa_box{ - % lower left - \box_move_down:nn{\box_dp:N#5}{\hbox_to_zero:n{\pbs_special:n{ - currentpoint~/pbs@lly~exch~def~/pbs@llx~exch~def - }}} - \skip_horizontal:n{\box_wd:N#5} - % upper right - \box_move_up:nn{\box_ht:N#5}{\hbox_to_zero:n{\pbs_special:n{ - currentpoint~/pbs@ury~exch~def~/pbs@urx~exch~def - }}} - } - \box_set_wd:Nn\l_tmpa_box{\c_zero_dim} - \box_set_ht:Nn\l_tmpa_box{\c_zero_dim} - \box_set_dp:Nn\l_tmpa_box{\c_zero_dim}\box_use_drop:N\l_tmpa_box - \group_end: + %store dimensions (in "dots" units) + \tl_set:Nx\l_pbs_width_tl{ + \dim_to_decimal:n{\box_wd:N#5}~72.27~div~Resolution~mul~} + \tl_set:Nx\l_pbs_height_tl{ + \dim_to_decimal:n{\box_ht:N#5}~72.27~div~VResolution~mul~} + \tl_set:Nx\l_pbs_depth_tl{ + \dim_to_decimal:n{\box_dp:N#5}~72.27~div~VResolution~mul~} %additional dict entries \tl_set:Nx\l_tmpa_tl{#4} \tl_trim_spaces:N\l_tmpa_tl \pbs_special:n{ @@ -1109,61 +1099,58 @@ %clipbox (i. e. page area) available for distilling; outlying parts %get clipped { - clippath~pathbbox~newpath~pop~pop~translate~ - pbs@llx~neg~pbs@ury~neg~translate + clippath~pathbbox~newpath~pop~pop~ + isls { + landplus90 { + % pkg geometry with landscape option + exch~pbs@curx~sub~\l_pbs_height_tl~add~ + exch~pbs@cury~sub + }{ + % landscape as class option + exch~pbs@curx~sub~\l_pbs_depth_tl~add~ + exch~pbs@cury~sub~\l_pbs_width_tl~add + } ifelse + }{ + % portrait + exch~pbs@curx~sub~ + exch~pbs@cury~sub~\l_pbs_depth_tl~add + } ifelse~translate }?pdfmark~ %move origin (0,0) to the current position gsave~pbs@curx~pbs@cury~translate~ - %distillation-bbox left and top coords - clippath~pathbbox~newpath~pop~pop~/pbs@bbox@top~exch~def~ - /pbs@bbox@left~exch~def~ %distill graphics to XObject mark~ /_objdef~{pbs@obj\int_use:N\g_pbs_obj_int}~ /BBox~[ - pbs@bbox@left~pbs@bbox@top~pbs@bbox@left~pbs@urx~ - pbs@llx~sub~add~pbs@bbox@top~pbs@lly~pbs@ury~sub~add - ]~ + isls { + landplus90 { + % geometry with landscape + \l_pbs_height_tl~neg~\l_pbs_width_tl~\l_pbs_depth_tl~0 + }{ + % landscape as class option + \l_pbs_depth_tl~neg~0~\l_pbs_height_tl~\l_pbs_width_tl~neg + } ifelse + }{ + % portrait + 0~\l_pbs_height_tl~\l_pbs_width_tl~\l_pbs_depth_tl~neg + } ifelse + ] %insert additional dict entries (the Distiller way) \str_if_eq:eeF{\l_tmpa_tl}{}{ product~(Distiller)~search~{pop~pop~pop~\l_tmpa_tl}{pop}ifelse~ } /BP~pdfmark~grestore~ - \int_compare:nT{#2>\c_zero_int}{ - %operations needed if used as annotation appearance - { - % landscape mode (as class option, powerdot, - % geometry or typearea /w pkg option) - isls{ - /pbs@dxdy~{ - pbs@urx~pbs@llx~sub~abs~pbs@ury~pbs@lly~sub~abs~div - }~bind~def~ - /pbs@dydx~{1~pbs@dxdy~div}~bind~def~ - /pbs@cx~{pbs@urx~pbs@llx~add~2~div}~bind~def~ - /pbs@cy~{pbs@ury~pbs@lly~add~2~div}~bind~def~ - % graphics needs to be rescaled for some reason ... - [pbs@dxdy~0~0~pbs@dydx~1~pbs@dxdy~sub~pbs@cx~mul~ - 1~pbs@dydx~sub~pbs@cy~mul]~concat~ - %... rotated by 270 degrees ... - [0~-1~1~0~pbs@cx~pbs@cy~sub~pbs@cx~pbs@cy~add]~concat~ - landplus90{ - %... and flipped around vertical axis (geometry, powerdot) - [-1~0~0~1~pbs@llx~pbs@urx~add~0]~concat - }{ - %... and flipped around horizontal axis (other) - [1~0~0~-1~0~pbs@lly~pbs@ury~add]~concat - }ifelse - }{ - % flip around horizontal axis in portrait mode - [1~0~0~-1~0~pbs@lly~pbs@ury~add]~concat - }ifelse - }?pdfmark - } + % content transformations required for appearances + { + pbs@curx~pbs@cury~2~copy~translate~1~-1~scale~ + isls {90~landplus90 {neg} if~rotate} if~ + neg~exch~neg~exch~translate + }?pdfmark } \box_set_wd:Nn#5{\c_zero_dim} \box_set_ht:Nn#5{\c_zero_dim} \box_set_dp:Nn#5{\c_zero_dim}\box_use_drop:N#5 - \pbs_special:n{~mark~/EP~pdfmark~grestore} + \pbs_special:n{mark~/EP~pdfmark~grestore} %insert additional dict entries (the Ghostscript way) \str_if_eq:eeF{\l_tmpa_tl}{}{ \pbs_special:n{ @@ -1200,7 +1187,10 @@ } } \pbs_special:n{ - gsave~currentpoint~translate~1~\tl_use:c{scale_#1}~div~dup~scale~ + gsave~currentpoint~translate~ + % undo appearance-related content transformations + isls {90~landplus90~not {neg} if~rotate} if~ + 1~\tl_use:c{scale_#1}~div~dup~neg~scale~ mark~#1~/SP~pdfmark~grestore } } @@ -1518,8 +1508,8 @@ \RequirePackage{l3keys2e} -\def\g@pbs@date@tl{2021/06/11} -\def\g@pbs@version@tl{0.47} +\def\g@pbs@date@tl{2021/07/25} +\def\g@pbs@version@tl{0.48} \NeedsTeXFormat{LaTeX2e}[2020-10-01] \ProvidesExplPackage{pdfbase}{\g@pbs@date@tl}{\g@pbs@version@tl} @@ -2381,8 +2371,8 @@ output. } - \cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{ % #1, #3 not used (resources - \mode_leave_vertical: % are managed automatically) + \cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{% #1, #3 not used (resources + \mode_leave_vertical: % are managed automatically) %rescale box to fit within the papersize while distilling \tl_gset:cx{scale_{pbs@obj\int_use:N\g_pbs_obj_int}}{\fp_eval:n{min(1.0, \dim_ratio:nn{\paperwidth}{\box_wd:N#5}, @@ -2393,23 +2383,13 @@ }{ \tl_use:c{scale_{pbs@obj\int_use:N\g_pbs_obj_int}} } - \group_begin: - %mark bbox of box#5 - \hbox_set:Nn\l_tmpa_box{ - % lower left - \box_move_down:nn{\box_dp:N#5}{\hbox_to_zero:n{\pbs_special:n{ - currentpoint~/pbs@lly~exch~def~/pbs@llx~exch~def - }}} - \skip_horizontal:n{\box_wd:N#5} - % upper right - \box_move_up:nn{\box_ht:N#5}{\hbox_to_zero:n{\pbs_special:n{ - currentpoint~/pbs@ury~exch~def~/pbs@urx~exch~def - }}} - } - \box_set_wd:Nn\l_tmpa_box{\c_zero_dim} - \box_set_ht:Nn\l_tmpa_box{\c_zero_dim} - \box_set_dp:Nn\l_tmpa_box{\c_zero_dim}\box_use_drop:N\l_tmpa_box - \group_end: + %store dimensions (in "dots" units) + \tl_set:Nx\l_pbs_width_tl{ + \dim_to_decimal:n{\box_wd:N#5}~72.27~div~Resolution~mul~} + \tl_set:Nx\l_pbs_height_tl{ + \dim_to_decimal:n{\box_ht:N#5}~72.27~div~VResolution~mul~} + \tl_set:Nx\l_pbs_depth_tl{ + \dim_to_decimal:n{\box_dp:N#5}~72.27~div~VResolution~mul~} %additional dict entries \tl_set:Nx\l_tmpa_tl{#4} \tl_trim_spaces:N\l_tmpa_tl \pbs_special:n{ @@ -2419,61 +2399,58 @@ %clipbox (i. e. page area) available for distilling; outlying parts %get clipped { - clippath~pathbbox~newpath~pop~pop~translate~ - pbs@llx~neg~pbs@ury~neg~translate + clippath~pathbbox~newpath~pop~pop~ + isls { + landplus90 { + % pkg geometry with landscape option + exch~pbs@curx~sub~\l_pbs_height_tl~add~ + exch~pbs@cury~sub + }{ + % landscape as class option + exch~pbs@curx~sub~\l_pbs_depth_tl~add~ + exch~pbs@cury~sub~\l_pbs_width_tl~add + } ifelse + }{ + % portrait + exch~pbs@curx~sub~ + exch~pbs@cury~sub~\l_pbs_depth_tl~add + } ifelse~translate }?pdfmark~ %move origin (0,0) to the current position gsave~pbs@curx~pbs@cury~translate~ - %distillation-bbox left and top coords - clippath~pathbbox~newpath~pop~pop~/pbs@bbox@top~exch~def~ - /pbs@bbox@left~exch~def~ %distill graphics to XObject mark~ /_objdef~{pbs@obj\int_use:N\g_pbs_obj_int}~ /BBox~[ - pbs@bbox@left~pbs@bbox@top~pbs@bbox@left~pbs@urx~ - pbs@llx~sub~add~pbs@bbox@top~pbs@lly~pbs@ury~sub~add - ]~ + isls { + landplus90 { + % geometry with landscape + \l_pbs_height_tl~neg~\l_pbs_width_tl~\l_pbs_depth_tl~0 + }{ + % landscape as class option + \l_pbs_depth_tl~neg~0~\l_pbs_height_tl~\l_pbs_width_tl~neg + } ifelse + }{ + % portrait + 0~\l_pbs_height_tl~\l_pbs_width_tl~\l_pbs_depth_tl~neg + } ifelse + ] %insert additional dict entries (the Distiller way) \str_if_eq:eeF{\l_tmpa_tl}{}{ product~(Distiller)~search~{pop~pop~pop~\l_tmpa_tl}{pop}ifelse~ } /BP~pdfmark~grestore~ - \int_compare:nT{#2>\c_zero_int}{ - %operations needed if used as annotation appearance - { - % landscape mode (as class option, powerdot, - % geometry or typearea /w pkg option) - isls{ - /pbs@dxdy~{ - pbs@urx~pbs@llx~sub~abs~pbs@ury~pbs@lly~sub~abs~div - }~bind~def~ - /pbs@dydx~{1~pbs@dxdy~div}~bind~def~ - /pbs@cx~{pbs@urx~pbs@llx~add~2~div}~bind~def~ - /pbs@cy~{pbs@ury~pbs@lly~add~2~div}~bind~def~ - % graphics needs to be rescaled for some reason ... - [pbs@dxdy~0~0~pbs@dydx~1~pbs@dxdy~sub~pbs@cx~mul~ - 1~pbs@dydx~sub~pbs@cy~mul]~concat~ - %... rotated by 270 degrees ... - [0~-1~1~0~pbs@cx~pbs@cy~sub~pbs@cx~pbs@cy~add]~concat~ - landplus90{ - %... and flipped around vertical axis (geometry, powerdot) - [-1~0~0~1~pbs@llx~pbs@urx~add~0]~concat - }{ - %... and flipped around horizontal axis (other) - [1~0~0~-1~0~pbs@lly~pbs@ury~add]~concat - }ifelse - }{ - % flip around horizontal axis in portrait mode - [1~0~0~-1~0~pbs@lly~pbs@ury~add]~concat - }ifelse - }?pdfmark - } + % content transformations required for appearances + { + pbs@curx~pbs@cury~2~copy~translate~1~-1~scale~ + isls {90~landplus90 {neg} if~rotate} if~ + neg~exch~neg~exch~translate + }?pdfmark } \box_set_wd:Nn#5{\c_zero_dim} \box_set_ht:Nn#5{\c_zero_dim} \box_set_dp:Nn#5{\c_zero_dim}\box_use_drop:N#5 - \pbs_special:n{~mark~/EP~pdfmark~grestore} + \pbs_special:n{mark~/EP~pdfmark~grestore} %insert additional dict entries (the Ghostscript way) \str_if_eq:eeF{\l_tmpa_tl}{}{ \pbs_special:n{ @@ -2510,7 +2487,10 @@ } } \pbs_special:n{ - gsave~currentpoint~translate~1~\tl_use:c{scale_#1}~div~dup~scale~ + gsave~currentpoint~translate~ + % undo appearance-related content transformations + isls {90~landplus90~not {neg} if~rotate} if~ + 1~\tl_use:c{scale_#1}~div~dup~neg~scale~ mark~#1~/SP~pdfmark~grestore } } diff --git a/macros/latex/contrib/semantex/semantex.pdf b/macros/latex/contrib/semantex/semantex.pdf index 8b74a38e7a..9724b2643c 100644 Binary files a/macros/latex/contrib/semantex/semantex.pdf and b/macros/latex/contrib/semantex/semantex.pdf differ diff --git a/macros/latex/contrib/semantex/semantex.sty b/macros/latex/contrib/semantex/semantex.sty index 125979e55a..d9f313cc56 100644 --- a/macros/latex/contrib/semantex/semantex.sty +++ b/macros/latex/contrib/semantex/semantex.sty @@ -1,5 +1,5 @@ \RequirePackage{xparse,l3keys2e,leftindex,semtex} -\ProvidesExplPackage{semantex}{2021/07/24}{0.510}{} +\ProvidesExplPackage{semantex}{2021/07/25}{0.511}{} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % @@ -1436,7 +1436,7 @@ \semantex_valuekey:nnn { \semantex_object_to_register:N #1 } { degree~default } { #2 } } -\cs_new_protected:Npn\semantex_class_use_bullet:N#1 +\cs_new_protected:Npn\semantex_object_associated_to_class_use_bullet:N#1 { \semantex_singlekey:nn { \semantex_class_to_associated_object_register:N #1 } { * } } @@ -1446,7 +1446,7 @@ \semantex_singlekey:nn { \semantex_object_to_register:N #1 } { * } } -\cs_new_protected:Npn\semantex_class_use_double_bullet:N#1 +\cs_new_protected:Npn\semantex_object_associated_to_class_use_double_bullet:N#1 { \semantex_singlekey:nn { \semantex_class_to_associated_object_register:N #1 } { * } } diff --git a/macros/latex/contrib/semantex/semantex.tex b/macros/latex/contrib/semantex/semantex.tex index 2e212609ea..681a51b1b8 100644 --- a/macros/latex/contrib/semantex/semantex.tex +++ b/macros/latex/contrib/semantex/semantex.tex @@ -42,7 +42,7 @@ \usepackage[nameinlink]{cleveref} -\title{Seman\!\TeX: semantic, keyval-based mathematics (v0.510)} +\title{Seman\!\TeX: semantic, keyval-based mathematics (v0.511)} \date{\today} \author{Sebastian Ørsted (\href{mailto:sorsted@gmail.com}{sorsted@gmail.com})} diff --git a/macros/latex/contrib/semantex/stripsemantex.sty b/macros/latex/contrib/semantex/stripsemantex.sty index 7d434805eb..eaa7ea9a82 100644 --- a/macros/latex/contrib/semantex/stripsemantex.sty +++ b/macros/latex/contrib/semantex/stripsemantex.sty @@ -1,5 +1,5 @@ \RequirePackage{xparse} -\ProvidesExplPackage{stripsemantex}{2021/07/24}{0.510}{} +\ProvidesExplPackage{stripsemantex}{2021/07/25}{0.511}{} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % -- cgit v1.2.3