summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-09-22 21:08:49 +0000
committerKarl Berry <karl@freefriends.org>2020-09-22 21:08:49 +0000
commitfcde1ba3d731a6534c92efe10defa9f44a7928d4 (patch)
treebb2065bb8669d42bd0f179480ad7f32b6b6ab90b /Master/texmf-dist/tex/latex/lwarp/lwarp.sty
parentfa6d66c6b0713c364893aa18d4eb1e867b67fbe2 (diff)
lwarp (22sep20)
git-svn-id: svn://tug.org/texlive/trunk@56405 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp.sty187
1 files changed, 125 insertions, 62 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index b04d6ae9b81..ac52479f9c9 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2020/09/03 v0.89 Allows LaTeX to directly produce HTML5 output.]
+ [2020/09/22 v0.891 Allows LaTeX to directly produce HTML5 output.]
@@ -165,6 +165,7 @@
\LWR@earlyloadnever{formula}{siunitx}
\LWR@earlyloadnever{glossary}{glossaries}
\LWR@earlyloadnever{hyper}{hyperref}
+\LWR@earlyloadnever{libgreek}{libertinust1math, newtx}
\LWR@earlyloadnever{newthm}{ntheorem}
\LWR@earlyloadnever{pdfcprot}{microtype}
\LWR@earlyloadnever{picinpar}{floatflt, wrapfig}
@@ -239,6 +240,7 @@
\LWR@loadafter{breakurl}
\LWR@loadafter{breqn}
\LWR@loadafter{bsheaders}
+\LWR@loadafter{bussproofs}
\LWR@loadafter{bxpapersize}
\LWR@loadafter{bytefield}
\LWR@loadafter{cancel}
@@ -518,7 +520,6 @@
\LWR@loadafter{pstool}
\LWR@loadafter{pstricks}
\LWR@loadafter{pxeveryshi}
-\LWR@loadafter{pxfonts}
\LWR@loadafter{pxftnright}
\LWR@loadafter{pxjahyper}
\LWR@loadafter{quotchap}
@@ -539,6 +540,7 @@
\LWR@loadafter{rotfloat}
\LWR@loadafter{rviewport}
\LWR@loadafter{savetrees}
+\LWR@loadafter{scalerel}
\LWR@loadafter{schemata}
\LWR@loadafter{scrextend}
\LWR@loadafter{scrhack}
@@ -628,12 +630,10 @@
\LWR@loadafter{trivfloat}
\LWR@loadafter{truncate}
\LWR@loadafter{turnthepage}
-\LWR@loadafter{txfonts}
\LWR@loadafter{twoup}
\LWR@loadafter{typicons}
\LWR@loadafter{umoline}
\LWR@loadafter{underscore}
-\LWR@loadafter{unicode-math}
\LWR@loadafter{units}
\LWR@loadafter{unitsdef}
\LWR@loadafter{upgreek}
@@ -808,7 +808,11 @@
\newcounter{LWR@texboxdepth}
\setcounter{LWR@texboxdepth}{0}
\newcommand*{\LWR@maybe@orignewpage}{%
- \ifnumgreater{\value{LWR@texboxdepth}}{0}{}{\LWR@orignewpage}%
+ \LWR@traceinfo{LWR@maybe@orignewpage}%
+ \ifnumgreater{\value{LWR@texboxdepth}}{0}
+ {}%
+ {\LWR@orignewpage}%
+ \LWR@traceinfo{LWR@maybe@orignewpage done}%
}
\DeclareRobustCommand\LWR@gsavebox[1]{%
\@ifnextchar(%)
@@ -1119,17 +1123,42 @@
\def\LWR@includecomment
#1#2{\message{Lwarp: Including comment '#1'}%
- \csarg\def{After#1Comment}{\CloseAndInputCutFile}
- \csarg\def{#1}{\endgroup \message{Including '#1' comment.}%
- \def\CommentCutFile{comment_#2.cut} \SetUpCutFile \ProcessComment{#1}}%
- \CommentEndDef{#1}}
+ \csarg\def{After#1Comment}{%
+ \CloseAndInputCutFile%
+ \csundef{LWR@#1commentused}%
+ }
+ \csarg\def{#1}{%
+ \endgroup
+ \ifcsdef{LWR@#1commentused}{
+ \PackageError{lwarp}%
+ {Nested #1 environment}%
+ {%
+ Environment #1 cannot be nested.\MessageBreak
+ This can happen when a package is loaded
+ from inside a\MessageBreak
+ #1 environment.%
+ }%
+ }{}
+ \csdef{LWR@#1commentused}{}
+ \message{Including '#1' comment.}%
+ \def\CommentCutFile{comment_#2.cut}
+ \SetUpCutFile
+ \ProcessComment{#1}
+ }%
+ \CommentEndDef{#1}
+}
\def\LWR@excludecomment
#1#2{\message{Lwarp: Excluding comment '#1'}%
- \csarg\def{#1}{\endgroup \message{Excluding '#1' comment.}%
+ \csarg\def{#1}{
+ \endgroup
+ \message{Excluding '#1' comment.}%
\begingroup
- \def\CommentCutFile{comment_#2.cut} \def\ProcessCutFile{}%
- \def\ThisComment####1{}\ProcessComment{#1}}%
+ \def\CommentCutFile{comment_#2.cut}
+ \def\ProcessCutFile{}%
+ \def\ThisComment####1{}%
+ \ProcessComment{#1}
+ }%
\csarg\def{After#1Comment}{\CloseAndInputCutFile \endgroup}
\CommentEndDef{#1}}
@@ -1373,6 +1402,7 @@
\LWR@checkloadnever{#1}{formula}{siunitx}
\LWR@checkloadnever{#1}{glossary}{glossaries}
\LWR@checkloadnever{#1}{hyper}{hyperref}
+\LWR@checkloadnever{#1}{libgreek}{libertinust1math, newtx}
\LWR@checkloadnever{#1}{newthm}{ntheorem}
\LWR@checkloadnever{#1}{pdfcprot}{microtype}
\LWR@checkloadnever{#1}{picinpar}{floatflt, wrapfig}
@@ -1591,27 +1621,27 @@
\begin{warpHTML}
-\newwrite\LWR@copyoutfile % open the file to write to
-\newread\LWR@copyinfile % open the file to read from
+\newwrite\LWR@copyoutfile % open the file to write to
+\newread\LWR@copyinfile % open the file to read from
\newcommand*{\LWR@copyfile}[2]{%
-\LWR@traceinfo{LWR@copyfile: copying #1 to #2}
-
-\immediate\openout\LWR@copyoutfile=#2
-\openin\LWR@copyinfile=#1
-\begingroup\endlinechar=-1
-\makeatletter
-
-\LWR@traceinfo{LWR@copyfile: about to loop}
-
-\loop\unless\ifeof\LWR@copyinfile
- \LWR@traceinfo{LWR@copyfile: one line}
- \read\LWR@copyinfile to\LWR@fileline % Read one line and store it into \LWR@fileline
- \immediate\write\LWR@copyoutfile{\unexpanded\expandafter{\LWR@fileline}}%
-\repeat
-\immediate\closeout\LWR@copyoutfile
-\LWR@traceinfo{LWR@copyfile: done}
-\endgroup
+ \LWR@traceinfo{LWR@copyfile: copying #1 to #2}
+
+ \immediate\openout\LWR@copyoutfile=#2
+ \openin\LWR@copyinfile=#1
+ \begingroup\endlinechar=-1
+ \makeatletter
+
+ \LWR@traceinfo{LWR@copyfile: about to loop}
+
+ \loop\unless\ifeof\LWR@copyinfile
+ \LWR@traceinfo{LWR@copyfile: one line}
+ \read\LWR@copyinfile to\LWR@fileline % Read one line and store it into \LWR@fileline
+ \immediate\write\LWR@copyoutfile{\unexpanded\expandafter{\LWR@fileline}}%
+ \repeat
+ \immediate\closeout\LWR@copyoutfile
+ \LWR@traceinfo{LWR@copyfile: done}
+ \endgroup
}
\end{warpHTML}
@@ -2221,7 +2251,7 @@ div.indexheading {margin-top: 2ex ; font-weight: bold}
div.hidden, span.hidden { display: none ; }
-kbd, span.texttt {
+kbd, span.texttt, p span.texttt {
font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
"Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono",
"Courier New", monospace;
@@ -4346,7 +4376,7 @@ MathJax = {
subequations: "0",
section: "",
loader: {
- load: ['[tex]/tagFormat'],
+ load: ['[tex]/tagformat', '[tex]/textmacros'],
},
startup: {
ready() {
@@ -4437,9 +4467,9 @@ MathJax = {
}, // startup
tex: {
- packages: {'[+]': ['tagFormat', 'ifstar-ifnextchar-setequnumber']},
+ packages: {'[+]': ['tagformat', 'ifstar-ifnextchar-setequnumber', 'textmacros']},
tags: "ams",
- tagFormat: {
+ tagformat: {
number: function (n) {
if(MathJax.config.subequations==0)
return(MathJax.config.section + n);
@@ -4467,7 +4497,7 @@ MathJax = {
-- Copyright 2016-2020 Brian Dunn
-printversion = "v0.89"
+printversion = "v0.891"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -5803,8 +5833,14 @@ end -- not --version
\newcommand{\LWR@forcenewpage}{%
\LWR@traceinfo{LWR@forcenewpage}%
\ifinner\else%
-\LWR@stoppars\LWR@maybe@orignewpage\LWR@startpars%
+ \LWR@traceinfo{LWR@forcenewpage A}%
+ \LWR@stoppars%
+ \LWR@traceinfo{LWR@forcenewpage B}%
+ \LWR@maybe@orignewpage%
+ \LWR@traceinfo{LWR@forcenewpage C}%
+ \LWR@startpars%
\fi%
+\LWR@traceinfo{LWR@forcenewpage done}%
}
\renewcommand*{\pagestyle}[1]{}
\renewcommand*{\thispagestyle}[1]{}
@@ -6830,6 +6866,8 @@ end -- not --version
\LWR@replacestrings{<}{&lt;}%
\LWR@replacestrings{>}{&gt;}%
\LWR@replacestrings{"}{&quot;}%
+ \LWR@replacestrings{'}{&apos;}%
+ \LWR@replacestrings{`}{&grave;}%
\LWR@replacestrings{##}{#}%
\edef\LWR@strresult{\detokenize\expandafter{\tmpb}}%
}
@@ -6839,9 +6877,7 @@ end -- not --version
\newrobustcmd{\LWR@HTMLsanitize}[1]{%
\begingroup%
\LWR@FBcancel%
- \fullexpandarg%
- \protect\StrSubstitute{\detokenize{#1}}%
- {\detokenize{\&}}{\detokenize{&}}[\LWR@strresult]%
+ \edef\LWR@strresult{\detokenize{#1}}%
\LWR@subHTMLsanitize%
\LWR@strresult%
\endgroup%
@@ -6860,9 +6896,7 @@ end -- not --version
\newrobustcmd{\LWR@HTMLsanitizeexpand}[1]{%
\begingroup%
\LWR@FBcancel%
- \fullexpandarg%
- \protect\StrSubstitute{\detokenize\expandafter{#1}}%
- {\detokenize{\&}}{\detokenize{&}}[\LWR@strresult]%
+ \edef\LWR@strresult{\detokenize\expandafter{#1}}%
\protect\StrSubstitute{\LWR@strresult}%
{\LWR@beginspaceleftbrace}{\LWR@beginleftbrace}[\LWR@strresult]%
\protect\StrSubstitute{\LWR@strresult}%
@@ -6881,9 +6915,7 @@ end -- not --version
\newcommand*{\LWR@subcustomizedmathjax}[1]{%
\begingroup%
\LWR@FBcancel%
- \fullexpandarg%
- \protect\StrSubstitute{\detokenize{#1}}%
- {\detokenize{\&}}{\detokenize{&}}[\LWR@strresult]%
+ \edef\LWR@strresult{\detokenize{#1}}%
\LWR@subHTMLsanitize%
\xdef\LWR@customizedMathJax{%
\LWR@customizedMathJax%
@@ -8058,16 +8090,34 @@ end -- not --version
\newbool{LWR@verbtags}
\booltrue{LWR@verbtags}
-\newcommand*{\LWR@atbeginverbatim}[3][]
+\LetLtxMacro\LWR@orig@verb@egroup\verb@egroup
+
+\def\LWR@verb@egroup@endspan{%
+ \LWR@orig@verb@egroup%
+ \LWR@htmltag{/span}%
+ \endgroup%
+}
+
+\xpretocmd{\verb}
+ {%
+ \begingroup%
+ \LWR@htmltag{span class="texttt"}%
+ \let\verb@egroup\LWR@verb@egroup@endspan%
+ }
+ {}
+ {\LWR@patcherror{LaTeX}{verb}}
+
+\newcommand*{\LWR@atbeginverbatim}[2][]
{%
-\setlength{\parskip}{0ex}%
\LWR@stoppars%
+\setlength{\parskip}{0ex}%
+\setlength{\topsep}{0pt}%
+\setlength{\partopsep}{0pt}%
\ifbool{LWR@verbtags}{%
- \LWR@htmltag{pre class=\textquotedbl#3\textquotedbl%
+ \LWR@htmltag{pre class=\textquotedbl#2\textquotedbl%
\ifthenelse{\equal{#1}{}}{}{ style=\textquotedbl#1\textquotedbl}%
}%
- \LWR@orignewline% pre
- \leavevmode\unskip\LWR@print@vspace*{-#2\baselineskip}%
+ \par%
}{}%
\begingroup%
\LWR@print@normalfont%
@@ -8078,21 +8128,20 @@ end -- not --version
\LWR@select@print@hspace%
}
-\newcommand*{\LWR@afterendverbatim}[1]{%
+\newcommand*{\LWR@afterendverbatim}{%
\endgroup%
\par%
\ifbool{LWR@verbtags}{%
- \LWR@print@vspace*{-#1\baselineskip}%
- \noindent\LWR@htmltag{/pre}\LWR@orignewline% pre
+ \noindent\LWR@htmltag{/pre}\par% pre
}{}%
\LWR@startpars%
}
\newcommand{\LWR@HTML@verbatim@input}[2]{%
\ifbool{LWR@verbtags}{\LWR@forcenewpage}{}%
- \LWR@atbeginverbatim{2.5}{Verbatim}%
+ \LWR@atbeginverbatim{Verbatim}%
\LWR@print@verbatim@input{#1}{#2}%
- \LWR@afterendverbatim{1.5}%
+ \LWR@afterendverbatim%
}
\LWR@formatted{verbatim@input}
@@ -8104,21 +8153,21 @@ end -- not --version
{}%
{%
\LWR@forcenewpage%
- \LWR@atbeginverbatim{2.5}{verbatim}%
+ \LWR@atbeginverbatim{verbatim}%
}%
}
\AfterEndEnvironment{verbatim}{%
\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
{}%
{%
- \LWR@afterendverbatim{1}%
+ \LWR@afterendverbatim%
}%
}
}
\newcommand*{\LWR@HTML@tabbing}{%
\LWR@forcenewpage%
- \LWR@atbeginverbatim{3}{tabbing}%
+ \LWR@atbeginverbatim{tabbing}%
\let\enskip\LWR@origenskip%
\let\quad\LWR@origquad%
\let\qquad\LWR@origqquad%
@@ -8131,7 +8180,7 @@ end -- not --version
\newcommand*{\LWR@HTML@endtabbing}{%
\LWR@print@endtabbing%
- \LWR@afterendverbatim{1}%
+ \LWR@afterendverbatim%
}
\LWR@formatted{tabbing}
@@ -12496,12 +12545,23 @@ end -- not --version
\LWR@PreloadedPackage{graphics}
\LWR@PreloadedPackage{graphicx}
+\LWR@PreloadedPackage{scalefnt}
+
\LWR@PreloadedPackage{fontaxes}
+\LWR@PreloadedPackage{cmbright}
+\LWR@PreloadedPackage{fourier}
+\LWR@PreloadedPackage{kpfonts}
+\LWR@PreloadedPackage{kpfonts-otf}
+\LWR@PreloadedPackage{libertinust1math}
+\LWR@PreloadedPackage{pxfonts}
+\LWR@PreloadedPackage{txfonts}
+\LWR@PreloadedPackage{txgreeks}
\LWR@PreloadedPackage{newpxmath}
\LWR@PreloadedPackage{newtxmath}
\LWR@PreloadedPackage{newtxsf}
\LWR@PreloadedPackage{mathalpha}
+\LWR@PreloadedPackage{unicode-math}
\LWR@PreloadedPackage{nfssext-cfr}
@@ -14001,9 +14061,12 @@ color:\LWR@origpound\LWR@tempcolor%
{Enclose its uses inside lateximage environments\MessageBreak
to force SVG output}
\LWR@mathjaxwarn{unicode-math}
- {Not all characters are encoded correctly.\MessageBreak
+ {Do not use embedded Unicode characters.\MessageBreak
+ Not all characters are encoded correctly.\MessageBreak
+ \protect\left\space and \protect\right\space may not work.\MessageBreak
Some symbol fonts are not supported by MathJax,\MessageBreak
- and are only approximated}
+ and are only approximated.\MessageBreak
+ Latin characters may not be correct}
\LWR@mathjaxwarn{witharrows}
{Arrows can only point to the next line.\MessageBreak
Text is only placed on a single line}