summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-03-25 21:11:36 +0000
committerKarl Berry <karl@freefriends.org>2020-03-25 21:11:36 +0000
commit019026f69bab4296c0d65e507b13b3904b866382 (patch)
treeabed3bd3b078534234d42938579bca78e906b0ad /Master/texmf-dist/tex/latex/lwarp/lwarp.sty
parented06debf5f768921e0fe0fd466866d881c2d4ea6 (diff)
lwarp (25mar20)
git-svn-id: svn://tug.org/texlive/trunk@54546 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.sty91
1 files changed, 76 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index ea0bba113a2..09abb4ef2a9 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/03/04 v0.81 Allows LaTeX to directly produce HTML5 output.]
+ [2020/03/25 v0.82 Allows LaTeX to directly produce HTML5 output.]
@@ -82,9 +82,9 @@
\@ifpackageloaded{#1}
{}
{
-\PackageError{lwarp}
-{Package #1 must be loaded before lwarp}
-{Move \detokenize{\usepackage}{#1} before \detokenize{\usepackage}{lwarp}.}
+ \PackageError{lwarp}
+ {Package #1 must be loaded before lwarp}
+ {Move \detokenize{\usepackage}{#1} before \detokenize{\usepackage}{lwarp}.}
}
}
@@ -295,6 +295,7 @@
\LWR@loadafter{eqparbox}
\LWR@loadafter{errata}
\LWR@loadafter{eso-pic}
+\LWR@loadafter{etoc}
\LWR@loadafter{eurosym}
\LWR@loadafter{everypage}
\LWR@loadafter{everyshi}
@@ -432,6 +433,7 @@
\LWR@loadafter{nameref}
\LWR@loadafter{natbib}
\LWR@notmemoirloadafter{nccfancyhdr}
+\LWR@loadafter{nccfoots}
\LWR@loadafter{nccmath}
\LWR@notmemoirloadafter{needspace}
\LWR@loadafter{newtxmath}
@@ -559,6 +561,7 @@
\LWR@loadafter{subsupscripts}
\LWR@loadafter{supertabular}
\LWR@loadafter{svg}
+\LWR@loadafter{syntonly}
\LWR@loadafter{t1inc}
\LWR@loadafter{tabfigures}
\LWR@loadafter{tabls}
@@ -749,6 +752,7 @@
\@ifpackageloaded{xeCJK}{
\renewcommand{\LWR@isolate}[1]{\null#1\null}%
}{}
+\newcommand*{\LWR@disablepinyin}{}
\newcommand*{\LWR@forceemptyline}{%
\LWR@origrule{0pt}{1\baselineskip}%
\LWR@orignewline%
@@ -4193,7 +4197,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-
-- Copyright 2016-2020 Brian Dunn
-printversion = "v0.81"
+printversion = "v0.82"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -5304,6 +5308,8 @@ end -- not --version
\newcommand*{\LWR@htmlsectionfilename}[1]{%
\LWR@traceinfo{LWR@htmlsectionfilename A !\detokenize{#1}!}%
+\begingroup%
+\LWR@disablepinyin%
\LWR@sanitize{#1}%
\LWR@traceinfo{about to compare with ??}%
\ifthenelse{\equal{\LWR@sanitized}{??}}%
@@ -5335,6 +5341,7 @@ end -- not --version
}%
}%
\LWR@traceinfo{LWR@htmlsectionfilename Z}%
+\endgroup%
}
\newcommand*{\LWR@htmlrefsectionfilename}[1]{%
@@ -6093,6 +6100,7 @@ end -- not --version
\csname p@footnote\endcsname\@thefnmark%
}% @currentlabel
\color@begingroup%
+ \LWR@disablepinyin%
\renewrobustcmd{\textsuperscript}[1]{\LWR@htmlspan{sup}{##1}}%
\ifthenelse{%
\boolean{LWR@doingstartpars} \AND%
@@ -6486,10 +6494,28 @@ end -- not --version
\typeout{---}
}
+\providecommand{\footnotename}{footnote}
+
+\end{warpHTML}
+
+\begin{warpMathJax}
+\xdef\LWR@customizedMathJax{\LWR@customizedMathJax%
+ \LWRbackslash(%
+ \LWRbackslash{}newcommand%
+ \{\LWRbackslash{}footnotename\}%
+ \{\footnotename\}%
+ \LWRbackslash)\par%
+}
+\end{warpMathJax}
+
+\begin{warpMathJax}
+\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{\newcommand\footnote[2][]{\text{( Footnote #1 )}}}
-\CustomizeMathJax{\newcommand\footnotemark[1][]{\text{( Footnote #1 )}}}
\CustomizeMathJax{% absorb two optional arguments
\newcommand{\LWRframebox}[2][]{\fbox{#2}}
\newcommand{\framebox}[1][]{\LWRframebox}
@@ -6503,6 +6529,8 @@ end -- not --version
\CustomizeMathJax{\newcommand{\luatexdirectlua}[1]{\text{(directlua)}}}
\end{warpMathJax}
+\begin{warpHTML}% due to warpMathJax
+
\newcommand{\LWR@customizeMathJax}{%
\ifbool{mathjax}{
\LWR@stoppars
@@ -10062,11 +10090,12 @@ end -- not --version
\LWR@traceinfo{LWR@myshorttoc: #1}%
\LWR@ensuredoingapar%
\IfFileExists{\jobname.#1}{%
- \LWR@traceinfo{LWR@myshorttoc: loading}%
- \begingroup%
- \makeatletter%
- \@input{\jobname.#1}%
- \endgroup%
+ \LWR@traceinfo{LWR@myshorttoc: loading}%
+ \begingroup%
+ \makeatletter%
+ \LWR@disablepinyin%
+ \@input{\jobname.#1}%
+ \endgroup%
}%
{}%
\LWR@traceinfo{LWR@myshorttoc: done}%
@@ -10747,7 +10776,11 @@ end -- not --version
}%
{%
\LWR@traceinfo{LWR@subsingledollar: Mathjax}%
- {\textbackslash(\LWR@HTMLsanitize{#4}\textbackslash)}%
+ {%
+ \textbackslash(%
+ \LWR@HTMLsanitize{#4}%
+ \textbackslash)%
+ }%
}% mathjax
{% not mathjax
\LWR@traceinfo{%
@@ -10913,22 +10946,26 @@ end -- not --version
\newcounter{LWR@nextequation}
\newcommand*{\LWR@syncmathjax}{%
\ifcsdef{thechapter}{
+ \LWR@stoppars%
\InlineClass{hidden}{
\textbackslash(
\textbackslash{}seteqsection \{\thechapter\}
\textbackslash)
}
+ \LWR@startpars%
}
{}% not using chapters
\ifthenelse{\cnttest{\value{equation}}>0}
{
\setcounter{LWR@nextequation}{\value{equation}}
\addtocounter{LWR@nextequation}{1}
+ \LWR@stoppars%
\InlineClass{hidden}{
\textbackslash(
\textbackslash{}seteqnumber \{\arabic{LWR@nextequation}\}
\textbackslash)
}
+ \LWR@startpars%
}{}% not eq > 0
}
\NewDocumentCommand{\LWR@hidelatexequation}{m +m}{%
@@ -10964,7 +11001,7 @@ end -- not --version
\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
- \LWR@syncmathjax
+ \LWR@syncmathjax%
\LWR@hidelatexequation{#2}{#1}
}
{% not mathjax
@@ -11001,12 +11038,34 @@ end -- not --version
\newcommand*{\LWR@doendequation}[1]{%
\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{%
- \LWR@addmathjax{#1}{\BODY}%
+ \IfSubStr{\detokenize\expandafter{\BODY}}{\detokenize{note}}{%
+ \InlineClass{hidden}{\LWR@syncnotenumbers}%
+ \LWR@addmathjax{#1}{\BODY}%
+ \InlineClass{hidden}{\LWR@syncnotenames}%
+ }{%
+ \LWR@addmathjax{#1}{\BODY}%
+ }%
}{}%
\gdef\LWR@ThisAltText{}%
}
+\newcommand*{\LWR@synconenotenumber}[2]{%
+ \textbackslash(
+ \textbackslash{}def\textbackslash{}#1\{#2\}
+ \textbackslash)
+}
+
+\newcommand*{\LWR@syncnotenumbers}{\LWR@synconenotenumber{LWRfootnote}{\thefootnote}}
+
+\newcommand*{\LWR@synconenotename}[2]{%
+ \textbackslash(
+ \textbackslash{}def\textbackslash{}#1\{#2\}
+ \textbackslash)
+}
+
+\newcommand*{\LWR@syncnotenames}{\LWR@synconenotename{LWRfootnote}{\footnotename}}
+
\AtBeginDocument{
\let\equation\relax
\let\endequation\relax
@@ -11520,6 +11579,8 @@ end -- not --version
\LWR@PreloadedPackage{lltjext}
+\LWR@PreloadedPackage{luatexko}
+
\end{warpHTML}