diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp.sty | 3342 |
1 files changed, 2229 insertions, 1113 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty index a476c088b8c..ddb31bd5e15 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty @@ -17,7 +17,8 @@ %% version 2005/12/01 or later. \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{lwarp} - [2020/03/25 v0.83 Allows LaTeX to directly produce HTML5 output.] + [2021/02/18 v0.895 Allows LaTeX to directly produce HTML5 output.] + @@ -26,6 +27,8 @@ \RequirePackage{iftex}[2019/11/07] +\RequirePackage{ifpdf} +\RequirePackage{ifptex} \newif\ifxetexorluatex @@ -50,14 +53,17 @@ {% Package #1,\MessageBreak or one which uses #1,\MessageBreak - must be loaded after lwarp + must be loaded after Lwarp.\MessageBreak + Enter 'H' for possible solutions% + } + {% + Move ``\protect\usepackage{#1}'' after + ``\protect\usepackage{lwarp}''.\MessageBreak + Package #1 may also be loaded by something else,\MessageBreak + which must also be moved after Lwarp.% } - {Move \detokenize{\usepackage}{#1} after - \detokenize{\usepackage}{lwarp}.\MessageBreak - Package #1 may also be loaded by something else,\MessageBreak - which must also be moved after lwarp.} } -{} +{\relax} } \@ifclassloaded{memoir} @@ -80,11 +86,14 @@ \newcommand*{\LWR@loadbefore}[1]{% \@ifpackageloaded{#1} -{} +{\relax} { \PackageError{lwarp} - {Package #1 must be loaded before lwarp} - {Move \detokenize{\usepackage}{#1} before \detokenize{\usepackage}{lwarp}.} + {% + Package #1 must be loaded before lwarp.\MessageBreak + Enter 'H' for possible solutions% + } + {Move ``\protect\usepackage{#1}'' before ``\protect\usepackage{lwarp}''.} } } @@ -100,7 +109,9 @@ {% Package #1 is not supported\MessageBreak by lwarp's HTML conversion.\MessageBreak - Package(s) #2 may be useful instead% + Package(s)\MessageBreak + \space\space#2\MessageBreak + may be useful instead% } {% Package #1 might conflict with lwarp in some way,\MessageBreak @@ -132,7 +143,7 @@ or is superceded by another class.\MessageBreak For a possible alternative, see class(es) #2. } -}{}% +}{\relax}% } \LWR@earlyclassloadnever{jarticle}{ujarticle} \LWR@earlyclassloadnever{jbook}{ujbook} @@ -146,22 +157,20 @@ \LWR@earlyloadnever{alg}{algorithm2e, algorithmicx} \LWR@earlyloadnever{algorithmic}{algorithm2e, algorithmicx} \LWR@earlyloadnever{bitfield}{bytefield} -\LWR@earlyloadnever{boxedminipage}{boxedminipage2e} \LWR@earlyloadnever{caption2}{caption} \LWR@earlyloadnever{colortab}{colortbl} +\LWR@earlyloadnever{csvtools}{datatool} \LWR@earlyloadnever{doublespace}{setspace} -\LWR@earlyloadnever{epsf}{graphicx} \LWR@earlyloadnever{fancyheadings}{fancyhdr} \LWR@earlyloadnever{fncylab}{cleveref} \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} \LWR@earlyloadnever{picins}{floatflt, wrapfig} \LWR@earlyloadnever{rplain}{fancyhdr} -\LWR@earlyloadnever{shadethm}{mdframed} \LWR@earlyloadnever{si}{siunitx} \LWR@earlyloadnever{sistyle}{siunitx} \LWR@earlyloadnever{slashbox}{diagbox} @@ -182,6 +191,7 @@ \LWR@loadafter{a5comb} \LWR@notmemoirloadafter{abstract} \LWR@loadafter{academicons} +\LWR@loadafter{accents} \LWR@loadafter{accessibility} \LWR@loadafter{accsupp} \LWR@loadafter{acro} @@ -192,8 +202,7 @@ \LWR@loadafter{algorithm2e} \LWR@loadafter{algorithmicx} \LWR@loadafter{alltt} -\LWR@loadafter{amsmath} -\LWR@loadafter{amsthm} +\LWR@loadafter{amscdx} \LWR@loadafter{anonchap} \LWR@loadafter{anysize} \LWR@notmemoirloadafter{appendix} @@ -205,6 +214,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} @@ -225,19 +235,21 @@ \LWR@notmemoirloadafter{booktabs} \LWR@loadafter{bophook} \LWR@loadafter{bounddvi} +\LWR@loadafter{boxedminipage} \LWR@loadafter{boxedminipage2e} \LWR@loadafter{braket} \LWR@loadafter{breakurl} \LWR@loadafter{breqn} \LWR@loadafter{bsheaders} +\LWR@loadafter{bussproofs} \LWR@loadafter{bxpapersize} \LWR@loadafter{bytefield} \LWR@loadafter{cancel} \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} @@ -252,6 +264,8 @@ \LWR@loadafter{chkfloat} \LWR@notmemoirloadafter{chngpage} \LWR@loadafter{cite} +\LWR@loadafter{citeref} +\LWR@loadafter{cleveref} \LWR@loadafter{cmdtrack} \LWR@loadafter{colonequals} \LWR@loadafter{color} @@ -274,6 +288,7 @@ \LWR@loadafter{draftcopy} \LWR@loadafter{draftfigure} \LWR@loadafter{draftwatermark} +\LWR@loadafter{drftcite} \LWR@loadafter{easy-todo} \LWR@loadafter{ebook} \LWR@loadafter{econometrics} @@ -288,6 +303,7 @@ \LWR@notmemoirloadafter{enumerate} \LWR@loadafter{enumitem} \LWR@notmemoirloadafter{epigraph} +\LWR@loadafter{epsf} \LWR@loadafter{epsfig} \LWR@loadafter{epstopdf} \LWR@loadafter{epstopdf-base} @@ -295,10 +311,10 @@ \LWR@loadafter{eqparbox} \LWR@loadafter{errata} \LWR@loadafter{eso-pic} +\LWR@loadafter{esvect} \LWR@loadafter{etoc} \LWR@loadafter{eurosym} \LWR@loadafter{everypage} -\LWR@loadafter{everyshi} \LWR@loadafter{extarrows} \LWR@loadafter{extramarks} \LWR@loadafter{fancybox} @@ -306,11 +322,13 @@ \LWR@loadafter{fancyref} \LWR@loadafter{fancytabs} \LWR@loadafter{fancyvrb} +\LWR@loadafter{fbox} \LWR@loadafter{fewerfloatpages} \LWR@loadafter{figcaps} \LWR@loadafter{figsize} \LWR@loadafter{fitbox} \LWR@loadafter{fix2col} +\LWR@loadafter{fixmath} \LWR@loadafter{fixme} \LWR@loadafter{fixmetodonotes} \LWR@loadafter{flafter} @@ -343,10 +361,12 @@ \LWR@loadafter{fullminipage} \LWR@loadafter{fullpage} \LWR@loadafter{fullwidth} +\LWR@loadafter{fvextra} \LWR@loadafter{fwlw} \LWR@loadafter{gensymb} \LWR@loadafter{gentombow} \LWR@loadafter{ghsystem} +\LWR@loadafter{gindex} \LWR@loadafter{glossaries} \LWR@loadafter{gmeometric} \LWR@loadafter{gloss} @@ -357,7 +377,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} @@ -368,10 +390,15 @@ \LWR@loadafter{idxlayout} \LWR@loadafter{ifoddpage} \LWR@loadafter{imakeidx} +\LWR@loadafter{impnattypo} \LWR@notmemoirloadafter{index} \LWR@loadafter{intopdf} +\LWR@loadafter{isomath} +\LWR@loadafter{isotope} +\LWR@loadafter{jurabib} \LWR@loadafter{karnaugh-map} \LWR@loadafter{keyfloat} +\LWR@loadafter{keystroke} \LWR@loadafter{layaureo} \LWR@loadafter{layout} \LWR@loadafter{layouts} @@ -384,6 +411,7 @@ \LWR@loadafter{listings} \LWR@loadafter{listliketab} \LWR@loadafter{longtable} +\LWR@loadafter{lpic} \LWR@loadafter{lscape} \LWR@loadafter{ltablex} \LWR@loadafter{ltcaption} @@ -394,6 +422,7 @@ \LWR@loadafter{luacolor} \LWR@loadafter{luamplib} \LWR@loadafter{luatodonotes} +\LWR@loadafter{luavlna} \LWR@loadafter{lyluatex} \LWR@loadafter{magaz} \LWR@notmemoirloadafter{makeidx} @@ -402,14 +431,23 @@ \LWR@loadafter{marginfix} \LWR@loadafter{marginnote} \LWR@loadafter{marvosym} +\LWR@loadafter{mathastext} \LWR@loadafter{mathcomp} +\LWR@loadafter{mathdesign} \LWR@loadafter{mathdots} \LWR@loadafter{mathfixs} +\LWR@loadafter{mathpazo} +\LWR@loadafter{mathptmx} +\LWR@loadafter{mathspec} \LWR@loadafter{mathtools} +\LWR@loadafter{mattens} +\LWR@loadafter{maybemath} \LWR@loadafter{mcaption} \LWR@loadafter{mdframed} +\LWR@loadafter{mdwmath} \LWR@loadafter{media9} \LWR@loadafter{memhfixc} +\LWR@loadafter{menukeys} \LWR@loadafter{metalogo} \LWR@loadafter{metalogox} \LWR@loadafter{mhchem} @@ -418,10 +456,13 @@ \LWR@loadafter{midpage} \LWR@loadafter{minibox} \LWR@loadafter{minitoc} +\LWR@loadafter{minted} \LWR@loadafter{mismath} +\LWR@loadafter{mleftright} \LWR@notmemoirloadafter{moreverb} \LWR@notmemoirloadafter{movie15} \LWR@notmemoirloadafter{mparhack} +\LWR@loadafter{multibib} \LWR@loadafter{multicap} \LWR@loadafter{multicolrule} \LWR@loadafter{multimedia} @@ -436,10 +477,10 @@ \LWR@loadafter{nccfoots} \LWR@loadafter{nccmath} \LWR@notmemoirloadafter{needspace} -\LWR@loadafter{newtxmath} \LWR@notmemoirloadafter{nextpage} \LWR@loadafter{nicefrac} \LWR@loadafter{niceframe} +\LWR@loadafter{nicematrix} \LWR@loadafter{noitcrul} \LWR@loadafter{nolbreaks} \LWR@loadafter{nomencl} @@ -481,7 +522,9 @@ \LWR@loadafter{phfqit} \LWR@loadafter{physics} \LWR@loadafter{physunits} +\LWR@loadafter{picinpar} \LWR@loadafter{pifont} +\LWR@loadafter{pinlabel} \LWR@loadafter{placeins} \LWR@loadafter{plarray} \LWR@loadafter{plarydshln} @@ -489,6 +532,7 @@ \LWR@loadafter{plextarydshln} \LWR@loadafter{plcolortbl} \LWR@loadafter{plextdelarray} +\LWR@loadafter{plimsoll} \LWR@loadafter{prelim2e} \LWR@loadafter{prettyref} \LWR@loadafter{preview} @@ -510,6 +554,7 @@ \LWR@loadafter{repeatindex} \LWR@loadafter{resizegather} \LWR@loadafter{returntogrid} +\LWR@loadafter{rlepsf} \LWR@loadafter{rmathbr} \LWR@loadafter{rmpage} \LWR@loadafter{romanbar} @@ -518,6 +563,7 @@ \LWR@loadafter{rotfloat} \LWR@loadafter{rviewport} \LWR@loadafter{savetrees} +\LWR@loadafter{scalerel} \LWR@loadafter{schemata} \LWR@loadafter{scrextend} \LWR@loadafter{scrhack} @@ -528,6 +574,7 @@ \LWR@loadafter{section} \LWR@loadafter{sectionbreak} \LWR@loadafter{sectsty} +\LWR@loadafter{selectp} \LWR@loadafter{semantic-markup} \LWR@notmemoirloadafter{setspace} \LWR@loadafter{shadow} @@ -535,15 +582,19 @@ \LWR@notmemoirloadafter{showidx} \LWR@loadafter{showkeys} \LWR@loadafter{showtags} +\LWR@loadafter{shuffle} \LWR@loadafter{sidecap} \LWR@loadafter{sidenotes} +\LWR@loadafter{simplebnf} \LWR@loadafter{SIunits} \LWR@loadafter{siunitx} +\LWR@loadafter{skmath} \LWR@loadafter{slantsc} \LWR@loadafter{slashed} \LWR@loadafter{soul} \LWR@loadafter{soulpos} \LWR@loadafter{soulutf8} +\LWR@loadafter{splitbib} \LWR@loadafter{splitidx} \LWR@loadafter{srcltx} \LWR@loadafter{srctex} @@ -551,6 +602,7 @@ \LWR@loadafter{stackengine} \LWR@loadafter{stackrel} \LWR@loadafter{statex2} +\LWR@loadafter{statistics} \LWR@loadafter{statmath} \LWR@loadafter{steinmetz} \LWR@notltjloadafter{stfloats} @@ -561,6 +613,7 @@ \LWR@loadafter{subsupscripts} \LWR@loadafter{supertabular} \LWR@loadafter{svg} +\LWR@loadafter{swfigure} \LWR@loadafter{syntonly} \LWR@loadafter{t1inc} \LWR@loadafter{tabfigures} @@ -568,19 +621,27 @@ \LWR@loadafter{tablefootnote} \LWR@notmemoirloadafter{tabularx} \LWR@loadafter{tabulary} -\LWR@loadafter{tascmac} \LWR@loadafter{tagpdf} +\LWR@loadafter{tascmac} +\LWR@loadafter{tcolorbox} +\LWR@loadafter{tensor} +\LWR@loadafter{termcal} \LWR@loadafter{textarea} \LWR@loadafter{textfit} \LWR@loadafter{textpos} \LWR@loadafter{theorem} \LWR@loadafter{thinsp} +\LWR@loadafter{thm-listof} +\LWR@loadafter{thm-restate} +\LWR@loadafter{thmbox} +\LWR@loadafter{thmtools} \LWR@loadafter{threadcol} \LWR@loadafter{threeparttable} \LWR@loadafter{threeparttablex} \LWR@loadafter{thumb} \LWR@loadafter{thumbs} \LWR@loadafter{tikz} +\LWR@loadafter{tikz-imagelabels} \LWR@loadafter{titleps} \LWR@loadafter{titlesec} \LWR@loadafter{titletoc} @@ -603,13 +664,14 @@ \LWR@loadafter{typicons} \LWR@loadafter{umoline} \LWR@loadafter{underscore} -\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}% no lwarp package provided +\LWR@loadafter{varioref} \LWR@notmemoirloadafter{verse} \LWR@loadafter{versonotes} \LWR@loadafter{vertbars} @@ -627,6 +689,7 @@ \LWR@loadafter{xcolor} \LWR@loadafter{xechangebar} \LWR@loadafter{xellipsis} +\LWR@loadafter{xevlna} \LWR@loadafter{xfakebold} \LWR@loadafter{xfrac} \LWR@loadafter{xltabular} @@ -641,9 +704,12 @@ \LWR@loadafter{xy} \LWR@loadafter{zwpagelayout} \newcommand{\LWR@mdfive}[1]{% -\PackageError{lwarp} -{No MD5 macro was found} -{Lwarp must find the macros pdfmdfivesum or mdfivesum.} + \PackageError{lwarp} + {No MD5 macro was found} + {% + Lwarp must find the macros \protect\pdfmdfivesum\space + or \protect\mdfivesum.% + } } \let\LWR@mdfive\pdfmdfivesum \ifLuaTeX @@ -703,7 +769,8 @@ {% Lwarp requires a vector font.\MessageBreak Install and load cm-super, lmodern, or another\MessageBreak - Type-1 vector font before loading lwarp% + Type-1 vector font before loading lwarp.\MessageBreak + Enter 'H' for possible solutions% } {% Install cm-super or lmodern.\MessageBreak @@ -722,6 +789,25 @@ \ifpTeX \RequirePackage{upquote} \fi +\ifxetexorluatex + \AtBeginDocument{ + \@ifpackageloaded{kpfonts}{ + \PackageError{lwarp} + {% + When using XeLaTeX or LuaLaTeX,\MessageBreak + use kpfonts-otf instead of kpfonts% + } + {% + Replace: \protect\usepackage{kpfonts}\MessageBreak + with: \protect\usepackage{kpfonts-otf} + } + }{} + } +\fi +\newlength{\LWR@templengthone} +\newlength{\LWR@templengthtwo} +\newlength{\LWR@templengththree} +\newcounter{LWR@tempcountone} \newcommand*\LWR@providelength[1]{% \ifdeflength{#1}{}{\newlength{#1}}% } @@ -739,9 +825,13 @@ \newcommand*{\LWR@patcherror}[2]{% -\PackageError{lwarp} -{Unable to patch package #1, macro #2} -{Please contact the author of the Lwarp package.} + \PackageError{lwarp}% + {% + Unable to patch package #1,\MessageBreak + macro \LWRbackslash #2.\MessageBreak + Lwarp or #1 may need to be updated% + }% + {Please contact the maintainer of the Lwarp package.}% } \newcommand{\LWR@isolate}[1]{#1}% @@ -761,6 +851,15 @@ \long\def\LWR@secondoffour#1#2#3#4{#2} \long\def\LWR@thirdoffour#1#2#3#4{#3} \long\def\LWR@fourthoffour#1#2#3#4{#4} +\newcounter{LWR@texboxdepth} +\setcounter{LWR@texboxdepth}{0} +\newcommand*{\LWR@maybe@orignewpage}{% + \LWR@traceinfo{LWR@maybe@orignewpage}% + \ifnumgreater{\value{LWR@texboxdepth}}{0} + {}% + {\LWR@orignewpage}% + \LWR@traceinfo{LWR@maybe@orignewpage done}% +} \DeclareRobustCommand\LWR@gsavebox[1]{% \@ifnextchar(%) {\LWR@@gsavepicbox#1}{\@ifnextchar[{\LWR@@gsavebox#1}{\LWR@gsbox#1}}}% @@ -794,6 +893,20 @@ \fi #1% } +\ExplSyntaxOn +\newcommand*{\LWRtexttitlecase}[1]{% + \text_titlecase:n{#1}% +} +\ExplSyntaxOff +\newcommand*{\LWR@LetLtxMacrocs}[2]{% + \expandafter\LetLtxMacro\csname #1\expandafter\endcsname% + \csname#2\endcsname% +} +\newcommand*{\LWR@absorbstar}[1]{% + \LWR@LetLtxMacrocs{LWR@origns@#1}{#1}% + \csdef{#1}{\@ifstar{\csuse{LWR@origns@#1}}{\csuse{LWR@origns@#1}}} + \expandafter\robustify\csname #1\endcsname +} \let\LWRpercent\@percentchar \catcode`\$=12 \def\LWRdollar{$} @@ -853,26 +966,26 @@ \boolfalse{warpingHTML}% \boolfalse{mathjax}% \DeclareVoidOption{warpprint}{% -\PackageInfo{lwarp}{Using option 'warpprint'} -\booltrue{warpingprint}% -\boolfalse{warpingHTML}% + \PackageInfo{lwarp}{Using option 'warpprint'} + \booltrue{warpingprint}% + \boolfalse{warpingHTML}% } \DeclareVoidOption{warpHTML}{% -\PackageInfo{lwarp}{Using option 'warpHTML'}% -\booltrue{warpingHTML}% -\boolfalse{warpingprint}% + \PackageInfo{lwarp}{Using option 'warpHTML'}% + \booltrue{warpingHTML}% + \boolfalse{warpingprint}% } \DeclareVoidOption{mathsvg}{% -\PackageInfo{lwarp}{Using option 'mathsvg'} -\boolfalse{mathjax}% -\boolfalse{LWR@origmathjax}% + \PackageInfo{lwarp}{Using option 'mathsvg'} + \boolfalse{mathjax}% + \boolfalse{LWR@origmathjax}% } \DeclareVoidOption{mathjax}{% -\PackageInfo{lwarp}{Using option 'mathjax'} -\booltrue{mathjax}% -\booltrue{LWR@origmathjax}% + \PackageInfo{lwarp}{Using option 'mathjax'} + \booltrue{mathjax}% + \booltrue{LWR@origmathjax}% } @@ -890,19 +1003,22 @@ \DeclareStringOption[utf8]{xindyCodepage} + +\DeclareStringOption[]{xindexConfig} + \DeclareStringOption[UTF-8]{pdftotextEnc} \newbool{LWR@creatinglwarpmk} \boolfalse{LWR@creatinglwarpmk} \DeclareVoidOption{lwarpmk}{ -\PackageInfo{lwarp}{Using option 'lwarpmk'} -\booltrue{LWR@creatinglwarpmk} + \PackageInfo{lwarp}{Using option 'lwarpmk'} + \booltrue{LWR@creatinglwarpmk} } \DeclareVoidOption{OSWindows}{ -\PackageInfo{lwarp}{Using option 'OSWindows'} -\LWR@setOSWindows + \PackageInfo{lwarp}{Using option 'OSWindows'} + \LWR@setOSWindows } \DeclareStringOption[]{HomeHTMLFilename} @@ -923,6 +1039,10 @@ \DeclareBoolOption[false]{xindy} +\DeclareBoolOption[false]{xindex} + +\DeclareStringOption[cref]{IndexRef} + \DeclareStringOption[makeglossaries]{GlossaryCmd} \DeclareBoolOption[false]{latexmk} @@ -973,6 +1093,20 @@ \jobname.idx% } }{} + \ifbool{LWR@xindex}{ + \ifdefvoid{\LWR@xindexConfig}{ + \renewcommand{\LWR@PrintIndexCmd}{% + xindex + \jobname.idx% + } + }{ + \renewcommand{\LWR@PrintIndexCmd}{% + xindex + -c \LWR@xindexConfig \space + \jobname.idx% + } + } + }{} }{} \ifdefempty{\LWR@HTMLIndexCmd}{ @@ -988,6 +1122,20 @@ \jobname_html.idx% } }{} + \ifbool{LWR@xindex}{ + \ifdefvoid{\LWR@xindexConfig}{ + \renewcommand{\LWR@HTMLIndexCmd}{% + xindex + \jobname_html.idx% + } + }{ + \renewcommand{\LWR@HTMLIndexCmd}{% + xindex + -c \LWR@xindexConfig \space + \jobname_html.idx% + } + } + }{} }{} \ifdefempty{\LWR@LatexmkIndexCmd}{ @@ -1002,42 +1150,87 @@ -C \LWR@xindyCodepage% } }{} + \ifbool{LWR@xindex}{ + \ifdefvoid{\LWR@xindexConfig}{ + \renewcommand{\LWR@LatexmkIndexCmd}{% + xindex + } + }{ + \renewcommand{\LWR@LatexmkIndexCmd}{% + xindex + -c \LWR@xindexConfig + } + } + }{} }{} \newcommand{\warpprintonly}[1]{\ifbool{warpingprint}{#1}{}} \newcommand{\warpHTMLonly}[1]{\ifbool{warpingHTML}{#1}{}} \RequirePackage{comment} -\ifbool{warpingHTML}{ -\def\DefaultCutFileName{\def\CommentCutFile{comment_html.cut}} -}{} +\def\LWR@includecomment + #1#2{\message{Lwarp: Including comment '#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.% + }% + }{\relax} + \csdef{LWR@#1commentused}{} + \message{Including '#1' comment.}% + \def\CommentCutFile{comment_#2.cut} + \SetUpCutFile + \ProcessComment{#1} + }% + \CommentEndDef{#1} +} -\ifbool{warpingprint}{ -\def\DefaultCutFileName{\def\CommentCutFile{comment_print.cut}} -}{} +\def\LWR@excludecomment + #1#2{\message{Lwarp: Excluding comment '#1'}% + \csarg\def{#1}{ + \endgroup + \message{Excluding '#1' comment.}% + \begingroup + \def\CommentCutFile{comment_#2.cut} + \def\ProcessCutFile{}% + \def\ThisComment####1{}% + \ProcessComment{#1} + }% + \csarg\def{After#1Comment}{\CloseAndInputCutFile \endgroup} + \CommentEndDef{#1}} -\includecomment{warpall} +\LWR@includecomment{warpall}{all} \ifbool{warpingHTML} - {\includecomment{warpHTML}} - {\excludecomment{warpHTML}}% + {\LWR@includecomment{warpHTML}{html}} + {\LWR@excludecomment{warpHTML}{html}} \ifbool{warpingprint} - {\includecomment{warpprint}} - {\excludecomment{warpprint}} + {\LWR@includecomment{warpprint}{print}} + {\LWR@excludecomment{warpprint}{print}} \begin{warpprint} -\excludecomment{warpMathJax} +\LWR@excludecomment{warpMathJax}{mathjax} \end{warpprint} \begin{warpHTML} \ifbool{mathjax} - {\includecomment{warpMathJax}} - {\excludecomment{warpMathJax}} + {\LWR@includecomment{warpMathJax}{mathjax}} + {\LWR@excludecomment{warpMathJax}{mathjax}} \end{warpHTML} \ifbool{LWR@creatinglwarpmk} - {\includecomment{LWR@createlwarpmk}} - {\excludecomment{LWR@createlwarpmk}} + {\LWR@includecomment{LWRcreatelwarpmk}{lwarpmk}} + {\LWR@excludecomment{LWRcreatelwarpmk}{lwarpmk}} \begin{warpHTML} @@ -1059,8 +1252,7 @@ tracking=false, kerning=false, spacing=false} - -\DisableLigatures[f,q,t,T,Q]{encoding = *,family = *} +\DisableLigatures{encoding = *,family = tt*} \fi \end{warpHTML} @@ -1219,7 +1411,6 @@ \end{warpprint} \begin{warpall} - \LetLtxMacro\LWR@origRequirePackage\RequirePackage \LetLtxMacro\LWR@origRequirePackageWithOptions\RequirePackageWithOptions @@ -1238,6 +1429,7 @@ \StrBetween[#3,\numexpr#3+1]{#1#2#1}{#1}{#1}% } + \newcommand*{\LWR@checkloadfilename}[1]{% \LWR@checkloadnever{#1}{ae}{cm-super, lmodern} \LWR@checkloadnever{#1}{aecc}{cm-super, lmodern} @@ -1245,23 +1437,21 @@ \LWR@checkloadnever{#1}{alg}{algorithm2e, algorithmicx} \LWR@checkloadnever{#1}{algorithmic}{algorithm2e, algorithmicx} \LWR@checkloadnever{#1}{bitfield}{bytefield} -\LWR@checkloadnever{#1}{boxedminipage}{boxedminipage2e} \LWR@checkloadnever{#1}{caption2}{caption} \LWR@checkloadnever{#1}{ccaption}{caption}% might be preloaded by memoir \LWR@checkloadnever{#1}{colortab}{colortbl} +\LWR@checkloadnever{#1}{csvtools}{datatool} \LWR@checkloadnever{#1}{doublespace}{setspace} -\LWR@checkloadnever{#1}{epsf}{graphicx} \LWR@checkloadnever{#1}{fancyheadings}{fancyhdr} \LWR@checkloadnever{#1}{fncylab}{cleveref} \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} \LWR@checkloadnever{#1}{picins}{floatflt, wrapfig} \LWR@checkloadnever{#1}{rplain}{fancyhdr} -\LWR@checkloadnever{#1}{shadethm}{mdframed} \LWR@checkloadnever{#1}{si}{siunitx} \LWR@checkloadnever{#1}{sistyle}{siunitx} \LWR@checkloadnever{#1}{slashbox}{diagbox} @@ -1278,6 +1468,7 @@ \LWR@checkloadbefore{#1}{nfssext-cfr} \LWR@checkloadbefore{#1}{fontaxes} \LWR@checkloadbefore{#1}{kotex} +\LWR@checkloadbefore{#1}{kpfonts}% textcomp option clash \LWR@checkloadbefore{#1}{luatexja} \LWR@checkloadbefore{#1}{luatexja-fontspec} \LWR@checkloadbefore{#1}{luatexko} @@ -1360,6 +1551,8 @@ }% } \LetLtxMacro\usepackage\RequirePackage +\@onlypreamble\RequirePackage +\@onlypreamble\usepackage \end{warpall} @@ -1367,8 +1560,9 @@ \NewDocumentCommand{\LWR@ProvidesPackagePass}{m o}{ \PackageInfo{lwarp}{% - Using package `#1' and adding lwarp modifications,\MessageBreak - including options,}% + Using package `#1',\MessageBreak + and adding lwarp modifications, including options,\MessageBreak% + }% \IfValueTF{#2}% {\ProvidesPackage{lwarp-#1}[#2]}% {\ProvidesPackage{lwarp-#1}}% @@ -1419,14 +1613,6 @@ \end{warpHTML} -\begin{warpHTML} - -\LWR@origRequirePackage{caption} -\AtBeginDocument{\RequirePackage{lwarp-caption}}% - -\end{warpHTML} - - \begin{warpall} @@ -1447,7 +1633,7 @@ \immediate\openout\LWR@quickfile #1_html_inc.tex% lwarp \immediate\write\LWR@quickfile{\string\input{#1.tex}}% lwarp \immediate\closeout\LWR@quickfile% lwarp -\LWR@orignewpage% changed from clearpage +\LWR@maybe@orignewpage% changed from clearpage \if@filesw \immediate\write\@mainaux{\string\@input{#1_html_inc.aux}}% changed \fi @@ -1465,7 +1651,7 @@ \immediate\write\@partaux{\relax}% \fi \@input@{#1_html_inc.tex}% changed - \LWR@orignewpage% changed from clearpage + \LWR@maybe@orignewpage% changed from clearpage \@writeckpt{#1}% \if@filesw \immediate\closeout\@partaux @@ -1482,27 +1668,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} @@ -1537,7 +1723,26 @@ \begin{warpHTML} \newcommand*{\LWR@formatting}{HTML} +\newcommand*{\LWR@formatted@checkname}[1]{% + \ifcsundef{LWR@HTML@#1}{% + \PackageError{lwarp} + {% + \protect\LWR@HTML@#1 is not defined% + } + {Perhaps it is misspelled.} + }{\relax}% +} +\newcommand*{\LWR@formatted@checkendname}[1]{% + \ifcsundef{endLWR@HTML@#1}{% + \PackageError{lwarp} + {% + \protect\endLWR@HTML@#1 is not defined% + } + {Perhaps it is misspelled.} + }{\relax}% +} \newcommand*{\LWR@formatted}[1]{% + \LWR@formatted@checkname{#1}% \ifcsundef{LWR@print@#1}{% \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname% \csname#1\endcsname% @@ -1553,6 +1758,7 @@ }% } \newcommand*{\LWR@expandableformatted}[1]{% + \LWR@formatted@checkname{#1}% \ifcsundef{LWR@print@#1}{% \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname% \csname#1\endcsname% @@ -1568,6 +1774,8 @@ }% } \newcommand*{\LWR@formattedenv}[1]{% + \LWR@formatted@checkname{#1}% + \LWR@formatted@checkendname{#1}% \ifcsundef{LWR@print@#1}{% \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname% \csname#1\endcsname% @@ -1582,6 +1790,8 @@ }% } \newcommand*{\LWR@expandableformattedenv}[1]{% + \LWR@formatted@checkname{#1}% + \LWR@formatted@checkendname{#1}% \ifcsundef{LWR@print@#1}{% \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname% \csname#1\endcsname% @@ -1639,11 +1849,11 @@ \renewcommand*{\LWR@tagsubsubsectionend}{/h5} \renewcommand*{\LWR@tagparagraph}{h6} \renewcommand*{\LWR@tagparagraphend}{/h6} -\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"} +\renewcommand*{\LWR@tagsubparagraph}{span class=\textquotedbl{}subparagraph\textquotedbl} \renewcommand*{\LWR@tagsubparagraphend}{/span} }% WPTitleHeading {% not WPTitleHeading, part and section starting at h1 -\renewcommand*{\LWR@tagtitle}{div class="title"} +\renewcommand*{\LWR@tagtitle}{div class=\textquotedbl{}title\textquotedbl} \renewcommand*{\LWR@tagtitleend}{/div} \renewcommand*{\LWR@tagpart}{h1} \renewcommand*{\LWR@tagpartend}{/h1} @@ -1662,7 +1872,7 @@ {% chapter defined \ifbool{WPTitleHeading}{} {% not WPTitleHeading, part and chapter starting at h1 -\renewcommand*{\LWR@tagtitle}{div class="title"} +\renewcommand*{\LWR@tagtitle}{div class=\textquotedbl{}title\textquotedbl} \renewcommand*{\LWR@tagtitleend}{/div} \renewcommand*{\LWR@tagpart}{h1} \renewcommand*{\LWR@tagpartend}{/h1} @@ -1676,7 +1886,7 @@ \renewcommand*{\LWR@tagsubsubsectionend}{/h5} \renewcommand*{\LWR@tagparagraph}{h6} \renewcommand*{\LWR@tagparagraphend}{/h6} -\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"} +\renewcommand*{\LWR@tagsubparagraph}{span class=\textquotedbl{}subparagraph\textquotedbl} \renewcommand*{\LWR@tagsubparagraphend}{/span} }% not WPTitleHeading }% chapter defined @@ -1709,8 +1919,16 @@ \let\LWR@origbigskip\bigskip \let\LWR@origtextellipsis\textellipsis -\let\LWR@orig@textquotedbl\textquotedbl +\let\LWR@origvdots\vdots +\LetLtxMacro\LWR@orig@@textquotedbl\textquotedbl +\LetLtxMacro\LWR@orig@textquotedbl\LWR@orig@@textquotedbl +\AtEndPreamble{ +\@ifpackageloaded{libertinus-otf}{ + \renewcommand{\LWR@orig@textquotedbl}{\LWR@orig@@textquotedbl\kern-.15em} + \LetLtxMacro\textquotedbl\LWR@orig@textquotedbl +}{} +} \LetLtxMacro\LWR@origttfamily\ttfamily \LetLtxMacro\LWR@origem\em @@ -1721,13 +1939,6 @@ \let\LWR@origsp\sp \let\LWR@origsb\sb -\LetLtxMacro\LWR@origtextsuperscript\textsuperscript -\LetLtxMacro\LWR@orig@textsuperscript\@textsuperscript - -\AtBeginDocument{ -\LetLtxMacro\LWR@origtextsubscript\textsubscript -\LetLtxMacro\LWR@orig@textsubscript\@textsubscript -} \LetLtxMacro\LWR@origunderline\underline \let\LWR@orignewpage\newpage @@ -1770,39 +1981,57 @@ \begin{warpHTML} \AtBeginDocument{ -\LetLtxMacro\LWR@origt\t +\LetLtxMacro\LWR@origtie\t \ifPDFTeX% pdflatex or dvi latex -\LetLtxMacro\LWR@origequalaccent\= +\LetLtxMacro\LWR@origgraveaccent\` +\LetLtxMacro\LWR@origacuteaccent\' +\LetLtxMacro\LWR@origcircumflexaccent\^ +\LetLtxMacro\LWR@origtildeaccent\~ +\LetLtxMacro\LWR@origmacronaccent\= +\LetLtxMacro\LWR@origbreve\u \LetLtxMacro\LWR@origdotaccent\. -\LetLtxMacro\LWR@origu\u -\LetLtxMacro\LWR@origv\v -\LetLtxMacro\LWR@origc\c -\LetLtxMacro\LWR@origd\d -\LetLtxMacro\LWR@origb\b -\renewcommand*{\=}[1]{#1\HTMLunicode{0305}} -\renewcommand*{\.}[1]{#1\HTMLunicode{0307}} +\LetLtxMacro\LWR@origdiaeresisaccent\" +\LetLtxMacro\LWR@origdoubleacuteaccent\H +\LetLtxMacro\LWR@origcaronaccent\v +\LetLtxMacro\LWR@origdotbelowaccent\d +\LetLtxMacro\LWR@origcedillaaccent\c +\LetLtxMacro\LWR@origmacronbelowaccent\b +\renewcommand*{\`}[1]{#1\HTMLunicode{0300}} +\renewcommand*{\'}[1]{#1\HTMLunicode{0301}} +\renewcommand*{\^}[1]{#1\HTMLunicode{0302}} +\renewcommand*{\~}[1]{#1\HTMLunicode{0303}} +\renewcommand*{\=}[1]{#1\HTMLunicode{0304}} \renewcommand*{\u}[1]{#1\HTMLunicode{0306}} +\renewcommand*{\.}[1]{#1\HTMLunicode{0307}} +\renewcommand*{\"}[1]{#1\HTMLunicode{0308}} +\renewcommand*{\H}[1]{#1\HTMLunicode{030B}} \renewcommand*{\v}[1]{#1\HTMLunicode{030C}} -\renewcommand*{\c}[1]{#1\HTMLunicode{0327}} \renewcommand*{\d}[1]{#1\HTMLunicode{0323}} +\renewcommand*{\c}[1]{#1\HTMLunicode{0327}} \renewcommand*{\b}[1]{#1\HTMLunicode{0331}} \fi \def\LWR@t#1#2{#1\HTMLunicode{0361}#2} \renewcommand*{\t}[1]{\LWR@t#1} \ifPDFTeX% pdflatex or dvi latex \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@origgraveaccent% + \LetLtxMacro\'\LWR@origacuteaccent% + \LetLtxMacro\^\LWR@origcircumflexaccent% + \LetLtxMacro\~\LWR@origtildeaccent% + \LetLtxMacro\=\LWR@origmacronaccent% + \LetLtxMacro\u\LWR@origbreve% + \LetLtxMacro\.\LWR@origdotaccent% + \LetLtxMacro\"\LWR@origdiaeresisaccent% + \LetLtxMacro\H\LWR@origdoubleacuteaccent% + \LetLtxMacro\v\LWR@origcaronaccent% + \LetLtxMacro\t\LWR@origtie% + \LetLtxMacro\d\LWR@origdotbelowaccent% + \LetLtxMacro\c\LWR@origcedillaaccent% + \LetLtxMacro\b\LWR@origmacronbelowaccent% }% \else% XeLaTeX, LuaLaTeX: \newcommand*{\LWR@restoreorigaccents}{% -\LetLtxMacro\t\LWR@origt% + \LetLtxMacro\t\LWR@origtie% }% \fi% }% AtBeginDocument @@ -1811,7 +2040,7 @@ -\excludecomment{LWRwriteconf} +\LWR@excludecomment{LWRwriteconf}{writeconf} \begin{warpprint} \fullexpandarg% \IfSubStr*{\jobname}{-pstool} @@ -1823,7 +2052,7 @@ } { \PackageInfo{lwarp}{Generating lwarp configuration files,}% - \includecomment{LWRwriteconf} + \LWR@includecomment{LWRwriteconf}{writeconf} } \end{warpprint} @@ -1856,9 +2085,12 @@ #1 \jobname#2% } \newcommand*{\LWR@unknownengine}{% - \PackageError{lwarp} - {Unknown LaTeX engine.} - {Lwarp only knows about pdflatex, dvi latex, xelatex, lualatex, and upLateX.} + \PackageError{lwarp}% + {Unknown LaTeX engine}% + {% + Lwarp only knows about pdflatex, DVI latex, + xelatex, lualatex, and upLateX.% + }% } \newcommand*{\LWR@latexmkvar}[2]{% -e @@ -1869,7 +2101,7 @@ \newcommand*{\LWR@latexmkcmd}[1]{% latexmk \space \LWR@shellescapecmd \space #1 \space -recorder \space - \LWR@latexmkvar{makeindex}{\LWR@LatexmkIndexCmd} + \LWR@latexmkvar{makeindex}{\LWR@LatexmkIndexCmd}% } \newcommand*{\LWR@latexmkdvipdfm}[1]{% -pdfdvi \space @@ -2037,7 +2269,7 @@ \begin{filecontents*}[overwrite]{lwarp.css} /* CSS stylesheet for the LaTeX Lwarp package - Copyright 2016-2020 Brian Dunn — BD Tech Concepts LLC + Copyright 2016-2021 Brian Dunn — BD Tech Concepts LLC */ /* a fix for older browsers: */ @@ -2093,10 +2325,11 @@ span.sectionnumber { margin-right: 0em } span.indexitem {margin-left: 0em} span.indexsubitem {margin-left: 2em} span.indexsubsubitem {margin-left: 4em} +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; @@ -2111,10 +2344,6 @@ span.textit, div.textit { font-style: italic; } span.textmd, div.textmd { font-weight: normal; } -span.texteb { font-weight: bolder; } - -span.textlg { font-weight: lighter; } - span.textup, div.textup { font-style: normal; font-variant: normal; @@ -2143,6 +2372,50 @@ span.textsf, div.textsf { Geneva, Verdana, sans-serif ; } +/* nfssext-cfr lining figures */ +span.textln, div.textln { + font-variant-numeric: lining-nums ; +} + +/* nfssext-cfr proportional figures */ +span.textp, div.textp { + font-variant-numeric: proportional-nums ; +} + +/* nfssext-cfr tabular figures */ +span.textt, div.textt { + font-variant-numeric: tabular-nums ; +} + +/* nfssext-cfr font weights */ +span.textdb, div.textdb { + font-weight: 500 ; +} + +span.textsb, div.textsb { + font-weight: 600 ; +} + +span.texteb, div.texteb { + font-weight: 800 ; +} + +span.textub, div.textub { + font-weight: 900 ; +} + +span.textlg, div.textlg { + font-weight: 300 ; +} + +span.textel, div.textel { + font-weight: 200 ; +} + +span.textul, div.textul { + font-weight: 100 ; +} + span.textcircled { border: 1px solid black ; border-radius: 1ex ; } span.underline { @@ -2155,6 +2428,8 @@ span.overline { text-decoration-skip: auto ; } +div.hrule { border-top: 1px solid silver } + /* for vertical text: */ div.verticalrl { writing-mode: vertical-rl } div.horizontaltb { writing-mode: horizontal-tb } @@ -2183,16 +2458,16 @@ div.diagboxW { .supsubscript sub { position: relative; display: block; - font-size: .5em; + font-size: .7em; line-height: 1; } .supsubscript sup { - top: .5em; + top: .3em; } .supsubscript sub { - top: .5em; + top: .3em; } div.attribution p { @@ -2270,7 +2545,7 @@ div.epigraph p, div.dictum p { padding: .5ex ; margin: 0ex ;} div.epigraphsource p, div.dictumauthor p { padding: .5ex 0ex 0ex 0ex ; margin: 0ex ;} div.dictumauthor { font-style:italic } -/* copyrightbox package */ +/* copyrightbox package: */ div.copyrightbox { margin: .5ex .5em } div.copyrightbox p {margin: 0px .5em ; padding: 0px} div.copyrightboxnote {text-align: left ; font-size: 60%} @@ -2331,6 +2606,12 @@ span.capsspacing { span.highlight { background: #F8E800 ; } +/* keystroke package: */ +span.keystroke { + border-style: outset ; + padding: 0pt .5em 0pt .5em ; +} + html body { margin: 0 ; line-height: 1.2; @@ -2474,7 +2755,7 @@ div.bodywithoutsidetoc div.bodycontainer { } section.textbody div.footnotes{ - margin: 3ex 2em 0ex 2em ; + margin: 3ex 2em .5ex 2em ; border-bottom: 2px solid silver ; } @@ -2654,6 +2935,7 @@ div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;} .minipage, .fminipage, .fcolorminipage { /* display: inline-block ; */ /* Mini pages which follow each other will be tiled. */ + text-align:left; margin: .25em .25em .25em .25em; padding: .25em .25em .25em .25em; display: inline-flex; @@ -2715,20 +2997,33 @@ div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;} display: inline-block ; } -.mdframed { +/* mdframed, tcolorbox, shadebox packages */ +.mdframed, .tcolorbox, .shadebox { padding: 0ex ; margin: 2ex 0em 2ex 0em ; + border: 1px solid black ; +} + +.tcolorbox { + border-radius: 10pt ; + margin: 2ex 1em 2ex 1em ; } -.mdframed p { padding: 0ex .5em 0ex .5em ; } +.mdframed p, .tcolorbox p { padding: 0ex .5em 0ex .5em ; } -.mdframed dl { padding: 1ex .5em 0ex .5em ; } +.mdframed dl, .tcolorbox dl { padding: 1ex .5em 0ex .5em ; } -.mdframedtitle { +.mdframedtitle, .tcolorboxtitle { padding: .5ex 0pt 0pt 0pt ; border-radius: 10pt 10pt 0pt 0pt ; display: block ; margin-bottom: 1ex ; + border-bottom: 1px solid silver ; +} + +.tcolorboxsubtitle .tcolorbox { + margin: 2ex 0em 2ex 0em ; + border-radius: 0pt ; } .mdframedsubtitle { @@ -2828,7 +3123,10 @@ dl dd:after { content: "" ; display: block ; clear: both } dl dd p { margin-top: 0em; } -dd ul, dd ol, dd dl { clear: both ; padding-top: 1ex } +dd ul, dd ol, dd dl { + clear: both ; +/* padding-top: 1ex ; */ +} nav { font-family: "URW Classico", Optima, "Linux Biolinum O", @@ -3125,6 +3423,26 @@ span.verbatim { "Courier New", monospace; } +div.titlehead +{ + text-align: left ; + font-style: normal ; + font-weight: normal ; + font-style: normal ; + font-size: .8em ; + margin: 1ex 0em 1ex 0em ; +} + +div.subject +{ + text-align: center ; + font-style: normal ; + font-weight: bold ; + font-style: normal ; + font-size: .8em ; + margin: 1ex 0em 1ex 0em ; +} + div.published { text-align: center ; @@ -3215,6 +3533,7 @@ footer { text-align:left ; } +/* for \LinkHome, \LinkPrevious, and \LinkNext: */ a.linkhome { font-weight:bold ; font-size: 1em ;} div.lateximagesource { padding: 0px ; margin: 0px ; display: none; } @@ -3326,8 +3645,13 @@ nav .authorartist{ display:inline; } /* Native LaTeX theorems: */ -.theoremcontents { font-style: italic; margin-top: 3ex ; margin-bottom: 3ex ; } -.theoremlabel { font-style: normal; font-weight: bold ; margin-right: .5em ; } +.theoremcontents { + font-style: italic; margin-top: 3ex ; margin-bottom: 3ex ; +} + +.theoremlabel { + font-style: normal; font-weight: bold ; margin-right: .5em ; +} /* theorem, amsthm, and ntheorem packages */ @@ -3396,6 +3720,33 @@ div.amsthmproof span.amsthmnoteremark {} +/* thmbox */ + +.thmbox { + font-style: italic; margin-top: 3ex ; margin-bottom: 3ex ; + border: 1px solid gray ; + padding: 1ex ; +} + +.thmboxtitle { + font-style: normal; font-weight: bold ; margin-right: .5em ; + border-bottom: 1px solid gray ; +} + +span.thmboxproofname, span.thmboxexamplename { + font-weight: bold ; +} + +div.thmboxproof, div.thmboxexample { + font-size: 0.85em ; + margin: 2ex ; +} + +div.thmboxleftbar { + border-left: 2px solid black ; + padding-left: 1em ; +} + /* For the backnaur package: */ div.backnaur { display: block ; @@ -3440,6 +3791,9 @@ span.nolbreaks { white-space: nowrap ; } /* For CSS LaTeX and related logos: Based on spacing demonstrated by the metafont package. + +The subscripts are shrunk instead of lowered below the baseline, +to avoid browser rendering errors with the line height in lists, etc. */ .latexlogofont { @@ -3451,7 +3805,6 @@ Based on spacing demonstrated by the metafont package. .latexlogo { font-family: "Linux Libertine O", "Nimbus Roman No 9 L", "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; - font-size: 1.1em; } .latexlogosup { @@ -3465,10 +3818,11 @@ Based on spacing demonstrated by the metafont package. .latexlogosub { text-transform: uppercase; - vertical-align: -0.27ex; +/* vertical-align: -0.27ex; */ margin-left: -0.08em; margin-right: -0.07em; - font-size: 1em; +/* font-size: 1em; */ + font-size: .7em ; } .latexlogotwoe { @@ -3478,24 +3832,25 @@ Based on spacing demonstrated by the metafont package. .latexlogotwoesub { font-style:italic ; - vertical-align: -0.27ex; +/* vertical-align: -0.27ex; */ margin-left: -0.11em; margin-right: -0.1em; - font-size: 1em; +/* font-size: 1em; */ + font-size: .7em ; } .xelatexlogo { font-family: "Linux Libertine O", "Nimbus Roman No 9 L", "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; letter-spacing: .03em ; - font-size: 1.1em; } .xelatexlogosub { - vertical-align: -0.27ex; +/* vertical-align: -0.27ex; */ margin-left: -0.0667em; margin-right: -.05em; - font-size: 1em; +/* font-size: 1em; */ + font-size: .7em ; letter-spacing: .03em ; } @@ -3532,6 +3887,7 @@ span.sidetocthetitle { display: none } box-shadow: none ; } span.sidetocthetitle { display: inline } + nav.topnavigation { display:block } nav.botnavigation { display:block } div.bodycontainer { width: 100% } .marginpar { @@ -4090,114 +4446,218 @@ page_compositor "." \end{LWRwriteconf} + \begin{LWRwriteconf} \begin{filecontents*}[overwrite]{lwarp_mathjax.txt} -<!-- https://groups.google.com/forum/#!topic/ - mathjax-users/jUtewUcE2bY --> -<script type="text/x-mathjax-config"> -MathJax.Hub.Register.StartupHook("TeX AMSmath Ready",function () { - var seteqsectionDefault = {name: "", num: 0}; - var seteqsections = {}, seteqsection = seteqsectionDefault; - var TEX = MathJax.InputJax.TeX, PARSE = TEX.Parse; - var AMS = MathJax.Extension["TeX/AMSmath"]; - TEX.Definitions.Add({ - macros: { - seteqsection: "mySection", - seteqnumber: "mySetEqNumber" - } - }); - - PARSE.Augment({ - mySection: function (name) { - seteqsection.num = AMS.number; - var n = this.GetArgument(name); - if (n === "") { - seteqsection = seteqsectionDefault; - } else { - if (!seteqsections["_"+n]) - seteqsections["_"+n] = {name:n, num:0}; - seteqsection = seteqsections["_"+n]; +<script> +// Lwarp MathJax emulation code +// +// Based on code by Davide P. Cervone. +// Equation numbering: https://github.com/mathjax/MathJax/issues/2427 +// Starred and ifnextchar macros: https://github.com/mathjax/MathJax/issues/2428 +// \left, \right delimiters: https://github.com/mathjax/MathJax/issues/2535 +// +// Modified by Brian Dunn to adjust equation numbering and add subequations. +// +// LaTeX can use \seteqnumber{subequations?}{section}{number} before each equation. +// subequations? is 0 usually, 1 if inside subequations. +// section is a string printed as-is, or empty. +// number is auto-incremented by MathJax between equations. +// +MathJax = { + subequations: "0", + section: "", + loader: { + load: ['[tex]/tagformat', '[tex]/textmacros'], + }, + startup: { + ready() { + // These would be replaced by import commands if you wanted to make + // a proper extension. + const Configuration = MathJax._.input.tex.Configuration.Configuration; + const CommandMap = MathJax._.input.tex.SymbolMap.CommandMap; + const Macro = MathJax._.input.tex.Symbol.Macro; + const TexError = MathJax._.input.tex.TexError.default; + const ParseUtil = MathJax._.input.tex.ParseUtil.default; + const expandable = MathJax._.util.Options.expandable; + + // Insert the replacement string into the TeX string, and check + // that there haven't been too many maxro substitutions (prevents + // infinite loops). + const useArgument = (parser, text) => { + parser.string = ParseUtil.addArgs(parser, text, parser.string.slice(parser.i)); + parser.i = 0; + if (++parser.macroCount > parser.configuration.options.maxMacros) { + throw new TexError('MaxMacroSub1', + 'MathJax maximum macro substitution count exceeded; ' + + 'is there a recursive macro call?'); } - AMS.number = seteqsection.num; - }, - mySetEqNumber: function (name) { - var n = this.GetArgument(name); - if (!n || !n.match(/^ *[0-9]+ *$/)) - n = ""; - else - n = parseInt(n)-1; - <!-- $ syntax highlighting --> - if (n === "" || n < 1) - TEX.Error - ("Argument to "+name+" should be a positive integer"); - AMS.number = n; - } - }); - MathJax.Hub.Config({ - TeX: { - equationNumbers: { - formatTag: function (n) { - <!-- if not numeric, don't include the chapter --> - if (!n.match(/^ *[0-9]+ *$/ )) - <!-- $ syntax highlighting --> - return "("+(n).replace(/^\./,"")+")" ; - else - return "("+(seteqsection.name+"."+n).replace(/^\./,"")+")" ; - }, - formatID: function (n) { - n = (seteqsection.name+'.'+n).replace - (/[:"'<>&]/g,"").replace(/^\./,""); - return 'mjx-eqn-' + n; - } + } + + // Create the command map for: + // \ifstar, \ifnextchar, \ifblank, \ifstrequal, \seteqnumber + new CommandMap('Lwarp-macros', { + ifstar: 'IfstarFunction', + ifnextchar: 'IfnextcharFunction', + ifblank: 'IfblankFunction', + ifstrequal: 'IfstrequalFunction', + seteqnumber: 'SeteqnumberFunction' + }, { + // This function implements an ifstar macro. + IfstarFunction(parser, name) { + const resultstar = parser.GetArgument(name); + const resultnostar = parser.GetArgument(name); + const star = parser.GetStar(); // true if there is a * + useArgument(parser, star ? resultstar : resultnostar); + }, + + // This function implements an ifnextchar macro. + IfnextcharFunction(parser, name) { + let whichchar = parser.GetArgument(name); + if (whichchar.match(/^(?:0x[0-9A-F]+|[0-9]+)$/i)) { + // $ syntax highlighting + whichchar = String.fromCodePoint(parseInt(whichchar)); + } + const resultnextchar = parser.GetArgument(name); + const resultnotnextchar = parser.GetArgument(name); + const gotchar = (parser.GetNext() === whichchar); + useArgument(parser, gotchar ? resultnextchar : resultnotnextchar); + }, + + // This function implements an ifblank macro. + IfblankFunction(parser, name) { + const blankarg = parser.GetArgument(name); + const resultblank = parser.GetArgument(name); + const resultnotblank = parser.GetArgument(name); + const isblank = (blankarg.trim() == ""); + useArgument(parser, isblank ? resultblank : resultnotblank); + }, + + // This function implements an ifstrequal macro. + IfstrequalFunction(parser, name) { + const strequalfirst = parser.GetArgument(name); + const strequalsecond = parser.GetArgument(name); + const resultequal = parser.GetArgument(name); + const resultnotequal = parser.GetArgument(name); + const isequal = (strequalfirst == strequalsecond); + useArgument(parser, isequal ? resultequal : resultnotequal); + }, + + // This function modifies the equation numbers. + SeteqnumberFunction(parser, name) { + // Get the macro parameters + const star = parser.GetStar(); // true if there is a * + const optBrackets = parser.GetBrackets(name); // contents of optional brackets + const newsubequations = parser.GetArgument(name); // the subequations argument + const neweqsection = parser.GetArgument(name); // the eq section argument + const neweqnumber = parser.GetArgument(name); // the eq number argument + MathJax.config.subequations=newsubequations ; // a string with boolean meaning + MathJax.config.section=neweqsection ; // a string with numeric meaning + parser.tags.counter = parser.tags.allCounter = neweqnumber ; } - } - }); -}); -</script> -<!-- http://docs.mathjax.org/en/latest/options/ThirdParty.html --> -<script type="text/x-mathjax-config"> - MathJax.Ajax.config.path["Contrib"] = - "https://cdn.mathjax.org/mathjax/contrib"; -</script> + }); -<script type="text/x-mathjax-config"> -MathJax.Hub.Config({ - TeX: { - extensions: ["autoload-all.js"] , - equationNumbers: { - autoNumber: "AMS" - } - } -}); -</script> + // Create the Lwarp-macros package + Configuration.create('Lwarp-macros', { + handler: {macro: ['Lwarp-macros']} + }); -<!-- Alternative CDN provider: --> -<script type="text/javascript" async -src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS_HTML-full"> -</script> + MathJax.startup.defaultReady(); -<!-- No longer supported after April 30, 2017: --> -<!-- -<script - src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full"> + // For forward references: + MathJax.startup.input[0].preFilters.add(({math}) => { + if (math.inputData.recompile){ + MathJax.config.subequations = math.inputData.recompile.subequations; + MathJax.config.section = math.inputData.recompile.section; + } + }); + MathJax.startup.input[0].postFilters.add(({math}) => { + if (math.inputData.recompile){ + math.inputData.recompile.subequations = MathJax.config.subequations; + math.inputData.recompile.section = MathJax.config.section; + } + }); + + // For \left, \right with unicode-math: + const {DelimiterMap} = MathJax._.input.tex.SymbolMap; + const {Symbol} = MathJax._.input.tex.Symbol; + const {MapHandler} = MathJax._.input.tex.MapHandler; + const delimiter = MapHandler.getMap('delimiter'); + delimiter.add('\\lBrack', new Symbol('\\lBrack', '\u27E6')); + delimiter.add('\\rBrack', new Symbol('\\rBrack', '\u27E7')); + delimiter.add('\\lAngle', new Symbol('\\lAngle', '\u27EA')); + delimiter.add('\\rAngle', new Symbol('\\rAngle', '\u27EB')); + delimiter.add('\\lbrbrak', new Symbol('\\lbrbrak', '\u2772')); + delimiter.add('\\rbrbrak', new Symbol('\\rbrbrak', '\u2773')); + delimiter.add('\\lbag', new Symbol('\\lbag', '\u27C5')); + delimiter.add('\\rbag', new Symbol('\\rbag', '\u27C6')); + delimiter.add('\\llparenthesis', new Symbol('\\llparenthesis', '\u2987')); + delimiter.add('\\rrparenthesis', new Symbol('\\rrparenthesis', '\u2988')); + delimiter.add('\\llangle', new Symbol('\\llangle', '\u2989')); + delimiter.add('\\rrangle', new Symbol('\\rrangle', '\u298A')); + delimiter.add('\\Lbrbrak', new Symbol('\\Lbrbrak', '\u27EC')); + delimiter.add('\\Rbrbrak', new Symbol('\\Rbrbrak', '\u27ED')); + delimiter.add('\\lBrace', new Symbol('\\lBrace', '\u2983')); + delimiter.add('\\rBrace', new Symbol('\\rBrace', '\u2984')); + delimiter.add('\\lParen', new Symbol('\\lParen', '\u2985')); + delimiter.add('\\rParen', new Symbol('\\rParen', '\u2986')); + delimiter.add('\\lbrackubar', new Symbol('\\lbrackubar', '\u298B')); + delimiter.add('\\rbrackubar', new Symbol('\\rbrackubar', '\u298C')); + delimiter.add('\\lbrackultick', new Symbol('\\lbrackultick', '\u298D')); + delimiter.add('\\rbracklrtick', new Symbol('\\rbracklrtick', '\u298E')); + delimiter.add('\\lbracklltick', new Symbol('\\lbracklltick', '\u298F')); + delimiter.add('\\rbrackurtick', new Symbol('\\rbrackurtick', '\u2990')); + delimiter.add('\\langledot', new Symbol('\\langledot', '\u2991')); + delimiter.add('\\rangledot', new Symbol('\\rangledot', '\u2992')); + delimiter.add('\\lparenless', new Symbol('\\lparenless', '\u2993')); + delimiter.add('\\rparengtr', new Symbol('\\rparengtr', '\u2994')); + delimiter.add('\\Lparengtr', new Symbol('\\Lparengtr', '\u2995')); + delimiter.add('\\Rparenless', new Symbol('\\Rparenless', '\u2996')); + delimiter.add('\\lblkbrbrak', new Symbol('\\lblkbrbrak', '\u2997')); + delimiter.add('\\rblkbrbrak', new Symbol('\\rblkbrbrak', '\u2998')); + delimiter.add('\\lvzigzag', new Symbol('\\lvzigzag', '\u29D8')); + delimiter.add('\\rvzigzag', new Symbol('\\rvzigzag', '\u29D9')); + delimiter.add('\\Lvzigzag', new Symbol('\\Lvzigzag', '\u29DA')); + delimiter.add('\\Rvzigzag', new Symbol('\\Rvzigzag', '\u29DB')); + delimiter.add('\\lcurvyangle', new Symbol('\\lcurvyangle', '\u29FC')); + delimiter.add('\\rcurvyangle', new Symbol('\\rcurvyangle', '\u29FD')); + delimiter.add('\\Vvert', new Symbol('\\Vvert', '\u2980')); + } // ready + }, // startup + + tex: { + packages: {'[+]': ['tagformat', 'Lwarp-macros', 'textmacros']}, + tags: "ams", + tagformat: { + number: function (n) { + if(MathJax.config.subequations==0) + return(MathJax.config.section + n); + else + return(MathJax.config.section + String.fromCharCode(96+n)); + }, + }, + } +} </script> ---> +<script + id="MathJax-script" + src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js" +></script> \end{filecontents*} \end{LWRwriteconf} - -\begin{LWR@createlwarpmk} +\begin{LWRcreatelwarpmk} \begin{filecontents*}[overwrite]{lwarpmk.lua} #!/usr/bin/env texlua --- Copyright 2016-2020 Brian Dunn +-- Copyright 2016-2021 Brian Dunn -printversion = "v0.83" +printversion = "v0.895" requiredconfversion = "2" -- also at *lwarpmk.conf function printhelp () @@ -4227,10 +4687,11 @@ 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. +lwarpmk -v: Print the version number. lwarpmk -h: Print this help message. lwarpmk --help: Print this help message. @@ -4574,12 +5035,13 @@ function removeaux () -- Remove auxiliary files: -- All .aux files are removed since there may be many bbl*.aux files. -- Also removes sourcename_html.pdf, sourcename_html.html, --- and sourcename_html.sidetoc. +-- and sourcename_html.sidetoc, plus comment_*.cut. -- 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 " .. @@ -4588,7 +5050,8 @@ os.execute ( rmname .. " *.aux " .. sourcename .. "_html.pdf " .. sourcename .. "_html.html " .. sourcename .. "_html.sidetoc " .. - " *_html_inc.* " + " *_html_inc.* " .. + " comment_*.cut" ) end @@ -5085,6 +5548,12 @@ print ("lwarpmk: Done.") elseif (arg[1] == nil) then printhelp () +-- lwarpmk -v: + +elseif (arg[1] == "-v" ) then +-- The version number has already been printed +-- by the lwarpmk intro. + -- lwarpmk -h or lwarpmk --help : elseif (arg[1] == "-h" ) or (arg[1] == "--help") then @@ -5099,7 +5568,7 @@ end end -- not --version \end{filecontents*} -\end{LWR@createlwarpmk} +\end{LWRcreatelwarpmk} \begin{warpHTML} @@ -5267,7 +5736,7 @@ end -- not --version \let\LWR@origampersand\& \newcommand*{\HTMLentity}[1]{% \begingroup% -\LWR@FBcancel% +\LWR@hook@processingtags% \LWR@origampersand#1;% \endgroup% } @@ -5293,7 +5762,7 @@ end -- not --version \providecommand*{\HomeHTMLFilename}{\BaseJobname} \newcommand*{\SetHTMLFileNumber}[1]{% -\setcounter{LWR@htmlfilenumber}{#1}% + \setcounter{LWR@htmlfilenumber}{#1}% } \newbool{FileSectionNames} @@ -5303,6 +5772,15 @@ end -- not --version \begin{warpHTML} +\newcounter{LWR@HTMLpagenum} +\setcounter{LWR@HTMLpagenum}{0} + +\newcounter{LWR@htmlseqfilenumber} +\setcounter{LWR@htmlseqfilenumber}{0} + +\newbool{LWR@setseqfilelabel} +\setbool{LWR@setseqfilelabel}{false} + \newcounter{LWR@htmlfilenumber} \setcounter{LWR@htmlfilenumber}{0} @@ -5312,29 +5790,31 @@ end -- not --version \LWR@disablepinyin% \LWR@sanitize{#1}% \LWR@traceinfo{about to compare with ??}% -\ifthenelse{\equal{\LWR@sanitized}{??}}% +\ifdefstring{\LWR@sanitized}{??} {\LWR@traceinfo{found ??}}% {\LWR@traceinfo{not found ??}}% \LWR@traceinfo{about to compare with zero or empty}% -\ifthenelse{% - \equal{\LWR@sanitized}{0}% - \OR \equal{\LWR@sanitized}{}% - \OR \equal{\LWR@sanitized}{??}% -}% +\ifboolexpr{ + test {\ifdefstring{\LWR@sanitized}{0}} or + test {\ifdefstring{\LWR@sanitized}{}} or + test {\ifdefstring{\LWR@sanitized}{??}} +} {% \LWR@traceinfo{LWR@htmlsectionfilename B \HomeHTMLFilename.html}% \HomeHTMLFilename.html% }% {% \LWR@traceinfo{LWR@htmlsectionfilename C \LWR@sanitized}% - \ifthenelse{% - \equal{\HTMLFilename}{} \AND - \equal{\LWR@sanitized}{Index} \OR - \equal{\LWR@sanitized}{index}% + \ifboolexpr{ + test{\ifdefvoid{\HTMLFilename}} and + ( + test{\ifdefstring{\LWR@sanitized}{Index}} or + test{\ifdefstring{\LWR@sanitized}{index}} + ) }% {% - \LWR@traceinfo{Prefixing the index name with an underscore.}% - \_\LWR@sanitized.html% + \LWR@traceinfo{Adding a zero to the index filename.}% + \LWR@sanitized-0.html% }% {% \HTMLFilename\LWR@isolate{\LWR@sanitized}.html% @@ -5345,12 +5825,12 @@ end -- not --version } \newcommand*{\LWR@htmlrefsectionfilename}[1]{% -\LWR@traceinfo{LWR@htmlrefsectionfilename: !\detokenize{#1}!}% -\begingroup% -\LWR@nullfonts% -\LWR@htmlsectionfilename{\LWR@htmlfileref{#1}}% -\endgroup% -\LWR@traceinfo{LWR@htmlrefsectionfilename: done}% + \LWR@traceinfo{LWR@htmlrefsectionfilename: !\detokenize{#1}!}% + \begingroup% + \LWR@nullfonts% + \LWR@htmlsectionfilename{\LWR@htmlfileref{#1}}% + \endgroup% + \LWR@traceinfo{LWR@htmlrefsectionfilename: done}% } \end{warpHTML} @@ -5365,7 +5845,7 @@ end -- not --version \begin{warpHTML} \newcommand*{\LinkHome}{% -\LWR@subhyperrefclass{\HomeHTMLFilename.html}{\linkhomename}{linkhome}% + \LWR@subhyperrefclass{\HomeHTMLFilename.html}{\linkhomename}{linkhome}% } \end{warpHTML} @@ -5390,12 +5870,63 @@ end -- not --version \begin{warpHTML} -\newcommand*{\LWR@topnavigation}{ -\LWR@htmlelementclassline{nav}{topnavigation}{\LinkHome} +\newcommand*{\LWR@topnavigation}{% + \LWR@htmlelementclassline{nav}{topnavigation}{\LinkHome} +} + +\newcommand*{\LWR@botnavigation}{% + \LWR@htmlelementclassline{nav}{botnavigation}{\LinkHome} +} + +\end{warpHTML} + + +\begin{warpall} + +\newcommand*{\linkpreviousname}{Previous} + +\newcommand*{\linknextname}{Next} + +\end{warpall} + +\begin{warpprint} + +\newcommand*{\LinkPrevious}{} + +\newcommand*{\LinkNext}{} + +\end{warpprint} + +\begin{warpHTML} + +\newcommand*{\LinkPrevious}{% + \ifnumless{\value{LWR@htmlseqfilenumber}}{1}{}{% + \setcounter{LWR@tempcountone}{\value{LWR@htmlseqfilenumber}-1}% + \LWR@subhyperrefclass{% + \LWR@htmlrefsectionfilename{% + \BaseJobname-autofile-\arabic{LWR@tempcountone}% + }% + }{\linkpreviousname}{linkhome}% + }% } -\newcommand*{\LWR@botnavigation}{ -\LWR@htmlelementclassline{nav}{botnavigation}{\LinkHome} +\newcommand*{\LinkNext}{% + \ifcsdef{r@\BaseJobname-autofile-last@lwarp}{% + \edef\LWR@tempone{% + \LWR@htmlfileref{\BaseJobname-autofile-\arabic{LWR@htmlseqfilenumber}}% + }% + \edef\LWR@temptwo{% + \LWR@htmlfileref{\BaseJobname-autofile-last}% + }% + \ifdefequal{\LWR@tempone}{\LWR@temptwo}{}{% + \setcounter{LWR@tempcountone}{\value{LWR@htmlseqfilenumber}+1}% + \LWR@subhyperrefclass{% + \LWR@htmlrefsectionfilename{% + \BaseJobname-autofile-\arabic{LWR@tempcountone}% + }% + }{\linknextname}{linkhome}% + }% + }{}% } \end{warpHTML} @@ -5462,8 +5993,14 @@ end -- not --version \newcommand{\LWR@forcenewpage}{% \LWR@traceinfo{LWR@forcenewpage}% \ifinner\else% -\LWR@stoppars\LWR@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]{} @@ -5481,7 +6018,7 @@ end -- not --version \newcommand*{\LWR@tagtitle}{h1} \newcommand*{\LWR@tagtitleend}{/h1} -\newcommand*{\LWR@tagbook}{div class="book"} +\newcommand*{\LWR@tagbook}{div class=\textquotedbl{}book\textquotedbl} \newcommand*{\LWR@tagbookend}{/div} \newcommand*{\LWR@tagpart}{h2} \newcommand*{\LWR@tagpartend}{/h2} @@ -5493,13 +6030,15 @@ end -- not --version \newcommand*{\LWR@tagsubsectionend}{/h5} \newcommand*{\LWR@tagsubsubsection}{h6} \newcommand*{\LWR@tagsubsubsectionend}{/h6} -\newcommand*{\LWR@tagparagraph}{span class="paragraph"} +\newcommand*{\LWR@tagparagraph}{span class=\textquotedbl{}paragraph\textquotedbl} \newcommand*{\LWR@tagparagraphend}{/span} -\newcommand*{\LWR@tagsubparagraph}{span class="subparagraph"} +\newcommand*{\LWR@tagsubparagraph}{span class=\textquotedbl{}subparagraph\textquotedbl} \newcommand*{\LWR@tagsubparagraphend}{/span} \newcommand*{\LWR@tagregularparagraph}{p} +\newcommand*{\LWR@hook@processingtags}{} + \providecommand*{\LWR@FBcancel}{} @@ -5508,6 +6047,7 @@ end -- not --version {}% {% \LetLtxMacro\LWR@FBcancel\NoAutoSpacing% + \appto{\LWR@hook@processingtags}{\LWR@FBcancel}% }% \@ifundefined{frenchbsetup}% @@ -5516,31 +6056,31 @@ end -- not --version \frenchbsetup{FrenchFootnotes=false}% \renewrobustcmd*{\FBcolonspace}{% \begingroup% - \LWR@FBcancel% + \LWR@hook@processingtags% \LWR@origampersand{}nbsp;% \endgroup% }% \renewrobustcmd*{\FBthinspace}{% \begingroup% - \LWR@FBcancel% + \LWR@hook@processingtags% \LWR@origampersand\LWR@origpound{}x202f;% \, \endgroup% }% \renewrobustcmd*{\FBguillspace}{% \begingroup% - \LWR@FBcancel% + \LWR@hook@processingtags% \LWR@origampersand{}nbsp;% ~, for \og xyz \fg{} \endgroup% }% \DeclareDocumentCommand{\FBmedkern}{}{% \begingroup% - \LWR@FBcancel% + \LWR@hook@processingtags% \LWR@origampersand\LWR@origpound{}x202f;% \, \endgroup% }% \DeclareDocumentCommand{\FBthickkern}{}{% \begingroup% - \LWR@FBcancel% + \LWR@hook@processingtags% \LWR@origampersand{}nbsp;% ~ \endgroup% }% @@ -5565,14 +6105,32 @@ end -- not --version \newcommand*{\LWR@htmltagc}[1]{% \LWR@traceinfo{LWR@htmltagc !\detokenize{#1}!}% \begingroup% -\LWR@FBcancel% -\ifmmode\else\protect\LWR@origttfamily\fi% +\LWR@hook@processingtags% +\ifmmode\else\protect\LWR@print@normalfont\protect\LWR@origttfamily\fi% \protect\LWR@origtextless% \LWR@isolate{#1}% \protect\LWR@origtextgreater% \endgroup% } +\newcommand*{\LWR@spanwarnformat}[1]{% + \ifnumcomp{\value{LWR@spandepth}}{>}{0}{% + \PackageWarning{lwarp}{% + A #1 is being used inside a span.\MessageBreak + Formatting may be lost,% + }% + }{}% +} + +\newcommand*{\LWR@spanwarninvalid}[1]{% + \ifnumcomp{\value{LWR@spandepth}}{>}{0}{% + \PackageWarning{lwarp}{% + A #1 is being used inside a span.\MessageBreak + This generates invalid HTML,% + }% + }{}% +} + \newcommand*{\LWR@nestspanitem}{% \if@newlist\else{\LWR@htmltagc{br /}}\fi% \LWR@origitem% @@ -5589,10 +6147,15 @@ end -- not --version \LWR@traceinfo{LWR@nestspan: NOT inside a lateximage}% \addtocounter{LWR@spandepth}{1}% \RenewDocumentEnvironment{minipage}{O{t} o O{t} m}% - {\LWR@subhtmlelementclass{span}{inlineminipage}}% - {\LWR@htmltagc{/span}}% - \RenewDocumentEnvironment{BlockClass}{o m}{}{}% - \renewcommand{\BlockClassSingle}[2]{##2}% + {\LWR@spanwarnformat{minipage or \protect\parbox}}% + {}% + \RenewDocumentEnvironment{BlockClass}{o m}% + {\LWR@spanwarnformat{multi-paragraph object}}% + {}% + \renewcommand{\BlockClassSingle}[2]{% + {\LWR@spanwarnformat{multi-paragraph object}}% + ##2% + }% \renewcommand{\LWR@forcenewpage}{}% \renewcommand{\LWR@liststart}{% \let\item\LWR@nestspanitem% @@ -5642,8 +6205,8 @@ end -- not --version \newcommand*{\LWR@htmlopencomment}{% {% \begingroup% -\LWR@FBcancel% -\ifmmode\else\protect\LWR@origttfamily\fi% +\LWR@hook@processingtags% +\ifmmode\else\protect\LWR@print@normalfont\protect\LWR@origttfamily\fi% \LWR@print@mbox{\LWR@origtextless{}!-\/-}% \endgroup% }% @@ -5652,20 +6215,25 @@ end -- not --version \newcommand*{\LWR@htmlclosecomment}{% {% \begingroup% -\LWR@FBcancel% -\ifmmode\else\protect\LWR@origttfamily\fi% +\LWR@hook@processingtags% +\ifmmode\else\protect\LWR@print@normalfont\protect\LWR@origttfamily\fi% \LWR@print@mbox{-\/-\LWR@origtextgreater}% \endgroup% }% } \newcommand{\LWR@htmlcomment}[1]{% -\LWR@htmlopencomment{}% -{% -\LWR@origttfamily% break ligatures -#1% -}% -\LWR@htmlclosecomment{}} +\ifmmode% +\else% + \LWR@htmlopencomment{}% + {% + \LWR@print@normalfont% + \LWR@origttfamily% break ligatures + #1% + }% + \LWR@htmlclosecomment{}% +\fi% +} \newcommand{\LWR@htmlblockcomment}[1] {\LWR@stoppars\LWR@htmlcomment{#1}\LWR@startpars} @@ -5679,16 +6247,16 @@ end -- not --version \NewDocumentCommand{\LWR@subhtmlelementclass}{m O{} m}{% \LWR@traceinfo{LWR@subhtmlelementclass !#1!#2!#3!}% \ifblank{#2}% -{% empty option +{% empty style \LWR@htmltag{% - #1 % space - class=\textquotedbl#3\textquotedbl\ % space + #1% + \ifblank{#3}{}{ class=\textquotedbl#3\textquotedbl\ }% spaces }% }% -{% non-empty option +{% non-empty style \LWR@htmltag{% #1\LWR@indentHTML% - class=\textquotedbl#3\textquotedbl\LWR@indentHTML% + \ifblank{#3}{}{class=\textquotedbl#3\textquotedbl\LWR@indentHTML}% style=\textquotedbl#2\textquotedbl\LWR@orignewline% }% }% @@ -5748,12 +6316,12 @@ end -- not --version \NewDocumentEnvironment{BlockClass}{o m}{}{}% \end{warpprint} \begin{warpHTML} + \NewDocumentEnvironment{LWR@print@BlockClass}{o m}{}{}% + \NewDocumentEnvironment{LWR@HTML@BlockClass}{o m}% -{% - \LWR@htmldivclass[#1]{#2}% -} -{\LWR@htmldivclassend{#2}} + {\LWR@htmldivclass[#1]{#2}} + {\LWR@htmldivclassend{#2}} \LWR@formattedenv{BlockClass} \end{warpHTML} @@ -5762,7 +6330,7 @@ end -- not --version \end{warpall} \begin{warpHTML} \newcommand{\LWR@HTML@BlockClassSingle}[2]{% -\LWR@htmlelementclassline{div}{#1}{#2}% + \LWR@htmlelementclassline{div}{#1}{#2}% } \LWR@formatted{BlockClassSingle} @@ -5947,7 +6515,10 @@ end -- not --version \newcommand*{\LWR@startpars}% {% -\ifnumcomp{\value{LWR@spandepth}}{>}{0}% +\ifboolexpr{ + test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or + test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} +}% {}% {% \ifbool{LWR@doingstartpars}% @@ -5964,7 +6535,10 @@ end -- not --version \newcommand*{\LWR@stoppars}% {% -\ifnumcomp{\value{LWR@spandepth}}{>}{0}% +\ifboolexpr{ + test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or + test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} +}% {}% {% \ifbool{LWR@doingapar}% @@ -5989,8 +6563,8 @@ end -- not --version \begin{warpHTML} \AtBeginDocument{ -\def\@afterindentfalse{\let\if@afterindent\iffalse} -\@afterindentfalse + \def\@afterindentfalse{\let\if@afterindent\iffalse} + \@afterindentfalse } \let\LWR@afterindent@syntaxhighlight\fi% syntax highlighting @@ -6000,11 +6574,15 @@ end -- not --version \begin{warpall} \newcommand{\LWR@firstpagetop}{} % for the home page alone +\newcommand{\LWR@firstpagebottom}{} % for the home page alone \newcommand{\LWR@pagetop}{} % for all other pages \newcommand{\LWR@pagebottom}{} \newcommand{\HTMLFirstPageTop}[1]{% \renewcommand{\LWR@firstpagetop}{#1}% } +\newcommand{\HTMLFirstPageBottom}[1]{% + \renewcommand{\LWR@firstpagebottom}{#1}% +} \newcommand{\HTMLPageTop}[1]{% \renewcommand{\LWR@pagetop}{#1}% } @@ -6158,7 +6736,7 @@ end -- not --version \LWR@traceinfo{@mpfootnotetext: done}% } \AtBeginDocument{ -\def\thempfootnote{\@alph\c@mpfootnote} + \def\thempfootnote{\@alph\c@mpfootnote} } \newcommand*{\LWR@@printpendingfootnotes}[1]{% \expandafter\ifvoid\csname LWR@#1box\endcsname\else @@ -6286,6 +6864,20 @@ end -- not --version }% } +\newcommand*{\LWR@avoiddupfilenames}{% + To avoid duplicate filenames, use the optional\MessageBreak + short Table of Contents entry:\MessageBreak + \space\space\protect\section[Unique name, no math]{Name with math}% + \MessageBreak + or use \protect\texorpdfstring, from the hyperref package:\MessageBreak + \space\space% + \protect\section{\MessageBreak + \space\space\space\space\protect\texorpdfstring\MessageBreak + \space\space\space\space\space\space% + {Name with math}{Unique name, no math}\MessageBreak + \space\space} +} + \newcommand*{\LWR@filenamenoblanks}[1]{% \begingroup \LWR@nullfonts% @@ -6300,14 +6892,38 @@ end -- not --version \LWR@simplifyname{\textless} \LWR@simplifyname{\textgreater} \edef\LWR@thisnewfilename{\detokenize\expandafter{\LWR@thisnewfilename}}% +\ifbool{FileSectionNames}{% + \IfSubStr{\LWR@thisnewfilename}{\LWRdollar}{% + \PackageWarning{lwarp} + {% + This section name:\MessageBreak + \space\space``\detokenize\expandafter{#1}''\MessageBreak + at the line number listed below,\MessageBreak + is using $dollar-delimited math$, + which generates\MessageBreak + complicated file names. It is better to use\MessageBreak + \space\space% + \protect\section{Name with \protect\(parenthesis math\protect\)}% + \MessageBreak + The math then will be removed from the file name.\MessageBreak + \MessageBreak + \LWR@avoiddupfilenames% + \MessageBreak + This section is found before or% + } + }{}% +}{} \LWR@traceinfo{LWR@filenamenoblanks edef: !\LWR@thisnewfilename!}% \fullexpandarg% \LWR@simplifyname*{ } +\LWR@simplifyname*{*} +\LWR@simplifyname*{(} +\LWR@simplifyname*{)} +\LWR@simplifyname*{.} \LWR@simplifyname*{!} \LWR@simplifyname*{,} \LWR@simplifyname*{'} \LWR@simplifyname*{+} -\LWR@simplifyname*{,} \LWR@simplifyname*{/} \LWR@simplifyname*{:} \LWR@simplifyname*{;} @@ -6351,19 +6967,19 @@ end -- not --version \LWR@simplifyname*{-the-} \LWR@simplifyname*{-THE-} \LWR@simplifycustom% -\LWR@simplifyname*{-----} -\LWR@simplifyname*{----} -\LWR@simplifyname*{---} -\LWR@simplifyname*{--} \ifPDFTeX% pdflatex or dvi latex \ifdefstring{\inputencodingname}{utf8}{% -\LWR@simplifyname*{—} -\LWR@simplifyname*{–} + \LWR@simplifyname*{—} + \LWR@simplifyname*{–} }{}% \else% not PDFTeX -\LWR@simplifyname*{—} -\LWR@simplifyname*{–} + \LWR@simplifyname*{—} + \LWR@simplifyname*{–} \fi% +\LWR@simplifyname*{-----} +\LWR@simplifyname*{----} +\LWR@simplifyname*{---} +\LWR@simplifyname*{--} \IfBeginWith{\LWR@thisnewfilename}{\detokenize{-}}{% \StrGobbleLeft{\LWR@thisnewfilename}{1}[\LWR@thisnewfilename]% }{}% @@ -6409,6 +7025,9 @@ end -- not --version } \egroup +\newbool{LWR@MathJax@silentquotes} +\boolfalse{LWR@MathJax@silentquotes} + \catcode`\#=12 \catcode`\&=12 \newcommand{\LWR@subHTMLsanitize}{% @@ -6416,7 +7035,14 @@ end -- not --version \LWR@replacestrings{&}{&}% \LWR@replacestrings{<}{<}% \LWR@replacestrings{>}{>}% - \LWR@replacestrings{"}{"}% + \ifbool{LWR@MathJax@silentquotes} + {% + \expandafter\LWR@replacestrings\expandafter{\LWRbackslash"}{}% + \LWR@replacestrings{"}{}% + }% + {\LWR@replacestrings{"}{"}}% + \LWR@replacestrings{'}{'}% + \LWR@replacestrings{`}{`}% \LWR@replacestrings{##}{#}% \edef\LWR@strresult{\detokenize\expandafter{\tmpb}}% } @@ -6425,21 +7051,31 @@ end -- not --version \newrobustcmd{\LWR@HTMLsanitize}[1]{% \begingroup% - \LWR@FBcancel% - \fullexpandarg% - \protect\StrSubstitute{\detokenize{#1}}% - {\detokenize{\&}}{\detokenize{&}}[\LWR@strresult]% + \LWR@hook@processingtags% + \edef\LWR@strresult{\detokenize{#1}}% \LWR@subHTMLsanitize% \LWR@strresult% \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]% + \LWR@hook@processingtags% + \edef\LWR@strresult{\detokenize\expandafter{#1}}% + \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% @@ -6453,10 +7089,8 @@ end -- not --version \newcommand*{\LWR@subcustomizedmathjax}[1]{% \begingroup% - \LWR@FBcancel% - \fullexpandarg% - \protect\StrSubstitute{\detokenize{#1}}% - {\detokenize{\&}}{\detokenize{&}}[\LWR@strresult]% + \LWR@hook@processingtags% + \edef\LWR@strresult{\detokenize{#1}}% \LWR@subHTMLsanitize% \xdef\LWR@customizedMathJax{% \LWR@customizedMathJax% @@ -6469,8 +7103,8 @@ end -- not --version \newcommand*{\CustomizeMathJax}[1]{% \ifbool{LWR@warnedcustomizemathjax}{}{% \StrLen{\detokenize{#1}}[\LWR@tempone]% - \ifnumgreater{\LWR@tempone}{200}{% - \AtBeginDocument{% + \ifnumgreater{\LWR@tempone}{350}{% + \AtEndDocument{% \PackageWarningNoLine{lwarp}{% To ensure faster MathJax compilation, place each\MessageBreak custom macro in its own \protect\CustomizeMathJax.\MessageBreak @@ -6512,9 +7146,9 @@ 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{\let\LWRorighspace\hspace} +\CustomizeMathJax{\renewcommand{\hspace}{\ifstar\LWRorighspace\LWRorighspace}} +\CustomizeMathJax{\newcommand{\mathnormal}[1]{{#1}}} \CustomizeMathJax{\newcommand\ensuremath[1]{#1}} \CustomizeMathJax{% absorb two optional arguments \newcommand{\LWRframebox}[2][]{\fbox{#2}} @@ -6524,9 +7158,21 @@ end -- not --version \CustomizeMathJax{\newcommand{\addtolength}[2]{}} \CustomizeMathJax{\newcommand{\setcounter}[2]{}} \CustomizeMathJax{\newcommand{\addtocounter}[2]{}} +\CustomizeMathJax{\newcommand{\arabic}[1]{}} +\CustomizeMathJax{\newcommand{\number}[1]{}} +\CustomizeMathJax{\newcommand{\noalign}[1]{\text{#1}\notag \\}} \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{\newcommand{\LWRabsorboption}[1][]{}} +\CustomizeMathJax{\newcommand{\LWRabsorbtwooptions}[1][]{\LWRabsorboption}} +\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 @@ -6536,16 +7182,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{---} \LWR@startpars }{} @@ -6568,6 +7212,26 @@ end -- not --version \begin{warpHTML} +\newcommand*{\LWR@createfooter}{% + \ifnumless{\value{LWR@htmlseqfilenumber}}{1}{% + \ifdefempty{\LWR@firstpagebottom}{}{% + \LWR@htmlelement{footer} + + \LWR@firstpagebottom + + \LWR@htmlelementend{footer} + }% + }{% + \ifdefempty{\LWR@pagebottom}{}{% + \LWR@htmlelement{footer} + + \LWR@pagebottom + + \LWR@htmlelementend{footer} + }% + }% +} + \newcommand*{\LWR@newhtmlfile}[1]{ \LWR@traceinfo{LWR@newhtmlfile} \LWR@htmlelementclassend{section}{textbody} @@ -6576,17 +7240,7 @@ end -- not --version \LWR@printpendingfootnotes -\ifbool{FormatEPUB} -{} -{ - \ifdefempty{\LWR@pagebottom}{}{% - \LWR@htmlelement{footer} - - \LWR@pagebottom - - \LWR@htmlelementend{footer} - } -} +\ifbool{FormatEPUB}{}{\LWR@createfooter} \ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}} {} {\ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{}} @@ -6595,9 +7249,9 @@ end -- not --version \LWR@htmltag{/body}\LWR@orignewline \LWR@htmltag{/html}\LWR@orignewline \LWR@traceinfo{LWR@newhtmlfile: about to LWR@orignewpage} -\LWR@orignewpage - +\LWR@maybe@orignewpage \addtocounter{LWR@htmlfilenumber}{1}% +\addtocounter{LWR@htmlseqfilenumber}{1}% \ifbool{FileSectionNames}% {% \LWR@filenamenoblanks{#1}% @@ -6605,23 +7259,25 @@ end -- not --version \ifcsundef{LWR@filename\LWR@hashedname}{% \csdef{LWR@filename\LWR@hashedname}{}% }{% - \PackageError{lwarp} + \PackageError{lwarp}% {% - Section name\MessageBreak + The section name:\MessageBreak ``#1'',\MessageBreak at the line number listed below,\MessageBreak generates the filename\MessageBreak ``\LWR@thisfilename'',\MessageBreak - which appears to be a duplicate.\MessageBreak - There is a previous section with an\MessageBreak - identical or similar name% - } + which appears to be a duplicate. There is a\MessageBreak + previous section with an identical or similar name.\MessageBreak + While generating file names, Lwarp sanitizes math,\MessageBreak + most symbols, and a few common short words,\MessageBreak + and this may cause a conflict.\MessageBreak + Enter 'H' for possible solutions% + }% {% - Lwarp sanitizes most symbols and a few common short words - when generating file names, and this may cause a conflict. - } - } -} + \LWR@avoiddupfilenames% + }% + }% +}% {\renewcommand*{\LWR@thisfilename}{\arabic{LWR@htmlfilenumber}}} \LWR@traceinfo{LWR@newhtmlfile: about to print start file}% \begingroup% @@ -6660,7 +7316,7 @@ end -- not --version \LWR@htmlelementclass{div}{bodycontainer} \LWR@htmlelementclass{section}{textbody} - +\boolfalse{LWR@setseqfilelabel} \ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}% {}% {% @@ -6735,12 +7391,16 @@ end -- not --version \let\@chapcntformat\@seccntformat \let\@partcntformat\@seccntformat \newcommand*{\@partnameformat}{\LWR@isolate{\partname}~}% +\newcommand*{\LWR@printchaptername}{% + \ifdefvoid{\chaptername}{}{\chaptername~}% +} \newcounter{LWR@currentautosec} \setcounter{LWR@currentautosec}{1} \DeclareDocumentCommand{\LWR@section}{m m m m}{% \IfValueTF{#2}% {\LWR@traceinfo{LWR@section: starting #4 #2}}% {\LWR@traceinfo{LWR@section: starting #4 #3}}% + \LWR@spanwarninvalid{section}% \LWR@maybeprintpendingfootnotes{\csuse{LWR@depth#4}}% \LWR@stoppars% \LWR@startnewdepth{#4}% @@ -6776,7 +7436,7 @@ end -- not --version }% new file {% not new file \LWR@traceinfo{LWR@section: not a new HTML file, about to LWR@orignewpage}% - \LWR@orignewpage% + \LWR@maybe@orignewpage% }% not new file \IfValueT{#3}{% @@ -6869,14 +7529,17 @@ end -- not --version {\protect\LWR@sectionnumber{\@partcntformat{#4}}}% {% \ifstrequal{#4}{chapter}% - {\protect\LWR@sectionnumber{\@chapcntformat{#4}}}% + {% + \LWR@printchaptername% + \protect\LWR@sectionnumber{\@chapcntformat{#4}}% + }% {\protect\LWR@sectionnumber{\@seccntformat{#4}}}% }% }% {}% \LWR@traceinfo{LWR@section: finished print section number}% }{}% -}% end of not starred +}% not starred \LWR@traceinfo{LWR@section: about to print the section name}% \LWR@isolate{#3}% \LWR@traceinfo{LWR@section: about to close the heading tag}% @@ -6885,6 +7548,10 @@ end -- not --version \LWR@traceinfo{LWR@section: about to create the LaTeX label}% \setcounter{LWR@latestautopage}{\value{page}}% \LWR@newautopagelabel{LWR@currentautosec}\LWR@orignewline% +\ifbool{LWR@setseqfilelabel}{}{% + \label{\BaseJobname-autofile-\arabic{LWR@htmlseqfilenumber}}% + \booltrue{LWR@setseqfilelabel}% +}% \ifthenelse{% \cnttest{\@nameuse{LWR@depth#4}}{<}{\LWR@depthparagraph}% }% @@ -6987,20 +7654,20 @@ end -- not --version \newcommand*{\LWR@currentHTMLLanguage}{en-US} \newcommand*{\HTMLLanguage}[1]{% -\renewcommand*{\LWR@currentHTMLLanguage}{#1}% + \renewcommand*{\LWR@currentHTMLLanguage}{#1}% } \ifPDFTeX% pdflatex or dvi latex \ifdefstring{\inputencodingname}{utf8}{% - \newcommand*{\theHTMLTitleSeparator}{ — }% EMdash + \newcommand*{\theHTMLTitleSeparator}{ —\ }% EMdash }{% - \newcommand*{\theHTMLTitleSeparator}{ - }% hyphen + \newcommand*{\theHTMLTitleSeparator}{ -\ }% hyphen }% \else% \ifpTeX - \newcommand*{\theHTMLTitleSeparator}{ - }% hyphen + \newcommand*{\theHTMLTitleSeparator}{ -\ }% hyphen \else - \newcommand*{\theHTMLTitleSeparator}{ — }% EMdash + \newcommand*{\theHTMLTitleSeparator}{ —\ }% EMdash \fi% \fi% @@ -7029,6 +7696,14 @@ end -- not --version \begingroup% \LWR@nullfonts% \edef\theHTMLSection{#1}% +\StrSubstitute{\theHTMLSection}{\protect}{\detokenize{-}}[\theHTMLSection] +\StrSubstitute{\theHTMLSection}{\detokenize{-----}}{\detokenize{-}}[\theHTMLSection] +\StrSubstitute{\theHTMLSection}{\detokenize{----}}{\detokenize{-}}[\theHTMLSection] +\StrSubstitute{\theHTMLSection}{\detokenize{---}}{\detokenize{-}}[\theHTMLSection] +\StrSubstitute{\theHTMLSection}{\detokenize{--}}{\detokenize{-}}[\theHTMLSection] +\IfBeginWith{\theHTMLSection}{\detokenize{-}}{% + \StrGobbleLeft{\theHTMLSection}{1}[\theHTMLSection]% +}{}% \LWR@htmltag{!DOCTYPE html}\LWR@orignewline \LWR@htmltag{% html lang=\LWR@orig@textquotedbl\LWR@currentHTMLLanguage\LWR@orig@textquotedbl% @@ -7091,7 +7766,17 @@ end -- not --version \begingroup% \LWR@restoreoriglists% \boolfalse{LWR@verbtags}% - \verbatiminput{\LWR@mathjaxfilename}% + \IfFileExists{\LWR@mathjaxfilename}% + {\verbatiminput{\LWR@mathjaxfilename}}% + {% + \PackageError{lwarp}% + {% + \protect\MathJaxFilename\space specified the file\MessageBreak + \space\space\LWR@mathjaxfilename\MessageBreak + which does not exist% + }% + {Specify an existing file, or remove \protect\MathJaxFilename.}% + }% \booltrue{LWR@verbtags}% \endgroup% \LWR@stoppars% @@ -7134,8 +7819,6 @@ end -- not --version \setlength{\abovecaptionskip}{0ex} \renewcommand{\ps@plain}{} \let\LWR@origcaption\caption -\let\LWR@origltx@label\ltx@label -\let\ltx@label\LWR@htmlmathlabel \global\boolfalse{LWR@doingapar} \global\boolfalse{LWR@doingstartpars} \mainmatter @@ -7154,12 +7837,27 @@ end -- not --version \LWR@htmlelementclass{div}{bodycontainer} \LWR@traceinfo{LWR@lwarpStart: Generating textbody.} \LWR@htmlelementclass{section}{textbody} +\booltrue{LWR@setseqfilelabel}% +\label{\BaseJobname-autofile-\arabic{LWR@htmlseqfilenumber}} \LWR@patchlists \catcode`\$=\active \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} @@ -7185,17 +7883,12 @@ end -- not --version \LWR@stoppars \LWR@closeprevious{finished} +\label{\BaseJobname-autofile-last} \LWR@htmlelementclassend{section}{textbody} \LWR@htmlelementclassend{div}{bodycontainer} \LWR@htmlelementclassend{div}{bodyandsidetoc} \LWR@printpendingfootnotes -\ifdefempty{\LWR@pagebottom}{}{% - \LWR@htmlelement{footer} - - \LWR@pagebottom - - \LWR@htmlelementend{footer} -} +\ifbool{FormatEPUB}{}{\LWR@createfooter} \ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}} {} @@ -7205,37 +7898,67 @@ end -- not --version \LWR@stoppars% final stop of all paragraphs \LWR@htmltag{/body}\LWR@orignewline \LWR@htmltag{/html}\LWR@orignewline -\LWR@orignewpage +\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 } - {} - { - \PackageWarningNoLine{lwarp} +}% newer kernel +{% older kernel + \xpatchcmd{\enddocument} {% - 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% + \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} @@ -7274,9 +7997,13 @@ end -- not --version \LWR@printpendingfootnotes } \end{warpHTML} -\begin{warpall} +\begin{warpprint} +\newcommand*{\printthanks}{\@thanks} +\end{warpprint} + +\begin{warpHTML} \newcommand*{\printthanks}{\LWR@stoppars\@thanks\LWR@startpars} -\end{warpall} +\end{warpHTML} \begin{warpHTML} \newcommand*{\printtitle} @@ -7352,10 +8079,19 @@ end -- not --version }% } -\def\@fnsymbol#1{\ifcase#1\or *\or \HTMLentity{dagger}\or \HTMLentity{Dagger}\or - \HTMLentity{sect}\or \HTMLentity{para}\or \text{\HTMLunicode{2016}}\or - **\or \HTMLentity{dagger}\HTMLentity{dagger} \or - \HTMLentity{Dagger}\HTMLentity{Dagger} \else\@ctrerr\fi} +\def\LWR@HTML@@fnsymbol#1{% + \ifcase#1\or *\or + \HTMLentity{dagger}\or + \HTMLentity{Dagger}\or + \HTMLentity{sect}\or + \HTMLentity{para}\or + \HTMLunicode{2016}\or + **\or + \HTMLentity{dagger}\HTMLentity{dagger} \or + \HTMLentity{Dagger}\HTMLentity{Dagger} \else + \@ctrerr\fi% +} +\LWR@formatted{@fnsymbol} \renewcommand*{\maketitle}{% \begin{titlepage} \LWR@maketitlesetup @@ -7433,10 +8169,12 @@ end -- not --version }% }% yes titling package {% no titling package - \newcommand{\published}[1]{}% - \newcommand*{\printpublished}{}% - \newcommand{\subtitle}{}% - \newcommand*{\printsubtitle}% + \def\@published{}% + \DeclareDocumentCommand{\published}{m}{\gdef\@published{##1}}% + \DeclareDocumentCommand{\printpublished}{}{}% + \def\@subtitle{}% + \DeclareDocumentCommand{\subtitle}{m}{\gdef\@subtitle{##1}}% + \DeclareDocumentCommand{\printsubtitle}{}{}% }% no titling package }% \AddSubtitlePublished @@ -7447,55 +8185,60 @@ end -- not --version \providecommand*{\abstractname}{Abstract} \DeclareDocumentEnvironment{abstract}{O{\abstractname}} { -\LWR@forcenewpage -\BlockClass{abstract} -\BlockClassSingle{abstracttitle}{#1} + \LWR@forcenewpage + \BlockClass{abstract} + \BlockClassSingle{abstracttitle}{#1} } { -\endBlockClass + \endBlockClass } \end{warpHTML} +\begin{warpall} +\newcommand{\attribution}[1]{ + \begin{flushright} + \unskip + #1 + \end{flushright}% +} +\end{warpall} \begin{warpHTML} -\newcommand{\attribution}[1]{% +\newcommand{\LWR@HTML@attribution}[1]{% \LWR@stoppars% \begin{BlockClass}{attribution} #1 \end{BlockClass} \LWR@startpars% } +\LWR@formatted{attribution} \end{warpHTML} -\begin{warpprint} -\newcommand{\attribution}[1]{ - \begin{flushright} - \unskip - #1 - \end{flushright}% -} -\end{warpprint} \begin{warpHTML} -\renewenvironment*{quote} +\newenvironment*{LWR@HTML@quote} { \LWR@forcenewpage \LWR@htmlblocktag{blockquote} } {\LWR@htmlblocktag{/blockquote}} -\renewenvironment*{quotation} + +\LWR@formattedenv{quote} +\newenvironment*{LWR@HTML@quotation} { \LWR@forcenewpage \LWR@htmlblocktag{blockquote} } {\LWR@htmlblocktag{/blockquote}} +\LWR@formattedenv{quotation} + \end{warpHTML} \begin{warpHTML} -\renewenvironment{verse} +\newenvironment{LWR@HTML@verse} {\let\\\newline% lwarp \list{}{\itemsep \z@ \itemindent -1.5em% @@ -7504,6 +8247,8 @@ end -- not --version \advance\leftmargin 1.5em}% \item\relax} {\endlist} + +\LWR@formattedenv{verse} \end{warpHTML} \begin{warpall} @@ -7527,64 +8272,96 @@ 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=\textquotedbl{}texttt\textquotedbl}% + \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% \LWR@origttfamily% -\LWR@print@small% +\LWR@print@scriptsize% \LWR@restoreoriglists% -\LWR@FBcancel% +\LWR@hook@processingtags% \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% } -\let\LWRV@origverbatim@input\verbatim@input - -\renewcommand{\verbatim@input}[2]{% -\ifbool{LWR@verbtags}{\LWR@forcenewpage}{}% -\LWR@atbeginverbatim{2.5}{Verbatim}% -\LWRV@origverbatim@input{#1}{#2}% -\LWR@afterendverbatim{1.5}% +\newcommand{\LWR@HTML@verbatim@input}[2]{% + \ifbool{LWR@verbtags}{\LWR@forcenewpage}{}% + \LWR@atbeginverbatim{Verbatim}% + \LWR@print@verbatim@input{#1}{#2}% + \LWR@afterendverbatim% } +\LWR@formatted{verbatim@input} + \AfterEndPreamble{ \LWR@traceinfo{Patching verbatim.} \AtBeginEnvironment{verbatim}{% -\LWR@forcenewpage% -\LWR@atbeginverbatim{2.5}{verbatim}% + \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% + {}% + {% + \LWR@forcenewpage% + \LWR@atbeginverbatim{verbatim}% + }% } \AfterEndEnvironment{verbatim}{% - \LWR@afterendverbatim{1}% + \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% + {}% + {% + \LWR@afterendverbatim% + }% } } \newcommand*{\LWR@HTML@tabbing}{% -\LWR@forcenewpage% -\LWR@atbeginverbatim{3}{tabbing}% -\LWR@print@tabbing% + \LWR@forcenewpage% + \LWR@atbeginverbatim{tabbing}% + \let\enskip\LWR@origenskip% + \let\quad\LWR@origquad% + \let\qquad\LWR@origqquad% + \let~\LWR@origtilde% + \let\,\LWR@origcomma% + \let\thinspace\LWR@origthinspace% + \let\negthinspace\LWR@orignegthinspace% + \LWR@print@tabbing% } \newcommand*{\LWR@HTML@endtabbing}{% \LWR@print@endtabbing% - \LWR@afterendverbatim{1}% + \LWR@afterendverbatim% } \LWR@formatted{tabbing} @@ -7594,18 +8371,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 @@ -7618,7 +8396,9 @@ end -- not --version \newcommand*{\LWR@printcloselist}{\LWR@printcloseitemize} -\newcommand*{\LWR@printopenlist}{ul style="\LWR@print@mbox{list-style-type:none}"} +\newcommand*{\LWR@printopenlist}{% + ul style=\textquotedbl\LWR@print@mbox{list-style-type:none}\textquotedbl{}% +} \AtBeginDocument{ \def\@mklab#1{% @@ -7714,7 +8494,9 @@ end -- not --version \newcommand*{\LWR@itemizestart}{% \renewcommand*{\LWR@printcloselist}{\LWR@printcloseitemize} -\renewcommand*{\LWR@printopenlist}{ul style="\LWR@print@mbox{list-style-type:none}"} +\renewcommand*{\LWR@printopenlist}{% + ul style=\textquotedbl\LWR@print@mbox{list-style-type:none}\textquotedbl{}% +} \let\item\LWR@itemizeitem% \LWR@nulllistfills% } @@ -7723,7 +8505,9 @@ end -- not --version \newcommand*{\LWR@enumeratestart}{% \renewcommand*{\LWR@printcloselist}{\LWR@printcloseitemize} -\renewcommand*{\LWR@printopenlist}{ul style="\LWR@print@mbox{list-style-type:none}"} +\renewcommand*{\LWR@printopenlist}{% + ul style=\textquotedbl\LWR@print@mbox{list-style-type:none}\textquotedbl{}% +} \let\item\LWR@itemizeitem% \LWR@nulllistfills% } @@ -7787,22 +8571,22 @@ end -- not --version } \newcommand*{\LWR@restoreoriglists}{% -\LWR@traceinfo{LWR@restoreoriglists}% -\LetLtxMacro\item\LWR@origitem% -\LetLtxMacro\@item\LWR@orig@item% -\let\@trivlist\LWR@orig@trivlist% -\let\trivlist\LWR@origtrivlist% -\let\endtrivlist\LWR@origendtrivlist% -\LetLtxMacro\itemize\LWR@origitemize% -\LetLtxMacro\enditemize\LWR@endorigitemize% -\LetLtxMacro\enumerate\LWR@origenumerate% -\LetLtxMacro\endenumerate\LWR@endorigenumerate% -\LetLtxMacro\description\LWR@origdescription% -\LetLtxMacro\enddescription\LWR@endorigdescription% -\let\@mklab\LWR@orig@mklab% -\let\makelabel\LWR@origmakelabel% -\let\@donoparitem\LWR@orig@donoparitem% -\let\@nbitem\LWR@orig@nbitem% + \LWR@traceinfo{LWR@restoreoriglists}% + \LetLtxMacro\item\LWR@origitem% + \LetLtxMacro\@item\LWR@orig@item% + \let\@trivlist\LWR@orig@trivlist% + \let\trivlist\LWR@origtrivlist% + \let\endtrivlist\LWR@origendtrivlist% + \LetLtxMacro\itemize\LWR@origitemize% + \LetLtxMacro\enditemize\LWR@endorigitemize% + \LetLtxMacro\enumerate\LWR@origenumerate% + \LetLtxMacro\endenumerate\LWR@endorigenumerate% + \LetLtxMacro\description\LWR@origdescription% + \LetLtxMacro\enddescription\LWR@endorigdescription% + \let\@mklab\LWR@orig@mklab% + \let\makelabel\LWR@origmakelabel% + \let\@donoparitem\LWR@orig@donoparitem% + \let\@nbitem\LWR@orig@nbitem% } \end{warpHTML} @@ -8393,19 +9177,19 @@ end -- not --version test{\ifnumcomp{\value{LWR@hdashedlines}}{>}{0}}% }% {% - \LWR@htmltag{tr class="hline" }% + \LWR@htmltag{tr class=\textquotedbl{}hline\textquotedbl }% \LWR@orignewline% }% {% not doing hline \ifbool{LWR@doingtbrule}% {% \ifdefvoid{\LWR@ruleHTMLcolor}{% - \LWR@htmltag{tr class="tbrule"}% + \LWR@htmltag{tr class=\textquotedbl{}tbrule\textquotedbl}% }{% \LWR@htmltag{% - tr class="tbrule" % space - style="border-top: 1px solid % space - \LWR@origpound\LWR@ruleHTMLcolor "% + tr class=\textquotedbl{}tbrule\textquotedbl\ % space + style=\textquotedbl{}border-top: 1px solid % space + \LWR@origpound\LWR@ruleHTMLcolor \textquotedbl{}% }% }% \LWR@orignewline% @@ -8435,10 +9219,10 @@ end -- not --version {}% {% not empty \LWR@htmltag{% - td class="td#1% + td class=\textquotedbl{}td#1% \LWR@subaddcmidruletrim{}{}% \LWR@printbartag{#2}% - "% + \textquotedbl{}% \LWR@tdstartstyles% \LWR@addcmidrulewidth% \LWR@addcdashline% @@ -8485,12 +9269,12 @@ end -- not --version }% \LWR@traceinfo{LWR@tabledatasinglecolumntag: about to print td tag}% \LWR@htmltag{% - td class="td% + td class=\textquotedbl{}td% \LWR@strresult% \LWR@addcmidruletrim% \LWR@addleftmostbartag% \LWR@printbartag{\arabic{LWR@tableLaTeXcolindex}}% - "% + \textquotedbl{}% \LWR@tdstartstyles% \LWR@addcmidrulewidth% \LWR@addcdashline% @@ -8606,24 +9390,19 @@ end -- not --version \LWR@subcdashline#1% } -\newlength{\LWR@templengthone} -\newlength{\LWR@templengthtwo} -\newlength{\LWR@templengththree} -\newcounter{LWR@tempcountone} - \newcommand*{\LWR@tdstartstyles}{\boolfalse{LWR@tdhavecellstyle}} \newcommand*{\LWR@tdaddstyle}{% \ifbool{LWR@tdhavecellstyle}% {; }% - { style="}% + { style=\textquotedbl}% \booltrue{LWR@tdhavecellstyle}% } \newcommand*{\LWR@tdendstyles}{% \ifbool{LWR@tdhavecellstyle}% {% - "% + \textquotedbl% \boolfalse{LWR@tdhavecellstyle}% }{}% } @@ -8824,9 +9603,11 @@ end -- not --version } \newcommand*{\LWR@subaddtabularcellcolor}[1]{% - \LWR@htmltag{div class="cellcolor" style="% + \LWR@htmltag{div class=\textquotedbl{}cellcolor\textquotedbl\ % space + style=\textquotedbl{}% background:\LWR@origpound{}{}#1 % - " }% + \textquotedbl\ % + }% space \defaddtocounter{LWR@cellcolordepth}{1}% } @@ -9017,17 +9798,11 @@ end -- not --version \defaddtocounter{LWR@lastmulticolumn}{-1}% \LWR@maybenewtablerow% \LWR@htmltag{% - td colspan="#4" % + td colspan=\textquotedbl#4\textquotedbl\ % \IfValueT{#2}{ % rows? - rowspan="#2" % - \IfValueT{#1}{% vpos? - \ifstrequal{#1}{b}% - {style="\LWR@print@mbox{vertical-align:bottom}" }{}% - \ifstrequal{#1}{t}% - {style="\LWR@print@mbox{vertical-align:top}" }{}% - }% vpos? - }% rows? - class="td% + rowspan=\textquotedbl#2\textquotedbl\ % + }% + class=\textquotedbl{}td% \defcounter{LWR@mcolvertbarsl}{0}% \defcounter{LWR@mcolvertbarsr}{0}% \defcounter{LWR@mcolvertbarsldash}{0}% @@ -9053,8 +9828,20 @@ end -- not --version \ifnumcomp{\value{LWR@mcolvertbarsrdash}}{=}{1}{ tvertbarrdash}{}% \ifnumcomp{\value{LWR@mcolvertbarsrdash}}{>}{1}% { tvertbarrdoubledash}{}% - "% + \textquotedbl{}% \LWR@tdstartstyles% + \IfValueT{#1}{% vpos? + \ifstrequal{#1}{b}% + {% + \LWR@tdaddstyle% + \LWR@print@mbox{vertical-align:bottom}% + }{}% + \ifstrequal{#1}{t}% + {% + \LWR@tdaddstyle% + \LWR@print@mbox{vertical-align:top}% + }{}% + }% vpos? \LWR@addtabularrowcolor% \LWR@addcmidrulewidth% \LWR@addcdashline% @@ -9412,16 +10199,7 @@ end -- not --version \NewDocumentCommand{\LWR@HTML@@tabular}{d<> o m} {% \LWR@traceinfo{LWR@HTML@@tabular started}% - \ifnumcomp{\value{LWR@spandepth}}{>}{0}{% - \PackageWarning{lwarp}{% - A tabular is being used inside a span such as\MessageBreak - a minipage. Some formatting may not be correct\MessageBreak - in the tabular.\MessageBreak - It is recommended to use \protect\warpprintonly\space or the\MessageBreak - warpprint environment to isolate the span to\MessageBreak - print-only,% - } - }{}% + \LWR@spanwarnformat{tabular}% \addtocounter{LWR@tabulardepth}{1}% \boolfalse{LWR@startedrow}% \defcounter{LWR@hlines}{0}% @@ -9540,7 +10318,7 @@ end -- not --version }{}% \ifbool{LWR@usedmultirow}{% \ifbool{LWR@foundmrowcell}% - {}% + {\relax}% {% \PackageError{lwarp}% {% @@ -9577,7 +10355,7 @@ end -- not --version \begin{warpHTML} -\providecommand*{\@currentlabelname}{} +\def\@currentlabelname{\linkhomename}% \def\LWR@stripperiod#1.\ltx@empty#2\@nil{#1}% \newcommand*{\LWR@setlatestname}[1]{% \GetTitleStringExpand{#1}% @@ -9606,8 +10384,8 @@ end -- not --version \newcommand*{\LWR@lateximagenumberref}[1]{% \expandafter\LWR@setref\csname r@#1@lwarp\endcsname\LWR@fourthoffour{#1}% } -\newcommand*{\LWR@lwarplabel}[1]{% - \LWR@traceinfo{LWR@lwarplabel !#1!}% +\newcommand*{\LWR@write@lwarplabel}[1]{% + \LWR@traceinfo{LWR@write@lwarplabel !#1!}% \LWR@setlatestname{\@currentlabelname}% \@bsphack% \protected@write\@auxout{}% @@ -9627,36 +10405,59 @@ end -- not --version } -\newcommand*{\LWR@sublabel}[1]{% - \LWR@traceinfo{LWR@sublabel !#1!}% +\newcommand*{\LWR@label@subcreatetag}{% + \LWR@htmltag{a \LWR@print@mbox{id=\textquotedbl\LWR@sanitized\textquotedbl}}% + \LWR@htmltag{/a}% +} + +\newcommand*{\LWR@label@inmathcomment}{% + \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }% + {% + \mbox{% + \ifdef{\totwidth@}{\ifbool{LWR@amsmultline}{}{\hspace*{\totwidth@}}}{}% + \LWR@htmlclosecomment% + \LWR@label@subcreatetag% + \LWR@htmlopencomment% + }% mbox + }% mathjax + {% + \LWR@label@subcreatetag% + }% +} + +\newcommand*{\LWR@label@createtag}[1]{% + \LWR@traceinfo{LWR@label@createtag !#1!}% \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% {}% {% not lateximage \LWR@sanitize{#1}% - \ifbool{LWR@doingstartpars}% - {% pars allowed - \ifbool{LWR@doingapar}% - {% par started - \LWR@htmltag{a \LWR@print@mbox{id="\LWR@sanitized"}}% - \LWR@htmltag{/a}% - }% par started - {% par not started - \LWR@stoppars% - \LWR@htmltag{a \LWR@print@mbox{id="\LWR@sanitized"}}% - \LWR@htmltag{/a}% - \LWR@startpars% - }% par not started - }% pars allowed - {% pars not allowed - \LWR@htmltag{a \LWR@print@mbox{id="\LWR@sanitized"}}% - \LWR@htmltag{/a}% - }% pars not allowed + \ifbool{LWR@insidemathcomment}% + {% inside HTML math comment + \LWR@label@inmathcomment% + }% inside HTML math comment + {% not inside HTML math comment + \ifbool{LWR@doingstartpars}% + {% pars allowed + \ifbool{LWR@doingapar}% + {% par started + \LWR@label@subcreatetag% + }% par started + {% par not started + \LWR@stoppars% + \LWR@label@subcreatetag% + \LWR@startpars% + }% par not started + }% pars allowed + {% pars not allowed + \LWR@label@subcreatetag% + }% pars not allowed + }% not inside HTML math comment }% not lateximage } -\NewDocumentCommand{\LWR@new@label}{d() m o}{% +\NewDocumentCommand{\LWR@new@label}{m}{% \LWR@traceinfo{LWR@new@label: starting}% - \LWR@traceinfo{LWR@new@label: !#2!}% - \LWR@orig@label{#2}% + \LWR@traceinfo{LWR@new@label: !#1!}% + \LWR@orig@label{#1}% \LWR@traceinfo{% LWR@new@label: filesectionnames is % \ifbool{FileSectionNames}{true}{false}% @@ -9667,8 +10468,8 @@ end -- not --version \LWR@traceinfo{% LWR@new@label: LWR@htmlfilenumber is \arabic{LWR@htmlfilenumber}% }% - \LWR@lwarplabel{#2}% - \LWR@sublabel{#2}% + \LWR@write@lwarplabel{#1}% + \LWR@label@createtag{#1}% % \@esphack% \LWR@traceinfo{LWR@new@label: done}% } @@ -9676,7 +10477,7 @@ end -- not --version \newcommand*{\LWR@addlinktitle}{% \ifdefvoid{\LWR@ThisAltText}{}{ % space - title="\LWR@ThisAltText" % space + title=\textquotedbl\LWR@ThisAltText\textquotedbl\ % space \gdef\LWR@ThisAltText{}% }% } @@ -9685,7 +10486,7 @@ end -- not --version {% \LWR@sanitize{#1}% \LWR@traceinfo{LWR@startref A: !#1!}% - \LWR@htmltag{a href="% + \LWR@htmltag{a href=\textquotedbl% \LWR@traceinfo{LWR@startref B}% \LWR@print@mbox{\LWR@htmlrefsectionfilename{#1}}% \LWR@traceinfo{LWR@startref C}% @@ -9699,7 +10500,7 @@ end -- not --version {% \ifthenelse{\cnttest{\LWR@lateximagedepthref{#1}}{>}{0}}% {% - \LWR@ImagesName\LWR@lateximagenumberref{#1}% + lateximage-\BaseJobname-\LWR@lateximagenumberref{#1}% }% {% \LWR@traceinfo{LWR@startref D3}% @@ -9707,7 +10508,7 @@ end -- not --version }% }% \LWR@traceinfo{LWR@startref E}% - "% + \textquotedbl% \LWR@addlinktitle% }% \LWR@traceinfo{LWR@startref F}% @@ -9720,6 +10521,7 @@ end -- not --version \LWR@htmltag{/a}% } +\LWR@absorbstar{ref}% \NewDocumentCommand{\LWR@HTML@ref}{s m}{% \LWR@traceinfo{LWR@HTML@ref !#2!}% \IfBooleanTF{#1}% @@ -9728,10 +10530,8 @@ end -- not --version } \LWR@formatted{ref} -\NewDocumentCommand{\LWR@ref@ignorestar}{s m}{% - \LWR@print@ref{#2}% -} - +\CustomizeMathJax{\let\LWRref\ref} +\CustomizeMathJax{\renewcommand{\ref}{\ifstar\LWRref\LWRref}} \newcommand*{\pagerefPageFor}{see } \NewDocumentCommand{\LWR@new@pageref}{s m}{% \IfBooleanTF{#1}% @@ -9755,11 +10555,7 @@ end -- not --version \AtBeginDocument{ - -\def\@currentHref{% - autopage-\theLWR@currentautosec% -} - + \def\@currentHref{\BaseJobname-autopage-\theLWR@currentautosec} } \newcommand*{\LWR@linkcatcodes}{% @@ -9768,7 +10564,7 @@ end -- not --version \catcode`\&=12% \catcode`\~=12% \catcode`\_=12% - \LWR@FBcancel% + \LWR@hook@processingtags% } \newcommand*{\LWR@linkmediacatcodes}{% @@ -9776,16 +10572,16 @@ end -- not --version \catcode`\%=12% \catcode`\~=12% \catcode`\_=12% - \LWR@FBcancel% + \LWR@hook@processingtags% } \NewDocumentCommand{\LWR@subhyperref}{m}{% \LWR@traceinfo{LWR@subhyperref !#1!}% \LWR@sanitize{#1}% \LWR@htmltag{% - a href="\LWR@sanitized" % space + a href=\textquotedbl\LWR@sanitized\textquotedbl\ % space \LWR@addlinktitle % space - target="\_{}blank" % space + target=\textquotedbl\_{}blank\textquotedbl\ % space }% } @@ -9798,8 +10594,8 @@ end -- not --version \NewDocumentCommand{\LWR@subhyperrefclass}{m +m m}{% \LWR@htmltag{% a % space - href="\begingroup\@sanitize#1\endgroup" % space - class="#3" % space + href=\textquotedbl\begingroup\@sanitize#1\endgroup\textquotedbl\ % space + class=\textquotedbl#3\textquotedbl\ % space \LWR@addlinktitle % space }\LWR@orignewline% #2% @@ -9814,7 +10610,7 @@ end -- not --version \LWR@subhyperreftext% } -\newrobustcmd*{\href}{% +\newrobustcmd*{\LWR@href}{% \begingroup% \LWR@linkcatcodes% \LWR@hrefb% @@ -9828,7 +10624,7 @@ end -- not --version \endgroup% } -\newrobustcmd*{\nolinkurl}{% +\newrobustcmd*{\LWR@nolinkurl}{% \begingroup% \LWR@linkcatcodes% \LWR@nolinkurlb% @@ -9838,11 +10634,11 @@ end -- not --version \LWR@ensuredoingapar% \def\LWR@templink{#1}% \@onelevel@sanitize\LWR@templink% - \href{\LWR@templink}{\LWR@templink}% + \LWR@href{\LWR@templink}{\LWR@templink}% \endgroup% } -\newrobustcmd*{\url}{% +\newrobustcmd*{\LWR@url}{% \begingroup% \LWR@linkcatcodes% \LWR@urlb% @@ -9852,18 +10648,18 @@ end -- not --version \ifblank{#1}% {% \LWR@htmltag{img \LWR@indentHTML - src="#3.#4" \LWR@indentHTML - alt="#3" \LWR@indentHTML - style="#5" \LWR@indentHTML - class="#2" \LWR@orignewline + src=\textquotedbl#3.#4\textquotedbl \LWR@indentHTML + alt=\textquotedbl#3\textquotedbl \LWR@indentHTML + style=\textquotedbl#5\textquotedbl \LWR@indentHTML + class=\textquotedbl#2\textquotedbl \LWR@orignewline }% }% {% \LWR@htmltag{img \LWR@indentHTML - src="#3.#4" \LWR@indentHTML - alt="#1" \LWR@indentHTML - style="#5" \LWR@indentHTML - class="#2" \LWR@orignewline + src=\textquotedbl#3.#4\textquotedbl \LWR@indentHTML + alt=\textquotedbl#1\textquotedbl \LWR@indentHTML + style=\textquotedbl#5\textquotedbl \LWR@indentHTML + class=\textquotedbl#2\textquotedbl \LWR@orignewline }% }% } @@ -9878,6 +10674,7 @@ end -- not --version \begin{warpHTML} \NewDocumentCommand{\LWR@floatbegin}{m o}{% + \LWR@spanwarninvalid{float}% \ifbool{FormatWP}{\newline}{}% \LWR@stoppars% \addtocounter{LWR@thisautoid}{1}% @@ -9885,22 +10682,22 @@ end -- not --version \begingroup% \LWR@print@raggedright% \LWR@htmltag{% - figure id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}" % space - class="#1 \@nameuse{LWR@floatstyle@#1}"% + figure id=\textquotedbl% + \LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}% + \textquotedbl\ % space + class=\textquotedbl#1 \@nameuse{LWR@floatstyle@#1}\textquotedbl% }% \ifbool{FormatWP}{% \LWR@orignewline% \LWR@BlockClassWP{}{}{wp#1}% }{}% \renewcommand*{\@captype}{#1}% - \caption@settype{#1}% \LWR@startpars% \ifboolexpr{bool{FormatWP} and bool{WPMarkFloats}}{% === begin #1 === }{}% - \LWR@futurenonspacelet\LWR@mynexttoken\LWR@floatalignment% } \AtBeginDocument{ @@ -9913,8 +10710,16 @@ end -- not --version }{}% tocbasic }% AtBeginDocument -\let\@float\LWR@floatbegin -\let\@dblfloat\LWR@floatbegin +\AtBeginDocument{ + \def\@xfloat #1[#2]{% + \LWR@floatbegin{#1}[#2] + \LWR@futurenonspacelet\LWR@mynexttoken\LWR@floatalignment% + } + \def\@xdblfloat #1[#2]{% + \LWR@floatbegin{#1}[#2] + \LWR@futurenonspacelet\LWR@mynexttoken\LWR@floatalignment% + } +} \newcommand*{\LWR@floatend}{% \LWR@endfloatalignment% \ifboolexpr{bool{FormatWP} and bool{WPMarkFloats}}{% @@ -9930,8 +10735,10 @@ end -- not --version \LWR@startpars% \ifbool{FormatWP}{\newline}{}% } -\let\end@float\LWR@floatend -\let\end@dblfloat\LWR@floatend +\AtBeginDocument{ + \let\end@float\LWR@floatend + \let\end@dblfloat\LWR@floatend +} \newcounter{LWR@thisautoid} @@ -9942,8 +10749,21 @@ end -- not --version \newcommand*{\LWR@forcenewautoidanchor}{% \addtocounter{LWR@thisautoid}{1}% - \LWR@htmltag{a id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}"}% - \LWR@htmltag{/a}% + \ifbool{LWR@doingapar}% + {% + \LWR@htmltag{a id=\textquotedbl% + \LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}% + \textquotedbl\ }% space + \LWR@htmltag{/a }% + }% + {% + \LWR@stoppars% + \LWR@htmltag{a id=\textquotedbl% + \LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}% + \textquotedbl\ }% space + \LWR@htmltag{/a }% + \LWR@startpars% + }% } \newcommand*{\LWR@newautoidanchor}{% @@ -9981,11 +10801,26 @@ end -- not --version \AtBeginDocument{\providecommand*{\CaptionSeparator}{:~}} -\AtBeginDocument{\renewcommand{\@makecaption}[2]{% - \LWR@traceinfo{@makecaption}% - \LWR@isolate{#1}\CaptionSeparator\LWR@isolate{#2}% - \LWR@traceinfo{@makecaption: done}% -}% +\AtBeginDocument{ + \@ifpackageloaded{caption}{}{ + \let\LWR@orig@caption\@caption% + \long\def\@caption#1[#2]{% + \LWR@spanwarnformat{caption}% + \LWR@setlatestname{#2}% + \LWR@orig@caption{#1}[{#2}]% also takes third argument + }% + + \renewcommand{\@makecaption}[2]{% + \LWR@traceinfo{@makecaption}% + \caption@begin{\@captype}% + \LWR@isolate{#1}% + \edef\LWR@tempone{#1}% + \ifdefvoid{\LWR@tempone}{}{\CaptionSeparator}% + \LWR@isolate{#2}% + \caption@end% + \LWR@traceinfo{@makecaption: done}% + }% + } } @@ -10031,27 +10866,38 @@ end -- not --version } \AtBeginDocument{ -\LWR@formatted{caption@begin} -\LWR@formatted{caption@end} + \providecommand{\caption@begin}[1]{} + \LWR@formatted{caption@begin} + + \providecommand{\caption@end}{} + \LWR@formatted{caption@end} } -\let\LWR@origcaptionlistentry\captionlistentry +\AtBeginDocument{% +\@ifpackageloaded{caption}{ + \let\LWR@origcaptionlistentry\captionlistentry -\renewcommand*{\captionlistentry}{% - \LWR@ensuredoingapar% - \LWR@origcaptionlistentry% -} -\def\LWR@LTcaptionlistentry{% - \LWR@ensuredoingapar% - \LWR@forcenewautoidanchor% - \bgroup - \@ifstar{\egroup\LWR@LT@captionlistentry}% gobble * - {\egroup\LWR@LT@captionlistentry}% -}% + \renewcommand*{\captionlistentry}{% + \LWR@ensuredoingapar% + \LWR@origcaptionlistentry% + } + \def\LWR@LTcaptionlistentry{% + \LWR@ensuredoingapar% + \LWR@forcenewautoidanchor% + \bgroup% + \@ifstar{\egroup\LWR@LT@captionlistentry}% gobble * + {\egroup\LWR@LT@captionlistentry}% + }% -\def\LWR@LT@captionlistentry#1{% - \caption@listentry\@firstoftwo[\LTcaptype]{#1}% -}% + \def\LWR@LT@captionlistentry#1{% + \caption@listentry\@firstoftwo[\LTcaptype]{#1}% + }% +}% caption loaded +{% caption not loaded + \newcommand{\captionlistentry}[2][]{}% + \newcommand{\LWR@LT@captionlistentry}[2][]{}% +} +}% AtBeginDocument \let\LWR@origaddcontentsline\addcontentsline @@ -10069,15 +10915,15 @@ end -- not --version }% not TOC \LWR@origaddcontentsline{#1}{#2}{#3}% } -\AtBeginDocument{ +\RequirePackage{capt-of} -\let\LWR@origcaptionof\captionof - -\renewcommand*{\captionof}{% - \LWR@stoppars% - \LWR@origcaptionof% -} +\AtBeginDocument{ + \let\LWR@origcaptionof\captionof + \renewcommand*{\captionof}{% + \LWR@stoppars% + \LWR@origcaptionof% + } }% AtBeginDocument \end{warpHTML} @@ -10191,7 +11037,7 @@ end -- not --version \newcounter{SideTOCDepth} \setcounter{SideTOCDepth}{1} -\AtBeginDocument{% +\AtEndDocument{% \ifnumcomp{\value{SideTOCDepth}}{<}{\value{FileDepth}}{ \PackageWarningNoLine{lwarp} {% @@ -10240,7 +11086,8 @@ end -- not --version \NewDocumentCommand{\hypertoc}{m m +m m}{% \LWR@traceinfo{hypertoc !#1!#2!#3!#4!}% - \ifthenelse{\cnttest{#1}{<=}{\value{tocdepth}}}% + \ifnumcomp{#1}{>}{\value{tocdepth}}% + {}% {% \LWR@startpars% \LWR@subhyperrefclass{% @@ -10250,7 +11097,6 @@ end -- not --version \LWR@maybetocdata% \LWR@stoppars% }% - {}% \LWR@traceinfo{hypertoc done}% } @@ -10265,7 +11111,6 @@ end -- not --version } \newcommand{\hypertocfloat}[5]{% - \LWR@startpars% \@ifundefined{c@#3depth}{% \newcounter{#3depth}% \setcounter{#3depth}{1}% @@ -10324,6 +11169,9 @@ end -- not --version \newcounter{LWR@autoglossary} \setcounter{LWR@autoglossary}{0} +\newcommand*{\IndexPageSeparator}{, } +\newcommand*{\IndexRangeSeparator}{--} + \@ifundefined{chapter} {\newcommand*{\LWR@indexsection}[1]{\section*{#1}}} {\newcommand*{\LWR@indexsection}[1]{\chapter*{#1}}} @@ -10354,11 +11202,50 @@ end -- not --version \InlineClass{indexsubsubitem}{\LWR@htmlcomment{}}% } +\NewDocumentCommand{\LWR@xindex@modifyentry}{>{\SplitArgument{1}{|}}m} + {\LWR@xindex@modifyentrysub#1} +\newcommand*{\LWR@xindex@modifyentrysub}[2]{% + \edef\LWR@tempone{#1}% + \edef\LWR@temptwo{#2}% + \IfValueTF{#2}{% + \ifx#2(% + \appto\LWR@tempone{|(}% + \else% + \ifx#2)% + \appto\LWR@tempone{|)}% + \else% + \appto\LWR@tempone{% + |hyperindexformat\LWRleftbrace% + \LWRbackslash#2% + \LWRrightbrace% + }% + \fi% + \fi% + }% + {}% +} + +\newbool{LWR@xindex@tricked} +\boolfalse{LWR@xindex@tricked} + \def\LWR@wrindex#1{% + \ifbool{LWR@xindex}{% + \ifbool{LWR@xindex@tricked}{}{% + \protected@write\@indexfile{}% + {% + \LWRpercent\space hyperpage\LWRrightbrace% + \LWRpercent\space trick xindex to assume hyperref% + }% + \global\booltrue{LWR@xindex@tricked}% + }% + \LWR@xindex@modifyentry{#1}% + }{% + \def\LWR@tempone{#1}% + }% \addtocounter{LWR@autoindex}{1}% - \LWR@new@label{LWRindex-\arabic{LWR@autoindex}}% + \label{LWRindex-\arabic{LWR@autoindex}}% \protected@write\@indexfile{}% - {\string\indexentry{#1}{\arabic{LWR@autoindex}}}% + {\string\indexentry{\LWR@tempone}{\arabic{LWR@autoindex}}}% \endgroup% \@esphack% } @@ -10376,12 +11263,117 @@ end -- not --version \@esphack% } -\newcommand*{\LWR@indexnameref}[1]{\nameref{LWRindex-#1}} +\newcommand*{\LWR@indexnameref@anonref}[1]{% + \LWR@startref{LWRindex-#1}% + (*)% + \LWR@htmltag{/a}% +} + +\newcommand*{\LWR@indexnameref@ref}[1]{% + \edef\LWR@thisref{\csuse{r@LWRindex-#1}}% + \ifdefvoid{\LWR@thisref}{}{% + \edef\LWR@thisref{\expandafter\@firstoftwo\LWR@thisref}% + \ifdefvoid{\LWR@thisref}% + {\LWR@indexnameref@anonref{#1}}% + {\ref{LWRindex-#1}}% + }% +} + +\newcommand*{\LWR@indexnameref@refnameref}[1]{% + \edef\LWR@thisref{\csuse{r@LWRindex-#1}}% + \ifdefvoid{\LWR@thisref}{}{% + \edef\LWR@thisref{\expandafter\@firstoftwo\LWR@thisref}% + \ifdefvoid{\LWR@thisref}{}{% + \ifdefstring{\LWR@thisref}{(*)}% + {}% + {\ref{LWRindex-#1} }% space + }% + }% + \nameref{LWRindex-#1}% +} + +\newcommand*{\LWR@indexnameref@cref}[1]{% + \edef\LWR@thisref{\csuse{r@LWRindex-#1}}% + \ifdefvoid{\LWR@thisref}{% + \nameref{LWRindex-#1}% + }{% + \edef\LWR@thisref{\expandafter\@firstoftwo\LWR@thisref}% + \ifdefvoid{\LWR@thisref}{% + \nameref{LWRindex-#1}% + }{% + \ifdefstring{\LWR@thisref}{(*)}{% + \LWR@indexnameref@anonref{#1}% + }{% + \cref{LWRindex-#1}% + }% + }% + }% +} + +\newcommand*{\LWR@indexnameref@crefnameref}[1]{% + \edef\LWR@thisref{\csuse{r@LWRindex-#1}}% + \ifdefvoid{\LWR@thisref}% + {}% + {% + \edef\LWR@thisref{\expandafter\@firstoftwo\LWR@thisref}% + \ifdefvoid{\LWR@thisref}% + {}% + {% + \ifdefstring{\LWR@thisref}{(*)}% + {}% + {\cref{LWRindex-#1}} % space + }% + }% + \nameref{LWRindex-#1}% +} + +\newcommand*{\LWR@indexnameref}[1]{% + {% group + \ifdef{\caption@xref}{% + \renewcommand*{\caption@xref}[2]{(*)}% + }{}% + \ifdefstring{\LWR@IndexRef}{ref}{% + \LWR@indexnameref@ref{#1}% + }{% + \ifdefstring{\LWR@IndexRef}{nameref}{% + \nameref{LWRindex-#1}% + }{% + \ifdefstring{\LWR@IndexRef}{refnameref}{% + \LWR@indexnameref@refnameref{#1}% + }{% + \ifdefstring{\LWR@IndexRef}{cref}{% + \LWR@indexnameref@cref{#1}% + }{% + \ifdefstring{\LWR@IndexRef}{crefnameref}{% + \LWR@indexnameref@crefnameref{#1}% + }{% + \ifdefstring{\LWR@IndexRef}{autoref}{% + \LWR@indexnameref@cref{#1}% + }{% text string + \LWR@startref{LWRindex-#1}% + \LWR@IndexRef% + \LWR@htmltag{/a}% + }}}}}}% + }% group +} -\newrobustcmd{\LWR@doindexentry}[1]{% +\newrobustcmd{\LWR@doindexentrysubsub}[2]{% \IfInteger{#1}% {\LWR@indexnameref{#1}}% {#1}% + \IfValueT{#2}{% + \IndexRangeSeparator% + \IfInteger{#2}% + {\LWR@indexnameref{#2}}% + {#2}% + }% +} +\NewDocumentCommand{\LWR@doindexentrysub}{m >{\SplitArgument{1}{#1}}m} + {\LWR@doindexentrysubsub#2} + +\newcommand*{\LWR@doindexentry}[1]{% + \relax% required + \expandafter\LWR@doindexentrysub\expandafter{\IndexRangeSeparator}{#1}% } \newcommand{\LWR@hyperindexrefnullified}{% @@ -10400,8 +11392,36 @@ end -- not --version \renewrobustcmd{\textsl}[1]{\LWR@HTML@textsl{\LWR@doindexentry{##1}}}% } -\newcommand{\hyperindexref}[1]{% - \def\LWR@tempone{#1}% +\newcommand*{\hyperindexref}[1]{% + \relax% required + \expandafter\LWR@hyperindexref@comma\expandafter{\IndexPageSeparator}{#1}% +} +\NewDocumentCommand{\LWR@hyperindexref@comma} + {m >{\SplitList{#1}} m} + {% + \def\LWR@hyperindexref@thiscomma{}% + \def\LWR@hyperindexref@nextcomma{#1}% + \ProcessList{#2}\LWR@hyperindexref@@comma% + } +\newcommand*{\LWR@hyperindexref@@comma}[1]{% + \LWR@hyperindexref@thiscomma% + \renewcommand{\LWR@hyperindexref@thiscomma}{\LWR@hyperindexref@nextcomma}% + \expandafter\LWR@hyperindexref@range\expandafter{\IndexRangeSeparator}{#1}% +} +\NewDocumentCommand{\LWR@hyperindexref@range} + {m >{\SplitArgument{1}{#1}} m} + {\LWR@hyperindexrefsub#2} + +\newcommand*{\LWR@hyperindexrefsub}[2]{% + \LWR@hyperindexrefsubtwo{#1}% + \IfValueT{#2}{% + \IndexRangeSeparator% + \LWR@hyperindexrefsubtwo{#2}% + }% +} + +\newcommand*{\LWR@hyperindexrefsubtwo}[1]{% + \edef\LWR@tempone{#1}% \IfBeginWith{\LWR@tempone}{ }{% \StrGobbleLeft{\LWR@tempone}{1}[\LWR@tempone]% }{}% @@ -10415,6 +11435,14 @@ end -- not --version }% } +\LetLtxMacro\hyperpage\hyperindexref + +\def\nohyperpage#1{} + +\def\hyperindexformat#1#2{% + #1{\hyperpage{#2}}% +}% + \end{warpHTML} \begin{warpprint} @@ -10425,14 +11453,6 @@ end -- not --version \providecommand{\glo@name}{} \end{warpall} \begin{warpHTML} -\def\bibliography#1{% - \if@filesw - \immediate\write\@auxout{\string\bibdata{#1}}% - \fi - \begingroup% - \@input@{\BaseJobname.bbl}% lwarp - \endgroup% -} \renewcommand{\@biblabel}[1]{[#1]\quad} \AtBeginDocument{ @@ -10459,8 +11479,8 @@ end -- not --version \end{warpHTML} - \begin{warpHTML} +\newcommand*{\LWR@restoreMathJaxformatting}{} \newcommand*{\LWR@restoreorigformatting}{% \LWR@traceinfo{LWR@restoreorigformatting}% @@ -10477,6 +11497,7 @@ end -- not --version \let\thinspace\LWR@origthinspace% disable HTML short unbreakable space \let\negthinspace\LWR@orignegthinspace% disable HTML negative short unbreakable space \let\textellipsis\LWR@origtextellipsis% + \let\vdots\LWR@origvdots% \let\textless\LWR@origtextless% \let\textgreater\LWR@origtextgreater% \let\&\LWR@origampersand% @@ -10484,10 +11505,6 @@ end -- not --version \LetLtxMacro\normalfont\LWR@orignormalfont% \let\sp\LWR@origsp% \let\sb\LWR@origsb% - \LetLtxMacro\textsuperscript\LWR@origtextsuperscript% - \LetLtxMacro\@textsuperscript\LWR@orig@textsuperscript% - \LetLtxMacro\textsubscript\LWR@origtextsubscript% - \LetLtxMacro\@textsubscript\LWR@orig@textsubscript% \LetLtxMacro\underline\LWR@origunderline% \let~\LWR@origtilde% \let\enskip\LWR@origenskip% @@ -10506,7 +11523,144 @@ end -- not --version \let\enddisplaymath\LWR@orig@enddisplaymath% \LWR@restoreorigaccents% \LWR@restoreoriglists% - \LWR@FBcancel% + \LWR@hook@processingtags% + \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }% + {\LWR@restoreMathJaxformatting}% + {}% +} +\end{warpHTML} +\begin{warpHTML} +\newcommand*{\LWR@dash}{-} +\catcode`\$=\active% redefining $ below +\catcode`\_=12% redefining \_ below +\newcommand*{\LWR@nullfonts}{% + \renewcommand*{\$}{-}% + \renewcommand*{\%}{-}% + \renewcommand*{\_}{-}% + \renewcommand*{\}}{-}% + \renewcommand*{\{}{-}% + \renewcommand*{\&}{-}% used to be 'and' + \renewcommand*{\#}{-}% + \renewcommand*{\,}{-}% + \renewcommand*{~}{-}% + \renewcommand*{\`}[1]{##1}% + \renewcommand*{\'}[1]{##1}% + \renewcommand*{\^}[1]{##1}% + \renewcommand*{\~}[1]{##1}% + \renewcommand*{\=}[1]{##1}% + \renewcommand*{\u}[1]{##1}% + \renewcommand*{\.}[1]{##1}% + \renewcommand*{\"}[1]{##1}% + \renewcommand*{\H}[1]{##1}% + \renewcommand*{\v}[1]{##1}% + \renewcommand*{\d}[1]{##1}% + \renewcommand*{\c}[1]{##1}% + \renewcommand*{\b}[1]{##1}% + \renewcommand*{\t}[1]{##1}% + \let\newline\LWR@dash% + \let\textasciicircum\LWR@dash% + \let\textasciitilde\LWR@dash% + \let\textasteriskcentered\LWR@dash% + \let\textbackslash\LWR@dash% + \let\textbar\LWR@dash% + \let\textbardbl\LWR@dash% + \let\textbigcircle\LWR@dash% + \let\textbraceleft\LWR@dash% + \let\textbraceright\LWR@dash% + \let\textbullet\LWR@dash% + \let\textcopyright\LWR@dash% + \let\textdagger\LWR@dash% + \let\textdaggerdbl\LWR@dash% + \let\textdollar\LWR@dash% + \let\textellipsis\LWR@dash% + \let\textemdash\LWR@dash% + \let\textendash\LWR@dash% + \let\textexclamdown\LWR@dash% + \let\textgreater\LWR@dash% + \let\textless\LWR@dash% + \let\textordfeminine\LWR@dash% + \let\textordmasculine\LWR@dash% + \let\textparagraph\LWR@dash% + \let\textperiodcentered\LWR@dash% + \let\textpertenthousand\LWR@dash% + \let\textperthousand\LWR@dash% + \let\textquestiondown\LWR@dash% + \let\textquotedblleft\LWR@dash% + \let\textquotedblright\LWR@dash% + \let\textquoteleft\LWR@dash% + \let\textquoteright\LWR@dash% + \let\textregistered\LWR@dash% + \let\textsection\LWR@dash% + \let\textsterling\LWR@dash% + \let\texttrademark\LWR@dash% + \let\textunderscore\LWR@dash% + \let\textvisiblespace\LWR@dash% + \let\copyright\LWR@dash% + \let\dag\LWR@dash% + \let\ddag\LWR@dash% + \let\dots\LWR@dash% + \let\P\LWR@dash% + \let\pounds\LWR@dash% + \let\S\LWR@dash% + \renewcommand*{\aa}{a}% + \renewcommand*{\AA}{A}% + \renewcommand*{\AE}{AE}% + \renewcommand*{\ae}{ae}% + \renewcommand*{\dh}{d}% + \renewcommand*{\DH}{D}% + \renewcommand*{\DJ}{D}% + \renewcommand*{\dj}{d}% + \renewcommand*{\IJ}{IJ}% + \renewcommand*{\ij}{ij}% + \renewcommand*{\L}{L}% + \renewcommand*{\l}{l}% + \renewcommand*{\NG}{NG}% + \renewcommand*{\ng}{ng}% + \renewcommand*{\O}{O}% + \renewcommand*{\o}{o}% + \renewcommand*{\oe}{oe}% + \renewcommand*{\OE}{OE}% + \renewcommand*{\ss}{ss}% + \renewcommand*{\SS}{SS}% + \renewcommand*{\th}{th}% + \renewcommand*{\TH}{TH}% + \let\guillemotleft\@empty% + \let\guilsinglleft\@empty% + \let\quotedblbase\@empty% + \let\textquotedbl\@empty% + \let\guillemotright\@empty% + \let\guilsinglright\@empty% + \let\quotesinglbase\@empty% + \renewcommand*{\HTMLunicode}[1]{}% + \renewcommand*{\HTMLentity}[1]{}% + \renewcommand{\textsuperscript}[1]{##1}% + \renewcommand{\textsubscript}[1]{##1}% + \renewcommand{\underline}[1]{##1}% + \RenewDocumentCommand{\hspace}{s m}{}% + \RenewDocumentCommand{\LWR@htmlspanclass}{o m +m}{##3}% + \DeclareExpandableDocumentCommand{\InlineClass}{D{(}{)}{} o m +m}{##4}% + \def\(##1\){}% + \def\[##1\]{}% + \RenewDocumentCommand{\LWR@subsingledollar}{s m m m}{}% + \renewcommand*{\TeX}{TeX}% + \renewcommand*{\LaTeX}{LaTeX}% + \renewcommand*{\LaTeXe}{LaTeX2e}% + \renewcommand*{\LuaTeX}{LuaTeX}% + \renewcommand*{\LuaLaTeX}{LuaLaTeX}% + \renewcommand*{\XeTeX}{XeTeX}% + \renewcommand*{\XeLaTeX}{XeLaTeX}% + \renewcommand*{\ConTeXt}{ConTeXt}% + \renewcommand*{\BibTeX}{BibTeX}% + \renewcommand*{\MakeIndex}{MakeIndex}% + \renewcommand*{\AmS}{AmS}% + \renewcommand*{\MiKTeX}{MiKTeX}% + \renewcommand*{\LyX}{LyX}% + \def\texorpdfstring{\expandafter\@secondoftwo}% +} +\catcode`\$=3% +\catcode`\_=8% +\newcommand*{\FilenameNullify}[1]{% + \appto{\LWR@nullfonts}{#1}% } \end{warpHTML} \begin{warpall} @@ -10534,6 +11688,9 @@ end -- not --version \newbool{LWR@indisplaymathimage} +\newbool{LWR@insidemathcomment} +\boolfalse{LWR@insidemathcomment} + \newbool{LWR@xfakebold} \boolfalse{LWR@xfakebold} @@ -10778,7 +11935,10 @@ end -- not --version \LWR@traceinfo{LWR@subsingledollar: Mathjax}% {% \textbackslash(% - \LWR@HTMLsanitize{#4}% + {% + \ifmmode\else\LWR@print@ttfamily\fi% + \LWR@HTMLsanitize{#4}% + }% \textbackslash)% }% }% mathjax @@ -10813,7 +11973,7 @@ end -- not --version { \textbackslash[% - \LWR@HTMLsanitize{#1}% + {\LWR@print@ttfamily\LWR@HTMLsanitize{#1}}% \textbackslash] }% mathjax @@ -10859,11 +12019,11 @@ end -- not --version } \AtBeginDocument{ -\protected\gdef\(#1\){$#1$} -\protected\gdef\[#1\]{$$#1$$} + \protected\gdef\(#1\){$#1$} + \protected\gdef\[#1\]{$$#1$$} } -\endgroup +\endgroup% active $ \AtBeginDocument{ \LetLtxMacro\LWR@openbracketnormal\[ \LetLtxMacro\LWR@closebracketnormal\] @@ -10911,8 +12071,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} @@ -10944,29 +12102,53 @@ end -- not --version } \newcounter{LWR@nextequation} -\newcommand*{\LWR@syncmathjax}{% - \ifcsdef{thechapter}{ - \LWR@stoppars% - \InlineClass{hidden}{ - \textbackslash( - \textbackslash{}seteqsection \{\thechapter\} - \textbackslash) +\newcommand\LWR@article@theequation{\@arabic\c@equation} + +\newcommand\LWR@book@theequation + {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@equation} + +\newcommand\LWR@chapter@theequation{\thechapter.\arabic{equation}} +\newcommand\LWR@section@thequation{\thesection.\arabic{equation}} +\newcommand\LWR@subsection@thequation{\thesubsection.\arabic{equation}} + +\AtBeginDocument{ + % default per article class: + \newcommand*{\theMathJaxsubequations}{0} + \newcommand*{\theMathJaxsection}{} + \newcommand*{\theMathJaxequation}{\arabic{equation}} + + \ifdefstrequal{\theequation}{\LWR@article@theequation} + {}{ + \ifdefstrequal{\theequation}{\LWR@book@theequation}{ + \renewcommand*{\theMathJaxsection}{\ifnum \c@chapter>\z@ \thechapter.\fi} + }{ + \ifdefstrequal{\theequation}{\LWR@subsection@thequation}{ + \renewcommand*{\theMathJaxsection}{\thesubsection{}.} + }{ + \ifdefstrequal{\theequation}{\LWR@section@thequation}{ + \renewcommand*{\theMathJaxsection}{\thesection{}.} + }{ + \ifdefstrequal{\theequation}{\LWR@chapter@theequation}{ + \renewcommand*{\theMathJaxsection}{\thechapter{}.} + }{% unknown format + \PackageWarningNoLine{lwarp} + {% + Unknown equation tag format for \protect\theequation.\MessageBreak + Article-style equation numbering will be used% } - \LWR@startpars% - } - {}% not using chapters - \ifthenelse{\cnttest{\value{equation}}>0} - { - \setcounter{LWR@nextequation}{\value{equation}} - \addtocounter{LWR@nextequation}{1} + }}}}} +} +\newcommand*{\LWR@syncmathjax}{% \LWR@stoppars% \InlineClass{hidden}{ - \textbackslash( - \textbackslash{}seteqnumber \{\arabic{LWR@nextequation}\} - \textbackslash) + \textbackslash(% + \textbackslash{}seteqnumber% + \{\theMathJaxsubequations\}% + \{\theMathJaxsection\}% + \{\theMathJaxequation\}% + \textbackslash)% } \LWR@startpars% - }{}% not eq > 0 } \NewDocumentCommand{\LWR@hidelatexequation}{m +m}{% \LWR@stoppars @@ -10975,27 +12157,34 @@ end -- not --version \begingroup \@nameuse{LWR@orig#1} \LWR@restoreorigformatting + \booltrue{LWR@insidemathcomment} #2 \@nameuse{LWR@origend#1} \endgroup \LWR@htmlclosecomment + \boolfalse{LWR@insidemathcomment} \LWR@startpars } \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 } \AtBeginDocument{ -\let\LWR@origequation\equation -\let\LWR@origendequation\endequation -\csletcs{LWR@origequation*}{equation*} -\csletcs{LWR@origendequation*}{endequation*} + \let\LWR@origequation\equation + \let\LWR@origendequation\endequation + \csletcs{LWR@origequation*}{equation*} + \csletcs{LWR@origendequation*}{endequation*} } \newcommand*{\LWR@doequation}[2]{% @@ -11067,39 +12256,35 @@ end -- not --version \newcommand*{\LWR@syncnotenames}{\LWR@synconenotename{LWRfootnote}{\footnotename}} \AtBeginDocument{ -\let\equation\relax -\let\endequation\relax -\csletcs{equation*}{relax} -\csletcs{endequation*}{relax} + \let\equation\relax + \let\endequation\relax + \csletcs{equation*}{relax} + \csletcs{endequation*}{relax} } \AtBeginDocument{ + \NewEnviron{equation}% + {\LWR@doequation{\BODY}{equation}}% + [\LWR@doendequation{equation}] -\NewEnviron{equation}% - {\LWR@doequation{\BODY}{equation}}% - [\LWR@doendequation{equation}] - -\LetLtxMacro\LWR@equationnormal\equation -\LetLtxMacro\endLWR@equationnormal\endequation - + \LetLtxMacro\LWR@equationnormal\equation + \LetLtxMacro\endLWR@equationnormal\endequation }% AtBeginDocument \AtBeginDocument{ + \NewEnviron{equation*}% + {\LWR@doequation{\BODY}{equation*}}% + [\LWR@doendequation{equation*}] -\NewEnviron{equation*}% - {\LWR@doequation{\BODY}{equation*}}% - [\LWR@doendequation{equation*}] - -\csletcs{LWR@equationnormalstar}{equation*} -\csletcs{LWR@endequationnormalstar}{endequation*} - + \csletcs{LWR@equationnormalstar}{equation*} + \csletcs{LWR@endequationnormalstar}{endequation*} }% AtBeginDocument \AtBeginDocument{ -\LetLtxMacro\LWR@equationless\equation -\LetLtxMacro\endLWR@equationless\endequation -\csletcs{LWR@equationlessstar}{equation*} -\csletcs{LWR@endequationlessstar}{endequation*} + \LetLtxMacro\LWR@equationless\equation + \LetLtxMacro\endLWR@equationless\endequation + \csletcs{LWR@equationlessstar}{equation*} + \csletcs{LWR@endequationlessstar}{endequation*} } \newcommand*{\displaymathnormal}{% @@ -11140,22 +12325,6 @@ end -- not --version \newbool{LWR@amsmultline} \boolfalse{LWR@amsmultline} -\newcommand*{\LWR@htmlmathlabel}[1]{% - \LWR@traceinfo{LWR@htmlmathlabelb #1}% - \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }% - {% - \text{% - \ifbool{LWR@amsmultline}{}{\hspace*{\totwidth@}}% - \LWR@htmlclosecomment% - \LWR@origltx@label{#1}% - \LWR@htmlopencomment% - }% text - }% mathjax - {% - \LWR@origltx@label{#1}% - }% -} - \newcommand*{\LWR@beginhideamsmath}{ \LWR@stoppars \LWR@origtilde\LWR@orignewline @@ -11163,12 +12332,14 @@ end -- not --version \begingroup \LWR@restoreorigformatting + \booltrue{LWR@insidemathcomment} } \newcommand*{\LWR@endhideamsmath}{ \endgroup \LWR@htmlclosecomment + \boolfalse{LWR@insidemathcomment} \LWR@orignewline \LWR@startpars } @@ -11202,7 +12373,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% @@ -11308,7 +12479,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 } @@ -11367,8 +12538,10 @@ end -- not --version }% \LWR@traceinfo{lateximage: LWR@LIpage is \arabic{LWR@LIpage}}% \LWR@htmltag{span\LWR@indentHTML% - id="lateximage-\BaseJobname-\arabic{LWR@lateximagenumber}"\LWR@indentHTML - class="lateximagesource"\LWR@orignewline + id=\textquotedbl{}% + lateximage-\BaseJobname-\arabic{LWR@lateximagenumber}% + \textquotedbl\LWR@indentHTML + class=\textquotedbl{}lateximagesource\textquotedbl\LWR@orignewline }% \LWR@traceinfo{lateximage: about to write to \BaseJobname-images.txt}% \IfBooleanTF{#1}% starred @@ -11403,7 +12576,7 @@ end -- not --version \LWR@htmlopencomment% \addtocounter{LWR@lateximagedepth}{1}% \LWR@traceinfo{lateximage: about to create a new page}% - \LWR@orignewpage% + \LWR@maybe@orignewpage% \LWR@traceinfo{lateximage: about to create minipage}% \ifdimless{\linewidth}{6in}{% \LWR@print@minipage{\linewidth}% @@ -11450,7 +12623,7 @@ end -- not --version {% end of outer-most lateximage \LWR@traceinfo{lateximage: ending outer-most lateximage}% \endLWR@print@minipage% - \LWR@orignewpage% + \LWR@maybe@orignewpage% \LWR@print@vspace*{.5\baselineskip}% \LWR@htmlclosecomment% \LWR@traceinfo{lateximage: The page after the image is \arabic{page}}% @@ -11486,7 +12659,7 @@ end -- not --version \begin{warpHTML} -\renewenvironment*{center} +\newenvironment*{LWR@HTML@center} { \LWR@forcenewpage \ifbool{FormatWP} @@ -11495,7 +12668,9 @@ end -- not --version } {\endBlockClass} -\renewenvironment*{flushright} +\LWR@formattedenv{center} + +\newenvironment*{LWR@HTML@flushright} { \LWR@forcenewpage \ifbool{FormatWP} @@ -11504,7 +12679,9 @@ end -- not --version } {\endBlockClass} -\renewenvironment*{flushleft} +\LWR@formattedenv{flushright} + +\newenvironment*{LWR@HTML@flushleft} { \LWR@forcenewpage \ifbool{FormatWP} @@ -11513,6 +12690,8 @@ end -- not --version } {\endBlockClass} +\LWR@formattedenv{flushleft} + \newcommand*{\LWR@HTML@centering}{% \ifbool{HTMLDebugComments}{% @@ -11563,8 +12742,24 @@ 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} \LWR@PreloadedPackage{ulem} @@ -11592,7 +12787,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}}% @@ -11733,117 +12928,21 @@ end -- not --version \end{warpprint} - - - \begin{warpHTML} + \AtEndPreamble{ \RequirePackage{cleveref} } -\AfterEndPreamble{ -\LWR@traceinfo{Patching cleveref.} - -\def\LWR@orig@@@setcref#1#2{\cref@getlabel{#2}{\@templabel}#1{\@templabel}{}{}}% - -\ifdefequal{\@@setcref}{\LWR@orig@@@setcref}{% before v0.21 - \renewcommand*{\@@setcref}[2]{#1{\ref{#2}}{}{}} -}{ - \ifdefequal{\@@@setcref}{\LWR@orig@@@setcref}{% as of v0.21 - \renewcommand*{\@@@setcref}[2]{#1{\ref{#2}}{}{}} - }{ - \PackageWarning{lwarp-cleveref}{ - Unknown version of cleveref. - \protect\cref\space will fail. - }% - } -} - -\def\LWR@orig@@@setcrefrange#1#2#3{% - \cref@getlabel{#2}{\@labela}% - \cref@getlabel{#3}{\@labelb}% - #1{\@labela}{\@labelb}{}{}{}{}}% - -\ifdefequal{\@@setcrefrange}{\LWR@orig@@@setcrefrange}{ - \renewcommand{\@@setcrefrange}[3]{% - #1{\ref{#2}}{\ref{#3}}{}{}{}{}% - } -}{ - \ifdefequal{\@@@setcrefrange}{\LWR@orig@@@setcrefrange}{ - \renewcommand{\@@@setcrefrange}[3]{% - #1{\ref{#2}}{\ref{#3}}{}{}{}{}% - } - }{ - \PackageWarning{lwarp-cleveref}{ - Unknown version of cleveref. - \protect\crefrange\space will fail. - } - } -} - - - -\newcommand*{\cpagerefFor}{for} - -\def\LWR@orig@@setcpageref#1#2{% before v0.21 - \cref@getpageref{#2}{\@temppage}#1{\@temppage}{}{}}% - -\def\LWR@orig@@@setcpageref#1#2{% as of v0.21 - \cpageref@getlabel{#2}{\@temppage}#1{\@temppage}{}{}}% - -\ifdefequal{\@@setcpageref}{\LWR@orig@@setcpageref}{ - \renewcommand*{\@@setcpageref}[2]{% - #1{\cpagerefFor\ \cref{#2}}{}{}% - } -}{ - \ifdefequal{\@@@setcpageref}{\LWR@orig@@@setcpageref}{ - \renewcommand*{\@@@setcpageref}[2]{% - #1{\cpagerefFor\ \cref{#2}}{}{}% - } - } - { - \PackageWarning{lwarp-cleveref}{ - Unknown version of cleveref. - \protect\cpageref\space will fail. - } - } -} +\end{warpHTML} +\begin{warpHTML} -\def\LWR@orig@@setcpagerefrange#1#2#3{% before v0.21 - \cref@getpageref{#2}{\@pagea}% - \cref@getpageref{#3}{\@pageb}% - #1{\@pagea}{\@pageb}{}{}{}{}}% - -\def\LWR@orig@@@setcpagerefrange#1#2#3{% as of v0.21 - \cpageref@getlabel{#2}{\@pagea}% - \cpageref@getlabel{#3}{\@pageb}% - #1{\@pagea}{\@pageb}{}{}{}{}}% - -\ifdefequal{\@@setcpagerefrange}{\LWR@orig@@setcpagerefrange}{ - \renewcommand*{\@@setcpagerefrange}[3]{% - #1{\cpagerefFor\ \cref{#2}}{\cref{#3}}{}{}{}{}% - } -}{ - \ifdefequal{\@@@setcpagerefrange}{\LWR@orig@@@setcpagerefrange}{ - \renewcommand*{\@@@setcpagerefrange}[3]{% - #1{\cpagerefFor\ \cref{#2}}{\cref{#3}}{}{}{}{}% - } - } - { - \PackageWarning{lwarp-cleveref}{ - Unknown version of cleveref. - \protect\cpagerefrange\space will fail. - } - } -} - -}% AfterEndPreamble - -\LetLtxMacro\LWR@orig@label\label -\RenewDocumentCommand{\label}{}{\LWR@new@label} +\LetLtxMacro\LWR@orig@label\label% includes memoir, before cleveref +\LetLtxMacro\label\LWR@new@label \LetLtxMacro\LWR@orig@pageref\pageref -\RenewDocumentCommand{\pageref}{}{\LWR@new@pageref} +\LetLtxMacro\pageref\LWR@new@pageref + \end{warpHTML} @@ -11864,7 +12963,7 @@ end -- not --version \setcounter{LWR@virtualpagedepth}{0} \NewDocumentEnvironment{LWR@setvirtualpage}{s O{1}}{% \ifnumequal{\value{LWR@virtualpagedepth}}{0}{% - \IfBooleanT{#1}{\LWR@orignewpage}% + \IfBooleanT{#1}{\LWR@maybe@orignewpage}% \setlength{\linewidth}{6in/#2}% \setlength{\textwidth}{6in}% \setlength{\textheight}{9in}% @@ -11905,13 +13004,15 @@ end -- not --version \addtocounter{LWR@thisautoidWP}{1}% \LWR@htmltag{% - div id="\LWR@print@mbox{autoidWP-\arabic{LWR@thisautoidWP}}" % - class="wpminipage"% + div id=\textquotedbl% + \LWR@print@mbox{autoidWP-\arabic{LWR@thisautoidWP}}% + \textquotedbl\ % space + class=\textquotedbl{}wpminipage\textquotedbl% }% }{}% \LWR@traceinfo{minipage: creating div class}% -\LWR@htmltag{div class="minipage" style="% +\LWR@htmltag{div class=\textquotedbl{}minipage\textquotedbl\ style=\textquotedbl% \ifthenelse{\equal{#1}{t}}{\LWR@print@mbox{vertical-align:bottom} ; }{}% \ifthenelse{\equal{#1}{c}}{\LWR@print@mbox{vertical-align:middle} ; }{}% \ifthenelse{\equal{#1}{b}}{\LWR@print@mbox{vertical-align:top} ; }{}% @@ -11933,7 +13034,8 @@ end -- not --version }% \LWR@traceinfo{minipage: about to print the height}% \ifblank{#2}{}{height:\LWR@printlength{\LWR@minipageheight} ; }% -"}% +\textquotedbl% +}% \ifnumequal{\value{LWR@virtualpagedepth}}{1}{% \addtolength{\LWR@minipagewidth}{-3em}% undo frame padding @@ -12173,6 +13275,13 @@ color:\LWR@origpound\LWR@tempcolor% \end{warpHTML} +\begin{warpall} + +\newbool{FixSmallCaps} +\boolfalse{FixSmallCaps} + +\end{warpall} + \begin{warpHTML} @@ -12185,8 +13294,6 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@formatted{emph} -\newcommand{\LWR@null@emph}[1]{#1} - \DeclareRobustCommand{\LWR@HTML@textmd}[1]{% {% \LWR@HTML@mdseries% @@ -12196,8 +13303,6 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@formatted{textmd} -\newcommand{\LWR@null@textmd}[1]{#1} - \DeclareRobustCommand{\LWR@HTML@textbf}[1]{% {% \LWR@HTML@bfseries% @@ -12207,8 +13312,6 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@formatted{textbf} -\newcommand{\LWR@null@textbf}[1]{#1} - \DeclareRobustCommand{\LWR@HTML@texteb}[1]{% {% \LWR@HTML@ebweight% @@ -12218,8 +13321,6 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@formatted{texteb} -\newcommand{\LWR@null@texteb}[1]{#1} - \DeclareRobustCommand{\LWR@HTML@textlg}[1]{% {% \LWR@HTML@lgweight% @@ -12229,8 +13330,6 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@formatted{textlg} -\newcommand{\LWR@null@textlg}[1]{#1} - \DeclareRobustCommand{\LWR@HTML@textrm}[1]{% {% \LWR@HTML@rmfamily% @@ -12240,8 +13339,6 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@formatted{textrm} -\newcommand{\LWR@null@textrm}[1]{#1} - \DeclareRobustCommand{\LWR@HTML@textsf}[1]{% {% \LWR@HTML@sffamily% @@ -12251,8 +13348,6 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@formatted{textsf} -\newcommand{\LWR@null@textsf}[1]{#1} - \DeclareRobustCommand{\LWR@HTML@texttt}[1]{% {% \LWR@HTML@ttfamily% @@ -12262,8 +13357,6 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@formatted{texttt} -\newcommand{\LWR@null@texttt}[1]{#1} - \DeclareRobustCommand{\LWR@HTML@textup}[1]{% {% \LWR@HTML@upshape% @@ -12273,8 +13366,6 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@formatted{textup} -\newcommand{\LWR@null@textup}[1]{#1} - \DeclareRobustCommand{\LWR@HTML@textit}[1]{% {% \LWR@HTML@itshape% @@ -12284,8 +13375,6 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@formatted{textit} -\newcommand{\LWR@null@textit}[1]{#1} - \DeclareRobustCommand{\LWR@HTML@textsc}[1]{% {% \LWR@HTML@scshape% @@ -12295,8 +13384,6 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@formatted{textsc} -\newcommand{\LWR@null@textsc}[1]{#1} - \DeclareRobustCommand{\LWR@HTML@textulc}[1]{% {% \LWR@HTML@ulcshape% @@ -12306,8 +13393,6 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@formatted{textulc} -\newcommand{\LWR@null@textulc}[1]{#1} - \@ifundefined{textsi}{ \LetLtxMacro\LWR@print@textsi\LWR@print@textsc }{} @@ -12321,8 +13406,6 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@formatted{textsi} -\newcommand{\LWR@null@textsi}[1]{#1} - \DeclareRobustCommand{\LWR@HTML@textsl}[1]{% {% \slshape% @@ -12332,174 +13415,30 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@formatted{textsl} -\newcommand{\LWR@null@textsl}[1]{#1} +\newrobustcmd{\LWR@HTML@textssc}[1]{\textsc{#1}} +\LWR@formatted{textssc} \DeclareRobustCommand{\LWR@HTML@textnormal}[1]{\textmd{\textrm{\textup{#1}}}} \LWR@formatted{textnormal} -\newcommand{\LWR@null@textnormal}[1]{#1} - -\newcommand{\LWR@null@rmfamily}{} -\newcommand{\LWR@null@sffamily}{} -\newcommand{\LWR@null@ttfamily}{} -\newcommand{\LWR@null@bfseries}{} -\newcommand{\LWR@null@ebweight}{} -\newcommand{\LWR@null@lgweight}{} -\newcommand{\LWR@null@mdseries}{} -\newcommand{\LWR@null@upshape}{} -\newcommand{\LWR@null@slshape}{} -\newcommand{\LWR@null@scshape}{} -\newcommand{\LWR@null@itshape}{} -\newcommand{\LWR@null@normalfont}{} -\newcommand{\LWR@null@em}{} - -\catcode`\$=\active% redefining $ below -\catcode`\_=12% redefining \_ below -\newcommand*{\LWR@nullfonts}{% -\LetLtxMacro\emph\LWR@null@emph% -\LetLtxMacro\textmd\LWR@null@textmd% -\LetLtxMacro\textbf\LWR@null@textbf% -\LetLtxMacro\textrm\LWR@null@textrm% -\LetLtxMacro\textsf\LWR@null@textsf% -\LetLtxMacro\texttt\LWR@null@texttt% -\LetLtxMacro\textup\LWR@null@textup% -\LetLtxMacro\textit\LWR@null@textit% -\LetLtxMacro\textsc\LWR@null@textsc% -\LetLtxMacro\textulc\LWR@null@textulc% -\LetLtxMacro\textsi\LWR@null@textsi% -\LetLtxMacro\textsl\LWR@null@textsl% -\LetLtxMacro\textnormal\LWR@null@textnormal% -\LetLtxMacro\rmfamily\LWR@null@rmfamily% -\LetLtxMacro\sffamily\LWR@null@sffamily% -\LetLtxMacro\ttfamily\LWR@null@ttfamily% -\LetLtxMacro\bfseries\LWR@null@bfseries% -\LetLtxMacro\mdseries\LWR@null@mdseries% -\LetLtxMacro\upshape\LWR@null@upshape% -\LetLtxMacro\slshape\LWR@null@slshape% -\LetLtxMacro\scshape\LWR@null@scshape% -\LetLtxMacro\ulcshape\LWR@null@ulcshape% -\LetLtxMacro\sishape\LWR@null@sishape% -\LetLtxMacro\itshape\LWR@null@itshape% -\LetLtxMacro\normalfont\LWR@null@normalfont% -\LetLtxMacro\em\LWR@null@em% -\renewcommand*{\$}{-}% -\renewcommand*{\%}{-}% -\renewcommand*{\_}{-}% -\renewcommand*{\}}{-}% -\renewcommand*{\{}{-}% -\renewcommand*{\&}{and}% -\renewcommand*{\#}{-}% -\renewcommand*{\,}{-}% -\renewcommand*{~}{-}% -\renewcommand*{\^}[1]{-}% -\renewcommand*{\~}[1]{-}% -\renewcommand*{\newline}{-}% -\renewcommand*{\textasciicircum}{-}% -\renewcommand*{\textasciitilde}{-}% -\renewcommand*{\textasteriskcentered}{-}% -\renewcommand*{\textbackslash}{-}% -\renewcommand*{\textbar}{-}% -\renewcommand*{\textbardbl}{-}% -\renewcommand*{\textbigcircle}{-}% -\renewcommand*{\textbraceleft}{-}% -\renewcommand*{\textbraceright}{-}% -\renewcommand*{\textbullet}{-}% -\renewcommand*{\textcopyright}{-}% -\renewcommand*{\textdagger}{-}% -\renewcommand*{\textdaggerdbl}{-}% -\renewcommand*{\textdollar}{-}% -\renewcommand*{\textellipsis}{-}% -\renewcommand*{\textemdash}{-}% -\renewcommand*{\textendash}{-}% -\renewcommand*{\textexclamdown}{-}% -\renewcommand*{\textgreater}{-}% -\renewcommand*{\textless}{-}% -\renewcommand*{\textordfeminine}{-}% -\renewcommand*{\textordmasculine}{-}% -\renewcommand*{\textparagraph}{-}% -\renewcommand*{\textperiodcentered}{-}% -\renewcommand*{\textpertenthousand}{-}% -\renewcommand*{\textperthousand}{-}% -\renewcommand*{\textquestiondown}{-}% -\renewcommand*{\textquotedblleft}{-}% -\renewcommand*{\textquotedblright}{-}% -\renewcommand*{\textquoteleft}{-}% -\renewcommand*{\textquoteright}{-}% -\renewcommand*{\textregistered}{-}% -\renewcommand*{\textsection}{-}% -\renewcommand*{\textsterling}{-}% -\renewcommand*{\texttrademark}{-}% -\renewcommand*{\textunderscore}{-}% -\renewcommand*{\textvisiblespace}{-}% -\renewcommand*{\copyright}{-}% -\renewcommand*{\dag}{-}% -\renewcommand*{\ddag}{-}% -\renewcommand*{\dots}{-}% -\renewcommand*{\P}{-}% -\renewcommand*{\pounds}{-}% -\renewcommand*{\S}{-}% -\renewcommand*{\aa}{a}% -\renewcommand*{\AA}{A}% -\renewcommand*{\AE}{AE}% -\renewcommand*{\ae}{ae}% -\renewcommand*{\dh}{d}% -\renewcommand*{\DH}{D}% -\renewcommand*{\DJ}{D}% -\renewcommand*{\dj}{d}% -\renewcommand*{\IJ}{IJ}% -\renewcommand*{\ij}{ij}% -\renewcommand*{\L}{L}% -\renewcommand*{\l}{l}% -\renewcommand*{\NG}{NG}% -\renewcommand*{\ng}{ng}% -\renewcommand*{\O}{O}% -\renewcommand*{\o}{o}% -\renewcommand*{\oe}{oe}% -\renewcommand*{\OE}{OE}% -\renewcommand*{\ss}{ss}% -\renewcommand*{\SS}{SS}% -\renewcommand*{\th}{th}% -\renewcommand*{\TH}{TH}% -\renewcommand*{\guillemotleft}{}% -\renewcommand*{\guilsinglleft}{}% -\renewcommand*{\quotedblbase}{}% -\renewcommand*{\textquotedbl}{}% -\renewcommand*{\guillemotright}{}% -\renewcommand*{\guilsinglright}{}% -\renewcommand*{\quotesinglbase}{}% -\renewcommand*{\HTMLunicode}[1]{}% -\renewcommand*{\HTMLentity}[1]{}% -\renewcommand{\textsuperscript}[1]{##1}% -\renewcommand{\textsubscript}[1]{##1}% -\renewcommand{\underline}[1]{##1}% -\RenewDocumentCommand{\hspace}{s m}{}% -\RenewDocumentCommand{\LWR@htmlspanclass}{o m +m}{##3}% -\DeclareExpandableDocumentCommand{\InlineClass}{D{(}{)}{} o m +m}{##4}% -\def\(##1\){}% -\def\[##1\]{}% -\RenewDocumentCommand{\LWR@subsingledollar}{s m m m}{}% -\protected\def$##1${}% -\renewcommand*{\TeX}{TeX}% -\renewcommand*{\LaTeX}{LaTeX}% -\renewcommand*{\LaTeXe}{LaTeX2e}% -\renewcommand*{\LuaTeX}{LuaTeX}% -\renewcommand*{\LuaLaTeX}{LuaLaTeX}% -\renewcommand*{\XeTeX}{XeTeX}% -\renewcommand*{\XeLaTeX}{XeLaTeX}% -\renewcommand*{\ConTeXt}{ConTeXt}% -\renewcommand*{\BibTeX}{BibTeX}% -\renewcommand*{\MakeIndex}{MakeIndex}% -\renewcommand*{\AmS}{AmS}% -\renewcommand*{\MiKTeX}{MiKTeX}% -\renewcommand*{\LyX}{LyX}% -\let\texorpdfstring\relax% -\newcommand{\texorpdfstring}[2]{##2}% -} -\catcode`\$=3% -\catcode`\_=8% -\newcommand*{\FilenameNullify}[1]{% - \appto{\LWR@nullfonts}{#1}% +\FilenameNullify{% + \LetLtxMacro\emph\@firstofone% + \LetLtxMacro\textmd\@firstofone% + \LetLtxMacro\textbf\@firstofone% + \LetLtxMacro\texteb\@firstofone% + \LetLtxMacro\textlg\@firstofone% + \LetLtxMacro\textrm\@firstofone% + \LetLtxMacro\textsf\@firstofone% + \LetLtxMacro\texttt\@firstofone% + \LetLtxMacro\textup\@firstofone% + \LetLtxMacro\textit\@firstofone% + \LetLtxMacro\textsc\@firstofone% + \LetLtxMacro\textulc\@firstofone% + \LetLtxMacro\textsi\@firstofone% + \LetLtxMacro\textsl\@firstofone% + \LetLtxMacro\textssc\@firstofone% + \LetLtxMacro\textnormal\@firstofone% } \newcommand*{\LWR@f@family}{rm} @@ -12540,74 +13479,135 @@ color:\LWR@origpound\LWR@tempcolor% }% }{\endBlockClass\LWR@startpars} -\newrobustcmd*{\LWR@HTML@mdseries}{\renewcommand*{\LWR@f@series}{md}} +\newrobustcmd*{\LWR@HTML@mdseries}{% + \LWR@print@mdseries% + \renewcommand*{\LWR@f@series}{md}% +} \LWR@formatted{mdseries} -\newrobustcmd*{\LWR@HTML@bfseries}{\renewcommand*{\LWR@f@series}{bf}} +\newrobustcmd*{\LWR@HTML@bfseries}{% + \LWR@print@bfseries% + \renewcommand*{\LWR@f@series}{bf}% +} \LWR@formatted{bfseries} -\newrobustcmd*{\LWR@HTML@ebweight}{\renewcommand*{\LWR@f@series}{eb}} +\newrobustcmd*{\LWR@HTML@ebweight}{% + \LWR@print@ebweight% + \renewcommand*{\LWR@f@series}{eb}% +} \LWR@formatted{ebweight} -\newrobustcmd*{\LWR@HTML@lgweight}{\renewcommand*{\LWR@f@series}{lg}} +\newrobustcmd*{\LWR@HTML@lgweight}{% + \LWR@print@lgweight% + \renewcommand*{\LWR@f@series}{lg}% +} \LWR@formatted{lgweight} -\newrobustcmd*{\LWR@HTML@rmfamily}{\renewcommand*{\LWR@f@family}{rm}} +\newrobustcmd*{\LWR@HTML@rmfamily}{% + \LWR@print@rmfamily% + \renewcommand*{\LWR@f@family}{rm}% +} \LWR@formatted{rmfamily} -\newrobustcmd*{\LWR@HTML@sffamily}{\renewcommand*{\LWR@f@family}{sf}} +\newrobustcmd*{\LWR@HTML@sffamily}{% + \LWR@print@sffamily% + \renewcommand*{\LWR@f@family}{sf}% +} \LWR@formatted{sffamily} -\newrobustcmd*{\LWR@HTML@ttfamily}{\renewcommand*{\LWR@f@family}{tt}} +\newrobustcmd*{\LWR@HTML@ttfamily}{% + \LWR@print@ttfamily% + \renewcommand*{\LWR@f@family}{tt}% +} \LWR@formatted{ttfamily} +\newrobustcmd*{\LWR@HTML@upshape}{% + \LWR@print@upshape% + \renewcommand*{\LWR@f@shape}{up}% +} +\AtBeginDocument{\LWR@formatted{upshape}} -\newrobustcmd*{\LWR@HTML@upshape}{\renewcommand*{\LWR@f@shape}{up}} -\LWR@formatted{upshape} - -\newrobustcmd*{\LWR@HTML@itshape}{\renewcommand*{\LWR@f@shape}{it}} -\LWR@formatted{itshape} +\newrobustcmd*{\LWR@HTML@itshape}{% + \LWR@print@itshape% + \renewcommand*{\LWR@f@shape}{it}% +} +\AtBeginDocument{\LWR@formatted{itshape}} -\newrobustcmd*{\LWR@HTML@scshape}{\renewcommand*{\LWR@f@shapecaps}{sc}} -\LWR@formatted{scshape} +\newrobustcmd*{\LWR@HTML@scshape}{% + \ifbool{FixSmallCaps}{}{% + \LWR@print@scshape% + }% + \renewcommand*{\LWR@f@shapecaps}{sc}% +} +\AtBeginDocument{\LWR@formatted{scshape}} \@ifundefined{ulcshape}{ \LetLtxMacro\ulcshape\upshape }{} -\newrobustcmd*{\LWR@HTML@ulcshape}{\renewcommand*{\LWR@f@shapecaps}{ulc}} -\LWR@formatted{ulcshape} +\newrobustcmd*{\LWR@HTML@ulcshape}{% + \LWR@print@ulcshape% + \renewcommand*{\LWR@f@shapecaps}{ulc}% +} +\AtBeginDocument{\LWR@formatted{ulcshape}} \@ifundefined{sishape}{ \LetLtxMacro\sishape\scshape }{} \newrobustcmd*{\LWR@HTML@sishape}{% + \ifbool{FixSmallCaps}{}{% + \LWR@print@sishape% + }% \renewcommand*{\LWR@f@shape}{it} \renewcommand*{\LWR@f@shapecaps}{sc}% } -\LWR@formatted{sishape} +\AtBeginDocument{\LWR@formatted{sishape}} -\newrobustcmd*{\LWR@HTML@slshape}{\renewcommand*{\LWR@f@shape}{sl}} -\LWR@formatted{slshape} +\newrobustcmd*{\LWR@HTML@slshape}{% + \LWR@print@slshape% + \renewcommand*{\LWR@f@shape}{sl}% +} +\AtBeginDocument{\LWR@formatted{slshape}} + +\newrobustcmd{\LWR@HTML@sscshape}{\LWR@HTML@scshape} +\AtBeginDocument{\LWR@formatted{sscshape}} \newrobustcmd*{\LWR@HTML@normalfont}{\rmfamily\mdseries\upshape\ulcshape} \LWR@formatted{normalfont} +\FilenameNullify{% + \LetLtxMacro\rmfamily\@empty% + \LetLtxMacro\sffamily\@empty% + \LetLtxMacro\ttfamily\@empty% + \LetLtxMacro\bfseries\@empty% + \LetLtxMacro\ebweight\@empty% + \LetLtxMacro\lgweight\@empty% + \LetLtxMacro\mdseries\@empty% + \LetLtxMacro\upshape\@empty% + \LetLtxMacro\slshape\@empty% + \LetLtxMacro\sishape\@empty% + \LetLtxMacro\scshape\@empty% + \LetLtxMacro\itshape\@empty% + \LetLtxMacro\ulcshape\@empty% + \LetLtxMacro\sscshape\@empty% + \LetLtxMacro\normalfont\@empty% +} + \renewcommand{\sp}[1]{\text{<sup>#1</sup>}{}} \renewcommand{\sb}[1]{\text{<sub>#1</sub>}{}} -\renewrobustcmd{\textsuperscript}[1]{\LWR@htmlspan{sup}{#1}} +\newrobustcmd{\LWR@HTML@textsuperscript}[1]{\LWR@htmlspan{sup}{#1}} +\LWR@formatted{textsuperscript} -\renewcommand{\@textsuperscript}[1]{\LWR@htmlspan{sup}{#1}} +\newcommand{\LWR@HTML@@textsuperscript}[1]{\LWR@htmlspan{sup}{#1}} +\LWR@formatted{@textsuperscript} -\AtBeginDocument{ -\renewrobustcmd{\textsubscript}[1]{\LWR@htmlspan{sub}{#1}} -} + \newrobustcmd{\LWR@HTML@textsubscript}[1]{\LWR@htmlspan{sub}{#1}} + \LWR@formatted{textsubscript} -\AtBeginDocument{ -\renewcommand{\@textsubscript}[1]{\LWR@htmlspan{sub}{#1}} -} + \newcommand{\LWR@HTML@@textsubscript}[1]{\LWR@htmlspan{sub}{#1}} + \LWR@formatted{@textsubscript} \AtBeginDocument{\let\up\textsuperscript} @@ -12656,6 +13656,7 @@ color:\LWR@origpound\LWR@tempcolor% \renewrobustcmd*{\negthinspace}{\HTMLunicode{202f}} % HTML thin non-breakable space \renewrobustcmd*{~}{\HTMLentity{nbsp}} \renewrobustcmd*{\textellipsis}{\HTMLunicode{2026}} +\renewrobustcmd*{\vdots}{\HTMLunicode{22EE}} } \newcommand*{\LWR@font@size}{normalsize} @@ -12699,7 +13700,24 @@ color:\LWR@origpound\LWR@tempcolor% \newcommand*{\LWR@HTML@hfill}{\qquad} \LWR@formatted{hfill} -\newcommand*{\LWR@HTML@hrulefill}{\rule{1in}{1pt}} +\newcommand*{\LWR@HTML@hrulefill}{% + \ifbool{LWR@doingapar}% + {\rule{1in}{1pt}}% + {% + \LWR@findcurrenttextcolor% + \ifdefstring{\LWR@tempcolor}{000000}% + {% + \begin{BlockClass}{hrule}% + \end{BlockClass}% + }% + {% + \begin{BlockClass}[% + border-top: 1px solid \LWR@origpound\LWR@tempcolor % space + ]{hrule}% + \end{BlockClass}% + }% + }% +}% \LWR@formatted{hrulefill} \newcommand*{\LWR@HTML@dotfill}{\dots} @@ -12721,25 +13739,25 @@ color:\LWR@origpound\LWR@tempcolor% } \newcommand*{\LWR@minipagestartpars}{% -\ifbool{LWR@minipagethispar}{\LWR@startpars}{}% + \ifbool{LWR@minipagethispar}{\LWR@startpars}{}% } \newcommand*{\LWR@minipagestoppars}{% -\ifbool{LWR@minipagethispar}{\LWR@stoppars}{}% + \ifbool{LWR@minipagethispar}{\LWR@stoppars}{}% } \renewrobustcmd*{\quad}{% -\LWR@minipagestoppars% -\HTMLunicode{2003}% -\LWR@minipagestartpars% + \LWR@minipagestoppars% + \HTMLunicode{2003}% + \LWR@minipagestartpars% } \renewrobustcmd*{\qquad}{\quad\quad} \renewrobustcmd*{\enskip}{% -\LWR@minipagestoppars% -\HTMLunicode{2002}% -\LWR@minipagestartpars% + \LWR@minipagestoppars% + \HTMLunicode{2002}% + \LWR@minipagestartpars% } \newlength{\LWR@tempwidth} @@ -12760,8 +13778,8 @@ color:\LWR@origpound\LWR@tempcolor% }% {% \LWR@htmltagc{% - span style="width:\LWR@printlength{\LWR@tempwidth}; % extra space - display:inline-block"% + span style=\textquotedbl{}width:\LWR@printlength{\LWR@tempwidth}; % extra space + display:inline-block\textquotedbl% }% \ifbool{FormatWP}{% \setlength{\LWR@templengthone}{\LWR@tempwidth}% @@ -12826,7 +13844,7 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@findcurrenttextcolor% \LWR@htmltagc{% span\LWR@indentHTML% - style="% + style=\textquotedbl% \ifbool{FormatWP}{}{background:\LWR@currenttextcolor ; }% width:\LWR@printlength{\LWR@tempwidth} ; % height:\LWR@printlength{\LWR@tempheight} ; % @@ -12843,7 +13861,7 @@ color:\LWR@origpound\LWR@tempcolor% transform: translate(0pt,\LWR@printlength{\LWR@tempraise}); % \LWR@indentHTML% }% - display:inline-block;"\LWR@orignewline% + display:inline-block;\textquotedbl\LWR@orignewline% }% \ifbool{FormatWP}{% \setlength{\LWR@templengthone}{\LWR@tempwidth}% @@ -12864,30 +13882,40 @@ color:\LWR@origpound\LWR@tempcolor% \begin{warpHTML} -\DeclareDocumentCommand{\phantomsection}{}{% -\begingroup% -\boolfalse{LWR@forcinghtmltoc}% -\section*{}% -\endgroup% +\newrobustcmd*{\LWR@phantomsection}{% + \begingroup% + \boolfalse{LWR@forcinghtmltoc}% + \section*{}% + \endgroup% } \end{warpHTML} \begin{warpall} +\newbool{LWR@warnXe} +\boolfalse{LWR@warnXe} + \newrobustcmd*{\Xe} - {X\hspace{-.1667em}\raisebox{-.5ex}{E}} + {% + X\hspace{-.1667em}\raisebox{-.5ex}{E}% + \global\booltrue{LWR@warnXe}% + } \AtBeginDocument{ -\@ifpackageloaded{graphics}{ - \@ifpackageloaded{metalogo}{}{ - \renewrobustcmd*{\Xe} - {X\hspace{-.1667em}\raisebox{-.5ex}{\reflectbox{E}}} - } -}{ - \PackageWarningNoLine{lwarp}{Load graphicx or graphics - for improved XeTeX logo} + \@ifpackageloaded{graphics}{ + \@ifpackageloaded{metalogo}{}{ + \renewrobustcmd*{\Xe} + {X\hspace{-.1667em}\raisebox{-.5ex}{\reflectbox{E}}} + } + }{} } + +\AtEndDocument{ + \ifbool{LWR@warnXe}{ + \PackageWarningNoLine{lwarp}{Load graphicx or graphics + for improved XeTeX logo} + }{} } \providerobustcmd*{\XeTeX}{\mbox{\Xe\hspace{-.125em}\TeX}} @@ -13003,11 +14031,39 @@ 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}}{} \end{warpHTML} +\begin{warpprint} +\@ifclassloaded{memoir}{\LWR@origRequirePackage{xcolor}}{} +\end{warpprint} + \begin{warpHTML} \@ifclassloaded{memoir}{\RequirePackage{lwarp-patch-memoir}}{} \end{warpHTML} @@ -13029,6 +14085,7 @@ color:\LWR@origpound\LWR@tempcolor% \quad% } } + \renewcommand*{\LWR@printchaptername}{} \renewcommand{\thepart}{\@Roman\c@part} \@ifundefined{chapter}{ \renewcommand{\thesection}{\@arabic\c@section} @@ -13087,6 +14144,8 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@isolate{\CTEX@chaptername}~% \CTEX@chapter@aftername% }% + + \renewcommand*{\LWR@printchaptername}{} }{} } \end{warpHTML} @@ -13124,7 +14183,7 @@ color:\LWR@origpound\LWR@tempcolor% \typeout{Package lwarp:} \typeout{If the error} \typeout{\space\space``! Undefined control sequence. - \space ... \space \protect\@begindocumenthook''} + \space ... \space \protect\__hook begindocument''} \typeout{occurs here, use the polyglossia macro:} \typeout{\space\space\protect\setmainlanguage\protect{...\protect}} \typeout{---} @@ -13160,60 +14219,117 @@ color:\LWR@origpound\LWR@tempcolor% }{}% } +\newcommand*{\LWR@nomathjaxwarn}[2]{% + \@ifpackageloaded{lwarp-#1}{% + \ifblank{#2}{% + \PackageWarningNoLine{lwarp} + {% + Lwarp does not provide MathJax support for #1.\MessageBreak + Use SVG math by removing the Lwarp mathjax option% + } + }{% + \PackageWarningNoLine{lwarp} + {% + Lwarp does not provide MathJax support for #1.\MessageBreak + #2% + } + }% + }{}% +} +\newcommand*{\LWR@forceSVGmessage}[1]{% + SVG math output may be enabled for select math\MessageBreak + expressions to preserve #1 visual\MessageBreak + features for those particular expressions.\MessageBreak + Before the chosen inline math, use \protect\inlinemathother\MessageBreak + to begin using SVG math, and \protect\inlinemathnormal\MessageBreak + afterward to resume using MathJax math.\MessageBreak + Before display math, use \protect\displaymathother\MessageBreak + to begin using SVG math, and use \protect\displaymathnormal\MessageBreak + after to resume using MathJax for the following math.\MessageBreak + Or, use SVG math for all expressions by removing\MessageBreak + the mathjax option for the lwarp package% +} \AtBeginDocument{ \ifbool{mathjax}{ + \LWR@nomathjaxwarn{aligned-overset}{} + \LWR@nomathjaxwarn{amscdx} + {\LWR@forceSVGmessage{amscdx}} \LWR@mathjaxwarn{arydshln} {In a math array, do not use the optional argument\MessageBreak for \protect\cdashline.\space\space Furthermore, \protect\cline\space is not\MessageBreak supported by MathJax} + \LWR@nomathjaxwarn{autoaligne}{} \LWR@mathjaxwarn{autonum} {MathJax does not support equation+.\MessageBreak You may use the warpprint and warpHTML\MessageBreak environments to isolate the package load\MessageBreak and the equation+ environments} - \LWR@mathjaxwarn{backnaur} - {You may enclose its uses inside\MessageBreak - lateximage environments to force SVG output,\MessageBreak - but this also changes the print output} \LWR@mathjaxwarn{bigdelim} {Delimiters appear only of the first line} + \LWR@nomathjaxwarn{boldtensors}{} \LWR@mathjaxwarn{booktabs} - {In a math array, do not use (trim) for \protect\cmidrule} + {\protect\cmidrule\space is not displayed} \LWR@mathjaxwarn{breqn} {Each environment becomes an SVG image} + \LWR@mathjaxwarn{colortbl} + {Colors are ignored in MathJax.\MessageBreak + (Text mode tabular does support colortbl.)\MessageBreak + \LWR@forceSVGmessage{colortbl}} \LWR@mathjaxwarn{delarray} - {Enclose its uses inside lateximage\MessageBreak - environments to force SVG output} - \LWR@mathjaxwarn{jkmath}{} - \LWR@mathjaxwarn{mathspec}{} + {\LWR@forceSVGmessage{delarray}} + \LWR@nomathjaxwarn{gauss} + {\LWR@forceSVGmessage{gauss}} + \LWR@mathjaxwarn{hhline} + {A simple \protect\hline\space is used} + \LWR@mathjaxwarn{isomath} + {Some of the symbol font macros such as \protect\mathsfbfit\MessageBreak + do not use a sans font because MathJax does not yet\MessageBreak + have sans Greek. Tensors may look like vectors% + } + \LWR@nomathjaxwarn{jkmath} + {\LWR@forceSVGmessage{jkmath}} + \LWR@mathjaxwarn{libertinust1math} + {Some of the symbol font macros such as \protect\mathsfbfit\MessageBreak + do not use a sans font because MathJax does not yet\MessageBreak + have sans Greek. Tensors may look like vectors% + } \LWR@mathjaxwarn{mathtools} - {Avoid starred macros.\MessageBreak - See the Lwarp manual for other limitations} + {See the Lwarp manual regarding the disallowspaces\MessageBreak + and showonlyrefs options, the alignat environment,\MessageBreak + and \protect\DeclarePairedDelimiter\space and related% + } + \LWR@mathjaxwarn{mathspec} + {Double quotes are removed, even inside \protect\text} \LWR@mathjaxwarn{multirow} {Multirow works as expected in text mode, but\MessageBreak limited emulation is provided for MathJax math.\MessageBreak \protect\multirow\space ignores all arguments except\MessageBreak the text} - \LWR@mathjaxwarn{pb-diagram} - {Enclose its uses inside lateximage environments\MessageBreak - to force SVG output} - \LWR@mathjaxwarn{physics} - {The third-party extension is not yet used.\MessageBreak - Avoid starred macros and automatic delimiters.\MessageBreak - Use all mandatory arguments, adding empty as needed.\MessageBreak - See the Lwarp manual for details} + \LWR@mathjaxwarn{nicematrix} + {Keys/values are ignored in MathJax.\MessageBreak + \protect\Cdots, etc. do not span multiple cells.\MessageBreak + AutoNiceMatrix, etc. are not supported for MathJax.\MessageBreak + \LWR@forceSVGmessage{nicematrix}% + } + \LWR@nomathjaxwarn{pb-diagram} + {\LWR@forceSVGmessage{pb-diagram}} + \LWR@nomathjaxwarn{tensind}{} \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 Some symbol fonts are not supported by MathJax,\MessageBreak - and are only approximated} + and are only approximated.\MessageBreak + Greek macros such as \protect\alpha\space respond to the math-style\MessageBreak + option. Latin symbols does not, per MathJax\MessageBreak + limitations, unless placed inside \protect\symbit\space or similar} + \LWR@nomathjaxwarn{unitsdef}{} \LWR@mathjaxwarn{witharrows} {Arrows can only point to the next line.\MessageBreak Text is only placed on a single line} - \LWR@mathjaxwarn{xy} - {xy works in text, but in math you must\MessageBreak - enclose its uses inside lateximage\MessageBreak - environments to force SVG output} + \LWR@nomathjaxwarn{xy} + {In text, xy works as-is. SVG images will be generated.\MessageBreak + \LWR@forceSVGmessage{xy}} }{} } \endinput |