From 7a37d65d52056a1500d4602172582154994bea64 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 20 Jul 2020 03:02:49 +0000 Subject: CTAN sync 202007200302 --- macros/latex/contrib/lwarp/README.txt | 2 +- macros/latex/contrib/lwarp/lwarp.dtx | 3104 ++++++++++++++++++++++++++------ macros/latex/contrib/lwarp/lwarp.ins | 10 + macros/latex/contrib/lwarp/lwarp.pdf | Bin 2723100 -> 2834622 bytes macros/latex/contrib/lwarp/lwarpmk.lua | 9 +- 5 files changed, 2552 insertions(+), 573 deletions(-) (limited to 'macros/latex/contrib/lwarp') diff --git a/macros/latex/contrib/lwarp/README.txt b/macros/latex/contrib/lwarp/README.txt index ce32b03bab..bdb5dde3f1 100644 --- a/macros/latex/contrib/lwarp/README.txt +++ b/macros/latex/contrib/lwarp/README.txt @@ -1,5 +1,5 @@ -LaTeX lwarp package v0.87 README.txt +LaTeX lwarp package v0.88 README.txt Files included are: diff --git a/macros/latex/contrib/lwarp/lwarp.dtx b/macros/latex/contrib/lwarp/lwarp.dtx index bbfd42a9fc..5e2df6201e 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} -% [2020/06/03 v0.87 Allows LaTeX to directly produce HTML5 output.] +% [2020/07/19 v0.88 Allows LaTeX to directly produce HTML5 output.] % %<*driver> \documentclass{ltxdoc} @@ -164,6 +164,7 @@ \usepackage{enumitem} +\newlist{inlinedesc}{description*}{1} \usepackage{array} \usepackage{longtable} @@ -819,27 +820,6 @@ so care must be taken to avoid accidentally including valid \HTML\ code inside these environments. Adding a space on either side may be sufficient. } -\newcommand{\limitshspace}{% -\DescribeMacro{\hspace}% -\gindex{space>horizontal}% -\gindex{horizontal space}% -\cs{hspace} is converted to an inline \HTML\ span of the given width, -except that \texttt{0} width is ignored, -a width of \texttt{.16667em} is converted to -an \HTML\ thin breakable space (\texttt{U+2009}), -and a \cs{fill} is converted to a \cs{qquad}. - -\gindex{\texttt{\textasciitilde}}% -\gindex{\cs{,}}% -\DescribeMacro{\,}% -\texttt{\~} and \cs{,} are converted to \HTML\ entities. - -\DescribeMacro{\kern}% -\DescribeMacro{\hskip}% -\cs{kern} and \cs{hskip} are entered into the \HTML\ \PDF\ output as-is, -then interpreted by \prog{pdftotext}, and thus usually appear as a single space. -} - \newcommand{\limitstextcomp}{% Some \pkg{textcomp} symbols do not have Unicode equivalents, and thus are not supported. @@ -3038,7 +3018,7 @@ This boolean may be tested by the user for later use. %<*package> % \fi % -% \CheckSum{43783} +% \CheckSum{44695} % % \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 @@ -3168,6 +3148,7 @@ This boolean may be tested by the user for later use. % \changes{v0.85}{2020/05/01}{\ 2020/05/01} % \changes{v0.86}{2020/05/12}{\ 2020/05/12} % \changes{v0.87}{2020/06/03}{\ 2020/06/03} +% \changes{v0.88}{2020/07/19}{\ 2020/07/19} @@ -3390,6 +3371,34 @@ This boolean may be tested by the user for later use. % % \begin{description} % \needspace{2\baselineskip} +% \item[v0.88:] Indexing, boxing, theorems. +% \begin{itemize} +% \item \textgreen{Now has programmed support for more than 500 packages and classes, +% of which more than 60 also support \brand{MathJax}.} +% \item Fixed: \cs{ref*}, and also added \brand{MathJax} emulation. +% \margintag{core} +% \item If starting a new paragraph, \cs{hrulefill} creates a +% \element{div} with a thin horizontal line across the page. +% Use instead of \cs{hrule}. +% \item Fixed: Use \cs{chaptername} where appropriate. +% \item Fixed: Inline links causing extraneous paragraphs. +% \item Added \cmds{lwarpmk -v} to print the version number. +% \margintag{\prog{lwarpmk}} +% \item Added the \optn{IndexRef} option to control the display of index entries. +% \margintag{indexing} +% See \cref{sec:optionindexref}. +% \item Added \cs{IndexPageSeparator} and \cs{IndexRangeSeparator} for custom index styles. +% \item Added support for \pkg{gindex}, \prog{xindex}. +% \item Verified to work as-is with \pkg{varindex}. +% \item \pkg{cleveref}, \pkg{varioref}: Fix for starred macros. +% \margintag{packages} +% \item \pkg{varioref}: Removed page-related text from \HTML\ output. +% \item \pkg{xfakebold}: Updated to v0.08, using \pkg{pdfrender}. +% \item \pkg{caption}, \pkg{scrextend}: Fixed \cs{caption*}. +% \item Added \pkg{fbox}, \pkg{shadethm}, \pkg{tcolorbox}, \pkg{termcal}, +% \pkg{thmbox}, \pkg{thmtools}. +% \end{itemize} +% \needspace{2\baselineskip} % \item[v0.87:] \brand{MathJax}, bibliography packages. % \begin{itemize} % \item Added boolean \bool{FixSmallCaps} for fonts which render small caps as @@ -5293,7 +5302,7 @@ This boolean may be tested by the user for later use. % Package names are colored according to their support level: % \begin{description} % \item[\spkg{name}:] Supported as-is. -% \item[\mpkg{name}:] Modifed to work with \HTML\ output, and also +% \item[\mpkg{name}:] Modifed to work with \HTML\ output, and perhaps also % as print output in \SVG\ math or \env{lateximage} environments. % \item[\epkg{name}:] Emulated for \HTML\ output. % \item[\ipkg{name}:] Ignored for \HTML\ output, but provides source-level compatibility. @@ -5407,10 +5416,12 @@ This boolean may be tested by the user for later use. % % Front \&\ back matter: & \mpkg{abstract}, \mpkg{appendix}. \\ % -% Indexing: & \prog{makeindex} and \prog{xindy} are supported, with hyperlinks. +% Indexing: & \prog{makeindex}, \prog{xindy}, and \prog{xindex} are supported, +% with hyperlinks. % -% \spkg{hvindex}, \epkg{idxlayout}, \mpkg{imakeidx}, \epkg{index}, \mpkg{makeidx}, -% \epkg{repeatindex}, \mpkg{splitidx}. +% \mpkg{gindex}, \spkg{hvindex}, \epkg{idxlayout}, \mpkg{imakeidx}, +% \epkg{index}, \mpkg{makeidx}, +% \epkg{repeatindex}, \mpkg{splitidx}, \spkg{varindex}, \spkg{xindex}. % \\ % % Glossary: & \mpkg{gloss}, \mpkg{glossaries} and \prog{xindy}, \mpkg{nomencl}.\\ @@ -5426,9 +5437,9 @@ This boolean may be tested by the user for later use. % \midrule % % Cross-references: & -% \ipkg{bookmark}, \epkg{breakurl}, \spkg{cleveref}, \epkg{fancyref}, +% \ipkg{bookmark}, \epkg{breakurl}, \spkg{cleveref}, \mpkg{fancyref}, % \ipkg{hypdestopt}, \epkg{hyperref}, \epkg{perpage}, \mpkg{prettyref}, -% \epkg{titleref}, \mpkg{url}, \spkg{varioref}, \spkg{xcite}, +% \epkg{titleref}, \mpkg{url}, \mpkg{varioref}, \spkg{xcite}, % \mpkg{xr}, \mpkg{xr-hyper}, \ipkg{xurl}. \\ % % \midrule @@ -5458,7 +5469,8 @@ This boolean may be tested by the user for later use. % due to native \LaTeX\ processing.\\ % % Theorems: & Native \LaTeX\ theorems, -% \mpkg{amsthm}, \mpkg{ntheorem}, \mpkg{theorem}. \\ +% \mpkg{amsthm}, \mpkg{ntheorem}, \mpkg{shadethm}, +% \mpkg{theorem}, \mpkg{thmbox}, \mpkg{thmtools}. \\ % % Additional math: & Math fonts via \SVG\ images, % \spkg{amscd}, \spkg{autobreak}\ejax, \ipkg{autonum}, @@ -5527,7 +5539,7 @@ This boolean may be tested by the user for later use. % \spkg{eepic}, \epkg{epsfig}, \spkg{epstopdf}, % \epkg{figsize}, \ipkg{fitbox}, % \spkg{grffile}, \mpkg{luamplib}, \epkg{media9}, -% \epkg{movie15}, \epkg{multimedia}, \mpkg{overpic}, +% \epkg{movie15}, \epkg{multimedia}, \mpkg{overpic}, \spkg{pict2e}, % \mpkg{psfrag}, \mpkg{psfragx}, \mpkg{pst-eps}, \mpkg{pstool}, \mpkg{pstricks}, % \spkg{rviewport}, \mpkg{svg}, \spkg{svg-extract}, \spkg{tikz-3dplot}. \\ % @@ -5561,8 +5573,8 @@ This boolean may be tested by the user for later use. % \mpkg{fancyvrb}, \mpkg{moreverb}, \spkg{shortvrb}, \mpkg{verbatim}. \\ % % Frames: & \mpkg{boxedminipage}, \mpkg{boxedminipage2e}, -% \mpkg{fancybox}, \mpkg{framed}, \mpkg{mdframed}, -% \epkg{niceframe}, \epkg{shadow}, \epkg{vertbars}. \\ +% \mpkg{fancybox}, \mpkg{fbox}\ejax, \mpkg{framed}, \mpkg{mdframed}, +% \epkg{niceframe}, \epkg{shadow}, \mpkg{tcolorbox}\ejax, \epkg{vertbars}. \\ % % Multi-columns: & \epkg{adjmulticol}, \epkg{multicol}, % \ipkg{multicolrule}, \mpkg{vwcol}. \\ @@ -5642,7 +5654,7 @@ This boolean may be tested by the user for later use. % \spkg{circuitikz}, \spkg{econometrics}\ejax, \spkg{elements}, % \mpkg{engtlc}\ejax, \spkg{fast-diagram}, \mpkg{ghsystem}, % \spkg{hepnicenames}, \spkg{heppennames}, \spkg{karnaughmap}, \mpkg{karnaugh-map}, -% \mpkg{listings}, \spkg{linop}, \mpkg{mhchem}\sjax, \spkg{pgfgantt}, +% \mpkg{listings}, \spkg{listingsutf8}, \spkg{linop}, \mpkg{mhchem}\sjax, \spkg{pgfgantt}, % \mpkg{phfqit}, \spkg{physics}\sjax, \spkg{physunits}\ejax, \spkg{qcircuit}, % \mpkg{register}, \spkg{simpler-wick}, % \spkg{slashed}\ejax, \mpkg{steinmetz}\ejax, \spkg{structmech}, \mpkg{struktex}. @@ -5658,6 +5670,10 @@ This boolean may be tested by the user for later use. % % \midrule % +% Calendars: & \mpkg{termcal} \\ +% +% \midrule +% % Admonitions: & \epkg{awesomebox}, \epkg{notes}. \\ % % Editorial: & \ipkg{changebar}, \spkg{changelog}, \mpkg{changes}, @@ -7340,17 +7356,12 @@ This boolean may be tested by the user for later use. % \gindex{UTF-8>index} % \gindex{index>UTF-8} % -% \pkg{lwarp} uses the \prog{xindy} program to processes indexes. -% \prog{xelatex} and \prog{lualatex} use \prog{xindy} and -% \prog{pdflatex} uses \prog{texindy}. +% \pkg{lwarp} supports \prog{makeindex}, \prog{xindy}, \prog{xindex}, +% and \pkg{glossaries}, \pkg{gloss}, and \pkg{nomencl}. +% +% See \cref{sec:indexingoverview} for indexing, and +% \cref{sec:glossaries} for the \pkg{glossaries} package. % -% The \pkg{lwarp} option \optn{xindyLanguage} may be used to set the language option -% for \pkg{xindy}, and the \optn{xindyCodepage} option may be used to set the codepage -% option for \pkg{xindy}. These are used for -% ^^A both -% index -% ^^A and glossary -% generation. % % % \clearpage @@ -7380,8 +7391,8 @@ This boolean may be tested by the user for later use. % \midrule % \multicolumn{2}{l}{\small For indexing (\cref{sec:indexsetup}) and glossaries (\cref{sec:glossaries}):} \\ % makeindex & Use \prog{makeindex} to generate indices. \\ -% xindy & Use \prog{xindy} to generate indices. \\ % makeindexStyle & Set a custom style for \prog{makeindex}. \\ +% xindy & Use \prog{xindy} to generate indices. \\ % xindyStyle & Set a custom style for \prog{xindy}. \\ % xindyLanguage & The \prog{xindy} language option used for index % ^^A and glossary @@ -7389,9 +7400,12 @@ This boolean may be tested by the user for later use. % xindyCodepage & The \prog{xindy} codepage option used for index % ^^A and glossary % generation. \\ +% xindex & Use \prog{xindex} to generate indices. \\ +% xindexConfig & Set a custom configuration file for \prog{xindex}. \\ % PrintIndexCmd & Shell commands executed by \cmds{lwarpmk printindex}. \\ % HTMLIndexCmd & Shell commands executed by \cmds{lwarpmk htmlindex}. \\ % LatexmkIndexCmd & Shell commands executed by \prog{latexmk}. \\ +% IndexRef & How to format index links. \\ % GlossaryCmd & Shell command executed by \cmds{lwarpmk printglossary} and \cmds{lwarpmk htmlglossary}. \\ % \midrule % \multicolumn{2}{l}{\small Seldom necessary:} \\ @@ -7429,60 +7443,70 @@ This boolean may be tested by the user for later use. % % \begin{description}[itemsep=1\baselineskip] % -% \item[\optn{mathsvg}, \optn{mathjax}:] +% \item[\optn{mathsvg} \textmd{and} \optn{mathjax}:] % \DescribeOption{mathsvg} % \DescribeOption{mathjax} +% \DescribeDefault{mathsvg} +% Selects \SVG\ images or \brand{MathJax} for math display. +% See \cref{sec:limitsmath}. % ^^A \DescribeOption{mathKaTeX} % ^^A For math display, select \optn{mathsvg} (default), \optn{mathjax}, % ^^A or \optn{mathKaTeX}. -% For math display, select \optn{mathsvg} (default) or \optn{mathjax}. -% For more information about the math options, see \cref{sec:limitsmath}. -% % -% \item[\optn{latexmk}:] -% \DescribeOption{latexmk} +% \ItemDescribeOption{latexmk} % \DescribeDefault{false} Tells \prog{lwarpmk} to use \prog{latexmk} to recompile the % document several times if necessary. % Otherwise, \prog{lwarpmk} attempts to determing for itself whether to recompile. % See \cref{sec:htmlsettings}. % -% \item[\optn{dvips}:] -% \DescribeOption{dvips} +% \ItemDescribeOption{dvips} % \DescribeDefault{false} Tells \prog{lwarpmk} to use \prog{dvips} and \prog{ps2pdf} to convert % \DVI\ output to \PDF. % -% \item[\optn{dvipdfm}:] -% \DescribeOption{dvipdfm} +% \ItemDescribeOption{dvipdfm} % \DescribeDefault{false} Tells \prog{lwarpmk} to use \prog{dvipdfm} to convert % \DVI\ output to \PDF. % -% \item[\optn{dvipdfmx}:] -% \DescribeOption{dvipdfmx} +% \ItemDescribeOption{dvipdfmx} % \DescribeDefault{false} Tells \prog{lwarpmk} to use \prog{dvipdfmx} to convert % \DVI\ output to \PDF. % % -% \item[\optn{HomeHTMLFilename}:] -% \DescribeOption{HomeHTMLFilename} -% \DescribeDefault{\{\}} -% See \cref{sec:htmlsettings}. +% \ItemDescribeOption{HomeHTMLFilename} +% \DescribeDefault{\cs{BaseJobname}} % +% Filename of the homepage, without +% the ``\filenm{.html}'' suffix. +% Defaults to the \cs{BaseJobname}. A common setting is: +% \begin{sourcedisplay} +% |HomeHTMLFilename=index| +% \end{sourcedisplay} +% causing the +% homepage to be the file |index.html|. Underscores are allowed in +% \margintag{filename underscores} +% \optn{HomeHTMLFilename} and \optn{HTMLFilename} options, but may need to be escaped +% elsewhere, such as when appearing in a list: +% \gindex{underscore>filename}\gindex{filename>underscore in} +% \changes{v0.24}{2017/03/13}{Docs: Filename underscore.} +% \begin{sourcedisplay} +% \cs{item} [\cs{href}\{file\textred{\textbackslash\_}name.pdf\}\{text\}] \textbackslash +% \end{sourcedisplay} +% See \cref{sec:filenameexamples} for examples of naming and numbering \HTML\ files. % -% \item[\optn{HTMLFilename}:] -% \DescribeOption{HTMLFilename} -% \DescribeDefault{\{\}} -% See \cref{sec:htmlsettings}. +% \ItemDescribeOption{HTMLFilename} +% \DescribeDefault{} +% A filename prefix for the rest of the \HTML\ web pages. +% Useful for numbered web pages with a common prefix. May be empty. +% See \cref{sec:filenameexamples} for examples of naming and numbering \HTML\ files. % % -% \item[\optn{ImagesName}:] -% \DescribeOption{ImagesName} +% \ItemDescribeOption{ImagesName} % \DescribeDefault{image-} % The prefix for the images automatically generated by \pkg{lwarp} % for objects such as \SVG\ math and \env{lateximage}s. % % -% \item[\optn{ImagesDirectory}:] -% \DescribeOption{ImagesDirectory} +% \ItemDescribeOption{ImagesDirectory} % \DescribeDefault{\cs{jobname}-images} % The directory for the images automatically generated by \pkg{lwarp} % for objects such as \SVG\ math and \env{lateximage}s. @@ -7491,22 +7515,19 @@ This boolean may be tested by the user for later use. % \filenm{image-}. % % -% \item[\optn{PrintLatexCmd}:] -% \DescribeOption{PrintLatexCmd} +% \ItemDescribeOption{PrintLatexCmd} % \DescribeDefault{} Sets the shell commands executed by \cmds{lwarpmk print}. % If not specified, will automatically be set according to the detected \LaTeX\ engine % and the use of \optn{-\/-shell-escape}. % % -% \item[\optn{HTMLLatexCmd}:] -% \DescribeOption{HTMLLatexCmd} +% \ItemDescribeOption{HTMLLatexCmd} % \DescribeDefault{} Sets the shell commands executed by \cmds{lwarpmk html}. % If not specified, will automatically be set according to the detected \LaTeX\ engine % and the use of \optn{-\/-shell-escape}. % % -% \item[\optn{makeindex}:] -% \DescribeOption{makeindex} +% \ItemDescribeOption{makeindex} % \DescribeDefault{makeindex} Sets \optn{PrintIndexCmd}, \optn{HTMLIndexCmd}, % and \optn{LatexmkImageCmd} % to use \prog{makeindex} when generating indexes with @@ -7514,43 +7535,50 @@ This boolean may be tested by the user for later use. % If neither \optn{makeindex} nor \optn{xindy} is used, \optn{makeindex} is assumed. % % -% \item[\optn{xindy}:] -% \DescribeOption{xindy} +% \ItemDescribeOption{makeindexStyle} +% \DescribeDefault{lwarp.ist} +% If you wish to use a custom |.ist| file for +% index generation, see \cref{sec:modifymakeindex}. +% +% +% \ItemDescribeOption{xindy} % \DescribeDefault{makeindex} Sets \optn{PrintIndexCmd}, \optn{HTMLIndexCmd}, % and \optn{LatexmkImageCmd} % to use \prog{xindy} when generating indexes with % \cmds{lwarpmk printindex}, \cmds{lwarpmk htmlindex}, or \prog{latexmk}. % % -% \item[\optn{makeindexStyle}:] -% \DescribeOption{makeindexStyle} -% \DescribeDefault{lwarp.ist} -% If you wish to use a custom |.ist| file for -% index generation, see \cref{sec:packageoptions}. -% -% -% \item[\optn{xindyStyle}:] -% \DescribeOption{xindyStyle} +% \ItemDescribeOption{xindyStyle} % \DescribeDefault{lwarp.xdy} % If you wish to use a custom |.xdy| file for -% index generation, see \cref{sec:packageoptions}. +% index generation, see \cref{sec:modifyxindy}. % % -% \item[\optn{xindyLanguage}:] -% \DescribeOption{xindyLanguage} +% \ItemDescribeOption{xindyLanguage} % \DescribeDefault{english} If using an index or glossary, % see \cref{sec:packageoptions}. % % -% \item[\optn{xindyCodepage}:] -% \DescribeOption{xindyCodepage} +% \ItemDescribeOption{xindyCodepage} % \DescribeDefault{utf8} If using an index, % ^^A or glossary, % see \cref{sec:packageoptions}. % % -% \item[\optn{PrintIndexCmd}:] -% \DescribeOption{PrintIndexCmd} +% \ItemDescribeOption{xindex} +% \DescribeDefault{makeindex} Sets \optn{PrintIndexCmd}, \optn{HTMLIndexCmd}, +% and \optn{LatexmkImageCmd} +% to use \prog{xindex} when generating indexes with +% \cmds{lwarpmk printindex}, \cmds{lwarpmk htmlindex}, or \prog{latexmk}. +% +% +% \ItemDescribeOption{xindexConfig} +% \DescribeDefault{} +% If you wish to use a custom |xindex-*.lua| file for +% index generation, see \cref{sec:modifyxindex}. +% +% +% \ItemDescribeOption{PrintIndexCmd} % \DescribeDefault{} Sets the shell commands executed by \cmds{lwarpmk printindex}. % If not specified, will be set by the selection of \optn{makeindex} or % \optn{xindy}. May be used to specify the creation of multiple indexes. @@ -7572,7 +7600,7 @@ This boolean may be tested by the user for later use. % % If specifying \optn{PrintIndexCmd} manually, % \trouble{PrintIndexCmd} -% \trouble[xindy]{xindy=\pkg{xindy}>options>PrintIndexCmd=\optn{PrintIndexCmd}} +% \trouble[xindy]{xindy=\prog{xindy}>options>PrintIndexCmd=\optn{PrintIndexCmd}} % be sure to assign an \prog{xindy} % language and codepage with the |-L| and |-C| \prog{xindy} options, as the % \pkg{lwarp} \optn{xindyLanguage} and \optn{xindyCodepage} options are not @@ -7588,8 +7616,7 @@ This boolean may be tested by the user for later use. % with the \pkg{lwarp} \optn{PrintIndexCmd} option. % % -% \item[\optn{HTMLIndexCmd}:] -% \DescribeOption{HTMLIndexCmd} +% \ItemDescribeOption{HTMLIndexCmd} % \DescribeDefault{} Sets the shell commands executed by \cmds{lwarpmk htmlindex}. % If not specified, will be set by the selection of \optn{makeindex} or % \optn{xindy}. May be used to specify the creation of multiple indexes. @@ -7612,7 +7639,7 @@ This boolean may be tested by the user for later use. % \optn{xindyLanuage}, and \optn{xindyCodepage} options will be used if specified. % % If specifying \optn{HTMLIndexCmd} manually, -% \trouble[xindy]{xindy=\pkg{xindy}>options>HTMLIndexCmd=\optn{HTMLIndexCmd}} +% \trouble[xindy]{xindy=\prog{xindy}>options>HTMLIndexCmd=\optn{HTMLIndexCmd}} % be sure to assign an \prog{xindy} % language and codepage with the |-L| and |-C| \prog{xindy} options, as the % \pkg{lwarp} \optn{xindyLanguage} and \optn{xindyCodepage} options are not @@ -7622,8 +7649,7 @@ This boolean may be tested by the user for later use. % worthwhile to use a shell script, then refer to that script with \optn{HTMLIndexCmd}. % % -% \item[\optn{LatexmkIndexCmd}:] -% \DescribeOption{LatexmkIndexCmd} +% \ItemDescribeOption{LatexmkIndexCmd} % \DescribeDefault{} Sets the shell commands executed by \prog{latexmk}. % Unlike \optn{PrintIndexCmd} and \optn{HTMLIndexCmd}, \optn{LatexmkIndexCmd} % does not include any filenames, which will be provided instead by \prog{latexmk}. @@ -7647,36 +7673,63 @@ This boolean may be tested by the user for later use. % shown above to compile each of multiple indexes if necessary. % % If specifying \optn{LatexmkIndexCmd} manually, -% \trouble[xindy]{xindy=\pkg{xindy}>options>LatexmkIndexCmd=\optn{LatexmkIndexCmd}} +% \trouble[xindy]{xindy=\prog{xindy}>options>LatexmkIndexCmd=\optn{LatexmkIndexCmd}} % be sure to assign an \prog{xindy} % language and codepage with the |-L| and |-C| \prog{xindy} options, as the % \pkg{lwarp} \optn{xindyLanguage} and \optn{xindyCodepage} options are not % used for the \optn{LatexmkIndexCmd} option when it is set manually. % % -% \item[\optn{GlossaryCmd}:] -% \DescribeOption{GlossaryCmd} +% \ItemDescribeOption{IndexRef} +% \DescribeDefault{cref} +% \label{sec:optionindexref} +% Describes how to display the index entries for \HTML\ output. +% Possible values are \optn{ref}, \optn{nameref}, \optn{refnameref}, +% \optn{cref}, \optn{crefnameref}, \optn{autoref}, or a text string +% such as \optn{(link)} or \optn{(*)} for each index entry reference. +% (Adding parentheses around a single character makes the link +% larger and easier to click on.) +% The default is \optn{cref}, which is available even if the print document +% does not use \pkg{cleveref}, as the \pkg{lwarp} package relies on \pkg{cleveref} +% during \HTML\ output. +% Option \optn{autoref} gives the same results as \optn{cref}. +% +% \cs{ref} and \cs{cref} to starred or otherwise unknown links will display as +% |(*)| instead of |??|. +% +% If using \optn{cref} (the default), +% \trouble[??]{index>?? and non-functional link} +% \trouble{index>formatting} +% and if a reference appears as |??| with a non-functional link, +% use \pkg{cleveref}'s \cs{crefname} to give a name to that type of label. +% +% In general, \optn{crefnameref} gives the most information, +% but the index can become quite verbose. +% Using \optn{(*)} or similar yields a very compact index. +% +% +% \ItemDescribeOption{GlossaryCmd} % \DescribeDefault{\cmds{makeglossaries}} Sets the shell command % executed by \cmds{lwarpmk printglossary} and \cmds{lwarpmk htmlglossary}. % The print or \HTML\ glossary filename is appended to this command. % See \cref{sec:glossaries}. % % -% \item[\optn{OSWindows}:] -% \DescribeOption{OSWindows} \pkg{lwarp} attempts to automatically sense \brand{Windows}, +% \ItemDescribeOption{OSWindows} +% \pkg{lwarp} attempts to automatically sense \brand{Windows}, % but it may be forced with this option. % See \cref{sec:OSportabilityusage}. % % -% \item[\optn{pdftotextEnc}:] -% \DescribeOption{pdftotextEnc} -% \DescribeDefault{UTF-8} Used to specify +% \ItemDescribeOption{pdftotextEnc} +% \DescribeDefault{UTF-8} +% Used to specify % the encoding used by \prog{pdftotext} during the \PDF-\HTML\ conversion. % In most situations, the default is the correct choice. % % -% \item[\optn{lwarpmk}:] -% \DescribeOption{lwarpmk} If you wish to have \pkg{lwarp} generate a local +% \ItemDescribeOption{lwarpmk} +% If you wish to have \pkg{lwarp} generate a local % copy of \filenm{lwarpmk.lua} for archival or local-installation purposes, % compile the print version with the \optn{lwarpmk} option set. % See \cref{sec:packageoptions}. @@ -7690,7 +7743,7 @@ This boolean may be tested by the user for later use. % \end{quote} % % -% \item[\optn{warpprint} and \optn{warpHTML}:] +% \item[\optn{warpprint} \textmd{and} \optn{warpHTML}:] % \DescribeOption{warpprint} % \DescribeOption{warpHTML} % Usually controlled by \prog{lwarpmk}, and not set in the document. @@ -7705,8 +7758,7 @@ This boolean may be tested by the user for later use. % while |_html.tex| will create an \HTML\ version. % % -% \item[\optn{BaseJobname}:] -% \DescribeOption{BaseJobname} +% \ItemDescribeOption{BaseJobname} % \DescribeDefault{\cs{jobname}} Not intended for the user. % Used internally by \pkg{lwarp} when % creating the |*_html.tex| file used to compile the \HTML\ version. @@ -7730,53 +7782,66 @@ This boolean may be tested by the user for later use. % \caption{\HTML\ settings} % \label{tab:htmlsettings} % \renewcommand{\arraystretch}{1.1} -% \begin{tabular}{>{\ttfamily}lp{3in}} +% \begin{threeparttable} +% \begin{tabular}{>{\ttfamily}lcp{3in}} % \toprule -% Macro \Slash Cntr \Slash Bool & Description \\ \midrule -% \cs{linkhomename} & Name of the link to the homepage. \\ -% \cs{linkpreviousname} & Name of the link to the previous page. \\ -% \cs{linknextname} & Name of the link to the next page. \\ +% Macro \Slash Cntr \Slash Bool & Loc\tnote{*} & Description \\ \midrule +% \cs{linkhomename} & P & Name of the link to the homepage. \\ +% \cs{linkpreviousname} & P & Name of the link to the previous page. \\ +% \cs{linknextname} & P & Name of the link to the next page. \\ % \midrule -% SideTOCDepth & Sectioning depth of the side\TOC. \\ -% \cs{sidetocname} & Name of the side\TOC. \\ +% SideTOCDepth & P & Sectioning depth of the side\TOC. \\ +% \cs{sidetocname} & P & Name of the side\TOC. \\ % \midrule -% FileDepth & Sectioning depth of the file splits. \\ -% CombineHigherDepths & Combine higher section levels. \\ -% FileSectionNames & Use section names for file names, else use numbers. \\ -% \cs{FilenameLimit} & Maximum length of the generated filenames. \\ +% FileDepth & P & Sectioning depth of the file splits. \\ +% CombineHigherDepths & P & Combine higher section levels. \\ +% FileSectionNames & P & Use section names for file names, else use numbers. \\ +% \cs{FilenameLimit} & P & Maximum length of the generated filenames. \\ % \midrule -% FootnoteDepth & Sectioning depth of footnotes. \\ +% FootnoteDepth & P & Sectioning depth of footnotes. \\ % \midrule -% \cs{abstractname} & The name of the abstract. \\ -% \cs{ImageAltText} & \cs{includegraphics} and other images' \attribute{alt} tag. \\ -% \cs{ThisAltText} \marg{text} & Assigns an \attribute{alt} \Slash \attribute{title} +% \cs{abstractname} & P & The name of the abstract. \\ +% \cs{ImageAltText} & PD & \cs{includegraphics} and other images' \attribute{alt} tag. \\ +% \cs{ThisAltText} \marg{text} & PD & Assigns an \attribute{alt} \Slash \attribute{title} % tag for the next image or link. \\ -% \cs{MathImageAltText} & The \SVG\ math image \env{lateximage} \attribute{alt} tag. \\ -% \cs{PackageDiagramAltText} & The suffix for a package's \env{lateximage} \attribute{alt} tags. \\ -% \cs{AltTextOpen} & Start an \HTML\ \attribute{alt} tag. \\ -% \cs{AltTextClose} & End an \HTML\ \attribute{alt} tag. \\ +% \cs{MathImageAltText} & PD & The \SVG\ math image \env{lateximage} \attribute{alt} tag. \\ +% \cs{PackageDiagramAltText} & PD & The suffix for a package's \env{lateximage} \attribute{alt} tags. \\ +% \cs{AltTextOpen} & PD & Start an \HTML\ \attribute{alt} tag. \\ +% \cs{AltTextClose} & PD & End an \HTML\ \attribute{alt} tag. \\ % \midrule -% \cs{CSSFilename} & The \CSS\ for the following files. \\ -% \cs{MathJaxFilename} & The MathJax script for the following files. \\ +% \cs{CSSFilename} & PS & The \CSS\ for the following files. \\ +% \cs{MathJaxFilename} & PS & The MathJax script for the following files. \\ % \midrule -% \cs{HTMLLanguage} & The \HTML\ \attribute{lang} tag. \\ -% \cs{HTMLTitle} & The homepage's \element{title}, overriding \cs{title}. \\ -% \cs{HTMLTitleBeforeSection} & Set subpage \element{title}s to \newline +% \cs{HTMLLanguage} & PS & The \HTML\ \attribute{lang} tag. \\ +% \cs{HTMLTitle} & PS & The homepage's \element{title}, overriding \cs{title}. \\ +% \cs{HTMLTitleBeforeSection} & PS & Set subpage \element{title}s to \newline % \fqquad \attribute{\cs{HTMLTitle} - sectionname} \\ -% \cs{HTMLTitleAfterSection} & Set subpage \element{title}s to \newline +% \cs{HTMLTitleAfterSection} & PS & Set subpage \element{title}s to \newline % \fqquad \attribute{sectioname - \cs{HTMLTitle}}\\ -% \cs{HTMLAuthor} & The \HTML\ \attribute{author} meta tag, overriding \cs{author}. \\ -% \cs{HTMLDescription} & The \HTML\ \attribute{description} meta tag. \\ +% \cs{HTMLAuthor} & PS & The \HTML\ \attribute{author} meta tag, overriding \cs{author}. \\ +% \cs{HTMLDescription} & PS & The \HTML\ \attribute{description} meta tag. \\ +% \midrule +% \cs{HTMLFirstPageTop} & P & Heading for the home page. \\ +% \cs{HTMLFirstPageBottom} & P & Footer for the home page. \\ +% \cs{HTMLPageTop} & PS & Heading for the other pages. \\ +% \cs{HTMLPageBottom} & PS & Footer for the other pages. \\ % \midrule -% \cs{HTMLFirstPageTop} & Heading for the home page. \\ -% \cs{HTMLFirstPageTop} & Footer for the home page. \\ -% \cs{HTMLPageTop} & Heading for the other pages. \\ -% \cs{HTMLPageBottom} & Footer for the other pages. \\ +% \cs{IndexPageSeparator} & P & Index page list separator. \\ +% \cs{IndexRangeSeparator} & P & Index page range separator. \\ % \midrule -% FixSmallCaps & Set \optn{true} if small caps rendered as all caps. \\ -% HTMLDebugComments & Boolean to generate \HTML\ comments. \\ +% FixSmallCaps & P & Set \optn{true} if small caps rendered as all caps. \\ +% HTMLDebugComments & P & Boolean to generate \HTML\ comments. \\ % \bottomrule % \end{tabular} +% \begin{tablenotes} +% \item [*] +% \begin{inlinedesc} +% \item [P:] Preamble, +% \item [D:] Anywhere in the document. +% \item [S:] Before a section. +% \end{inlinedesc} \hspace*{\fill} +% \end{tablenotes} +% \end{threeparttable} % \end{table} % % \Cref{tab:htmlsettings} shows several settings may be used @@ -7796,62 +7861,25 @@ This boolean may be tested by the user for later use. % % \begin{description}[style=unboxed] % -% \item[Options for the \pkg{lwarp} package:] \ \newline -% Use the following as options for |\usepackage[]{lwarp}|: -% -% \begin{description} -% -% \ItemDescribeOption{HomeHTMLFilename} \DescribeDefault{\cs{BaseJobname}} -% Filename of the homepage, without -% the ``\filenm{.html}'' suffix. -% Defaults to the \cs{BaseJobname}. A common setting is: -% \begin{sourcedisplay} -% |HomeHTMLFilename=index| -% \end{sourcedisplay} -% causing the -% homepage to be the file |index.html|. Underscores are allowed in -% \margintag{filename underscores} -% \optn{HomeHTMLFilename} and \optn{HTMLFilename} options, but may need to be escaped -% elsewhere, such as when appearing in a list: -% \gindex{underscore>filename}\gindex{filename>underscore in} -% \changes{v0.24}{2017/03/13}{Docs: Filename underscore.} -% \begin{sourcedisplay} -% \cs{item} [\cs{href}\{file\textred{\textbackslash\_}name.pdf\}\{text\}] \textbackslash -% \end{sourcedisplay} -% See \cref{sec:filenameexamples} for examples of naming and numbering \HTML\ files. -% -% \ItemDescribeOption{HTMLFilename} \DescribeDefault{} -% A filename prefix for the rest of the \HTML\ web pages. -% Useful for numbered web pages with a common prefix. May be empty. -% See \cref{sec:filenameexamples} for examples of naming and numbering \HTML\ files. -% -% \ItemDescribeOption{latexmk} \DescribeDefault{false} -% Controls whether \pkg{lwarp} uses \prog{latexmk} to -% compile the document. This setting is written to \prog{lwarpmk}'s configuration -% files. -% -% \ItemDescribeOption{mathsvg} \DescribeDefault{true} -% Selects \SVG\ display for math output. (The default.) -% -% \ItemDescribeOption{mathjax} \DescribeDefault{false} -% Selects \brand{MathJax} for math output. -% -% ^^A \ItemDescribeOption{mathKaTeX} \DescribeDefault{false} -% ^^A Selects Ka\TeX\ for math output. -% -% \ItemDescribeOption{makeindex} \DescribeDefault{makeindex} -% Selects \prog{makeindex} for index generation by \prog{lwarpmk}. -% -% \ItemDescribeOption{xindy} \DescribeDefault{makeindex} -% Selects \prog{xindy} for index generation by \prog{lwarpmk}. -% -% \end{description} \bigskip -% % \needspace{3\baselineskip} % \item[Placed in the preamble before \texttt{\cs{begin}\{document\}}:] \ % % \begin{description} % +% \ItemDescribeMacro{\HTMLFirstPageTop} \marg{contents} \DescribeDefault{} \quad +% A user-definable custom action applied +% to the top of the home page. Useful for logos, etc. +% \cs{LinkNext} may be used to link to the next web page. +% Defaults empty. +% Ignored in print output. +% +% \ItemDescribeMacro{\HTMLFirstPageBottom} \marg{contents} \DescribeDefault{} \quad +% A user-definable custom action applied +% to the bottom of the home page. Useful for logos, etc. +% \cs{LinkNext} may be used to link to the next web page. +% Defaults empty. +% Ignored in print output. +% % \ItemDescribeMacro{\linkhomename} \DescribeDefault{Home} % Name of the link to the home page. Paragraphs are allowed. % Redefine with \cs{renewcommand}. @@ -7999,6 +8027,14 @@ This boolean may be tested by the user for later use. % by the \pkg{babel} package. Defaults to ``|Abstract|''. % Redefine with \cs{renewcommand}. % +% \ItemDescribeMacro{\IndexPageSeparator} \DescribeDefault{``, ''} +% Index page list separator. Adjust to match index style file. +% If using \pkg{gindex}, this is set automatically to \pkg{gindex}'s \cs{indexpagessep}. +% +% \ItemDescribeMacro{\IndexRangeSeparator} \DescribeDefault{``-\/-''} +% Index page range separator. Adjust to match index style file. +% If using \pkg{gindex}, this is set automatically to \pkg{gindex}'s \cs{indexrangesep}. +% % \end{description} % % \needspace{3\baselineskip} @@ -8075,20 +8111,6 @@ This boolean may be tested by the user for later use. % the following files. May be changed before each each sectioning command which would % cause a file split. % -% \ItemDescribeMacro{\HTMLFirstPageTop} \marg{contents} \DescribeDefault{} \quad -% A user-definable custom action applied -% to the top of the home page. Useful for logos, etc. -% \cs{LinkNext} may be used to link to the next web page. -% Defaults empty. -% Ignored in print output. -% -% \ItemDescribeMacro{\HTMLFirstPageBottom} \marg{contents} \DescribeDefault{} \quad -% A user-definable custom action applied -% to the bottom of the home page. Useful for logos, etc. -% \cs{LinkNext} may be used to link to the next web page. -% Defaults empty. -% Ignored in print output. -% % \ItemDescribeMacro{\HTMLPageTop} \marg{contents} \DescribeDefault{} \quad % A user-definable custom action applied to % the top of pages other than the home page. Useful for logos, etc. @@ -8107,6 +8129,8 @@ This boolean may be tested by the user for later use. % Ignored in print output. % % \ItemDescribeMacro{\LinkHome} Creates a link to the home page. +% \gindex{link>home \Slash previous \Slash next page} +% \gindex{navigation>link to home \Slash previous \Slash next page} % Usually used in \cs{HTMLPageTop} and related. % % \ItemDescribeMacro{\LinkPrevious} Creates a link to the previous \HTML\ page, @@ -8691,9 +8715,50 @@ This boolean may be tested by the user for later use. % \trouble{Korean>font} % % -% \subsubsection{Horizontal space} +% \subsubsection{Horizontal and vertical space and rules} % -% \limitshspace +% \DescribeMacro{\hspace} +% \gindex{space>horizontal and vertical} +% \gindex{horizontal and vertical space} +% \gindex{vertical space} +% \cs{hspace} is converted to an inline \HTML\ span of the given width, +% except that \texttt{0} width is ignored, +% a width of \texttt{.16667em} is converted to +% an \HTML\ thin breakable space (\texttt{U+2009}), +% and a \cs{fill} is converted to a \cs{qquad}. +% +% \DescribeMacro{\vspace} +% \cs{vspace} is ignored for \HTML. +% +% \gindex{\texttt{\textasciitilde}} +% \gindex{\cs{,}} +% \marginpar{\hspace*{\fill}\texttt{\~}} +% \DescribeMacro{\,} +% \texttt{\~} and \cs{,} are converted to \HTML\ entities. +% +% \DescribeMacro{\kern} +% \DescribeMacro{\hskip} +% \cs{kern} and \cs{hskip} are entered into the \HTML\ \PDF\ output as-is, +% then interpreted by \prog{pdftotext}, and thus usually appear as a single space. +% +% \DescribeMacro{\rule} +% \cs{rule} is converted to an \HTML\ rule of the same dimensions, +% of the currently selected text color. +% +% \DescribeMacro{\hrule} +% \DescribeMacro{\vrule} +% \trouble{hrule=\cs{hrule}} +% \gindex{hrule=\cs{hrule}} +% Both \cs{hrule} and \cs{vrule} are ignored for \HTML. +% To create a horizontal dividing rule across the page, +% use \cs{hrulefill} in its own paragraph. +% +% \DescribeMacro{\hrulefill} +% \gindex{rule>horizontal} +% \gindex{horizontal rule} +% \cs{hrulefill} usually creates a one-inch rule, similar to a ``fill in the blank''. +% If it is used at the start of a new paragraph, it creates a \element{div} +% with a thin horizontal border across the page, as would often be done with \cs{hrule}. % % % \subsubsection{Text alignment} @@ -8865,6 +8930,44 @@ This boolean may be tested by the user for later use. % \DescribePackage{mdframed} % \limitsmdframed % + +% \subsubsection{\pkg{tcolorbox} package} +% \label{sec:limitstcolorbox} +% +% \DescribePackage{tcolorbox} +% \trouble{tcolorbox=\pkg{tcolorbox}} +% \pkg{tcolorbox} is emulated for \HTML\ and \brand{MathJax}, and +% supported as-is inside a \env{lateximage} or \SVG\ math. +% +% What has been tested to work (at least partly) includes: +% \begin{itemize}[nosep] +% \item \env{tcolorbox}, \cs{tcbox}. +% \item Title, subtitle. +% \item Upper, lower parts. +% \item Colors and title fonts. +% \item Floating objects. +% \item Some layered box features. +% \item Counters, labels, references. +% \item \pkg{listings}, \pkg{listingsutf8}. +% \item \optn{theorems}: +% Theorems are supported. +% \optn{math}, \optn{ams equation}, etc.\ are not supported. \watchout[math] +% Use a \env{tcolorbox} with regular math inside it. +% \cs{tcboxmath} and \cs{tcbhighmath} are suppored in \SVG\ math, and +% emulated in \brand{MathJax}. +% \item Fitting features: \cs{tcboxfit} becomes \cs{tcbox} in \HTML. +% \item Footnote numbering does not match the printed output.\watchout[footnotes] +% \item MathJax emulation is provided for common macros. +% \end{itemize} +% +% If using \pkg{cleveref}, +% \trouble[undefined references]{reference>undefined>tcolorbox=\pkg{tcolorbox}} +% it may be necessary to name theorems such as: +% \begin{sourceverb} +% \crefname{tcb@cnt@mytheo}{my theorem}{my theorems} +% \end{sourceverb} +% +% % % \subsection{Section names} % \label{sec:limitssectionnames} @@ -9194,7 +9297,12 @@ This boolean may be tested by the user for later use. % % If using a custom indexing style file, % \margintag{custom index style} -% see \cref{sec:modifymakeindex,sec:modifyxindy}. +% see \cref{sec:modifymakeindex,sec:modifyxindy,sec:modifyxindex}. +% +% To control how the index links appear in the \HTML\ output, +% \margintag{link appearance} +% see the \optn{IndexRef} option in \cref{sec:optionindexref}, +% \cpageref{sec:optionindexref}. % % See \cref{sec:index} for \pkg{lwarp}'s core index and glossary code, % \margintag{source code} @@ -9206,15 +9314,16 @@ This boolean may be tested by the user for later use. % and \cref{sec:memoirbackmatter} for \pkg{memoir}'s indexing patches. % % -% \subsubsection{Indexing with basic \LaTeX\ and \pkg{makeidx}} +% \subsubsection{Indexing with \pkg{makeidx}, \prog{makeindex}, +% \prog{xindy}, \prog{xindex}, \pkg{gindex}} % \label{sec:indexsetup} % % \changes{v0.38}{2017/08/24}{Docs: Index, \pkg{tocbibind}.} % \changes{v0.58}{2018/06/14}{Docs: Index, \prog{makeindex}, \pkg{imakeidx}.} % -% \gindex{xindy=\pkg{xindy}>and \pkg{hyperref}} -% \gindex{hyperref=\pkg{hyperref}>and \pkg{xindy}} -% \gindex{index>xindy=\pkg{xindy} and \pkg{hyperref}} +% \gindex{xindy=\prog{xindy}>and \pkg{hyperref}} +% \gindex{hyperref=\pkg{hyperref}>and \prog{xindy}} +% \gindex{index>xindy=\prog{xindy}>hyperref=and \pkg{hyperref}} % \trouble{index>missing entries} % \gindex{index>see, seealso, ranges} % \gindex{index>processing} @@ -9229,6 +9338,9 @@ This boolean may be tested by the user for later use. % % \needspace{2\baselineskip} % \item [For a single index using \prog{makeindex}:] +% \DescribeProgram{makeindex} +% \gindex{makeindex=\prog{makeindex}} +% \gindex{index>makeindex=\prog{makeindex}>setup} % \begin{sourcedisplay} % \cs{usepackage}\textred{[makeindex\textgreen{,latexmk}]} % \{\textblue{lwarp}\} @@ -9243,8 +9355,13 @@ This boolean may be tested by the user for later use. % Otherwise, use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} % to compile the indexes. % +% To use a custom configuration file, see \cref{sec:modifymakeindex}. +% % \needspace{8\baselineskip} % \item [For a single index using \prog{xindy}:] +% \DescribeProgram{xindy} +% \gindex{xindy=\prog{xindy}} +% \gindex{index>xindy=\prog{xindy}>setup} % \begin{sourcedisplay} % \cs{usepackage}[ \\ % \fqquad \textred{xindy,} \\ @@ -9260,11 +9377,63 @@ This boolean may be tested by the user for later use. % \prog{latexmk} will create the index automatically. % Otherwise, use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} % to compile the indexes. +% +% To use a custom configuration file, see \cref{sec:modifyxindy}. +% +% \needspace{8\baselineskip} +% \item [For a single index using \prog{xindex}:] +% \DescribeProgram{xindex} +% \gindex{xindex=\prog{xindex}} +% \gindex{index>xindex=\prog{xindex}>setup} +% \begin{sourcedisplay} +% \cs{usepackage}[ \\ +% \fqquad \textred{xindex,} \\ +% \fqquad \textgreen{latexmk} \hfill \textrm{}\\ +% ]\{\textblue{lwarp}\} +% \end{sourcedisplay} +% The usual \filenm{.idx} and \filenm{.ind} files will be used. +% +% \prog{lwarpmk} will use \prog{latexmk} if specified, in which case +% \prog{latexmk} will create the index automatically. +% Otherwise, use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} +% to compile the indexes. +% +% To use a custom configuration file, see \cref{sec:modifyxindex}. +% +% +% \needspace{8\baselineskip} +% \item [For a single index using \pkg{gindex}:] +% \DescribePackage{gindex} +% \gindex{gindex=\pkg{gindex}} +% \gindex{index>gindex=\pkg{gindex}>setup} +% \begin{sourcedisplay} +% \cs{usepackage}[ \\ +% \fqquad \textred{makeindex,} \\ +% \fqquad \textred{makeindexStyle=gindex.ist,} \\ +% \fqquad \dots or \dots \\ +% \fqquad \textred{makeindexStyle=gindexh.ist,} \\ +% \fqquad \textgreen{latexmk} \hfill \textrm{}\\ +% ]\{\textblue{lwarp}\} +% \end{sourcedisplay} +% The usual \filenm{.idx} and \filenm{.ind} files will be used. +% +% \prog{lwarpmk} will use \prog{latexmk} if specified, in which case +% \prog{latexmk} will create the index automatically. +% Otherwise, use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} +% to compile the indexes. +% +% To use a custom configuration file, copy \filenm{gindex.ist} to a new +% file, modify, then specify it with \optn{MakeindexStyle} as above. +% \pkg{lwarp} will automatically adapt to \pkg{gindex}'s \cs{indexpagessep} +% and \cs{indexrangesep} settings. % \end{description} % % % \subsubsection{Indexing with \pkg{index}} % +% \DescribeProgram{index} +% \gindex{index>index=\prog{index}>setup} +% % \pkg{lwarp} is told how to use \prog{makeindex} using the % \optn{PrintIndexCmd} and \optn{HTMLIndexCmd} options. % The file \filenm{lwarp.ist} is specified, which generates index letter heads for @@ -9314,6 +9483,9 @@ This boolean may be tested by the user for later use. % % \subsubsection{Indexing with \pkg{splitidx}} % +% \DescribeProgram{splitidx} +% \gindex{index>splitidx=\prog{splitidx}>setup} +% % \pkg{lwarp} is told how to use \prog{splitindex} using the % \optn{PrintIndexCmd} and \optn{HTMLIndexCmd} options. % The file \filenm{lwarp.ist} is specified, which generates index letter heads for @@ -9374,11 +9546,12 @@ This boolean may be tested by the user for later use. % \end{description} % % -% -% % \subsubsection{Indexing with \pkg{imakeidx}} % \label{sec:indexingimakeidx} % +% \DescribeProgram{imakeidx} +% \gindex{index>imakeidx=\prog{imakeidx}>setup} +% % Due to the number of methods which may be used to process multiple indexes, % the options for style file and \prog{xindy} language and codepage must be % specified in one of several different ways. These are described in detail later in @@ -9390,7 +9563,9 @@ This boolean may be tested by the user for later use. % \optn{options=} option, which must include % \pkg{lwarp}'s special \filenm{lwarp.ist} or \filenm{lwarp.xdy} file, % or a file based on them. -% If using a custom indexing style file, see \cref{sec:modifymakeindex,sec:modifyxindy}. +% If using a custom indexing style file, +% see \cref{sec:modifymakeindex,sec:modifyxindy,sec:modifyxindex}. +% % The \optn{splitindex} option is also available of shell escape is used, % in which case the \pkg{splitidx} package and \prog{splitindex} program will also be used. % @@ -9546,14 +9721,51 @@ This boolean may be tested by the user for later use. % % Use \userentry{lwarpmk printindex} \userentry{lwarpmk htmlindex} % to compile the indexes. +% +% \needspace{2\baselineskip} +% \item [For multiple indexes using \prog{xindex} and \pkg{imakeidx}, using shell escape:] \ +% +% \prog{xindex}, \prog{makeindex}, \prog{imakeidx}, and \prog{splitindex} can +% all work together: +% \begin{sourcedisplay} +% \cs{usepackage}\textred{[\% \\ +% \fquad xindex, \\ +% \fquad xindexConfig=-imakeidx, \\ +% \fquad \textgreen{latexmk} \\ +% ]} +% \{\textblue{lwarp}\} \\ +% \cs{usepackage}\textred{[makeindex\textgreen{,splitindex}]}\{\textblue{imakeidx}\} \\ +% \dots \\ +% \cs{makeindex}[\% \\ +% \fquad \textgreen{options=\{ -s lwarp.ist\} \}} \\ +% ] \\ +% \cs{makeindex}[ \\ +% \fquad name=secondname, \\ +% \fquad \textgreen{options=\{ -s lwarp.ist\} \}} \\ +% ] \\ +% \end{sourcedisplay} +% For the first compile, use: +% \watchout[enable shell escape] +% \userentry{pdflatex \textred{-\/-shell-escape} projectname.tex} +% \userentry{pdflatex \textred{-\/-enable-write18} projectname.tex \quad \textrm{(MiKTeX)}} +% or similar with \prog{xelatex} or \prog{lualatex}. +% \pkg{lwarp} will remember if shell escape was used. +% +% \prog{xindex} will use \prog{imakeidx}, +% and \prog{imakeidx} will automatically execute \prog{splitindex} if selected. +% +% If selected, \prog{latexmk} will automatically recompile the entire document +% as necessary. % \end{description} % % % \subsubsection{Indexes with \pkg{memoir}} % +% \gindex{index>memoir=\pkg{memoir}>setup} +% % \begin{description} % \needspace{7\baselineskip} -% \item [For a single index with \pkg{memoir} and \pkg{makeindex}:] +% \item [For a single index with \pkg{memoir} and \prog{makeindex}:] % \begin{sourcedisplay} % \cs{documentclass}\{\textblue{memoir}\} \\ % \cs{usepackage}\textred{[makeindex\textgreen{,latexmk}]}\{\textblue{lwarp}\} \\ @@ -9569,7 +9781,7 @@ This boolean may be tested by the user for later use. % to compile the indexes. % % \needspace{9\baselineskip} -% \item [For multiple indexes with \pkg{memoir} and \pkg{makeindex}, +% \item [For multiple indexes with \pkg{memoir} and \prog{makeindex}, % using \prog{latexmk}:] \ % % \pkg{lwarp}'s options are used, and are passed to \prog{latexmk}. @@ -9584,7 +9796,7 @@ This boolean may be tested by the user for later use. % when the user executes \cmds{lwarpmk print} and \cmds{lwarpmk html}. % % \needspace{19\baselineskip} -% \item [For multiple indexes with \pkg{memoir} and \pkg{makeindex}, +% \item [For multiple indexes with \pkg{memoir} and \prog{makeindex}, % \emph{without} \pkg{latexmk}:] \ % % \prog{lwarpmk} must be told how to create the indexes: @@ -9615,7 +9827,7 @@ This boolean may be tested by the user for later use. % to compile the indexes. % % \needspace{13\baselineskip} -% \item [For a single index with \pkg{memoir} and \pkg{xindy}:] +% \item [For a single index with \pkg{memoir} and \prog{xindy}:] % \begin{sourcedisplay} % \cs{documentclass}\{\textblue{memoir}\} \\ % \cs{usepackage}[ \\ @@ -9637,7 +9849,7 @@ This boolean may be tested by the user for later use. % to compile the indexes. % % \needspace{17\baselineskip} -% \item [For multiple indexes with \pkg{memoir} and \pkg{xindy}, +% \item [For multiple indexes with \pkg{memoir} and \prog{xindy}, % using \pkg{latexmk}:] \ % % \pkg{lwarp}'s options are used, and are passed to \prog{latexmk}. @@ -9657,7 +9869,7 @@ This boolean may be tested by the user for later use. % \prog{lwarpmk} will use \prog{latexmk} to create the indexes automatically. % % \needspace{24\baselineskip} -% \item [For multiple indexes with \pkg{memoir} and \pkg{xindy}, +% \item [For multiple indexes with \pkg{memoir} and \prog{xindy}, % \emph{without} \pkg{latexmk}:] \ % % \prog{lwarpmk} must be told how to create the indexes: @@ -9701,8 +9913,8 @@ This boolean may be tested by the user for later use. % \DescribeFile{lwarp.ist} % When using \prog{makeindex}, \prog{lwarpmk} uses the file |lwarp.ist| to process the index. % \gindex{lwarp.ist=\filenm{lwarp.ist}>customizing} -% \gindex{makeindex>customizing} -% \gindex{index>custom \pkg{makeindex} style file} +% \gindex{makeindex=\prog{makeindex}>customizing} +% \gindex{index>makeindex=\prog{makeindex}>custom style file} % This file is over-written by \pkg{lwarp} whenever a print version of % the document is processed. % @@ -9713,14 +9925,24 @@ This boolean may be tested by the user for later use. % Keep the lines which refer to \cs{hyperindexref}. % These lines creates the hyperlinks for the \HTML\ index. During print output % \cs{hyperindexref} becomes a null function. +% \item If changing +% \begin{sourceverb} +% delim_n -and- delim_r +% \end{sourceverb} +% in \filenm{projectname.ist}, then in the document preamble redefine +% \begin{sourceverb} +% \IndexPageSeparator -and- \IndexRangeSeparator +% \end{sourceverb} +% to match. % \item In the document source use the \optn{makeindexStyle} option for \pkg{lwarp}: % \DescribeOption{makeindexStyle} -% \begin{Verbatim}[gobble=2,tabsize=4] -% \usepackage[ -% ... other options ... -% \textred{makeindexStyle=projectname.ist}, -% ]{lwarp} -% \end{Verbatim} +% \begin{sourcedisplay} +% \cs{usepackage}[ \\ +% \fquad \dots other options \dots \\ +% \fquad \textred{makeindex}, \\ +% \fquad \textred{makeindexStyle=projectname.ist}, \\ +% ]\{lwarp\} +% \end{sourcedisplay} % Likewise, refer to the custom style file if using \cs{PrintIndexCmd}, % \cs{HTMLIndexCmd}, or \cs{LatexmkIndexCmd}. % \item Recompile the print version, which causes @@ -9737,8 +9959,8 @@ This boolean may be tested by the user for later use. % \DescribeFile{lwarp.xdy} % When using \prog{xindy}, \prog{lwarpmk} uses the file |lwarp.xdy| to process the index. % \gindex{lwarp.xdy=\filenm{lwarp.xdy}>customizing} -% \gindex{xindy=\pkg{xindy}>customizing} -% \gindex{index>custom \pkg{xindy} style file} +% \gindex{xindy=\prog{xindy}>customizing} +% \gindex{index>xindy=\prog{xindy}>custom style file} % This file is over-written by \pkg{lwarp} whenever a print version of % the document is processed. % @@ -9758,26 +9980,78 @@ This boolean may be tested by the user for later use. % \cs{hyperindexref} becomes a null function. % % To create custom styles, refer to the lines for \cs{textbf} and \cs{textit}. +% \item If changing any of +% \begin{sourceverb} +% markup-locref-list :sep +% markup-locclass-list :open +% markup-locclass-list :sep +% markup-crossref-layer-list :sep +% markup-range :sep +% \end{sourceverb} +% in \filenm{projectname.xdy}, then in the document preamble redefine +% \begin{sourceverb} +% \IndexPageSeparator -and- \IndexRangeSeparator +% \end{sourceverb} +% to match. % \item In the document source use the \optn{xindyStyle} option for \pkg{lwarp}: % \DescribeOption{xindyStyle} -% \begin{Verbatim}[gobble=2,tabsize=4] -% \usepackage[ -% ... other options ... -% \textred{xindyStyle=projectname.xdy}, -% ]{lwarp} -% \end{Verbatim} +% \begin{sourcedisplay} +% \cs{usepackage}[ \\ +% \fquad \dots other options \dots \\ +% \fquad \textred{xindy}, \\ +% \fquad \textred{xindyStyle=projectname.xdy}, \\ +% ]\{lwarp\} +% \end{sourcedisplay} % Likewise, refer to the custom style file if using \cs{PrintIndexCmd}, % \cs{HTMLIndexCmd}, or \cs{LatexmkIndexCmd}. % \item Recompile the print version, which causes % \pkg{lwarp} to rewrite the |lwarpmk.conf| configuration file. % This tells \prog{lwarpmk} to use the custom |projectname.xdy| file instead of |lwarp.xdy|. % \end{enumerate} +% +% +% \subsubsection{Using a custom \prog{xindex} style file} +% \label{sec:modifyxindex} +% +% \DescribeProgram{xindex} +% \gindex{xindex=\prog{xindex}>customizing} +% \gindex{index>xindex=\prog{xindex}>custom configuration file} +% To use a custom \prog{xindex} style file: +% \begin{enumerate} +% \item Copy |xindex-cfg.lua| to a new filename such as \filenm{xindex-projectname.lua}. +% The filename must start with \filenm{xindex-} and end with \filenm{.lua}.\watchout[filename] +% \item Make changes to \filenm{xindex-projectname.lua}. +% \item If changing +% \begin{sourceverb} +% itemPageDelimiter -and- rangeSymbol +% \end{sourceverb} +% in \filenm{xindex-projectname.lua}, then in the document preamble redefine +% \begin{sourceverb} +% \IndexPageSeparator -and- \IndexRangeSeparator +% \end{sourceverb} +% to match. +% \item In the document source use the \optn{xindexConfig} option for \pkg{lwarp}: +% \DescribeOption{xindexConfig} +% \begin{sourcedisplay} +% \cs{usepackage}[ \\ +% \fquad \dots other options \dots \\ +% \fquad \textred{xindex}, \\ +% \fquad \textred{xindexConfig=projectname}, \quad \% \textgreen{(without xindex- or .lua)} \\ +% ]\{lwarp\} +% \end{sourcedisplay} +% Likewise, refer to the custom style file if using \cs{PrintIndexCmd}, +% \cs{HTMLIndexCmd}, or \cs{LatexmkIndexCmd}. +% \item Recompile the print version, which causes +% \pkg{lwarp} to rewrite the |lwarpmk.conf| configuration file. +% This tells \prog{lwarpmk} to use the custom +% \filenm{xindex-projectname.lua} file instead of the default |xindex-cfg.lua|. +% \end{enumerate} % % % \subsubsection{Additional indexing limitations} % \prog{xindy} and \pkg{hyperref} may not work well together for print output -% \trouble[\pkg{xindy} with \pkg{hyperref}]{xindy=\pkg{xindy}>hyperref=\pkg{hyperref}} -% \trouble{index>xindy=\pkg{xindy} and \pkg{hyperref}} +% \trouble[\prog{xindy} with \pkg{hyperref}]{xindy=\prog{xindy}>hyperref=and \pkg{hyperref}} +% \trouble{index>xindy=\prog{xindy}>hyperref=and \pkg{hyperref}} % \trouble{index>see and seealso} % \trouble{index>reference ranges} % \trouble{index>styling references} @@ -9821,6 +10095,9 @@ This boolean may be tested by the user for later use. % % % \subsubsection{Index positions, \TOC, \pkg{tocbibind}} +% \gindex{index>placement} +% \gindex{index>tocbibind=\pkg{tocbibind}} +% % \limitstocbibind % % \limitstocloft @@ -10285,7 +10562,7 @@ This boolean may be tested by the user for later use. % are used to set customized commands to be executed by % \cmds{lwarpmk print} and \cmds{lwarpmk html}. % \begin{description} -% \item [\optn{PrintLatexCmd}] should be set to shell commands which take \filenm{project.tex} +% \item[\optn{PrintLatexCmd}] should be set to shell commands which take \filenm{project.tex} % and generate \filenm{project.pdf}. % \item[\optn{HTMLLatexCmd}] should be set to take \filenm{project_html.tex} and % generate \filenm{project_html.pdf}. @@ -11501,6 +11778,14 @@ This boolean may be tested by the user for later use. % \end{sourcedisplay} % inside a group first. % +% As a stop-gap measure, you may wish to try incrementing +% \label{sec:troubletexboxes} +% \margintag{\ctr{LWR@texboxdepth}} +% the counter \ctr{LWR@texboxdepth} before the problematic +% macro, and then decrementing it after. +% Doing so tells \pkg{lwarp} to avoid using a \cs{newpage} inside +% the macro, which may avoid this error. +% % Also, custom macros which appear inside a section, % \trouble[macros in section, table, figure names]{sectioning>macro in name} % \trouble{table>macro in name} @@ -11544,6 +11829,14 @@ This boolean may be tested by the user for later use. % to declare what to use for the \TeX\ text, v.s. the \PDF\ bookmark. % See the \pkg{hyperref} manual. % +% \item[``\texttt{Command \cs{textquoteright} invalid in math mode}'':] This +% \trouble[quote character]{Command \cs{textquoteright} invalid in math mode} +% \trouble{math>Command \cs{textquoteright} invalid in math mode} +% \trouble{textquoteright=\cs{textquoteright} invalid in math mode} +% can occur when the document source has math containing +% the slanted quote |’| character, instead of using +% the upright quote |'| character. +% % \item[Complicated objects inside math:] Some objects, such as \tikz, % \trouble[``impure'' math objects]{math>non-math contents} % may not compile in \pkg{lwarp}'s normal math emulation. @@ -12181,7 +12474,9 @@ This boolean may be tested by the user for later use. {% Package #1 is not supported\MessageBreak by lwarp's HTML conversion.\MessageBreak - Package(s) #2 may be useful instead% + Package(s)\MessageBreak + \space\space#2\MessageBreak + may be useful instead% } {% Package #1 might conflict with lwarp in some way,\MessageBreak @@ -12267,6 +12562,7 @@ This boolean may be tested by the user for later use. % \changes{v0.80}{2020/02/15}{Prevented \pkg{formula}, \pkg{shadethm}, \pkg{slashbox}.} % \changes{v0.81}{2020/02/15}{Prevented \pkg{statex}.} % \changes{v0.87}{2020/05/14}{Prevented \pkg{csvtools}.} +% \changes{v0.88}{2020/07/07}{Added \pkg{shadethm}.} % % ^^A *earlyloadnever *loadnever % \begin{macrocode} @@ -12298,7 +12594,6 @@ This boolean may be tested by the user for later use. \LWR@earlyloadnever{picinpar}{floatflt, wrapfig} \LWR@earlyloadnever{picins}{floatflt, wrapfig} \LWR@earlyloadnever{rplain}{fancyhdr} -\LWR@earlyloadnever{shadethm}{mdframed} \LWR@earlyloadnever{si}{siunitx} \LWR@earlyloadnever{sistyle}{siunitx} \LWR@earlyloadnever{slashbox}{diagbox} @@ -12420,6 +12715,7 @@ This boolean may be tested by the user for later use. \LWR@notmemoirloadafter{chngpage} \LWR@loadafter{cite} \LWR@loadafter{citeref} +\LWR@loadafter{cleveref} \LWR@loadafter{cmdtrack} \LWR@loadafter{colonequals} \LWR@loadafter{color} @@ -12476,6 +12772,7 @@ This boolean may be tested by the user for later use. \LWR@loadafter{fancyref} \LWR@loadafter{fancytabs} \LWR@loadafter{fancyvrb} +\LWR@loadafter{fbox} \LWR@loadafter{fewerfloatpages} \LWR@loadafter{figcaps} \LWR@loadafter{figsize} @@ -12520,6 +12817,7 @@ This boolean may be tested by the user for later use. \LWR@loadafter{gentombow} % geometry is always loaded by lwarp, and lwarp-geometry is AtBeginDocument \LWR@loadafter{ghsystem} +\LWR@loadafter{gindex} \LWR@loadafter{glossaries} \LWR@loadafter{gmeometric} % \LWR@loadafter{graphics}% pre-loaded by xunicode @@ -12756,14 +13054,19 @@ This boolean may be tested by the user for later use. \LWR@loadafter{tablefootnote} \LWR@notmemoirloadafter{tabularx} \LWR@loadafter{tabulary} -\LWR@loadafter{tascmac} \LWR@loadafter{tagpdf} +\LWR@loadafter{tascmac} +\LWR@loadafter{tcolorbox} +\LWR@loadafter{termcal} \LWR@loadafter{textarea} % \LWR@loadafter{textcomp}% maybe before lwarp with font packages \LWR@loadafter{textfit} \LWR@loadafter{textpos} \LWR@loadafter{theorem} \LWR@loadafter{thinsp} +\LWR@loadafter{thm-listof} +\LWR@loadafter{thm-restate} +\LWR@loadafter{thmbox} \LWR@loadafter{threadcol} \LWR@loadafter{threeparttable} \LWR@loadafter{threeparttablex} @@ -12804,7 +13107,7 @@ This boolean may be tested by the user for later use. \LWR@loadafter{upref} \LWR@loadafter{url} \LWR@loadafter{uspace} -\LWR@loadafter{varioref}% no lwarp package provided +\LWR@loadafter{varioref} \LWR@notmemoirloadafter{verse} \LWR@loadafter{versonotes} \LWR@loadafter{vertbars} @@ -13171,6 +13474,27 @@ This boolean may be tested by the user for later use. % \end{macro} % % +% \subsection{Inside boxes} +% +% Greater than zero if currently inside a \TeX\ box, +% thus should not use \cs{LWR@orignewpage}. +% See \cref{sec:troubletexboxes}. +% \changes{v0.88}{2020/06/06}{Added \ctr{LWR@texboxdepth}.} +% \begin{macrocode} +\newcounter{LWR@texboxdepth} +\setcounter{LWR@texboxdepth}{0} +% \end{macrocode} +% +% \begin{macro}{\LWR@maybe@orignewpage} +% Only do \cs{LWR@orignewpage} if not inside a \TeX\ box. +% \changes{v0.88}{2020/06/06}{Added.} +% \begin{macrocode} +\newcommand*{\LWR@maybe@orignewpage}{% + \ifnumgreater{\value{LWR@texboxdepth}}{0}{}{\LWR@orignewpage}% +} +% \end{macrocode} +% \end{macro} +% % % \subsection{Global boxes} % @@ -13240,6 +13564,41 @@ This boolean may be tested by the user for later use. % \end{macro} % % +% \subsection{LetLtxMacrocs} +% +% \begin{macro}{\LWR@LetLtxMacrocs} \marg{newcsname} \marg{oldcsname} +% +% \cs{LetLtxMacro} with cs names. +% +% \changes{v0.88}{2020/07/05}{Added.} +% \begin{macrocode} +\newcommand*{\LWR@LetLtxMacrocs}[2]{% + \expandafter\LetLtxMacro\csname #1\expandafter\endcsname% + \csname#2\endcsname% +} +% \end{macrocode} +% \end{macro} +% +% +% \subsection{Absorbing a star} +% +% \begin{macro}{\LWR@absorbstar} \marg{csname} +% +% Modifies a macro to aborb a star. +% Used for \pkg{cleveref}, since \pkg{hyperref} is emulated, so the +% starred macros are not created by \pkg{cleveref}. +% +% \changes{v0.88}{2020/07/05}{Added.} +% \begin{macrocode} +\newcommand*{\LWR@absorbstar}[1]{% + \LWR@LetLtxMacrocs{LWR@origns@#1}{#1}% + \csdef{#1}{\@ifstar{\csuse{LWR@origns@#1}}{\csuse{LWR@origns@#1}}} + \expandafter\robustify\csname #1\endcsname +} +% \end{macrocode} +% \end{macro} +% +% % % \section{Operating-System portability} % \label{sec:OSportability} @@ -13459,9 +13818,9 @@ This boolean may be tested by the user for later use. % % \begin{macrocode} \DeclareVoidOption{warpprint}{% -\PackageInfo{lwarp}{Using option 'warpprint'} -\booltrue{warpingprint}% -\boolfalse{warpingHTML}% + \PackageInfo{lwarp}{Using option 'warpprint'} + \booltrue{warpingprint}% + \boolfalse{warpingHTML}% } % \end{macrocode} @@ -13475,9 +13834,9 @@ This boolean may be tested by the user for later use. % % \begin{macrocode} \DeclareVoidOption{warpHTML}{% -\PackageInfo{lwarp}{Using option 'warpHTML'}% -\booltrue{warpingHTML}% -\boolfalse{warpingprint}% + \PackageInfo{lwarp}{Using option 'warpHTML'}% + \booltrue{warpingHTML}% + \boolfalse{warpingprint}% } % \end{macrocode} % @@ -13495,9 +13854,9 @@ This boolean may be tested by the user for later use. % and may be used for \cs{ifbool} tests. % \begin{macrocode} \DeclareVoidOption{mathsvg}{% -\PackageInfo{lwarp}{Using option 'mathsvg'} -\boolfalse{mathjax}% -\boolfalse{LWR@origmathjax}% + \PackageInfo{lwarp}{Using option 'mathsvg'} + \boolfalse{mathjax}% + \boolfalse{LWR@origmathjax}% % \end{macrocode} % ^^A % \begin{macrocode} % ^^A \boolfalse{mathKaTeX}% @@ -13513,9 +13872,9 @@ This boolean may be tested by the user for later use. % If the \optn{mathjax} option is given, boolean |mathjax| is true, may be used for \cs{ifbool} tests. % \begin{macrocode} \DeclareVoidOption{mathjax}{% -\PackageInfo{lwarp}{Using option 'mathjax'} -\booltrue{mathjax}% -\booltrue{LWR@origmathjax}% + \PackageInfo{lwarp}{Using option 'mathjax'} + \booltrue{mathjax}% + \booltrue{LWR@origmathjax}% % \end{macrocode} % ^^A % \begin{macrocode} % ^^A \boolfalse{mathKaTeX}% @@ -13580,8 +13939,8 @@ This boolean may be tested by the user for later use. % \DescribeOption{makeindexStyle} Selects a custom |.ist| file. % \DescribeDefault{lwarp.ist} -% A customized file should be based on |lwarp.ist|, and must retain -% the lines related to \cs{hyperindexref}. +% A customized file should be based on |lwarp.ist|. +% See \cref{sec:modifymakeindex}. % % \changes{v0.58}{2018/06/21}{Added option \optn{makeindexStyle.}} % @@ -13592,11 +13951,8 @@ This boolean may be tested by the user for later use. % \DescribeOption{xindyStyle} Selects a custom |.xdy| file. % \DescribeDefault{lwarp.xdy} -% A customized file should be based on |lwarp.xdy|, and must retain -% the line -% \begin{Verbatim}[gobble=2] -% (markup-locref :open "\hyperindexref{" :close "}") -% \end{Verbatim} +% A customized file should be based on |lwarp.xdy|. +% See \cref{sec:modifyxindy}. % % \changes{v0.30}{2017/04/28}{Option \optn{xdyFilename} added.} % \changes{v0.54}{2018/04/06}{Option \optn{xdyFilename} changed to \optn{xindyStyle.}} @@ -13606,7 +13962,7 @@ This boolean may be tested by the user for later use. % \end{macrocode} -% \DescribeOption{xindyLanguage} Sets the \pkg{xindy} language to be assigned +% \DescribeOption{xindyLanguage} Sets the \prog{xindy} language to be assigned % \DescribeDefault{english} % in \prog{lwarpmk}'s configuration files. This is then used by \prog{lwarpmk} while % processing the index and glossary. @@ -13620,7 +13976,7 @@ This boolean may be tested by the user for later use. % \end{macrocode} -% \DescribeOption{xindyCodepage} Sets the \pkg{xindy} codepage to be assigned +% \DescribeOption{xindyCodepage} Sets the \prog{xindy} codepage to be assigned % \DescribeDefault{utf8} % in \prog{lwarpmk}'s configuration files. This is then used by \prog{lwarpmk} while % processing the index. @@ -13634,6 +13990,18 @@ This boolean may be tested by the user for later use. +% \DescribeOption{xindexConfig} Selects a custom |xindex-*.lua| file. +% \DescribeDefault{} +% A customized file should be based on |xindex-cfg.lua|. +% See \cref{sec:modifyxindex}. + +% \changes{v0.88}{2020/07/08}{Option \optn{xindexConfig} added.} +% \begin{macrocode} +\DeclareStringOption[]{xindexConfig} +% \end{macrocode} + + + % \limitspdftotextenc % % \changes{v0.54}{2018/04/06}{Add: \optn{pdftotextEnc}.} @@ -13655,8 +14023,8 @@ This boolean may be tested by the user for later use. \boolfalse{LWR@creatinglwarpmk} \DeclareVoidOption{lwarpmk}{ -\PackageInfo{lwarp}{Using option 'lwarpmk'} -\booltrue{LWR@creatinglwarpmk} + \PackageInfo{lwarp}{Using option 'lwarpmk'} + \booltrue{LWR@creatinglwarpmk} } % \end{macrocode} @@ -13672,8 +14040,8 @@ This boolean may be tested by the user for later use. % % \begin{macrocode} \DeclareVoidOption{OSWindows}{ -\PackageInfo{lwarp}{Using option 'OSWindows'} -\LWR@setOSWindows + \PackageInfo{lwarp}{Using option 'OSWindows'} + \LWR@setOSWindows } % \end{macrocode} @@ -13745,7 +14113,7 @@ This boolean may be tested by the user for later use. % \end{macrocode} % \DescribeOption{makeindex} Tells \pkg{lwarp} to -% use \pkg{makeindex} for index generation. +% use \prog{makeindex} for index generation. % When \filenm{lwarpmk.conf} and \filenm{*.lwarpmkconf} are generated, % \optn{PrintIndexCmd} and \optn{HTMLIndexCmd} will be set for \prog{makeindex} % with a single index file. @@ -13756,7 +14124,7 @@ This boolean may be tested by the user for later use. % \DescribeOption{xindy} Tells \pkg{lwarp} to -% use \pkg{xindy} for index generation. +% use \prog{xindy} for index generation. % When \filenm{lwarpmk.conf} and \filenm{*.lwarpmkconf} are generated, % \optn{PrintIndexCmd} and \optn{HTMLIndexCmd} will be set for \prog{xindy} % with a single index file. @@ -13766,6 +14134,28 @@ This boolean may be tested by the user for later use. % \end{macrocode} +% \DescribeOption{xindex} Tells \pkg{lwarp} to +% use \prog{xindex} for index generation. +% When \filenm{lwarpmk.conf} and \filenm{*.lwarpmkconf} are generated, +% \optn{PrintIndexCmd} and \optn{HTMLIndexCmd} will be set for \prog{xindex} +% with a single index file. +% \changes{v0.88}{2020/07/08}{Added \optn{xindex} option.} +% \begin{macrocode} +\DeclareBoolOption[false]{xindex} +% \end{macrocode} + + +% \DescribeOption{IndexRef} +% \DescribeDefault{cref} +% Tells \pkg{lwarp} how to +% display the index entries in \HTML output. +% See \cref{sec:optionindexref}. +% \changes{v0.88}{2020/07/18}{Added \optn{IndexRef} option.} +% \begin{macrocode} +\DeclareStringOption[cref]{IndexRef} +% \end{macrocode} + + % \DescribeOption{GlossaryCmd} \DescribeDefault{makeglossaries} % The shell command to use to compile the glossary. % The print or \HTML\ version of the glossary filename will be appended to this command. @@ -13891,7 +14281,8 @@ This boolean may be tested by the user for later use. % \cs{LWR@PrintIndexCmd} and \cs{LWR@HTMLIndexCmd} are tested to see if they are empty. % If so, they are set to a reasonable defaults for a single index using \prog{makeindex}, % then possibly set to defaults for \prog{xindy} -% if the \pkg{lwarp} \optn{xindy} option was selected. +% if the \pkg{lwarp} \optn{xindy} option was selected, +% then likewise for \prog{xindex} if the \optn{xindex} option was selected. % % \begin{macrocode} \ifdefempty{\LWR@PrintIndexCmd}{ @@ -13907,6 +14298,20 @@ This boolean may be tested by the user for later use. \jobname.idx% } }{} + \ifbool{LWR@xindex}{ + \ifdefvoid{\LWR@xindexConfig}{ + \renewcommand{\LWR@PrintIndexCmd}{% + xindex + \jobname.idx% + } + }{ + \renewcommand{\LWR@PrintIndexCmd}{% + xindex + -c \LWR@xindexConfig \space + \jobname.idx% + } + } + }{} }{} \ifdefempty{\LWR@HTMLIndexCmd}{ @@ -13922,6 +14327,20 @@ This boolean may be tested by the user for later use. \jobname_html.idx% } }{} + \ifbool{LWR@xindex}{ + \ifdefvoid{\LWR@xindexConfig}{ + \renewcommand{\LWR@HTMLIndexCmd}{% + xindex + \jobname_html.idx% + } + }{ + \renewcommand{\LWR@HTMLIndexCmd}{% + xindex + -c \LWR@xindexConfig \space + \jobname_html.idx% + } + } + }{} }{} \ifdefempty{\LWR@LatexmkIndexCmd}{ @@ -13936,11 +14355,22 @@ This boolean may be tested by the user for later use. -C \LWR@xindyCodepage% } }{} + \ifbool{LWR@xindex}{ + \ifdefvoid{\LWR@xindexConfig}{ + \renewcommand{\LWR@LatexmkIndexCmd}{% + xindex + } + }{ + \renewcommand{\LWR@LatexmkIndexCmd}{% + xindex + -c \LWR@xindexConfig + } + } + }{} }{} % \end{macrocode} % % -% % \subsection{Conditional compilation} % % \begin{macro}{\warpprintonly} \marg{contents} @@ -14753,6 +15183,7 @@ This boolean may be tested by the user for later use. % \changes{v0.80}{2020/02/15}{Prevented \pkg{formula}, \pkg{shadethm}, \pkg{slashbox}.} % \changes{v0.81}{2020/02/28}{Prevented \pkg{statex}.} % \changes{v0.87}{2020/05/14}{Prevented \pkg{csvtools}.} +% \changes{v0.88}{2020/07/07}{Added \pkg{shadethm}.} % % The following should never be loaded: % @@ -14781,7 +15212,6 @@ This boolean may be tested by the user for later use. \LWR@checkloadnever{#1}{picinpar}{floatflt, wrapfig} \LWR@checkloadnever{#1}{picins}{floatflt, wrapfig} \LWR@checkloadnever{#1}{rplain}{fancyhdr} -\LWR@checkloadnever{#1}{shadethm}{mdframed} \LWR@checkloadnever{#1}{si}{siunitx} \LWR@checkloadnever{#1}{sistyle}{siunitx} \LWR@checkloadnever{#1}{slashbox}{diagbox} @@ -15147,7 +15577,7 @@ This boolean may be tested by the user for later use. \immediate\openout\LWR@quickfile #1_html_inc.tex% lwarp \immediate\write\LWR@quickfile{\string\input{#1.tex}}% lwarp \immediate\closeout\LWR@quickfile% lwarp -\LWR@orignewpage% changed from clearpage +\LWR@maybe@orignewpage% changed from clearpage \if@filesw \immediate\write\@mainaux{\string\@input{#1_html_inc.aux}}% changed \fi @@ -15165,7 +15595,7 @@ This boolean may be tested by the user for later use. \immediate\write\@partaux{\relax}% \fi \@input@{#1_html_inc.tex}% changed - \LWR@orignewpage% changed from clearpage + \LWR@maybe@orignewpage% changed from clearpage \@writeckpt{#1}% \if@filesw \immediate\closeout\@partaux @@ -15834,6 +16264,12 @@ This boolean may be tested by the user for later use. \let\LWR@origbigskip\bigskip \let\LWR@origtextellipsis\textellipsis +% \end{macrocode} +% \changes{v0.88}{2020/07/03}{Added \cs{vdots}.} +% \begin{macrocode} +\let\LWR@origvdots\vdots +% \end{macrocode} +% \begin{macrocode} \let\LWR@orig@textquotedbl\textquotedbl \LetLtxMacro\LWR@origttfamily\ttfamily @@ -15859,7 +16295,6 @@ This boolean may be tested by the user for later use. \let\LWR@orignewline\newline - \AtBeginDocument{% in case packages change definition \let\LWR@orig@trivlist\@trivlist \let\LWR@origtrivlist\trivlist @@ -16164,7 +16599,7 @@ This boolean may be tested by the user for later use. \newcommand*{\LWR@latexmkcmd}[1]{% latexmk \space \LWR@shellescapecmd \space #1 \space -recorder \space - \LWR@latexmkvar{makeindex}{\LWR@LatexmkIndexCmd} + \LWR@latexmkvar{makeindex}{\LWR@LatexmkIndexCmd}% } % \end{macrocode} % \end{macro} @@ -16466,7 +16901,6 @@ This boolean may be tested by the user for later use. % \changes{v0.58}{2018/06/20}{\filenm{lwarpmk.conf}: Generated \cs{AtBeginDocument}.} % \changes{v0.58}{2018/06/20}{\filenm{lwarpmk.conf}: Added options \optn{makeindex} and \optn{xindy}.} % \changes{v0.58}{2018/06/21}{\filenm{lwarpmk.conf}: Added option \optn{makeindexstyle}.} -% % \codeconfig % \begin{macrocode} \begin{LWRwriteconf} @@ -16492,7 +16926,6 @@ This boolean may be tested by the user for later use. % \changes{v0.58}{2018/06/20}{\filenm{*.lwarpmkconf}: Generated \cs{AtBeginDocument}.} % \changes{v0.58}{2018/06/20}{\filenm{*.lwarpmkconf}: Added options \optn{makeindex} and \optn{xindy}.} % \changes{v0.58}{2018/06/21}{\filenm{*.lwarpmkconf}: Added option \optn{makeindexstyle}.} -% % The \optn{makeindex} and \optn{xindy} options have already been handled % for \filenm{lwarp.conf}. % @@ -16554,6 +16987,8 @@ This boolean may be tested by the user for later use. % \changes{v0.84}{2020/04/13}{\filenm{lwarp.css}: Improved \pkg{nfssext-cfr}.} % \changes{v0.84}{2020/04/18}{\filenm{lwarp.css}: Fix: Minipage tex align.} % \changes{v0.84}{2020/04/24}{\filenm{lwarp.css}: Fix: Top nav if narrow window.} +% \changes{v0.88}{2020/07/04}{\filenm{lwarp.css}: Added \pkg{tcolorbox}, \pkg{thmbox}.} +% \changes{v0.88}{2020/07/14}{\filenm{lwarp.css}: Added \optn{indexheading} for \pkg{gindex}.} % % ^^A *lwarp.css % @@ -16621,6 +17056,7 @@ span.sectionnumber { margin-right: 0em } span.indexitem {margin-left: 0em} span.indexsubitem {margin-left: 2em} span.indexsubsubitem {margin-left: 4em} +div.indexheading {margin-top: 2ex ; font-weight: bold} div.hidden, span.hidden { display: none ; } @@ -16725,6 +17161,8 @@ span.overline { text-decoration-skip: auto ; } +div.hrule { border-top: 1px solid silver } + /* for vertical text: */ div.verticalrl { writing-mode: vertical-rl } @@ -17056,7 +17494,7 @@ div.bodywithoutsidetoc div.bodycontainer { } section.textbody div.footnotes{ - margin: 3ex 2em 0ex 2em ; + margin: 3ex 2em .5ex 2em ; border-bottom: 2px solid silver ; } @@ -17311,20 +17749,33 @@ div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;} } -.mdframed { +/* mdframed, tcolorbox packages */ +.mdframed, .tcolorbox { padding: 0ex ; margin: 2ex 0em 2ex 0em ; + border: 1px solid black ; +} + +.tcolorbox { + border-radius: 10pt ; + margin: 2ex 1em 2ex 1em ; } -.mdframed p { padding: 0ex .5em 0ex .5em ; } +.mdframed p, .tcolorbox p { padding: 0ex .5em 0ex .5em ; } -.mdframed dl { padding: 1ex .5em 0ex .5em ; } +.mdframed dl, .tcolorbox dl { padding: 1ex .5em 0ex .5em ; } -.mdframedtitle { +.mdframedtitle, .tcolorboxtitle { padding: .5ex 0pt 0pt 0pt ; border-radius: 10pt 10pt 0pt 0pt ; display: block ; margin-bottom: 1ex ; + border-bottom: 1px solid silver ; +} + +.tcolorboxsubtitle .tcolorbox { + margin: 2ex 0em 2ex 0em ; + border-radius: 0pt ; } .mdframedsubtitle { @@ -17982,8 +18433,14 @@ nav .authorartist{ display:inline; } /* Native LaTeX theorems: */ -.theoremcontents { font-style: italic; margin-top: 3ex ; margin-bottom: 3ex ; } -.theoremlabel { font-style: normal; font-weight: bold ; margin-right: .5em ; } +.theoremcontents { + font-style: italic; margin-top: 3ex ; margin-bottom: 3ex ; +} + +.theoremlabel { + font-style: normal; font-weight: bold ; margin-right: .5em ; +} + /* theorem, amsthm, and ntheorem packages */ @@ -18057,6 +18514,35 @@ div.amsthmproof span.amsthmnoteremark {} +/* thmbox */ + +.thmbox { + font-style: italic; margin-top: 3ex ; margin-bottom: 3ex ; + border: 1px solid gray ; + padding: 1ex ; +} + +.thmboxtitle { + font-style: normal; font-weight: bold ; margin-right: .5em ; + border-bottom: 1px solid gray ; +} + +span.thmboxproofname, span.thmboxexamplename { + font-weight: bold ; +} + +div.thmboxproof, div.thmboxexample { + font-size: 0.85em ; + margin: 2ex ; +} + +div.thmboxleftbar { + border-left: 2px solid black ; + padding-left: 1em ; +} + + + /* For the backnaur package: */ div.backnaur { display: block ; @@ -18861,6 +19347,9 @@ page_compositor "." % \end{macrocode} + + + % \subsection{\filenm{lwarp_one_limage.cmd}} % % \DescribeFile{lwarp_one_limage.cmd} @@ -19219,7 +19708,7 @@ MathJax = { -- Copyright 2016-2020 Brian Dunn -printversion = "v0.87" +printversion = "v0.88" requiredconfversion = "2" -- also at *lwarpmk.conf function printhelp () @@ -19254,6 +19743,7 @@ lwarpmk clean [-p project]: Remove *.aux, *.toc, *.lof/t, *_html.pdf, *_html.html, *_html.sidetoc lwarpmk cleanall [-p project]: Remove auxiliary files, project.pdf, *.html lwarpmk cleanlimages: Removes all images from the "lateximages" directory. +lwarpmk -v: Print the version number. lwarpmk -h: Print this help message. lwarpmk --help: Print this help message. @@ -20155,6 +20645,12 @@ elseif (arg[1] == nil) then printhelp () +-- lwarpmk -v: + +elseif (arg[1] == "-v" ) then +-- The version number has already been printed +-- by the lwarpmk intro. + -- lwarpmk -h or lwarpmk --help : elseif (arg[1] == "-h" ) or (arg[1] == "--help") then @@ -21201,7 +21697,7 @@ end -- not --version \newcommand{\LWR@forcenewpage}{% \LWR@traceinfo{LWR@forcenewpage}% \ifinner\else% -\LWR@stoppars\LWR@orignewpage\LWR@startpars% +\LWR@stoppars\LWR@maybe@orignewpage\LWR@startpars% \fi% } % \end{macrocode} @@ -24066,7 +24562,7 @@ end -- not --version \LWR@htmltag{/body}\LWR@orignewline \LWR@htmltag{/html}\LWR@orignewline \LWR@traceinfo{LWR@newhtmlfile: about to LWR@orignewpage} -\LWR@orignewpage +\LWR@maybe@orignewpage % \end{macrocode} % \changes{v0.84}{2020/04/24}{Added prev/next links.} % \begin{macrocode} @@ -24569,6 +25065,18 @@ end -- not --version % % % +% \begin{macro}{\LWR@printchaptername} +% Print \cs{chaptername} in most cases, +% but this is nullified for \pkg{ctexbook}, \pkg{komascript}, \pkg{ujt*} classes. +% \changes{v0.88}{2020/06/20}{Conditionally print \cs{chaptername}.} +% \begin{macrocode} +\newcommand*{\LWR@printchaptername}{% + \ifdefvoid{\chaptername}{}{\chaptername~}% +} +% \end{macrocode} +% \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 @@ -24671,10 +25179,11 @@ end -- not --version % Generate a new \LaTeX\ page so that \TOC\ and index page number points to the section: % \begin{macrocode} \LWR@traceinfo{LWR@section: not a new HTML file, about to LWR@orignewpage}% - \LWR@orignewpage% + \LWR@maybe@orignewpage% }% not new file % \end{macrocode} +% % Remember this section's name for \cs{nameref}: % \begin{macrocode} \IfValueT{#3}{% @@ -24682,6 +25191,7 @@ end -- not --version \IfValueTF{#2}{\LWR@setlatestname{#2}}{\LWR@setlatestname{#3}}% }% % \end{macrocode} +% % Print an opening comment with the level and the name; % ex: ``section'' ``Introduction'' % Footnotes may be used in section names, which would also appear in the @@ -24705,6 +25215,7 @@ end -- not --version \endgroup% }{} % \end{macrocode} +% % For inline sections paragraph and subparagraph, start a new paragraph now: % \begin{macrocode} \ifthenelse{% @@ -24713,6 +25224,7 @@ end -- not --version {\LWR@startpars}% {}% % \end{macrocode} +% % Create the opening tag with an autosec: % \begin{macrocode} \LWR@traceinfo{LWR@section: about to LWR@createautosec}% @@ -24722,12 +25234,14 @@ end -- not --version % \begin{macrocode} \setcounter{LWR@currentautosec}{\value{page}}% % \end{macrocode} +% % Check if starred: % \begin{macrocode} \IfBooleanTF{#1}% {% \LWR@traceinfo{LWR@section: starred}% % \end{macrocode} +% % Starred, but also forcing a \TOC\ entry, so % add unnumbered \TOC\ name or regular name: % \begin{macrocode} @@ -24740,10 +25254,12 @@ end -- not --version {}% }% starred % \end{macrocode} +% % Not starred, so step counter and add to \TOC: % \begin{macrocode} {% not starred % \end{macrocode} +% % Only add a numbered \TOC\ entry if section number is not too deep: % \begin{macrocode} \ifthenelse{% @@ -24751,6 +25267,7 @@ end -- not --version }% {% if secnumdepth % \end{macrocode} +% % If in the main matter, step the counter and add the \TOC\ entry. % For |article| class, \pkg{lwarp} assumes that all is mainmatter. % \begin{macrocode} @@ -24760,6 +25277,7 @@ end -- not --version \LWR@traceinfo{LWR@section: yes mainmatter}% \refstepcounter{#4}% % \end{macrocode} +% % Add main matter numbered \TOC\ entry with the \TOC\ name or the regular name: % \changes{v0.64}{2018/12/07}{Support for \pkg{ujarticle and related.}} % \begin{macrocode} @@ -24779,6 +25297,7 @@ end -- not --version \LWR@traceinfo{LWR@section: finished addcontentsline}% }% end of if main matter % \end{macrocode} +% % If not main matter, add unnumbered \TOC\ name or regular name: % \begin{macrocode} {% not main matter @@ -24789,6 +25308,7 @@ end -- not --version }% end of not main matter }% end of secnumdepth % \end{macrocode} +% % Deeper than secnumdepth, so add an unnumbered \TOC\ entry: % \begin{macrocode} {% @@ -24797,6 +25317,7 @@ end -- not --version }% }% % \end{macrocode} +% % For part, print ``Part'': % \begin{macrocode} \ifbool{LWR@mainmatter}% @@ -24809,6 +25330,7 @@ end -- not --version {\@partnameformat}% {}% % \end{macrocode} +% % Print the section number: % \begin{macrocode} \LWR@traceinfo{LWR@section: about to print section number}% @@ -24820,7 +25342,13 @@ end -- not --version {\protect\LWR@sectionnumber{\@partcntformat{#4}}}% {% \ifstrequal{#4}{chapter}% - {\protect\LWR@sectionnumber{\@chapcntformat{#4}}}% + {% +% \end{macrocode} +% \changes{v0.88}{2020/06/20}{Conditionally print \cs{chaptername}.} +% \begin{macrocode} + \LWR@printchaptername% + \protect\LWR@sectionnumber{\@chapcntformat{#4}}% + }% {\protect\LWR@sectionnumber{\@seccntformat{#4}}}% }% }% @@ -25699,7 +26227,7 @@ end -- not --version % \end{macrocode} % Seems to be required sometimes: % \begin{macrocode} -\LWR@orignewpage +\LWR@maybe@orignewpage } % \end{macrocode} % \end{macro} @@ -26687,6 +27215,7 @@ end -- not --version % \end{macrocode} + % \begin{macro}{\LWR@atbeginverbatim} % \oarg{1: style} % \marg{2: negative \cs{baselineskip} \cs{vspace}} @@ -31920,6 +32449,16 @@ end -- not --version % Create an internal document reference link, % or without a link if starred per \pkg{hyperref}. % +% \pkg{hyperref} defines a starred version. +% Since \pkg{hyperref} is only emulated, the starred version is +% defined here for print mode, in case \cs{ref} is used inside +% \SVG\ math: +% \changes{v0.88}{2020/07/05}{Fixed: Starred.} +% \begin{macrocode} +\LWR@absorbstar{ref}% +% \end{macrocode} +% +% The \HTML\ version: % \changes{v0.58}{2018/06/07}{Improved print/\HTML\ output selection.} % \begin{macrocode} \NewDocumentCommand{\LWR@HTML@ref}{s m}{% @@ -31931,22 +32470,18 @@ end -- not --version \LWR@formatted{ref} % \end{macrocode} -% \end{macro} -% \end{macro} % -% \begin{macro}{\LWR@ref@ignorestar} * \marg{label} \quad -% For use inside \cs{hyperref}. Ignores the star, then uses the original \cs{ref}. -% -% \changes{v0.57}{2018/06/05}{\pkg{subcaption}: Fix: \cs{subref}.} +% For \brand{MathJax}: +% \changes{v0.88}{2020/07/05}{Added \brand{MathJax}.} % \begin{macrocode} -\NewDocumentCommand{\LWR@ref@ignorestar}{s m}{% - \LWR@print@ref{#2}% -} +\CustomizeMathJax{\let\LWRref\ref} +\CustomizeMathJax{\renewcommand{\ref}{\ifstar\LWRref\LWRref}} % \end{macrocode} % \end{macro} - - - +% \end{macro} +% +% +% % \label{sec:pagerefpagefor} % \begin{macro}{\pagerefPageFor} Text for page references. % @@ -32491,13 +33026,21 @@ end -- not --version % Adds a new \element{autoid} anchor. % \changes{v0.79}{2019/12/09}{Factored.} % \changes{v0.84}{2020/04/16}{\element{par} handling.} +% \changes{v0.88}{2020/07/04}{Inline handling.} % \begin{macrocode} \newcommand*{\LWR@forcenewautoidanchor}{% \addtocounter{LWR@thisautoid}{1}% - \LWR@stoppars% - \LWR@htmltag{a id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}"}% - \LWR@htmltag{/a}% - \LWR@startpars% + \ifbool{LWR@doingapar}% + {% + \LWR@htmltag{a id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}" }% + \LWR@htmltag{/a }% + }% + {% + \LWR@stoppars% + \LWR@htmltag{a id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}" }% + \LWR@htmltag{/a }% + \LWR@startpars% + }% } % \end{macrocode} % \end{macro} @@ -33484,6 +34027,17 @@ end -- not --version % \end{macrocode} +% \begin{macro}{\IndexPageSeparator} +% \begin{macro}{\IndexRangeSeparator} +% User-adjustable delimiters for page and range separators in the \filenm{*.ind} files. +% \changes{v0.88}{2020/07/16}{Added.} +% \begin{macrocode} +\newcommand*{\IndexPageSeparator}{, } +\newcommand*{\IndexRangeSeparator}{--} +% \end{macrocode} +% \end{macro} +% \end{macro} + % \begin{environment}{theindex} % \begin{macrocode} @@ -33540,15 +34094,76 @@ end -- not --version % \end{macro} -% \begin{macro}{\@wrindex} \marg{term} \qquad +% \begin{macro}{\LWR@xindex@modifyentry} \marg{indexing term} +% +% If using \prog{xindex}, modifies the pipe character to become \cs{hyperindexformat}. +% The indexing term is split into two argument at the pipe, then fed to +% \cs{LWR@xindex@modifyentrysub}. +% +% \changes{v0.88}{2020/07/12}{Added support for \prog{xindex}.} +% \begin{macrocode} +\NewDocumentCommand{\LWR@xindex@modifyentry}{>{\SplitArgument{1}{|}}m} + {\LWR@xindex@modifyentrysub#1} +% \end{macrocode} +% +% Handle left and right parenthesis range argument, +% or add a |hyperindexformat| clause. +% \begin{macrocode} +\newcommand*{\LWR@xindex@modifyentrysub}[2]{% + \edef\LWR@tempone{#1}% + \edef\LWR@temptwo{#2}% + \IfValueTF{#2}{% + \ifx#2(% + \appto\LWR@tempone{|(}% + \else% + \ifx#2)% + \appto\LWR@tempone{|)}% + \else% + \appto\LWR@tempone{% + |hyperindexformat\LWRleftbrace% + \LWRbackslash#2% + \LWRrightbrace% + }% + \fi% + \fi% + }% + {}% +} +% \end{macrocode} +% \end{macro} + + +% \begin{macro}{\@wrindex} \marg{indexing term} \qquad % Redefined to write the |LWR@autoindex| counter instead of |page|. +% +% If using \prog{xindex}, the first line is a comment +% including a special phrase which tricks \prog{xindex} into +% thinking that \pkg{hyperref} was used. +% % \changes{v0.28}{2017/04/13}{Improved indexing.} +% \changes{v0.88}{2020/07/12}{Added support for \prog{xindex}.} % \begin{macrocode} +\newbool{LWR@xindex@tricked} +\boolfalse{LWR@xindex@tricked} + \def\LWR@wrindex#1{% + \ifbool{LWR@xindex}{% + \ifbool{LWR@xindex@tricked}{}{% + \protected@write\@indexfile{}% + {% + \LWRpercent\space hyperpage\LWRrightbrace% + \LWRpercent\space trick xindex to assume hyperref% + }% + \global\booltrue{LWR@xindex@tricked}% + }% + \LWR@xindex@modifyentry{#1}% + }{% + \def\LWR@tempone{#1}% + }% \addtocounter{LWR@autoindex}{1}% - \LWR@new@label{LWRindex-\arabic{LWR@autoindex}}% + \label{LWRindex-\arabic{LWR@autoindex}}% \protected@write\@indexfile{}% - {\string\indexentry{#1}{\arabic{LWR@autoindex}}}% + {\string\indexentry{\LWR@tempone}{\arabic{LWR@autoindex}}}% \endgroup% \@esphack% } @@ -33575,29 +34190,200 @@ end -- not --version % \end{macro} +% \begin{macro}{\LWR@indexnameref@anonref} \marg{LWR@autoindex} +% +% Displays a reference link where there no \cs{ref} available. +% \begin{macrocode} +\newcommand*{\LWR@indexnameref@anonref}[1]{% + \LWR@startref{LWRindex-#1}% + (*)% + \LWR@htmltag{/a}% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\LWR@indexnameref@ref} \marg{LWR@autoindex} +% +% Creates \cs{ref}-style index references. +% To avoid an unwanted space if there is nothing to reference, +% the reference is checked first. +% \begin{macrocode} +\newcommand*{\LWR@indexnameref@ref}[1]{% + \edef\LWR@thisref{\csuse{r@LWRindex-#1}}% + \ifdefvoid{\LWR@thisref}{}{% + \edef\LWR@thisref{\expandafter\@firstoftwo\LWR@thisref}% + \ifdefvoid{\LWR@thisref}% + {\LWR@indexnameref@anonref{#1}}% + {\ref{LWRindex-#1}}% + }% +} +% \end{macrocode} +% \end{macro} + + +% \begin{macro}{\LWR@indexnameref@refnameref} \marg{LWR@autoindex} +% +% Creates \cs{ref}-style index references. +% To avoid an unwanted space if there is nothing to reference, +% the reference is checked first. +% For links to starred or |??| objects, only the name is used. +% \begin{macrocode} +\newcommand*{\LWR@indexnameref@refnameref}[1]{% + \edef\LWR@thisref{\csuse{r@LWRindex-#1}}% + \ifdefvoid{\LWR@thisref}{}{% + \edef\LWR@thisref{\expandafter\@firstoftwo\LWR@thisref}% + \ifdefvoid{\LWR@thisref}{}{% + \ifdefstring{\LWR@thisref}{(*)}% + {}% + {\ref{LWRindex-#1} }% space + }% + }% + \nameref{LWRindex-#1}% +} +% \end{macrocode} +% \end{macro} + + +% \begin{macro}{\LWR@indexnameref@cref} \marg{LWR@autoindex} +% +% Creates \cs{cref}-style index references. +% If no numbered reference is available, a \cs{nameref} is used instead. +% If the reference is |??|, which will be changed by \cs{LWR@indexnameref} +% to become |(*)|, then the link is changed to show |(*)|. +% \begin{macrocode} +\newcommand*{\LWR@indexnameref@cref}[1]{% + \edef\LWR@thisref{\csuse{r@LWRindex-#1}}% + \ifdefvoid{\LWR@thisref}{% + \nameref{LWRindex-#1}% + }{% + \edef\LWR@thisref{\expandafter\@firstoftwo\LWR@thisref}% + \ifdefvoid{\LWR@thisref}{% + \nameref{LWRindex-#1}% + }{% + \ifdefstring{\LWR@thisref}{(*)}{% + \LWR@indexnameref@anonref{#1}% + }{% + \cref{LWRindex-#1}% + }% + }% + }% +} +% \end{macrocode} +% \end{macro} + + +% \begin{macro}{\LWR@indexnameref@crefnameref} \marg{LWR@autoindex} +% +% Creates \cs{cref}-style index references. +% If no numbered reference is available, a \cs{nameref} is used instead. +% If the reference is |??|, which will be changed by \cs{LWR@indexnameref} +% to become |(*)|, then the link is changed to show only the name. +% \begin{macrocode} +\newcommand*{\LWR@indexnameref@crefnameref}[1]{% + \edef\LWR@thisref{\csuse{r@LWRindex-#1}}% + \ifdefvoid{\LWR@thisref}% + {}% + {% + \edef\LWR@thisref{\expandafter\@firstoftwo\LWR@thisref}% + \ifdefvoid{\LWR@thisref}% + {}% + {% + \ifdefstring{\LWR@thisref}{(*)}% + {}% + {\cref{LWRindex-#1}} % space + }% + }% + \nameref{LWRindex-#1}% +} +% \end{macrocode} +% \end{macro} + + % \begin{macro}{\LWR@indexnameref} \marg{LWR@autoindex} % % Creates a hyperlink based on the given entry's autoindex. +% \changes{v0.88}{2020/07/19}{Added \optn{IndexRef} option, refactored.} +% \begin{macrocode} +\newcommand*{\LWR@indexnameref}[1]{% + {% group +% \end{macrocode} +% Temporarily redefine \pkg{caption}'s \cs{caption@xref} because it was printing |??| +% in the indexes, and also causing error on expansion: +% \begin{macrocode} + \ifdef{\caption@xref}{% + \renewcommand*{\caption@xref}[2]{(*)}% + }{}% +% \end{macrocode} % \begin{macrocode} -\newcommand*{\LWR@indexnameref}[1]{\nameref{LWRindex-#1}} + \ifdefstring{\LWR@IndexRef}{ref}{% + \LWR@indexnameref@ref{#1}% + }{% + \ifdefstring{\LWR@IndexRef}{nameref}{% + \nameref{LWRindex-#1}% + }{% + \ifdefstring{\LWR@IndexRef}{refnameref}{% + \LWR@indexnameref@refnameref{#1}% + }{% + \ifdefstring{\LWR@IndexRef}{cref}{% + \LWR@indexnameref@cref{#1}% + }{% + \ifdefstring{\LWR@IndexRef}{crefnameref}{% + \LWR@indexnameref@crefnameref{#1}% + }{% + \ifdefstring{\LWR@IndexRef}{autoref}{% + \LWR@indexnameref@cref{#1}% + }{% text string + \LWR@startref{LWRindex-#1}% + \LWR@IndexRef% + \LWR@htmltag{/a}% + }}}}}}% + }% group +} % \end{macrocode} % \end{macro} -% \begin{macro}{\LWR@doindexentry} \marg{LWR@autoindex, or macros.} +% \begin{macro}{\LWR@doindexentrysubsub} \marg{range start: LWR@autoindex, or macros.} \marg{range end or blank} % % Creates a hyperlink, or handles \cs{see}, \cs{textbf}, etc. % % \changes{v0.58}{2018/06/17}{Adds support for \cs{see}, \cs{seealso}, \cs{emph}, \cs{textbf}, etc.} +% \changes{v0.88}{2020/07/11}{Handles a range, for \prog{xindex}.} % \begin{macrocode} -\newrobustcmd{\LWR@doindexentry}[1]{% +\newrobustcmd{\LWR@doindexentrysubsub}[2]{% \IfInteger{#1}% {\LWR@indexnameref{#1}}% {#1}% + \IfValueT{#2}{% + \IndexRangeSeparator% + \IfInteger{#2}% + {\LWR@indexnameref{#2}}% + {#2}% + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\LWR@doindexentrysub} +% \marg{range delimiter} \marg{LWR@autoindex or macros, possible a range} +% \changes{v0.88}{2020/07/15}{Adapts to \pkg{gindex}.} +% \begin{macrocode} +\NewDocumentCommand{\LWR@doindexentrysub}{m >{\SplitArgument{1}{#1}}m} + {\LWR@doindexentrysubsub#2} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\LWR@doindexentry} \marg{LWR@autoindex or macros, possible a range} +% \changes{v0.88}{2020/07/15}{Adapts to \pkg{gindex}.} +% \begin{macrocode} +\newcommand*{\LWR@doindexentry}[1]{% + \relax% required + \expandafter\LWR@doindexentrysub\expandafter{\IndexRangeSeparator}{#1}% } % \end{macrocode} % \end{macro} + % \begin{macro}{\LWR@hyperindexrefnullified} % Handles macros commonly seen inside an \cs{index} entry. % Each macro is redefined to create and format a link to its entry. @@ -33632,18 +34418,94 @@ end -- not --version % \end{macro} -% \begin{macro}{\hyperindexref} \marg{LWR@autoindex} +% \begin{macro}{\hyperindexref} \marg{list of LWR@autoindex, commas, and ranges} % % |\hyperindexref{LWR@autoindex}| is inserted into |*.ind| by -% the \pkg{makeindex} style file \filenm{lwarp.ist} or -% the \pkg{xindy} style file \filenm{lwarp.xdy}. +% the \prog{makeindex} style file \filenm{lwarp.ist} or +% the \prog{xindy} style file \filenm{lwarp.xdy}. +% For \prog{xindex}, \cs{hyperpage} is inserted, which is \cs{let} to \cs{hyperindexref}. +% For \prog{gindex}, \cs{addindexitem} and related are inserted, which +% are defined to use \cs{hyperindexref}. +% +% The argument is split at commas, and also for ranges, +% then passed to \cs{LWR@hyperindexrefsub}. +% +% \changes{v0.88}{2020/07/14}{Rewritten to parse commas and ranges.} +% \begin{macrocode} +\newcommand*{\hyperindexref}[1]{% + \relax% required + \expandafter\LWR@hyperindexref@comma\expandafter{\IndexPageSeparator}{#1}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\LWR@hyperindexref@comma} \marg{separator} \marg{list of args} +% +% The list is split at commas, and passed to \cs{LWR@hyperindexref@@comma}. +% \begin{macrocode} +\NewDocumentCommand{\LWR@hyperindexref@comma} + {m >{\SplitList{#1}} m} + {% +% \end{macrocode} +% Used to place the separtor between each entry, but not before the first. +% \begin{macrocode} + \def\LWR@hyperindexref@thiscomma{}% + \def\LWR@hyperindexref@nextcomma{#1}% +% \end{macrocode} +% Each comma-delimited entry is now passed individually to \cs{LWR@hyperindexref@@comma}. +% \begin{macrocode} + \ProcessList{#2}\LWR@hyperindexref@@comma% + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\LWR@hyperindexref@@comma} \marg{arg, perhaps with a range} +% +% A comma separator is placed if not the first item, +% then the range is parsed. +% \begin{macrocode} +\newcommand*{\LWR@hyperindexref@@comma}[1]{% + \LWR@hyperindexref@thiscomma% + \renewcommand{\LWR@hyperindexref@thiscomma}{\LWR@hyperindexref@nextcomma}% + \expandafter\LWR@hyperindexref@range\expandafter{\IndexRangeSeparator}{#1}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\LWR@hyperindexref@range} \marg{range delimiter} \marg{arg} +% \begin{macrocode} +\NewDocumentCommand{\LWR@hyperindexref@range} + {m >{\SplitArgument{1}{#1}} m} + {\LWR@hyperindexrefsub#2} +% \end{macrocode} +% \end{macro} + + +% \begin{macro}{\LWR@hyperindexrefsub} +% \marg{range start: LWR@autoindex} +% \marg{range end, or |-NoValue-|} +% +% Handles the start and end of a range, if applicable. +% \begin{macrocode} +\newcommand*{\LWR@hyperindexrefsub}[2]{% + \LWR@hyperindexrefsubtwo{#1}% + \IfValueT{#2}{% + \IndexRangeSeparator% + \LWR@hyperindexrefsubtwo{#2}% + }% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\LWR@hyperindexrefsubtwo} \marg{LWR@autoindex} % % \changes{v0.20}{2016/12/19}{Print mode provided in case \pkg{hyperref} not used.} % \changes{v0.28}{2017/04/13}{Improved indexing.} % \changes{v0.58}{2018/06/17}{Adds support for \cs{see}, \cs{seealso}, \cs{emph}, \cs{textbf}, etc.} % \changes{v0.66}{2019/02/05}{Fix: Long index entries.} +% \changes{v0.88}{2020/07/11}{Adds support for a range, for \prog{xindex}.} % \begin{macrocode} -\newcommand{\hyperindexref}[1]{% +\newcommand*{\LWR@hyperindexrefsubtwo}[1]{% % \end{macrocode} % In long index lines with numerous entries, % \prog{makeindex} can insert a newline before the page number, @@ -33651,7 +34513,7 @@ end -- not --version % If the first character is a space, remove it first. % ^^A Or use the trimspaces package. % \begin{macrocode} - \def\LWR@tempone{#1}% + \edef\LWR@tempone{#1}% \IfBeginWith{\LWR@tempone}{ }{% \StrGobbleLeft{\LWR@tempone}{1}[\LWR@tempone]% }{}% @@ -33673,6 +34535,31 @@ end -- not --version % \end{macrocode} % \end{macro} + +% \begin{macro}{\hyperpage} Emulate \pkg{hyperref}. +% \changes{v0.88}{2020/07/12}{Added.} +% \begin{macrocode} +\LetLtxMacro\hyperpage\hyperindexref +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\nohyperpage} Emulate \pkg{hyperref}. +% \changes{v0.88}{2020/07/12}{Added.} +% \begin{macrocode} +\def\nohyperpage#1{} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\hyperindexformat} Emulate \pkg{hyperref}. +% \changes{v0.88}{2020/07/12}{Added.} +% \begin{macrocode} +\def\hyperindexformat#1#2{% + #1{\hyperpage{#2}}% +}% +% \end{macrocode} +% \end{macro} + + % \begin{macrocode} \end{warpHTML} % \end{macrocode} @@ -33779,6 +34666,24 @@ end -- not --version % \section{Restoring original formatting} % +% \codehtml +% \begin{macrocode} +\begin{warpHTML} +% \end{macrocode} +% +% +% \begin{macro}{\LWR@restoreMathJaxformatting} +% A few macros (ref: \pkg{tcolorbox}) must be treated +% separately while printing the \HTML\ +% comment for a \brand{MathJax} expression. +% These are set here, to which other functions may be appended. +% \changes{v0.88}{2020/06/25}{Added.} +% \begin{macrocode} +\newcommand*{\LWR@restoreMathJaxformatting}{} +% \end{macrocode} +% \end{macro} +% +% % \begin{macro}{\LWR@restoreorigformatting} % Used to temporarily restore % the print-mode meaning of a number of formatting, graphics, and symbols-related @@ -33802,11 +34707,6 @@ end -- not --version % \changes{v0.40}{2017/09/09}{Improved \protect\LaTeX\ logos inside a \env{lateximage}.} % \changes{v0.40}{2017/09/09}{Nullified \cs{InlineClass}, etc. inside a \env{lateximage}.} -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} - % \begin{macrocode} \newcommand*{\LWR@restoreorigformatting}{% \LWR@traceinfo{LWR@restoreorigformatting}% @@ -33838,6 +34738,12 @@ end -- not --version \let\thinspace\LWR@origthinspace% disable HTML short unbreakable space \let\negthinspace\LWR@orignegthinspace% disable HTML negative short unbreakable space \let\textellipsis\LWR@origtextellipsis% +% \end{macrocode} +% \changes{v0.88}{2020/07/03}{Added \cs{vdots}.} +% \begin{macrocode} + \let\vdots\LWR@origvdots% +% \end{macrocode} +% \begin{macrocode} \let\textless\LWR@origtextless% \let\textgreater\LWR@origtextgreater% % \end{macrocode} @@ -33888,6 +34794,14 @@ end -- not --version \LWR@restoreoriglists% % \LWR@FBcancel% +% \end{macrocode} +% +% To enable \brand{MathJax}-specific nullification, used for \pkg{tcolorbox}: +% \changes{v0.88}{2020/06/25}{Support for \brand{MathJax}.} +% \begin{macrocode} + \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }% + {\LWR@restoreMathJaxformatting}% + {}% } % \end{macrocode} % \end{macro} @@ -36316,7 +37230,7 @@ end -- not --version % Start the new \PDF\ page: % \begin{macrocode} \LWR@traceinfo{lateximage: about to create a new page}% - \LWR@orignewpage% + \LWR@maybe@orignewpage% % \end{macrocode} % If the current page is larger, % typeset the image in a ``standard'' width page and font size: @@ -36389,6 +37303,9 @@ end -- not --version }% end of \begin{lateximage} % \end{macrocode} % +% +% +% % When the environment closes: % \margintag{\cs{endlateximage}} % @@ -36418,7 +37335,7 @@ end -- not --version % \begin{macrocode} \LWR@traceinfo{lateximage: ending outer-most lateximage}% \endLWR@print@minipage% - \LWR@orignewpage% + \LWR@maybe@orignewpage% % \end{macrocode} % Close the \HTML\ comment which encapsulated any traces of the lateximage picked up by \prog{pdftotext}: % \begin{macrocode} @@ -37081,16 +37998,9 @@ end -- not --version - % \section{\pkg{cleveref}} -% \label{sec:cleveref} - -% \DescribePackage{cleveref} -% \pkg{cleveref} package is used as-is with minor patches. % -% \limitscpageref -% -% \pkg{cleveref} and the following associated macro patches are +% \pkg{cleveref} and \pkg{lwarp-cleveref} with its associated macro patches are % \margintag{loading order} % automatically preloaded at the end of the preamble via \cs{AtEndPreamble} % and \cs{AfterEndPreamble}. @@ -37101,181 +38011,25 @@ end -- not --version % \cs{crefname}, then \pkg{cleveref} may be loaded in the user's preamble near the % end, and \pkg{lwarp}'s additional loading of \pkg{cleveref} will have no effect. % -% \Cref{tab:crossrefdata} on page \pageref{tab:crossrefdata} -% shows the data structure of the label/reference system -% as revised by \pkg{lwarp} and \pkg{cleveref}. - - -% A few patches allow \pkg{cleveref} to work as-is: - -% \codehtml -% \begin{macrocode} -\begin{warpHTML} -% \end{macrocode} -% -% \cs{AtEndPreable} forces \pkg{cleveref} to be loaded last: +% \cs{AtEndPreable} forces \pkg{cleveref} to be loaded last, +% if it has not yet been loaded by the user. % % \changes{v0.19}{2016/06/06}{cleveref: Loaded \cs{AtEndPreamble}.} % \changes{v0.33}{2017/06/18}{cleveref: Fix: Loaded \cs{AtEndPreamble}.} % +% \codehtml % \begin{macrocode} +\begin{warpHTML} + \AtEndPreamble{ \RequirePackage{cleveref} } -% \end{macrocode} -% -% -% \changes{v0.20}{2017/01/05}{\pkg{cleveref} and referencing patches: -% Applied \cs{AfterEndPreamble}.} -% -% \begin{flushleft} -% The following patches are applied after \pkg{cleveref} has loaded, -% and after \cs{AtBeginDocument}. Print-mode versions are not required -% since they all come down to \cs{ref} eventually, and \cs{ref} has a print-mode -% version. -% \end{flushleft} -% \begin{macrocode} -\AfterEndPreamble{ -\LWR@traceinfo{Patching cleveref.} -% \end{macrocode} -% \begin{macro}{\@@@setcref} \marg{kindofref} \marg{label} -% -% \cs{@templabel} becomes the section number. -% -% \changes{v0.48}{2018/02/10}{Fix for new v0.21 of \pkg{cleveref}.} -% \begin{macrocode} -\def\LWR@orig@@@setcref#1#2{\cref@getlabel{#2}{\@templabel}#1{\@templabel}{}{}}% - -\ifdefequal{\@@setcref}{\LWR@orig@@@setcref}{% before v0.21 - \renewcommand*{\@@setcref}[2]{#1{\ref{#2}}{}{}} -}{ - \ifdefequal{\@@@setcref}{\LWR@orig@@@setcref}{% as of v0.21 - \renewcommand*{\@@@setcref}[2]{% - #1{\ref{#2}}{}{}} - }{ - \PackageWarning{lwarp-cleveref}{ - Unknown version of cleveref. - \protect\cref\space will fail. - }% - } -} -% \end{macrocode} -% \end{macro} - -%\begin{macro}{\@@@setcrefrange} \marg{text} \marg{label} \marg{label} -% \changes{v0.48}{2018/02/10}{Fix for new v0.21 of \pkg{cleveref}.} -% \begin{macrocode} -\def\LWR@orig@@@setcrefrange#1#2#3{% - \cref@getlabel{#2}{\@labela}% - \cref@getlabel{#3}{\@labelb}% - #1{\@labela}{\@labelb}{}{}{}{}}% - -\ifdefequal{\@@setcrefrange}{\LWR@orig@@@setcrefrange}{ - \renewcommand{\@@setcrefrange}[3]{% - #1{\ref{#2}}{\ref{#3}}{}{}{}{}% - } -}{ - \ifdefequal{\@@@setcrefrange}{\LWR@orig@@@setcrefrange}{ - \renewcommand{\@@@setcrefrange}[3]{% - #1{\ref{#2}}{\ref{#3}}{}{}{}{}% - } - }{ - \PackageWarning{lwarp-cleveref}{ - Unknown version of cleveref. - \protect\crefrange\space will fail. - } - } -} +\end{warpHTML} % \end{macrocode} -% \end{macro} - -% ^^A orig: -% ^^A \def\@@setcpageref#1#2{% -% ^^A \cref@getpageref{#2}{\@temppage}#1{\@temppage}{}{}} - - -% \label{sec:cpagereffor} -% \begin{macro}{\cpagerefFor} Redefinable word between ``page(s)'' and the page numbers. % -% \changes{v0.20}{2017/01/03}{User-redefinable word for page references.} % -% \begin{macrocode} -\newcommand*{\cpagerefFor}{for} -% \end{macrocode} -% \end{macro} - -% \begin{macro}{\@@@setcpageref} \marg{typeofref} \marg{label}, -% where typeofref is ``page'' or ``pages'' -% -% \changes{v0.48}{2018/02/10}{Fix for new v0.21 of \pkg{cleveref}.} -% \begin{macrocode} -\def\LWR@orig@@setcpageref#1#2{% before v0.21 - \cref@getpageref{#2}{\@temppage}#1{\@temppage}{}{}}% - -\def\LWR@orig@@@setcpageref#1#2{% as of v0.21 - \cpageref@getlabel{#2}{\@temppage}#1{\@temppage}{}{}}% - -\ifdefequal{\@@setcpageref}{\LWR@orig@@setcpageref}{ - \renewcommand*{\@@setcpageref}[2]{% - #1{\cpagerefFor\ \cref{#2}}{}{}% - } -}{ - \ifdefequal{\@@@setcpageref}{\LWR@orig@@@setcpageref}{ - \renewcommand*{\@@@setcpageref}[2]{% - #1{\cpagerefFor\ \cref{#2}}{}{}% - } - } - { - \PackageWarning{lwarp-cleveref}{ - Unknown version of cleveref. - \protect\cpageref\space will fail. - } - } -} -% \end{macrocode} -% \end{macro} - - -% ^^A orig: -% ^^A \def\@@setcpagerefrange#1#2#3{% -% ^^A \cref@getpageref{#2}{\@pagea}% -% ^^A \cref@getpageref{#3}{\@pageb}% -% ^^A #1{\@pagea}{\@pageb}{}{}{}{}} - -% \begin{macrocode} -\def\LWR@orig@@setcpagerefrange#1#2#3{% before v0.21 - \cref@getpageref{#2}{\@pagea}% - \cref@getpageref{#3}{\@pageb}% - #1{\@pagea}{\@pageb}{}{}{}{}}% - -\def\LWR@orig@@@setcpagerefrange#1#2#3{% as of v0.21 - \cpageref@getlabel{#2}{\@pagea}% - \cpageref@getlabel{#3}{\@pageb}% - #1{\@pagea}{\@pageb}{}{}{}{}}% - -\ifdefequal{\@@setcpagerefrange}{\LWR@orig@@setcpagerefrange}{ - \renewcommand*{\@@setcpagerefrange}[3]{% - #1{\cpagerefFor\ \cref{#2}}{\cref{#3}}{}{}{}{}% - } -}{ - \ifdefequal{\@@@setcpagerefrange}{\LWR@orig@@@setcpagerefrange}{ - \renewcommand*{\@@@setcpagerefrange}[3]{% - #1{\cpagerefFor\ \cref{#2}}{\cref{#3}}{}{}{}{}% - } - } - { - \PackageWarning{lwarp-cleveref}{ - Unknown version of cleveref. - \protect\cpagerefrange\space will fail. - } - } -} - -}% AfterEndPreamble -% \end{macrocode} - - +% \section{Preexisting label and reference definitions} % % Remember and patch some label-related defintions. % These will be further encased and patched by other packages later. @@ -37283,12 +38037,16 @@ end -- not --version % \cs{label} and \cs{pageref} do NOT change their behavior according to % print or \HTML\ output, and thus do not use the \cs{LWR@formatted} system. % +% \codehtml % \begin{macrocode} +\begin{warpHTML} + \LetLtxMacro\LWR@orig@label\label% includes memoir, before cleveref \LetLtxMacro\label\LWR@new@label \LetLtxMacro\LWR@orig@pageref\pageref \LetLtxMacro\pageref\LWR@new@pageref + \end{warpHTML} % \end{macrocode} @@ -37381,7 +38139,7 @@ end -- not --version % \begin{macrocode} \NewDocumentEnvironment{LWR@setvirtualpage}{s O{1}}{% \ifnumequal{\value{LWR@virtualpagedepth}}{0}{% - \IfBooleanT{#1}{\LWR@orignewpage}% + \IfBooleanT{#1}{\LWR@maybe@orignewpage}% \setlength{\linewidth}{6in/#2}% \setlength{\textwidth}{6in}% \setlength{\textheight}{9in}% @@ -38847,6 +39605,7 @@ color:\LWR@origpound\LWR@tempcolor% % \changes{v0.45}{2017/12/29}{Improved: Robust \cs{,}, \cs{~}, and \cs{textellipsis} commands.} % \changes{v0.56}{2018/05/09}{Added \cs{thinspace}.} % \changes{v0.61}{2018/09/23}{Spaces redefined \cs{AtBeginDocument}.} +% \changes{v0.88}{2020/07/03}{Added \cs{vdots}.} % \begin{macrocode} \AtBeginDocument{ \renewrobustcmd*{\,}{\HTMLunicode{202f}} % HTML thin non-breakable space @@ -38854,6 +39613,7 @@ color:\LWR@origpound\LWR@tempcolor% \renewrobustcmd*{\negthinspace}{\HTMLunicode{202f}} % HTML thin non-breakable space \renewrobustcmd*{~}{\HTMLentity{nbsp}} \renewrobustcmd*{\textellipsis}{\HTMLunicode{2026}} +\renewrobustcmd*{\vdots}{\HTMLunicode{22EE}} } % \end{macrocode} % @@ -38919,8 +39679,26 @@ color:\LWR@origpound\LWR@tempcolor% % \begin{macro}{\hrulefill} % \changes{v0.20}{2017/01/19}{Inserts a short rule.} % \changes{v0.58}{2018/06/07}{Improved print/\HTML\ output selection.} +% \changes{v0.88}{2020/06/28}{Full line \element{div} if not started paragraph.} % \begin{macrocode} -\newcommand*{\LWR@HTML@hrulefill}{\rule{1in}{1pt}} +\newcommand*{\LWR@HTML@hrulefill}{% + \ifbool{LWR@doingapar}% + {\rule{1in}{1pt}}% + {% + \LWR@findcurrenttextcolor% + \ifdefstring{\LWR@tempcolor}{000000}% + {% + \begin{BlockClass}{hrule}% + \end{BlockClass}% + }% + {% + \begin{BlockClass}[% + border-top: 1px solid \LWR@origpound\LWR@tempcolor % space + ]{hrule}% + \end{BlockClass}% + }% + }% +}% \LWR@formatted{hrulefill} % \end{macrocode} % \end{macro} @@ -39382,6 +40160,33 @@ color:\LWR@origpound\LWR@tempcolor% % \end{macrocode} % \end{macro} % +% +% ^^A This doesn't work because \hrule is used in many places at a low level. +% ^^A % \begin{macro}{\hrule} +% ^^A % Generates a
, then uses the original to consume any arguments. +% ^^A % The print-mode rule is not seen by \prog{pdftotext}. +% ^^A % +% ^^A % \changes{v0.88}{2020/06/22}{Added.} +% ^^A % \begin{macrocode} +% ^^A \renewcommand*{\hrule}{% +% ^^A \ifbool{LWR@doingstartpars}% +% ^^A {% +% ^^A \begin{BlockClass}[border-top:1px solid silver]{hrule}% +% ^^A \end{BlockClass}% +% ^^A }{}% +% ^^A \LWR@orig@hrule% +% ^^A } +% ^^A % \end{macrocode} +% ^^A % +% ^^A % Not needed, since print-mode \env{BlockClass} does nothing: +% ^^A % \begin{sourceverb} +% ^^A % \appto\LWR@restoreorigformatting{ +% ^^A % \let\hrule\LWR@orig@hrule% +% ^^A % } +% ^^A % \end{sourceverb} +% ^^A % \end{macro} +% +% % \begin{macrocode} \end{warpHTML} % \end{macrocode} @@ -39790,6 +40595,7 @@ color:\LWR@origpound\LWR@tempcolor% \quad% } } + \renewcommand*{\LWR@printchaptername}{} % \end{macrocode} % Use decimal points instead of centered dots: % \begin{macrocode} @@ -39875,6 +40681,8 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@isolate{\CTEX@chaptername}~% \CTEX@chapter@aftername% }% + + \renewcommand*{\LWR@printchaptername}{} }{} } % \end{macrocode} @@ -41322,6 +42130,15 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"% \LWR@ProvidesPackagePass{amsmath}[2017/09/02] % \end{macrocode} % +% \begin{noindmacro}{\dotso} An \HTML\ text-mode version. +% \changes{v0.88}{2020/07/03}{\pkg{amsmath}: Added \cs{dotso} text mode.} +% \begin{macrocode} +\newcommand*{\LWR@HTML@dotso}{\textellipsis\ } +\LWR@formatted{dotso} +% \end{macrocode} +% \end{noindmacro} +% +% % Patches to allow \cs{eqref} inside a caption: % % \changes{v0.49}{2018/02/18}{\pkg{amsmath}: Fix: Patches for \cs{eqref}.} @@ -41646,10 +42463,19 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"% {} % \end{macrocode} % +% +% Necessary for \cs{text}, used by \cs{openbox}, etc., below: +% \changes{v0.88}{2020/07/01}{\pkg{amsthm}: Requires \pkg{amsmath}.} +% \begin{macrocode} +\RequirePackage{amsmath} +% \end{macrocode} +% +% % \begin{macrocode} \LWR@ProvidesPackagePass{amsthm}[2017/10/31] % \end{macrocode} - +% +% % Storage for the style being used for new theorems: % \begin{macrocode} \newcommand{\LWR@newtheoremstyle}{plain} @@ -44830,6 +45656,22 @@ s% } % \end{macrocode} + +% Updates for late patches for \pkg{scrextend}: +% \changes{v0.88}{2020/07/15}{\pkg{caption}, \pkg{scrextend}: Fixed \cs{caption*}.} +% \begin{macrocode} +\caption@AtBeginDocument{ +\@ifpackageloaded{lwarp-scrextend}{ + \LetLtxMacro\captionbelow\caption + \LetLtxMacro\captionabove\caption + \LetLtxMacro\captionofbelow\captionof + \LetLtxMacro\captionofabove\captionof +}{} +} +% \end{macrocode} + + + % \iffalse % % \fi @@ -47148,6 +47990,258 @@ name = \chemmacros_translate:n {scheme-name} % % % \iffalse +%<*cleveref> +% \fi +% +% \part{lwarp-cleveref.sty} +% +% \section{cleveref} +% \label{sec:cleveref} +% +% \credits{Toby Cubitt} +% +% \DescribePackage{cleveref} +% \pkg{cleveref} is patched for \HTML, and +% limited \brand{MathJax} emulation is added. +% +% \limitscpageref +% +% \Cref{tab:crossrefdata} on page \pageref{tab:crossrefdata} +% shows the data structure of the label/reference system +% as revised by \pkg{lwarp} and \pkg{cleveref}. +% +% For \brand{MathJax}, +% each references is printed as an \cs{eqref}, without \pkg{cleveref}'s +% description text. Page references are also printed as simple \cs{eqref}s. +% Multiple labels in a single \cs{cref} will print as \texttt{(???)} in \brand{MathJax}. +% \watchout[multiple labels] +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackagePass{cleveref}[2018/03/27] +% \end{macrocode} +% +% +% \changes{v0.20}{2017/01/05}{\pkg{cleveref} and referencing patches: +% Applied \cs{AfterEndPreamble}.} +% +% The following patches are applied. +% Print-mode versions are not required since they all come down to \cs{ref} eventually, +% and \cs{ref} has a print-mode version. +% +% \begin{macro}{\@@@setcref} \marg{kindofref} \marg{label} +% +% \cs{@templabel} becomes the section number. +% +% \changes{v0.48}{2018/02/10}{Fix for new v0.21 of \pkg{cleveref}.} +% \begin{macrocode} +\def\LWR@orig@@@setcref#1#2{\cref@getlabel{#2}{\@templabel}#1{\@templabel}{}{}}% + +\ifdefequal{\@@setcref}{\LWR@orig@@@setcref}{% before v0.21 + \renewcommand*{\@@setcref}[2]{#1{\ref{#2}}{}{}} +}{ + \ifdefequal{\@@@setcref}{\LWR@orig@@@setcref}{% as of v0.21 + \renewcommand*{\@@@setcref}[2]{% + #1{\ref{#2}}{}{}} + }{ + \PackageWarningNoLine{lwarp-cleveref}{ + Unknown version of cleveref. + \protect\cref\space will fail. + }% + } +} +% \end{macrocode} +% \end{macro} + +%\begin{macro}{\@@@setcrefrange} \marg{text} \marg{label} \marg{label} +% \changes{v0.48}{2018/02/10}{Fix for new v0.21 of \pkg{cleveref}.} +% \begin{macrocode} +\def\LWR@orig@@@setcrefrange#1#2#3{% + \cref@getlabel{#2}{\@labela}% + \cref@getlabel{#3}{\@labelb}% + #1{\@labela}{\@labelb}{}{}{}{}}% + +\ifdefequal{\@@setcrefrange}{\LWR@orig@@@setcrefrange}{ + \renewcommand{\@@setcrefrange}[3]{% + #1{\ref{#2}}{\ref{#3}}{}{}{}{}% + } +}{ + \ifdefequal{\@@@setcrefrange}{\LWR@orig@@@setcrefrange}{ + \renewcommand{\@@@setcrefrange}[3]{% + #1{\ref{#2}}{\ref{#3}}{}{}{}{}% + } + }{ + \PackageWarningNoLine{lwarp-cleveref}{ + Unknown version of cleveref. + \protect\crefrange\space will fail. + } + } +} +% \end{macrocode} +% \end{macro} + +% ^^A orig: +% ^^A \def\@@setcpageref#1#2{% +% ^^A \cref@getpageref{#2}{\@temppage}#1{\@temppage}{}{}} + + +% \label{sec:cpagereffor} +% \begin{macro}{\cpagerefFor} Redefinable word between ``page(s)'' and the page numbers. +% +% \changes{v0.20}{2017/01/03}{User-redefinable word for page references.} +% +% \begin{macrocode} +\newcommand*{\cpagerefFor}{for} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\@@@setcpageref} \marg{typeofref} \marg{label}, +% where typeofref is ``page'' or ``pages'' +% +% \changes{v0.48}{2018/02/10}{Fix for new v0.21 of \pkg{cleveref}.} +% \begin{macrocode} +\def\LWR@orig@@setcpageref#1#2{% before v0.21 + \cref@getpageref{#2}{\@temppage}#1{\@temppage}{}{}}% + +\def\LWR@orig@@@setcpageref#1#2{% as of v0.21 + \cpageref@getlabel{#2}{\@temppage}#1{\@temppage}{}{}}% + +\ifdefequal{\@@setcpageref}{\LWR@orig@@setcpageref}{ + \renewcommand*{\@@setcpageref}[2]{% + #1{\cpagerefFor\ \cref{#2}}{}{}% + } +}{ + \ifdefequal{\@@@setcpageref}{\LWR@orig@@@setcpageref}{ + \renewcommand*{\@@@setcpageref}[2]{% + #1{\cpagerefFor\ \cref{#2}}{}{}% + } + } + { + \PackageWarningNoLine{lwarp-cleveref}{ + Unknown version of cleveref. + \protect\cpageref\space will fail. + } + } +} +% \end{macrocode} +% \end{macro} + + +% ^^A orig: +% ^^A \def\@@setcpagerefrange#1#2#3{% +% ^^A \cref@getpageref{#2}{\@pagea}% +% ^^A \cref@getpageref{#3}{\@pageb}% +% ^^A #1{\@pagea}{\@pageb}{}{}{}{}} + +% \begin{macrocode} +\def\LWR@orig@@setcpagerefrange#1#2#3{% before v0.21 + \cref@getpageref{#2}{\@pagea}% + \cref@getpageref{#3}{\@pageb}% + #1{\@pagea}{\@pageb}{}{}{}{}}% + +\def\LWR@orig@@@setcpagerefrange#1#2#3{% as of v0.21 + \cpageref@getlabel{#2}{\@pagea}% + \cpageref@getlabel{#3}{\@pageb}% + #1{\@pagea}{\@pageb}{}{}{}{}}% + +\ifdefequal{\@@setcpagerefrange}{\LWR@orig@@setcpagerefrange}{ + \renewcommand*{\@@setcpagerefrange}[3]{% + #1{\cpagerefFor\ \cref{#2}}{\cref{#3}}{}{}{}{}% + } +}{ + \ifdefequal{\@@@setcpagerefrange}{\LWR@orig@@@setcpagerefrange}{ + \renewcommand*{\@@@setcpagerefrange}[3]{% + #1{\cpagerefFor\ \cref{#2}}{\cref{#3}}{}{}{}{}% + } + } + { + \PackageWarningNoLine{lwarp-cleveref}{ + Unknown version of cleveref. + \protect\cpagerefrange\space will fail. + } + } +} +% \end{macrocode} +% +% If \pkg{hyperref} is loaded, \pkg{cleveref} defines starred versions of the following, +% but since \pkg{hyperref} is only emulated, starred versions are defined here: +% \changes{v0.88}{2020/07/05}{\pkg{cleveref}, \pkg{varioref}: Fix for starred macros.} +% \begin{macrocode} +\LWR@absorbstar{cref} +\LWR@absorbstar{Cref} +\LWR@absorbstar{crefrange} +\LWR@absorbstar{Crefrange} +\LWR@absorbstar{cpageref} +\LWR@absorbstar{Cpageref} +\LWR@absorbstar{cpagerefrange} +\LWR@absorbstar{Cpagerefrange} +\LWR@absorbstar{labelcref} +\LWR@absorbstar{labelcpageref} +% \end{macrocode} +% +% ^^A *varioref +% If \pkg{hyperref} is loaded, \pkg{cleveref} also defines starred versions +% of \pkg{varioref} macros, so they are defined here. +% \begin{macrocode} +\@ifpackageloaded{varioref}{ + \LWR@absorbstar{vref} + \LWR@absorbstar{Vref} + \LWR@absorbstar{vrefrange} + \LWR@absorbstar{Vrefrange} + \LWR@absorbstar{fullref} + \LWR@absorbstar{Fullref} +}{}% varioref +% \end{macrocode} +% +% +% ^^A % For \brand{MathJax} and \pkg{cleveref}, +% ^^A % but not \pkg{varioref} since \pkg{varioref} macros would only +% ^^A % be useful in math inside a \cs{text} macro, where they do not +% ^^A % work in \brand{MathJax}. +% ^^A % +% ^^A % \changes{v0.88}{2020/07/05}{\pkg{cleveref}: Added \brand{MathJax} emulation.} +% ^^A % \begin{macrocode} +% ^^A \CustomizeMathJax{\newcommand{\cref}{\ifstar\eqref\eqref}} +% ^^A \CustomizeMathJax{\let\Cref\cref} +% ^^A \CustomizeMathJax{\newcommand{\LWRcrefrange}[2]{% +% ^^A \eqref{#1}--\eqref{#2}% +% ^^A }} +% ^^A \CustomizeMathJax{\newcommand{\crefrange}{% +% ^^A \ifstar\LWRcrefrange\LWRcrefrange% +% ^^A }} +% ^^A \CustomizeMathJax{\let\Crefrange\crefrange} +% ^^A \CustomizeMathJax{\let\cpageref\cref} +% ^^A \CustomizeMathJax{\let\Cpageref\cref} +% ^^A \CustomizeMathJax{\let\cpagerefrange\crefrange} +% ^^A \CustomizeMathJax{\let\Cpagerefrange\crefrange} +% ^^A \CustomizeMathJax{\let\labelcref\cref} +% ^^A \CustomizeMathJax{\let\labelcpageref\cpageref} +% ^^A % \end{macrocode} +% ^^A % +% ^^A % For \pkg{varioref}, which is modified by \pkg{cleveref}, +% ^^A % so must be patched here: +% ^^A % \begin{macrocode} +% ^^A \CustomizeMathJax{\let\vref\cref} +% ^^A \CustomizeMathJax{\let\Vref\cref} +% ^^A \CustomizeMathJax{\let\vpageref\cref} +% ^^A \CustomizeMathJax{\let\Vpageref\cref} +% ^^A \CustomizeMathJax{\let\vrefrange\crefrange} +% ^^A \CustomizeMathJax{\let\Vrefrange\crefrange} +% ^^A \CustomizeMathJax{\let\vpagerefrange\crefrange} +% ^^A \CustomizeMathJax{\let\Vpagerefrange\crefrange} +% ^^A \CustomizeMathJax{\let\fullref\cref} +% ^^A \CustomizeMathJax{\let\Fullref\cref} +% ^^A % \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% +% \iffalse %<*clrdblpg> % \fi % @@ -49883,7 +50977,7 @@ name = \chemmacros_translate:n {scheme-name} % Finish the current page's errata before closing and reloading the list: % \begin{macrocode} -\preto\PrintErrata{\LWR@orignewpage} +\preto\PrintErrata{\LWR@maybe@orignewpage} % \end{macrocode} % No longer defining math macros with the \HTML\ |$|: @@ -50649,11 +51743,14 @@ name = \chemmacros_translate:n {scheme-name} % % \section{fancyref} % +% \credits{Axel Reichert} +% % \DescribePackage{fancyref} -% \pkg{fancyref} is emulated. +% \pkg{fancyref} is modifed for \HTML\ output. % % \changes{v0.44}{2017/11/22}{\pkg{fancyref}: Added.} % \changes{v0.48}{2018/02/04}{\pkg{fancyref}: Now directly supported.} +% \changes{v0.88}{2020/07/20}{\pkg{fancyref}: Now uses \pkg{varioref} which ignores page-related output.} % % \codehtml % @@ -50673,36 +51770,6 @@ name = \chemmacros_translate:n {scheme-name} \renewcommand*{\fancyrefhook}[1]{#1}% } % \end{macrocode} - -% Modified to ignore the page number and \pkg{varioref}. -% \begin{macrocode} -\renewcommand*{\@f@ref}[4]{% - \@ifundefined{#1r@#2@#3}{% - \PackageError{lwarp-fancyref}{% - \backslashchar#1ref\space format ``#2'' - undefined\MessageBreak - for label type ``#3''% - }{% - The format ``#2'' was not defined for the label type - ``#3''\MessageBreak - and the \backslashchar#1ref\space command. Perhaps - you have only misspelled its name.\MessageBreak - Otherwise you will have to define it with - \protect\new#1refformat\MessageBreak - prior to using it.% - }% - }{% - \fancyrefhook{% - \@nameuse{#1r@#2@#3}% - {\ref{#3\fancyrefargdelim#4}}% -% {\pageref{#3\fancyrefargdelim#4}}% original -% {\@fancyref@page@ref{#3\fancyrefargdelim#4}}% original - {}% lwarp - {}% lwarp - }% - }% -}% -% \end{macrocode} % % \iffalse % @@ -51146,6 +52213,169 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space % % % \iffalse +%<*fbox> +% \fi +% +% \part{lwarp-fbox.sty} +% +% \section{fbox} +% +% \credits{Herbert Voß} +% +% \DescribePackage{fbox} +% \pkg{fbox} is patched for use by \pkg{lwarp}. +% +% \changes{v0.88}{2020/06/30}{\pkg{fbox}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackagePass{fbox}[2020/06/22] +% \end{macrocode} +% +% This will be \cs{LWR@formatted} when \cs{AtBeginDocument}: +% \begin{macrocode} +\LetLtxMacro\LWR@HTML@fbox\fbox +% \end{macrocode} +% +% Instead of using the original, the new version is used with all borders: +% \begin{macrocode} +\renewcommand*{\orig@fbox}{\FBox@i[tblr]} +% \end{macrocode} +% +% \begin{noindmacro}{LWR@fboxpkg@border} +% \marg{1: top \Slash bottom \Slash left \Slash right} \marg{2: padding, or empty} +% +% Accumulates \HTML\ styles for border, and padding if given: +% \begin{macrocode} +\newcommand*{\LWR@fboxpkg@border}[2]{% + \appto\LWR@tempone{% + border-#1: % space + \LWR@printlength{\LWR@atleastonept} % space + solid \LWR@origpound\LWR@tempcolor ;\LWR@indentHTML + }% + \ifblank{#2}{}{% + \appto\LWR@tempone{% + padding-#1: \LWR@printlength{#2} ;\LWR@indentHTML + }% + }% +} +% \end{macrocode} +% \end{noindmacro} +% +% A hack to reuse the same code for inline and blocks: +% \begin{macrocode} +\newbool{LWR@fboxpkg@ispar} +\boolfalse{LWR@fboxpkg@ispar} +% \end{macrocode} +% +% Acculumate \HTML\ styles for left and right padding, +% depending on \cs{if@fbox@space@left}, \cs{if@fbox@space@right}: +% \begin{macrocode} +\newcommand{\LWR@fboxpkg@lrpadding}[1]{% + \csuse{if@fbox@space@#1}% + \appto\LWR@tempone{% + padding-#1: \LWR@printlength{\fbox@@sep};\LWR@indentHTML + } + \else% + \appto\LWR@tempone{% + padding-#1: 0pt;\LWR@indentHTML + } + \fi% +} +% \end{macrocode} +% +% The \HTML\ version, modified to use \HTML\ styles and either +% an \cs{InlineClass} or \env{BlockClass}: +% \begin{macrocode} +\newcommand{\LWR@HTML@FBox@iii}[1]{% +% \end{macrocode} +% +% Find and set the text color, rule width, margin: +% \begin{macrocode} + \LWR@forceminwidth{\fbox@@rule}% + \LWR@findcurrenttextcolor% + \def\LWR@tempone{% + color: \LWR@origpound\LWR@tempcolor ; \LWR@indentHTML + margin: 1ex ; \LWR@indentHTML + }% +% \end{macrocode} +% +% Add left/right padding: +% \begin{macrocode} + \LWR@fboxpkg@lrpadding{left}% + \LWR@fboxpkg@lrpadding{right}% +% \end{macrocode} +% +% Per the original to decode the borders, in a new way: +% \begin{macrocode} + \ifnum\the\@tempcntb>8\relax + \advance\@tempcntb by -8 + \LWR@fboxpkg@border{top}{\fbox@@sep}% + \fi + \ifnum\@tempcntb>3 + \advance\@tempcntb by -4 + \LWR@fboxpkg@border{left}{}% + \fi + \ifnum\@tempcntb>1 + \LWR@fboxpkg@border{right}{}% + \fi + \ifodd\@tempcntb + \LWR@fboxpkg@border{bottom}{\fbox@@sep}% + \fi +% \end{macrocode} +% +% Generate a \env{BlockClass} or \cs{InlineClass} with the contents: +% \begin{macrocode} + \color@begingroup + \ifbool{LWR@fboxpkg@ispar}% + {% + \begin{BlockClass}[\LWR@tempone]{fboxpkg}% + #1% + \end{BlockClass}% + }% + {% + \InlineClass[\LWR@tempone]{fboxpkg}{% + #1% + }% + }% + \color@endgroup + \boolfalse{LWR@fboxpkg@ispar}% globally +} +\LWR@formatted{FBox@iii} +% \end{macrocode} +% +% For \cs{fparbox}, set the use of \env{BlockClass}, then reuse the above: +% \begin{macrocode} +\long\def\LWR@HTML@FParBox@i[#1]#2{% + \booltrue{LWR@fboxpkg@ispar}% + \FBox@i[#1]{#2} +} +\LWR@formatted{FParBox@i} + +\long\def\LWR@HTML@FParBox@ii#1{% + \booltrue{LWR@fboxpkg@ispar}% + \FBox@i[tblr]{#1}% +} +\LWR@formatted{FParBox@ii} +% \end{macrocode} +% +% For \brand{MathJax}, absorb and ignore star and optional arguments: +% \begin{macrocode} +\CustomizeMathJax{\let\LWRorigfbox\fbox} +\CustomizeMathJax{\newcommand{\LWRfboxpkgtwo}[2][]{\LWRorigfbox{#2}}} +\CustomizeMathJax{\renewcommand{\fbox}{\ifstar\LWRfboxpkgtwo\LWRfboxpkgtwo}} +\CustomizeMathJax{\newcommand{\fparbox}{\fbox}} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% +% \iffalse %<*fewerfloatpages> % \fi % @@ -53517,6 +54747,75 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space % % % \iffalse +%<*gindex> +% \fi +% +% \part{lwarp-gindex.sty} +% +% \section{gindex} +% +% \credits{Javier Bezos} +% +% \DescribePackage{gindex} +% \pkg{gindex} is patched for use by \pkg{lwarp}. +% +% See \cref{sec:indexsetup}. +% +% \changes{v0.88}{2020/07/16}{\pkg{gindex}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackagePass{gindex}[2019/10/07] +% \end{macrocode} +% +% Set the index page and range separators. +% These are set \cs{AtBeginDocument} to allow the user to change them. +% They are then protected so that the \pkg{lwarp} core looks for the +% tokens instead of their expanded contents, since the \filenm{*.ind} +% files will contain \cs{indexpagessep} and \cs{indexrangesep} instead of +% their literal contents. +% Finally, \pkg{lwarp} is told of the \pkg{gindex} macros. +% \begin{macrocode} +\AtBeginDocument{ + \robustify{\indexpagessep} + \robustify{\indexrangesep} + \renewcommand*{\IndexPageSeparator}{\indexpagessep} + \renewcommand*{\IndexRangeSeparator}{\indexrangesep} +} +% \end{macrocode} +% +% \cs{hyperindexref} is added: +% \begin{macrocode} +\def\addindexitem#1#2{% + \indexflushitem + \gix@getspecial#1\indexspecial\indexspecial\@@\indexitem{\hyperindexref{#2}}} + +\def\addindexsubitem#1#2{% + \stepcounter{indexsubitems}% + \gix@getspecial#1\indexspecial\indexspecial\@@\indexsubitem{\hyperindexref{#2}}} + +\def\addindexsubsubitem#1#2{% + \gix@getspecial#1\indexspecial\indexspecial\@@\indexsubsubitem{\hyperindexref{#2}}} +% \end{macrocode} +% +% Uses a \element{div} of class \attribute{indexheading}: +% \begin{macrocode} +\renewcommand\indexheading[1]{% + \begin{BlockClass}{indexheading} + \MakeUppercase{#1}% + \end{BlockClass} +} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% +% \iffalse %<*gloss> % \fi % @@ -55170,11 +56469,13 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} % \changes{v0.57}{2018/06/05}{\pkg{subcaption}: Fix: \cs{subref}.} % % Creates an \HTML\ link to |URL#category.name| with the given text. +% +% To avoid nested links, \cs{ref} is temporarily redefined to the print version. % \begin{macrocode} \newcommand{\LWR@hyperreffinish}[1]{% \begingroup% - \RenewDocumentCommand{\ref}{}{\LWR@ref@ignorestar}% - #1% + \RenewDocumentCommand{\ref}{s m}{\LWR@print@ref{##2}}% + #1% \endgroup% \LWR@htmltag{/a}% } @@ -55631,7 +56932,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} \AtBeginDocument{ \preto\printindex{ - \LWR@orignewpage + \LWR@maybe@orignewpage \LWR@startpars \LWR@indexprenote @@ -55742,7 +57043,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} \catcode`\_=12% \renewcommand*{\printindex}[1][\imki@jobname]{% -\LWR@orignewpage% +\LWR@maybe@orignewpage% \LWR@startpars% \ifstrequal{#1}{\imki@jobname}{% \@ifundefined{#1@idxfile}{% @@ -55825,14 +57126,14 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} % \begin{macrocode} \renewcommand\imki@wrindexentrysplit[3]{% \addtocounter{LWR@autoindex}{1}% -\LWR@new@label{LWRindex-\arabic{LWR@autoindex}}% +\label{LWRindex-\arabic{LWR@autoindex}}% \expandafter\protected@write\csname#1@idxfile\endcsname{}% {\string\indexentry{#2}{\arabic{LWR@autoindex}}}% } \renewcommand\imki@wrindexentryunique[3]{% \addtocounter{LWR@autoindex}{1}% -\LWR@new@label{LWRindex-\arabic{LWR@autoindex}}% +\label{LWRindex-\arabic{LWR@autoindex}}% \protected@write\@indexfile{}% {\string\indexentry[#1]{#2}{\arabic{LWR@autoindex}}}% } @@ -55855,7 +57156,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} % % \begin{noindmacro}{\LWR@imki@setxdydefopts} % -% Sets the \pkg{xindy} \HTML\ options, ignoring the user's settings. +% Sets the \prog{xindy} \HTML\ options, ignoring the user's settings. % \begin{macrocode} \newcommand*{\LWR@imki@setxdydefopts}{% \edef\imki@options{ \space % @@ -55870,7 +57171,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} % \begin{noindmacro}{\LWR@imki@setdefopts} \marg{user options} % % Sets the \HTML\ options, added to the user's settings, -% depending on whether \pkg{makeindex} or \pkg{xindy} are used. +% depending on whether \prog{makeindex} or \prog{xindy} are used. % % For \prog{makeindex}, the user's choice is ignored, and only the \pkg{lwarp} % version is used. (Only one style at a time is possible.) @@ -56023,7 +57324,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} {\begingroup} {% \addtocounter{LWR@autoindex}{1}% lwarp - \LWR@new@label{LWRindex-\arabic{LWR@autoindex}}% lwarp + \label{LWRindex-\arabic{LWR@autoindex}}% lwarp \begingroup% } {} @@ -57475,7 +58776,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} \LWR@traceinfo{About to create verbatim.}% \let\lsthk@EveryPar\relax% \LWR@forcenewpage% - \LWR@atbeginverbatim{2}{programlisting}% + \LWR@atbeginverbatim{1.5}{programlisting}% \let\lsthk@EveryPar\LWR@origlsthkEveryPar% \else% @@ -58617,7 +59918,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} % This allows for correct spacing in the musical score. % \changes{v0.74}{2019/08/13}{\pkg{lyluatex}: Adapts to user's geometry.} % \begin{macrocode} - \LWR@orignewpage% + \LWR@maybe@orignewpage% \LWR@origloadgeometry{LWR@usergeometry}% \LWR@print@normalsize% % \end{macrocode} @@ -58674,7 +59975,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} % \end{macrocode} % Move to a new page and renew the regular page geometry: % \begin{macrocode} - \LWR@orignewpage% + \LWR@maybe@orignewpage% \LWR@origrestoregeometry% % \end{macrocode} % End of the local group. @@ -58770,7 +60071,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} % \changes{v0.58}{2018/06/13}{Fix: Extra \cs{newpage} to flush pending \cs{index} writes.} % \begin{macrocode} \preto\printindex{% - \LWR@orignewpage% + \LWR@maybe@orignewpage% \LWR@startpars% } % \end{macrocode} @@ -65295,20 +66596,27 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak % \section{pdfrender} % % \DescribePackage{pdfrender} -% \pkg{pdfrender} is ignored. +% \pkg{pdfrender} is allowed during \HTML, but it has no effect on +% \HTML\ text output. +% \pkg{pdfrender} is enabled for use with \pkg{xfakebold}, and +% it is enabled during \HTML\ so that it may be in use when +% an \SVG\ math image is started. +% I.e. \pkg{xfakebold}'s \cs{setBold} may be used outside of a +% math expression and still be detected when the math begins. +% +% The \pkg{lwarp-pdfrender} package is present because it used to +% disable \pkg{pdfrender}, so this newer version is to overwrite +% older versions. % % \changes{v0.49}{2018/02/15}{\pkg{pdfrender}: Added.} +% \changes{v0.88}{2020/06/29}{\pkg{pdfrender}: Restored for \pkg{xfakebold}.} % % \codehtml % % \begin{macrocode} -\LWR@ProvidesPackageDrop{pdfrender}[2016/05/17] +\LWR@ProvidesPackagePass{pdfrender}[2019/12/29] % \end{macrocode} % -% \begin{macrocode} -\newcommand*{\pdfrender}[1]{} -\newcommand{\textpdfrender}[2]{#2} -% \end{macrocode} % % \iffalse % @@ -68373,6 +69681,50 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % % % +% +% +% \iffalse +%<*shadethm> +% \fi +% +% \part{lwarp-shadethm.sty} +% +% \section{shadethm} +% +% \credits{Jim Hefferon} +% +% \DescribePackage{shadethm} +% \pkg{shadethm} is patched for use by \pkg{lwarp}. +% +% \changes{v0.88}{2020/07/07}{\pkg{shadethm}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackagePass{shadethm}[1999/11/23] +% \end{macrocode} +% +% \begin{macrocode} +\newenvironment{LWR@HTML@shadebox} +{% + \convertcolorspec{named}{shadethmcolor}{HTML}\LWR@tempcolor% + \convertcolorspec{named}{shaderulecolor}{HTML}\LWR@tempcolortwo% + \begin{BlockClass}[% + background: \LWR@origpound\LWR@tempcolor ; + border: 1px solid \LWR@origpound\LWR@tempcolortwo ; + ]{shadebox} +}% +{\end{BlockClass}} +\LWR@formattedenv{shadebox} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% % \iffalse %<*shadow> % \fi @@ -70160,7 +71512,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', \csname index@#1@hook\endcsname % \expandafter\ifx\csname @@wrsindex\endcsname\relax \addtocounter{LWR@autoindex}{1}% lwarp - \LWR@new@label{LWRindex-\arabic{LWR@autoindex}}% lwarp + \label{LWRindex-\arabic{LWR@autoindex}}% lwarp % \@@@wrsindex{#1}{{\@tempa}{\thepage}}% \@@@wrsindex{#1}{{\@tempa}{\arabic{LWR@autoindex}}}% % \else @@ -72130,6 +73482,414 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % % % \iffalse +%<*tcolorbox> +% \fi +% +% \part{lwarp-tcolorbox.sty} +% +% \section{tcolorbox} +% +% \credits{Thomas F. Sturm} +% +% \DescribePackage{tcolorbox} +% \pkg{tcolorbox} is patched for use by \pkg{lwarp}. +% +% See \cref{sec:limitstcolorbox} for limitations. +% +% \changes{v0.88}{2020/06/25}{\pkg{tcolorbox}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackagePass{tcolorbox}[2020/04/28] +% \end{macrocode} +% +% \begin{macrocode} +\newbool{LWR@havetcblower} +\boolfalse{LWR@havetcblower} +% \end{macrocode} +% +% Colors are supported via \HTML\ styles: +% \begin{macrocode} +\newcommand{\LWR@tcolorbox@findcolors}{% + \convertcolorspec{named}{tcbcolback}{HTML}\LWR@tcbcolback + \convertcolorspec{named}{tcbcolframe}{HTML}\LWR@tcbcolframe + \iftcb@titlefilled% + \convertcolorspec{named}{tcbcolbacktitle}{HTML}\LWR@tcbcolbacktitle + \else + \convertcolorspec{named}{tcbcolframe}{HTML}\LWR@tcbcolbacktitle + \fi + \convertcolorspec{named}{tcbcoltitle}{HTML}\LWR@tcbcoltitle + \convertcolorspec{named}{tcbcolupper}{HTML}\LWR@tcbcolupper + \convertcolorspec{named}{tcbcollower}{HTML}\LWR@tcbcollower +} + +\newcommand*{\LWR@tcolorbox@titlecolorstyles}{% + border-top: 1px solid \LWR@origpound\LWR@tcbcolframe ; + border-bottom: 1px solid \LWR@origpound\LWR@tcbcolframe ; + background: \LWR@origpound\LWR@tcbcolbacktitle ; + color: \LWR@origpound\LWR@tcbcoltitle ; +} +% \end{macrocode} +% +% The title is placed inside its own \element{div} of class \optn{tcolorboxtitle}. +% \begin{macrocode} +\newcommand*{\LWR@showtitle@}[1]{% + \begin{BlockClass}[ + \LWR@tcolorbox@titlecolorstyles + ]{tcolorboxtitle} +% \cmdKV@LWRtcolorbox@title\par + \kvtcb@before@title#1\kvtcb@after@title + \end{BlockClass} +} +% \end{macrocode} +% +% If no title, a non-breakable space is used to take some vertical space. +% \begin{macrocode} +\newcommand*{\LWR@showtitle}[1]{% + \iftcb@titlevisible + \LWR@showtitle@{#1} + \else + \LWR@showtitle@{~} + \fi +} + +\newcommand*{\LWR@tcolorbox@dophantom}{% +% \sbox\tcb@phantombox{\kvtcb@phantom}% +% \iftcb@hasPhantom% +% \box\tcb@phantombox% +% \tcb@hasPhantomfalse% +% \fi% + \kvtcb@phantom + \let\kvtcb@phantom\@empty% +} +% \end{macrocode} +% +% The \env{tcolorbox} is placed inside +% an external \element{div} of class \optn{\#1}, which +% is \optn{tcolorbox} or \optn{tcolorbox inlineminipage}. +% The upper and lower parts are placed into their own internal +% \element{div}s of class \optn{tcolorboxupper} and \optn{tcolorboxlower}. +% \begin{macrocode} +\newcommand*{\LWR@tcolorboxstart}[1]{ + \LWR@tcolorbox@findcolors + \begin{BlockClass}[ + border: 1px solid \LWR@origpound\LWR@tcbcolframe ; + background: \LWR@origpound\LWR@tcbcolback ; + ]{#1} + \LWR@tcolorbox@dophantom% + \ifdefvoid{\kvtcb@title} + {} + { + \LWR@showtitle{\kvtcb@title} + } + \begin{BlockClass}[ + color: \LWR@origpound\LWR@tcbcolupper ; + ]{tcolorboxupper} +} +% \end{macrocode} +% +% Floats enclose the \env{tcolorbox}. +% \begin{macrocode} +\newcommand*{\LWR@tcolorbox@dostartfloat}{% + \ifx\kvtcb@float\@empty% +% \tcb@set@normal@unbroken@beforeafter% + \else% +% \edef\tcb@before@unbroken{% +% \noexpand\tcb@float@env@begin{tcbfloat}[\kvtcb@float]% +% \noexpand\kvtcb@everyfloat% +% }% +% \let\tcb@after@unbroken=\tcb@float@env@end% + \tcb@float@env@begin{tcbfloat}[\kvtcb@float] + \noexpand\kvtcb@everyfloat + \fi% +} + +\newcommand*{\LWR@tcolorbox@doendfloat}{% + \ifx\kvtcb@float\@empty% + \else% + \tcb@float@env@end% + \fi% +} +% \end{macrocode} +% +% Footnotes are handled via the main footnote mechanism, and +% pending notes are printed before and after each \env{tcolorbox}. +% Footnote numbering will not match the print output. +% \begin{macrocode} +\renewenvironment{tcolorbox}[1][] + { + \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% + { + \PackageError{lwarp} + {% + Lwarp cannot process a tcolorbox inside a lateximage\MessageBreak + or SVG math.\MessageBreak + Enter 'H' for possible solutions% + } + {% + Use \protect\tcbox, \protect\tcboxmath, or + \protect\tcbhighmath\space instead.\MessageBreak% + (Inside math, you probably want to use these anyhow.)% + } + }{} + \LWR@printpendingfootnotes + \tcb@layer@inc + \tcb@apply@box@options{#1} + \LWR@tcolorbox@dostartfloat% +% \tcbset{title=,#1} + \boolfalse{LWR@havetcblower} + \LWR@tcolorboxstart{tcolorbox} + \tcb@insert@before@upper% + } + { + \ifbool{LWR@havetcblower}{% + \tcb@insert@after@lower% + }{% + \tcb@insert@after@upper% + }% + \end{BlockClass} + \LWR@printpendingfootnotes + \tcb@layer@dec + \end{BlockClass} + \LWR@tcolorbox@doendfloat% + } +% \end{macrocode} +% +% For the lower part, the upper part is finished then the lower is started. +% \cs{tcblower} is only temporarily defined where appropriate, so the \HTML\ version is +% defined globally via \cs{newcommand} instead of \cs{renewcommand}. +% \begin{macrocode} +\newcommand{\tcblower}{ + \tcb@insert@after@upper% + \end{BlockClass} + \begin{BlockClass}[% + border-top: 1px dashed \LWR@origpound\LWR@tcbcolframe ; + color: \LWR@origpound\LWR@tcbcollower ; + ]{tcolorboxlower} + \tcb@insert@before@lower% +} +% \end{macrocode} +% +% Starred and unstarred \cs{tcbline} are simple \cs{hrule}s. +% \begin{macrocode} +\AtBeginDocument{ +\ifdef{\tcbline}{ + \newcommand*{\LWR@sub@tcbline}{% + \begin{BlockClass}{hrule} + \end{BlockClass} + } + \newcommand{\LWR@HTML@tcbline}{\@ifstar\LWR@sub@tcbline\LWR@sub@tcbline} + \LWR@formatted{tcbline} +}{} +} + +\newcommand{\LWR@HTML@tcbox}[2][]{ + \LWR@printpendingfootnotes + \LWR@tcolorbox@dostartfloat% + \begingroup + \tcb@layer@inc + \tcb@apply@box@options{#1} +% \tcbset{title=,#1} + \boolfalse{LWR@havetcblower} + \LWR@tcolorboxstart{tcolorbox inlineminipage} + \tcb@insert@before@upper% + #2 + \ifbool{LWR@havetcblower}{% + \tcb@insert@after@lower% + }{% + \tcb@insert@after@upper% + }% + \end{BlockClass} + \LWR@printpendingfootnotes + \end{BlockClass} + \tcb@layer@dec% + \endgroup% + \LWR@tcolorbox@dostartfloat% + \global\booltrue{LWR@minipagethispar}% +} +\LWR@formatted{tcbox} + +\appto\LWR@restoreMathJaxformatting{% + \renewcommand{\tcbox}[2][]{#2}% +} +% \end{macrocode} +% +% Patches for the subtitle, which is placed inside a \element{div} +% of class \optn{tcolorboxsubtitle}. +% \begin{macrocode} +\xpatchcmd{\tcbsubtitle} + {\begingroup} + {\begingroup\let\kvtcb@title\relax\begin{BlockClass}{tcolorboxsubtitle}} + {} + {\LWR@patcherror{tcolorbox}{tcbsubtitle}} + +\xpatchcmd{\tcbsubtitle} + {\endgroup} + {\end{BlockClass}\endgroup} + {} + {\LWR@patcherror{tcolorbox}{tcbsubtitleB}} +% \end{macrocode} +% +% \cs{tcboxfit} is the same as \cs{tcbox}. +% \begin{macrocode} +\AtBeginDocument{ + \ifdef{\tcboxfit}{% + \let\LWR@HTML@tcboxfit\tcbox% + \LWR@formatted{tcboxfit} + }{} +} +% \end{macrocode} +% +% \cs{tcbtitle} is patched to support the text font. +% \begin{macrocode} +\LetLtxMacro\LWR@HTML@tcbtitle\tcbtitle +\xpatchcmd{\LWR@HTML@tcbtitle} + {\kvtcb@before@title\tcbtitletext} + {\kvtcb@before@title\LWR@textcurrentfont{\LWR@textcurrentcolor{\tcbtitletext}}} + {} + {\LWR@patcherror{tcolorbox}{LWR@HTML@tcbtitle}} +\LWR@formatted{tcbtitle} +% \end{macrocode} +% +% List-of: +% \begin{macrocode} +\renewcommand*\l@tcolorbox[2]{\hypertocfloat{1}{tcolorbox}{lof}{#1}{#2}} +% \end{macrocode} +% +% Theorem limitations. +% An error is printed if the document uses \optn{math}, \optn{ams equation}, etc. +% \cs{tcboxmath} and \cs{tcbhighmath} are ignored for \HTML. +% \begin{macrocode} +\AtBeginDocument{ +\pgfkeysifdefined{/tcb/libload/theorems}{ + + \def\LWR@HTML@tcb@hack@amsmath{% + \PackageError{lwarp} + {% + tcolorbox ``math'', ``ams equation'', and related\MessageBreak + are not supported.\MessageBreak + \protect\tcboxmath\space and + \protect\tcbhighmath\space are emulated.\MessageBreak + Enter 'H' for possible solutions% + } + {% + Remove tcolorbox math-related options, and instead\MessageBreak + use the usual math environments inside each tcolorbox.% + } + } + \LWR@formatted{tcb@hack@amsmath} + + % Cause an error if using math: + \tcbset{% + math upper/.style={before upper*=\tcb@hack@amsmath,after upper*=$},% + math lower/.style={before lower*=\tcb@hack@amsmath,after lower*=$},% + } + + \appto\LWR@restoreorigformatting{% + \tcbset{% + math upper/.style={before upper*=$\displaystyle,after upper*=$},% + math lower/.style={before lower*=$\displaystyle,after lower*=$},% + }% + } + + \newcommand{\LWR@HTML@tcboxmath}[2][]{#2} + \LWR@formatted{tcboxmath} + \newcommand{\LWR@HTML@tcbhighmath}[2][]{#2} + \LWR@formatted{tcbhighmath} + \appto\LWR@restoreMathJaxformatting{% + \renewcommand{\tcboxmath}[2][]{#2}% + \renewcommand{\tcbhighmath}[2][]{#2}% + } +}{}% theorems loaded +}% AtBeginDocument +% \end{macrocode} +% +% For \brand{MathJax}: +% \begin{macrocode} +\CustomizeMathJax{\newcommand{\tcbset}[1]{}} +\CustomizeMathJax{\newcommand{\tcbsetforeverylayer}[1]{}} +\CustomizeMathJax{\newcommand{\tcbox}[2][]{\boxed{\text{#2}}}} +\CustomizeMathJax{\newcommand{\tcboxfit}[2][]{\boxed{#2}}} +\CustomizeMathJax{\newcommand{\tcblower}{}} +\CustomizeMathJax{\newcommand{\tcbline}{}} +\CustomizeMathJax{\newcommand{\tcbtitle}{}} +\CustomizeMathJax{\newcommand{\tcbsubtitle[2][]{\mathrm{#2}}}} +\CustomizeMathJax{\newcommand{\tcboxmath}[2][]{\boxed{#2}}} +\CustomizeMathJax{\newcommand{\tcbhighmath}[2][]{\boxed{#2}}} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% +% \iffalse +%<*termcal> +% \fi +% +% \part{lwarp-termcal.sty} +% +% \section{termcal} +% +% \credits{Bill Mitchell} +% +% \DescribePackage{termcal} +% \pkg{termcal} is patched for use by \pkg{lwarp}. +% +% \changes{v0.88}{2020/06/19}{\pkg{termcal}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackagePass{termcal}% questionable date in the .sty file +% \end{macrocode} +% +% Nullify the @{} because everything is being done in a token list. +% \begin{macrocode} +\xpatchcmd{\endcalendar} + {@{}} + {} + {} + {\LWR@patcherror{termcal}{endcalendar}} +% \end{macrocode} +% +% Remove the hbox: +% \begin{macrocode} +\xpatchcmd{\ca@doaday} + {\hbox to \hsize{\calprintdate\hfill\ifclassday\calprintclass\fi}} + {% + \calprintdate\hfill\ifclassday\calprintclass\fi% + } + {} + {\LWR@patcherror{termcal}{ca@doaday}} +% \end{macrocode} +% +% Change each of two ampersands to call the lwarp tabular version: +% \begin{macrocode} +\xpatchcmd{\calday} + {&} + {\LWR@tabularampersand} + {} + {\LWR@patcherror{termcal}{calday}} + +\xpatchcmd{\calday} + {&} + {\LWR@tabularampersand} + {} + {\LWR@patcherror{termcal}{calday B}} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% +% \iffalse %<*textarea> % \fi % @@ -72761,6 +74521,162 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % % % +% +% +% ^^A *thmtools: See thm-listof and thm-restate, following: +% +% \iffalse +%<*thm-listof> +% \fi +% +% \part{lwarp-thm-listof.sty} +% +% \section{thm-listof} +% +% \credits{Ulrich M. Schwarz} +% +% \DescribePackage{thm-listof} +% \pkg{thm-listof} is part of \pkg{thmtools}, and is patched for use by \pkg{lwarp}. +% +% \changes{v0.88}{2020/07/03}{\pkg{thm-listof}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackagePass{thm-listof}[2019/12/22] +% \end{macrocode} +% +% For font control, see the generated \HTML\ and +% use \CSS\ per \pkg{amsthm} or \pkg{ntheorem}. +% +% Other \pkg{thm-*} package may be loaded by \pkg{thm-listof}. +% \begin{macrocode} +\xpatchcmd{\listoftheorems} + {% + \@xa\protected@edef\csname l@\thmt@envname\endcsname{% + \@nx\@dottedtocline{1}{1.5em}{\@nx\thmt@listnumwidth}% + }% + } + {% + \csdef{l@\thmt@envname}##1##2{\hypertocfloat{1}{figure}{lof}{##1}{##2}}% + } + {} + {\LWR@patcherror{thm-listof}{listoftheorems}} + +\xpatchcmd{\thmt@mklistcmd} + {% + \@xa\protected@edef\csname l@\thmt@envname\endcsname{% + \@nx\@dottedtocline{1}{1.5em}{\@nx\thmt@listnumwidth}% + }% + } + {% + \csdef{l@\thmt@envname}##1##2{\hypertocfloat{1}{figure}{lof}{##1}{##2}}% + } + {} + {\LWR@patcherror{thm-listof}{thmt@mklistcmd}} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% \iffalse +%<*thm-restate> +% \fi +% +% \part{lwarp-thm-restate.sty} +% +% \section{thm-restate} +% +% \credits{Ulrich M. Schwarz} +% +% \DescribePackage{thm-restate} +% \pkg{thm-restate} is part of \pkg{thmtools}, and is patched for use by \pkg{lwarp}. +% +% \changes{v0.88}{2020/07/03}{\pkg{thm-restate}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackagePass{thm-restate}[2019/12/22] +% \end{macrocode} +% +% \begin{macrocode} +\xpatchcmd{\thmt@restatable} + {\@ifstar} + {\edef\LWR@thisthmstyle{#2}\@ifstar} + {} + {\LWR@patcherror{thm-restate}{thmt@restatable}} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% +% \iffalse +%<*thmbox> +% \fi +% +% \part{lwarp-thmbox.sty} +% +% \section{thmbox} +% +% \credits{Emmanuel Beffara} +% +% \DescribePackage{thmbox} +% \pkg{thmbox} is emulated for use by \pkg{lwarp}. +% +% \changes{v0.88}{2020/07/04}{\pkg{thmbox}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackagePass{thmbox}[2005/04/24] +% \end{macrocode} +% +% \begin{macrocode} +\renewenvironment{thmbox}[2][]% + {% + \begin{BlockClass}{thmbox} + \begin{BlockClass}{thmboxtitle} + #2 + \end{BlockClass} + } + {\end{BlockClass}} + +\renewenvironment{proof}[1][] + {% + \begin{BlockClass}{thmboxproof}% + \InlineClass{thmboxproofname}{\proofname\ #1\unskip\,:} + } + {% + \qquad\HTMLunicode{220E}% end of proof symbol + \end{BlockClass} + } + +\renewenvironment{example}[1][\examplename]% + {% + \begin{BlockClass}{thmboxexample}% + \InlineClass{thmboxexamplename}{#1\,:} + } + {\end{BlockClass}} + +\renewenvironment{leftbar}[1][]% + {\begin{BlockClass}{thmboxleftbar}} + {\end{BlockClass}} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% % \iffalse %<*threadcol> % \fi @@ -75928,6 +77844,44 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % % % \iffalse +%<*varioref> +% \fi +% +% \part{lwarp-varioref.sty} +% +% \section{varioref} +% +% \credits{Frank Mittelbach} +% +% \DescribePackage{varioref} +% \pkg{varioref} is patched for use by \pkg{lwarp}. +% +% \changes{v0.88}{2020/07/05}{\pkg{varioref}: Removed page-related text.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackagePass{varioref}[2020/01/23] +% \end{macrocode} +% +% Page-related output is not used for \HTML\ output. +% \begin{macrocode} +\def\reftextfaceafter {\unskip}% +\def\reftextfacebefore{\unskip}% +\def\reftextafter {\unskip}% +\def\reftextbefore {\unskip}% +\def\reftextcurrent {\unskip}% +\def\reftextfaraway#1{\unskip}% +\def\reftextpagerange#1#2{\unskip}% +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% +% +% \iffalse %<*verse> % \fi % @@ -76990,7 +78944,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % \end{macro} % % -% \begin{noindmacro}{\LWR@colorstyle} \marg{2: model} \marg{3: color} +% \begin{noindmacro}{\LWR@colorstyle} \marg{1: model} \marg{2: color} % % \changes{v0.19}{2016/06/01}{\pkg{xcolor}: Supports colored \cs{rule}.} % \changes{v0.36}{2017/08/11}{\pkg{xcolor}: Refactored \cs{LWR@colorstyle}.} @@ -77609,26 +79563,29 @@ height:\LWR@printlength{\LWR@tempheight}% % \pkg{xfakebold} is patched for use by \pkg{lwarp}, % and additional underlying support is found in the \pkg{lwarp} core. % -% Note that the print version resets to unbold at each page break, -% \trouble[page breaks]{xfakebold=\pkg{xfakebold}} -% whereas the \HTML\ version maintains the bold state until it is undone. +% \pkg{xfakebold} is only used in \SVG\ math and \env{lateximage}s. +% \trouble[text mode]{xfakebold=\pkg{xfakebold}} +% Text mode is not set bold, but \cs{setBold} in text will be applied +% to any following \SVG\ math. % % \changes{v0.67}{2019/02/17}{\pkg{xfakebold}: Added.} +% \changes{v0.88}{2020/06/29}{\pkg{xfakebold}: Now works with \pkg{pdfrender}.} % % \codehtml % % \begin{macrocode} -\LWR@ProvidesPackagePass{xfakebold}[2018/07/25] +\LWR@ProvidesPackagePass{xfakebold}[2020/06/24] % \end{macrocode} % % \begin{macrocode} -\let\LWR@orig@setBold\setBold -\let\LWR@orig@unsetBold\unsetBold -\renewcommand*{\setBold}{\booltrue{LWR@xfakebold}} -\renewcommand*{\unsetBold}{\boolfalse{LWR@xfakebold}} +\newcommand*{\LWR@HTML@setBold}{\booltrue{LWR@xfakebold}} +\LWR@formatted{setBold} + +\newcommand*{\LWR@HTML@unsetBold}{\boolfalse{LWR@xfakebold}} +\LWR@formatted{unsetBold} \renewcommand*{\LWR@applyxfakebold}{% - \ifbool{LWR@xfakebold}{\LWR@orig@setBold}{\LWR@orig@unsetBold}% + \ifbool{LWR@xfakebold}{\LWR@print@setBold}{\LWR@print@unsetBold}% } % \end{macrocode} % @@ -78719,6 +80676,11 @@ height:\LWR@printlength{\LWR@tempheight}% } % \end{macrocode} % +% Do not use \cs{chaptername}: +% \begin{macrocode} +\renewcommand*{\LWR@printchaptername}{} +% \end{macrocode} +% % Simple captions are used in all cases. % \changes{v0.73}{2019/07/10}{\pkg{lwarp-patch-komascript}: Fix for captions.} % \begin{macrocode} @@ -78841,7 +80803,7 @@ height:\LWR@printlength{\LWR@tempheight}% % \changes{v0.83}{2020/03/27}{\pkg{lwarp-patch-memoir}: No longer requires \pkg{subfigure}.} % \changes{v0.84}{2020/04/05}{\pkg{lwarp-patch-memoir}: No longer requires \pkg{subcaption}.} -% ^^A Not sure why this is here: +% ^^A Forgot why this is here: % \begin{macrocode} \makeindex % \end{macrocode} @@ -80154,7 +82116,7 @@ height:\LWR@printlength{\LWR@tempheight}% \def\@@wrindexhyp#1||\\{% \addtocounter{LWR@autoindex}{1}% - \LWR@new@label{LWRindex-\arabic{LWR@autoindex}}% + \label{LWRindex-\arabic{LWR@autoindex}}% % \ifshowindexmark\@showidx{#1}\fi \protected@write\@auxout{}% % {\string\@@wrindexm@m{\@idxfile}{#1}{\thepage}}% @@ -80174,7 +82136,7 @@ height:\LWR@printlength{\LWR@tempheight}% % \begin{macrocode} \def\@@wrspindexhyp#1||\\{% \addtocounter{LWR@autoindex}{1}% - \LWR@new@label{LWRindex-\arabic{LWR@autoindex}}% + \label{LWRindex-\arabic{LWR@autoindex}}% % \ifshowindexmark\@showidx{#1}\fi \protected@write\@auxout{}% % {\string\@@wrindexm@m{\@idxfile}{#1}{\@nameuse{the\@sptheidx}}}% diff --git a/macros/latex/contrib/lwarp/lwarp.ins b/macros/latex/contrib/lwarp/lwarp.ins index 6df4f6965c..e0d03f6bff 100644 --- a/macros/latex/contrib/lwarp/lwarp.ins +++ b/macros/latex/contrib/lwarp/lwarp.ins @@ -116,6 +116,7 @@ version 2005/12/01 or later. \file{lwarp-citeref.sty}{\from{lwarp.dtx}{citeref}} \file{lwarp-CJK.sty}{\from{lwarp.dtx}{CJK}} \file{lwarp-CJKutf8.sty}{\from{lwarp.dtx}{CJKutf8}} +\file{lwarp-cleveref.sty}{\from{lwarp.dtx}{cleveref}} \file{lwarp-clrdblpg.sty}{\from{lwarp.dtx}{clrdblpg}} \file{lwarp-cmdtrack.sty}{\from{lwarp.dtx}{cmdtrack}} \file{lwarp-colonequals.sty}{\from{lwarp.dtx}{colonequals}} @@ -172,6 +173,7 @@ version 2005/12/01 or later. \file{lwarp-fancyref.sty}{\from{lwarp.dtx}{fancyref}} \file{lwarp-fancytabs.sty}{\from{lwarp.dtx}{fancytabs}} \file{lwarp-fancyvrb.sty}{\from{lwarp.dtx}{fancyvrb}} +\file{lwarp-fbox.sty}{\from{lwarp.dtx}{fbox}} \file{lwarp-fewerfloatpages.sty}{\from{lwarp.dtx}{fewerfloatpages}} \file{lwarp-figcaps.sty}{\from{lwarp.dtx}{figcaps}} \file{lwarp-figsize.sty}{\from{lwarp.dtx}{figsize}} @@ -216,6 +218,7 @@ version 2005/12/01 or later. \file{lwarp-gentombow.sty}{\from{lwarp.dtx}{gentombow}} \file{lwarp-geometry.sty}{\from{lwarp.dtx}{geometry}} \file{lwarp-ghsystem.sty}{\from{lwarp.dtx}{ghsystem}} +\file{lwarp-gindex.sty}{\from{lwarp.dtx}{gindex}} \file{lwarp-gloss.sty}{\from{lwarp.dtx}{gloss}} \file{lwarp-glossaries.sty}{\from{lwarp.dtx}{glossaries}} \file{lwarp-gmeometric.sty}{\from{lwarp.dtx}{gmeometric}} @@ -408,6 +411,7 @@ version 2005/12/01 or later. \file{lwarp-sectsty.sty}{\from{lwarp.dtx}{sectsty}} \file{lwarp-semantic-markup.sty}{\from{lwarp.dtx}{semantic-markup}} \file{lwarp-setspace.sty}{\from{lwarp.dtx}{setspace}} +\file{lwarp-shadethm.sty}{\from{lwarp.dtx}{shadethm}} \file{lwarp-shadow.sty}{\from{lwarp.dtx}{shadow}} \file{lwarp-shapepar.sty}{\from{lwarp.dtx}{shapepar}} \file{lwarp-showidx.sty}{\from{lwarp.dtx}{idx}} @@ -448,12 +452,17 @@ version 2005/12/01 or later. \file{lwarp-tabulary.sty}{\from{lwarp.dtx}{tabulary}} \file{lwarp-tagpdf.sty}{\from{lwarp.dtx}{tagpdf}} \file{lwarp-tascmac.sty}{\from{lwarp.dtx}{tascmac}} +\file{lwarp-tcolorbox.sty}{\from{lwarp.dtx}{tcolorbox}} +\file{lwarp-termcal.sty}{\from{lwarp.dtx}{termcal}} \file{lwarp-textarea.sty}{\from{lwarp.dtx}{textarea}} \file{lwarp-textcomp.sty}{\from{lwarp.dtx}{textcomp}} \file{lwarp-textfit.sty}{\from{lwarp.dtx}{textfit}} \file{lwarp-textpos.sty}{\from{lwarp.dtx}{textpos}} \file{lwarp-theorem.sty}{\from{lwarp.dtx}{theorem}} \file{lwarp-thinsp.sty}{\from{lwarp.dtx}{thinsp}} +\file{lwarp-thm-listof.sty}{\from{lwarp.dtx}{thm-listof}} +\file{lwarp-thm-restate.sty}{\from{lwarp.dtx}{thm-restate}} +\file{lwarp-thmbox.sty}{\from{lwarp.dtx}{thmbox}} \file{lwarp-threadcol.sty}{\from{lwarp.dtx}{threadcol}} \file{lwarp-threeparttable.sty}{\from{lwarp.dtx}{threeparttable}} \file{lwarp-threeparttablex.sty}{\from{lwarp.dtx}{threeparttablex}} @@ -492,6 +501,7 @@ version 2005/12/01 or later. \file{lwarp-upref.sty}{\from{lwarp.dtx}{upref}} \file{lwarp-url.sty}{\from{lwarp.dtx}{url}} \file{lwarp-uspace.sty}{\from{lwarp.dtx}{uspace}} +\file{lwarp-varioref.sty}{\from{lwarp.dtx}{varioref}} \file{lwarp-verse.sty}{\from{lwarp.dtx}{verse}} \file{lwarp-versonotes.sty}{\from{lwarp.dtx}{versonotes}} \file{lwarp-vertbars.sty}{\from{lwarp.dtx}{vertbars}} diff --git a/macros/latex/contrib/lwarp/lwarp.pdf b/macros/latex/contrib/lwarp/lwarp.pdf index cd48fd49ee..b935c1803e 100644 Binary files a/macros/latex/contrib/lwarp/lwarp.pdf and b/macros/latex/contrib/lwarp/lwarp.pdf differ diff --git a/macros/latex/contrib/lwarp/lwarpmk.lua b/macros/latex/contrib/lwarp/lwarpmk.lua index ff6824e14d..fe4396c13f 100755 --- a/macros/latex/contrib/lwarp/lwarpmk.lua +++ b/macros/latex/contrib/lwarp/lwarpmk.lua @@ -2,7 +2,7 @@ -- Copyright 2016-2020 Brian Dunn -printversion = "v0.87" +printversion = "v0.88" requiredconfversion = "2" -- also at *lwarpmk.conf function printhelp () @@ -36,6 +36,7 @@ lwarpmk clean [-p project]: Remove *.aux, *.toc, *.lof/t, *_html.pdf, *_html.html, *_html.sidetoc lwarpmk cleanall [-p project]: Remove auxiliary files, project.pdf, *.html lwarpmk cleanlimages: Removes all images from the "lateximages" directory. +lwarpmk -v: Print the version number. lwarpmk -h: Print this help message. lwarpmk --help: Print this help message. @@ -891,6 +892,12 @@ print ("lwarpmk: Done.") elseif (arg[1] == nil) then printhelp () +-- lwarpmk -v: + +elseif (arg[1] == "-v" ) then +-- The version number has already been printed +-- by the lwarpmk intro. + -- lwarpmk -h or lwarpmk --help : elseif (arg[1] == "-h" ) or (arg[1] == "--help") then -- cgit v1.2.3