From 8ccafc1be8d24ff0c4126d40847afbedab7fc7fb Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 9 Apr 2021 03:02:31 +0000 Subject: CTAN sync 202104090302 --- macros/latex/contrib/apa7/apa7.dtx | 14 +- macros/latex/contrib/apa7/apa7.pdf | Bin 530991 -> 530896 bytes macros/latex/contrib/apa7/samples/longsample.pdf | Bin 196588 -> 196588 bytes macros/latex/contrib/apa7/samples/shortsample.pdf | Bin 65352 -> 65352 bytes .../latex/contrib/easybook/doc/easybook-demo.pdf | Bin 262451 -> 262454 bytes .../latex/contrib/easybook/doc/easybook-demo.tex | 4 +- macros/latex/contrib/easybook/doc/easybook.pdf | Bin 425118 -> 438594 bytes macros/latex/contrib/easybook/easybook.dtx | 179 +- macros/latex/contrib/lwarp/README.txt | 2 +- macros/latex/contrib/lwarp/lwarp.dtx | 2155 +++++++++++++++----- macros/latex/contrib/lwarp/lwarp.ins | 6 +- macros/latex/contrib/lwarp/lwarp.pdf | Bin 3153568 -> 3184136 bytes macros/latex/contrib/lwarp/lwarpmk.lua | 2 +- .../latex/contrib/nicematrix/nicematrix-french.pdf | Bin 426449 -> 455133 bytes .../latex/contrib/nicematrix/nicematrix-french.tex | 340 +-- macros/latex/contrib/nicematrix/nicematrix.dtx | 598 ++++-- macros/latex/contrib/nicematrix/nicematrix.pdf | Bin 1183755 -> 1212783 bytes 17 files changed, 2406 insertions(+), 894 deletions(-) (limited to 'macros/latex/contrib') diff --git a/macros/latex/contrib/apa7/apa7.dtx b/macros/latex/contrib/apa7/apa7.dtx index 20bc61a2c7..10da0cabda 100644 --- a/macros/latex/contrib/apa7/apa7.dtx +++ b/macros/latex/contrib/apa7/apa7.dtx @@ -4,11 +4,11 @@ % % % CHANGE THESE VALUES WITH EACH NEW RELEASE: % % % -%\ProvidesClass{apa7}[2021/04/05 v2.11 APA formatting (7th edition)] +%\ProvidesClass{apa7}[2021/04/08 v2.12 APA formatting (7th edition)] % % %<*internal> % -\def\apaSevenVersionDate{2021/04/05} -\def\apaSevenVersionNumber{2.11} +\def\apaSevenVersionDate{2021/04/08} +\def\apaSevenVersionNumber{2.12} % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -271,6 +271,8 @@ and the derived files apa7.ins, % % \changes{v2.11}{2021/04/05}{Updated linebreaks in caption separators to prevent warning. } % +% \changes{v2.12}{2021/04/08}{Reset equation counter for every appendix (like for figures and tables). Thanks mmrabe. } +% % \begin{abstract} % The \textit{Publication Manual} of the American Psychological % Association is widely used in the social sciences. The most @@ -2248,6 +2250,8 @@ and the derived files apa7.ins, \def\apaSevenapptab{% \renewcommand\thetable{\theappendix\@arabic\c@table}% \ifapamodeman{\renewcommand\theposttbl{\theappendix\arabic{posttbl}}}{}} +\def\apaSevenappeq{% + \renewcommand\theequation{\theappendix\@arabic\c@equation}} \newif\ifoneappendix \oneappendixtrue % one appendix by default \newif\ifappendix @@ -2260,6 +2264,7 @@ and the derived files apa7.ins, \appendixtrue \apaSevenappfig \apaSevenapptab + \apaSevenappeq % \ifapamodejou{}{\clearpage} %% commented out -- thp 2005/07/23 \let\old@apaSeven@section=\section % This will not work right with five levels in appendix. % Should go into \section, not \leveltwo but would also require @@ -2290,6 +2295,7 @@ and the derived files apa7.ins, }% \setcounter{figure}{0}% \setcounter{table}{0}% + \setcounter{equation}{0}% \vskip2.5ex% % \addtocounter{appendix}{1}% \refstepcounter{appendix}% 2002/07/20 this takes care of references too @@ -3874,4 +3880,4 @@ The detailed results are shown in Table~\ref{tab:DeckedTable}. \lipsum[22] %\end{macro} % % -%\Finale \ No newline at end of file +%\Finale diff --git a/macros/latex/contrib/apa7/apa7.pdf b/macros/latex/contrib/apa7/apa7.pdf index aa32a866a6..710740e416 100644 Binary files a/macros/latex/contrib/apa7/apa7.pdf and b/macros/latex/contrib/apa7/apa7.pdf differ diff --git a/macros/latex/contrib/apa7/samples/longsample.pdf b/macros/latex/contrib/apa7/samples/longsample.pdf index 0a0b7b6545..1fe1ad8736 100644 Binary files a/macros/latex/contrib/apa7/samples/longsample.pdf and b/macros/latex/contrib/apa7/samples/longsample.pdf differ diff --git a/macros/latex/contrib/apa7/samples/shortsample.pdf b/macros/latex/contrib/apa7/samples/shortsample.pdf index 83984dbc31..10623740d3 100644 Binary files a/macros/latex/contrib/apa7/samples/shortsample.pdf and b/macros/latex/contrib/apa7/samples/shortsample.pdf differ diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.pdf b/macros/latex/contrib/easybook/doc/easybook-demo.pdf index 16ed695502..b2b27f68bb 100644 Binary files a/macros/latex/contrib/easybook/doc/easybook-demo.pdf and b/macros/latex/contrib/easybook/doc/easybook-demo.pdf differ diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.tex b/macros/latex/contrib/easybook/doc/easybook-demo.tex index e23317741f..0308056ec0 100644 --- a/macros/latex/contrib/easybook/doc/easybook-demo.tex +++ b/macros/latex/contrib/easybook/doc/easybook-demo.tex @@ -91,7 +91,7 @@ % tocdepth = 2 } -\usepackage{zhlipsum,bicaption,tcolorbox} +\usepackage{zhlipsum,bicaption,tasks,tcolorbox,imakeidx} \begin{document} \title{\sffamily easybook书籍文档类} @@ -101,7 +101,7 @@ \url{https://latexstudio.net} \\ \url{https://gitee.com/texl3/easybook}\thanks{Gitee为项目的主要发布地址。} } -\date{2021/04/07\hskip\ccwd\relax v1.24g} +\date{2021/04/08\hskip\ccwd\relax v1.24h} \frontmatter[roman] \maketitle diff --git a/macros/latex/contrib/easybook/doc/easybook.pdf b/macros/latex/contrib/easybook/doc/easybook.pdf index ab902542d5..0d13de0e90 100644 Binary files a/macros/latex/contrib/easybook/doc/easybook.pdf and b/macros/latex/contrib/easybook/doc/easybook.pdf differ diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index 9fba915442..5ca915335b 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -55,7 +55,7 @@ The latest version of this license is in % % \title{\sffamily easybook书籍文档类} % \author{瞿毅} -% \date{2021/04/07\hskip\ccwd\relax v1.24g\thanks{\url{https://gitee.com/texl3/easybook}}} +% \date{2021/04/08\hskip\ccwd\relax v1.24h\thanks{\url{https://gitee.com/texl3/easybook}}} % \maketitle % \begin{abstract} % \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,可以看作对 \cls{ctexbook} 的进一步包装。虽然\CTeX 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并载入一些常用宏包实现一般的排版需求,它适用于排版中英文书籍或笔记,甚至可稍加调整成为学位论文模板。 @@ -64,7 +64,7 @@ The latest version of this license is in % % \begin{documentation} % \section{编译方式} -% 文档类含有一个使用示例文件 \opt{easybook-demo.tex},编译前建议满足以下的条件 +% 编译文档类的一个使用示例文件 \opt{easybook-demo.tex} 前建议满足以下的条件 % \begin{itemize} % \item 使用 \hologo{XeLaTeX}(推荐)或 \hologo{LuaLaTeX} 两种编译方式。 % \item 由于用到了一些宏包较新的功能,建议安装最新的\TeX 发行版,例如 \TeX Live 2021或 \hologo{MiKTeX} 21.2之后的版本。 @@ -114,14 +114,14 @@ The latest version of this license is in % \begin{function}[rEXP,added = 2021-01-05]{entitle} % 部分标题编号由中文数字变为大写罗马数字,章标题编号由中文数字变为阿拉伯数字。比如\textbf{第一部分}变为\textbf{第I部分},\textbf{第一章}变为\textbf{第1章}。 % \end{function} -% \begin{function}[rEXP,added = 2021-01-05,updated = 2021-04-07]{scheme} +% \begin{function}[rEXP,added = 2021-01-05,updated = 2021-04-08]{scheme} % \begin{syntax} % scheme = <(chinese)|plain> % \end{syntax} % \opt{scheme} 代表文档的主题,扩展了此选项在\CTeX 文档类中原有的作用范围,\opt{plain} 选项可使各类标题变为英文形式。包括章节标题、图表标题和定理标题等。如\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} 三个选项以符合英文原生风格。 +% 同时开启 \opt{newline}、\opt{entitle} 和 \opt{scheme = plain} 三个选项以符合英文原生风格。 % \end{function} % % \begin{function}[rEXP,added = 2021-01-05,updated = 2021-02-02]{font} @@ -171,7 +171,7 @@ The latest version of this license is in % \end{syntax} % \opt{multoc} 与 \opt{style/multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同目录是否双栏排版。已经预置了中英文的目录标题,可以使用 \opt{title} 选项更改目录标题的名称。\opt{book} 选项使目录标题按照 \opt{chapter} 级别输出,\opt{article} 选项使目录标题按照 \opt{article} 级别输出,默认为 \opt{chapter} 级别。 % \changes{v1.23}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。} -% \changes{v1.24g}{2021/04/04}{目录命令的可选参数增加标题键值。} +% \changes{v1.24h}{2021/04/04}{目录命令的可选参数增加标题键值。} % \end{function} % % \section{接口选项} @@ -187,7 +187,7 @@ The latest version of this license is in % \hyperref[subsec:style]{风格} & \hyperref[subsec:hyperlinks]{超链接} & \hyperref[subsec:other font]{其它字体} & \hyperref[subsec:spacing]{行距} & \hyperref[subsec:reference]{参考文献} \\ % style & link & elsefont & spread & bibset \\ % \midrule -% \hyperref[subsec:theorem of style]{定理样式} & \hyperref[subsec:page margins]{页面边距} & \hyperref[subsec:header and footer]{页眉页脚} & \hyperref[subsec:catalog style]{目录样式} & \\ +% \hyperref[subsec:theorem of style]{定理样式} & \hyperref[subsec:page margins]{页面尺寸} & \hyperref[subsec:header and footer]{页眉页脚} & \hyperref[subsec:catalog style]{目录样式} & \\ % thmset & geoset & hdrset & tocset & \\ % \bottomrule % \end{tabular} @@ -259,7 +259,7 @@ The latest version of this license is in % \ding{229} 以上选项路径为 \opt{link/...} \\ % \opt{link} 将超链接选项(包括以上选项)交给 \pkg{hyperref} 处理,除了一些关于 pdf 书签的选项可能会失效,其它由键值选项命令 \tn{hypersetup} 支持的多数选项可用。 % \changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。} -% \changes{v1.24g}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。} +% \changes{v1.24h}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。} % \end{function} % % \begin{optdesc} @@ -286,13 +286,13 @@ The latest version of this license is in % footnote = <(1)> % \end{syntax} % \ding{229} 以上选项路径为 \opt{spread/...} \\ -% 行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。\tn{ctexset} 原有的行距选项 \opt{linespread} 失效。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为 +% 行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为 % \changes{v1.21}{2021/01/12}{增加脚注线间的距离选项。} % \changes{v1.23}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。} % \end{function} % % \begin{optdesc} -% \item[line] 正文行距。 +% \item[line] 正文行距,\tn{ctexset} 原有的行距选项 \opt{linespread} 失效。 % \item[table] 表格行距。 % \item[math] 数学环境行距,包括 \pkg{amsmath} 和 \pkg{mathtools} 宏包附带的环境,但并未加载 \pkg{mathtools} 宏包。 % \item[caption] 图表代码标题行距。 @@ -424,7 +424,7 @@ The latest version of this license is in % \declaretheoremstyle[bodyfont = \rmfamily,spacepost = 0.5\ccwd]{定理样式名} % \end{ctexexam} % -% \subsection{页面边距} +% \subsection{页面尺寸} % \label{subsec:page margins} % \begin{function}[EXP,added = 2021-01-13,updated = 2021-03-21]{footnotemargin,footparskip,footparindent,list-labelsep,left,top,hmargin,textwidth,includehead} % \begin{syntax} @@ -439,7 +439,7 @@ The latest version of this license is in % includehead = % \end{syntax} % \ding{229} 以上选项路径为 \opt{geoset/...} \\ -% 预置的页面边距与 \cls{Word} 的默认值接近,\opt{geoset} 会将前4个选项以外的其它选项交给 \pkg{geometry} 宏包接口命令 \tn{geometry} 处理,并且选项的键值列表与之相同,上面的选项仅是一小部分,支持的参数可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \opt{paper} 选项的设置。 +% 预置的页面尺寸与 \cls{Word} 的默认值接近,\opt{geoset} 会将前4个选项以外的其它选项交给 \pkg{geometry} 宏包接口命令 \tn{geometry} 处理,并且选项的键值列表与之相同,上面的选项仅是一小部分,支持的参数可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \opt{paper} 选项的设置。 % \begin{ctexexam} % \geoset % { @@ -450,7 +450,7 @@ The latest version of this license is in % list-labelsep = \hspace{0.5\ccwd} % } % \end{ctexexam} -% \changes{v1.21}{2021/01/13}{增加配置页面边距的选项。} +% \changes{v1.21}{2021/01/13}{增加配置页面尺寸的选项。} % \end{function} % % \subsection{页眉页脚} @@ -529,8 +529,8 @@ The latest version of this license is in % \end{ctexexam} % % \opt{belowoffset} 选项为主目录标题 \tn{contentsname} 后的间距补偿,一般为负值,用于抵消 \opt{format} 中设置的垂直间距。\opt{lists} 中的 \opt{belowoffset} 与之意义类似,但是一般为正值,可以在 \opt{article} 模式中使用。建议 \opt{lists/lolskip(0.8pc) + lists/format/addvspace(0.2pc) + lists/belowoffset(0pc) = belowoffset(-1pc)}。\opt{line-align} 选项可以使目录引导线右边对齐并与页码保持一定间隙,否则会与页码连接。 -% \changes{v1.24g}{2021/04/05}{可以设置图、表和代码目录的标签。} -% \changes{v1.24g}{2021/04/06}{增加目录引导线右边对齐方式。} +% \changes{v1.24h}{2021/04/05}{可以设置图、表和代码目录的标签。} +% \changes{v1.24h}{2021/04/06}{增加目录引导线右边对齐方式。} % \end{function} % % \begin{function}[added = 2021-01-13,updated = 2021-04-06]{\tocrule} @@ -564,19 +564,19 @@ The latest version of this license is in % \end{function} % % \subsection{列表} -% \begin{function}[added = 2021-01-05,updated = 2021-04-07]{enumerate,itemize,description} +% \begin{function}[added = 2021-01-05,updated = 2021-04-08]{enumerate,itemize,description} % \begin{syntax} % \tn{begin}\marg{环境名}\oarg{键值列表} % \ \tn{item} <列表内容> % \tn{end}\marg{环境名} % \end{syntax} -% \pkg{enumitem} 宏包为系统预置的列表环境 \env{enumerate}、\env{itemize}和 \env{description} 提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置原有的三种列表格式。已为三种列表预置了三个级别的格式,可相互嵌套,若自定义标签可例如 +% \pkg{enumitem} 宏包为系统预置的列表环境 \env{enumerate}、\env{itemize}和 \env{description} 提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置原有的三种列表格式。已为三种列表预置了三个级别的格式可相互嵌套,默认标签与 \cls{book} 文档类相同,若自定义标签可例如 % \begin{ctexexam} % \begin{enumerate}[label = \arabic*(a),leftmargin = 1cm,resume] % \begin{itemize}[label = \textbullet] % \begin{description}[font = \sffamily\bfseries,style = nextline] % \end{ctexexam} -% \changes{v1.24g}{2021/04/07}{重新优化列表环境的配置。} +% \changes{v1.24h}{2021/04/08}{重新优化列表环境的配置。} % \end{function} % % \subsubsection{排序列表} @@ -630,7 +630,7 @@ The latest version of this license is in % \ \tn{item} <习题内容> % \tn{end}\marg{exercise} % \end{syntax} -% 习题环境 \env{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号环境时不进行编号。三个可选参数中颜色为自定义或 \pkg{xcolor} 包含的颜色名称,正文编号格式与小节 \ref{subsec:sort list} 排序列表相同,标题名默认为摘要。注意,环境具有相同定界符的可选参数只能\textbf{从右往左}省略,省略的参数使用默认值。 +% 习题环境 \env{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号环境时不进行编号。三个可选参数中颜色为自定义或 \pkg{xcolor} 包含的颜色名称,已载入了 \opt{svgnames} 颜色库。正文编号格式与小节 \ref{subsec:sort list} 排序列表相同,标题名默认为摘要。注意,环境具有相同定界符的可选参数只能\textbf{从右往左}省略,省略的参数使用默认值。 % \begin{ctexexam} % \begin{exercise}[LightYellow][1.](习题) % \item 习题内容 @@ -768,7 +768,7 @@ The latest version of this license is in % \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{内容} +% \ \oarg{宽度}\oarg{内部位置}\marg{内容} % \end{syntax} % 可以实现中英文双语标题,使用此功能需要在导言区载入 \pkg{bicaption} 宏包,具体用法见说明文档。 % \end{function} @@ -800,15 +800,47 @@ The latest version of this license is in % \end{syntax} % \pkg{ulem} 宏包提供了多种下划线命令,下划线的粗细由命令 \tn{ULthickness} 控制,重新定义它需要使用 \tn{renewcommand} 命令。下划线的深度由 \tn{ULdepth} 控制,默认值 \tn{maxdimen} 是一个允许深度根据当前字体变化的特殊标志,当然也可以使用 \tn{setlength} 设定特定深度。 % \end{function} +% +% \section{载入的宏包} +% 以下为 \cls{easybook} 直接调用的关键宏包,带有 \ding{75} 符号的宏包并未载入它们,仅做了预配置和兼容性处理,可根据需要在导言区手动载入以实现相关的功能。 +% \begin{description} +% \item[ctexbook] 提供中文排版的通用框架。 +% \item[xcolor] 提供多种颜色、阴影、色调和任意颜色的混合。 +% \item[footmisc] 更改脚注排版的方法的集合。 +% \item[amsmath] 提供\LaTeX 中的数学功能。 +% \item[thmtools] 用于通常需要的排版定理支持。 +% \item[marginnote] 增强了边注输出的功能。 +% \item[setspace] 提供对文档中行间距的支持。 +% \item[chemformula] 提供了对化学式进行排版的命令。 +% \item[siunitx] 全面的国际标准单位支持。 +% \item[ulem] 提供可断行多样式的下划线命令。 +% \item[geometry] 灵活完整的页面尺寸设置。 +% \item[pdfpages] 在\LaTeX 中插入 pdf 文档。 +% \item[graphicx] 增强了对图形插入的支持。 +% \item[fancyhdr] 广泛控制页面的页眉和页脚。 +% \item[titletoc] 设置目录中的标题格式。 +% \item[caption-light] 在浮动环境中自定义题注。 +% \item[tabularx] 带有可调整宽度的列的表格。 +% \item[multirow] 创建跨越多行的表格单元格。 +% \item[booktabs] 为表格提供三线表式的命令。 +% \item[enumitem] 提供列表环境的布局控制。 +% \item[listings] 可以在\LaTeX 中排版程序/编程代码。 +% \item[\ding{75} tcolorbox] 为带有标题线的彩色和带框文本框提供了一个环境。 +% \item[\ding{75} tasks] 将练习题组织成水平而不是垂直计数的列。 +% \item[\ding{75} imakeidx] 可以让文档同时生成和排版一个或多个索引。 +% \item[\ding{75} bicaption] 提供图表的双语题注。 +% \item[\ding{75} mathtools] 增强 \pkg{amsmath} 的数学功能。 +% \item[\ding{75} unicode-math] 处理使用 unicode 编码的数学字体。 +% \end{description} % \end{documentation} % % \StopEventually{} %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/04/07}{1.24g}{beta} +\ProvidesExplClass{easybook}{2021/04/08}{1.24h}{beta} -\cs_generate_variant:Nn \keys_define:nn {nx} +\cs_generate_variant:Nn \__ctex_define:nn {nx} \cs_generate_variant:Nn \int_to_arabic:n {v} \cs_generate_variant:Nn \dim_add:Nn {NV} \cs_generate_variant:Nn \__eb_put_hyperref:n {x} @@ -961,8 +993,8 @@ The latest version of this license is in fancyhdr,titletoc, caption-light,subcaption, tabularx,multirow,booktabs, - tasks,enumitem, - listings,imakeidx + enumitem, + listings } \ctex_at_end_preamble:n { @@ -1369,7 +1401,7 @@ The latest version of this license is in {\text_uppercase:n {#1}} {\text_titlecase_first:n {#1}} } -\cs_new_protected:Npn \__eb_markboth:n #1 +\cs_new_protected:Npn \eb@markboth#1 { \bool_if:NTF \l__eb_page_twoside_bool { @@ -1400,14 +1432,14 @@ The latest version of this license is in \section*{\phantomsection#1} \CTEX@addtocline{section}{#1} } - \__eb_markboth:n {#1} + \eb@markboth{#1} } -\cs_new_protected:Npn \__eb_title_mark:n #1 +\cs_new_protected:Npn \__eb_title_mark_notoc:n #1 { \tl_if_eq:NnTF \l__eb_toc_type_tl{book} {\chapter*{\phantomsection#1}} {\section*{\phantomsection#1}} - \__eb_markboth:n {#1} + \eb@markboth{#1} } \cs_new_protected:Npn \__eb_ifmultoc_pre_set: { @@ -1436,7 +1468,7 @@ The latest version of this license is in \cs_new_protected:Npn \__eb_title_ifintoc_set:n #1 { \IfBooleanTF{#1} - {\__eb_title_mark:n {\eb@toc@title}} + {\__eb_title_mark_notoc:n {\eb@toc@title}} {\__eb_title_mark_intoc:n {\eb@toc@title}} } \RenewDocumentCommand{\tableofcontents}{o} @@ -1445,7 +1477,7 @@ The latest version of this license is in \tl_set_eq:NN \eb@toc@title\contentsname \IfValueT{#1}{\keys_set:nn {listoc}{#1}} \__eb_ifmultoc_pre_set: - \__eb_title_mark:n {\eb@toc@title} + \__eb_title_mark_notoc:n {\eb@toc@title} \vspace*{\dim_use:N \l__eb_toc_offset_dim} \@starttoc{toc} \__eb_ifmultoc_post_set: @@ -1491,22 +1523,25 @@ The latest version of this license is in \group_end: } -\makeindex[ - intoc, - options = -M~texindy~-C~utf8, - program = truexindy, - columns = 2, - columnsep = 2\ccwd - ] -\indexsetup - { - level = \bool_if:NTF \l__eb_class_book_bool{\chapter*}{\section*}, - toclevel = \bool_if:NTF \l__eb_class_book_bool{chapter}{section}, - firstpagestyle = \bool_if:NTF \l__eb_class_book_bool{plain}{fancy} - } -\__eb_patch_cmd:Nnn \imki@indexheaders - {\@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}} - {\__eb_markboth:n {\indexname}} +\ctex_at_end_package:nn {imakeidx} + { + \makeindex[ + intoc, + options = -M~texindy~-C~utf8, + program = truexindy, + columns = 2, + columnsep = 2\ccwd + ] + \indexsetup + { + level = \bool_if:NTF \l__eb_class_book_bool{\chapter*}{\section*}, + toclevel = \bool_if:NTF \l__eb_class_book_bool{chapter}{section}, + firstpagestyle = \bool_if:NTF \l__eb_class_book_bool{plain}{fancy} + } + \ctex_patch_cmd:Nnn \imki@indexheaders + {\@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}} + {\eb@markboth{\indexname}} + } \tl_new:N \l__eb_font_table_tl \tl_new:N \l__eb_font_figure_tl @@ -1688,7 +1723,7 @@ The latest version of this license is in \cs_new_protected:Npn \__eb_thmname_set:nn #1#2 {\tl_const:cn {c__eb_name_#1_tl}{#2}} -\tl_if_eq:VnTF \l__ctex_scheme_tl{chinese} +\tl_if_eq:NnTF \l__ctex_scheme_tl{chinese} { \clist_map_inline:nn { @@ -1794,13 +1829,16 @@ The latest version of this license is in ]{proof} } -\settasks +\ctex_at_end_package:nn {tasks} { - label = (\Alph*), - after-item-skip = 0ex plus .1ex, - column-sep = .5\ccwd, - item-indent = 2\ccwd, - label-width = 1.5\ccwd + \settasks + { + label = (\Alph*), + after-item-skip = 0ex plus .1ex, + column-sep = .5\ccwd, + item-indent = 2\ccwd, + label-width = 1.5\ccwd + } } \setchemformula { @@ -2025,12 +2063,12 @@ The latest version of this license is in { \tl_if_empty:NTF \l__eb_bib_otherstyle_tl { - \tl_if_eq:VnT \l__eb_bib_style_tl{numerical} + \tl_if_eq:NnT \l__eb_bib_style_tl{numerical} { \bibliographystyle{gbt7714-numerical} \setcitestyle{comma,square,super} } - \tl_if_eq:VnT \l__eb_bib_style_tl{authoryear} + \tl_if_eq:NnT \l__eb_bib_style_tl{authoryear} {\bibliographystyle{gbt7714-author-year}} \cs_set_eq:NN \cite\citep }{\exp_args:NV \bibliographystyle\l__eb_bib_otherstyle_tl} @@ -2055,9 +2093,9 @@ The latest version of this license is in { \tl_if_empty:NTF \l__eb_bib_otherstyle_tl { - \tl_if_eq:VnT \l__eb_bib_style_tl{numerical} + \tl_if_eq:NnT \l__eb_bib_style_tl{numerical} {\__eb_put_biblatex:n {style = gb7714-2015}} - \tl_if_eq:VnT \l__eb_bib_style_tl{authoryear} + \tl_if_eq:NnT \l__eb_bib_style_tl{authoryear} {\__eb_put_biblatex:n {style = gb7714-2015ay}} }{\__eb_put_biblatex:n {style = \l__eb_bib_otherstyle_tl}} \tl_if_empty:NF \l__eb_bib_citestyle_tl @@ -2088,7 +2126,8 @@ The latest version of this license is in { \group_begin: \footnotesize - \exp_args:Nx \linespread{\fp_use:N \l__eb_spread_footnote_fp}\selectfont + \exp_args:Nx + \linespread{\fp_use:N \l__eb_spread_footnote_fp}\selectfont \skip_gset:Nn \footnotesep{\ht\strutbox} \group_end: \bool_if:NT \l__eb_chap_withpart_bool @@ -2106,14 +2145,20 @@ The latest version of this license is in } \__eb_patch_cmd:Nnn \@footnotetext {\reset@font} - {\def\baselinestretch{\fp_use:N \l__eb_spread_footnote_fp}\l__eb_font_footnote_tl} + { + \def\baselinestretch{\fp_use:N \l__eb_spread_footnote_fp} + \l__eb_font_footnote_tl + } \__eb_patch_cmd:Nnn \@mpfootnotetext {\reset@font} - {\def\baselinestretch{\fp_use:N \l__eb_spread_footnote_fp}\l__eb_font_footnote_tl} + { + \def\baselinestretch{\fp_use:N \l__eb_spread_footnote_fp} + \l__eb_font_footnote_tl + } \__eb_patch_cmd:Nnn \@makefnmark {\normalfont}{\l__eb_font_footnote_tl} -\lstdefinestyle{mystyle} +\lstdefinestyle{easy-lst-sty} { language = [LaTeX]TeX, texcsstyle = @@ -2158,7 +2203,7 @@ The latest version of this license is in } \lstset { - style = mystyle, + style = easy-lst-sty, breaklines = true, resetmargins = true, % numbers = left, @@ -2215,9 +2260,13 @@ The latest version of this license is in \UrlBreaks{\UrlOrds\__eb_add_urlbreak_points:} } \tl_const:Nn \c__eb_urlbreak_points_tl - {ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789} + { + ABCDEFGHIJKLMNOPQRSTUVWXYZ + abcdefghijklmnopqrstuvwxyz + 0123456789 + } -\keys_define:nx {ctex/link} +\__ctex_define:nx {link} { hyperlink .choice:, hyperlink/edge .code:n = {}, @@ -2252,7 +2301,7 @@ The latest version of this license is in } } } -\keys_define:nx {ctex/style} +\__ctex_define:nx {style} { color .choice:, color .value_required:n = true, @@ -2274,7 +2323,7 @@ The latest version of this license is in \__eb_allow_urlbreak: \ctex_hypersetup:n {pdfstartview = FitH} \exp_args:NV \hypersetup\l__eb_hyperref_clist - \tl_if_eq:VnTF \l__ctex_scheme_tl{chinese} + \tl_if_eq:NnTF \l__ctex_scheme_tl{chinese} { \keys_set_known:nn {ctex} { diff --git a/macros/latex/contrib/lwarp/README.txt b/macros/latex/contrib/lwarp/README.txt index f77e4ae669..bf13a2f01a 100644 --- a/macros/latex/contrib/lwarp/README.txt +++ b/macros/latex/contrib/lwarp/README.txt @@ -1,5 +1,5 @@ -LaTeX lwarp package v0.895 README.txt +LaTeX lwarp package v0.896 README.txt Files included are: diff --git a/macros/latex/contrib/lwarp/lwarp.dtx b/macros/latex/contrib/lwarp/lwarp.dtx index 51892df0c1..bcd587f552 100644 --- a/macros/latex/contrib/lwarp/lwarp.dtx +++ b/macros/latex/contrib/lwarp/lwarp.dtx @@ -16,7 +16,7 @@ % \iffalse %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{lwarp} -% [2021/02/18 v0.895 Allows LaTeX to directly produce HTML5 output.] +% [2021/04/08 v0.896 Allows LaTeX to directly produce HTML5 output.] % %<*driver> \documentclass{ltxdoc} @@ -309,11 +309,11 @@ Keywords={LaTeX, HTML, conversion}% \newcommand{\spkg}[1]{\textcolor[Hsb]{120,1,.4}{\pkg{#1}}}% package supported as-is \newcommand{\mpkg}[1]{\textcolor[Hsb]{240,1,.4}{\pkg{#1}}}% package modified for HTML \newcommand{\epkg}[1]{\textcolor[Hsb]{300,1,.5}{\pkg{#1}}}% package emulated for HTML -\newcommand{\ipkg}[1]{\textcolor[Hsb]{0,0,.5}{\pkg{#1}}}% package ignored +\newcommand{\ipkg}[1]{\textcolor[Hsb]{0,0,.4}{\pkg{#1}}}% package ignored \newcommand{\wpkg}[1]{\textcolor[Hsb]{0,1,.5}{\pkg{#1}}}% package warning special case \newcommand{\sjax}{\textsuperscript{\textcolor[Hsb]{120,1,.4}{MJ}}} \newcommand{\ejax}{\textsuperscript{\textcolor[Hsb]{300,1,.5}{MJ}}} -\newcommand{\ijax}{\textsuperscript{\textcolor[Hsb]{0,0,.5}{MJ}}} +\newcommand{\ijax}{\textsuperscript{\textcolor[Hsb]{0,0,.4}{MJ}}} % green/cyan/blue/magenta % \newcommand{\spkg}[1]{\textcolor[Hsb]{120,1,.4}{\pkg{#1}}}% package supported as-is @@ -322,7 +322,7 @@ Keywords={LaTeX, HTML, conversion}% % \newcommand{\ipkg}[1]{\textcolor[Hsb]{300,1,.5}{\pkg{#1}}}% package ignored % \newcommand{\wpkg}[1]{\textcolor[Hsb]{0,1,.5}{\pkg{#1}}}% package warning special case - +\newcommand{\ARIA}{\acro{ARIA}} \newcommand{\pdflatexonly}{ \textred{Only pre-loaded if \prog{pdflatex} is being used.} @@ -871,6 +871,7 @@ the link will be empty. Index entries also use \cs{nameref} and have the same limitation. \trouble{index>empty link} \trouble{reference>empty link} +\trouble{link>empty} } \newcommand{\limitspfnote}{ @@ -908,16 +909,19 @@ due to the limited number of symbols which are available. \limitsperpage -If using \brand{MathJax}, after each math expression with a \cs{footnotemark}, -\watchout[MathJax, \cs{footnotemark}] -adjust the \ctr{footnote} counter by the number of \cs{footnotemark}s: -\begin{sourcedisplay} -\cs{[} (math expression with \textgreen{two} instances of \cs{footnotemark}) \cs{]} \\ -\textred{\cs{warpHTMLonly}\{}\cs{addtocounter}\{footnote\}\{\textgreen{2}\}\textred{\}} -\end{sourcedisplay} -Similarly for \pkg{endnotes}, but \emph{not} \pkg{sidenotes}. +% No longer true: +% If using \brand{MathJax}, \cs{footnote} and \cs{endnote} work, +% \watchout[MathJax, \cs{footnotemark}] +% but for \cs{footnotemark}, after each math expression with a \cs{footnotemark} +% adjust the \ctr{footnote} counter by the number of \cs{footnotemark}s: +% \begin{sourcedisplay} +% \cs{[} (math expression with \textgreen{two} instances of \cs{footnotemark}) \cs{]} \\ +% \textred{\cs{warpHTMLonly}\{}\cs{addtocounter}\{footnote\}\{\textgreen{2}\}\textred{\}} +% \end{sourcedisplay} +% Similarly for \pkg{endnotes}, but \emph{not} \pkg{sidenotes}. Also for \brand{MathJax}, \cs{footnotename} is used for a \cs{footnotemark} +\margintag{\brand{MathJax}} if the actual footnote number is not known. To redefine it, provide it before loading \pkg{lwarp}: \begin{sourcedisplay} @@ -1643,34 +1647,38 @@ While using \brand{Mathjax}, \cs{displaymathother} may also be used for other forms of display and inline math which contain \pkg{chemformula} expressions. } -\newcommand{\limitsntheorem}{% -This conversion is not total. -\trouble[Font control]{ntheorem=\pkg{ntheorem}>font} -Font control is via \CSS, and the custom \LaTeX\ font settings -are ignored. - +\newcommand{\limitstheorems}{% If the print version does not use \pkg{cleveref}, -\trouble[cref reference format undefined]{ntheorem=\pkg{ntheorem}>cref reference format} -\trouble{cref reference format} -\trouble{cleveref=\pkg{cleveref}>cref reference format} +\trouble[cref reference format undefined]{ntheorem=\pkg{ntheorem}>cref reference format undefined} +\trouble{cref reference format undefined} +\trouble{cleveref=\pkg{cleveref}>cref reference format undefined} +\trouble{theorem>cref reference format undefined} place all \cs{theoremstyle} and \cs{newtheorem} -declarations in the preamble inside \cs{AtBeginDocument}.\footnote{% +declarations in the preamble inside \cs{AtEndPreamble}.\footnote{% \pkg{lwarp} uses \pkg{cleveref} for the \HTML\ conversion, - and loads \pkg{cleveref} \cs{AtEndPreamble}, just before \cs{AtBeginDocument}.% + and loads \pkg{cleveref} \cs{AtEndPreamble}, just before \cs{AtBeginDocument}. + This is also before the \filenm{.aux} file is read. } -For some theorems, it may also be required to add inside \cs{AtBeginDocument} +For some theorems, it may also be required to add inside \cs{AtEndPreamble} something such as: \begin{sourcedisplay} -\cs{AtBeginDocument}\{ \% if not using cleveref package \\ +\cs{usepackage}\{etoolbox\} \% for \cs{ifdef}, \cs{AtEndPreamble} \\ +\cs{AtEndPreamble}\{ \% if not using cleveref package \\ \fquad \cs{theoremstyle}\{definition\} \\ \fquad \cs{newtheorem}\{dtheorem\}\{Definition\} \\ \fquad \dots \\ - \fquad \cs{usepackage}\{etoolbox\} \% for \cs{ifdef} \\ \fquad \cs{ifdef}\{\cs{cref}\}\{ \\ \fqquad \cs{crefname}\{Proof\}\{Proof\}\{Proofs\} \\ \fquad \}\{\} \\ \} \end{sourcedisplay} +} + +\newcommand{\limitsntheorem}{% +This conversion is not total. +\trouble[Font control]{ntheorem=\pkg{ntheorem}>font} +Font control is via \CSS, and the custom \LaTeX\ font settings +are ignored. \limitsntheoremnumbering } @@ -2911,8 +2919,8 @@ changes do not affect the \HTML\ output. } \newcommand{\limitspolyglossia}{% -\trouble{Undefined control sequence \dots begindocument>polyglossia=\pkg{polyglossia}} -\trouble{polyglossia=\pkg{polyglossia}>Undefined control sequence \dots begindocument} +\trouble{Undefined control seq \dots\ begindocument>polyglossia=\pkg{polyglossia}} +\trouble{polyglossia=\pkg{polyglossia}>Undefined control seq \dots\ begindocument} \pkg{lwarp} uses \pkg{cleveref}, which has some limitations when using \pkg{polyglossia}, possibly resulting in the error \begin{sourcedisplay} @@ -3053,7 +3061,7 @@ This boolean may be tested by the user for later use. %<*package> % \fi % -% \CheckSum{53146} +% \CheckSum{54091} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -3190,6 +3198,7 @@ This boolean may be tested by the user for later use. % \changes{v0.893}{2020/11/26}{\ 2020/11/26} % \changes{v0.894}{2020/12/24}{\ 2020/12/24} % \changes{v0.895}{2021/02/18}{\ 2021/02/18} +% \changes{v0.896}{2021/04/08}{\ 2021/04/08} @@ -3413,6 +3422,41 @@ This boolean may be tested by the user for later use. % % \begin{description} % \needspace{2\baselineskip} +% \item[v0.896:] Back references, accessibility. +% \begin{itemize} +% \item \textred{Due to changes in cross referencing, \watchout +% execute \cmds{lwarpmk clean} before recompiling.} +% \item Increased sectioning nesting stack depth. Error if overflow stack. +% \item Fixed footnotes at the end of the document, +% or inside a \env{description} label. +% \item Added an error if using braces inside \cs{usepackage} options. +% \item Fixed footnotes in bracket display math with \brand{MathJax}. +% \margintag{\brand{MathJax}} +% \item \LaTeX\ theorems, \pkg{amsthm}, \pkg{ntheorem}, \pkg{theorem}: +% \margintag{theorems} +% Print theorem footnotes following theorems. +% \item Added \HTML\ \element{main} element to each page. +% \margintag{accessibility} +% \item Added \ARIA\ |math| role to \SVG\ math images, and |note| role to +% margin notes, footnotes, etc. +% \item Improved citation backreferences for various packages. +% \margintag{packages} +% \item \pkg{chemfig}: Updated to v1.6a. +% \item \pkg{bigdelim}: Updated to v2.8. +% \item \pkg{xetexko}: Updated to v3.1. +% \item \pkg{hyperxmp}: Fix: Accept and discard additional keys. +% \item \pkg{hyperef}: Fix: Added \cs{*autorefname} macros. +% \item \pkg{biblatex}: Fix: Back references. +% \item \pkg{tocloft}: Fix: \cs{cftpagenumbersoff}, \cs{cftpagenumberson}. +% \item \pkg{threeparttablex}: Fix: \cs{TPTL@tnotex}. +% \item \pkg{amsthm}: Fix: Footnotes inside environment optional argument. +% \item \pkg{listings}: Fixed labels. Accepts but ignores escapes w/o error. +% \item \pkg{pdflscape}: Fix: Added \env{landscape} environment. +% \item Added \pkg{ccicons}, \pkg{classicthesis}, \pkg{orcidlink}. +% \item Added \pkg{enotez}. +% \item Verified support for \pkg{doi}, \pkg{doipubmed}. +% \end{itemize} +% \needspace{2\baselineskip} % \item[v0.895:] Vector packages, greatly improved \brand{MathJax} for \pkg{siunitx}. % \begin{itemize} % \item Fixed quotes in \HTML\ tags while using old font packages with @@ -4544,33 +4588,33 @@ This boolean may be tested by the user for later use. % \item \pkg{endfloat}: Updated for v2.6. % \item \pkg{url}: Fixes for active characters. % \end{itemize} -% \needspace{2\baselineskip} -% \item[v0.51:] Improved \SVG\ math, added numerous chemistry packages. -% \begin{itemize} -% \item Docs: Added \nameref{sec:thingstoavoid}. -% \margintag{documentation} -% \item Docs: Added to \nameref{sec:convertexisting}. -% \item Docs: Multiple authors and affiliations with custom classes. -% See \cref{sec:authorsaffils}. -% \item Docs: \pkg{tikz} with matrices. See \cref{sec:limitstikz}. -% \item Improved \SVG\ math baseline.\margintag{SVG math} -% \item Improved \SVG\ math font and color. -% \item Faster \SVG\ math rendering. -% \item Improved support for display math containing complicated math objects, -% such as \pkg{tikz-cd}. See \cref{sec:displaymathother}. -% \item Fix: \cs{addcontentsline} inside \SVG\ math. -% \item Fix: \SVG\ math containing an embedded \env{lateximage}. -% \item \brand{MathJax} now handles \cs{ensuremath} in expressions.\margintag{MathJax} -% \item Fix: Added \env{alignat} environment. \margintag{misc. fixes} -% \item Fix: \pkg{afterpackage} no longer required, which conflicted with \pkg{scrlfile}. -% \item Fix: \pkg{titling} \cs{thanks} mark. -% \item Fix: \pkg{fancybox} improvements. -% \item Fix: \pkg{tikz} \cs{tikz} macro. (Previously only the \env{tikzpicture} environment worked.) -% \item Fix: \pkg{tikz} with optional argument. -% \item Added \pkg{mhchem}, \margintag{packages} -% \pkg{chemfig}, \pkg{chemformula}, \pkg{chemmacros}, \pkg{chemnum}, \pkg{chemgreek}, -% \pkg{epstopdf-base}, \pkg{grid}, \pkg{ltxgrid}. -% \end{itemize} +% ^^A % \needspace{2\baselineskip} +% ^^A % \item[v0.51:] Improved \SVG\ math, added numerous chemistry packages. +% ^^A % \begin{itemize} +% ^^A % \item Docs: Added \nameref{sec:thingstoavoid}. +% ^^A % \margintag{documentation} +% ^^A % \item Docs: Added to \nameref{sec:convertexisting}. +% ^^A % \item Docs: Multiple authors and affiliations with custom classes. +% ^^A % See \cref{sec:authorsaffils}. +% ^^A % \item Docs: \pkg{tikz} with matrices. See \cref{sec:limitstikz}. +% ^^A % \item Improved \SVG\ math baseline.\margintag{SVG math} +% ^^A % \item Improved \SVG\ math font and color. +% ^^A % \item Faster \SVG\ math rendering. +% ^^A % \item Improved support for display math containing complicated math objects, +% ^^A % such as \pkg{tikz-cd}. See \cref{sec:displaymathother}. +% ^^A % \item Fix: \cs{addcontentsline} inside \SVG\ math. +% ^^A % \item Fix: \SVG\ math containing an embedded \env{lateximage}. +% ^^A % \item \brand{MathJax} now handles \cs{ensuremath} in expressions.\margintag{MathJax} +% ^^A % \item Fix: Added \env{alignat} environment. \margintag{misc. fixes} +% ^^A % \item Fix: \pkg{afterpackage} no longer required, which conflicted with \pkg{scrlfile}. +% ^^A % \item Fix: \pkg{titling} \cs{thanks} mark. +% ^^A % \item Fix: \pkg{fancybox} improvements. +% ^^A % \item Fix: \pkg{tikz} \cs{tikz} macro. (Previously only the \env{tikzpicture} environment worked.) +% ^^A % \item Fix: \pkg{tikz} with optional argument. +% ^^A % \item Added \pkg{mhchem}, \margintag{packages} +% ^^A % \pkg{chemfig}, \pkg{chemformula}, \pkg{chemmacros}, \pkg{chemnum}, \pkg{chemgreek}, +% ^^A % \pkg{epstopdf-base}, \pkg{grid}, \pkg{ltxgrid}. +% ^^A % \end{itemize} % ^^A \needspace{2\baselineskip} % ^^A \item[v0.50:] Improved \SVG\ math. % ^^A \begin{itemize} @@ -5545,10 +5589,11 @@ This boolean may be tested by the user for later use. % \ipkg{fullminipage}, \ipkg{fullpage}, % \ipkg{fwlw}, \ipkg{geometry}, \ipkg{gmeometric}, % \ipkg{grid}, \mpkg{grid-system}, \ipkg{gridset}, -% \ipkg{layaureo}, \ipkg{layout}, \ipkg{layouts}, \ipkg{leading}, +% \ipkg{layaureo}, \ipkg{layout}, \ipkg{layouts}, \ipkg{leading}, \ipkg{lscape}, % \ipkg{ltxgrid}, \ipkg{nccfancyhdr}, \ipkg{notespages}, \ipkg{nowidow}, % \ipkg{pagegrid}, \ipkg{pagesel}, \epkg{parallel}, \epkg{parcolumns}, -% \ipkg{pdfcolparallel}, \ipkg{pdfcolparcolumns}, \ipkg{pdfcrypt}, \ipkg{pdfprivacy}, +% \ipkg{pdfcolparallel}, \ipkg{pdfcolparcolumns}, \ipkg{pdfcrypt}, +% \ipkg{pdflscape}, \ipkg{pdfprivacy}, % \ipkg{preview}, \epkg{ragged2e}, \ipkg{returntogrid}, \ipkg{rmpage}, % \epkg{scrlayer-scrpage}, \epkg{scrpage2}, \epkg{setspace}, \ipkg{selectp}, % \ipkg{textarea}, \ipkg{threadcol}, @@ -5616,7 +5661,7 @@ This boolean may be tested by the user for later use. % Footnotes: & Adds \progcode{FootnoteDepth} to print footnotes at section breaks. % \brand{MathJax} emulation for \cs{footnote}, and also as marked in the following: % \epkg{bigfoot}, \ipkg{dblfnote}, -% \ipkg{endheads}, \mpkg{endnotes}\ejax, \spkg{fixfoot}, +% \ipkg{endheads}, \mpkg{endnotes}\ejax, \mpkg{enotez}\ejax, \spkg{fixfoot}, % \ipkg{fnbreak}, \ipkg{fnpara}, \ipkg{fnpos}, % \epkg{footmisc}, \mpkg{footnote}, \ipkg{footnotebackref}, % \mpkg{footnoterange}, \ipkg{footnpag}, \epkg{manyfoot}, @@ -5733,8 +5778,8 @@ This boolean may be tested by the user for later use. % \midrule % % \mpkg{xcolor}: & \textcolor{DarkGreen}{Full package color names}, any color models, -% and \textcolor{Goldenrod}{mixing}. -% \textcolor{Maroon}{\cs{textcolor}}, +% and \textcolor{red!70!black}{mixing}. +% \textcolor{blue}{\cs{textcolor}}, % \colorbox{LightSteelBlue}{\cs{colorbox}}, % \fcolorbox{red}{NavajoWhite}{\cs{fcolorbox}}. % Enhanced for \HTML\ compatibility. \\ @@ -5821,7 +5866,7 @@ This boolean may be tested by the user for later use. % Also see the math section for math and \brand{MathJax} support for math font packages. \\ % % Symbols: & Native \LaTeX\ diacriticals, \mpkg{academicons}, \spkg{amssymb}\sjax, -% \mpkg{bbding}, +% \mpkg{bbding}, \mpkg{ccicons}, % \mpkg{chemgreek}, \mpkg{dingbat}, \spkg{euro}, \mpkg{eurosym}, % \mpkg{fontawesome}, \mpkg{fontawesome5}, \spkg{gensymb}\ejax, \spkg{latexsym}\sjax, % \mpkg{marvosym}, @@ -5872,7 +5917,8 @@ This boolean may be tested by the user for later use. % % \midrule % -% Calendars: & \mpkg{termcal} \\ +% Academic: & \mpkg{academicons}, \epkg{classicthesis}, \spkg{doi}, +% \spkg{doipubmed}, \mpkg{orcidlink}\ijax, \mpkg{termcal} \\ % % \midrule % @@ -6620,7 +6666,7 @@ This boolean may be tested by the user for later use. % own auxiliary files. In this way, both \PDF\ and \HTML\ % documents may co-exist side-by-side. % -% \item [Auxiliary files:] The usual \LaTeX\ files |.aux|, |.log|, |.out|, |.toc|, |.lof|, |.idx|. +% \item [Auxiliary files:] The usual \LaTeX\ files |.aux|, |.log|, |.out|, \filenm{.toc}, \filenm{.lof}, |.idx|. % When an \HTML\ version of the document is created, |_html| versions % of the auxiliary files will also be generated. % @@ -7012,7 +7058,7 @@ This boolean may be tested by the user for later use. % % \subsection{Cleaning auxiliary files} % -% To remove the auxiliary files |.aux|, |.toc|, |.lof|, |.lot|, |.idx|, |.ind|, |.log|, +% To remove the auxiliary files |.aux|, \filenm{.toc}, \filenm{.lof}, \filenm{.lot}, |.idx|, |.ind|, |.log|, % and |.gl*|, and a few others: % \userentry{lwarpmk clean} % @@ -7277,14 +7323,20 @@ This boolean may be tested by the user for later use. % \gindex{link>title=\attribute{title} text} % \gindex{hyperref=\pkg{hyperref}>title=\attribute{title} text} % \gindex{settings>accessibility} +% \gindex{ARIA=\acro{ARIA}} +% \gindex{roles>ARIA=\acro{ARIO}} % % \pkg{lwarp} provides several methods for improving access to % the document using tools such as text-only browsers, copy \Slash paste, % text-to-speech readers, or Braille readers. -% \HTML\ provides the \attribute{alt} text attribute for images, -% which is used by \pkg{lwarp} as describe below. -% \HTML\ also provides the \attribute{title} attribute, which usually +% \pkg{lwarp} can use the \HTML\ \attribute{alt} text attribute for images, +% as describe below. +% \pkg{lwarp} can also use the \HTML\ \attribute{title} attribute, which usually % generates a pop-up text. \pkg{lwarp} can add this to a reference or hyperlink. +% \pkg{lwarp} also uses standard \HTML5 elements which are pre-assigned +% \ARIA\ roles for increased accessibility, and \pkg{lwarp} assigns the |math| +% role for \SVG\ math images, and the |note| role for footnotes, end notes, +% margin paragraphs and notes, etc. % \brand{MathJax} also has provisions for improved accessibility % as well. See \cref{tab:accessibility}. % @@ -9613,7 +9665,7 @@ This boolean may be tested by the user for later use. % \cs{usepackage}[ \\ % \fqquad \textred{makeindex,} \\ % \fqquad \textred{makeindexStyle=gindex.ist,} \\ -% \fqquad \dots or \dots \\ +% \fqquad \dots\ or \dots \\ % \fqquad \textred{makeindexStyle=gindexh.ist,} \\ % \fqquad \textgreen{latexmk} \hfill \textrm{}\\ % ]\{\textblue{lwarp}\} @@ -10141,7 +10193,7 @@ This boolean may be tested by the user for later use. % \DescribeOption{makeindexStyle} % \begin{sourcedisplay} % \cs{usepackage}[ \\ -% \fquad \dots other options \dots \\ +% \fquad \dots\ other options \dots \\ % \fquad \textred{makeindex}, \\ % \fquad \textred{makeindexStyle=projectname.ist}, \\ % ]\{lwarp\} @@ -10200,7 +10252,7 @@ This boolean may be tested by the user for later use. % \DescribeOption{xindyStyle} % \begin{sourcedisplay} % \cs{usepackage}[ \\ -% \fquad \dots other options \dots \\ +% \fquad \dots\ other options \dots \\ % \fquad \textred{xindy}, \\ % \fquad \textred{xindyStyle=projectname.xdy}, \\ % ]\{lwarp\} @@ -10237,7 +10289,7 @@ This boolean may be tested by the user for later use. % \DescribeOption{xindexConfig} % \begin{sourcedisplay} % \cs{usepackage}[ \\ -% \fquad \dots other options \dots \\ +% \fquad \dots\ other options \dots \\ % \fquad \textred{xindex}, \\ % \fquad \textred{xindexConfig=projectname}, \quad \% \textgreen{(without xindex- or .lua)} \\ % ]\{lwarp\} @@ -10341,6 +10393,10 @@ This boolean may be tested by the user for later use. % \limitsmathdisplay % % +% \subsubsection{Theorems} +% \limitstheorems +% \changes{v0.896}{2021/03/25}{Docs: Theorem references.} +% % \subsubsection{\pkg{ntheorem} package} % % \DescribePackage{ntheorem} @@ -10890,8 +10946,8 @@ This boolean may be tested by the user for later use. % No attempt has yet been made to make \pkg{pythontex} robust with \HTML\ output. % Some math objects must be surrounded by % \trouble[``impure'' math]{pythontex=\pkg{pythontex}} -% \cs{displaymathother} \dots \cs{displaymathnormal}, -% or \cs{inlinemathother} \dots \cs{inlinemathnormal}. +% \cs{displaymathother} \dots\ \cs{displaymathnormal}, +% or \cs{inlinemathother} \dots\ \cs{inlinemathnormal}. % Displays of code may have to be % enclosed inside a \env{lateximage} environment % \watchout[HTML look-alike] @@ -11949,7 +12005,7 @@ This boolean may be tested by the user for later use. % \item [``Temporary page! LaTeX was unable to guess the total % number of pages \dots'':] \ % Harmless. Recompile the document one more time. -% \trouble{Temporary page \dots unable to guess \dots} +% \trouble{Temporary page \dots\ unable to guess \dots} % \trouble{LaTeX was unable to guess the total\dots} % % \item [``Leaders not followed by proper glue'':] ~ \\ @@ -12051,8 +12107,8 @@ This boolean may be tested by the user for later use. % \trouble{alt tags} % can also cause problems with \attribute{alt} tags, resulting in % very slow compilation, large \attribute{alt} tags, and possible -% crashes. Use \cs{inlinemathother} \dots \cs{inlinemathnormal} or -% \cs{displaymathother} \dots \cs{displaymathnormal} around the +% crashes. Use \cs{inlinemathother} \dots\ \cs{inlinemathnormal} or +% \cs{displaymathother} \dots\ \cs{displaymathnormal} around the % math expression. % \end{description} % @@ -12896,6 +12952,7 @@ This boolean may be tested by the user for later use. \LWR@loadafter{bussproofs} \LWR@loadafter{bxpapersize} \LWR@loadafter{bytefield} +\LWR@loadafter{ccicons} \LWR@loadafter{cancel} \LWR@loadafter{canoniclayout} \LWR@loadafter{caption} @@ -12920,6 +12977,7 @@ This boolean may be tested by the user for later use. \LWR@notmemoirloadafter{chngpage} \LWR@loadafter{cite} \LWR@loadafter{citeref} +\LWR@loadafter{classicthesis} \LWR@loadafter{cleveref} % cmbright may be preloaded \LWR@loadafter{cmdtrack} @@ -12957,6 +13015,7 @@ This boolean may be tested by the user for later use. \LWR@loadafter{endheads} \LWR@loadafter{endnotes} \LWR@loadafter{engtlc} +\LWR@loadafter{enotez} \LWR@notmemoirloadafter{enumerate} \LWR@loadafter{enumitem} \LWR@notmemoirloadafter{epigraph} @@ -13171,6 +13230,7 @@ This boolean may be tested by the user for later use. \LWR@loadafter{nowidow} \LWR@loadafter{ntheorem} \LWR@loadafter{octave} +\LWR@loadafter{orcidlink} \LWR@loadafter{overpic} \LWR@loadafter{pagegrid} \LWR@notmemoirloadafter{pagenote} @@ -13381,7 +13441,7 @@ This boolean may be tested by the user for later use. \LWR@loadafter{xcolor} \LWR@loadafter{xechangebar} \LWR@loadafter{xellipsis} -% xetexko-vertical must be loaded before lwarp +% xetexko must be loaded before lwarp \LWR@loadafter{xevlna} \LWR@loadafter{xfakebold} \LWR@loadafter{xfrac} @@ -13739,25 +13799,29 @@ This boolean may be tested by the user for later use. % % \subsection{Argument selection} % -% \begin{macro}{\LWR@firstoffour} \marg{first} \marg{second} \marg{third} \marg{fourth} +% \begin{macro}{\LWR@firstoffive} \marg{first} \marg{second} \marg{third} \marg{fourth} \marg{fifth} % \changes{v0.63}{2019/01/25}{Added.} -% \begin{macro}{\LWR@secondoffour} \marg{first} \marg{second} \marg{third} \marg{fourth} -% \begin{macro}{\LWR@thirdoffour} \marg{first} \marg{second} \marg{third} \marg{fourth} -% \begin{macro}{\LWR@fourthoffour} \marg{first} \marg{second} \marg{third} \marg{fourth} +% \changes{v0.896}{2021/04/05}{Changed to firstoffive instead of four.} +% \begin{macro}{\LWR@secondoffive} \marg{first} \marg{second} \marg{third} \marg{fourth} \marg{fifth} +% \begin{macro}{\LWR@thirdoffive} \marg{first} \marg{second} \marg{third} \marg{fourth} \marg{fifth} +% \begin{macro}{\LWR@fourthoffive} \marg{first} \marg{second} \marg{third} \marg{fourth} \marg{fifth} +% \begin{macro}{\LWR@fifthoffive} \marg{first} \marg{second} \marg{third} \marg{fourth} \marg{fifth} % -% Expands to the nth of the four arguments. +% Expands to the nth of the five arguments. % Used for extra cross referencing. % % \begin{macrocode} -\long\def\LWR@firstoffour#1#2#3#4{#1} -\long\def\LWR@secondoffour#1#2#3#4{#2} -\long\def\LWR@thirdoffour#1#2#3#4{#3} -\long\def\LWR@fourthoffour#1#2#3#4{#4} +\long\def\LWR@firstoffive#1#2#3#4#5{#1} +\long\def\LWR@secondoffive#1#2#3#4#5{#2} +\long\def\LWR@thirdoffive#1#2#3#4#5{#3} +\long\def\LWR@fourthoffive#1#2#3#4#5{#4} +\long\def\LWR@fifthoffive#1#2#3#4#5{#5} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % % % \subsection{Inside boxes} @@ -15676,6 +15740,7 @@ This boolean may be tested by the user for later use. % \begin{macrocode} \RenewDocumentCommand{\RequirePackage}{o m o}{% % \end{macrocode} +% % Redirect up to twenty names:\footnote{This was originally nine names, but % then I came across a package which used twelve...} % \changes{v0.61}{2018/10/02}{Support up to 20 packages.} @@ -15703,6 +15768,31 @@ This boolean may be tested by the user for later use. \LWR@lookforpackagename{19}% \LWR@lookforpackagename{20}% % \end{macrocode} +% +% Error if braces are used in optional argument. +% This can cause an error, so tell how to avoid. +% \changes{v0.896}{2021/03/14}{Warn if package option has braces.} +% \begin{macrocode} +\IfSubStr{\detokenize\expandafter{#1}}{\LWRleftbrace}% + {% + \PackageError{lwarp}{% + You used:\MessageBreak + \protect\requirepackage[#1]{#2}\MessageBreak + Braces in the package options will fail with Lwarp.\MessageBreak + Instead, use:\MessageBreak + \protect\PassOptionsToPackage{#1}{#2}\MessageBreak + \protect\requirepackage{#2}\MessageBreak + near the line number given below.\MessageBreak + Enter 'h' for more info% + }% + {% + See the Lwarp manual troubleshooting index entry for\MessageBreak + ``package, options with braces''% + }% + }% + {}% no brace +% \end{macrocode} +% % \cs{RequirePackage} depending on the options and version: % \begin{macrocode} \IfValueTF{#1}% @@ -15967,7 +16057,7 @@ This boolean may be tested by the user for later use. % \begin{macro}{\LWR@copyfile} \marg{source filename} \marg{destination filename} % -% Used to copy the |.toc| file to |.sidetoc| to re-print the \TOC\ in +% Used to copy the \filenm{.toc} file to |.sidetoc| to re-print the \TOC\ in % the side\TOC\ navigation pane. % \begin{macrocode} \newwrite\LWR@copyoutfile % open the file to write to @@ -17389,6 +17479,7 @@ This boolean may be tested by the user for later use. % \changes{v0.88}{2020/07/14}{\filenm{lwarp.css}: Added \optn{indexheading} for \pkg{gindex}.} % \changes{v0.893}{2020/10/18}{\filenm{lwarp.css}: Added \pkg{keystroke}.} % \changes{v0.894}{2020/12/15}{\filenm{lwarp.css}: \TeX\ logos no longer below baseline.} +% \changes{v0.896}{2021/03/04}{\filenm{lwarp.css}: Added \element{main}, adjusted \element{sidetoccontainer} margin.} % % ^^A *lwarp.css % @@ -17888,12 +17979,12 @@ div.marginblock br , div.marginparblock br { margin-bottom: 2ex ; } -div.bodycontainer { +main.bodycontainer { float: left ; width: 80% ; } -div.bodywithoutsidetoc div.bodycontainer { +div.bodywithoutsidetoc main.bodycontainer { float: none ; width: 100% ; } @@ -18735,15 +18826,12 @@ img.lateximage{ } -/* The -1px right margin compensates for the 1px right border. */ -/* Without this -1px margin, the body container appears below instead */ -/* of floating to the side. */ div.sidetoccontainer { font-family: "DejaVu Serif", "Bitstream Vera Serif", "Lucida Bright", Georgia, serif; float: left ; - width: 20%; - margin: 0pt -1px 3ex 0pt ; + width: 19%; /* room for border-right next to 80% main */ + margin: 0pt 0em 3ex 0pt ; border-right: 1px solid silver; border-bottom: 1px solid silver; background: #FAF7F4 ; @@ -19097,7 +19185,7 @@ span.sidetocthetitle { display: none } span.sidetocthetitle { display: inline } nav.topnavigation { display:block } nav.botnavigation { display:block } - div.bodycontainer { width: 100% } + main.bodycontainer { width: 100% } .marginpar { max-width: 100%; float: none; @@ -19116,21 +19204,21 @@ span.sidetocthetitle { display: none } div.sidetoccontainer { display:none; } nav.topnavigation { display: none; } nav.botnavigation { display: none; } - div.bodycontainer { width: 100% } + main.bodycontainer { width: 100% } } @media handheld { div.sidetoccontainer { display:none; } nav.topnavigation { display:block } nav.botnavigation { display:block } - div.bodycontainer { width: 100% } + main.bodycontainer { width: 100% } } @media projection { div.sidetoccontainer { display:none; } nav.topnavigation { display:block } nav.botnavigation { display:block } - div.bodycontainer { width: 100% } + main.bodycontainer { width: 100% } } \end{filecontents*} % \end{Verbatim}% for syntax highlighting @@ -20192,7 +20280,7 @@ MathJax = { -- Copyright 2016-2021 Brian Dunn -printversion = "v0.895" +printversion = "v0.896" requiredconfversion = "2" -- also at *lwarpmk.conf function printhelp () @@ -21169,9 +21257,7 @@ end -- not --version % \begin{macrocode} \begin{warpHTML} % \end{macrocode} - - - +% % Stacks are used to remember how to close sections and list items. % Before a new section is started, previously nested sections and items must % be closed out (un-nested) in proper order. @@ -21224,6 +21310,7 @@ end -- not --version % A stack to record the action to take to close each nesting level: % Add more levels of stack if necessary for a very deeply nested document, % adding to \cs{pushclose} and \cs{popclose} as well. +% \changes{v0.896}{2021/03/15}{Stack 19 deep.} % \begin{macrocode} \newcommand*{\LWR@closeone}{}% top of the stack \newcommand*{\LWR@closetwo}{} @@ -21237,6 +21324,13 @@ end -- not --version \newcommand*{\LWR@closeten}{} \newcommand*{\LWR@closeeleven}{} \newcommand*{\LWR@closetwelve}{} +\newcommand*{\LWR@closethirteen}{} +\newcommand*{\LWR@closefourteen}{} +\newcommand*{\LWR@closefifteen}{} +\newcommand*{\LWR@closesixteen}{} +\newcommand*{\LWR@closeseventeen}{} +\newcommand*{\LWR@closeeighteen}{} +\newcommand*{\LWR@closenineteen}{} % \end{macrocode} % \subsection{Closing depths} @@ -21258,7 +21352,8 @@ end -- not --version % \end{Verbatim} % \vspace{-\baselineskip} % \end{docsidebar} - +% +% \changes{v0.896}{2021/03/15}{Stack 19 deep.} % \begin{macrocode} \newcommand*{\LWR@closedepthone}{\LWR@depthnone}% top of the stack \newcommand*{\LWR@closedepthtwo}{\LWR@depthnone} @@ -21272,6 +21367,13 @@ end -- not --version \newcommand*{\LWR@closedepthten}{\LWR@depthnone} \newcommand*{\LWR@closedeptheleven}{\LWR@depthnone} \newcommand*{\LWR@closedepthtwelve}{\LWR@depthnone} +\newcommand*{\LWR@closedepththirteen}{\LWR@depthnone} +\newcommand*{\LWR@closedepthfourteen}{\LWR@depthnone} +\newcommand*{\LWR@closedepthfifteen}{\LWR@depthnone} +\newcommand*{\LWR@closedepthsixteen}{\LWR@depthnone} +\newcommand*{\LWR@closedepthseventeen}{\LWR@depthnone} +\newcommand*{\LWR@closedeptheighteen}{\LWR@depthnone} +\newcommand*{\LWR@closedepthnineteen}{\LWR@depthnone} % \end{macrocode} % \subsection{Pushing and popping the stack} @@ -21280,9 +21382,17 @@ end -- not --version % Pushes one return action and its \LaTeX\ depth onto the stacks. % \changes{v0.46}{2018/01/18}{Fix: Stack unnesting.} +% \changes{v0.896}{2021/03/15}{Stack 19 deep.} % \begin{macrocode} \NewDocumentCommand{\LWR@pushclose}{m} {% +\global\let\LWR@closenineteen\LWR@closeeighteen% +\global\let\LWR@closeeighteen\LWR@closeseventeen% +\global\let\LWR@closeseventeen\LWR@closesixteen% +\global\let\LWR@closesixteen\LWR@closefifteen% +\global\let\LWR@closefifteen\LWR@closefourteen% +\global\let\LWR@closefourteen\LWR@closethirteen% +\global\let\LWR@closethirteen\LWR@closetwelve% \global\let\LWR@closetwelve\LWR@closeeleven% \global\let\LWR@closeeleven\LWR@closeten% \global\let\LWR@closeten\LWR@closenine% @@ -21295,6 +21405,13 @@ end -- not --version \global\let\LWR@closethree\LWR@closetwo% \global\let\LWR@closetwo\LWR@closeone% \global\csletcs{LWR@closeone}{LWR@printclose#1}% +\global\let\LWR@closedepthnineteen\LWR@closedeptheighteen% +\global\let\LWR@closedeptheighteen\LWR@closedepthseventeen% +\global\let\LWR@closedepthseventeen\LWR@closedepthsixteen% +\global\let\LWR@closedepthsixteen\LWR@closedepthfifteen% +\global\let\LWR@closedepthfifteen\LWR@closedepthfourteen% +\global\let\LWR@closedepthfourteen\LWR@closedepththirteen% +\global\let\LWR@closedepththirteen\LWR@closedepthtwelve% \global\let\LWR@closedepthtwelve\LWR@closedeptheleven% \global\let\LWR@closedeptheleven\LWR@closedepthten% \global\let\LWR@closedepthten\LWR@closedepthnine% @@ -21307,6 +21424,20 @@ end -- not --version \global\let\LWR@closedepththree\LWR@closedepthtwo% \global\let\LWR@closedepthtwo\LWR@closedepthone% \global\csletcs{LWR@closedepthone}{LWR@depth#1}% +% \end{macrocode} +% +% Error if the deepest depth is no longer \cs{LWR@depthnone}, +% which means that it somehow has been nested too deeply, +% or things are not being unnested correctly. +% \changes{v0.896}{2021/03/15}{Error if stack overflow.} +% \begin{macrocode} +\ifdefstring{\LWR@closedepthnineteen}{\LWR@depthnone}% + {}% + {% + \PackageError{lwarp}% + {The document is nested too deeply for Lwarp}% + {PLEASE inform the Lwarp maintainer!}% + }% } % \end{macrocode} % \end{macro} @@ -21316,6 +21447,7 @@ end -- not --version % Pops one action and its depth off the stacks. % \changes{v0.46}{2018/01/18}{Fix: Stack unnesting.} +% \changes{v0.896}{2021/03/15}{Stack 19 deep.} % \begin{macrocode} \newcommand*{\LWR@popclose} {% @@ -21330,6 +21462,13 @@ end -- not --version \global\let\LWR@closenine\LWR@closeten% \global\let\LWR@closeten\LWR@closeeleven% \global\let\LWR@closeeleven\LWR@closetwelve% +\global\let\LWR@closetwelve\LWR@closethirteen% +\global\let\LWR@closethirteen\LWR@closefourteen% +\global\let\LWR@closefourteen\LWR@closefifteen% +\global\let\LWR@closefifteen\LWR@closesixteen% +\global\let\LWR@closesixteen\LWR@closeseventeen% +\global\let\LWR@closeseventeen\LWR@closeeighteen% +\global\let\LWR@closeeighteen\LWR@closenineteen% \global\let\LWR@closedepthone\LWR@closedepthtwo% \global\let\LWR@closedepthtwo\LWR@closedepththree% \global\let\LWR@closedepththree\LWR@closedepthfour% @@ -21341,6 +21480,13 @@ end -- not --version \global\let\LWR@closedepthnine\LWR@closedepthten% \global\let\LWR@closedepthten\LWR@closedeptheleven% \global\let\LWR@closedeptheleven\LWR@closedepthtwelve% +\global\let\LWR@closedepthtwelve\LWR@closedepththirteen% +\global\let\LWR@closedepththirteen\LWR@closedepthfourteen% +\global\let\LWR@closedepthfourteen\LWR@closedepthfifteen% +\global\let\LWR@closedepthfifteen\LWR@closedepthsixteen% +\global\let\LWR@closedepthsixteen\LWR@closedepthseventeen% +\global\let\LWR@closedepthseventeen\LWR@closedeptheighteen% +\global\let\LWR@closedeptheighteen\LWR@closedepthnineteen% } % \end{macrocode} % \end{macro} @@ -21524,7 +21670,7 @@ end -- not --version \boolfalse{LWR@dynamicmath} % \end{macrocode} % -% \begin{macro}{\inlinemathother} Place before using |$| \dots\ |$| or \cs{(} \dots \cs{)} +% \begin{macro}{\inlinemathother} Place before using |$| \dots\ |$| or \cs{(} \dots\ \cs{)} % if the contents of the math are not static, depending on counters or dynamic macros. % \changes{v0.57}{2018/05/23}{Added.} % \changes{v0.61}{2018/09/20}{Changed name from \cs{StartDynamicMath} to \cs{inlinemathother}.} @@ -21536,7 +21682,7 @@ end -- not --version % \end{macrocode} % \end{macro} % -% \begin{macro}{\inlinemathnormal} Place after using |$| \dots\ |$| or \cs{(} \dots \cs{)} +% \begin{macro}{\inlinemathnormal} Place after using |$| \dots\ |$| or \cs{(} \dots\ \cs{)} % with dynamic contents. % \changes{v0.61}{2018/09/20}{Changed name from \cs{StopDynamicMath} to \cs{inlinemathnormal}.} % \begin{macrocode} @@ -22069,12 +22215,16 @@ end -- not --version % \begin{macro}{\LWRPrintStack} Prints the closedepth stack. % \changes{v0.46}{2018/01/15}{Name changed from \cs{PrintStack}.} +% \changes{v0.896}{2021/03/15}{Stack 19 deep.} % \begin{macrocode} \newcommand*{\LWR@subprintstack}{ \LWR@closedepthone\ \LWR@closedepthtwo\ \LWR@closedepththree\ \LWR@closedepthfour\ \LWR@closedepthfive\ \LWR@closedepthsix\ \LWR@closedepthseven\ \LWR@closedeptheight\ \LWR@closedepthnine\ \LWR@closedepthten\ \LWR@closedeptheleven\ \LWR@closedepthtwelve\ +\LWR@closedepththirteen\ \LWR@closedepthfourteen\ \LWR@closedepthfifteen\ +\LWR@closedepthsixteen\ \LWR@closedepthseventeen\ \LWR@closedeptheighteen\ +\LWR@closedepthnineteen\ } \newcommand*{\LWRPrintStack}{ @@ -22490,6 +22640,7 @@ end -- not --version % \changes{v0.73}{2019/06/23}{Fix: \env{quote}, \env{quotation} inside a span.} % \changes{v0.84}{2020/04/22}{Nullified \env{minipage}, \cs{parbox} inside a span.} % \changes{v0.84}{2020/04/22}{Issue warnings inside a span.} +% \changes{v0.896}{2021/03/05}{Issue \env{BlockClassWP} warning inside a span.} % % \begin{macrocode} \newcommand*{\LWR@nestspanitem}{% @@ -22518,6 +22669,9 @@ end -- not --version \RenewDocumentEnvironment{BlockClass}{o m}% {\LWR@spanwarnformat{multi-paragraph object}}% {}% + \RenewDocumentEnvironment{LWR@BlockClassWP}{m m D(){} m}% + {\LWR@spanwarnformat{multi-paragraph object}}% + {}% \renewcommand{\BlockClassSingle}[2]{% {\LWR@spanwarnformat{multi-paragraph object}}% ##2% @@ -22566,20 +22720,23 @@ end -- not --version % \end{macro} -% \begin{macro}{\LWR@htmlspanclass} \oarg{style} \marg{class} \marg{text} +% \begin{macro}{\LWR@htmlspanclass} +% \oarg{style} \parg{\ARIA\ role} \marg{class} \marg{text} % % \changes{v0.34}{2017/08/02}{Moved optional argument in front of mandatory.} -% +% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.} % \begin{macrocode} -\NewDocumentCommand{\LWR@htmlspanclass}{o m +m}{% -\LWR@traceinfo{LWR@htmlspanclass |#1|#2|}% -\LWR@ensuredoingapar% -\LWR@subhtmlelementclass{span}[#1]{#2}% -\begin{LWR@nestspan}% -#3% -\LWR@htmltagc{/span}% -\LWR@traceinfo{LWR@htmlspanclass done}% -\end{LWR@nestspan}% +\NewDocumentCommand{\LWR@htmlspanclass}{o D(){} m +m}{% + \LWR@traceinfo{LWR@htmlspanclass |#1|#2|#3|}% + \LWR@ensuredoingapar% + \ifblank{#2}% + {\LWR@subhtmlelementclass{span}[#1]{#3}}% + {\LWR@subhtmlelementclass{span}[#1](#2){#3}}% + \begin{LWR@nestspan}% + #4% + \LWR@htmltagc{/span}% + \LWR@traceinfo{LWR@htmlspanclass done}% + \end{LWR@nestspan}% } % \end{macrocode} % \end{macro} @@ -22676,7 +22833,8 @@ end -- not --version % \subsection{Div class and element class} -% \begin{macro}{\LWR@subhtmlelementclass} \marg{element} \oarg{style} \marg{class} +% \begin{macro}{\LWR@subhtmlelementclass} +% \marg{element} \oarg{style} \parg{\ARIA\ role} \marg{class} % % Factored and reused in several places. % @@ -22690,21 +22848,24 @@ end -- not --version % \changes{v0.63}{2018/11/24}{Fix for \pkg{xeCJK}.} % \changes{v0.66}{2019/02/02}{Improved \HTML\ formatting.} % \changes{v0.892}{2020/10/03}{Ignore empty class.} +% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.} % % \begin{macrocode} -\NewDocumentCommand{\LWR@subhtmlelementclass}{m O{} m}{% -\LWR@traceinfo{LWR@subhtmlelementclass !#1!#2!#3!}% +\NewDocumentCommand{\LWR@subhtmlelementclass}{m O{} D(){} m}{% +\LWR@traceinfo{LWR@subhtmlelementclass !#1!#2!#3!#4!}% \ifblank{#2}% {% empty style \LWR@htmltag{% #1% - \ifblank{#3}{}{ class=\textquotedbl#3\textquotedbl\ }% spaces + \ifblank{#3}{}{ role=\textquotedbl#3\textquotedbl}% spaces + \ifblank{#4}{}{ class=\textquotedbl#4\textquotedbl}% spaces }% }% {% non-empty style \LWR@htmltag{% #1\LWR@indentHTML% - \ifblank{#3}{}{class=\textquotedbl#3\textquotedbl\LWR@indentHTML}% + \ifblank{#3}{}{role=\textquotedbl#3\textquotedbl\LWR@indentHTML}% + \ifblank{#4}{}{class=\textquotedbl#4\textquotedbl\LWR@indentHTML}% style=\textquotedbl#2\textquotedbl\LWR@orignewline% }% }% @@ -22714,17 +22875,20 @@ end -- not --version % \end{macro} -% \begin{macro}{\LWR@htmlelementclass} \marg{element} \marg{class} \oarg{style} +% \begin{macro}{\LWR@htmlelementclass} \marg{element} \oarg{style} \marg{class} % % \changes{v0.20}{2017/01/17}{Added optional style.} % \changes{v0.34}{2017/08/02}{Moved optional argument in front of mandatory.} % \changes{v0.73}{2019/06/26}{Vertical space.} +% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.} % \begin{macrocode} -\NewDocumentCommand{\LWR@htmlelementclass}{m o m}{% -\LWR@stoppars% -\LWR@forceemptyline% -\LWR@subhtmlelementclass{#1}[#2]{#3}% -\LWR@startpars% +\NewDocumentCommand{\LWR@htmlelementclass}{m o D(){} m}{% + \LWR@stoppars% + \LWR@forceemptyline% + \ifblank{#3}% + {\LWR@subhtmlelementclass{#1}[#2]{#4}}% + {\LWR@subhtmlelementclass{#1}[#2](#3){#4}}% + \LWR@startpars% } % \end{macrocode} % \end{macro} @@ -22733,24 +22897,27 @@ end -- not --version % \begin{macro}{\LWR@htmlelementclassend} \marg{element} \marg{class} % \begin{macrocode} \newcommand*{\LWR@htmlelementclassend}[2]{% -\LWR@stoppars% -\LWR@htmltag{/#1}% -\ifbool{HTMLDebugComments}{% - \LWR@htmlcomment{End of #1 ``#2''}% -}{}% -\LWR@startpars% + \LWR@stoppars% + \LWR@htmltag{/#1}% + \ifbool{HTMLDebugComments}{% + \LWR@htmlcomment{End of #1 ``#2''}% + }{}% + \LWR@startpars% } % \end{macrocode} % \end{macro} -% \begin{macro}{\LWR@htmldivclass} \oarg{style} \marg{class} +% \begin{macro}{\LWR@htmldivclass} \oarg{style} \parg{\ARIA\ role} \marg{class} % % \changes{v0.20}{2017/01/17}{Added optional style.} % \changes{v0.34}{2017/08/02}{Moved optional argument in front of mandatory.} +% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.} % % \begin{macrocode} -\NewDocumentCommand{\LWR@htmldivclass}{o m}{% -\LWR@htmlelementclass{div}[#1]{#2}% +\NewDocumentCommand{\LWR@htmldivclass}{o D(){} m}{% + \ifblank{#2} + {\LWR@htmlelementclass{div}[#1]{#3}}% + {\LWR@htmlelementclass{div}[#1](#2){#3}}% } % \end{macrocode} % \end{macro} @@ -22758,7 +22925,7 @@ end -- not --version % \begin{macro}{\LWR@htmldivclassend} \marg{class} % \begin{macrocode} \newcommand*{\LWR@htmldivclassend}[1]{% -\LWR@htmlelementclassend{div}{#1}% + \LWR@htmlelementclassend{div}{#1}% } % \end{macrocode} % \end{macro} @@ -22825,7 +22992,7 @@ end -- not --version % For other direct-formatting commands, see \cref{sec:directformatting}. % % -% \begin{environment}{BlockClass} \oarg{style} \marg{class} \quad +% \begin{environment}{BlockClass} \oarg{style} \parg{\ARIA\ role} \marg{class} \quad % High-level interface for \element{div} classes. % % \qquad Ex: |\begin{BlockClass}{class}| text |\end{BlockClass}| @@ -22834,11 +23001,12 @@ end -- not --version % \changes{v0.20}{2017/01/17}{Added optional style.} % \changes{v0.34}{2017/08/02}{Moved optional argument in front of mandatory.} % \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.} +% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.} % % \codeprint % \begin{macrocode} \begin{warpprint} -\NewDocumentEnvironment{BlockClass}{o m}{}{}% +\NewDocumentEnvironment{BlockClass}{o D(){} m}{}{} \end{warpprint} % \end{macrocode} % \end{environment} @@ -22847,11 +23015,11 @@ end -- not --version % \begin{macrocode} \begin{warpHTML} -\NewDocumentEnvironment{LWR@print@BlockClass}{o m}{}{}% +\NewDocumentEnvironment{LWR@print@BlockClass}{o D(){} m}{}{}% -\NewDocumentEnvironment{LWR@HTML@BlockClass}{o m}% - {\LWR@htmldivclass[#1]{#2}} - {\LWR@htmldivclassend{#2}} +\NewDocumentEnvironment{LWR@HTML@BlockClass}{o D(){} m}% + {\LWR@htmldivclass[#1](#2){#3}}% + {\LWR@htmldivclassend{#3}} \LWR@formattedenv{BlockClass} \end{warpHTML} @@ -22914,11 +23082,15 @@ end -- not --version \NewDocumentCommand{\LWR@print@InlineClass}{D{(}{)}{} o m +m}{#4}% \NewDocumentCommand{\LWR@HTML@InlineClass}{D{(}{)}{} o m +m}{% +\LWR@traceinfo{LWR@HTML@InlineClass #3}% \ifbool{FormatWP}{% + \LWR@traceinfo{LWR@HTML@InlineClass: FormatWP}% \LWR@htmlspanclass[#1]{#3}{#4}% }{% + \LWR@traceinfo{LWR@HTML@InlineClass: not FormatWP}% \LWR@htmlspanclass[#2]{#3}{#4}% }% +\LWR@traceinfo{LWR@HTML@InlineClass: done}% } \LWR@formatted{InlineClass} @@ -22926,7 +23098,8 @@ end -- not --version % \end{macrocode} -% \begin{environment}{LWR@BlockClassWP} \marg{WPstyle} \marg{HTMLstyle} \marg{class} \quad +% \begin{environment}{LWR@BlockClassWP} +% \marg{WPstyle} \marg{HTMLstyle} \parg{\ARIA\ role} \marg{class} \quad % Low-level interface for \element{div} classes with an automatic float ID. % These are often used when |\ifbool{FormatWP}|. % @@ -22937,11 +23110,12 @@ end -- not --version % \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.} % \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.} % \changes{v0.63}{2018/11/24}{Fix for \pkg{xeCJK}.} +% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.} % % \codeprint % \begin{macrocode} \begin{warpprint} -\NewDocumentEnvironment{LWR@BlockClassWP}{m m m}{}{}% +\NewDocumentEnvironment{LWR@BlockClassWP}{m m D(){} m}{}{} \end{warpprint} % \end{macrocode} % \end{environment} @@ -22949,8 +23123,9 @@ end -- not --version % \codehtml % \begin{macrocode} \begin{warpHTML} -\NewDocumentEnvironment{LWR@print@LWR@BlockClassWP}{m m m}{}{}% -\NewDocumentEnvironment{LWR@HTML@LWR@BlockClassWP}{m m m}% +\NewDocumentEnvironment{LWR@print@LWR@BlockClassWP}{m m D(){} m}{}{}% + +\NewDocumentEnvironment{LWR@HTML@LWR@BlockClassWP}{m m D(){} m}% {% \LWR@stoppars% \ifbool{FormatWP}% @@ -22960,22 +23135,24 @@ end -- not --version % \changes{v0.65}{2018/12/21}{Fix space between class and id.} % \begin{macrocode} \LWR@htmltag{% - div class=\textquotedbl#3\textquotedbl\ % space + div class=\textquotedbl#4\textquotedbl\ % space id=\textquotedbl% \LWR@print@mbox{autoidWP-\arabic{LWR@thisautoidWP}}% \textquotedbl% + \ifblank{#3}{}{ role=\textquotedbl#3\textquotedbl}% \ifblank{#1}{}{ style=\textquotedbl#1\textquotedbl}% }% }% FormatWP {% not FormatWP \LWR@htmltag{% - div class=\textquotedbl#3\textquotedbl% + div class=\textquotedbl#4\textquotedbl% + \ifblank{#3}{}{ role=\textquotedbl#3\textquotedbl}% \ifblank{#2}{}{ style=\textquotedbl#2\textquotedbl}% }% }% not FormatWP \LWR@startpars% } -{\LWR@htmldivclassend{#3}} +{\LWR@htmldivclassend{#4}} \LWR@formattedenv{LWR@BlockClassWP} \end{warpHTML} @@ -23866,14 +24043,30 @@ end -- not --version % \changes{v0.36}{2017/08/15}{Extra \protect\HTML\ source space after paragraphs.} % \changes{v0.36}{2017/08/16}{Force \protect\HTML\ superscripts.} % \changes{v0.68}{2019/03/04}{Factored for multiple foot boxes.} +% \changes{v0.896}{2021/04/04}{Fix: \ctr{autopage} references in footnotes.} % % \begin{macrocode} \long\def\LWR@@footnotetext#1#2{% \LWR@traceinfo{LWR@footnotetext}% -\global\setbox\csname #2\endcsname=\vbox{% % \end{macrocode} -% Add to any current footnotes: +% +% Perhaps generate an autopage in the text to link a citation backreference +% closer to its usage. +% \begin{macrocode} +\LWR@newautopagelabel{page}% +% \end{macrocode} +% +% Locally disable auto page labels inside the footnote text. +% Footnotes are accumulated in the current page before finally being placed +% in a potentially later page, so the aotopages would be incorrect. +% \begin{macrocode} +\begingroup% +\let\LWR@newautopagelabel\LWR@null@newautopagelabel% +% \end{macrocode} +% +% Take the existing footnote box and add the new content: % \begin{macrocode} +\global\setbox\csname #2\endcsname=\vbox{% \unvbox\csname #2\endcsname% % \end{macrocode} % Remember the footnote number for \cs{ref}: @@ -23929,6 +24122,7 @@ end -- not --version % \begin{macrocode} \color@endgroup% }% vbox +\endgroup% % \end{macrocode} % Paragraph handling: % \changes{v0.52}{2018/03/28}{Fix: Paragraph handling.} @@ -23940,7 +24134,7 @@ end -- not --version % \begin{macro}{\LWR@footnotetext} \marg{text} % \begin{macrocode} -\long\def\LWR@footnotetext#1{\LWR@@footnotetext{#1}{LWR@footnotebox}} +\long\def\LWR@footnotetext#1{\LWR@@footnotetext{#1}{LWR@footnotebox}}% % \end{macrocode} % \end{macro} % @@ -24034,11 +24228,20 @@ end -- not --version % % % \begin{macro}{\LWR@@printpendingfootnotes} \marg{footnote counter name} +% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.} +% \changes{v0.896}{2021/03/26}{Fix: Backref to footnote.} % \begin{macrocode} \newcommand*{\LWR@@printpendingfootnotes}[1]{% \expandafter\ifvoid\csname LWR@#1box\endcsname\else \LWR@forcenewpage - \begin{BlockClass}{footnotes} + \begin{BlockClass}(note){footnotes}% +% \end{macrocode} +% +% Create a new autopage in case citation back references occur inside the footnotes: +% \begin{macrocode} + \LWR@newautopagelabel{page}% +% \end{macrocode} +% \begin{macrocode} \null \unvbox\csuse{LWR@#1box} \setbox\csuse{LWR@#1box}=\vbox{} @@ -24085,11 +24288,12 @@ end -- not --version % \begin{macro}{\LWR@printpendingmpfootnotes} % Enclose the minipage footnotes in a class, print, then clear. % \changes{v0.45}{2018/01/10}{Added.} +% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.} % \begin{macrocode} \newcommand*{\LWR@printpendingmpfootnotes}{% \ifvoid\LWR@mpfootnotes\else \LWR@forcenewpage - \begin{BlockClass}{footnotes} + \begin{BlockClass}(note){footnotes}% \null \unvbox\LWR@mpfootnotes \setbox\LWR@mpfootnotes=\vbox{} @@ -24122,17 +24326,17 @@ end -- not --version % % \changes{v0.21}{2017/02/11}{Fixed source listing.} % \changes{v0.42}{2017/10/26}{If \progcode{FormatWP} emulate a wrapfig.} -% +% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.} % \begin{macrocode} \renewcommand{\marginpar}[2][]{% \ifbool{FormatWP}% {% -\begin{LWR@BlockClassWP}{width:2in; float:right; margin:10pt}{}{marginblock} +\begin{LWR@BlockClassWP}{width:2in; float:right; margin:10pt}{}(note){marginblock}% #2 -\end{LWR@BlockClassWP} +\end{LWR@BlockClassWP}% }% {% - \LWR@htmlspanclass{marginpar}{#2}% + \LWR@htmlspanclass(note){marginpar}{#2}% }% } % \end{macrocode} @@ -24149,17 +24353,17 @@ end -- not --version % \changes{v0.42}{2017/10/26}{If \progcode{FormatWP} emulate a wrapfig.} % \changes{v0.44}{2017/11/10}{Added.} % \changes{v0.73}{2019/06/25}{Fix: Paragraph tags.} -% +% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.} % \begin{macrocode} \newcommand{\marginparBlock}[2][]{% \LWR@stoppars% \ifbool{FormatWP}% {% - \begin{LWR@BlockClassWP}{width:2in; float:right; margin:10pt}{}{marginblock} + \begin{LWR@BlockClassWP}{width:2in; float:right; margin:10pt}{}(note){marginblock}% #2 \end{LWR@BlockClassWP} }{% - \begin{BlockClass}[width:2in; float:right; margin:10pt]{marginparblock} + \begin{BlockClass}[width:2in; float:right; margin:10pt](note){marginparblock}% #2 \end{BlockClass} }% @@ -24213,6 +24417,122 @@ end -- not --version +% \section{Tracking internal cross references} +% +% Cross references are generated using the \PDF\ file's page number during +% \LaTeX\ compilation. +% Internal labels are generated which include these page numbers in the label. +% +% +% \DescribeFile{*_html.aux} +% A new entry in the \filenm{*_html.aux} file is used to help +% cross-references: +% \begin{sourceverb} +% \newlabel{autopage-}{{}{}} +% \end{sourceverb} +% +% +% \DescribeCounter{LWR@currentautosecpage} Records the page number when the section +% was created. (If a math expression is included in the section name, +% and \SVG\ math is used, the corresponding \env{lateximage} will cause the +% page number to change by the time the following autosec label is created, +% thus the initial page number is recorded here.) +% \ctr{LWR@currentautosecfloatpage} is updated +% more often than \ctr{LWR@currentautosecpage}. +% \changes{v0.43}{2017/11/01}{\ctr{LWR@currentautosecpage}: Added.} +% \changes{v0.66}{2019/01/28}{\ctr{LWR@currentautosecpage}: Fix for \LOF, \LOT float in home page.} +% \begin{macrocode} +\newcounter{LWR@currentautosecpage} +\setcounter{LWR@currentautosecpage}{1} +% \end{macrocode} +% +% +% \DescribeCounter{LWR@currentautosecfloatpage} +% The \HTML\ output's \PDF\ page number at the start of a new \HTML\ file, section, +% or float. +% Updated more often than \ctr{LWR@currentautosecpage}, such as when a new float occurs. +% Used only for table of contents, list of figures, list of tables, +% but not for general cross references such as \cs{label}, citation backlinks, etc. +% +% \cs{LWRsetnextfloat} is written with this and the |autoid| +% by the modified \cs{addcontentsline} just before each float's entry. +% \begin{macrocode} +\newcounter{LWR@currentautosecfloatpage} +\setcounter{LWR@currentautosecfloatpage}{1} +% \end{macrocode} +% +% +% \DescribeCounter{LWR@previousautopagelabel} Remembers which autopage label +% was most recently generated. Used to avoid duplicates. +% \begin{macrocode} +\newcounter{LWR@previousautopagelabel} +\setcounter{LWR@previousautopagelabel}{-1} +% \end{macrocode} +% +% +% \begin{macro}{\LWR@newautopagelabel} \marg{pagenumber counter} +% \changes{v0.48}{2018/02/11}{Fix: \TOC, \LOF, \LOT\ links.} +% \changes{v0.72}{2019/06/05}{Fix: References for \pkg{xr}, \pkg{xr-hyper}.} +% \changes{v0.896}{2021/03/26}{Fix: Refs if page changed.} +% +% \cs{BaseJobname} is added to the label in case \pkg{xr} or \pkg{xr-hyper} are used. +% \begin{macrocode} +\newcommand*{\LWR@newautopagelabel}[1]{% +% \end{macrocode} +% +% No action if this autopage label has already been defined: +% \begin{macrocode} +\ifnumequal{\value{LWR@previousautopagelabel}}{\value{page}}% + {}% +% \end{macrocode} +% +% If the \PDF\ page has changed, create a label using the desired counter. +% +% If the counter is \ctr{LWR@currentautosecpage}, that was the page number +% when the section generation began, +% but the current \PDF\ page may be different by now +% if the section name had an \SVG\ image, such as \SVG\ math. +% To allow the cross-reference to point just after the section heading, the +% label must be made after the section heading is complete, which may have +% generated a new \PDF\ page. +% Thus, the label is made with the given counter, which may be the \PDF\ page +% number where the section heading began, +% then if the \PDF\ page number has changed, +% another label is made for the current page number. +% \begin{macrocode} + {% + \label{\BaseJobname-autopage-\csuse{the#1}}% +% \end{macrocode} +% +% If there are intervening pages, such as an \SVG\ image, +% define another label for the new page: +% \begin{macrocode} + \ifnumequal{\value{#1}}{\value{page}}% + {}% + {\label{\BaseJobname-autopage-\csuse{thepage}}}% +% \end{macrocode} +% +% Remember the latest autopage label: +% \begin{macrocode} + \setcounter{LWR@previousautopagelabel}{\value{page}}% + }% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\LWR@null@newautopagelabel} \marg{pagenumber counter} +% \changes{v0.896}{2021/04/04}{Fix: Refs in footnotes.} +% +% Inside a footnote, the page numbers will be incorrect, +% so this is nullified. +% \begin{macrocode} +\newcommand*{\LWR@null@newautopagelabel}[1]{} +% \end{macrocode} +% \end{macro} + + + + % \section{Splitting \HTML\ files} % % \begin{itemize} @@ -24559,40 +24879,6 @@ end -- not --version % \end{macro} -% \DescribeCounter{LWR@previousautopagelabel} Remembers which autopage label -% was most recently generated. Used to avoid duplicates. -% \begin{macrocode} -\newcounter{LWR@previousautopagelabel} -\setcounter{LWR@previousautopagelabel}{-1} -% \end{macrocode} - - -% \DescribeFile{*_html.aux} -% A new entry in the \filenm{*_html.aux} file is used to help -% cross-references: -% \begin{sourceverb} -% \newlabel{autopage-}{{}{}} -% \end{sourceverb} -% -% \begin{macro}{\LWR@newautopagelabel} \marg{pagenumber counter} -% \changes{v0.48}{2018/02/11}{Fix: \TOC, \LOF, \LOT\ links.} -% \changes{v0.72}{2019/06/05}{Fix: References for \pkg{xr}, \pkg{xr-hyper}.} -% -% \cs{BaseJobname} is added to the label in case \pkg{xr} or \pkg{xr-hyper} are used. -% \begin{macrocode} -\newcommand*{\LWR@newautopagelabel}[1]{% -\ifnumequal{\value{LWR@previousautopagelabel}}{\value{page}}% -{}% no action if this autopage label has already been defined -{% - \label{\BaseJobname-autopage-\arabic{#1}}% - \setcounter{LWR@previousautopagelabel}{\value{page}} -}% -} -% \end{macrocode} -% \end{macro} - - - % \subsection{Sanitizing expressions for \HTML} % Math expressions are converted to |lateximage|s, @@ -25119,9 +25405,10 @@ end -- not --version % At the bottom of the ending file: % % \changes{v0.65}{2018/12/18}{Improved \CSS\ for page layout.} +% \changes{v0.896}{2021/03/04}{Added \element{main}.} % \begin{macrocode} \LWR@htmlelementclassend{section}{textbody} -\LWR@htmlelementclassend{div}{bodycontainer} +\LWR@htmlelementclassend{main}{bodycontainer} \LWR@htmlelementclassend{div}{bodyandsidetoc} \LWR@printpendingfootnotes @@ -25250,11 +25537,12 @@ end -- not --version % \end{macrocode} % -% Track the \PDF\ page numbers of the \HTML\ output: +% Track the \PDF\ page numbers of the \HTML\ output. +% This is updated more frequently than \ctr{LWR@currentautosecpage}. % \changes{v0.48}{2018/02/11}{Fix: \TOC, \LOF, \LOT\ links.} % \begin{macrocode} -\setcounter{LWR@latestautopage}{\value{page}}% -\LWR@newautopagelabel{LWR@latestautopage}% +\setcounter{LWR@currentautosecfloatpage}{\value{page}}% +\LWR@newautopagelabel{LWR@currentautosecfloatpage}% % \end{macrocode} % % @@ -25305,8 +25593,9 @@ end -- not --version % Start of the \element{textbody}: % \changes{v0.65}{2018/12/18}{Improved \CSS\ for page layout.} % \changes{v0.84}{2020/04/24}{Added prev/next links.} +% \changes{v0.896}{2021/03/04}{Added \element{main}.} % \begin{macrocode} -\LWR@htmlelementclass{div}{bodycontainer} +\LWR@htmlelementclass{main}{bodycontainer} \LWR@htmlelementclass{section}{textbody} % \end{macrocode} % @@ -25664,20 +25953,6 @@ end -- not --version % \end{macro} % % -% \DescribeCounter{LWR@currentautosec} Records the page number when the section -% was created. (If a math expression is included in the section name, -% and \SVG\ math is used, the corresponding \env{lateximage} will cause the -% page number to change by the time the following autosec label is created, -% thus the initial page number is recorded here.) -% \changes{v0.43}{2017/11/01}{\ctr{LWR@currentautosec}: Added.} -% \changes{v0.66}{2019/01/28}{\ctr{LWR@currentautosec}: Fix for \LOF, \LOT float in home page.} -% \begin{macrocode} -\newcounter{LWR@currentautosec} -\setcounter{LWR@currentautosec}{1} -% \end{macrocode} -% -% -% % \begin{macro}{\LWR@section} * \oarg{TOC name} \marg{name} \marg{sectiontype} % % \changes{v0.20}{2017/01/09}{Combined higher-level sections together into files.} @@ -25819,7 +26094,7 @@ end -- not --version % \end{macrocode} % \changes{v0.43}{2017/11/01}{Fix: Math in section name.} % \begin{macrocode} -\setcounter{LWR@currentautosec}{\value{page}}% +\setcounter{LWR@currentautosecpage}{\value{page}}% % \end{macrocode} % % Check if starred: @@ -25960,6 +26235,12 @@ end -- not --version % Generate a \LaTeX{} label. % % Track the \PDF\ page numbers of the \HTML\ output. +% A new autopage label may be generated for \ctr{LWR@currentautosecpage} +% for the start of the section, +% and also for the current page if it is different due to an \SVG\ image +% in the section name. +% Also, the final page after the section has been created is updated +% in \ctr{LWR@currentautosecfloatpage}. % % \changes{v0.43}{2017/11/01}{Fix: Math in section name.} % \changes{v0.48}{2018/02/11}{Fix: \TOC, \LOF, \LOT\ links.} @@ -25967,8 +26248,8 @@ end -- not --version % \changes{v0.66}{2019/02/02}{Improved \HTML\ formatting.} % \begin{macrocode} \LWR@traceinfo{LWR@section: about to create the LaTeX label}% -\setcounter{LWR@latestautopage}{\value{page}}% -\LWR@newautopagelabel{LWR@currentautosec}\LWR@orignewline% +\setcounter{LWR@currentautosecfloatpage}{\value{page}}% +\LWR@newautopagelabel{LWR@currentautosecpage}\LWR@orignewline% % \end{macrocode} % % If this is the first section found in this file, @@ -26665,9 +26946,10 @@ end -- not --version }% % \end{macrocode} % \changes{v0.65}{2018/12/18}{Improved \CSS\ for page layout.} +% \changes{v0.896}{2021/03/04}{Added \element{main}.} % \begin{macrocode} \LWR@htmlelementclass{div}{bodywithoutsidetoc} -\LWR@htmlelementclass{div}{bodycontainer} +\LWR@htmlelementclass{main}{bodycontainer} \LWR@traceinfo{LWR@lwarpStart: Generating textbody.} \LWR@htmlelementclass{section}{textbody} % \end{macrocode} @@ -26732,11 +27014,17 @@ end -- not --version % ^^A % \end{macrocode} % % -% First autopage label in case a figure occurs early. +% First autopage label in case a figure occurs early before the first section: +% A new autopage label may be generated for \ctr{LWR@currentautosecpage} +% for the start of the section, +% and also for the current page if it is different due to an \SVG\ image +% in the section name. +% Also, the final page after the section has been created is updated +% in \ctr{LWR@currentautosecfloatpage}. % \changes{v0.66}{2019/01/28}{Fix: \TOC, \LOF, \LOT\ links.} % \begin{macrocode} -\setcounter{LWR@latestautopage}{\value{page}}% -\LWR@newautopagelabel{LWR@currentautosec}% +\setcounter{LWR@currentautosecfloatpage}{\value{page}}% +\LWR@newautopagelabel{LWR@currentautosecpage}% % \end{macrocode} % % \begin{macrocode} @@ -26790,20 +27078,23 @@ end -- not --version \LWR@closeprevious{finished} % \end{macrocode} % At the bottom of the ending file: - +% +% Print any pending footnotes: +% \changes{v0.896}{2021/03/14}{Fix: Footnotes at end of document.} +% \begin{macrocode} +\LWR@printpendingfootnotes +% \end{macrocode} +% % Close the textbody: % \changes{v0.65}{2018/12/18}{Improved \CSS\ for page layout.} % \changes{v0.84}{2020/04/24}{Added prev/next links.} +% \changes{v0.896}{2021/03/04}{Added \element{main}.} % \begin{macrocode} \label{\BaseJobname-autofile-last} \LWR@htmlelementclassend{section}{textbody} -\LWR@htmlelementclassend{div}{bodycontainer} +\LWR@htmlelementclassend{main}{bodycontainer} \LWR@htmlelementclassend{div}{bodyandsidetoc} % \end{macrocode} -% Print any pending footnotes: -% \begin{macrocode} -\LWR@printpendingfootnotes -% \end{macrocode} % % Create the footer if not \EPUB\: % \changes{v0.84}{2020/04/24}{Fix: No footer for \EPUB} @@ -27360,7 +27651,9 @@ end -- not --version % % \begin{macrocode} \LWR@setfootnoteseries% -\def\@makefnmark{\textsuperscript{\thefootnote}} +\def\@makefnmark{% + \textsuperscript{\thefootnote}% +} % \end{macrocode} % % \begin{center} @@ -28107,6 +28400,12 @@ end -- not --version % \begin{macrocode} \renewcommand{\@begintheorem}[2]{% \LWR@forcenewpage +% \end{macrocode} +% \changes{v0.896}{2021/03/14}{Intersperse footnotes.} +% \begin{macrocode} + \LWR@printpendingfootnotes% lwarp +% \end{macrocode} +% \begin{macrocode} \BlockClass{theoremcontents} \trivlist \item[\InlineClass{theoremlabel}{#1\ #2\ }]\itshape @@ -28137,6 +28436,12 @@ end -- not --version % \begin{macrocode} \renewcommand*{\@endtheorem}{% \endtrivlist +% \end{macrocode} +% \changes{v0.896}{2021/03/14}{Intersperse footnotes.} +% \begin{macrocode} + \LWR@printpendingfootnotes% lwarp +% \end{macrocode} +% \begin{macrocode} \endBlockClass% theoremcontents } % \end{macrocode} @@ -28260,7 +28565,7 @@ end -- not --version % \changes{v0.48}{2018/02/02}{Honors \cs{makelabel}.} % \begin{macrocode} \def\LWR@HTML@item[#1]{% -\LWR@traceinfo{@item} +\LWR@traceinfo{@item}% \if@noparitem \@donoparitem \else @@ -28517,12 +28822,55 @@ end -- not --version % \end{macro} % \begin{environment}{description} \oarg{options} +% +% Footnotes are modified to correctly parse optional arguments. +% \changes{v0.896}{2021/03/14}{Fix: Footnotes inside \env{description} label.} % \begin{macrocode} \newcommand*{\LWR@descriptionstart}{% -\renewcommand*{\LWR@printcloselist}{\LWR@printclosedescription} -\renewcommand*{\LWR@printopenlist}{dl} -\let\item\LWR@descitem% -\LWR@nulllistfills% + \renewcommand*{\LWR@printcloselist}{\LWR@printclosedescription} + \renewcommand*{\LWR@printopenlist}{dl} + \let\item\LWR@descitem% + \LWR@nulllistfills% +% \end{macrocode} +% +% Footnotes are redefined to process optional arguments inside the \env{description} +% label. +% A \cs{footnote} is dropped, as it is in print mode. +% Using the optional arguments does not work in print mode, +% but for some reason they must be accepted as done here to work correctly +% even without the optional arguments. +% \begin{macrocode} + \renewcommand{\footnote}[2][]{% + \ifblank{##1}% + {% + \stepcounter\@mpfn + \protected@xdef\@thefnmark{\thempfn}% + \@footnotemark%\@footnotetext + }% + {% + \begingroup + \csname c@\@mpfn\endcsname ##1\relax + \unrestored@protected@xdef\@thefnmark{\thempfn}% + \endgroup + \@footnotemark%\@footnotetext + }% + }% + % + \renewcommand{\footnotemark}[1][]{% + \ifblank{##1}% + {% + \stepcounter{footnote}% + \protected@xdef\@thefnmark{\thefootnote}% + \@footnotemark% + }% + {% + \begingroup% + \c@footnote ##1\relax% + \unrestored@protected@xdef\@thefnmark{\thefootnote}% + \endgroup% + \@footnotemark% + }% + }% } % \end{macrocode} % \end{environment} @@ -29416,7 +29764,8 @@ end -- not --version \LWR@setexparray{LWR@colatspec}% {\arabic{LWR@tabletotalLaTeXcols}}% {\expandafter\@firstofone\LWR@colparameter}% - \LWR@traceinfo{at \arabic{LWR@tabletotalLaTeXcols}: % + \LWR@traceinfo{at \arabic{LWR@tabletotalLaTeXcols}% + : % space \LWR@getexparray{LWR@colatspec}{\arabic{LWR@tabletotalLaTeXcols}}}% }% \let\LWR@colparameter\relax% @@ -32690,7 +33039,8 @@ end -- not --version % \item [\cs{newlabel}:] Unchanged. When the |.aux| file is read, sets \cs{r@