summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp.sty232
1 files changed, 169 insertions, 63 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index 7075d0e3d28..b04d6ae9b81 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/07/19 v0.88 Allows LaTeX to directly produce HTML5 output.]
+ [2020/09/03 v0.89 Allows LaTeX to directly produce HTML5 output.]
@@ -190,6 +190,7 @@
\LWR@loadafter{a5comb}
\LWR@notmemoirloadafter{abstract}
\LWR@loadafter{academicons}
+\LWR@loadafter{accents}
\LWR@loadafter{accessibility}
\LWR@loadafter{accsupp}
\LWR@loadafter{acro}
@@ -200,8 +201,6 @@
\LWR@loadafter{algorithm2e}
\LWR@loadafter{algorithmicx}
\LWR@loadafter{alltt}
-\LWR@loadafter{amsmath}
-\LWR@loadafter{amsthm}
\LWR@loadafter{anonchap}
\LWR@loadafter{anysize}
\LWR@notmemoirloadafter{appendix}
@@ -213,6 +212,7 @@
\LWR@loadafter{attachfile}
\LWR@loadafter{attachfile2}
\LWR@loadafter{authblk}
+\LWR@loadafter{authoraftertitle}% Supported as-is, but must be loaded after.
\LWR@loadafter{autobreak}
\LWR@loadafter{autonum}
\LWR@loadafter{awesomebox}
@@ -245,8 +245,8 @@
\LWR@loadafter{canoniclayout}
\LWR@loadafter{caption}
\LWR@loadafter{caption2}
+\LWR@loadafter{caption3}
\LWR@loadafter{cases}
-\LWR@loadafter{centernot}
\LWR@loadafter{changebar}
\LWR@loadafter{changelayout}
\LWR@notmemoirloadafter{changepage}
@@ -310,7 +310,6 @@
\LWR@loadafter{etoc}
\LWR@loadafter{eurosym}
\LWR@loadafter{everypage}
-\LWR@loadafter{everyshi}
\LWR@loadafter{extarrows}
\LWR@loadafter{extramarks}
\LWR@loadafter{fancybox}
@@ -371,7 +370,9 @@
\LWR@loadafter{gridset}
\LWR@loadafter{hang}
\LWR@loadafter{hanging}
+\LWR@loadafter{hepunits}
\LWR@loadafter{hhline}
+\LWR@loadafter{hhtensor}
\LWR@loadafter{hypbmsec}
\LWR@loadafter{hypcap}
\LWR@loadafter{hypdestopt}
@@ -418,8 +419,11 @@
\LWR@loadafter{marginnote}
\LWR@loadafter{marvosym}
\LWR@loadafter{mathcomp}
+\LWR@loadafter{mathdesign}
\LWR@loadafter{mathdots}
\LWR@loadafter{mathfixs}
+\LWR@loadafter{mathpazo}
+\LWR@loadafter{mathptmx}
\LWR@loadafter{mathtools}
\LWR@loadafter{mcaption}
\LWR@loadafter{mdframed}
@@ -434,6 +438,7 @@
\LWR@loadafter{minibox}
\LWR@loadafter{minitoc}
\LWR@loadafter{mismath}
+\LWR@loadafter{mleftright}
\LWR@notmemoirloadafter{moreverb}
\LWR@notmemoirloadafter{movie15}
\LWR@notmemoirloadafter{mparhack}
@@ -452,7 +457,6 @@
\LWR@loadafter{nccfoots}
\LWR@loadafter{nccmath}
\LWR@notmemoirloadafter{needspace}
-\LWR@loadafter{newtxmath}
\LWR@notmemoirloadafter{nextpage}
\LWR@loadafter{nicefrac}
\LWR@loadafter{niceframe}
@@ -514,6 +518,7 @@
\LWR@loadafter{pstool}
\LWR@loadafter{pstricks}
\LWR@loadafter{pxeveryshi}
+\LWR@loadafter{pxfonts}
\LWR@loadafter{pxftnright}
\LWR@loadafter{pxjahyper}
\LWR@loadafter{quotchap}
@@ -551,6 +556,7 @@
\LWR@notmemoirloadafter{showidx}
\LWR@loadafter{showkeys}
\LWR@loadafter{showtags}
+\LWR@loadafter{shuffle}
\LWR@loadafter{sidecap}
\LWR@loadafter{sidenotes}
\LWR@loadafter{SIunits}
@@ -597,6 +603,7 @@
\LWR@loadafter{thm-listof}
\LWR@loadafter{thm-restate}
\LWR@loadafter{thmbox}
+\LWR@loadafter{thmtools}
\LWR@loadafter{threadcol}
\LWR@loadafter{threeparttable}
\LWR@loadafter{threeparttablex}
@@ -621,6 +628,7 @@
\LWR@loadafter{trivfloat}
\LWR@loadafter{truncate}
\LWR@loadafter{turnthepage}
+\LWR@loadafter{txfonts}
\LWR@loadafter{twoup}
\LWR@loadafter{typicons}
\LWR@loadafter{umoline}
@@ -628,8 +636,10 @@
\LWR@loadafter{unicode-math}
\LWR@loadafter{units}
\LWR@loadafter{unitsdef}
+\LWR@loadafter{upgreek}
\LWR@loadafter{upref}
\LWR@loadafter{url}
+\LWR@loadafter{ushort}
\LWR@loadafter{uspace}
\LWR@loadafter{varioref}
\LWR@notmemoirloadafter{verse}
@@ -771,7 +781,8 @@
\newcommand*{\LWR@patcherror}[2]{%
\PackageError{lwarp}%
{%
- Unable to patch package #1, macro #2.\MessageBreak
+ Unable to patch package #1,\MessageBreak
+ macro \LWRbackslash #2.\MessageBreak
Lwarp may need to be updated%
}%
{Please contact the maintainer of the Lwarp package.}%
@@ -832,6 +843,11 @@
\fi
#1%
}
+\ExplSyntaxOn
+\newcommand*{\LWRtexttitlecase}[1]{%
+ \text_titlecase:n{#1}%
+}
+\ExplSyntaxOff
\newcommand*{\LWR@LetLtxMacrocs}[2]{%
\expandafter\LetLtxMacro\csname #1\expandafter\endcsname%
\csname#2\endcsname%
@@ -1161,8 +1177,7 @@
tracking=false,
kerning=false,
spacing=false}
-
-\DisableLigatures[f,q,t,T,Q]{encoding = *,family = *}
+\DisableLigatures{encoding = *,family = tt*}
\fi
\end{warpHTML}
@@ -2868,8 +2883,8 @@ div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;}
display: inline-block ;
}
-/* mdframed, tcolorbox packages */
-.mdframed, .tcolorbox {
+/* mdframed, tcolorbox, shadebox packages */
+.mdframed, .tcolorbox, .shadebox {
padding: 0ex ;
margin: 2ex 0em 2ex 0em ;
border: 1px solid black ;
@@ -4331,7 +4346,7 @@ MathJax = {
subequations: "0",
section: "",
loader: {
- load: ['[tex]/tagFormat']
+ load: ['[tex]/tagFormat'],
},
startup: {
ready() {
@@ -4452,7 +4467,7 @@ MathJax = {
-- Copyright 2016-2020 Brian Dunn
-printversion = "v0.88"
+printversion = "v0.89"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -4482,7 +4497,7 @@ lwarpmk pdftohtml [-p project]:
lwarpmk pdftosvg <list of file names>: Converts each PDF file to SVG.
lwarpmk epstopdf <list of file names>: Converts each EPS file to PDF.
lwarpmk clean [-p project]: Remove *.aux, *.toc, *.lof/t,
- *.idx, *.ind, *.log, *_html_inc.*, .gl*,
+ *.idx, *.ind, *.bbl, *.log, *_html_inc.*, .gl*,
*_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.
@@ -4836,6 +4851,7 @@ os.execute ( rmname .. " *.aux " ..
sourcename ..".toc " .. sourcename .. "_html.toc " ..
sourcename ..".lof " .. sourcename .. "_html.lof " ..
sourcename ..".lot " .. sourcename .. "_html.lot " ..
+ sourcename ..".bbl " .. sourcename .. "_html.bbl " ..
" *.idx " ..
" *.ind " ..
sourcename ..".ps " .. sourcename .."_html.ps " ..
@@ -6831,12 +6847,26 @@ end -- not --version
\endgroup%
}
+\edef\LWR@beginspaceleftbrace{begin \LWRleftbrace}
+\edef\LWR@beginspaceleftbrace{\detokenize\expandafter{\LWR@beginspaceleftbrace}}
+\edef\LWR@beginleftbrace{begin\LWRleftbrace}
+\edef\LWR@beginleftbrace{\detokenize\expandafter{\LWR@beginleftbrace}}
+
+\edef\LWR@endspacerightbrace{end \LWRrightbrace}
+\edef\LWR@endspacerightbrace{\detokenize\expandafter{\LWR@endspacerightbrace}}
+\edef\LWR@endrightbrace{end\LWRrightbrace}
+\edef\LWR@endrightbrace{\detokenize\expandafter{\LWR@endrightbrace}}
+
\newrobustcmd{\LWR@HTMLsanitizeexpand}[1]{%
\begingroup%
\LWR@FBcancel%
\fullexpandarg%
\protect\StrSubstitute{\detokenize\expandafter{#1}}%
{\detokenize{\&}}{\detokenize{&}}[\LWR@strresult]%
+ \protect\StrSubstitute{\LWR@strresult}%
+ {\LWR@beginspaceleftbrace}{\LWR@beginleftbrace}[\LWR@strresult]%
+ \protect\StrSubstitute{\LWR@strresult}%
+ {\LWR@endspacerightbrace}{\LWR@endrightbrace}[\LWR@strresult]%
\LWR@subHTMLsanitize%
\LWR@strresult%
\endgroup%
@@ -6909,9 +6939,7 @@ end -- not --version
\CustomizeMathJax{\def\LWRfootnote{1}}
\CustomizeMathJax{\newcommand{\footnote}[2][\LWRfootnote]{{}^{\mathrm{#1}}}}
\CustomizeMathJax{\newcommand{\footnotemark}[1][\LWRfootnote]{{}^{\mathrm{#1}}}}
-\end{warpMathJax}
-\begin{warpMathJax}
\CustomizeMathJax{\newcommand\ensuremath[1]{#1}}
\CustomizeMathJax{% absorb two optional arguments
\newcommand{\LWRframebox}[2][]{\fbox{#2}}
@@ -6924,6 +6952,13 @@ end -- not --version
\CustomizeMathJax{\newcommand{\cline}[1]{}}
\CustomizeMathJax{\newcommand{\directlua}[1]{\text{(directlua)}}}
\CustomizeMathJax{\newcommand{\luatexdirectlua}[1]{\text{(directlua)}}}
+\CustomizeMathJax{\newcommand{\protect}{}}
+\CustomizeMathJax{\def\LWRabsorbnumber#1 {}}
+\CustomizeMathJax{\def\LWRabsorbquotenumber"#1 {}}
+\CustomizeMathJax{\def\mathchar{\ifnextchar"\LWRabsorbquotenumber\LWRabsorbnumber}}
+\CustomizeMathJax{\def\mathcode#1={\mathchar}}
+\CustomizeMathJax{\let\delcode\mathcode}
+\CustomizeMathJax{\let\delimiter\mathchar}
\end{warpMathJax}
\begin{warpHTML}% due to warpMathJax
@@ -6933,17 +6968,14 @@ end -- not --version
\LWR@stoppars
\LWR@htmlcomment{MathJax customizations:}
-\typeout{---}
-\typeout{Package lwarp:}
-\typeout{Processing MathJax customizations. If this takes too long,}
-\typeout{see the Lwarp manual regarding customizing MathJax.}
\begin{BlockClass}{hidden}
\LWR@stoppars
-\LWR@customizedMathJax
+{
+ \LWR@print@ttfamily
+ \LWR@customizedMathJax
+}
\LWR@startpars
\end{BlockClass}
-\typeout{Done.}
-\typeout{---}
\LWR@startpars
}{}
@@ -7598,7 +7630,20 @@ end -- not --version
\immediate\write\@mainaux{\catcode`\string$\active}%
\LetLtxMacro\LWR@syntaxhighlightone$% balance for editor syntax highlighting
\LWR@startpars
+\ifbool{mathjax}{
+ \typeout{---}
+ \typeout{Package lwarp:}
+ \typeout{Processing MathJax customizations for the first HTML page.}
+ \typeout{Later HTML pages will take the same amount of time.}
+ \typeout{If this takes too long, see the Lwarp manual regarding customizing MathJax.}
+}{}
+
\LWR@customizeMathJax
+
+\ifbool{mathjax}{
+ \typeout{Done.}
+ \typeout{---}
+}{}
\setcounter{LWR@latestautopage}{\value{page}}%
\LWR@newautopagelabel{LWR@currentautosec}%
\LWR@traceinfo{LWR@lwarpStart: done}
@@ -7642,36 +7687,64 @@ end -- not --version
\LWR@maybe@orignewpage
}
-\xpatchcmd{\enddocument}
- {%
- \if@tempswa
- \@latex@warning@no@line{Label(s) may have changed.
- Rerun to get cross-references right}%
- \fi
- }
- {%
- \if@tempswa
- \@latex@warning@no@line{Label(s) may have changed.
- Rerun to get cross-references right}%
- \else
+\ifdef{\AddToHook}{% newer kernel
+ \AddToHook{enddocument/info}{%
+ \if@filesw
+ \ifx \@multiplelabels \relax
+ \if@tempswa
+ \else
\immediate\write\LWR@lateximagesfile{%
|end|end|end|%
}%
- \fi
+ \fi
+ \fi\fi
}
- {}
- {
- \AtEndDocument{
- \PackageWarningNoLine{lwarp}
- {%
- Could not patch \protect\enddocument.\MessageBreak
- If labels have changed, be sure to recompile before\MessageBreak
- creating lateximages with\MessageBreak
- \space\space lwarpmk limages,\MessageBreak
- or the images may be corrupt%
+}% newer kernel
+{% older kernel
+ \xpatchcmd{\enddocument}
+ {%
+ \if@tempswa
+ \@latex@warning@no@line{Label(s) may have changed.
+ Rerun to get cross-references right}%
+ \fi
+ }
+ {%
+ \if@tempswa
+ \@latex@warning@no@line{Label(s) may have changed.
+ Rerun to get cross-references right}%
+ \else
+ \immediate\write\LWR@lateximagesfile{%
+ |end|end|end|%
+ }%
+ \fi
+ }
+ {}
+ {
+ \AtEndDocument{
+ \PackageWarningNoLine{lwarp}
+ {%
+ Could not patch \protect\enddocument.\MessageBreak
+ If labels have changed, be sure to recompile before\MessageBreak
+ creating lateximages with\MessageBreak
+ \space\space lwarpmk limages,\MessageBreak
+ or the images may be corrupt%
+ }
}
}
+}% older kernel
+
+\ifdef{\RemoveFromHook}{
+ \AfterEndPreamble{
+ \IfHookEmptyTF{shipout/background}{}{
+ \PackageInfo{lwarp}{Removing background hook}
+ \RemoveFromHook{shipout/background}[*]
+ }
+ \IfHookEmptyTF{shipout/foreground}{}{
+ \PackageInfo{lwarp}{Removing foreground hook}
+ \RemoveFromHook{shipout/foreground}[*]
+ }
}
+}{}
\end{warpHTML}
@@ -8068,18 +8141,19 @@ end -- not --version
\begin{warpHTML}
-
\renewcommand{\@begintheorem}[2]{%
\LWR@forcenewpage
\BlockClass{theoremcontents}
\trivlist
\item[\InlineClass{theoremlabel}{#1\ #2\ }]\itshape
}
-\renewcommand{\@opargbegintheorem}[3]{%
-\LWR@forcenewpage
-\BlockClass{theoremcontents}
-\trivlist
-\item[\InlineClass{theoremlabel}{#1\ #2\ (#3)\ }]\itshape
+\ifundef{\@opargbegintheorem}{}{
+ \renewcommand{\@opargbegintheorem}[3]{%
+ \LWR@forcenewpage
+ \BlockClass{theoremcontents}
+ \trivlist
+ \item[\InlineClass{theoremlabel}{#1\ #2\ (#3)\ }]\itshape
+ }
}
\renewcommand*{\@endtheorem}{%
\endtrivlist
@@ -11617,7 +11691,10 @@ end -- not --version
\LWR@traceinfo{LWR@subsingledollar: Mathjax}%
{%
\textbackslash(%
- \LWR@HTMLsanitize{#4}%
+ {%
+ \ifmmode\else\LWR@print@ttfamily\fi%
+ \LWR@HTMLsanitize{#4}%
+ }%
\textbackslash)%
}%
}% mathjax
@@ -11652,7 +11729,7 @@ end -- not --version
{
\textbackslash[%
- \LWR@HTMLsanitize{#1}%
+ {\LWR@print@ttfamily\LWR@HTMLsanitize{#1}}%
\textbackslash]
}% mathjax
@@ -11702,7 +11779,7 @@ end -- not --version
\protected\gdef\[#1\]{$$#1$$}
}
-\endgroup
+\endgroup% active $
\AtBeginDocument{
\LetLtxMacro\LWR@openbracketnormal\[
\LetLtxMacro\LWR@closebracketnormal\]
@@ -11750,8 +11827,6 @@ end -- not --version
\NewEnviron{math}{\expandafter\(\BODY\)}
\NewEnviron{LWR@displaymathnormal}{\expandafter\[\BODY\]\@ignoretrue}
-\LetLtxMacro\[\LWR@openbracketnormal%
-\LetLtxMacro\]\LWR@closebracketnormal%
\LetLtxMacro\displaymath\LWR@displaymathnormal%
\LetLtxMacro\enddisplaymath\endLWR@displaymathnormal%
\newenvironment{LWR@displaymathother}
@@ -11850,9 +11925,14 @@ end -- not --version
\NewDocumentCommand{\LWR@addmathjax}{m +m}{%
\LWR@origtilde\LWR@orignewline
- \textbackslash{}begin\{#1\}
- \LWR@HTMLsanitizeexpand{\detokenize\expandafter{#2}}
- \textbackslash{}end\{#1\}
+ {%
+ \LWR@print@ttfamily%
+ \textbackslash{}begin\{#1\}
+ \LWR@orignewline%
+ \LWR@HTMLsanitizeexpand{\detokenize\expandafter{#2}}%
+ \LWR@orignewline%
+ \textbackslash{}end\{#1\}
+ }%
\LWR@orignewline
}
@@ -12049,7 +12129,7 @@ end -- not --version
\begin{BlockClass}{displaymathnumbered}%
\LWR@newautoidanchor%
\booltrue{LWR@indisplaymathimage}%
- \begin{lateximage}[(\LWR@startingequationtag--\LWR@equationtag)%
+ \begin{lateximage}[(\LWR@startingequationtag\textendash\LWR@equationtag)%
\LWR@addmathjax{eqnarray}{\BODY}]*%
\LWR@applyxfakebold%
\LWR@origeqnarray%
@@ -12155,7 +12235,7 @@ end -- not --version
{%
\ifnumcomp{\value{LWR@startingequation}}{=}{\value{equation}}%
{(\LWR@equationtag)}%
- {(\LWR@startingequationtag--\LWR@equationtag)} % extra space
+ {(\LWR@startingequationtag\textendash\LWR@equationtag)} % extra space
\LWR@amsmathbody{#1} % extra space
}
@@ -12418,6 +12498,11 @@ end -- not --version
\LWR@PreloadedPackage{fontaxes}
+\LWR@PreloadedPackage{newpxmath}
+\LWR@PreloadedPackage{newtxmath}
+\LWR@PreloadedPackage{newtxsf}
+\LWR@PreloadedPackage{mathalpha}
+
\LWR@PreloadedPackage{nfssext-cfr}
\LWR@PreloadedPackage{ulem}
@@ -12445,7 +12530,7 @@ end -- not --version
\newrobustcmd{\LWR@siunitx@textdegree}{\HTMLentity{deg}}
\newrobustcmd{\LWR@siunitx@textprime}{\HTMLunicode{2032}}
\newrobustcmd{\LWR@siunitx@textdblprime}{\HTMLunicode{2033}}
-\newrobustcmd{\LWR@siunitx@textplanckbar}{\text{\textit{\HTMLunicode{0127}}}}
+\newrobustcmd{\LWR@siunitx@textplanckbar}{\text{\textit{\HTMLunicode{210F}}}}
\appto\LWR@restoreorigformatting{%
\renewrobustcmd{\LWR@siunitx@textcelsius}{\text{\ensuremath{^\circ}C}}%
@@ -13686,10 +13771,31 @@ color:\LWR@origpound\LWR@tempcolor%
\end{warpHTML}
\begin{warpHTML}
+\AtBeginDocument{
+ \@ifpackageloaded{everyshi}{
+ \RequirePackage{lwarp-everyshi}
+ }{}
+}
+\end{warpHTML}
+
+\begin{warpHTML}
\RequirePackage{lwarp-textcomp}
\end{warpHTML}
\begin{warpHTML}
+\@ifpackageloaded{amsthm}{
+ \RequirePackage{lwarp-amsthm}
+}{}
+\@ifpackageloaded{amsmath}{
+ \RequirePackage{lwarp-amsmath}
+}{}
+
+\@ifpackageloaded{centernot}{
+ \RequirePackage{lwarp-centernot}
+}{}
+\end{warpHTML}
+
+\begin{warpHTML}
\@ifclassloaded{scrbook}{\RequirePackage{lwarp-patch-komascript}}{}
\@ifclassloaded{scrartcl}{\RequirePackage{lwarp-patch-komascript}}{}
\@ifclassloaded{scrreprt}{\RequirePackage{lwarp-patch-komascript}}{}