diff options
author | Karl Berry <karl@freefriends.org> | 2019-07-16 21:14:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-07-16 21:14:36 +0000 |
commit | cf12bb505e9a4455ac9fb495f04cf7a2d079186c (patch) | |
tree | eeb96649fd30bc3ac8752f78005b52d8efc47d57 /Master/texmf-dist/tex/latex/lwarp/lwarp.sty | |
parent | d2055c0169cf583fb9af2de4061319e5b31a4303 (diff) |
lwarp (16jul19)
git-svn-id: svn://tug.org/texlive/trunk@51653 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp.sty | 216 |
1 files changed, 158 insertions, 58 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty index e9e738fd8a2..dcd7ad4fa11 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty @@ -17,7 +17,7 @@ %% version 2005/12/01 or later. \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{lwarp} - [2019/06/08 v0.72 Allows LaTeX to directly produce HTML5 output.] + [2019/07/11 v0.73 Allows LaTeX to directly produce HTML5 output.] @@ -383,6 +383,7 @@ \LWR@loadafter{lua-visual-debug} \LWR@loadafter{luacolor} \LWR@loadafter{luatodonotes} +\LWR@loadafter{lyluatex} \LWR@loadafter{magaz} \LWR@notmemoirloadafter{makeidx} \LWR@loadafter{manyfoot} @@ -515,6 +516,7 @@ \LWR@loadafter{srcltx} \LWR@loadafter{srctex} \LWR@loadafter{stabular} +\LWR@loadafter{stackengine} \LWR@notltjloadafter{stfloats} \LWR@loadafter{struktex} \LWR@loadafter{subcaption} @@ -687,6 +689,7 @@ \arabic{LWR@tempcountone}% } + \newcommand*{\LWR@patcherror}[2]{% \PackageError{lwarp} {Unable to patch package #1, macro #2} @@ -701,10 +704,41 @@ \@ifpackageloaded{xeCJK}{ \renewcommand{\LWR@isolate}[1]{\null#1\null}% }{} +\newcommand*{\LWR@forceemptyline}{% + \LWR@origrule{0pt}{1\baselineskip}% + \LWR@orignewline% +} \long\def\LWR@firstoffour#1#2#3#4{#1} \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} +\DeclareRobustCommand\LWR@gsavebox[1]{% + \@ifnextchar(%) + {\LWR@@gsavepicbox#1}{\@ifnextchar[{\LWR@@gsavebox#1}{\LWR@gsbox#1}}}% +\long\def\LWR@gsbox#1#2{\global\setbox#1\hbox{% + \color@setgroup#2\color@endgroup}} +\def\LWR@@gsavebox#1[#2]{% + \@ifnextchar [{\LWR@@igsavebox#1[#2]}{\LWR@@igsavebox#1[#2][c]}} +\long\def\LWR@@igsavebox#1[#2][#3]#4{% + \LWR@gsbox#1{\@imakebox[#2][#3]{#4}}} +\def\LWR@@gsavepicbox#1(#2,#3){% + \@ifnextchar[%] + {\LWR@@igsavepicbox#1(#2,#3)}{\LWR@@igsavepicbox#1(#2,#3)[]}} +\long\def\LWR@@igsavepicbox#1(#2,#3)[#4]#5{% + \LWR@gsbox#1{\@imakepicbox(#2,#3)[#4]{#5}}} + +\def\LWR@glrbox#1{% + \edef\reserved@a{% + \endgroup + \global\setbox#1\hbox{% + \begingroup\aftergroup}% + \def\noexpand\@currenvir{\@currenvir}% + \def\noexpand\@currenvline{\on@line}}% + \reserved@a + \@endpefalse + \color@setgroup + \ignorespaces} +\let\LWR@endglrbox\LWR@endlrbox \let\LWRpercent\@percentchar \catcode`\$=12 \def\LWRdollar{$} @@ -1264,7 +1298,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@origclearpage% \changed +\LWR@orignewpage% changed from clearpage \if@filesw \immediate\write\@mainaux{\string\@input{#1_html_inc.aux}}% changed \fi @@ -1282,7 +1316,7 @@ \immediate\write\@partaux{\relax}% \fi \@input@{#1_html_inc.tex}% changed - \LWR@origclearpage% changed + \LWR@orignewpage% changed from clearpage \@writeckpt{#1}% \if@filesw \immediate\closeout\@partaux @@ -1577,8 +1611,6 @@ \LetLtxMacro\LWR@origfootnote\footnote \let\LWR@orig@mpfootnotetext\@mpfootnotetext -\let\LWR@origclearpage\clearpage - \AtBeginDocument{% in case packages change definition \LetLtxMacro\LWR@orighline\hline% \LetLtxMacro\LWR@origcline\cline% @@ -1867,6 +1899,8 @@ A:visited {color:#800000 ; } A:hover {color:#000080 ; text-decoration: underline ;} A:active {color:#800000 ; } +a.tocbook {display: inline-block ; margin-left: 0em ; + font-weight: bold ; margin-top: 1ex ; margin-bottom: 1ex ; } a.tocpart {display: inline-block ; margin-left: 0em ; font-weight: bold ;} a.tocchapter {display: inline-block ; margin-left: 0em ; @@ -2156,7 +2190,7 @@ body div { margin: 0ex; } -h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph +div.book, h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph { font-family: "Linux Libertine O", "Hoefler Text", "Garamond", "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", @@ -2172,6 +2206,13 @@ h1 { /* title of the entire website, used on each page */ font-size: 2.5em ; padding: .4ex 0em 0ex 0em ; } + +div.book { + text-align: center ; + font-size: 2.325em ; + padding: .4ex 0em 0ex 0em ; +} + h2 { font-size: 2.25em } h3 { font-size: 2em } h4 { font-size: 1.75em } @@ -2435,8 +2476,11 @@ span.abstractrunintitle{ } .fancyvrblabel { - font-weight:bold; + font-size: .85em ; text-align: center ; + font-weight: bold ; + margin-top: 1ex ; + margin-bottom: 1ex ; } .verse { @@ -3112,10 +3156,13 @@ span.floatright { float: right ; } } .authorartist{ + display:block ; font-size:.70em ; font-style: italic; } +nav .authorartist{ display:inline; } + /* Native LaTeX theorems: */ .theoremcontents { font-style: italic; margin-top: 3ex ; margin-bottom: 3ex ; } @@ -3370,7 +3417,7 @@ A:visited {color:#705030 ; text-shadow:1px 1px 2px #a0a0a0;} A:hover {color:#006000 ; text-decoration: underline ; text-shadow:0px 0px 2px #a0a0a0;} A:active {color:#00C000 ; text-shadow:1px 1px 2px #a0a0a0;} -h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph +div.book, h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph { font-family: "URW Classico", Optima, "Linux Biolinum O", "Linux Libertine O", "Liberation Serif", @@ -3622,7 +3669,7 @@ span.textsf { Geneva, Verdana, sans-serif ; } -h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph +div.book, h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph { font-family: "Linux Libertine O", "Hoefler Text", "Garamond", "Bembo", "Janson", "TeX Gyre Pagella", "Palatino", @@ -3986,7 +4033,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX- -- Copyright 2016-2019 Brian Dunn -printversion = "v0.72" +printversion = "v0.73" requiredconfversion = "2" -- also at *lwarpmk.conf function printhelp () @@ -4854,6 +4901,7 @@ end -- not --version \newcommand*{\LWR@depthnone}{-5} \newcommand*{\LWR@depthfinished}{-4} +\newcommand*{\LWR@depthbook}{-2} \newcommand*{\LWR@depthpart}{-1} \newcommand*{\LWR@depthchapter}{0} \newcommand*{\LWR@depthsection}{1} @@ -5221,9 +5269,10 @@ end -- not --version \begin{warpHTML} - \newcommand*{\LWR@tagtitle}{h1} \newcommand*{\LWR@tagtitleend}{/h1} +\newcommand*{\LWR@tagbook}{div class="book"} +\newcommand*{\LWR@tagbookend}{/div} \newcommand*{\LWR@tagpart}{h2} \newcommand*{\LWR@tagpartend}{/h2} \newcommand*{\LWR@tagchapter}{h3} @@ -5293,6 +5342,10 @@ end -- not --version \LWR@orignewline\LWR@origrule{2em}{0pt}% } +\newcommand*{\LWR@indentHTMLtwo}{% + \LWR@orignewline\LWR@origrule{4em}{0pt}% +} + \newcommand*{\LWR@htmltagc}[1]{% \LWR@traceinfo{LWR@htmltagc !\detokenize{#1}!}% @@ -5330,6 +5383,8 @@ end -- not --version \let\item\LWR@nestspanitem% }% \renewcommand{\LWR@listend}{\LWR@htmltagc{br /}\LWR@htmltagc{br /}}% + \renewenvironment{quote}{\LWR@htmltagc{br /}}{\LWR@htmltagc{br /}}% + \renewenvironment{quotation}{\LWR@htmltagc{br /}}{\LWR@htmltagc{br /}}% }% not in a lateximage \LWR@traceinfo{LWR@nestspan starting: done}% }% starting env @@ -5427,6 +5482,7 @@ end -- not --version \NewDocumentCommand{\LWR@htmlelementclass}{m o m}{% \LWR@stoppars% +\LWR@forceemptyline% \LWR@subhtmlelementclass{#1}[#2]{#3}% \LWR@startpars% } @@ -5452,6 +5508,7 @@ end -- not --version \NewDocumentCommand{\LWR@htmlelementclassline}{m o m +m}{% \LWR@stoppars +\LWR@forceemptyline% \LWR@subhtmlelementclass{#1}[#2]{#3}% #4% \LWR@htmltag{/#1} @@ -5479,7 +5536,6 @@ end -- not --version \NewDocumentEnvironment{LWR@print@BlockClass}{o m}{}{}% \NewDocumentEnvironment{LWR@HTML@BlockClass}{o m}% {% - \LWR@origpar% \LWR@htmldivclass[#1]{#2}% } {\LWR@htmldivclassend{#2}} @@ -5491,7 +5547,6 @@ end -- not --version \end{warpall} \begin{warpHTML} \newcommand{\LWR@HTML@BlockClassSingle}[2]{% -\LWR@origpar% \LWR@htmlelementclassline{div}{#1}{#2}% } @@ -5550,6 +5605,8 @@ end -- not --version \begin{warpHTML} +\newcommand*{\LWR@printclosebook} + {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing book}}{}} \newcommand*{\LWR@printclosepart} {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing part}}{}} \newcommand*{\LWR@printclosechapter} @@ -5785,7 +5842,7 @@ end -- not --version } \end{warpHTML} \begin{warpall} -\providecommand{\thetitle}{} +\providecommand{\thetitle}{\BaseJobname} \newcommand{\theHTMLTitle}{\thetitle} @@ -5943,17 +6000,18 @@ end -- not --version }% } \newcommand{\marginparBlock}[2][]{% +\LWR@stoppars% \ifbool{FormatWP}% {% -\begin{LWR@BlockClassWP}{width:2in; float:right; margin:10pt}{}{marginblock} -#2 -\end{LWR@BlockClassWP} -}% -{% -\begin{BlockClass}[width:2in; float:right; margin:10pt]{marginparblock} -#2 -\end{BlockClass} + \begin{LWR@BlockClassWP}{width:2in; float:right; margin:10pt}{}{marginblock} + #2 + \end{LWR@BlockClassWP} +}{% + \begin{BlockClass}[width:2in; float:right; margin:10pt]{marginparblock} + #2 + \end{BlockClass} }% +\LWR@startpars% } \renewcommand*{\reversemarginpar}{} \renewcommand*{\normalmarginpar}{} @@ -6170,11 +6228,13 @@ end -- not --version \ifbool{FormatEPUB} {} { - \LWR@htmlelement{footer} + \ifdefempty{\LWR@pagebottom}{}{% + \LWR@htmlelement{footer} - \LWR@pagebottom + \LWR@pagebottom - \LWR@htmlelementend{footer} + \LWR@htmlelementend{footer} + } } \ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}} {} @@ -6233,11 +6293,13 @@ end -- not --version \ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}} {} { - \LWR@htmlelement{header} + \ifdefempty{\LWR@pagetop}{}{ + \LWR@htmlelement{header} - \LWR@pagetop + \LWR@pagetop - \LWR@htmlelementend{header} + \LWR@htmlelementend{header} + } } \LWR@htmlelementclass{div}{bodyandsidetoc} @@ -6495,6 +6557,9 @@ end -- not --version } +\providecommand*{\prebookname}{} +\providecommand*{\postbookname}{} + \providecommand*{\prepartname}{} \providecommand*{\postpartname}{} @@ -6727,11 +6792,13 @@ end -- not --version \LWR@traceinfo{LWR@lwarpStart: Starting new file.} \LWR@filestart \LWR@traceinfo{LWR@lwarpStart: Generating first header.} -\LWR@htmltag{header}\LWR@orignewline -\LWR@startpars -\LWR@firstpagetop -\LWR@stoppars -\LWR@htmltag{/header}\LWR@orignewline +\ifdefempty{\LWR@firstpagetop}{}{% + \LWR@htmltag{header}\LWR@orignewline + \LWR@startpars + \LWR@firstpagetop + \LWR@stoppars + \LWR@htmltag{/header}\LWR@orignewline +}% \LWR@htmlelementclass{div}{bodywithoutsidetoc} \LWR@htmlelementclass{div}{bodycontainer} \LWR@traceinfo{LWR@lwarpStart: Generating textbody.} @@ -6771,11 +6838,13 @@ end -- not --version \LWR@htmlelementclassend{div}{bodycontainer} \LWR@htmlelementclassend{div}{bodyandsidetoc} \LWR@printpendingfootnotes -\LWR@htmlelement{footer} +\ifdefempty{\LWR@pagebottom}{}{% + \LWR@htmlelement{footer} -\LWR@pagebottom + \LWR@pagebottom -\LWR@htmlelementend{footer} + \LWR@htmlelementend{footer} +} \ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}} {} @@ -6855,7 +6924,7 @@ end -- not --version } \end{warpHTML} \begin{warpall} -\newcommand*{\printthanks}{\@thanks} +\newcommand*{\printthanks}{\LWR@stoppars\@thanks\LWR@startpars} \end{warpall} \begin{warpHTML} @@ -6940,7 +7009,7 @@ end -- not --version \begin{titlepage} \LWR@maketitlesetup \@maketitle -\@thanks +\LWR@stoppars\@thanks\LWR@startpars \end{titlepage} \setcounter{footnote}{0}% \global\let\thanks\relax @@ -6956,9 +7025,11 @@ end -- not --version \global\let\and\relax } \DeclareDocumentCommand{\@maketitle}{}{% - \LWR@stoppars\LWR@htmltag{\LWR@tagtitle}% + \LWR@stoppars% + \LWR@htmltag{\LWR@tagtitle}% \@title% - \LWR@htmltag{\LWR@tagtitleend}\LWR@startpars% + \LWR@htmltag{\LWR@tagtitleend}% + \LWR@startpars% \begin{BlockClass}{author}% \renewcommand*{\cr}{}% \renewcommand*{\crcr}{}% @@ -6977,10 +7048,10 @@ end -- not --version } \newcommand*{\LWR@titlingmaketitle}{% -\@thanks +\LWR@stoppars\@thanks\LWR@startpars \LWR@maketitlesetup \@maketitle -\@thanks +\LWR@stoppars\@thanks\LWR@startpars } \end{warpHTML} \begin{warpall} @@ -7039,9 +7110,11 @@ end -- not --version \begin{warpHTML} \newcommand{\attribution}[1]{% + \LWR@stoppars% \begin{BlockClass}{attribution} #1 \end{BlockClass} + \LWR@startpars% } \end{warpHTML} \begin{warpprint} @@ -7310,10 +7383,16 @@ end -- not --version \LWR@stoppars% \LWR@setlatestname{#1}% \LWR@startnewdepth{descitem}% +\begingroup% +\let\LWR@orig@desc@makelabel\makelabel +\renewcommand*{\makelabel}[1]{% + \LWR@htmltag{dt}% + \LWR@orig@desc@makelabel{#1}% + \LWR@htmltag{/dt}% +} \LWR@select@html@nohspace% -\LWR@origitem[]% -\LWR@select@html@hspace% -\LWR@htmltag{dt}#1\LWR@htmltag{/dt}% +\LWR@origitem[#1]% +\endgroup% \LWR@orignewline% \LWR@htmltag{dd}% \LWR@startpars% @@ -8947,6 +9026,16 @@ rowspan="#2" % \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,% + } +}{}% \addtocounter{LWR@tabulardepth}{1}% \global\boolfalse{LWR@startedrow}% \setcounter{LWR@hlines}{0}% @@ -9549,7 +9638,7 @@ autopage-\theLWR@currentautosec% \let\LWR@origcaptionof\captionof \renewcommand*{\captionof}{% -\LWR@stoppars +\LWR@stoppars% \LWR@origcaptionof% } } @@ -9747,6 +9836,8 @@ autopage-\theLWR@currentautosec% {}% } +\DeclareDocumentCommand{\l@book}{m m}{\hypertoc{-2}{book}{#1}{#2}} + \DeclareDocumentCommand{\l@part}{m m}{\hypertoc{-1}{part}{#1}{#2}} \@ifundefined{chapter} @@ -9798,17 +9889,17 @@ autopage-\theLWR@currentautosec% \newcommand{\LWR@indexitem}[1][\@empty]{ -\InlineClass{indexitem}{}#1% +\InlineClass{indexitem}{\LWR@htmlcomment{}}#1% } \newcommand{\LWR@indexsubitem}{ -\InlineClass{indexsubitem}{} +\InlineClass{indexsubitem}{\LWR@htmlcomment{}} } \newcommand{\LWR@indexsubsubitem}{ -\InlineClass{indexsubsubitem}{} +\InlineClass{indexsubsubitem}{\LWR@htmlcomment{}} } \def\LWR@wrindex#1{% @@ -9984,7 +10075,7 @@ autopage-\theLWR@currentautosec% \renewcommand*{\$}{% \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% {\LWR@origtextdollar}% -{\HTMLentity{dollar}}% +{\HTMLunicode{00024}}% } \AtBeginDocument{ @@ -10012,13 +10103,16 @@ autopage-\theLWR@currentautosec% } }{ \PackageWarningNoLine{lwarp}{Load graphicx or graphics - for improved SVG math baselines,} + for improved\MessageBreak + SVG math baselines% + } \newcommand*{\LWR@addbaselinemarker}{} } } }{% lwarp_baseline_marker.png or .eps is not present - \PackageWarningNoLine{lwarp}{File \LWR@baselinename\space is not installed alongside - the lwarp-*.sty files, so SVG math baselines may not be accurate,} + \PackageWarningNoLine{lwarp}{File \LWR@baselinename\space is not installed\MessageBreak + alongside the lwarp-*.sty files,\MessageBreak + so SVG math baselines may not be accurate} \newcommand*{\LWR@addbaselinemarker}{} } @@ -11261,7 +11355,7 @@ autopage-\theLWR@currentautosec% \ifbool{LWR@forceminipagefullwidth}% {}% {% - \ifthenelse{\lengthtest{#4}=\linewidth}% + \ifdimequal{#4}{\linewidth}% {}% {width:\LWR@printlength{\LWR@minipagewidth} ; }% }% @@ -11425,11 +11519,13 @@ color:\LWR@origpound\LWR@tempcolor% \begin{warpHTML} \newcommand{\LWR@HTML@fboxBlock}[1]{% \LWR@forceminwidth{\fboxrule}% +\LWR@stoppars% \begin{BlockClass}[% \LWR@fboxstyle% ]{fboxBlock} #1 \end{BlockClass} +\LWR@startpars% } \LWR@formatted{fboxBlock} @@ -11481,7 +11577,7 @@ color:\LWR@origpound\LWR@tempcolor% \ifbool{LWR@forceminipagefullwidth}% {}% {% - \ifthenelse{\lengthtest{\LWR@tempwidth}=\linewidth}% + \ifdimequal{\LWR@tempwidth}{\linewidth}% {}% {width:\LWR@printlength{\LWR@tempwidth} ; }% }% @@ -11804,6 +11900,7 @@ color:\LWR@origpound\LWR@tempcolor% \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\){}% @@ -11861,13 +11958,14 @@ color:\LWR@origpound\LWR@tempcolor% } \newenvironment*{LWR@blocktextcurrentfont}{% +\LWR@stoppars% \BlockClass{% text\LWR@f@family\LWR@origtilde{}% text\LWR@f@series\LWR@origtilde{}% text\LWR@f@shape\LWR@origtilde{}% text\LWR@f@shapecaps% }% -}{\endBlockClass} +}{\endBlockClass\LWR@startpars} \newrobustcmd*{\LWR@HTML@mdseries}{\renewcommand*{\LWR@f@series}{md}} \LWR@formatted{mdseries} @@ -12095,7 +12193,8 @@ color:\LWR@origpound\LWR@tempcolor% \quad% \addtolength{\LWR@templengthone}{-1em}% }% - }{}% + }% + {\LWR@htmlcomment{}}% \LWR@htmltagc{/span}% }% \LWR@minipagestartpars% @@ -12176,7 +12275,8 @@ color:\LWR@origpound\LWR@tempcolor% \_{}% \addtolength{\LWR@templengthone}{-1em}% }% - }{}% + }% + {\LWR@htmlcomment{}}% \LWR@htmltagc{/span}% \LWR@minipagestartpars% }% non-zero width |