From fcabaaa4d96d05af090f9a0eaa43bf5f0a8c1be2 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 26 Nov 2021 03:00:58 +0000 Subject: CTAN sync 202111260300 --- macros/latex/contrib/easybook/easybook.dtx | 40 ++++---- macros/latex/contrib/easybook/easybook.pdf | Bin 582438 -> 582859 bytes macros/latex/contrib/easybook/easybook.tex | 12 ++- macros/latex/contrib/snaptodo/README | 22 ++--- macros/latex/contrib/snaptodo/snaptodo.pdf | Bin 207510 -> 208140 bytes macros/latex/contrib/snaptodo/snaptodo.sty | 32 ++++--- macros/latex/contrib/snaptodo/snaptodo.tex | 102 +++++++++++---------- .../latex/contrib/snaptodo/test/before_after.tex | 6 +- .../latex/contrib/snaptodo/test/circle_testing.tex | 10 +- .../contrib/snaptodo/test/minimal_testing.tex | 2 +- .../latex/contrib/snaptodo/test/stress_testing.tex | 2 +- 11 files changed, 117 insertions(+), 111 deletions(-) (limited to 'macros') diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index 633dde041c..1dc68e17ad 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -15,7 +15,7 @@ %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/11/24}{1.40X} +\ProvidesExplClass{easybook}{2021/11/25}{1.40Z} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -325,7 +325,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/11/24}{1.40X} +\ProvidesExplPackage{easybase}{2021/11/25}{1.40Z} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -1388,7 +1388,7 @@ { \eb@if@boolT\eb@titletoc@hang@fix@bool{\p@numberline} \bgroup - \eb@toc@label@lstlisting{} + \eb@toc@label@lstlisting{\thelstlisting} \egroup \lst@@caption } @@ -1697,16 +1697,19 @@ \ctex_define:nn { subfont } { - caption-table .tl_set:N = \l__eb_subfont_table_tl, - caption-table .initial:n = \sffamily\small, - caption-figure .tl_set:N = \l__eb_subfont_figure_tl, - caption-figure .initial:n = \sffamily\small, - caption-listing .tl_set:N = \l__eb_subfont_listing_tl, - caption-listing .initial:n = \sffamily\small, - footnote .tl_set:N = \l__eb_subfont_footnote_tl, - footnote .initial:n = \rmfamily, - marginpar .tl_set:N = \marginfont, - marginpar .initial:n = \rmfamily\footnotesize, + caption-table .tl_set:N = \l__eb_subfont_table_tl, + caption-figure .tl_set:N = \l__eb_subfont_figure_tl, + caption-listing .tl_set:N = \l__eb_subfont_listing_tl, + caption .meta:n = + { + caption-table = #1,caption-figure = #1, + caption-listing = #1 + }, + caption .initial:n = \sffamily\small, + footnote .tl_set:N = \l__eb_subfont_footnote_tl, + footnote .initial:n = \rmfamily, + marginpar .tl_set:N = \marginfont, + marginpar .initial:n = \rmfamily\footnotesize, unknown .code:n = \eb_msg_unknown_option:n { subfont } } @@ -1760,13 +1763,10 @@ \captionsetup[figure][bi-second]{name = Figure} \captionsetup[table][bi-second]{name = Table} } -\IfPackageAtLeastTF{tabularray}{2021/07/01} - { - \UseTblrLibrary{booktabs} - \SetTblrInner{stretch = \fp_use:N \l__eb_spread_table_fp} - }{} -\eb_at_begin_environment:nn { tabular,tabularx } +\eb_at_begin_environment:nn + { tabular,tabularx,tblr,longtblr,longtable } { \setspread{\fp_use:N \l__eb_spread_table_fp} } +\IfPackageAtLeastTF{tabularray}{2021/07/01}{\UseTblrLibrary{booktabs}}{} \bool_if:NF \l__eb_float_page_bool { @@ -2380,7 +2380,7 @@ } % %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/11/24}{1.40X} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/11/25}{1.40Z} {Customization of tcolorbox for easybook} \cs_set_protected:Npn \setexercise #1 diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf index befe08edfb..99dee24a1b 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/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex index 7c9e48b3a8..ecf0c7bc94 100644 --- a/macros/latex/contrib/easybook/easybook.tex +++ b/macros/latex/contrib/easybook/easybook.tex @@ -20,8 +20,8 @@ name = easybook, color-scheme = blue, title = EASYBOOK 使用手册, - version = v1.40X, - date = 2021/11/24, + version = v1.40Z, + date = 2021/11/25, authors = 瞿毅, info = 排版简体中文学位论文和书籍, email = q1jx@foxmail.com, @@ -489,7 +489,7 @@ \keyval-{line}{数值}\Module{spread}\Default{1.354} 正文行距因子,C\TeX 原有的行距选项 \option*{linespread} 失效。 \keyval-{table}{数值}\Default{1.354} - 表格行距因子,对传统表格环境 \env*{tabular}、\env*{tabularx} 以及 \pkg*{tabularray} 宏包的 \env{tblr} 环境生效,同时 \env{tblr} 也自带有 \option*{stretch} 选项设置行距。 + 表格行距因子,对传统表格 \env*{tabular} 和 \env*{tabularx} 等环境以及 \pkg*{tabularray} 宏包的 \env{tblr} 环境生效,同时 \env{tblr} 也自带有 \option*{stretch} 选项设置行距系数。 \keyval-{math}{数值}\Default{1.2} 数学环境的行距因子,包含了 \pkg*{amsmath} 和 \pkg*{mathtools} 宏包提供的公式环境。 \keyval-{caption}{数值}\Default{1.2} @@ -513,6 +513,8 @@ 图片标题的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。 \keyval-{caption-listing}{字体命令}\Default{\cs*{sffamily}\cs*{small}} 代码标题的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。 + \keyval-{caption}{字体命令}\Default{\cs*{sffamily}\cs*{small}} + 同时设置图片、表格和代码题注的字体命令。 \keyval-{footnote}{字体命令}\Default{\cs*{rmfamily}} 设置脚注标记与内容的字体,包括字体族、字体系列、字体尺寸和字体形状命令。 \keyval-{marginpar}{字体命令}\Default{\cs*{rmfamily}\cs*{footnotesize}} @@ -786,12 +788,12 @@ \keyval-{tocafter}{距离命令}\Default{\cs*{hspace}\Carg{1em}} 在各级别目录中标签与标题间的代码,默认为插入 \code{1em} 横向距离。 \keyval-{tocline}{目录标签} - 这个选项扩展了图片、表格或代码的目录标签。图片或表格的选项中参数 \code{\#1} 代表编号,代码中 \cs*{thelstlisting} 代表编号。选项还可包含标签名称,默认标签名称与对应题注名称一致。 + 这个选项扩展了图片、表格或代码的目录标签。选项中参数 \code{\#1} 代表相应题注编号 \cs*{the}\meta{计数器} 的值。选项还可包含标签名称,默认标签名称与对应题注名称一致。 \begin{ctexexam} \ctexset { figure/tocline = 图 #1\hspace{1em}, - lstlisting/tocline = 代码\thelstlisting\hspace{1em} + lstlisting/tocline = 代码 #1\hspace{1em} } \end{ctexexam} \end{options} diff --git a/macros/latex/contrib/snaptodo/README b/macros/latex/contrib/snaptodo/README index 8d990a8be3..37da2cd92f 100644 --- a/macros/latex/contrib/snaptodo/README +++ b/macros/latex/contrib/snaptodo/README @@ -5,18 +5,18 @@ https://github.com/Symbol1/snaptodo Hsin-Po Wang mailto:a.simple.people@gmail.com -https://github.com/Symbol1/snaptodo +https://www.symbol.codes -This is snaptodo, -an alternative to todonote -that differs in the following ways +This is snaptodo package, +an alternative to todonote package, +from which it differs in the following ways: -* Depending on where you call `\todo`, - the note is on the left or right margin, +* Depending on where you call `\snaptodo`, + the note is put on the left or right margin, whichever is closer. -* The notes bump each other - so they never overlap; - the lines never overlap either -* Aesthetic and customizable style. +* The notes bump each other down so they never overlap; + the lines never overlap either. +* Minimalistic, aesthetic and customizable style. -License = https://www.latex-project.org/lppl/lppl-1-3c/ +License +https://www.latex-project.org/lppl/lppl-1-3c/ diff --git a/macros/latex/contrib/snaptodo/snaptodo.pdf b/macros/latex/contrib/snaptodo/snaptodo.pdf index 7115795b1b..cd719dd451 100644 Binary files a/macros/latex/contrib/snaptodo/snaptodo.pdf and b/macros/latex/contrib/snaptodo/snaptodo.pdf differ diff --git a/macros/latex/contrib/snaptodo/snaptodo.sty b/macros/latex/contrib/snaptodo/snaptodo.sty index 13bc847374..489cd22888 100644 --- a/macros/latex/contrib/snaptodo/snaptodo.sty +++ b/macros/latex/contrib/snaptodo/snaptodo.sty @@ -1,43 +1,45 @@ % # snaptodo % +% https://github.com/Symbol1/snaptodo +% % Hsin-Po Wang % mailto:a.simple.people@gmail.com % https://www.symbol.codes % % This is snaptodo.sty, -% an alternative to todonote.sty -% that differs in the following ways +% an alternative to todonote.sty, +% from which it differs in the following ways: % -% * Depending on where you call `\todo`, -% the note is on the left or right margin, +% * Depending on where you call `\snaptodo`, +% the note is put on the left or right margin, % whichever is closer. -% * The notes bump each other -% so they never overlap; -% the lines never overlap either -% * Aesthetic and customizable style. +% * The notes bump each other so they never overlap; +% the lines never overlap either. +% * Minimalistic, aesthetic and customizable style. % -% License = https://www.latex-project.org/lppl/lppl-1-3c/ +% License +% https://www.latex-project.org/lppl/lppl-1-3c/ \NeedsTeXFormat{LaTeX2e}[2021/06/01] -\ProvidesPackage{snaptodo}[2021/11/22] +\ProvidesPackage{snaptodo}[2021/11/25] \RequirePackage{tikzpagenodes}[2012/09/16] -\ifx\todo\snaptodo@undefined +\ifx\snaptodo\snaptodo@undefined \else \PackageWarning{snaptodo}{% - Control sequence \protect\todo\space was defined.\MessageBreak + Control sequence \protect\snaptodo\space was defined.\MessageBreak I am going to override it anyways. } \fi -\def\todo{% +\def\snaptodo{% \snaptodo@initialize - \global\let\todo\snaptodo@main - \todo + \global\let\snaptodo\snaptodo@main + \snaptodo } \def\snaptodo@initialize{% diff --git a/macros/latex/contrib/snaptodo/snaptodo.tex b/macros/latex/contrib/snaptodo/snaptodo.tex index 65a3d7d3a6..07f091561a 100644 --- a/macros/latex/contrib/snaptodo/snaptodo.tex +++ b/macros/latex/contrib/snaptodo/snaptodo.tex @@ -1,36 +1,38 @@ \documentclass{article} -\def\todo{} +\def\snaptodo{} \usepackage{snaptodo} \usepackage[pdfusetitle,urlbordercolor=red!50!black]{hyperref} \begin{document} -\title{Snaptodo---A Snap-to-the-Correct-Side Todo\thanks{ +\title{Snaptodo---A todo that snaps to the closer side\thanks{ Repository \url{https://github.com/Symbol1/snaptodo}. }} \author{Hsin-Po Wang\thanks{ Email - \href{mailto:a.simple.people@gmail.com}{\ttfamily a.simple.people@gmail.com}. + \href{mailto:a.simple.people@gmail.com} + {\ttfamily a.simple.people@gmail.com}. Website \url{https://www.symbol.codes}.}} +\date{November 25, 2021} + \maketitle \begin{abstract} - Snaptodo package is an alternative to the todonote package - that differs in the following ways: + Snaptodo package is an alternative to todonote package, + from which it differs in the following ways: (A) Depending on where you call - {\ttfamily\color{red!50!black}\string\todo}, + {\ttfamily\color{red!50!black}\string\snaptodo}, the note is put on the left or right margin, whichever is closer. (B) The notes bump each other down so they never overlap; the lines never overlap either; - and they don't trigger the marginpar warning. (C) Minimalistic, aesthetic, and customizable style. \end{abstract} @@ -48,26 +50,26 @@ \usepackage{snaptodo} \begin{document} Your done - \todo{Your todo} + \snaptodo{Your todo} \end{document} \end{verbatim} \section{Showcase of Examples} Using snaptodo is as simple as calling - {\ttfamily\verb|\todo|}% - \todo{Calling \texttt{\string\todo}!} + {\ttfamily\verb|\snaptodo|}% + \snaptodo{Calling \texttt{\string\snaptodo}!} and compile twice.% - \todo{Compile twice!} + \snaptodo{Compile twice!} If the calling point% - \todo{Calling point!} + \snaptodo{Calling point!} is on the left of a page,% - \todo{Left of a page!} + \snaptodo{Left of a page!} the todo note---after compiling twice of course---will appear to the left margin.% - \todo{On the left margin!} + \snaptodo{On the left margin!} And vice versa.% - \todo{Vice versa!} + \snaptodo{Vice versa!} \section{Customization} @@ -81,7 +83,7 @@ you can also assess the exact same options by {\ttfamily\verb|\pgfkeys{/snaptodo/}|}. For local changes, you can put them here - {\ttfamily\verb|\todo[]{}|}. + {\ttfamily\verb|\snaptodo[]{}|}. \subsection{Color} @@ -92,9 +94,9 @@ Saying {\ttfamily\verb|\colorlet{snaptodo@chain}{green!50!white}|} lets you to change this color globally. On the other hand, - for locally changing this color, one may prefer using - {\ttfamily\verb|\todo[call chain/.style=green!50!white]|}.% - \todo[call chain/.style=green!50!white]{New broken line color} + for locally changing this color, one may prefer + {\ttfamily\verb|\snaptodo[call chain/.style=green!50!white]{}|}.% + \snaptodo[call chain/.style=green!50!white]{New broken line color} The color of the note text is {\ttfamily\verb|snaptodo@block|}. @@ -103,9 +105,9 @@ Saying {\ttfamily\verb|\colorlet{snaptodo@block}{blue!50!white}|} lets you change this color. On the other hand, - for locally changing this color, one may prefer using - {\ttfamily\verb|\todo[margin block/.style=blue!50!white]|}.% - \todo[margin block/.style=blue!50!white]{New note text color} + for locally changing this color, one may prefer + {\ttfamily\verb|\snaptodo[margin block/.style=blue!50!white]{}|}.% + \snaptodo[margin block/.style=blue!50!white]{New note text color} \subsection{Line style} @@ -115,9 +117,9 @@ {\ttfamily\verb|[ultra thin]|}, or {\ttfamily\verb|[line width=???]|}. - In our case, simply put that option in the proper style - {\ttfamily\verb|\todo[call chain/.style={line width=???}]{}|}.% - \todo[call chain/.style={line width=2pt}]{Thicker broken line} + In our case, simply put that option in this style + \snaptodo[call chain/.style={line width=2pt}]{Thicker broken line}% + {\ttfamily\verb|\snaptodo[call chain/.style={line width=???}]{}|}. In order to use a special dash pattern, recall the standard Ti\emph kZ option @@ -125,9 +127,9 @@ {\ttfamily\verb|[dashed]|}, or {\ttfamily\verb|[dash pattern=???]|}. - In our case, simply put that option in the proper style - {\ttfamily\verb|\todo[call chain/.style={dash pattern=???}]{}|}.% - \todo[call chain/.style={dashed}]{Dashed broken line} + In our case, simply put that option in this style + \snaptodo[call chain/.style={dashed}]{Dashed broken line}% + {\ttfamily\verb|\snaptodo[call chain/.style={dash pattern=???}]{}|}. \subsection{Sep and width} @@ -138,9 +140,9 @@ Use {\ttfamily\verb|\snaptodoset{block sep=0pt}|} for global setting and use - {\ttfamily\verb|\todo[block sep=0pt]{note}|}% - \todo[block sep=0pt]{2 blocks close.} - \todo[block sep=0pt]{..to each other} + {\ttfamily\verb|\snaptodo[block sep=0pt]{note}|}% + \snaptodo[block sep=0pt]{2 blocks close.} + \snaptodo[block sep=0pt]{..to each other} for local setting this. The gap between two horizontal lines is stored in @@ -150,9 +152,9 @@ To change, use {\ttfamily\verb|\snaptodoset{chain sep=0pt}|} for global setting and - {\ttfamily\verb|\todo[chain sep=0pt]{note}|}% - \todo[chain sep=0pt]{2 chains close.} - \todo[chain sep=0pt]{..to each other} + {\ttfamily\verb|\snaptodo[chain sep=0pt]{note}|}% + \snaptodo[chain sep=0pt]{2 chains close.} + \snaptodo[chain sep=0pt]{..to each other} for local setting. The width of the note block is @@ -168,10 +170,10 @@ to the right is the center of the page, by default. You can change this by {\ttfamily\verb|/snaptodo/chain bias=-99in|}.% - \todo[chain bias=-99in]{Forced to the left} + \snaptodo[chain bias=-99in]{Forced to the left} That way, all todo notes are forcedly snapped to the left hand side. Or, by - \todo[chain bias=99in]{Forced to the right}% + \snaptodo[chain bias=99in]{Forced to the right}% {\ttfamily\verb|/snaptodo/call bias=99in|}, all todo notes are forcedly snapped to the right hand side. @@ -179,13 +181,13 @@ If your document is really busy, e.g., like {\ttfamily\verb|stress_testing.tex|}, - consider setting a positive - {\ttfamily\verb|/snaptodo/block rise|}.% - \todo[block rise=2em]{Rising} - \todo[block rise=2em]{to leave} - \todo[block rise=2em]{room.} - For instance, - {\ttfamily\verb|\todo[block rise=2em]{}|}. + try setting a positive + {\ttfamily\verb|/snaptodo/block rise|},% + \snaptodo[block rise=2em]{Rising} + \snaptodo[block rise=2em]{to leave} + \snaptodo[block rise=2em]{room.} + e.g., + {\ttfamily\verb|\snaptodo[block rise=2em]{}|}. That way, a note will rise by that amount to leave more rooms for later notes. (But if there will be overlay, @@ -204,7 +206,7 @@ {\ttfamily\verb|align=flush \std@rightleft|}, is what you do,% \makeatletter - \todo[margin block/.style={align=flush \std@rightleft}] + \snaptodo[margin block/.style={align=flush \std@rightleft}] {flush toward text body} \makeatother the text will be flushed toward the main @@ -217,13 +219,13 @@ \subsection{Font} Font size is controlled by - \todo[margin block/.style={font=\tiny}]{tiny} - \todo[margin block/.style={font=\Large}]{Large} - \todo[margin block/.style={font=\Huge}]{Huge} + \snaptodo[margin block/.style={font=\tiny}]{tiny} + \snaptodo[margin block/.style={font=\Large}]{Large} + \snaptodo[margin block/.style={font=\Huge}]{Huge} {\ttfamily\verb|/snpatodo/margin block/.style={font=...}|}. - \todo[margin block/.style={font=\itshape}]{itshape} - \todo[margin block/.style={font=\sffamily}]{sffamily} - \todo[margin block/.style={font=\bfseries}]{bfseries} + \snaptodo[margin block/.style={font=\itshape}]{itshape} + \snaptodo[margin block/.style={font=\sffamily}]{sffamily} + \snaptodo[margin block/.style={font=\bfseries}]{bfseries} So is font family. \end{document} diff --git a/macros/latex/contrib/snaptodo/test/before_after.tex b/macros/latex/contrib/snaptodo/test/before_after.tex index 99552464e2..88dc16b644 100644 --- a/macros/latex/contrib/snaptodo/test/before_after.tex +++ b/macros/latex/contrib/snaptodo/test/before_after.tex @@ -16,9 +16,9 @@ promote the general Welfare, and secure the Blessings of Liberty to ourselves and our Posterity, do ordain and establish this Constitution for the United States of America. -\def\todoexample{% +\def\snaptodoexample{% \pgfmathtruncatemacro\wc{round(1+rnd*10)}% - \todo{% + \snaptodo{% \foreach\w in{1,...,\wc}{% \pgfmathsetmacro\l{1+rnd*10}% \rule{\l pt}{1ex} @@ -26,7 +26,7 @@ States of America. }, } \catcode`\,=\active -\let,=\todoexample +\let,=\snaptodoexample \section{After todo notes} diff --git a/macros/latex/contrib/snaptodo/test/circle_testing.tex b/macros/latex/contrib/snaptodo/test/circle_testing.tex index f501a03cd1..6885de11ca 100644 --- a/macros/latex/contrib/snaptodo/test/circle_testing.tex +++ b/macros/latex/contrib/snaptodo/test/circle_testing.tex @@ -16,9 +16,9 @@ \foreach\fr in{1,...,\nframe}{ \noindent\\[\dimexpr-1em-\baselineskip] - \todo{North West} + \snaptodo{North West} \hfill - \todo{North East} + \snaptodo{North East} \vskip0ptplus1fill \pgfmathsetmacro\x{72*cos(\fr0/\nframe*36*3)} @@ -27,14 +27,14 @@ \noindent \hskip1in \hskip\x pt% - \todo{Hobbit} + \snaptodo{Hobbit} \vskip-\y pt \vskip0ptplus1fill \noindent - \todo{South West} + \snaptodo{South West} \hfill - \todo{South East} + \snaptodo{South East} \clearpage } diff --git a/macros/latex/contrib/snaptodo/test/minimal_testing.tex b/macros/latex/contrib/snaptodo/test/minimal_testing.tex index 428eaa1676..28adb0562c 100644 --- a/macros/latex/contrib/snaptodo/test/minimal_testing.tex +++ b/macros/latex/contrib/snaptodo/test/minimal_testing.tex @@ -3,5 +3,5 @@ \usepackage{snaptodo} \begin{document} Your done - \todo{Your todo} + \snaptodo{Your todo} \end{document} diff --git a/macros/latex/contrib/snaptodo/test/stress_testing.tex b/macros/latex/contrib/snaptodo/test/stress_testing.tex index c2b5617fce..a0d32740e8 100644 --- a/macros/latex/contrib/snaptodo/test/stress_testing.tex +++ b/macros/latex/contrib/snaptodo/test/stress_testing.tex @@ -10,7 +10,7 @@ \def\todoexample{% \pgfmathtruncatemacro\wc{round(1+rnd*10)}% - \todo{% + \snaptodo{% \foreach\w in{1,...,\wc}{% \pgfmathsetmacro\l{1+rnd*10}% \rule{\l pt}{1ex} -- cgit v1.2.3