From 0287311bafc0bdd253df0c8d6df3ef85f804d263 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 6 Jun 2018 20:52:12 +0000 Subject: lwarp (6jun18) git-svn-id: svn://tug.org/texlive/trunk@47944 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/lwarp/lwarp.dtx | 3664 +++++++++++++++++------- Master/texmf-dist/source/latex/lwarp/lwarp.ins | 10 + 2 files changed, 2640 insertions(+), 1034 deletions(-) (limited to 'Master/texmf-dist/source/latex') diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx index 147c859e0f6..355a913cfd6 100644 --- a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx +++ b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx @@ -16,7 +16,7 @@ % \iffalse %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{lwarp} -% [2018/05/12 v0.56 Allows LaTeX to directly produce HTML5 output.] +% [2018/06/06 v0.57 Allows LaTeX to directly produce HTML5 output.] % %<*driver> \documentclass{ltxdoc} @@ -440,6 +440,34 @@ code apply to the generation of \HTML, print, or both forms of output. } +\newcommand{\describemathimagename}{% +When creating an \SVG\ math image, its \attribute{alt} tag may be set +to the math expression, which may be hashed for image reuse. +In the case of \cs{ensuremath} or after \cs{StartDynamicMath}, +where the contents require a unique image for each instance of the same expression, +the \attribute{alt} tag is set to \cs{mathimagename}, and the image is not reused. + +This expression is visible in the browser if images are not loaded, +and appears when the text is copied and pasted. +The default is ``math image'', and it may be changed according to the document's language. +This may be set in the preamble, or changed as necessary inside the document, +where it will affect the following \SVG\ math images. +} + +\newcommand{\describepackagediagramname}{% +For many packages, the output is placed inside a \env{lateximage} with an +\HTML\ \attribute{alt} tag set to the package name followed by \cs{packagediagramname}. +For example: +\begin{sourcedisplay} +(-xy- diagram) +\end{sourcedisplay} +This expression is visible in the browser if images are not loaded, +and appears when the text is copied and pasted. +The default is ``diagram'', and may it be changed according to the document's language. +This may be set in the preamble, or changed as necessary inside the document, +where it will affect the following \env{lateximage}s. +} + \newcommand{\limitscpageref}{\pkg{cleveref} and \pkg{varioref} are supported, \watchout[\pkg{cleveref} page numbers] but printed page numbers do not map to \HTML, @@ -985,7 +1013,6 @@ Examples: \newcommand{\limitsmath}{% - \subsubsection{Rendering tradeoffs} Math may be rendered @@ -1125,6 +1152,39 @@ Limitations when using \brand{MathJax} include: \end{itemize} } +\newcommand{\limitsmathcatcode}{ +The math shift character \texttt{\$} is not set for \HTML\ output until +\margintag{preamble macros with math} +after the preamble. Macros defined in the preamble which contain \texttt{\$} +must be enclosed between \cs{StartDefiningMath} and \cs{StopDefiningMath} +to temporarily change to the \HTML\ meaning of \texttt{\$}: +\begin{sourcedisplay} +\textcolor{red}{\cs{StartDefiningMath}} \\ +\cs{newcommand}\{\dots\} \\ +\textcolor{red}{\cs{StopDefiningMath}} +\end{sourcedisplay} + +As an alternative, use \cs{(} and \cs{)} instead of \texttt{\$}, in which +case \cs{StartDefiningMath} and \cs{StopDefiningMath} are not necessary. + +If a package defines macros using \texttt{\$}, it may be nessary to use +\cs{StartDefiningMath} and \cs{StopDefiningMath} before and after loading the +package. +} + +\newcommand{\limitsmathdynamic}{ +An inline math expression is usually converted to a reusable hashed \SVG\ math +\margintag{inline dynamic math} +image, or a MathJax expression. The hash or expression depends on the contents +of the math expression. In most cases this math expression is static, such as \texttt{\$x+1\$}, +so the image can be reused for multiples instances of the same expression. +In some cases, the math expression includes a counter or other object which may +change between uses. The macro \cs{StartDynamicMath} may be used before a dynamic +math expression, and \cs{StopDynamicMath} after. Doing so tells \pkg{lwarp} to +use an unhashed \SVG\ math image, even if MathJax is in use. +See \cref{sec:localizingdynamicmath}. +} + \newcommand{\limitschemformula}{% \pkg{chemformula} works best without \brand{MathJax}. \watchout[\pkg{chemformula} with \brand{MathJax}] @@ -1401,7 +1461,7 @@ or the packages \pkg{multirow}, \pkg{longtable}, \pkg{supertabular}, or \pkg{xta \begin{sourcedisplay} \textcolor{red}{\cs{StartDefiningTabulars}} \\ \\ - \textcolor{red}{\cs{EndDefiningTabulars}} + \textcolor{red}{\cs{StopDefiningTabulars}} \end{sourcedisplay} This includes before and after defining any macro \watchout[floatrow] @@ -1603,7 +1663,7 @@ left \& right \textbackslash\textbackslash \\ left \& right \textbackslash\textbackslash \\ \cs{endtabular} \\ \} \\ -\textcolor{red}{\cs{EndDefiningTabulars}} \\ +\textcolor{red}{\cs{StopDefiningTabulars}} \\ \end{sourcedisplay} } @@ -1640,7 +1700,7 @@ For \cs{tablefirsthead}, etc., enclose them as follows: \textcolor{red}{\cs{StartDefiningTabulars}} \\ \cs{tablefirsthead} \\ \dots \\ -\textcolor{red}{\cs{EndDefiningTabulars}} +\textcolor{red}{\cs{StopDefiningTabulars}} \end{sourcedisplay} See \cref{sec:limitstabular}. @@ -1930,7 +1990,7 @@ they are the first command inside the float: } \newcommand{\limitsfloatrow}{% -Use \cs{StartDefiningTabulars} and \cs{EndDefiningTabulars} before and after +Use \cs{StartDefiningTabulars} and \cs{StopDefiningTabulars} before and after \watchout[misplaced alignment alignment tab character \&] defining macros using \cs{ttabbox} with a tabular inside. See \cref{sec:limitstabular}. @@ -2167,7 +2227,7 @@ This boolean may be tested by the user for later use. %<*package> % \fi % -% \CheckSum{24234} +% \CheckSum{24592} % % \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 @@ -2265,6 +2325,7 @@ This boolean may be tested by the user for later use. % \changes{v0.54}{2018/04/22}{\ 2018/04/22} % \changes{v0.55}{2018/04/26}{\ 2018/04/26} % \changes{v0.56}{2018/05/12}{\ 2018/05/12} +% \changes{v0.57}{2018/06/06}{\ 2018/06/06} @@ -2324,7 +2385,7 @@ This boolean may be tested by the user for later use. % % A modular package-loading system uses the \pkg{lwarp} version of a package for % \HTML\ when available. -% More than 270 \LaTeX\ packages are supported with these high-level source +% Almost 300 \LaTeX\ packages are supported with these high-level source % compatibility replacements, and many others work as-is. % % A tutorial is provided to quickly introduce the user to the major components @@ -2462,6 +2523,50 @@ This boolean may be tested by the user for later use. % % \begin{description} % \needspace{2\baselineskip} +% \item[v0.57:] \ +% \begin{itemize} +% \item Added support for MathJax equations with \cs{footnote}, \cs{footnotemark}. +% \margintag{MathJax} +% \item Added \cs{StartDefiningMath} and \cs{StopDefiningMath} for +% \margintag{math macros} +% use when defining macros in the preamble which contain \$. +% See \cref{sec:mathcatcode}. +% \item Added \cs{StartDynamicMath} and \cs{StopDynamicMath} to +% \margintag{dynamic math} +% delimit math expressions which depend on a variable condition +% such as a counter. Such expressions will not be hashed for reuse, +% and will be converted to \SVG\ math images even when MathJax is enabled. +% See \cref{sec:mathdynamic}. +% \item Renamed \cs{EndDefiningTabulars} to \cs{StopDefiningTabulars}. +% \watchout[new name] +% \item Improved localization for \env{lateximage} \HTML\ \attribute{alt} tags. +% \margintag{\env{lateximage} \attribute{alt} tags} +% For \SVG\ math images, the \attribute{alt} tag under some conditions +% will be set to \cs{mathimagename}, which defaults to ``math image''. +% For packages, the \attribute{alt} tag is set using the package name followed by +% \cs{packagediagramname}, which defaults to ``diagram''. Ex: +% \begin{sourcedisplay} +% (-xy- diagram) +% \end{sourcedisplay} +% See \cref{sec:packagediagramname}. +% \item Fix: Restoring various macros in a \env{lateximage} and similar situations. +% \item Fix: \cs{href} text catcodes. +% \margintag{misc. fixes} +% \item Fix: \cs{subref} text. +% \item Fixes: Colored \cs{rule} and \cs{boxframe}. +% \item \pkg{float}, \pkg{rotfloat}: Adds support for float styles |ruled| and |boxed|. +% \margintag{packages} +% \item \pkg{float}: Fix: Do not create \cs{l@} until \cs{listof} is used. +% \item \pkg{marginnote}: Fix: Long optional argument. +% \item \pkg{ellipsis}: Adds \cs{midwordellipsis}. +% \item \pkg{breakurl}: Fix for text catcodes. +% \item Added \pkg{algorithm2e}, \pkg{register}, \pkg{ltablex}, \pkg{xltabular}, +% \pkg{xellipsis}, \pkg{trimclip}, \pkg{errata}, \pkg{vowel}, \pkg{xpiano}. +% \item Prevents \pkg{glossary}. +% \item Verified works as-is with \pkg{gauss}, \pkg{phonrule}, \pkg{piano}, +% \pkg{SIunits}, \pkg{tikzcodeblocks}. +% \end{itemize} +% \needspace{2\baselineskip} % \item[v0.56:] \ % \begin{itemize} % \item Added @@ -2486,7 +2591,7 @@ This boolean may be tested by the user for later use. % \item Added \pkg{parnotes}, \pkg{quoting}, \pkg{lua-check-hyphen}, % \pkg{tocenter}, \pkg{underscore}. % \margintag{packages} -% \item Verified works with \pkg{babelbib}, \pkg{bibunits}, \pkg{bodegraph}, +% \item Verified works as-is with \pkg{babelbib}, \pkg{bibunits}, \pkg{bodegraph}, % \pkg{fast-diagram}, \pkg{nicematrix}, \pkg{structmech}. % \end{itemize} % \needspace{2\baselineskip} @@ -3086,12 +3191,13 @@ This boolean may be tested by the user for later use. % \needspace{2\baselineskip} % \item[v0.33:] \ % \begin{itemize} -% \item Tabular |@| and |!| columns now have their own \HTML\ columns. +% \item Tabular |@| and |!| columns now havetheir own \HTML\ columns. % \item |&| catcode changes are localized, perhaps causing errors % about the tab alignment character |&|, % so any definitions of macros or environments % which themselves contain \env{tabular} and |&| must be enclosed within \cs{StartDefiningTabulars} -% and \cs{EndDefiningTabulars}. See \cref{sec:localizingampersand}. +% and \cs{StopDefiningTabulars} (previously called \cs{EndDefiningTabulars}. +% See \cref{sec:localizingcatcodes}. % This change is not required for the routine use of tables, % but only when a table is defined inside another macro or environment, % and while also using the |&| character inside the definition. @@ -3605,7 +3711,7 @@ This boolean may be tested by the user for later use. % Additional math: & Math fonts via \SVG\ images, \pkg{resizegather}, \pkg{xy}. % % Tested to work as-is: -% \pkg{amscd}, \pkg{bm}, \pkg{braket}, \pkg{delarray}, \pkg{nicematrix}, +% \pkg{amscd}, \pkg{bm}, \pkg{braket}, \pkg{delarray}, \pkg{guass}, \pkg{nicematrix}, % \pkg{pb-diagram}, \pkg{tikz-cd}, etc. \\ % % Display math with \cs{displaymathother}: & % @@ -3613,7 +3719,9 @@ This boolean may be tested by the user for later use. % % \midrule % -% Units and fractions: & \pkg{nicefrac}, \pkg{siunitx}, \pkg{units}, \pkg{xfrac}. \\ +% Units and fractions: & \pkg{nicefrac}, \pkg{siunitx}, \pkg{units}, \pkg{xfrac}. +% +% Tested to work as-is: \pkg{SIunits}. \\ % % \midrule % @@ -3630,9 +3738,9 @@ This boolean may be tested by the user for later use. % % Tabular: & % \env{tabular} environment, \pkg{array}, \pkg{arydshln}, \pkg{bigdelim}, \pkg{booktabs}, -% \pkg{colortbl}, \pkg{diagbox}, \pkg{longtable}, \pkg{ltxtable}, +% \pkg{colortbl}, \pkg{diagbox}, \pkg{longtable}, \pkg{ltablex}, \pkg{ltxtable}, % \pkg{multirow}, \pkg{supertabular}, \pkg{tabularx}, \pkg{tabulary}, -% \pkg{threeparttable}, \pkg{xtab}. \\ +% \pkg{threeparttable}, \pkg{xltabular}, \pkg{xtab}. \\ % % \midrule % @@ -3692,7 +3800,7 @@ This boolean may be tested by the user for later use. % % Acronyms: & \pkg{acro}, \pkg{acronym}. \\ % -% Todo notes: & \pkg{changebar}, \pkg{easy-todo}, \pkg{fixme}, +% Todo notes: & \pkg{changebar}, \pkg{easy-todo}, \pkg{errata}, \pkg{fixme}, % \pkg{fixmetodonotes}, \pkg{todo}, \pkg{todonotes}. \\ % % \midrule @@ -3700,10 +3808,11 @@ This boolean may be tested by the user for later use. % Direct formatting: & \cs{emph}, \cs{textsuperscript}, % \cs{textbf}, etc are supported. % \cs{bfseries}, etc.\ are only supported in some cases. -% \pkg{cancel}, \pkg{hyphenat}, \pkg{lettrine}, \pkg{lua-check-hyphen}, \pkg{luacolor}, +% \pkg{cancel}, \pkg{ellipsis}, \pkg{hyphenat}, \pkg{lettrine}, \pkg{lips}, +% \pkg{lua-check-hyphen}, \pkg{luacolor}, % \pkg{magaz}, \pkg{pdfrender}, \pkg{realscripts}, \pkg{relsize}, % \pkg{scalefnt}, \pkg{soul}, \pkg{soulpos}, \pkg{soulutf8}, -% \pkg{textfit}, \pkg{ulem}, \pkg{underscore}. \\ +% \pkg{textfit}, \pkg{trimclip}, \pkg{ulem}, \pkg{underscore}, \pkg{xellipsis}. \\ % % Ordinals: & \pkg{engord}, \pkg{fmtcount}, \pkg{nth}. \\ % @@ -3731,24 +3840,24 @@ This boolean may be tested by the user for later use. % \midrule % % Science and engineering: & -% \pkg{algorithmicx}, \pkg{axodraw2}, \pkg{bytefield}, +% \pkg{algorithm2e}, \pkg{algorithmicx}, \pkg{axodraw2}, \pkg{bytefield}, % \pkg{chemfig}, \pkg{chemformula}, \pkg{chemgreek}, \pkg{chemmacros}, \pkg{chemnum}, -% \pkg{listings}, \pkg{mhchem}, \pkg{phfqit}. +% \pkg{listings}, \pkg{mhchem}, \pkg{phfqit}, \pkg{register}. % % Tested to work as-is: % \pkg{blochsphere}, \pkg{bodegraph}, \pkg{bohr}, \pkg{circuitikz}, % \pkg{elements}, \pkg{fast-diagram}, % \pkg{hepnicenames}, \pkg{heppennames}, % \pkg{linop}, \pkg{pgfgantt}, \pkg{physics}, \pkg{simpler-wick}, \pkg{slashed}, -% \pkg{structmech}. +% \pkg{structmech}, \pkg{tikzcodeblocks}. % \\ % % \midrule % -% Liberal arts and humanities: & \pkg{forest}, \pkg{schemata}. +% Liberal arts and humanities: & \pkg{forest}, \pkg{schemata}, \pkg{vowel}, \pkg{xpiano}. % % Tested to work as-is: -% \pkg{tikz-dependency}. \\ +% \pkg{phonrule}, \pkg{piano}, \pkg{tikz-dependency}. \\ % % \midrule % @@ -5242,6 +5351,8 @@ This boolean may be tested by the user for later use. % FileSectionNames & Use section names for file names, else use numbers. \\ % FootnoteDepth & Sectioning depth of footnotes. \\ % \cs{abstractname} & The name of the abstract. \\ +% \cs{mathimagename} & The \SVG\ math image \env{lateximage} \attribute{alt} tag. \\ +% \cs{packagediagramname} & The suffix for a package's \env{lateximage} \attribute{alt} tags. \\ % \cs{CSSFilename} & The \CSS\ for the following files. \\ % \cs{HTMLLanguage} & The |html lang| tag. \\ % \cs{HTMLTitle} & The \HTML\ |title| meta tag, overriding \cs{title}. \\ @@ -5509,6 +5620,14 @@ This boolean may be tested by the user for later use. % \item[Placed in the document wherever necessary:] \ % % \begin{description} +% \ItemDescribeMacro{\mathimagename} \DescribeDefault{math image} +% \label{sec:mathimagename} +% \describemathimagename +% +% \ItemDescribeMacro{\packagediagramname} \DescribeDefault{diagram} +% \label{sec:packagediagramname} +% \describepackagediagramname +% % \ItemDescribeEnv{warpprint} An environment which is only used % while generating print output. Place inside anything which does not % apply to \HTML\ and which may cause problems with \pkg{lwarp}. @@ -6097,7 +6216,7 @@ This boolean may be tested by the user for later use. % \watchout[Misplaced alignment tab character \&] % you will have to use \cs{StartDefiningTabulars} % before the start of the macro which uses \cs{fboxBlock} and the \env{tabular}, -% and \cs{EndDefiningTabulars} afterwards. +% and \cs{StopDefiningTabulars} afterwards. % Also see the \pkg{lwarp} documentation for the \pkg{fancybox} package. % \item [To frame equations:] See \cref{sec:fancybox} for the \pkg{fancybox} package. % \item [For fancy framed minipages:] See packages \pkg{boxedminipage}, @@ -6334,6 +6453,14 @@ This boolean may be tested by the user for later use. % \label{sec:limitsmath} % \limitsmath % +% \subsubsection{Catcode changes} +% \label{sec:mathcatcode} +% \limitsmathcatcode +% +% \subsubsection{Dynamic math} +% \label{sec:mathdynamic} +% \limitsmathdynamic +% % \subsubsection{Display math} % \label{sec:displaymathother} % \index{math>\cs{displayingmath}}\index{math>\cs{displayingmore}} @@ -7031,7 +7158,9 @@ This boolean may be tested by the user for later use. % \section{Modifying \pkg{lwarp}} % \pagestyle{pageheadfoot} % -% To quickly find the source for a package in |lwarp.dtx|, search for |*packagename|, +% To quickly find the source for a package in |lwarp.dtx|, +% \margintag{locating something} +% search for |*packagename|, % such as |*siunitx|. % % Likewise, to quickly find the source for a file in |lwarp.dtx|, @@ -7043,16 +7172,30 @@ This boolean may be tested by the user for later use. % Look to existing code for ideas on how to expand into new code. % % An environment may be converted to a |lateximage| then displayed +% \margintag{image of \TeX\ output} % with an image of the resulting \LaTeX{} output. % See \cref{sec:picture} for an example of the |picture| environment. % % To create a custom \HTML\ block or inline \CSS\ class, +% \margintag{CSS classes} % see \cref{sec:highlevelclasses}. % +% To create print and \HTML\ versions of the same macro or environment, +% \margintag{print/HTML macros} +% see \cref{sec:definingprinthtml}. +% % Any \TeX\ boxes must be undone, as \SVG\ math or \env{lateximage}s % \watchout[\TeX\ boxes] % require \cs{newpage}, which will not work in a \TeX\ box. % +% \changes{v0.57}{2018/05/28}{Docs: Recreating the index for \pkg{lwarp} source.} +% To recreate the index for the \pkg{lwarp} documentation: +% \margintag{index recreation} +% \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines] +% makeindex -s gglo.ist -o lwarp.gls lwarp.glo +% makeindex -s gind.ist lwarp.idx +% \end{Verbatim} +% % % \subsection{Modifying a package for \pkg{lwarp}} % @@ -7098,7 +7241,7 @@ This boolean may be tested by the user for later use. % will not need to be emulated for \HTML\ output. Only the ``user-facing'' % macros need to be nullified or emulated. % -% \needspace{10\baselineskip} +% \needspace{5\baselineskip} % Each |lwarp-| package should first call either % \begin{sourcedisplay} % \cs{LWR@ProvidesPackageDrop} @@ -7158,6 +7301,21 @@ This boolean may be tested by the user for later use. % Remember that the configuration files are only rewritten when compiling the % printed version of the document. % +% \changes{v0.57}{2018/05/28}{Docs: Recompiling \prog{lwarpmk} or \CSS\ files.} +% When changing the source to \prog{lwarpmk} or a \CSS\ file in \filenm{lwarp.dtx}: +% \begin{enumerate} +% \item Change the source in \filenm{lwarp.dtx}. +% \item |pdflatex lwarp.ins| +% \item |pdflatex lwarp.dtx| +% \item If modifying \prog{lwarpmk} the new version should now be active. +% \item If modifying \CSS\ files: +% \begin{enumerate} +% \item For the document, |lwarpmk print| to update the \CSS\ files +% in the project. +% \item Reload the \HTML\ document to see the effect of the new \CSS\ files. +% \end{enumerate} +% \end{enumerate} +% % Sometimes it is worth checking the |_html.pdf| file, which is the % \PDF\ containing \HTML\ tags. Also, |_html.html| has % the text conversion of these tags, before the file is split into individual @@ -7721,7 +7879,7 @@ This boolean may be tested by the user for later use. % \end{macrocode} % % -% +%macrocode % % \section{Miscellaneous tools} % @@ -7782,9 +7940,8 @@ This boolean may be tested by the user for later use. % \end{macrocode} % -% \clearpage -% -% + + % \section{Operating-System portability} % \label{sec:OSportability} % \changes{v0.11}{2016/03/11}{Added section: Operating-System portability.} @@ -8346,6 +8503,7 @@ For a possible alternative, see package(s) #2.} \LWR@earlyloadnever{caption2}{caption} % \LWR@earlyloadnever{ccaption}{caption}% might be preloaded by memoir \LWR@earlyloadnever{fancyheadings}{fancyhdr} +\LWR@earlyloadnever{glossary}{glossaries} \LWR@earlyloadnever{t1enc}{fontenc, inputenc, inputenx} \LWR@earlyloadnever{wasysym}{textcomp, amssymb, amsfonts, mnsymbol, fdsymbol} % \end{macrocode} @@ -8371,7 +8529,10 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{acronym} \LWR@loadafter{adjmulticol} \LWR@loadafter{addlines} +\LWR@loadafter{ae} +\LWR@loadafter{aecc} \LWR@loadafter{afterpage} +\LWR@loadafter{algorithm2e} \LWR@loadafter{algorithmicx} \LWR@loadafter{alltt} \LWR@loadafter{amsmath} @@ -8397,6 +8558,8 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{bytefield} \LWR@loadafter{cancel} \LWR@loadafter{caption} +\LWR@loadafter{caption2} +\LWR@loadafter{ccaption} \LWR@loadafter{changebar} \LWR@notmemoirloadafter{changepage} \LWR@notmemoirloadafter{chngpage} @@ -8431,12 +8594,14 @@ For a possible alternative, see package(s) #2.} \LWR@notmemoirloadafter{epigraph} \LWR@loadafter{epstopdf} \LWR@loadafter{epstopdf-base} +\LWR@loadafter{errata} \LWR@loadafter{eso-pic} \LWR@loadafter{everypage} \LWR@loadafter{everyshi} \LWR@loadafter{extramarks} \LWR@loadafter{fancybox} \LWR@loadafter{fancyhdr} +\LWR@loadafter{fancyheadings} \LWR@loadafter{fancyref} \LWR@loadafter{fancyvrb} \LWR@loadafter{figcaps} @@ -8470,6 +8635,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{glossaries} % \LWR@loadafter{graphics}% pre-loaded by xunicode % \LWR@loadafter{graphicx}% pre-loaded by xunicode +\LWR@loadafter{glossary} \LWR@loadafter{grffile} \LWR@loadafter{grid} \LWR@loadafter{gridset} @@ -8495,6 +8661,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{listings} \LWR@loadafter{longtable} \LWR@loadafter{lscape} +\LWR@loadafter{ltablex} \LWR@loadafter{ltcaption} \LWR@loadafter{ltxgrid} \LWR@loadafter{ltxtable} @@ -8554,6 +8721,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{quoting} \LWR@loadafter{ragged2e} \LWR@loadafter{realscripts} +\LWR@loadafter{register} \LWR@loadafter{relsize} \LWR@loadafter{resizegather} \LWR@loadafter{romanbar} @@ -8586,6 +8754,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{subfig} \LWR@loadafter{subfigure} \LWR@loadafter{supertabular} +\LWR@loadafter{t1inc} \LWR@loadafter{tabls} \LWR@notmemoirloadafter{tabularx} \LWR@loadafter{tabulary} @@ -8608,6 +8777,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{todo} \LWR@loadafter{todonotes} \LWR@loadafter{transparent} +\LWR@loadafter{trimclip} \LWR@loadafter{trivfloat} \LWR@loadafter{turnthepage} % \end{macrocode} @@ -8622,14 +8792,19 @@ For a possible alternative, see package(s) #2.} \LWR@notmemoirloadafter{verse} \LWR@loadafter{vertbars} \LWR@loadafter{vmargin} +\LWR@loadafter{vowel} \LWR@loadafter{vwcol} \LWR@loadafter{wallpaper} +\LWR@loadafter{wasysym} \LWR@loadafter{watermark} \LWR@loadafter{wrapfig} \LWR@loadafter{xcolor} +\LWR@loadafter{xellipsis} \LWR@loadafter{xfrac} +\LWR@loadafter{xltabular} \LWR@loadafter{xltxtra} \LWR@loadafter{xmpincl} +\LWR@loadafter{xpiano} \LWR@loadafter{xtab} \LWR@loadafter{xurl} \LWR@loadafter{xy} @@ -9144,7 +9319,7 @@ top=1in,bottom=1in,% % Remember the original \cs{RequirePackage}: % \begin{macrocode} -\LetLtxMacro{\LWR@origRequirePackage}{\RequirePackage} +\LetLtxMacro\LWR@origRequirePackage\RequirePackage % \end{macrocode} % \begin{macro}{\LWR@requirepackagenames} @@ -9274,7 +9449,7 @@ top=1in,bottom=1in,% {\LWR@origRequirePackage{\LWR@parsedrequirepackagenames}}% }% } -\LetLtxMacro{\usepackage}{\RequirePackage} +\LetLtxMacro\usepackage\RequirePackage % \end{macrocode} % \end{macro} @@ -9531,7 +9706,6 @@ top=1in,bottom=1in,% \ifbool{LWR@tracinglwarp}% {% \typeout{*** lwarp: #1}% - % \PackageInfo{lwarp}{#1 : }% }% {}% } @@ -9572,6 +9746,264 @@ top=1in,bottom=1in,% +% \section{Defining print and HTML versions of macros and environments} +% \label{sec:definingprinthtml} +% \index{print>selecting print/HTML definitions} +% \index{HTML>selecting print/HTML definitions} +% +% The following refers to defining objects inside \pkg{lwarp}, and is not +% for the user's document. +% +% Many macros and environments must be provided as both print and \HTML\ versions. +% +% While generating the print version of a document, the original macros +% as defined by \LaTeX\ and its packages are used as-is. +% +% While generating the \HTML\ version of a document, +% the original macro or environment is redefined to call a new \HTML\ version +% or a copy of the original print version. +% The new \HTML\ versions of macros and environments are used most of the time. +% Copies of the print versions are used inside a \env{lateximage} environment, +% which draws and remembers an image of the printed output, and also several +% other places. +% +% The general structure for providing print and \HTML\ versions of a macro or +% environment is as follows: +% +% \begin{description} +% +% \item[For a preexisting macro, not defined with \pkg{xparse}:] An \HTML\ version +% is provided with a special name, inside a \env{warpHTML} environment, +% then \cs{LWR@formatted} is used to redefine and patch various macros: +% \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines] +% \begin{warpHTML} +% \newcommand{\LWR@HTML@name}{...}% may also use xparse +% +% \LWR@formatted{name} +% \end{warpHTML} +% \end{Verbatim} +% |\LWR@formatted{name}| copies the original print version, +% then redefines \cs{name} to use either the print or \HTML\ version depending +% on which mode \pkg{lwarp} is using. \pkg{xparse} may be used to +% define the new \HTML\ version, even if the original did not use \pkg{xparse}. + +% \item[For a preexisiting environment, not defined with \pkg{xparse}:] The process +% is similar. Note the use of \cs{LWR@formattedenv} instead of \cs{LWR@formatted}. +% \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines] +% \begin{warpHTML} +% \newenvironment{LWR@HTML@name}{...}% may also use xparse +% +% \LWR@formattedenv{name} +% \end{warpHTML} +% \end{Verbatim} + +% \item[If the original used \pkg{xparse}:] A copy must be made using a new name: +% \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines] +% \begin{warpHTML} +% \NewDocumentCommand{\LWR@print@name}{..}{..}% copy the original +% +% \NewDocumentCommand{\LWR@HTML@name}{..}{..}% or use \newcommand +% +% \LWR@formatted{name} +% \end{warpHTML} +% \end{Verbatim} +% Similar for an environment, using \cs{LWR@formattedenv}. +% (\cs{LWR@formatted} and \cs{LWR@formattedenv} use \cs{LetLtxMacro} to +% copy the original print definiton, +% which may not work with macros and environments created by \pkg{xparse}, +% so the print version must be manually recreated in the \pkg{lwarp} source.) + +% \item[For a new macro or environment, not using \pkg{xparse} for the print version:] \ +% \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines] +% \begin{warpall} +% \newcommand{\name}{...}% NOT xparse! +% \end{warpall} +% +% \begin{warpHTML} +% \newcommand{\LWR@HTML@name}{...}% may use xparse for HTML +% +% \LWR@formatted{name} +% \end{warpHTML} +% \end{Verbatim} +% Similar for an environment. +% The plain \cs{name} or environment \env{name} is used for the printed +% version, and is placed inside \env{warpall}. +% \pkg{xparse} may be used for the \cs{LWR@HTML@} version. +% +% \item [For a new macro or environment, using \pkg{xparse}:] +% It is possible to use \pkg{xparse} for an entirely new macro or environment +% by defining the \cs{LWR@print@} version with \pkg{xparse}, along with +% \cs{name} defined without \pkg{xparse} to refer directly to the \cs{LWR@print} +% version: +% \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines] +% \begin{warpall} +% \NewDocumentCommand{\LWR@print@name}{...} {...}% -or- +% \NewDocumentEnvironment{\LWR@print@name}{...} {...} {...} +% +% % Simply a call to \LWR@print@name: +% \newcommand{\name}{\LWR@print@name}% -or- +% \newenvironment{name}{\LWR@print@name}{\endLWR@print@name} +% \end{warpall} +% +% \begin{warpHTML} +% \NewDocumentCommand{\LWR@HTML@name}{...} {...}% -or- +% \NewDocumentEnvironment{\LWR@HTML@name}{...} {...} {...} +% +% \LWR@formatted{name}% -or- +% \LWR@formattedenv{name} +% \end{warpHTML} +% \end{Verbatim} +% +% \end{description} +% +% In general, \cs{LWR@formatted} or \cs{LWR@formattedenv} are placed inside +% a \env{warpHTML} environment, and while producing an \HTML\ document +% they do the following: +% \begin{itemize} +% \item Macros are modified: +% \begin{enumerate} +% \item The pre-existing print version \cs{name} is saved as \cs{LWR@print@}, +% unless \cs{LWR@print@} is already defined. +% \item The original \cs{name} is redefined to call either the print or \HTML\ version +% depending on which format is in use at the moment, as set by \cs{LWR@formatting}, +% which is defined as either ``|print|'' or ``|HTML|''. +% \end{enumerate} +% \item When \pkg{lwarp} is producing a print document, the original definitions are +% used, as well as any new definitions defined in \env{warpall} above. +% \item When \pkg{lwarp} is generating \HTML\ output, \cs{LWR@formatting} is +% set to ``|HTML|'', and \cs{name} is directed to \cs{LWR@HTML@}. +% \item When \pkg{lwarp} is generating \HTML\ output +% but enters a \env{lateximage} environment, +% or for some other reason needs to draw images using the original print +% defintions, \cs{LWR@formatting} is changed to ``|print|'' and \cs{name} is +% then redirected to \cs{LWR@print@}, which was the original \cs{name}. +% \end{itemize} +% +% Since arguments are not handled by the new \cs{name}, any star and other arguments +% are processed by the print or \HTML\ version. +% +% Expandable versions are also provided as well: +% \begin{sourcedisplay} +% \cs{LWR@expandableformatted} \\ +% \cs{LWR@expandableformattedenv} +% \end{sourcedisplay} +% +% (Older versions of \pkg{lwarp} used \cs{LetLtxMacro} for everything, +% but this could fail when using macros defined by \pkg{xparse}. +% This older system is still in use for many definitions.) +% ^^A *8* Modify the above when all old \lets are removed. +% +% \changes{v0.57}{2018/05/28}{New system for switching print and HTML outputs.} +% +% \codehtml +% \begin{macrocode} +\begin{warpHTML} +% \end{macrocode} +% +% +% \begin{macro}{\LWR@formatting} Remembers if selected print/\HTML\ formatting. +% +% Used while \cs{LWR@restoreorigformatting}, such as in an \env{lateximage}. +% May be set to either ``|print|'' or ``|HTML|''. +% +% \begin{macrocode} +\newcommand*{\LWR@formatting}{HTML} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\LWR@formatted} \marg{macroname} \qquad No backslash in the macro name. +% +% If not yet defined, defines \cs{LWR@print@} as +% the original print-mode \cs{}. +% Also redefines \cs{} to use \cs{LWR@@}, +% where is set by \cs{LWR@formatting}, and is |print| or |HTML|. +% \begin{macrocode} +\newcommand*{\LWR@formatted}[1]{% + \ifcsundef{LWR@print@#1}{% + \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname% + \csname#1\endcsname% + }{}% + \ifcsundef{#1}{% + \expandafter\newrobustcmd\csname #1\endcsname{% + \csuse{LWR@\LWR@formatting @#1}% + }% + }{% + \expandafter\renewrobustcmd\csname #1\endcsname{% + \csuse{LWR@\LWR@formatting @#1}% + }% + }% +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\LWR@expandableformatted} \marg{macroname} \qquad No backslash +% in the macro name. +% +% An expandable version of \cs{LWR@formatted}. +% \begin{macrocode} +\newcommand*{\LWR@expandableformatted}[1]{% + \ifcsundef{LWR@print@#1}{% + \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname% + \csname#1\endcsname% + }{}% + \ifcsundef{#1}{% + \expandafter\newcommand\csname #1\endcsname{% + \csuse{LWR@\LWR@formatting @#1}% + }% + }{% + \expandafter\renewcommand\csname #1\endcsname{% + \csuse{LWR@\LWR@formatting @#1}% + }% + }% +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\LWR@formattedenv} \marg{environmentname} +% +% If not yet defined, defines the environment \env{LWR@print@} as +% the original print-mode \env{}. +% Also redefines the environment || to use environment |LWR@@|, +% where is set by \cs{LWR@formatting}, and is |print| or |HTML|. +% \begin{macrocode} +\newcommand*{\LWR@formattedenv}[1]{% + \ifcsundef{LWR@print@#1}{% + \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname% + \csname#1\endcsname% + \csletcs{endLWR@print@#1}{end#1}% + }{}% + \DeclareDocumentEnvironment{#1}{}% + {\csuse{LWR@\LWR@formatting @#1}}% + {\csuse{endLWR@\LWR@formatting @#1}}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\LWR@expandableformattedenv} \marg{environmentname} +% +% An expandable version of \env{LWR@formattedenv}. +% \begin{macrocode} +\newcommand*{\LWR@expandableformattedenv}[1]{% + \ifcsundef{LWR@print@#1}{% + \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname% + \csname#1\endcsname% + \csletcs{endLWR@print@#1}{end#1}% + }{}% + \DeclareExpandableDocumentEnvironment{#1}{}% + {\csuse{LWR@\LWR@formatting @#1}}% + {\csuse{endLWR@\LWR@formatting @#1}}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\end{warpHTML} +% \end{macrocode} + + % \section{HTML-conversion output modifications} % % These booleans modify the \HTML\ output in various ways @@ -9776,10 +10208,7 @@ top=1in,bottom=1in,% % Will be changed to \HTML\ commands for most uses. % Will be temporarily restored to original meaning inside any lateximage environment. % Also nullify unused commands. -% \begin{macrocode} -\LetLtxMacro\LWR@origmbox\mbox -\LetLtxMacro\LWR@origmakebox\makebox -% \end{macrocode} +% % Some packages redefine \cs{\#}, which is used to generate \HTML, so the original must % be remembered here. % \changes{v0.51}{2018/03/12}{Fix: Remember original \cs{\#} in case is redefined.} @@ -9793,17 +10222,13 @@ top=1in,bottom=1in,% \let\LWR@origenskip\enskip \let\LWR@origquad\quad \let\LWR@origqquad\qquad - -\let\LWR@orighspace\hspace \let\LWR@orighfill\hfill \let\LWR@orighfil\hfil -\let\LWR@origvspace\vspace \let\LWR@orighss\hss \let\LWR@origllap\llap \let\LWR@origrlap\rlap \let\LWR@orighfilneg\hfilneg -\let\LWR@origrule\rule \let\LWR@orighrulefill\hrulefill \let\LWR@origdotfill\dotfill @@ -9823,29 +10248,29 @@ top=1in,bottom=1in,% \let\LWR@orighuge\huge \let\LWR@origHuge\Huge -\LetLtxMacro{\LWR@origtextrm}{\textrm} -\LetLtxMacro{\LWR@origtextsf}{\textsf} -\LetLtxMacro{\LWR@origtexttt}{\texttt} -\LetLtxMacro{\LWR@origtextnormal}{\textnormal} -\LetLtxMacro{\LWR@origtextbf}{\textbf} -\LetLtxMacro{\LWR@origtextmd}{\textmd} -\LetLtxMacro{\LWR@origtextit}{\textit} -\LetLtxMacro{\LWR@origtextsl}{\textsl} -\LetLtxMacro{\LWR@origtextsc}{\textsc} -\LetLtxMacro{\LWR@origtextup}{\textup} -\LetLtxMacro{\LWR@origemph}{\emph} - -\LetLtxMacro{\LWR@origrmfamily}{\rmfamily} -\LetLtxMacro{\LWR@origsffamily}{\sffamily} -\LetLtxMacro{\LWR@origttfamily}{\ttfamily} -\LetLtxMacro{\LWR@origbfseries}{\bfseries} -\LetLtxMacro{\LWR@origmdseries}{\mdseries} -\LetLtxMacro{\LWR@origupshape}{\upshape} -\LetLtxMacro{\LWR@origslshape}{\slshape} -\LetLtxMacro{\LWR@origscshape}{\scshape} -\LetLtxMacro{\LWR@origitshape}{\itshape} -\LetLtxMacro{\LWR@origem}{\em} -\LetLtxMacro{\LWR@orignormalfont}{\normalfont} +\LetLtxMacro\LWR@origtextrm\textrm +\LetLtxMacro\LWR@origtextsf\textsf +\LetLtxMacro\LWR@origtexttt\texttt +\LetLtxMacro\LWR@origtextnormal\textnormal +\LetLtxMacro\LWR@origtextbf\textbf +\LetLtxMacro\LWR@origtextmd\textmd +\LetLtxMacro\LWR@origtextit\textit +\LetLtxMacro\LWR@origtextsl\textsl +\LetLtxMacro\LWR@origtextsc\textsc +\LetLtxMacro\LWR@origtextup\textup +\LetLtxMacro\LWR@origemph\emph + +\LetLtxMacro\LWR@origrmfamily\rmfamily +\LetLtxMacro\LWR@origsffamily\sffamily +\LetLtxMacro\LWR@origttfamily\ttfamily +\LetLtxMacro\LWR@origbfseries\bfseries +\LetLtxMacro\LWR@origmdseries\mdseries +\LetLtxMacro\LWR@origupshape\upshape +\LetLtxMacro\LWR@origslshape\slshape +\LetLtxMacro\LWR@origscshape\scshape +\LetLtxMacro\LWR@origitshape\itshape +\LetLtxMacro\LWR@origem\em +\LetLtxMacro\LWR@orignormalfont\normalfont \let\LWR@origraggedright\raggedright \let\LWR@origonecolumn\onecolumn @@ -9876,10 +10301,6 @@ top=1in,bottom=1in,% \let\LWR@origthispagestyle\thispagestyle \LetLtxMacro\LWR@origpagenumbering\pagenumbering -\LetLtxMacro\LWR@origminipage\minipage -\let\LWR@origendminipage\endminipage -\LetLtxMacro{\LWR@origparbox}{\parbox} - \let\LWR@orignewline\newline @@ -9903,7 +10324,7 @@ top=1in,bottom=1in,% \let\LWR@origpar\par -\LetLtxMacro{\LWR@origfootnote}{\footnote} +\LetLtxMacro\LWR@origfootnote\footnote \let\LWR@orig@mpfootnotetext\@mpfootnotetext \let\LWR@origclearpage\clearpage @@ -9941,18 +10362,18 @@ top=1in,bottom=1in,% % % For Unicode engines, only \cs{t} needs to be redefined: % \begin{macrocode} -\LetLtxMacro{\LWR@origt}{\t} +\LetLtxMacro\LWR@origt\t % \end{macrocode} % For pdf\LaTeX, additional work is required: % \begin{macrocode} \ifPDFTeX -\LetLtxMacro{\LWR@origequalaccent}{\=} -\LetLtxMacro{\LWR@origdotaccent}{\.} -\LetLtxMacro{\LWR@origu}{\u} -\LetLtxMacro{\LWR@origv}{\v} -\LetLtxMacro{\LWR@origc}{\c} -\LetLtxMacro{\LWR@origd}{\d} -\LetLtxMacro{\LWR@origb}{\b} +\LetLtxMacro\LWR@origequalaccent\= +\LetLtxMacro\LWR@origdotaccent\. +\LetLtxMacro\LWR@origu\u +\LetLtxMacro\LWR@origv\v +\LetLtxMacro\LWR@origc\c +\LetLtxMacro\LWR@origd\d +\LetLtxMacro\LWR@origb\b % \end{macrocode} % The \HTML\ redefinitions follow. % @@ -9978,18 +10399,18 @@ top=1in,bottom=1in,% % \begin{macrocode} \ifPDFTeX \newcommand*{\LWR@restoreorigaccents}{% -\LetLtxMacro{\=}{\LWR@origequalaccent}% -\LetLtxMacro{\.}{\LWR@origdotaccent}% -\LetLtxMacro{\u}{\LWR@origu}% -\LetLtxMacro{\v}{\LWR@origu}% -\LetLtxMacro{\t}{\LWR@origt}% -\LetLtxMacro{\c}{\LWR@origc}% -\LetLtxMacro{\d}{\LWR@origd}% -\LetLtxMacro{\b}{\LWR@origb}% +\LetLtxMacro\=\LWR@origequalaccent% +\LetLtxMacro\.\LWR@origdotaccent% +\LetLtxMacro\u\LWR@origu% +\LetLtxMacro\v\LWR@origu% +\LetLtxMacro\t\LWR@origt% +\LetLtxMacro\c\LWR@origc% +\LetLtxMacro\d\LWR@origd% +\LetLtxMacro\b\LWR@origb% }% \else% XeLaTeX, LuaLaTeX: \newcommand*{\LWR@restoreorigaccents}{% -\LetLtxMacro{\t}{\LWR@origt}% +\LetLtxMacro\t\LWR@origt% }% \fi% }% AtBeginDocument @@ -10173,6 +10594,8 @@ homehtmlfilename = "\HomeHTMLFilename"% % \changes{v0.54}{2018/04/24}{\filenm{lwarp.css}: Fix: Text-decoration-skip: auto.} % \changes{v0.56}{2018/04/27}{\filenm{lwarp.css}: Added \attribute{span.textbf}, etc.} % \changes{v0.56}{2018/05/09}{\filenm{lwarp.css}: Added \attribute{div.textbf}, etc.} +% \changes{v0.57}{2018/05/21}{\filenm{lwarp.css}: Added ruled, boxed, boxruled floats.} +% \changes{v0.57}{2018/05/21}{\filenm{lwarp.css}: Increased float vertical margins.} % % ^^A *lwarp.css % \begin{macrocode} @@ -11000,7 +11423,7 @@ img.logoimage{ figure { - margin: 3ex auto 3ex auto ; + margin: 5ex auto 5ex auto ; padding: 1ex 1em 1ex 1em ; overflow-x: auto ; } @@ -11065,6 +11488,28 @@ figure div.floatrow div.minipage figcaption { } +/* For packages such as float, rotfloat, and algorithm2e: */ + +figure.boxed, figure.boxruled { + border: 1px solid black ; +} + +figure.ruled { + border-top: 1px solid black ; + border-bottom: 1px solid black ; + border-left: 0px ; + border-right: 0px ; + border-radius: 0px ; + background: none ; + box-shadow: none ; +} + +figure.ruled figcaption, figure.boxruled figcaption { + border-top: 1px solid silver ; + border-bottom: 1px solid silver ; +} + + table { margin: 1ex auto 1ex auto ; border-collapse: separate ; @@ -11366,8 +11811,33 @@ div.multicols { -webkit-columns: 3 380px ; div.multicols p {margin-top: 0ex} +/* Used for algorithm2e: */ +div.alg2evline{ + margin-left: 1em ; + padding-left: 1em ; + border-left: 1px solid black ; + border-radius: 0px 0px 0px 1ex ; +} + +div.alg2evsline{ + margin-left: 1em ; + padding-left: 1em ; + border-left: 1px solid black ; +} + +div.alg2enoline{ + margin-left: 1em ; + padding-left: 1em ; +} + +span.alg2elinenumber{ + margin-right: .5em ; + font-size: 50% ; + color: red ; +} + -/* Used to support algorithmicx: */ +/* Used for algorithmicx: */ span.floatright { float: right ; } @@ -11997,7 +12467,7 @@ div.fancyvrblabel{ figure { - margin: 3ex 5% 3ex 5% ; + margin: 5ex 5% 5ex 5% ; padding: 1ex 1em 1ex 1em ; background-color: #fffcf5 ; overflow-x: auto ; @@ -12309,7 +12779,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX- -% \subsection{lwarpmk option} +% \subsection{lwarpmk.lua — lwarpmk option} % \DescribeOption{lwarpmk} Creates a local copy of \prog{lwarpmk}. % @@ -12368,6 +12838,8 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX- % \changes{v0.54}{2018/04/19}{\prog{lwarpmk}: Improved error if configuration file does not exist.} % \changes{v0.56}{2018/04/29}{\prog{lwarpmk}: Added \progcode{lwarpmk pdftosvg}.} % \changes{v0.56}{2018/05/11}{\prog{lwarpmk}: Supports \texttt{-shell-escape}.} +% \changes{v0.57}{2018/05/20}{\prog{lwarpmk}: Improved code factoring.} +% \changes{v0.57}{2018/05/20}{\prog{lwarpmk}: Improved error handling.} % % The following is only generated if the \optn{lwarpmk} option % was given to \pkg{lwarp}. @@ -12382,15 +12854,19 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX- -- Copyright 2016-2018 Brian Dunn --- Print the usage of the lwarpmk command: -printversion = "v0.56" +printversion = "v0.57" + function printhelp () print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ; end + function printusage () +-- +-- Print the usage of the lwarpmk command: +-- print ( [[ lwarpmk print [project]: Compile the print version if necessary. @@ -12418,9 +12894,11 @@ lwarpmk --help: Print this help message. printconf () end --- Print the format of the configuration file lwarpmk.conf: function printconf () +-- +-- Print the format of the configuration file lwarpmk.conf: +-- print ( [[ An example lwarpmk.conf or .lwarpmkconf project file: -- @@ -12443,11 +12921,13 @@ Values must be in upright "quotes". end + +function splitfile (destfile,sourcefile) +-- -- Split one large sourcefile into a number of files, -- starting with destfile. -- The file is split at each occurance of