diff options
author | Karl Berry <karl@freefriends.org> | 2017-03-31 23:23:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-03-31 23:23:15 +0000 |
commit | 071026baab3643897ae28725b0cd7120214920dd (patch) | |
tree | ebcc020de4dcff316e4cb24c31f09e6a23609797 /Master/texmf-dist/tex/latex/lwarp/lwarp.sty | |
parent | 3e7a5bba844bbc4aca70a24ec2f32ee902592c98 (diff) |
lwarp (31mar17)
git-svn-id: svn://tug.org/texlive/trunk@43662 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 | 305 |
1 files changed, 92 insertions, 213 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty index 99e2bdbb732..0540344eb02 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty @@ -17,9 +17,7 @@ %% version 2005/12/01 or later. \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{lwarp} - [2017/03/22 v0.25 Allows LaTeX to directly produce HTML5 output.] - - + [2017/03/31 v0.26 Allows LaTeX to directly produce HTML5 output.] @@ -138,7 +136,9 @@ Please use the #2 package instead} \LWR@loadafter{amsthm} \LWR@loadafter{bookmark} \LWR@loadafter{booktabs} +\LWR@loadafter{ccaption} \LWR@loadafter{changepage} +\LWR@loadafter{cutwin} \LWR@loadafter{dcolumn} \LWR@loadafter{draftwatermark} \LWR@loadafter{ellipsis} @@ -151,6 +151,7 @@ Please use the #2 package instead} \LWR@loadafter{fancyhdr} \LWR@loadafter{floatrow} \LWR@loadafter{float} +\LWR@loadafter{floatflt} \LWR@loadafter{ftnright} \LWR@loadafter{geometry} \LWR@loadafter{hyperref} @@ -163,9 +164,12 @@ Please use the #2 package instead} \LWR@loadafter{longtable} \LWR@loadafter{lscape} \LWR@loadafter{ltcaption} +\LWR@loadafter{marginfix} +\LWR@loadafter{marginnote} \LWR@loadafter{mcaption} \LWR@loadafter{mdframed} \LWR@loadafter{microtype} +\LWR@loadafter{mparhack} \LWR@loadafter{multirow} \LWR@loadafter{nameref} \LWR@loadafter{needspace} @@ -182,6 +186,7 @@ Please use the #2 package instead} \LWR@loadafter{showidx} \LWR@loadafter{showkeys} \LWR@loadafter{sidecap} +\LWR@loadafter{sidenotes} \LWR@loadafter{subfig} \LWR@loadafter{tabularx} \LWR@loadafter{textpos} @@ -281,6 +286,8 @@ top=1in,bottom=1in,% \RequirePackage{calc} +\RequirePackage{refcount} + \RequirePackage{newfloat} \RequirePackage{caption} @@ -291,11 +298,6 @@ top=1in,bottom=1in,% \setlist[enumerate]{leftmargin=0em} \setlist[description]{leftmargin=0em} -\RequirePackage[continuous]{pagenote} -\makepagenote -\let\LWR@origmakepagenote\makepagenote -\let\LWR@origprintnotes\printnotes -\let\LWR@origpagenote\pagenote \end{warpHTML} \begin{warpall} @@ -378,7 +380,7 @@ top=1in,bottom=1in,% \let\usepackage\RequirePackage \NewDocumentCommand{\LWR@ProvidesPackagePass}{m o}{ -\PackageInfo{lwarp}{Using the lwarp version of package `#1', including options,}% +\PackageInfo{lwarp}{Using package `#1' and adding lwarp modifications, including options,}% \IfValueTF{#2} {\ProvidesPackage{lwarp-#1}[#2]} {\ProvidesPackage{lwarp-#1}} @@ -391,7 +393,7 @@ top=1in,bottom=1in,% } \NewDocumentCommand{\LWR@ProvidesPackageDrop}{m o}{ -\PackageInfo{lwarp}{Using the lwarp version of package `#1', discarding options,}% +\PackageInfo{lwarp}{Replacing package `#1' with the lwarp version, discarding options,}% \IfValueTF{#2} {\ProvidesPackage{lwarp-#1}[#2]} {\ProvidesPackage{lwarp-#1}} @@ -426,7 +428,9 @@ top=1in,bottom=1in,% \newcommand{\tracinglwarp}{\booltrue{LWR@tracinglwarp}} \newcommand{\LWR@traceinfo}[1]{% \ifbool{LWR@tracinglwarp}% -{\PackageInfo{lwarp}{#1 : }}% +{% +\typeout{*** lwarp: #1}% +}% {}% } @@ -1141,38 +1145,48 @@ top=1in,bottom=1in,% \begin{warpHTML} -\AtEndPreamble{ - -\renewcommand*{\notedivision} - {\BlockClassSingle{footnoteheader}{}} +\newbox\LWR@footnotes +\setbox\LWR@footnotes=\vbox{} +\long\def\@makefntext#1{\textsuperscript{\@thefnmark} #1} +\def\@makefnmark{\hbox{\textsuperscript{\@thefnmark}}} -\renewcommand{\pagenotesubhead}[2]{} -\let\footnote\LWR@origpagenote -\renewcommand{\notenuminnotes}[1]{% - \textsuperscript{#1} } +\long\def\@footnotetext#1{% +\global\setbox\LWR@footnotes=\vbox{\unvbox\LWR@footnotes% +\protected@edef\@currentlabel{% +\csname p@footnote\endcsname\@thefnmark% +}% @currentlabel +\color@begingroup% +\@makefntext{#1}% +\LWR@htmltagc{/\LWR@tagregularparagraph}% +\color@endgroup% +}% vbox +}% -\let\LWR@orignoteentry\noteentry -\renewcommand{\noteentry}[4]{% -\begingroup% -\renewcommand*{\@currentlabel}{#1}% -\renewcommand*{\cref@currentlabel}{[pagenote][#1][]{#1}}% -\LWR@orignoteentry{#1}{#2}{#3}{#4}% -\endgroup% +\long\def\@mpfootnotetext#1{% +\global\setbox\@mpfootins\vbox{% +\unvbox\@mpfootins +\reset@font\footnotesize +\hsize\columnwidth +\@parboxrestore +\protected@edef\@currentlabel +{\csname p@mpfootnote\endcsname\@thefnmark}% +\color@begingroup +\@makefntext{% +\ignorespaces#1% +}% +\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}% +{}% +{\LWR@htmltagc{/\LWR@tagregularparagraph}}% +\color@endgroup}% } - -\newcommand*{\LWR@printpendingnotes}{ -\ifthenelse{\cnttest{\value{pagenote}}{>}{0}}% -{ +\newcommand*{\LWR@printpendingfootnotes}{% \begin{BlockClass}{footnotes} -\LWR@origprintnotes* -\setcounter{pagenote}{0} +\LWR@origmedskip +\unvbox\LWR@footnotes +\setbox\LWR@footnotes=\vbox{} \end{BlockClass} } -{} -} - -}% \AtEndPreamble \end{warpHTML} @@ -1283,7 +1297,7 @@ top=1in,bottom=1in,% \LWR@htmlelementclassend{section}{textbody} -\LWR@printpendingnotes +\LWR@printpendingfootnotes \LWR@htmlelement{footer} @@ -1667,7 +1681,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@closeprevious{\LWR@depthfinished} \LWR@htmlelementclassend{section}{textbody} -\LWR@printpendingnotes +\LWR@printpendingfootnotes \LWR@htmlelement{footer} \LWR@pagebottom @@ -1983,10 +1997,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \newcommand*{\LWR@maketitlesetup}{% \@bsmarkseries \@mpbsmarkseries -\def\@makefnmark{\textsuperscript{\thefootnote}}% +\def\@makefnmark{\textsuperscript{\thefootnote}} \long\def\@makefntext##1{% \makethanksmark \LWR@orighspace{1in} -##1\LWR@htmltagc{/\LWR@tagregularparagraph}% +##1% }% } @@ -2026,11 +2040,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \@thanks } -\let\LWR@origthanksmarkseries\thanksmarkseries \renewcommand{\thanksmarkseries}[1]{% \def\@mpbsmarkseries{% -\renewcommand*{\thempfootnote}{\@nameuse{#1}{mpfootnote}}} -\LWR@origthanksmarkseries{#1} +\renewcommand*{\thempfootnote}{\@nameuse{#1}{mpfootnote}}}% +\def\@bsmarkseries{\renewcommand{\thefootnote}{\@nameuse{#1}{footnote}}}% } \end{warpHTML} @@ -2113,7 +2126,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \renewcommand{\VerbatimFootnotes}{ \PackageError{lwarp} {Verbatim footnotes are not yet supported by lwarp.} -{This may be improved when lwarp uses LaTeX footnotes instead of pagenotes.} +{This may be improved some day.} } \newcommand*{\LWR@atbeginverbatim}[1] @@ -3086,6 +3099,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% }% not lateximage } \NewDocumentCommand{\LWR@newlabel}{m o}{% +\LWR@traceinfo{LWR@newlabel: starting}% \LWR@traceinfo{LWR@newlabel: !#1!}% \LWR@origlabel{#1}% \LWR@traceinfo{LWR@newlabel: filesectionnames is \ifbool{FileSectionNames}{true}{false}}% @@ -3368,7 +3382,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \@ifundefined{chapter} {\LWR@closeprevious{\LWR@depthsection}} {\LWR@closeprevious{\LWR@depthchapter}} -\LWR@printpendingnotes +\LWR@printpendingfootnotes \@ifundefined{chapter}{\section*{#2}}{\chapter*{#2}} \LWR@htmlelementclass{nav}{#1} \LWR@myshorttoc{#1} @@ -3387,11 +3401,18 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \let\LWR@origlistoftables\listoftables \renewcommand*{\tableofcontents}{% \LWR@copyfile{\jobname.toc}{\jobname.sidetoc}% -\LWR@printpendingnotes% +\LWR@printpendingfootnotes \LWR@origtableofcontents% } -\renewcommand*{\listoffigures}{\LWR@printpendingnotes\LWR@origlistoffigures} -\renewcommand*{\listoftables}{\LWR@printpendingnotes\LWR@origlistoftables} +\renewcommand*{\listoffigures}{ +\LWR@printpendingfootnotes +\LWR@origlistoffigures +} + +\renewcommand*{\listoftables}{ +\LWR@printpendingfootnotes +\LWR@origlistoftables +} \NewDocumentCommand{\listof}{m +m}{% @@ -3543,9 +3564,9 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \let\LWR@origtextdollar\$ \renewcommand*{\$}{% -\LWR@htmltagc{span}% -\LWR@origtextdollar% -\LWR@htmltagc{/span}% +\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}% +{\LWR@origtextdollar}% +{\LWR@htmltagc{span}\LWR@origtextdollar\LWR@htmltagc{/span}}% } \newcounter{LWR@externalfilecnt} @@ -3917,11 +3938,6 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \begin{warpHTML} -\newpagestyle{LWR@commentfooterstyle}{ -\sethead{}{}{} -\setfoot{\LWR@htmlopencomment}{}{} -} - \newcounter{LWR@lateximagenumber} \setcounter{LWR@lateximagenumber}{0} \newcounter{LWR@lateximagedepth} @@ -3930,9 +3946,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifcsdef{LWR@file}{}{\newwrite{\LWR@file}} \edef\LWR@hashmark{\string#} % for use in \write \edef\LWR@percent{\@percentchar} % for use in \write - -\newcounter{LWR@nextpage} - +\newcounter{LWR@LIpage} \end{warpHTML} \begin{warpall} @@ -3979,21 +3993,24 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% } \NewDocumentEnvironment{lateximage}{O{image}}{% +\LWR@traceinfo{lateximage: starting on page \arabic{page}}% \ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}% {% \addtocounter{LWR@lateximagedepth}{1}% }% {% start of outer-most lateximage \addtocounter{LWR@lateximagenumber}{1}% +\LWR@traceinfo{lateximage: LWR@lateximagenumber is \arabic{LWR@lateximagenumber}}% \boolfalse{mathjax} \LWR@ensuredoingapar% \addtocounter{LWR@externalfilecnt}{1}% -\setcounter{LWR@nextpage}{\thepage}% -\addtocounter{LWR@nextpage}{1}% +\LWR@traceinfo{lateximage: LWR@externalfilecnt is \arabic{LWR@externalfilecnt}}% +\setcounterpageref{LWR@LIpage}{LWRlateximage\theLWR@lateximagenumber}% +\LWR@traceinfo{lateximage: LWR@LIpage is \arabic{LWR@LIpage}}% \LWR@htmltag{span id="lateximage\arabic{LWR@lateximagenumber}" % class="lateximagesource"{}} \LWR@orignewline -\immediate\write\LWR@file{|\theLWR@nextpage|\theLWR@externalfilecnt|}% -\LWR@origthispagestyle{LWR@commentfooterstyle}% +\immediate\write\LWR@file{|\theLWR@LIpage|\theLWR@externalfilecnt|}% +\LWR@htmlopencomment% \addtocounter{LWR@lateximagedepth}{1}% \LWR@orignewpage% \LWR@origminipage{6in}% @@ -4017,6 +4034,7 @@ class="lateximagesource"{}} \LWR@orignewline \let\tabular\LWR@origtabular% \let\endtabular\LWR@origendtabular% \let\newline\LWR@orignewline% +\LWR@origlabel{LWRlateximage\arabic{LWR@lateximagenumber}}% *8* }% end of outer-most lateximage }% end of \begin{lateximage} {% start of \end{lateximage} @@ -4029,6 +4047,7 @@ class="lateximagesource"{}} \LWR@orignewline \LWR@orignewpage% \LWR@origscriptsize% \LWR@htmlclosecomment{}\LWR@orignewline% +\LWR@traceinfo{lateximage: The page after the image is \arabic{page}}% \ifthenelse{\equal{#1}{LWRAMSMATHBODY}}% {% \LWR@subinlineimage[% @@ -4048,10 +4067,11 @@ class="lateximagesource"{}} \LWR@orignewline \LWR@htmlcomment{End of lateximage}% \addtocounter{LWR@lateximagedepth}{-1}% }% end of outer-most lateximage +\LWR@traceinfo{lateximage: done} }% \end{warpHTML} \begin{warpprint} -\newenvironment{lateximage}[1][]{\begingroup}{\endgroup} +\newenvironment{lateximage}[1][]{\minipage{\linewidth}}{\endminipage} \end{warpprint} @@ -4368,10 +4388,6 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \begin{warpHTML} -\AtEndPreamble{ -\RequirePackage{cleveref} -\crefname{pagenote}{note}{notes} -} \AfterEndPreamble{ @@ -4407,7 +4423,10 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \begin{warpHTML} -\BeforeBeginEnvironment{picture}{\lateximage} +\BeforeBeginEnvironment{picture}{% +\lateximage% +\let\makebox\LWR@origmakebox% +} \AfterEndEnvironment{picture}{\endlateximage} @@ -4424,16 +4443,6 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \newlength{\LWR@minipageheight} \let\LWR@origminipage\minipage \let\LWR@origendminipage\endminipage -\NewDocumentCommand{\LWR@nullrule}{o m m}{} -\newcommand{\LWR@makefntext}[1]{% -\begingroup% -\let\rule\LWR@nullrule% -\textsuperscript{\@thefnmark} #1% -\endgroup% -\LWR@htmltagc{/\LWR@tagregularparagraph}% -} -\newcommand*{\LWR@makefnmark}{\textsuperscript{\@thefnmark}} - \def\LWR@endminipage{% \par \unskip @@ -4441,6 +4450,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \vskip\skip\@mpfootins \normalcolor \LWR@htmldivclass{mpfootnotes} +\LWR@origmedskip \unvbox\@mpfootins \LWR@htmldivclassend{mpfootnotes} \fi @@ -4453,9 +4463,6 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \LWR@stoppars \LWR@origminipage{6in} \LWR@origraggedright% -\let\footnote\LWR@origfootnote% -\let\@makefntext\LWR@makefntext% -\let\@makefnmark\LWR@makefnmark% \LWR@startpars% } @@ -4518,9 +4525,6 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \setlength{\textwidth}{6in}% \setlength{\textheight}{9in}% \LWR@origraggedright% -\let\footnote\LWR@origfootnote% -\let\@makefntext\LWR@makefntext% -\let\@makefnmark\LWR@makefnmark% \LWR@startpars% \LWR@traceinfo{minipage: finished starting the minipage}% } @@ -4541,6 +4545,8 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline #5 \end{minipage} } +\let\LWR@origmakebox\makebox + \RenewDocumentCommand{\makebox}{o o m}{% \mbox{#3} } @@ -4630,6 +4636,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \let\LWR@origqquad\qquad \let\LWR@orighspace\hspace \let\LWR@origrule\rule +\let\LWR@origmedskip\medskip \renewcommand*{\,}{\HTMLunicode{202f}} % HTML thin non-breakable space \renewcommand*{~}{\HTMLentity{nbsp}} @@ -4878,134 +4885,6 @@ homehtmlfilename = "\HomeHTMLFileName"% \end{warpprint} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \endinput %% %% End of file `lwarp.sty'. |