diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp.sty | 283 |
1 files changed, 184 insertions, 99 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty index e041933521a..df6b7f398ae 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} - [2019/03/21 v0.69 Allows LaTeX to directly produce HTML5 output.] + [2019/04/03 v0.70 Allows LaTeX to directly produce HTML5 output.] @@ -211,6 +211,7 @@ \LWR@loadafter{attachfile} \LWR@loadafter{attachfile2} \LWR@loadafter{authblk} +\LWR@loadafter{autonum} \LWR@loadafter{axessibility} \LWR@loadafter{axodraw2} \LWR@loadafter{backref} @@ -239,6 +240,7 @@ \LWR@loadafter{caption2} \LWR@loadafter{cases} \LWR@loadafter{changebar} +\LWR@loadafter{changelayout} \LWR@notmemoirloadafter{changepage} \LWR@loadafter{changes} \LWR@loadafter{chappg} @@ -385,10 +387,12 @@ \LWR@loadafter{marginfix} \LWR@loadafter{marginnote} \LWR@loadafter{marvosym} +\LWR@loadafter{mathtools} \LWR@loadafter{mcaption} \LWR@loadafter{mdframed} \LWR@loadafter{memhfixc} \LWR@loadafter{metalogo} +\LWR@loadafter{metalogox} \LWR@loadafter{mhchem} \LWR@loadafter{microtype} \LWR@loadafter{midfloat} @@ -627,6 +631,32 @@ \fi \fi +\ifxetexorluatex +\else + \ifdefstring{\f@family}{cmr}{ + \IfFileExists{type1ec.sty}% found in cm-super + {} + {% cm-super not installed + \IfFileExists{lmodern.sty}{ + \PackageInfo{lwarp}{cm-super not installed, loading lmodern} + \RequirePackage{lmodern} + }{ + \PackageError{lwarp} + {% + Lwarp requires a vector font.\MessageBreak + Install and load cm-super, lmodern, or another\MessageBreak + Type-1 vector font before loading lwarp% + } + {% + Install cm-super or lmodern.\MessageBreak + If lmodern, load it before lwarp:\MessageBreak + \space\space\protect\usepackage{lmodern}\MessageBreak + \space\space\protect\usepackage{lwarp}% + } + } + }% cm-super not installed + }{}% f@family +\fi \ifPDFTeX \RequirePackage{upquote} \fi @@ -1085,6 +1115,7 @@ {}% no filename {% yes filename was found \ifdefstring{\LWR@strresulttwo}{easyReview}{\LWR@nullifycomment}{}% + \ifdefstring{\LWR@strresulttwo}{changes}{\LWR@nullifycomment}{}% \ifbool{warpingHTML}{\LWR@checkloadfilename{\LWR@strresulttwo}}{}% \ifboolexpr{ bool{warpingHTML} and @@ -2421,6 +2452,11 @@ div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;} overflow: auto; } +.inlineminipage { + display: inline-block ; + text-align: left +} + /* Paragraphs in the flexbox did not collapse their margins. */ /* Have not yet researched this. */ .minipage p {margin: .75ex 0em .75ex 0em ;} @@ -3882,16 +3918,17 @@ MathJax.Hub.Register.StartupHook("TeX AMSmath Ready",function () { <script type="text/x-mathjax-config"> MathJax.Hub.Config({ TeX: { - equationNumbers: { - autoNumber: "AMS" - } + extensions: ["autoload-all.js"] , + equationNumbers: { + autoNumber: "AMS" + } } }); </script> <!-- Alternative CDN provider: --> <script type="text/javascript" async -src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS_HTML-full"> +src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS_HTML-full"> </script> <!-- No longer supported after April 30, 2017: --> @@ -3914,7 +3951,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX- -- Copyright 2016-2018 Brian Dunn -printversion = "v0.69" +printversion = "v0.70" requiredconfversion = "2" -- also at *lwarpmk.conf function printhelp () @@ -4300,7 +4337,7 @@ function warnlimages () print ("lwarpmk: \"" .. sourcename .. "-images.txt\" does not exist.") print ("lwarpmk: Your project does not use SVG math or other lateximages,") print ("lwarpmk: or the file has been deleted somehow.") - print ("lwarpmk: Use \"lwarpmk html\" to recompile your project") + print ("lwarpmk: Use \"lwarpmk html1\" to recompile your project") print ("lwarpmk: and recreate \"" .. sourcename .. "-images.txt\".") print ("lwarpmk: If your project does not use SVG math or other lateximages,") print ("lwarpmk: then \"" .. sourcename .. "-images.txt\" will never exist, and") @@ -4312,8 +4349,9 @@ function warnlimagesrecompile () -- Warning if must recompile before creating limages: print ("") print ("lwarpmk: ===") + print ("lwarpmk: Cross-references are not yet correct.") print ("lwarpmk: The document must be recompiled before creating the lateximages.") - print ("lwarpmk: Enter \"lwarpmk html\" again, then try \"lwarpmk limages\" again.") + print ("lwarpmk: Enter \"lwarpmk html1\" again, then try \"lwarpmk limages\" again.") print ("lwarpmk: ===") end --warnlimagesrecompile @@ -5234,7 +5272,9 @@ end -- not --version {% not in a lateximage \LWR@traceinfo{LWR@nestspan: NOT inside a lateximage}% \addtocounter{LWR@spandepth}{1}% - \RenewDocumentEnvironment{minipage}{O{t} o O{t} m}{}{}% + \RenewDocumentEnvironment{minipage}{O{t} o O{t} m}% + {\LWR@subhtmlelementclass{span}{inlineminipage}}% + {\LWR@htmltagc{/span}}% \RenewDocumentEnvironment{BlockClass}{o m}{}{}% \renewcommand{\BlockClassSingle}[2]{##2}% \renewcommand{\LWR@forcenewpage}{}% @@ -5554,7 +5594,7 @@ end -- not --version {% yes nest par tags \leavevmode\LWR@orignewline% \LWR@htmltagc{/\LWR@tagregularparagraph}% - \LWR@orignewline% + \LWR@origpar% \global\boolfalse{LWR@doingapar}% \global\boolfalse{LWR@minipagethispar}% \PN@parnotes@auto% @@ -5671,6 +5711,21 @@ end -- not --version \newcommand*{\CSSFilename}[1]{} \end{warpprint} + +\begin{warpHTML} + +\newcommand*{\LWR@mathjaxfilename}{lwarp_mathjax.txt} + +\newcommand*{\MathJaxFilename}[1]{% + \renewcommand*{\LWR@mathjaxfilename}{#1}% + \@onelevel@sanitize\LWR@mathjaxfilename% +} + +\end{warpHTML} +\begin{warpprint} +\newcommand*{\MathJaxFilename}[1]{} +\end{warpprint} + \begin{warpHTML} \let\LWR@origtitle\title @@ -6610,7 +6665,7 @@ end -- not --version \begingroup% \LWR@restoreoriglists% \boolfalse{LWR@verbtags}% - \verbatiminput{lwarp_mathjax.txt}% + \verbatiminput{\LWR@mathjaxfilename}% \booltrue{LWR@verbtags}% \endgroup% \LWR@stoppars% @@ -6655,13 +6710,6 @@ end -- not --version \let\LWR@origcaption\caption \let\LWR@origltx@label\ltx@label \let\ltx@label\LWR@htmlmathlabel -\LetLtxMacro\TeX\LWR@TeX -\LetLtxMacro\LaTeX\LWR@LaTeX -\LetLtxMacro\LuaTeX\LWR@LuaTeX -\LetLtxMacro\LuaLaTeX\LWR@LuaLaTeX -\LetLtxMacro\XeTeX\LWR@XeTeX -\LetLtxMacro\XeLaTeX\LWR@XeLaTeX -\LetLtxMacro\ConTeXt\LWR@ConTeXt \global\boolfalse{LWR@doingapar} \global\boolfalse{LWR@doingstartpars} \mainmatter @@ -6728,12 +6776,37 @@ end -- not --version \LWR@htmltag{/body}\LWR@orignewline \LWR@htmltag{/html}\LWR@orignewline \LWR@orignewpage -\immediate\write\LWR@lateximagesfile{% - |end|end|end|% -}% -\immediate\closeout\LWR@lateximagesfile } +\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 + } + {} + { + \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% + } + } + \end{warpHTML} \begin{warpall} @@ -9310,13 +9383,13 @@ autopage-\theLWR@currentautosec% \newcommand*{\LWR@newautoidanchor}{% \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% {}% -{ +{% \ifbool{LWR@freezethisautoid}{}{% \addtocounter{LWR@thisautoid}{1}% \LWR@htmltag{a id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}"}% \LWR@htmltag{/a}% }% -} +}% } \newcommand*{\@captype}{} @@ -9374,7 +9447,7 @@ autopage-\theLWR@currentautosec% } {\endBlockClass} \newcommand*{\LWR@HTML@caption@begin}[1] -{ +{% \LWR@traceinfo{LWR@HTML@caption@begin}% \begingroup% \@setpar{\LWR@closeparagraph\@@par}% @@ -9812,6 +9885,7 @@ autopage-\theLWR@currentautosec% \let\textellipsis\LWR@origtextellipsis% \let\textless\LWR@origtextless% \let\textgreater\LWR@origtextgreater% +\let\&\LWR@origampersand% \LetLtxMacro\rmfamily\LWR@origrmfamily% \LetLtxMacro\sffamily\LWR@origsffamily% \LetLtxMacro\ttfamily\LWR@origttfamily% @@ -9841,10 +9915,6 @@ autopage-\theLWR@currentautosec% \LetLtxMacro\hline\LWR@orighline% \let\newline\LWR@orignewline% \LetLtxMacro\includegraphics\LWR@origincludegraphics% -\let\TeX\LWR@origTeX% -\let\LaTeX\LWR@origLaTeX% -\let\LaTeXe\LWR@origLaTeXe% -\renewcommand*{\Xe}{X\textsubscript{E}}% \LetLtxMacro\@ensuredmath\LWR@origensuredmath% \LWR@restoreorigaccents% \LWR@restoreoriglists% @@ -9906,13 +9976,13 @@ autopage-\theLWR@currentautosec% \LWR@origincludegraphics{\LWR@baselinename}% } }{ - \PackageWarning{lwarp}{Load graphicx or graphics + \PackageWarningNoLine{lwarp}{Load graphicx or graphics for improved SVG math baselines,} \newcommand*{\LWR@addbaselinemarker}{} } } }{% lwarp_baseline_marker.png or .eps is not present - \PackageWarning{lwarp}{File \LWR@baselinename\space is not installed alongside + \PackageWarningNoLine{lwarp}{File \LWR@baselinename\space is not installed alongside the lwarp-*.sty files, so SVG math baselines may not be accurate,} \newcommand*{\LWR@addbaselinemarker}{} } @@ -10785,6 +10855,9 @@ autopage-\theLWR@currentautosec% }% {}% } + +\LWR@PreloadedPackage{inputtrc} + \LWR@PreloadedPackage{textcomp} \LWR@PreloadedPackage{xunicode} @@ -10961,7 +11034,7 @@ autopage-\theLWR@currentautosec% \begin{warpHTML} \AtEndPreamble{ -\RequirePackage{cleveref} + \RequirePackage{cleveref} } \AfterEndPreamble{ \LWR@traceinfo{Patching cleveref.} @@ -11235,7 +11308,7 @@ autopage-\theLWR@currentautosec% \LWR@print@mbox{text-align:\LWR@align} ; % }% } -\NewDocumentCommand{\LWR@HTML@makebox}{>{\SplitArgument{1}{,}}d() o o m}{% +\NewDocumentCommand{\LWR@HTML@makebox}{>{\SplitArgument{1}{,}}d() o o +m}{% {% scope \def\LWR@temptwo{}% \IfValueTF{#1}% @@ -11247,15 +11320,20 @@ autopage-\theLWR@currentautosec% }% }% {% [width] - \setlength{\LWR@tempwidth}{#2}% - \appto{\LWR@temptwo}{% - width:\LWR@printlength{\LWR@tempwidth} ; % space - }% - \IfValueT{#3}% - {% [width] [posn] - \LWR@@makebox@align{#3}% + \IfValueT{#2}% [width] + {% + \setlength{\LWR@tempwidth}{#2}% + \ifdimgreater{\LWR@tempwidth}{0pt}{% + \appto{\LWR@temptwo}{% + width:\LWR@printlength{\LWR@tempwidth} ; % space + }% + }{}% }% }% + \IfValueT{#3}% + {% [width] [posn] + \LWR@@makebox@align{#3}% + }% \InlineClass[% \LWR@print@mbox{display:inline-block} ; % \LWR@temptwo% @@ -11265,9 +11343,7 @@ autopage-\theLWR@currentautosec% }% scope } \LWR@formatted{makebox} -\LetLtxMacro\LWR@origframebox\framebox - -\NewDocumentCommand{\LWR@HTML@framebox}{d() o o m}{% +\NewDocumentCommand{\LWR@HTML@framebox}{d() o o +m}{% \fbox{\makebox(#1)[#2][#3]{#4}}% } @@ -11294,7 +11370,8 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@traceinfo{HTML fbox}% \LWR@forceminwidth{\fboxrule}% \InlineClass[% -\LWR@fboxstyle% + \LWR@print@mbox{display:inline-block} ; % + \LWR@fboxstyle% ]{fbox}{#1}% } \AtBeginDocument{\LWR@formatted{fbox}} @@ -11376,9 +11453,6 @@ color:\LWR@origpound\LWR@tempcolor% } \LWR@formattedenv{fminipage} -\end{warpHTML} -\begin{warpHTML} - \NewDocumentCommand{\LWR@HTML@raisebox}{m o o m}{% #4% } @@ -12013,11 +12087,38 @@ color:\LWR@origpound\LWR@tempcolor% \end{warpHTML} -\begin{warpHTML} +\begin{warpall} +\newrobustcmd*{\Xe} + {X\hspace{-.1667em}\raisebox{-.5ex}{E}} -\LetLtxMacro\LWR@origTeX\TeX +\AtBeginDocument{ +\@ifpackageloaded{graphics}{ + \@ifpackageloaded{metalogo}{}{ + \renewrobustcmd*{\Xe} + {X\hspace{-.1667em}\raisebox{-.5ex}{\reflectbox{E}}} + } +}{ + \PackageWarningNoLine{lwarp}{Load graphicx or graphics + for improved XeTeX logo} +} +} -\newrobustcmd*{\LWR@TeX} +\providerobustcmd*{\XeTeX}{\mbox{\Xe\hspace{-.125em}\TeX}} +\providerobustcmd*{\XeLaTeX}{\mbox{\Xe\hspace{-.125em}\LaTeX}} +\providerobustcmd*{\AmS}{% + \leavevmode\hbox{$\mathcal A\kern-.2em\lower.376ex% + \hbox{$\mathcal M$}\kern-.2em\mathcal S$}% +} +\newrobustcmd*{\LyX}{\textsf{LyX}} +\providerobustcmd*{\LuaTeX}{\mbox{Lua\TeX}} +\providerobustcmd*{\LuaLaTeX}{\mbox{Lua\LaTeX}} +\providerobustcmd*{\BibTeX}{\mbox{B\textsc{ib}\TeX}} +\providerobustcmd*{\MakeIndex}{\mbox{\textit{MakeIndex}}} +\providerobustcmd*{\ConTeXt}{\mbox{Con\TeX{}t}} +\providerobustcmd*{\MiKTeX}{\mbox{MiK\TeX}} +\end{warpall} +\begin{warpHTML} +\newrobustcmd*{\LWR@HTML@TeX} {% \InlineClass{latexlogofont}% {% @@ -12029,9 +12130,8 @@ color:\LWR@origpound\LWR@tempcolor% }% }% } -\LetLtxMacro\LWR@origLaTeX\LaTeX - -\newrobustcmd*{\LWR@LaTeX} +\AtBeginDocument{\LWR@formatted{TeX}}% may have been patched by metalogo +\newrobustcmd*{\LWR@HTML@LaTeX} {% \InlineClass{latexlogofont}% {% @@ -12046,9 +12146,9 @@ color:\LWR@origpound\LWR@tempcolor% }% } -\LetLtxMacro\LWR@origLaTeXe\LaTeXe +\AtBeginDocument{\LWR@formatted{LaTeX}}% may have been patched by metalogo -\renewrobustcmd*{\LaTeXe} +\newrobustcmd*{\LWR@HTML@LaTeXe} {% \LaTeX% \InlineClass{latexlogofont}{% @@ -12058,27 +12158,38 @@ color:\LWR@origpound\LWR@tempcolor% }% }% } -\newrobustcmd*{\LWR@LuaTeX}{\InlineClass{latexlogofont}{Lua}\TeX} -\newrobustcmd*{\LWR@LuaLaTeX}{\InlineClass{latexlogofont}{Lua}\LaTeX} -\newrobustcmd*{\Xe} +\AtBeginDocument{\LWR@formatted{LaTeXe}}% may have been patched by metalogo +\newrobustcmd*{\LWR@HTML@LuaTeX}{\InlineClass{latexlogofont}{Lua}\TeX} +\AtBeginDocument{\LWR@formatted{LuaTeX}}% may have been patched by metalogo + +\newrobustcmd*{\LWR@HTML@LuaLaTeX}{\InlineClass{latexlogofont}{Lua}\LaTeX} +\AtBeginDocument{\LWR@formatted{LuaLaTeX}}% may have been patched by metalogo +\newrobustcmd*{\LWR@HTML@Xe} {% X% \InlineClass{xelatexlogosub}{\HTMLunicode{18e}}% } +\AtBeginDocument{\LWR@formatted{Xe}}% may have been patched by metalogo -\newrobustcmd*{\LWR@XeTeX}{\InlineClass{xelatexlogo}{\Xe}\TeX} +\newrobustcmd*{\LWR@HTML@XeTeX}{\InlineClass{xelatexlogo}{\Xe}\TeX} +\AtBeginDocument{\LWR@formatted{XeTeX}}% may have been patched by metalogo -\newrobustcmd*{\LWR@XeLaTeX}{\InlineClass{xelatexlogo}{\Xe}\LaTeX} -\newrobustcmd*{\LWR@ConTeXt} -{\InlineClass{latexlogofont}{Con}\TeX{}% -\InlineClass{latexlogofont}{t}} -\providerobustcmd*{\BibTeX} -{\InlineClass{latexlogofont}{B\textsc{ib}}\TeX} +\newrobustcmd*{\LWR@HTML@XeLaTeX}{\InlineClass{xelatexlogo}{\Xe}\LaTeX} +\AtBeginDocument{\LWR@formatted{XeLaTeX}}% may have been patched by metalogo +\newrobustcmd*{\LWR@HTML@ConTeXt}{% + \InlineClass{latexlogofont}{Con}\TeX{}% + \InlineClass{latexlogofont}{t}% +} +\LWR@formatted{ConTeXt} +\newrobustcmd*{\LWR@HTML@BibTeX} + {\InlineClass{latexlogofont}{B\textsc{ib}}\TeX} +\LWR@formatted{BibTeX} -\newrobustcmd*{\MakeIndex} -{\InlineClass{latexlogofont}{\textit{MakeIndex}}} +\newrobustcmd*{\LWR@HTML@MakeIndex} + {\InlineClass{latexlogofont}{\textit{MakeIndex}}} +\LWR@formatted{MakeIndex} \AtBeginDocument{% -\DeclareDocumentCommand{\AmS}{} +\newrobustcmd*{\LWR@HTML@AmS} {% \InlineClass{amslogo}{% \textit{% @@ -12088,39 +12199,13 @@ color:\LWR@origpound\LWR@tempcolor% }% }% }% +\LWR@formatted{AmS} } -\newrobustcmd*{\MiKTeX}{\InlineClass{latexlogofont}{MiK}\TeX} -\newrobustcmd*{\LyX}{\InlineClass{lyxlogo}{LyX}} +\newrobustcmd*{\LWR@HTML@MiKTeX}{\InlineClass{latexlogofont}{MiK}\TeX} +\LWR@formatted{MiKTeX} +\newrobustcmd*{\LWR@HTML@LyX}{\InlineClass{lyxlogo}{LyX}} +\LWR@formatted{LyX} \end{warpHTML} -\begin{warpprint} - -\newrobustcmd*{\XeTeXrevE} - {\hspace{-.1667em}\raisebox{-.5ex}{E}\hspace{-.125em}} - -\AtBeginDocument{ -\@ifpackageloaded{graphics}{ - \renewrobustcmd*{\XeTeXrevE} - {\hspace{-.1667em}\raisebox{-.5ex}{\reflectbox{E}}\hspace{-.125em}} -}{ - \PackageWarning{lwarp}{Load graphicx or graphics - for improved XeTeX logo} -} -} - -\providerobustcmd*{\XeTeX}{\mbox{X\XeTeXrevE\TeX}} -\providerobustcmd*{\XeLaTeX}{\mbox{X\XeTeXrevE\LaTeX}} -\providerobustcmd*{\AmS}{% - \leavevmode\hbox{$\mathcal A\kern-.2em\lower.376ex% - \hbox{$\mathcal M$}\kern-.2em\mathcal S$}% -} -\newrobustcmd*{\LyX}{\textsf{LyX}} -\providerobustcmd*{\LuaTeX}{\mbox{Lua\TeX}} -\providerobustcmd*{\LuaLaTeX}{\mbox{Lua\LaTeX}} -\providerobustcmd*{\BibTeX}{\mbox{B\textsc{ib}\TeX}} -\providerobustcmd*{\MakeIndex}{\mbox{\textit{MakeIndex}}} -\providerobustcmd*{\ConTeXt}{\mbox{Con\TeX{}t}} -\providerobustcmd*{\MiKTeX}{\mbox{MiK\TeX}} -\end{warpprint} \begin{warpHTML} |