diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp.sty | 281 |
1 files changed, 218 insertions, 63 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty index 3cde0578003..92cbbf80d3c 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} - [2017/04/04 v0.27 Allows LaTeX to directly produce HTML5 output.] + [2017/04/15 v0.29 Allows LaTeX to directly produce HTML5 output.] @@ -56,7 +56,6 @@ \newbool{warpingprint} \newbool{warpingHTML} \newbool{mathjax} - \newcommand{\warpprintonly}[1]{\ifbool{warpingprint}{#1}{}} \newcommand{\warpHTMLonly}[1]{\ifbool{warpingHTML}{#1}{}} @@ -89,6 +88,8 @@ \DeclareStringOption[\jobname]{BaseJobname} +\DeclareStringOption[english]{lwarpmklang} + \includecomment{warpprint}% \excludecomment{warpHTML}% \booltrue{warpingprint}% @@ -154,6 +155,7 @@ Please use the #2 package instead} \LWR@loadafter{floatflt} \LWR@loadafter{ftnright} \LWR@loadafter{geometry} +\LWR@loadafter{glossaries} \LWR@loadafter{hyperref} \LWR@loadafter{indentfirst} \LWR@loadafter{keyfloat} @@ -191,6 +193,7 @@ Please use the #2 package instead} \LWR@loadafter{soul} \LWR@loadafter{subfig} \LWR@loadafter{tabularx} +\LWR@loadafter{tabulary} \LWR@loadafter{textpos} \LWR@loadafter{theorem} \LWR@loadafter{threeparttable} @@ -253,6 +256,8 @@ spacing=false} left=2in,right=12in,% top=1in,bottom=1in,% ]{geometry} +\@twosidefalse +\@mparswitchfalse \end{warpHTML} \begin{warpall} @@ -427,6 +432,8 @@ top=1in,bottom=1in,% \end{warpHTML} +\begin{warpall} + \newbool{LWR@tracinglwarp} \newcommand{\tracinglwarp}{\booltrue{LWR@tracinglwarp}} \newcommand{\LWR@traceinfo}[1]{% @@ -437,6 +444,18 @@ top=1in,bottom=1in,% {}% } +\newbool{HTMLDebugComments} +\boolfalse{HTMLDebugComments} + +\newbool{FormatEPUB} +\boolfalse{FormatEPUB} +\newbool{FormatWordProcessor} +\boolfalse{FormatWordProcessor} +\newbool{HTMLMarkFloats} +\booltrue{HTMLMarkFloats} + +\end{warpall} + \begin{warpHTML} @@ -635,7 +654,7 @@ top=1in,bottom=1in,% \providecommand*{\BaseJobname}{\jobname} -\providecommand*{\HTMLFileName}{} +\providecommand*{\HTMLfiveName}{} \providecommand*{\HomeHTMLFileName}{\BaseJobname} \newcommand*{\SetHTMLFileNumber}[1]{% @@ -676,12 +695,12 @@ top=1in,bottom=1in,% {% \LWR@traceinfo{LWR@htmlsectionfilename C \LWR@tempone}% \ifthenelse{% -\equal{\HTMLFileName}{} \AND \equal{\LWR@tempone}{Index} \OR \equal{\LWR@tempone}{index}% +\equal{\HTMLfiveName}{} \AND \equal{\LWR@tempone}{Index} \OR \equal{\LWR@tempone}{index}% }% {% \LWR@traceinfo{prefixing the index name with an underscore.}% \_#1.html}% -{\HTMLFileName#1.html}% +{\HTMLfiveName#1.html}% }% \LWR@traceinfo{LWR@htmlsectionfilename Z}% } @@ -747,6 +766,14 @@ top=1in,bottom=1in,% \begin{warpHTML} +\newcommand{\LWR@forcenewpage}{% +\LWR@stoppars\LWR@orignewpage\LWR@startpars% +} +\end{warpHTML} + + +\begin{warpHTML} + \newcommand*{\LWR@tagpart}{h2} \newcommand*{\LWR@tagpartend}{/h2} @@ -812,16 +839,19 @@ top=1in,bottom=1in,% \newcommand*{\LWR@htmlopencomment}{% -\begingroup\LWR@origttfamily\LWR@origtextless{}!{-}{-}\endgroup% +{\LWR@origttfamily\LWR@origtextless{}!{-}{-}}% } \newcommand*{\LWR@htmlclosecomment}{% -\begingroup\LWR@origttfamily{-}{-}\LWR@origtextgreater{}\endgroup% +{\LWR@origttfamily{-}{-}\LWR@origtextgreater{}}% } \newcommand{\LWR@htmlcomment}[1]{% \LWR@htmlopencomment{}% -\LWR@origtextrm{#1}% +{% +\LWR@origttfamily% break ligatures +#1% +}% \LWR@htmlclosecomment{}} \newcommand{\LWR@htmlblockcommentb}[1] {\LWR@stoppars\LWR@htmlcomment{#1}\LWR@startpars\endgroup} @@ -838,12 +868,6 @@ top=1in,bottom=1in,% \LWR@startpars% } -\NewDocumentCommand{\LWR@htmlblocktagcomment}{m +m}{% -\LWR@stoppars% -\LWR@htmltag{#1}\LWR@htmlcomment{#2}\LWR@orignewline% -\LWR@startpars% -} - \NewDocumentCommand{\LWR@subhtmlelementclass}{m m o}{% \IfValueTF{#3}% @@ -864,7 +888,9 @@ top=1in,bottom=1in,% \newcommand*{\LWR@htmlelementclassend}[2]{% \LWR@stoppars% \LWR@htmltag{/#1}% +\ifbool{HTMLDebugComments}{% \LWR@htmlcomment{End of #1 ``#2''}% +}{}% \LWR@startpars% } @@ -936,19 +962,19 @@ top=1in,bottom=1in,% \begin{warpHTML} \newcommand*{\LWR@printclosepart} - {\LWR@htmlcomment{Closing part}} + {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing part}}{}} \newcommand*{\LWR@printclosechapter} - {\LWR@htmlcomment{Closing chapter}} + {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing chapter}}{}} \newcommand*{\LWR@printclosesection} - {\LWR@htmlcomment{Closing section}} + {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing section}}{}} \newcommand*{\LWR@printclosesubsection} - {\LWR@htmlcomment{Closing subsection}} + {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing subsection}}{}} \newcommand*{\LWR@printclosesubsubsection} - {\LWR@htmlcomment{Closing subsubsection}} + {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing subsubsection}}{}} \newcommand*{\LWR@printcloseparagraph} - {\LWR@htmlcomment{Closing paragraph}} + {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing paragraph}}{}} \newcommand*{\LWR@printclosesubparagraph} - {\LWR@htmlcomment{Closing subparagraph}} + {\ifbool{HTMLDebugComments}{\LWR@htmlcomment{Closing subparagraph}}{}} \newcommand*{\LWR@printcloselistitem} {\LWR@htmltag{/li}} @@ -1132,7 +1158,15 @@ top=1in,bottom=1in,% \end{warpprint} -\begin{warpHTML} +\begin{warpall} + +\newcommand{\theHTMLauthor}{\theauthor} + +\newcommand{\HTMLauthor}[1]{\renewcommand{\theHTMLauthor}{#1}} + +\end{warpall} + +\begin{warpall} \newcommand{\LWR@currentHTMLdescription}{} @@ -1141,10 +1175,7 @@ top=1in,bottom=1in,% \renewcommand{\LWR@currentHTMLdescription}{#1} } -\end{warpHTML} -\begin{warpprint} -\newcommand{\NewHTMLdescription}[1]{} -\end{warpprint} +\end{warpall} \begin{warpHTML} @@ -1184,6 +1215,7 @@ top=1in,bottom=1in,% } \newcommand*{\LWR@printpendingfootnotes}{% \ifvoid\LWR@footnotes\else +\LWR@forcenewpage \begin{BlockClass}{footnotes} \LWR@origmedskip \unvbox\LWR@footnotes @@ -1191,6 +1223,11 @@ top=1in,bottom=1in,% \end{BlockClass} \fi } +\newcommand*{\LWR@epubprintpendingfootnotes}{% +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}% +{\LWR@printpendingfootnotes}% +{}% +} \end{warpHTML} @@ -1303,17 +1340,23 @@ top=1in,bottom=1in,% \LWR@printpendingfootnotes +\ifbool{FormatEPUB} +{} +{ \LWR@htmlelement{footer} \LWR@pagebottom \LWR@htmlelementend{footer} - -\ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{} +} +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} +{} +{\ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{}} \LWR@stoppars \LWR@htmltag{/body}\LWR@orignewline \LWR@htmltag{/html}\LWR@orignewline +\LWR@orignewpage \addtocounter{LWR@htmlfilenumber}{1}% @@ -1322,25 +1365,35 @@ top=1in,bottom=1in,% {\renewcommand*{\LWR@thisfilename}{\theLWR@htmlfilenumber}} \LWR@htmlblockcomment{% -\LWR@origtexttt{|Start file|% -\LWR@htmlsectionfilename{\LWR@thisfilename}|}% +|Start file|% +\LWR@htmlsectionfilename{\LWR@thisfilename}|% } \LWR@stoppars \LWR@filestart{ — #1}% there is an EMdash in front of the #1 -\LWR@topnavigation +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} +{} +{\LWR@topnavigation} +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} +{} +{ \LWR@htmlelement{header} \LWR@pagetop \LWR@htmlelementend{header} +} -\ifcsvoid{thetitle}{}{\LWR@printthetitle} +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} +{} +{\ifcsvoid{thetitle}{}{\LWR@printthetitle}} -\LWR@sidetoc +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} +{} +{\LWR@sidetoc} \LWR@htmlelementclass{section}{textbody} @@ -1385,10 +1438,11 @@ top=1in,bottom=1in,% \LWR@traceinfo{LWR@section}% \LWR@stoppars% \global\boolfalse{LWR@minipagethispar}% +\LWR@traceinfo{LWR@section: testing whether to start a new HTML file}% +\IfBooleanTF{#1}{% starred \LWR@orignewpage% -\LWR@traceinfo{LWR@section: testing about to start a new HTML file}% -\IfBooleanTF{#1}{}{% not starred +}{% not starred \ifthenelse{% \cnttest{\csuse{LWR@depth#4}}{<=}{\value{FileDepth}}% \AND% @@ -1403,12 +1457,17 @@ top=1in,bottom=1in,% {\LWR@newhtmlfile{#3}}% {\LWR@newhtmlfile{#2}}% }% new file -{}% not new file +{% not new file +\LWR@orignewpage% + +}% not new file }% not starred \LWR@traceinfo{LWR@section: about to LWR@setlatestname}% \IfValueTF{#2}{\LWR@setlatestname{#2}}{\LWR@setlatestname{#3}}% +\ifbool{HTMLDebugComments}{% \LWR@htmlcomment{Opening #4 ``#3''{}} +}{} \ifthenelse{% \cnttest{\csuse{LWR@depth#4}}{>=}{\LWR@depthparagraph}% @@ -1478,6 +1537,7 @@ top=1in,bottom=1in,% {} {% \DeclareDocumentCommand{\part}{s o m}{% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthpart}{\LWR@printclosepart}% @@ -1491,6 +1551,7 @@ top=1in,bottom=1in,% {% \DeclareDocumentCommand{\chapter}{s o m}{% \LWR@traceinfo{chapter #3}% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthchapter}{\LWR@printclosechapter}% @@ -1501,6 +1562,7 @@ top=1in,bottom=1in,% } \DeclareDocumentCommand{\section}{s o m}{% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthsection}{\LWR@printclosesection}% @@ -1509,6 +1571,7 @@ top=1in,bottom=1in,% } \DeclareDocumentCommand{\subsection}{s o m}{% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthsubsection}{\LWR@printclosesubsection}% @@ -1517,6 +1580,7 @@ top=1in,bottom=1in,% } \DeclareDocumentCommand{\subsubsection}{s o m}{% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthsubsubsection}% @@ -1526,6 +1590,7 @@ top=1in,bottom=1in,% } \DeclareDocumentCommand{\paragraph}{s o m}{% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthparagraph}{\LWR@printcloseparagraph}% @@ -1534,6 +1599,7 @@ top=1in,bottom=1in,% } \DeclareDocumentCommand{\subparagraph}{s o m}{% +\LWR@epubprintpendingfootnotes% \LWR@stoppars% \LWR@startnewdepth{\LWR@depthsubparagraph}{\LWR@printclosesubparagraph}% @@ -1568,6 +1634,9 @@ top=1in,bottom=1in,% \LWR@htmltag{html lang="\MetaLanguage"{}}\LWR@orignewline \LWR@htmltag{head}\LWR@orignewline \LWR@htmltag{meta charset="UTF-8" /}\LWR@orignewline +\ifcsempty{theHTMLauthor}{}{ +\LWR@htmltag{meta name="author" content="\theHTMLauthor" /}\LWR@orignewline +} \LWR@htmltag{meta name="generator" content="LaTeX lwarp package" /}% \LWR@orignewline \ifdefempty{\LWR@currentHTMLdescription}{}{% @@ -1609,10 +1678,14 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \newcommand*{\LWR@LwarpStart} {% +\ifbool{FormatWordProcessor}{% +\setcounter{FileDepth}{-5}% +\boolfalse{HTMLDebugComments}% +}{} \edef\LWR@strresult{\HomeHTMLFileName} \edef\HomeHTMLFileName{\detokenize\expandafter{\LWR@strresult}} -\edef\LWR@strresult{\HTMLFileName} -\edef\HTMLFileName{\detokenize\expandafter{\LWR@strresult}} +\edef\LWR@strresult{\HTMLfiveName} +\edef\HTMLfiveName{\detokenize\expandafter{\LWR@strresult}} \LWR@origonecolumn% \LWR@origscriptsize% \LWR@origraggedright% @@ -1692,7 +1765,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@htmlelementend{footer} +\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} +{} +{ \ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{} +} \LWR@stoppars% final stop of all paragraphs \LWR@htmltag{/body}\LWR@orignewline \LWR@htmltag{/html}\LWR@orignewline @@ -1745,8 +1822,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \end{warpall} \begin{warpHTML} \renewenvironment*{titlepage} - {\BlockClass{titlepage}\LWR@subminipage} - {\LWR@endsubminipage\endBlockClass} +{ +\LWR@forcenewpage +\BlockClass{titlepage}\LWR@subminipage +} +{\LWR@endsubminipage\endBlockClass} \renewenvironment*{titlingpage} {% \begin{titlepage} @@ -2056,6 +2136,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \providecommand*{\abstractname}{Abstract} \DeclareDocumentEnvironment{abstract}{} { +\LWR@forcenewpage \BlockClass{abstract} \BlockClassSingle{abstracttitle}{\abstractname} } @@ -2088,11 +2169,17 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \begin{warpHTML} \renewenvironment*{quote} -{\LWR@htmlblocktag{blockquote}} +{ +\LWR@forcenewpage +\LWR@htmlblocktag{blockquote} +} {\LWR@htmlblocktag{/blockquote}} \renewenvironment*{quotation} -{\LWR@htmlblocktag{blockquotation}} +{ +\LWR@forcenewpage +\LWR@htmlblocktag{blockquotation} +} {\LWR@htmlblocktag{/blockquotation}} \end{warpHTML} @@ -2111,7 +2198,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \begin{warpHTML} \AfterEndPreamble{ -\AtBeginEnvironment{verbatim}{\LWR@atbeginverbatim{verbatim}\unskip\vspace*{-\baselineskip}} +\AtBeginEnvironment{verbatim}{% +\LWR@forcenewpage +\LWR@atbeginverbatim{verbatim}\unskip\vspace*{-\baselineskip}% +} \AfterEndEnvironment{verbatim}{\unskip\vspace*{-\baselineskip}\LWR@afterendverbatim} } @@ -2159,6 +2249,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \AfterEndPreamble{ \let\LWR@origVerbatim\Verbatim \renewcommand*{\Verbatim}{% +\LWR@forcenewpage \renewcommand*{\LWR@Verbatimclass}{fancyvrb}% \LWR@origVerbatim% } @@ -2285,6 +2376,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \AtBeginEnvironment{BVerbatim} { +\LWR@forcenewpage \LWR@atbeginverbatim{bverbatim} } @@ -2306,10 +2398,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \begin{warpHTML} \renewcommand{\@begintheorem}[2]{% +\LWR@forcenewpage \BlockClass{theoremcontents} \InlineClass{theoremlabel}{#1\ #2\ } } \renewcommand{\@opargbegintheorem}[3]{% +\LWR@forcenewpage \BlockClass{theoremcontents} \InlineClass{theoremlabel}{#1\ #2\ (#3)\ } } @@ -2650,6 +2744,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \IfStrEq{\LWR@strresult}{l}{\LWR@parsenormalcolumn{l}}{}% \IfStrEq{\LWR@strresult}{c}{\LWR@parsenormalcolumn{c}}{}% \IfStrEq{\LWR@strresult}{r}{\LWR@parsenormalcolumn{r}}{}% +\IfStrEq{\LWR@strresult}{L}{\LWR@parsenormalcolumn{l}}{}% +\IfStrEq{\LWR@strresult}{C}{\LWR@parsenormalcolumn{c}}{}% +\IfStrEq{\LWR@strresult}{R}{\LWR@parsenormalcolumn{r}}{}% +\IfStrEq{\LWR@strresult}{J}{\LWR@parsenormalcolumn{l}}{}% \IfStrEq{\LWR@strresult}{S}{\LWR@parsenormalcolumn{r}}{}% \IfStrEq{\LWR@strresult}{\detokenize{@}}{\LWR@parseatcolumn}{}% \IfStrEq{\LWR@strresult}{!}{\LWR@parsebangcolumn}{}% @@ -3000,6 +3098,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \global\boolfalse{LWR@doingtbrule}% \boolfalse{LWR@exitingtabular}% \global\booltrue{LWR@intabularmetadata}% +\LWR@forcenewpage \LWR@htmlblocktag{table}% \LWR@parsetablecols{#2}% \LWR@stoppars% @@ -3117,7 +3216,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \newcommand*{\LWR@startref}[1] {% -\edef\LWR@lidref{\LWR@lateximagedepthref{#1}} +\edef\LWR@lidref{\LWR@lateximagedepthref{#1}}% \LWR@traceinfo{LWR@startref A: !#1!}% \LWR@htmltag{a href="% \LWR@traceinfo{LWR@startref B}% @@ -3127,7 +3226,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@traceinfo{LWR@startref D: !#1!}% \ifthenelse{\equal{\LWR@lidref}{??}}% {% -\LWR@traceinfo{LWR@startref D0: ??} +\LWR@traceinfo{LWR@startref D0: ??}% ??}% {% \LWR@traceinfo{LWR@startref D1: \LWR@lidref}% @@ -3243,6 +3342,11 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \begin{warpHTML} \NewDocumentCommand{\LWR@floatbegin}{m o}{% +\ifthenelse{\boolean{FormatWordProcessor}\AND\boolean{HTMLMarkFloats}}{% + +=== #1 begin + +}{}% \LWR@stoppars \addtocounter{LWR@thisfloat}{1}% \booltrue{LWR@freezethisfloat}% @@ -3261,6 +3365,11 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \endgroup% \boolfalse{LWR@freezethisfloat}% \LWR@startpars% +\ifthenelse{\boolean{FormatWordProcessor}\AND\boolean{HTMLMarkFloats}}{% + +=== end + +}{}% } \let\end@float\LWR@floatend \let\end@dblfloat\LWR@floatend @@ -3289,7 +3398,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \setcounter{LWR@nextautofloat}{#2}% } -\newcounter{LWR@latestautopage}% updated each new HTML file +\newcounter{LWR@latestautopage} \setcounter{LWR@latestautopage}{1} \let\LWR@origcaption@begin\caption@begin @@ -3403,20 +3512,27 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \let\LWR@origtableofcontents\tableofcontents \let\LWR@origlistoffigures\listoffigures \let\LWR@origlistoftables\listoftables + \renewcommand*{\tableofcontents}{% +\ifbool{FormatWordProcessor}{}{ \LWR@copyfile{\jobname.toc}{\jobname.sidetoc}% \LWR@printpendingfootnotes -\LWR@origtableofcontents% +\LWR@origtableofcontents +} } \renewcommand*{\listoffigures}{ +\ifbool{FormatWordProcessor}{}{ \LWR@printpendingfootnotes \LWR@origlistoffigures } +} \renewcommand*{\listoftables}{ +\ifbool{FormatWordProcessor}{}{ \LWR@printpendingfootnotes \LWR@origlistoftables } +} \NewDocumentCommand{\listof}{m +m}{% @@ -3442,6 +3558,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \begin{warpHTML} \newcommand*{\LWR@sidetoc}{ +\LWR@forcenewpage \LWR@stoppars \LWR@htmlelementclass{nav}{sidetoc} @@ -3513,8 +3630,15 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% + \begin{warpHTML} +\newcounter{LWR@autoindex} +\setcounter{LWR@autoindex}{0} + +\newcounter{LWR@autoglossary} +\setcounter{LWR@autoglossary}{0} + \@ifundefined{chapter} {\newcommand*{\LWR@indexsection}{\section{\indexname}}} {\newcommand*{\LWR@indexsection}{\chapter{\indexname}}} @@ -3549,11 +3673,24 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \InlineClass{indexsubsubitem}{} } +\def\@wrindex#1{% +\addtocounter{LWR@autoindex}{1}% +\LWR@newlabel{LWRindex-\theLWR@autoindex}% +\protected@write\@indexfile{}% +{\string\indexentry{#1}{\theLWR@autoindex}}% +\endgroup +\@esphack} + +\def\@wrglossary#1{% +\addtocounter{LWR@autoglossary}{1}% +\LWR@newlabel{LWRglossary-\theLWR@autoglossary}% +\protected@write\@glossaryfile{}% +{\string\glossaryentry{#1}{\theLWR@autoglossary}}% +\endgroup +\@esphack} + \newcommand*{\hyperindexref}[1]{ -\LWR@htmltag{a href="% -\LWR@htmlrefsectionfilename{autopage-#1}\#autosec-#1"{}}% -\LWR@origref{autopage-#1}\enskip\LWR@nameref{autopage-#1}% -\LWR@htmltag{/a}% +\nameref{LWRindex-#1}% } \end{warpHTML} @@ -3577,10 +3714,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \let\LWR@origdollar=$ -\let\secondorigdollar=$% balance for editor syntax highlighting +\let\LWR@secondorigdollar=$% balance for editor syntax highlighting \let\LWR@origopenparen\( \let\LWR@origcloseparen\) +\let\LWR@origopenbracket\[ +\let\LWR@origclosebracket\] \begingroup \catcode`\$=\active% @@ -4068,7 +4207,9 @@ class="lateximagesource"{}} \LWR@orignewline }% \LWR@ensuredoingapar% \LWR@htmltag{/span}% +\ifbool{HTMLDebugComments}{% \LWR@htmlcomment{End of lateximage}% +}{}% \addtocounter{LWR@lateximagedepth}{-1}% }% end of outer-most lateximage \LWR@traceinfo{lateximage: done} @@ -4082,15 +4223,24 @@ class="lateximagesource"{}} \LWR@orignewline \begin{warpHTML} \renewenvironment*{center} -{\BlockClass{center}} +{ +\LWR@forcenewpage +\BlockClass{center} +} {\endBlockClass} \renewenvironment*{flushright} -{\BlockClass{flushright}} +{ +\LWR@forcenewpage +\BlockClass{flushright} +} {\endBlockClass} \renewenvironment*{flushleft} -{\BlockClass{flushleft}} +{ +\LWR@forcenewpage +\BlockClass{flushleft} +} {\endBlockClass} \end{warpHTML} @@ -4217,8 +4367,7 @@ height:\rndprintlength{\LWR@igheight} % \newcommand*{\LWR@imageextension}{} \newcommand*{\LWR@expgraphicsfilename}{} - -\newcommand*{\LWR@includegraphicsb}[2][] +\NewDocumentCommand{\LWR@includegraphicsb}{s o o m} {% \LWR@origtilde \LWR@orignewline% \ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}{% @@ -4230,7 +4379,7 @@ height:\rndprintlength{\LWR@igheight} % \setlength{\textheight}{9in}% }% }{}% -\edef\LWR@expgraphicsfilename{#2} +\edef\LWR@expgraphicsfilename{#4} \renewcommand*{\LWR@imageextension}{}% \IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR@expgraphicsfilename.jpg}% {\renewcommand*{\LWR@imageextension}{.jpg}}{}% @@ -4266,7 +4415,11 @@ height:\rndprintlength{\LWR@igheight} % \renewcommand*{\LWR@igxscale}{1}% \renewcommand*{\LWR@igyscale}{1}% \renewcommand*{\LWR@igclass}{inlineimage}% -\setkeys{igraph}{#1}% +\IfValueTF{#3}{}{% +\IfValueTF{#2}% +{\setkeys{igraph}{#2}}% +{\setkeys{igraph}{}}% +}% \href{\thisgraphicspath\LWR@strresult\LWR@imageextension}% {% start of href \LWR@htmltag{% start of image tags @@ -4388,7 +4541,6 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline - \begin{warpHTML} @@ -4503,6 +4655,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \IfValueTF{#2}{\setlength{\LWR@minipageheight}{#2}}{}% \LWR@stoppars% \LWR@traceinfo{minipage: creating div class}% +\LWR@orignewpage% \LWR@htmltag{div class="minipage" style="% \ifthenelse{\equal{#1}{t}}{vertical-align: bottom ; }{}% \ifthenelse{\equal{#1}{c}}{vertical-align: middle ; }{}% @@ -4582,7 +4735,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \renewcommand{\texttt}[1]{\LWR@htmlspan{kbd}{#1}} -\renewcommand{\textup}[1]{\LWR@htmlspan{textup}{#1}} +\renewcommand{\textup}[1]{\InlineClass{textup}{#1}} \renewcommand{\textit}[1]{\LWR@htmlspan{i}{#1}} @@ -4677,6 +4830,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \newcommand*{\LWR@newlinebr}{\unskip\LWR@htmltag{br /}\LWR@orignewline}% \let\newline\LWR@newlinebr +\let\LWR@origendofline\\ \NewDocumentCommand{\LWR@endofline}{s o} {% \newline% @@ -4859,7 +5013,7 @@ display:inline-block;"% \providecommand*{\HomeHTMLFileName}{\BaseJobname} -\providecommand*{\HTMLFileName}{} +\providecommand*{\HTMLfiveName}{} \providecommand*{\UseLatexmk}{false} \begin{warpprint} @@ -4883,8 +5037,9 @@ display:inline-block;"% \immediate\write\LWR@file{% homehtmlfilename = "\HomeHTMLFileName"% } -\immediate\write\LWR@file{htmlfilename = "\HTMLFileName"} +\immediate\write\LWR@file{htmlfilename = "\HTMLfiveName"} \immediate\write\LWR@file{uselatexmk = "\UseLatexmk"} +\immediate\write\LWR@file{language = "\LWR@lwarpmklang"} \immediate\closeout\LWR@file \end{warpprint} |