diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp.sty | 186 |
1 files changed, 87 insertions, 99 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty index 9ab86bf0d27..438e5652786 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/03/02 v0.23 Allows LaTeX to directly produce HTML5 output.] + [2017/03/15 v0.24 Allows LaTeX to directly produce HTML5 output.] @@ -171,9 +171,11 @@ after lwarp.} \LWR@loadafter{setspace} \LWR@loadafter{showkeys} \LWR@loadafter{sidecap} +\LWR@loadafter{subfig} \LWR@loadafter{tabularx} \LWR@loadafter{textpos} \LWR@loadafter{threeparttable} +\LWR@loadafter{tikz} \LWR@loadafter{titleps} \LWR@loadafter{titlesec} \LWR@loadafter{titletoc} @@ -271,7 +273,6 @@ top=1in,bottom=1in,% \RequirePackage{caption} -\RequirePackage{subcaption} \RequirePackage{enumitem} \setlist[itemize]{leftmargin=0em} @@ -654,11 +655,13 @@ top=1in,bottom=1in,% \HomeHTMLFileName.html% }% {% -\LWR@traceinfo{LWR@htmlsectionfilename C}% +\LWR@traceinfo{LWR@htmlsectionfilename C \LWR@tempone}% \ifthenelse{% \equal{\HTMLFileName}{} \AND \equal{\LWR@tempone}{Index} \OR \equal{\LWR@tempone}{index}% }% -{\_#1.html}% +{% +\LWR@traceinfo{prefixing the index name with an underscore.}% +\_#1.html}% {\HTMLFileName#1.html}% }% \LWR@traceinfo{LWR@htmlsectionfilename Z}% @@ -1597,6 +1600,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \let\tabular\LWR@tabular \let\endtabular\endLWR@tabular \let\LWR@origcaption\caption +\let\LWR@origltx@label\ltx@label \let\ltx@label\LWR@htmlmathlabel \let\TeX\LWR@TeX \let\LaTeX\LWR@LaTeX @@ -2517,10 +2521,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% {% not at the left edge: \LWR@traceinfo{not at the left edge}% \LWR@setexparray{LWR@colatspec}{\theLWR@tabletotalcols}{\LWR@strresult}% -\LWR@traceinfo{at \theLWR@tabletotalcols: \LWR@colatspec(\theLWR@tabletotalcols)!}% -}% +\LWR@traceinfo{at \theLWR@tabletotalcols: % + \LWR@getexparray{LWR@colatspec}{\theLWR@tabletotalcols})!}% \let\LWR@strresult\relax% \booltrue{LWR@validtablecol}% +}% } \newcommand*{\LWR@parsebangcolumn}{% \LWR@traceinfo{bang column}% @@ -3040,9 +3045,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@spref{#1}{zLWR@name}% } \newcommand*{\LWR@htmlfileref}[1]{% -\LWR@traceinfo{LWR@htmlfileref A: !#1!}% \LWR@spref{#1}{zLWR@htmlfilenumber}% -\LWR@traceinfo{LWR@htmlfileref B}% } \newcommand*{\LWR@lateximagedepthref}[1]{% \LWR@spref{#1}{zLWR@lateximagedepth}% @@ -3076,67 +3079,63 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% }% pars not allowed }% not lateximage } - -\newcommand*{\LWR@sublabel}[1]{% -\LWR@traceinfo{LWR@sublabel: !#1!}% +\newcommand*{\LWR@newlabel}[1]{% +\LWR@traceinfo{LWR@newlabel: !#1!}% \LWR@origlabel{#1}% -\LWR@traceinfo{about to splabel}% -\LWR@traceinfo{filesectionnames is \ifbool{FileSectionNames}{true}{false}}% -\LWR@traceinfo{LWR@thisfilename is !\LWR@thisfilename!}% -\LWR@traceinfo{LWR@htmlfilenumber is \theLWR@htmlfilenumber}% +\LWR@traceinfo{LWR@newlabel: filesectionnames is \ifbool{FileSectionNames}{true}{false}}% +\LWR@traceinfo{LWR@newlabel: LWR@thisfilename is !\LWR@thisfilename!}% +\LWR@traceinfo{LWR@newlabel: LWR@htmlfilenumber is \theLWR@htmlfilenumber}% \LWR@splabel{#1}% \LWR@subsublabel{#1}% -\LWR@traceinfo{finished with LWR@sublabel}% -} -\newcommand*{\LWR@newlabel}[1]{% -\LWR@traceinfo{lwr@newlabel: !#1!}% -\LWR@sublabel{#1}% -\LWR@traceinfo{lwr@newlabel: done}% +\LWR@traceinfo{LWR@newlabel: done}% } \newcommand*{\LWR@startref}[1] {% \edef\LWR@lidref{\LWR@lateximagedepthref{#1}} -\LWR@traceinfo{***LWR@startref A: !#1!}% +\LWR@traceinfo{LWR@startref A: !#1!}% \LWR@htmltag{a href="% -\LWR@traceinfo{***LWR@startref B}% +\LWR@traceinfo{LWR@startref B}% \LWR@htmlrefsectionfilename{#1}% -\LWR@traceinfo{***LWR@startref C}% +\LWR@traceinfo{LWR@startref C}% \#% -\LWR@traceinfo{***LWR@startref D: !#1!}% +\LWR@traceinfo{LWR@startref D: !#1!}% \ifthenelse{\equal{\LWR@lidref}{??}}% -{??}% {% -\LWR@traceinfo{***LWR@startref D1}% -\LWR@traceinfo{***depthref is \LWR@lidref}% +\LWR@traceinfo{LWR@startref D0: ??} +??}% +{% +\LWR@traceinfo{LWR@startref D1: \LWR@lidref}% \ifthenelse{\cnttest{\LWR@lidref}{>}{0}}% {% -\LWR@traceinfo{***LWR@startref D2}% +\LWR@traceinfo{LWR@startref D2: \LWR@lidref}% lateximage\LWR@lateximagenumberref{#1}% }% {% -\LWR@traceinfo{***LWR@startref D3}% +\LWR@traceinfo{LWR@startref D3}% #1% }% }% -\LWR@traceinfo{***LWR@startref E}% +\LWR@traceinfo{LWR@startref E}% "{}}% -\LWR@traceinfo{***LWR@startref F}% +\LWR@traceinfo{LWR@startref F}% +} + +\NewDocumentCommand{\LWR@subnewref}{m m}{% +\LWR@traceinfo{LWR@subnewref #1 #2}% +\LWR@startref{#1}% +\LWR@origref{#2}% +\LWR@htmltag{/a}% } \NewDocumentCommand{\LWR@newref}{s m}{% \LWR@traceinfo{LWR@newref #2}% \IfBooleanTF{#1}% {\LWR@origref{#2}}% -{% -\LWR@startref{#2}% -\LWR@origref{#2}% -\LWR@htmltag{/a}% -}% +{\LWR@subnewref{#2}{#2}}% } - \newcommand*{\pagerefPageFor}{see } \NewDocumentCommand{\LWR@newpageref}{s m}{% \IfBooleanTF{#1}% @@ -3279,6 +3278,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \begingroup% \renewcommand{\@@par}{\LWR@closeparagraph\LWR@orig@@par}% \RenewDocumentEnvironment{minipage}{O{t} o O{t} m}{}{}% +\RenewDocumentCommand{\parbox}{O{t} o O{t} m +m}{##5}% \LWR@htmlblocktag{figcaption}% \LWR@origcaption@begin% } @@ -3292,8 +3292,10 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \LWR@traceinfo{LWR@caption@end: done}% } +\AtBeginDocument{ \let\caption@begin\LWR@caption@begin \let\caption@end\LWR@caption@end +} \let\LWR@origcaptionlistentry\captionlistentry @@ -3434,33 +3436,46 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifthenelse{\cnttest{#1}{<=}{\value{tocdepth}}}{% \LWR@startpars% \LWR@subhyperrefclass{% -\LWR@htmlrefsectionfilename{autopage-#4}\#autosec-#4}{#3}{#2}% +\LWR@htmlrefsectionfilename{autopage-#4}\#autosec-#4}{#3}{toc#2}% \LWR@stoppars% } {} } +\newcounter{lofdepth} +\setcounter{lofdepth}{1} + +\newcounter{lotdepth} +\setcounter{lotdepth}{1} -\newcommand{\hypertocfloat}[4]{% +\newcommand{\hypertocfloat}[5]{% \LWR@startpars +\@ifundefined{c@#3depth}{% +\newcounter{#3depth}% +\setcounter{#3depth}{1}% +}{}% +\LWR@traceinfo{hypertocfloat depth is #1 #3depth is \arabic{#3depth}}% +\ifthenelse{\cnttest{#1}{<=}{\arabic{#3depth}}}{% +\LWR@startpars% \LWR@subhyperrefclass{% \LWR@htmlrefsectionfilename{autopage-\arabic{LWR@nextautopage}}% \#autofloat-\arabic{LWR@nextautofloat}}% -{#3}{#2}% +{#4}{toc#2}% \LWR@stoppars% +}{}% } -\renewcommand{\l@part}[2]{\hypertoc{-1}{tocpart}{#1}{#2}} +\renewcommand{\l@part}[2]{\hypertoc{-1}{part}{#1}{#2}} \DeclareDocumentCommand{\l@chapter}{m m} -{\hypertoc{0}{tocchapter}{#1}{#2}} -\renewcommand{\l@section}[2]{\hypertoc{1}{tocsection}{#1}{#2}} -\renewcommand{\l@subsection}[2]{\hypertoc{2}{tocsubsection}{#1}{#2}} +{\hypertoc{0}{chapter}{#1}{#2}} +\renewcommand{\l@section}[2]{\hypertoc{1}{section}{#1}{#2}} +\renewcommand{\l@subsection}[2]{\hypertoc{2}{subsection}{#1}{#2}} \renewcommand{\l@subsubsection}[2] -{\hypertoc{3}{tocsubsubsection}{#1}{#2}} -\renewcommand{\l@paragraph}[2]{\hypertoc{4}{tocparagraph}{#1}{#2}} -\renewcommand{\l@subparagraph}[2]{\hypertoc{5}{tocsubparagraph}{#1}{#2}} -\renewcommand{\l@figure}[2]{\hypertocfloat{1}{tocfigure}{#1}{#2}} -\renewcommand{\l@table}[2]{\hypertocfloat{1}{toctable}{#1}{#2}} +{\hypertoc{3}{subsubsection}{#1}{#2}} +\renewcommand{\l@paragraph}[2]{\hypertoc{4}{paragraph}{#1}{#2}} +\renewcommand{\l@subparagraph}[2]{\hypertoc{5}{subparagraph}{#1}{#2}} +\renewcommand{\l@figure}[2]{\hypertocfloat{1}{figure}{lof}{#1}{#2}} +\renewcommand{\l@table}[2]{\hypertocfloat{1}{table}{lot}{#1}{#2}} \end{warpHTML} @@ -3670,15 +3685,19 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \newbool{LWR@amsmultline} \boolfalse{LWR@amsmultline} - \newcommand*{\LWR@htmlmathlabel}[1]{% \LWR@traceinfo{LWR@htmlmathlabel #1}% \ifbool{mathjax}{% \text{ \ifbool{LWR@amsmultline}{}{\hspace*{\totwidth@}} -\LWR@htmlclosecomment\LWR@sublabel{\@firstofone#1}\LWR@htmlopencomment}% +\LWR@htmlclosecomment% +\LWR@origltx@label{#1}% +\LWR@htmlopencomment% +}% text +}% mathjax +{% +\LWR@origltx@label{#1}% }% -{\LWR@sublabel{\@firstofone#1}}% } \newcommand*{\LWR@beginhideamsmath}{ @@ -4367,6 +4386,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \renewcommand{\@@setcpagerefrange}[3]{% #1{\cpagerefFor\ \cref{#2}}{\cref{#3}}{}{}{}{}} +}% AfterEndPreamble \let\LWR@origlabel\label \let\label\LWR@newlabel @@ -4375,54 +4395,14 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \let\LWR@origpageref\pageref \let\pageref\LWR@newpageref -}% AfterEndPreamble - \end{warpHTML} - \begin{warpHTML} -\BeforeBeginEnvironment{picture}{ - -\lateximage} +\BeforeBeginEnvironment{picture}{\lateximage} -\AfterEndEnvironment{picture}{\endlateximage - -} - -\end{warpHTML} - - - -\begin{warpHTML} - -\newbool{LWR@tikzbabel} -\boolfalse{LWR@tikzbabel} - -\AtBeginDocument{ -\@ifpackageloaded{tikz}{ -\@ifpackagelater{tikz}{2013/12/20}% Test for Tikz version v3.0.0 -{\booltrue{LWR@tikzbabel}} -{\boolfalse{LWR@tikzbabel}} -}{} -} - -\BeforeBeginEnvironment{tikzpicture}{% - -\lateximage -\ifbool{LWR@tikzbabel} -{} -{\catcode`\$=3} % dollar sign is math shift -} - -\AfterEndEnvironment{tikzpicture}{% -\endlateximage - -\ifbool{LWR@tikzbabel} -{} -{\catcode`\$=\active} -} +\AfterEndEnvironment{picture}{\endlateximage} \end{warpHTML} @@ -4490,7 +4470,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \boolfalse{LWR@minipagethispar} \RenewDocumentEnvironment{minipage}{O{t} o O{t} m} {% -\LWR@traceinfo{starting minipage}% +\LWR@traceinfo{starting minipage of width #4}% \uselengthunit{in}% \setlength{\LWR@minipagewidth}{#4}% \ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}{% @@ -4499,6 +4479,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \setlength{\textwidth}{6in}% \setlength{\textheight}{9in}% }{}% +\LWR@traceinfo{computed width is \rndprintlength{\LWR@minipagewidth}} \addtocounter{LWR@minipagedepth}{1}% \setlength{\LWR@minipageheight}{\textheight}% default unless specified \IfValueTF{#2}{\setlength{\LWR@minipageheight}{#2}}{}% @@ -4512,7 +4493,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \ifthenelse{\equal{#3}{c}}{justify-content: center ; }{}% \ifthenelse{\equal{#3}{b}}{justify-content: flex-end ; }{}% \ifthenelse{\equal{#3}{s}}{justify-content: space-between ; }{}% -\LWR@traceinfo{minipage: about to print the width}% +\LWR@traceinfo{minipage: about to print the width of \rndprintlength{\LWR@minipagewidth}}% \uselengthunit{PT}% \ifbool{LWR@minipagefullwidth}% {\boolfalse{LWR@minipagefullwidth}}% @@ -4546,8 +4527,9 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \LWR@startpars% \global\booltrue{LWR@minipagethispar}% } -\RenewDocumentCommand{\parbox}{O{t} o O{t} m m} +\RenewDocumentCommand{\parbox}{O{t} o O{t} m +m} { +\LWR@traceinfo{parbox of width #4}% \begin{minipage}[#1][#2][#3]{#4} #5 \end{minipage} @@ -4714,9 +4696,11 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \newlength{\LWR@tempheight} \newlength{\LWR@tempraise} - \NewDocumentCommand{\LWR@hspace}{s m}{% \setlength{\LWR@tempwidth}{#2}% +\ifnum\gluestretchorder\LWR@tempwidth>0% +\setlength{\LWR@tempwidth}{2em}% +\fi% \ifthenelse{\dimtest{\LWR@tempwidth}{=}{0pt}}{}{% \LWR@minipagestoppars% \ifthenelse{\dimtest{\LWR@tempwidth}{=}{.16667em}} @@ -4990,6 +4974,10 @@ homehtmlfilename = "\HomeHTMLFileName"% + + + + \endinput %% %% End of file `lwarp.sty'. |