diff options
author | Karl Berry <karl@freefriends.org> | 2018-03-03 21:54:38 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-03-03 21:54:38 +0000 |
commit | b482212984105cf874198fd412f9dbb70f1565b8 (patch) | |
tree | d67ac633af85230aae9eb70f0e32acdea9bf16ef /Master/texmf-dist/tex/latex/lwarp | |
parent | 8ee96b735b5e66d16bf986fedb8978f098554e72 (diff) |
lwarp (3mar18)
git-svn-id: svn://tug.org/texlive/trunk@46804 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp')
24 files changed, 962 insertions, 211 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty new file mode 100644 index 00000000000..25c0dafd1a8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty @@ -0,0 +1,27 @@ +%% +%% This is file `lwarp-axodraw2.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `axodraw2') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. + +\LWR@ProvidesPackagePass{axodraw2} + +\BeforeBeginEnvironment{axopicture}{\begin{lateximage}[axopicture]} + +\AfterEndEnvironment{axopicture}{\end{lateximage}} + +\endinput +%% +%% End of file `lwarp-axodraw2.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty new file mode 100644 index 00000000000..fdd88117053 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty @@ -0,0 +1,27 @@ +%% +%% This is file `lwarp-bytefield.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `bytefield') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. + +\LWR@ProvidesPackagePass{bytefield} + +\BeforeBeginEnvironment{bytefield}{\begin{lateximage}[bytefield]} + +\AfterEndEnvironment{bytefield}{\end{lateximage}} + +\endinput +%% +%% End of file `lwarp-bytefield.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-cancel.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-cancel.sty index 1c9e5258781..dbc8dd6aeaa 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-cancel.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-cancel.sty @@ -15,6 +15,7 @@ %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. +\LWR@origRequirePackage{lwarp-xcolor}% for \convertcolorspec \LWR@ProvidesPackagePass{cancel} \LetLtxMacro\LWR@origcancel\cancel \LetLtxMacro\LWR@origbcancel\bcancel diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-dblfloatfix.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-dblfloatfix.sty new file mode 100644 index 00000000000..806d480e0f7 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-dblfloatfix.sty @@ -0,0 +1,21 @@ +%% +%% This is file `lwarp-dblfloatfix.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `dblfloatfix') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +\LWR@ProvidesPackageDrop{dblfloatfix} +\endinput +%% +%% End of file `lwarp-dblfloatfix.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-diagbox.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-diagbox.sty new file mode 100644 index 00000000000..82b71417bd3 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-diagbox.sty @@ -0,0 +1,78 @@ +%% +%% This is file `lwarp-diagbox.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `diagbox') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. + +\LWR@ProvidesPackagePass{diagbox} +\LetLtxMacro\LWR@origdiagbox@double\diagbox@double +\LetLtxMacro\LWR@origdiagbox@triple\diagbox@triple + +\appto\LWR@restoreorigformatting{ +\LetLtxMacro\diagbox@double\LWR@origdiagbox@double +\LetLtxMacro\diagbox@triple\LWR@origdiagbox@triple +} + +\newcommand{\LWR@diagbox@AB}[4]{ +\begingroup% +\LetLtxMacro\\\newline% +\BlockClassSingle{diagbox#1}{#2}% +\BlockClassSingle{diagbox#3}{#4}% +\endgroup% +\LWR@stoppars% +} + +\newcommand{\LWR@diagboxNW}[2]{% +\LWR@diagbox@AB{E}{#2}{W}{#1}% +} + +\newcommand{\LWR@diagboxNE}[2]{% +\LWR@diagbox@AB{W}{#1}{E}{#2}% +} + +\let\LWR@diagboxSW\LWR@diagboxNE +\let\LWR@diagboxSE\LWR@diagboxNW + +\def\diagbox@double#1#2#3{% +\setkeys{diagbox}{dir=NW,#1}% +\csuse{LWR@diagbox\diagbox@dir}{#2}{#3}% +} + +\newcommand{\LWR@diagboxTNW}[3]{% +\BlockClassSingle{diagboxtitleN}{#1} +\LWR@diagboxNW{#2}{#3} +} + +\newcommand{\LWR@diagboxTNE}[3]{% +\BlockClassSingle{diagboxtitleN}{#1} +\LWR@diagboxNE{#2}{#3} +} + +\newcommand{\LWR@diagboxTSW}[3]{% +\LWR@diagboxSW{#2}{#3} +\BlockClassSingle{diagboxtitleS}{#1} +} + +\newcommand{\LWR@diagboxTSE}[3]{% +\LWR@diagboxSE{#2}{#3} +\BlockClassSingle{diagboxtitleS}{#1} +} +\def\diagbox@triple#1#2#3#4{% +\setkeys{diagbox}{dir=NW,#1}% +\csuse{LWR@diagboxT\diagbox@dir}{#3}{#2}{#4}% +} +\endinput +%% +%% End of file `lwarp-diagbox.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-epstopdf.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-epstopdf.sty new file mode 100644 index 00000000000..bbb6875adf5 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-epstopdf.sty @@ -0,0 +1,24 @@ +%% +%% This is file `lwarp-epstopdf.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `epstopdf') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +\LWR@ProvidesPackageDrop{epstopdf} +\newcommand*{\epstopdfsetup}[1]{} +\newcommand*{\epstopdfcall}[1]{} +\newcommand*{\epstopdfDeclareGraphicsRule}[4]{} +\endinput +%% +%% End of file `lwarp-epstopdf.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty index 9f3585173cf..c30cb0951f5 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty @@ -16,6 +16,7 @@ %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. \RequirePackage{xcolor}% for \convertcolorspec + \LWR@ProvidesPackagePass{fancyvrb} \begin{warpHTML} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-floatflt.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-floatflt.sty index 83898a6830c..47226d7af23 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-floatflt.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-floatflt.sty @@ -21,7 +21,7 @@ \setlength{\LWR@templengthone}{#3}% \LWR@BlockClassWP{% float:right; % - width:\LWR@printlength{\LWR@templengthone}; % + width:\LWR@printlength{\LWR@templengthone}; % extra space margin:10pt% }{% width:\LWR@printlength{\LWR@templengthone}% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty index 48d102c1d0e..3307c12a546 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty @@ -64,7 +64,7 @@ \ifthenelse{\lengthtest{\LWR@igheight > 0pt}}% {% \renewcommand*{\LWR@igheightstyle}{% - height:\LWR@printlength{\LWR@igheight} % + height:\LWR@printlength{\LWR@igheight} % extra space }% \IfEndWith{#1}{ex}% {\renewcommand*{\LWR@igheightstyle}{height:#1}}% yes ex @@ -234,15 +234,15 @@ img src="% {\LWR@origtilde{} transform-origin: \LWR@originnames{\LWR@igorigin}; \LWR@orignewline}{}% \ifthenelse{\NOT\equal{\LWR@igangle}{}}% {% -\LWR@rotstyle{-ms-}{\LWR@igangle} % -\LWR@rotstyle{-webkit-}{\LWR@igangle} % +\LWR@rotstyle{-ms-}{\LWR@igangle} % extra space +\LWR@rotstyle{-webkit-}{\LWR@igangle} % extra space \LWR@rotstyle{}{\LWR@igangle % }}{}% \ifthenelse{\NOT\equal{\LWR@igxscale}{1}\OR% \NOT\equal{\LWR@igyscale}{1}}% -{\LWR@scalestyle{-ms-}{\LWR@igxscale}{\LWR@igyscale} % -\LWR@scalestyle{-webkit-}{\LWR@igxscale}{\LWR@igyscale} % -\LWR@scalestyle{}{\LWR@igxscale}{\LWR@igyscale}}{} % +{\LWR@scalestyle{-ms-}{\LWR@igxscale}{\LWR@igyscale} % extra space +\LWR@scalestyle{-webkit-}{\LWR@igxscale}{\LWR@igyscale} % extra space +\LWR@scalestyle{}{\LWR@igxscale}{\LWR@igyscale}}{} % extra space \ifthenelse{\NOT\equal{\LWR@opacity}{1}}% {opacity:\LWR@opacity; }% {}% @@ -257,7 +257,6 @@ img src="% - \AtBeginDocument{ \LWR@traceinfo{Patching includegraphics.} @@ -302,9 +301,9 @@ img src="% \LWR@htmltagc{span style="display: inline-block; % \ifthenelse{\NOT\equal{\LWR@rotboxorigin}{}}% {transform-origin: \LWR@originnames{\LWR@rotboxorigin};\LWR@origtilde}{}% -\LWR@rotstyle{-ms-}{#2} % -\LWR@rotstyle{-webkit-}{#2} % -\LWR@rotstyle{}{#2} % +\LWR@rotstyle{-ms-}{#2} % extra space +\LWR@rotstyle{-webkit-}{#2} % extra space +\LWR@rotstyle{}{#2} % extra space "}\LWR@orignewline% \begin{LWR@nestspan}% #3% @@ -318,9 +317,9 @@ img src="% \AtBeginDocument{ \RenewDocumentCommand{\scalebox}{m o m}{% \LWR@htmltagc{span style="display: inline-block; % -\LWR@scalestyle{-ms-}{#1}{\IfNoValueTF{#2}{#1}{#2}} % -\LWR@scalestyle{-webkit-}{#1}{\IfNoValueTF{#2}{#1}{#2}} % -\LWR@scalestyle{}{#1}{\IfNoValueTF{#2}{#1}{#2}} % +\LWR@scalestyle{-ms-}{#1}{\IfNoValueTF{#2}{#1}{#2}} % extra space +\LWR@scalestyle{-webkit-}{#1}{\IfNoValueTF{#2}{#1}{#2}} % extra space +\LWR@scalestyle{}{#1}{\IfNoValueTF{#2}{#1}{#2}} % extra space "}% \begin{LWR@nestspan}% #3% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-hang.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-hang.sty index 0e3efd3dece..c8c0aa40793 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-hang.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-hang.sty @@ -42,9 +42,15 @@ \renewcommand*{\LWR@printcloselist}{\LWR@printcloseitemize}% \renewcommand*{\LWR@printopenlist}{% \LWR@findhangingleftmargin% - ul style="\LWR@origmbox{list-style-type:none;} % - \LWR@origmbox{margin-left:\LWR@printlength{\LWR@templengthone}} ; % - \LWR@origmbox{text-indent:-\LWR@printlength{\hangingindent}}"% + ul style="% + \LWR@origmbox{list-style-type:none;} % extra space + \LWR@origmbox{% + margin-left:\LWR@printlength{\LWR@templengthone}% + } ; % extra space + \LWR@origmbox{% + text-indent:-\LWR@printlength{\hangingindent}% + }% + "% }% \let\item\LWR@itemizeitem% \list{}{}% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty index 0e1ff43a768..b40292f99d0 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty @@ -82,7 +82,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}% \LWR@ensuredoingapar% \setlength{\LWR@templengthone}{#1}% \begin{LWR@BlockClassWP}{% - float:right; width:\LWR@printlength{\LWR@templengthone}; % + float:right; width:\LWR@printlength{\LWR@templengthone}; % extra space margin:10pt% }% {% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-lettrine.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-lettrine.sty index 4797dcd0663..547decf2339 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-lettrine.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-lettrine.sty @@ -17,7 +17,7 @@ %% version 2005/12/01 or later. \LWR@ProvidesPackageDrop{lettrine} \DeclareDocumentCommand{\lettrine}{o m m}{% -\InlineClass{lettrine}{#2}\InlineClass{lettrinetext}{#3} % +\InlineClass{lettrine}{#2}\InlineClass{lettrinetext}{#3} % extra space } \newcounter{DefaultLines} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty index 805e5de83a9..a9c4368c0be 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty @@ -20,6 +20,7 @@ \begin{warpHTML} \LWR@ProvidesPackagePass{listings} +\lst@column@flexible \let\LWR@origlst@Init\lst@Init \let\LWR@origlst@DeInit\lst@DeInit diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty index 202b4033e09..6da3ac8e0b8 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty @@ -18,6 +18,7 @@ \RequirePackage{xcolor}% for \convertcolorspec + \LWR@ProvidesPackageDrop{mdframed} \LWR@origRequirePackage{amsthm} \LWR@origRequirePackage[framemethod=none]{mdframed} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-morefloats.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-morefloats.sty new file mode 100644 index 00000000000..d7d0f7a0acf --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-morefloats.sty @@ -0,0 +1,21 @@ +%% +%% This is file `lwarp-morefloats.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `morefloats') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +\LWR@ProvidesPackageDrop{morefloats} +\endinput +%% +%% End of file `lwarp-morefloats.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-nonfloat.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-nonfloat.sty new file mode 100644 index 00000000000..cd14cedced6 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-nonfloat.sty @@ -0,0 +1,25 @@ +%% +%% This is file `lwarp-nonfloat.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `nonfloat') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +\LWR@ProvidesPackageDrop{nonfloat} +\LetLtxMacro\topcaption\caption +\newcommand{\figcaption}{\def\@captype{figure}\caption} +\newcommand{\tabcaption}{\def\@captype{table}\topcaption} +\newenvironment{narrow}[2]{}{} +\endinput +%% +%% End of file `lwarp-nonfloat.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty index ca86d223018..b584124920e 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty @@ -281,6 +281,8 @@ \InlineClass{theoremheadersc}{##1\ (##3)\theorem@separator}]} }% not amsthm \ifbool{LWR@ntheoremamsthm}{}{% +\ifx\thm@usestd\@undefined +\else \theoremnumbering{arabic} \theoremstyle{plain} \RequirePackage{latexsym} @@ -326,6 +328,7 @@ \qedsymbol{\HTMLunicode{220E}}% UTF-8 end-of-proof \theoremsymbol{} +\fi }% not amsthm \ifbool{LWR@ntheoremamsthm}{ diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-pbox.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-pbox.sty new file mode 100644 index 00000000000..a5029cc2283 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-pbox.sty @@ -0,0 +1,33 @@ +%% +%% This is file `lwarp-pbox.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `pbox') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +\LWR@ProvidesPackageDrop{pbox} +\NewDocumentCommand{\pbox}{O{t} o O{t} m +m}{% +\booltrue{LWR@minipagefullwidth}% +\parbox[#1][#2][#3]{#4}{#5}% +} + +\newcommand{\settominwidth}[3][\columnwidth]{% +\settowidth{#2}{#3}% +} + +\newcommand{\widthofpbox}[1]{% +\widthof{#1}% +} +\endinput +%% +%% End of file `lwarp-pbox.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-phfqit.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-phfqit.sty new file mode 100644 index 00000000000..749b4614d61 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-phfqit.sty @@ -0,0 +1,35 @@ +%% +%% This is file `lwarp-phfqit.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `phfqit') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. + +\LWR@ProvidesPackagePass{phfqit} + +\LetLtxMacro\LWR@origbitstring\bitstring + +\renewcommand\bitstring[1]{% +\InlineClass[% + text-decoration: overline underline ; +]{bitstring}{#1}% +} + +\appto{\LWR@restoreorigformatting}{ +\LetLtxMacro\bitstring\LWR@origbitstring +} + +\endinput +%% +%% End of file `lwarp-phfqit.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-schemata.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-schemata.sty new file mode 100644 index 00000000000..c2946d4947c --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-schemata.sty @@ -0,0 +1,40 @@ +%% +%% This is file `lwarp-schemata.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `schemata') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. + +\LWR@ProvidesPackagePass{schemata} + +\LetLtxMacro\LWR@schemata@origschema\schema +\LetLtxMacro\LWR@schemata@origSchema\Schema + +\renewcommand{\schema}[3][open]{% +\begin{lateximage}% +\LWR@orignormalsize +\LWR@schemata@origschema[#1]{#2}{#3}% +\end{lateximage}% +} + +\renewcommand{\Schema}[5][open]{% +\begin{lateximage}% +\LWR@orignormalsize +\LWR@schemata@origSchema[#1]{#2}{#3}{#4}{#5}% +\end{lateximage}% +} + +\endinput +%% +%% End of file `lwarp-schemata.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty index 8c1985f6dd1..cecc0eda7c9 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty @@ -16,6 +16,8 @@ %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. +\RequirePackage{xcolor}% for \convertcolorspec + \LWR@ProvidesPackagePass{siunitx} \AtBeginDocument{% in case textcomp was not loaded @@ -24,6 +26,7 @@ \DeclareSIUnit\elementarycharge{\textit{e}} \DeclareSIUnit\electronmass{\textit{m}\textsubscript{e}} \DeclareSIUnit\hartree{\textit{E}\textsubscript{h}} +\DeclareSIUnit\planckbar{\LWR@siunitx@textplanckbar} }% AtBeginDocument \ExplSyntaxOn @@ -92,7 +95,9 @@ } { \__siunitx_unit_output_pre_print: - \LWR@subsingledollar{\__siunitx_print:nn { number } { #1 }}% lwarp + \LWR@subsingledollar{% lwarp + \textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp + }{\__siunitx_print:nn { number } { #1 }}% lwarp \__siunitx_unit_output_print: } \group_end:% lwarp @@ -123,7 +128,42 @@ \tl_put_right:NV \l__siunitx_unit_tl \l__siunitx_per_symbol_tl \tl_put_right:NV \l__siunitx_unit_tl \l__siunitx_unit_denominator_tl } - +\cs_undefine:N \__siunitx_angle_print_astronomy_aux: +\cs_new_protected:Npn \__siunitx_angle_print_astronomy_aux: { + \prop_get:NnNT \l__siunitx_number_out_prop { mantissa-integer } + \l__siunitx_tmpa_tl + { \__siunitx_print:nV { number } \l__siunitx_tmpa_tl } + \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% lwarp + {% lateximage + \hbox_set:Nn \l__siunitx_angle_marker_box + { + \__siunitx_print:nn { number } { { \l__siunitx_output_decimal_tl } } + } + \hbox_set:Nn \l__siunitx_angle_unit_box + { + \__siunitx_print:nV { unit } \l__siunitx_unit_tl + \skip_horizontal:n { -\scriptspace } + } + \__siunitx_angle_print_astronomy_aux:n { marker } + \__siunitx_angle_print_astronomy_aux:n { unit } + \hbox_set:Nn \l__siunitx_angle_marker_box + { + \box_use:N \l__siunitx_angle_marker_box + \box_use:N \l__siunitx_angle_unit_box + } + \dim_compare:nNnTF + { \l__siunitx_angle_marker_dim } > { \l__siunitx_angle_unit_dim } + { \__siunitx_angle_print_astronomy_marker: } + { \__siunitx_angle_print_astronomy_unit: } + }% lateximage + {% not a lateximage + \__siunitx_print:nV { unit } \l__siunitx_unit_tl + \__siunitx_print:nn { number } { { \l__siunitx_output_decimal_tl } } + }% not a lateximage + \prop_get:NnNT \l__siunitx_number_out_prop { mantissa-decimal } + \l__siunitx_tmpa_tl + { \__siunitx_print:nV { number } \l__siunitx_tmpa_tl } +} \RenewDocumentCommand \num { o m } { \leavevmode \group_begin:% lwarp diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty index 67e9e0c8377..728d49952ca 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty @@ -29,7 +29,7 @@ \begin{lateximage}% \ifbool{LWR@tikzbabel}% Test for Tikz version v3.0.0 {}% -{\catcode`\$=3} % dollar sign is math shift +{\catcode`\$=3}% dollar sign is math shift } \AfterEndEnvironment{tikzpicture}{% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty new file mode 100644 index 00000000000..22f5657eba6 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty @@ -0,0 +1,50 @@ +%% +%% This is file `lwarp-xy.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `xy') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. + +\LWR@ProvidesPackagePass{xy} + +\AtBeginDocument{ + +\preto{\xy}{\begin{lateximage}[xy image]} +\appto{\endxy}{\end{lateximage}} + +\@ifundefined{xymatrix}{}{ +\LetLtxMacro\LWR@origxymatrix\xymatrix + +\renewcommand{\xymatrix}[1]{% +\begin{lateximage}[xymatrix] +\LWR@origxymatrix{#1} +\end{lateximage} +} +} + +\@ifundefined{xygraph}{}{ +\LetLtxMacro\LWR@origxygraph\xygraph + +\renewcommand{\xygraph}[1]{% +\begin{lateximage}[xygraph] +\LWR@origxygraph{#1} +\end{lateximage} +} +} + +} + +\endinput +%% +%% End of file `lwarp-xy.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty index 930690dcd95..753a687aab8 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty @@ -17,17 +17,48 @@ %% version 2005/12/01 or later. \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{lwarp} - [2018/02/19 v0.49 Allows LaTeX to directly produce HTML5 output.] + [2018/03/03 v0.50 Allows LaTeX to directly produce HTML5 output.] \RequirePackage{iftex} +\newif\ifxetexorluatex +\ifXeTeX + \xetexorluatextrue +\else + \ifLuaTeX + \xetexorluatextrue + \else + \xetexorluatexfalse + \fi +\fi \ifLuaTeX \RequirePackage{luatex85}% until the geometry package is updated \fi +\newcommand{\LWR@mdfive}[1]{% +\PackageError{lwarp} +{No MD5 macro was found.} +{Lwarp must find the macros pdfmdfivesum or mdfivesum.} +} + +\ifPDFTeX +\let\LWR@mdfive\pdfmdfivesum +\fi + +\ifLuaTeX +\RequirePackage{pdftexcmds} +\let\LWR@mdfive\pdf@mdfivesum +\fi + +\ifXeTeX +\@ifundefined{pdffivesum}{} + {\let\LWR@mdfive\pdfmdfivesum} +\@ifundefined{mdfivesum}{} + {\let\LWR@mdfive\mdfivesum} +\fi \ifPDFTeX \RequirePackage[T1]{fontenc} \RequirePackage[utf8]{inputenc} @@ -225,6 +256,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{arabicfront} \LWR@notmemoirloadafter{array} \LWR@loadafter{authblk} +\LWR@loadafter{axodraw2} \LWR@loadafter{backref} \LWR@loadafter{balance} \LWR@loadafter{bigdelim} @@ -235,6 +267,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{boxedminipage} \LWR@loadafter{boxedminipage2e} \LWR@loadafter{breakurl} +\LWR@loadafter{bytefield} \LWR@loadafter{cancel} \LWR@loadafter{caption} \LWR@notmemoirloadafter{ccaption} @@ -250,8 +283,10 @@ For a possible alternative, see package(s) #2.} \LWR@notmemoirloadafter{crop} \LWR@loadafter{cuted} \LWR@loadafter{cutwin} +\LWR@loadafter{dblfloatfix} \LWR@loadafter{dblfnote} \LWR@notmemoirloadafter{dcolumn} +\LWR@loadafter{diagbox} \LWR@loadafter{draftwatermark} \LWR@loadafter{easy-todo} \LWR@loadafter{ebook} @@ -263,6 +298,7 @@ For a possible alternative, see package(s) #2.} \LWR@notmemoirloadafter{enumerate} \LWR@loadafter{enumitem} \LWR@notmemoirloadafter{epigraph} +\LWR@loadafter{epstopdf} \LWR@loadafter{eso-pic} \LWR@loadafter{everypage} \LWR@loadafter{everyshi} @@ -332,6 +368,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{microtype} \LWR@loadafter{midfloat} \LWR@loadafter{midpage} +\LWR@loadafter{morefloats} \LWR@notmemoirloadafter{moreverb} \LWR@notmemoirloadafter{mparhack} \LWR@loadafter{multirow} @@ -341,6 +378,7 @@ For a possible alternative, see package(s) #2.} \LWR@notmemoirloadafter{needspace} \LWR@loadafter{newtxmath} \LWR@notmemoirloadafter{nextpage} +\LWR@loadafter{nonfloat} \LWR@loadafter{nonumonpart} \LWR@loadafter{nopageno} \LWR@loadafter{nowidow} @@ -351,10 +389,12 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{pagesel} \LWR@loadafter{paralist} \LWR@notmemoirloadafter{parskip} +\LWR@loadafter{pbox} \LWR@loadafter{pdfrender} \LWR@loadafter{pdflscape} \LWR@loadafter{pdfsync} \LWR@loadafter{pfnote} +\LWR@loadafter{phfqit} \LWR@loadafter{placeins} \LWR@loadafter{prelim2e} \LWR@loadafter{prettyref} @@ -369,6 +409,7 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{rotating} \LWR@loadafter{rotfloat} \LWR@loadafter{savetrees} +\LWR@loadafter{schemata} \LWR@loadafter{scrextend} \LWR@loadafter{scrhack} \LWR@loadafter{scrlayer} @@ -429,29 +470,15 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{xmpincl} \LWR@loadafter{xtab} \LWR@loadafter{xurl} +\LWR@loadafter{xy} \LWR@loadafter{zwpagelayout} - -\begin{warpall} - - -\RequirePackage{iftex} -\newif\ifxetexorluatex -\ifXeTeX - \xetexorluatextrue -\else - \ifLuaTeX - \xetexorluatextrue - \else - \xetexorluatexfalse - \fi -\fi - -\end{warpall} - \begin{warpHTML} \ifxetexorluatex +\@ifpackageloaded{fontspec}{}{ +\usepackage[no-math]{fontspec} +} \defaultfontfeatures[\rmfamily]{Ligatures={NoCommon,TeX}} \defaultfontfeatures[\sffamily]{Ligatures={NoCommon,TeX}} \defaultfontfeatures[\ttfamily]{Ligatures=NoCommon} @@ -546,9 +573,8 @@ top=1in,bottom=1in,% \RequirePackage{zref} -\PassOptionsToPackage{leqno}{amsmath} \RequirePackage{amsmath} -\def\maketag@@@#1{#1} +\def\maketag@@@#1{\text{#1}} \def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip)}} @@ -946,7 +972,9 @@ top=1in,bottom=1in,% } \LetLtxMacro\LWR@origunderline\underline - +\let\LWR@origraggedright\raggedright +\let\LWR@origraggedleft\raggedleft +\let\LWR@origcentering\centering \let\LWR@orignewpage\newpage \let\LWR@origpagestyle\pagestyle @@ -1203,6 +1231,25 @@ span.underline { text-decoration-skip ; } +span.overline { + text-decoration: overline ; + text-decoration-skip ; +} + +/* for diagbox */ +div.diagboxtitleN { border-bottom: 1px solid gray } +div.diagboxtitleS { border-top: 1px solid gray } + +div.diagboxE { + padding-left: 2em ; + text-align: right ; +} + +div.diagboxW { + padding-right: 2em ; + text-align: left ; +} + /* For realscripts */ .supsubscript { display: inline-block; @@ -1551,6 +1598,36 @@ border-top: 1px solid silver ; border-bottom: 1px solid silver ; } +div.displaymath { + text-align: center ; +} + +div.displaymathnumbered { + text-align: right ; + margin-left: 5% ; + margin-right: 5% ; + min-width: 2.5in ; +} + +@media all and (min-width: 400px) { + div.displaymathnumbered { + margin-left: 10% ; + margin-right: 10% ; + } +} + +@media all and (min-width: 800px) { + div.displaymathnumbered { + margin-right: 20% ; + } +} + +@media all and (min-width: 1200px) { + div.displaymathnumbered { + margin-right: 30% ; + } +} + .inlineprogramlisting { font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console", "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono", @@ -2518,6 +2595,8 @@ div.minipage { border-radius: 1ex ; } +table div.minipage { background: none ; border: none ; } + div.framebox div.minipage {border:none ; background:none} section.textbody > div.minipage { @@ -2852,6 +2931,18 @@ nav.botnavigation { \end{filecontents*} \end{warpprint} +\begin{warpprint} +\begin{filecontents*}{lwarp_one_limage.txt} +@echo off +pdfseparate -f %1 -l %1 %4_html.pdf lateximages\lateximagetemp-%%d.pdf" +pdfcrop lateximages\lateximagetemp-%1.pdf lateximages\%3.pdf +pdftocairo -svg lateximages\%3.pdf lateximages\%3.svg +del lateximages\%3.pdf +del lateximages\lateximagetemp-%1.pdf" +exit +\end{filecontents*} +\end{warpprint} + \begin{warpprint} \begin{filecontents*}{lwarp_mathjax.txt} @@ -2966,7 +3057,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX- -- Print the usage of the lwarpmk command: -printversion = "v0.49" +printversion = "v0.50" function printhelp () print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ; @@ -2989,7 +3080,7 @@ lwarpmk pdftohtml [project]: For use with latexmk or a Makefile: Convert project_html.pdf to project_html.html and individual HTML files. -lwarpmk clean [project]: Remove project.aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl* +lwarpmk clean [project]: Remove .aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl* lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html lwarpmk -h: Print this help message. lwarpmk --help: Print this help message. @@ -3029,10 +3120,12 @@ local sfile = io.open(sourcefile) io.output(destfile) for line in sfile:lines() do i,j,copen,cstart,newfilename = string.find (line,"(.*)|(.*)|(.*)|") ; -if ( (i~= nil) and (copen == "<!--") and (cstart == "Start file")) then -- split the file -io.output(newfilename) ; -else -- not a splitpoint -io.write (line .. "\n") ; +if ( (i~= nil) and (copen == "<!--") and (cstart == "Start file")) then + -- split the file + io.output(newfilename) ; +else + -- not a splitpoint + io.write (line .. "\n") ; end end -- do io.close(sfile) @@ -3041,8 +3134,10 @@ end -- function -- Incorrect value, so print an error and exit. function cvalueerror ( line, linenum , cvalue ) - print ( linenum .. " : " .. line ) ; + print ("lwarpmk: ===") + print ("lwarpmk: " .. linenum .. " : " .. line ) ; print ("lwarpmk: incorrect variable value \"" .. cvalue .. "\" in lwarpmk.conf.\n" ) ; + print ("lwarpmk: ===") printconf () ; os.exit(1) ; end @@ -3059,11 +3154,14 @@ language = "english" -- Default xdyfile: xdyfile = "lwarp.xdy" -- Verify the file exists: -if (lfs.attributes(conffile,"mode")==nil) then -- file not exists -print("lwarpmk: " .. conffile .." does not exist.") -print("lwarpmk: " .. arg[2] .. " does not appear to be a project name.\n") -printhelp () ; -os.exit(1) -- exit the entire lwarpmk script +if (lfs.attributes(conffile,"mode")==nil) then + -- file not exists + print ("lwarpmk: ===") + print ("lwarpmk: " .. conffile .." does not exist.") + print ("lwarpmk: " .. arg[2] .. " does not appear to be a project name.\n") + print ("lwarpmk: ===") + printhelp () ; + os.exit(1) -- exit the entire lwarpmk script else -- file exists -- Read the file: print ("lwarpmk: Reading " .. conffile ..".") @@ -3075,11 +3173,13 @@ linenum = linenum + 1 i,j,cvarname,cvalue = string.find (line,"([%w-_]*)%s*=%s*\"([%w%-_%.]*)\"") ; -- Error if incorrect enclosing characters: if ( i == nil ) then -print ( linenum .. " : " .. line ) ; -print ( "lwarpmk: Incorrect entry in " .. conffile ..".\n" ) ; -printconf () ; -os.exit(1) ; -end + print ("lwarpmk: ===") + print ("lwarpmk: " .. linenum .. " : " .. line ) ; + print ("lwarpmk: Incorrect entry in " .. conffile ..".\n" ) ; + print ("lwarpmk: ===") + printconf () ; + os.exit(1) ; +end -- nil if ( cvarname == "opsystem" ) then -- Verify choice of opsystem: if ( (cvalue == "Unix") or (cvalue == "Windows") ) then @@ -3105,39 +3205,65 @@ elseif ( cvarname == "latexmk" ) then latexmk = cvalue elseif ( cvarname == "language" ) then language = cvalue elseif ( cvarname == "xdyfile" ) then xdyfile = cvalue else -print ( linenum .. " : " .. line ) ; -print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ; -printconf () ; + print ("lwarpmk: ===") + print ("lwarpmk: " .. linenum .. " : " .. line ) ; + print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ; + print ("lwarpmk: ===") + printconf () ; os.exit(1) ; -end +end -- cvarname end -- do scan lines io.close(cfile) end -- file exists +-- Error if sourcename is "lwarp". +-- This could happen if a local copy of lwarp has recently been recompiled. +if sourcename=="lwarp" then + print ("lwarpmk: ===") + print ("lwarpmk: Lwarp has recently been recompiled in this directory,") + print ("lwarpmk: and \"lwarpmk.conf\" is no longer set for your own project.") + print ("lwarpmk: Recompile your own project using pdf/lua/xelatex <projectname>.") + print ("lwarpmk: After a recompile, \"lwarpmk.conf\" will be set for your project,") + print ("lwarpmk: and you may again use lwarpmk.") + print ("lwarpmk: ===") + os.exit(1) +end -- sourcename of "lwarp" -- Select some operating-system commands: if opsystem=="Unix" then -- For Unix / Linux / Mac OS: -rmname = "rm" -mvname = "mv" -touchnamepre = "touch" -touchnamepost = "" -dirslash = "/" -opquote= "\'" + rmname = "rm" + mvname = "mv" + cpname = "cp" + touchnamepre = "touch" + touchnamepost = "" + newtouchname = "touch" + dirslash = "/" + opquote= "\'" + cmdgroupopenname = " ( " + cmdgroupclosename = " ) " + seqname = " ; " + bgname = " &" elseif opsystem=="Windows" then -- For Windows -rmname = "DEL" -mvname = "MOVE" -touchnamepre = "COPY /b" -touchnamepost = "+,," -dirslash = "\\" -opquote= "\"" + rmname = "DEL" + mvname = "MOVE" + cpname = "COPY" + touchnamepre = "COPY /b" + touchnamepost = "+,," + newtouchname = "echo empty >" + dirslash = "\\" + opquote= "\"" + cmdgroupopenname = "" + cmdgroupclosename = "" + seqname = " & " + bgname = "" else print ( "lwarpmk: Select Unix or Windows for opsystem" ) end --- for Windows -- set xindycmd according to pdflatex vs xelatex/lualatex: if ( latexname == "pdflatex" ) then -xindycmd = "texindy -C utf8" -glossarycmd = "xindy -C utf8" + xindycmd = "texindy -C utf8" + glossarycmd = "xindy -C utf8" else -xindycmd = "xindy -M texindy -C utf8" -glossarycmd = "xindy -C utf8" + xindycmd = "xindy -M texindy -C utf8" + glossarycmd = "xindy -C utf8" end end -- loadconf @@ -3156,8 +3282,8 @@ for line in fsource:lines() do if ( string.find(line,"Rerun to get") ~= nil ) then io.close(fsource) return true -end -end +end -- if +end -- do io.close(fsource) return false end @@ -3167,10 +3293,13 @@ end function onetime (fsuffix) print("lwarpmk: Compiling with " .. latexname .. " " .. sourcename..fsuffix) -err = os.execute( --- "echo " .. - latexname .. " " .. sourcename..fsuffix ) -if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end +err = os.execute(latexname .. " " .. sourcename..fsuffix) +if ( err ~= 0 ) then + print ("lwarpmk: ===") + print ("lwarpmk: Compile error.") + print ("lwarpmk: ===") + os.exit(1) +end return (reruntoget(sourcename .. fsuffix .. ".log") ) ; end @@ -3190,93 +3319,164 @@ end function verifyfileexists (filename) if (lfs.attributes ( filename , "modification" ) == nil ) then -print ( "lwarpmk: " .. filename .. " not found." ) ; -os.exit (1) ; + print ("lwarpmk: ===") + print ("lwarpmk: " .. filename .. " not found." ) ; + print ("lwarpmk: ===") + os.exit (1) ; end end -- Convert <project>_html.pdf into HTML files: function pdftohtml () - -- Convert to text: - print ("lwarpmk: Converting " .. sourcename - .."_html.pdf to " .. sourcename .. "_html.html") - os.execute("pdftotext -enc UTF-8 -nopgbrk -layout " - .. sourcename .. "_html.pdf " .. sourcename .. "_html.html") - -- Split the result into individual HTML files: - splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html") +-- Convert to text: +print ("lwarpmk: Converting " .. sourcename + .."_html.pdf to " .. sourcename .. "_html.html") +os.execute("pdftotext -enc UTF-8 -nopgbrk -layout " + .. sourcename .. "_html.pdf " .. sourcename .. "_html.html") +-- Split the result into individual HTML files: +splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html") end -- Remove auxiliary files: function removeaux () - os.execute ( rmname .. " " .. - sourcename ..".aux " .. sourcename .. "_html.aux " .. - sourcename ..".toc " .. sourcename .. "_html.toc " .. - sourcename ..".lof " .. sourcename .. "_html.lof " .. - sourcename ..".lot " .. sourcename .. "_html.lot " .. - sourcename ..".idx " .. sourcename .. "_html.idx " .. - sourcename ..".ind " .. sourcename .. "_html.ind " .. - sourcename ..".log " .. sourcename .. "_html.log " .. - sourcename ..".gl* " .. sourcename .. "_html.gl* " .. - "*_html_inc.*" - ) +os.execute ( rmname .. " " .. + sourcename ..".aux " .. sourcename .. "_html.aux " .. + sourcename ..".toc " .. sourcename .. "_html.toc " .. + sourcename ..".lof " .. sourcename .. "_html.lof " .. + sourcename ..".lot " .. sourcename .. "_html.lot " .. + sourcename ..".idx " .. sourcename .. "_html.idx " .. + sourcename ..".ind " .. sourcename .. "_html.ind " .. + sourcename ..".log " .. sourcename .. "_html.log " .. + sourcename ..".gl* " .. sourcename .. "_html.gl* " .. + "*_html_inc.*" + ) end -- Create lateximages based on lateximages.txt: function createlateximages () print ("lwarpmk: Creating lateximages.") -local limagesfile = io.open("lateximages.txt") +local limagesfile = io.open("lateximages.txt", "r") +if ( limagesfile == nil ) then + print ("lwarpmk: ===") + print ("lwarpmk: \"lateximages.txt\" does not exist.") + print ("lwarpmk: Your project does not use SVG math or other lateximages,") + print ("lwarpmk: or the file has been deleted somehow.") + print ("lwarpmk: Use \"lwarpmk html\" to recompile your project,") + print ("lwarpmk: and recreate \"lateximages.txt\".") + print ("lwarpmk: If your project does not use SVG math or other lateximages,") + print ("lwarpmk: then \"lateximages.txt\" will never exist, and") + print ("lwarpmk: \"lwarpmk limages\" will not be necessary.") + print ("lwarpmk: ===") + os.exit(1) +end -- Create the lateximages directory, ignore error if already exists err = os.execute("mkdir lateximages") +-- For Windows, create lwarp_one_limage.cmd: +if opsystem=="Windows" then + err = os.execute ( + cpname .. " lwarp_one_limage.txt lwarp_one_limage.cmd" + ) + if ( err ~= 0 ) then + print ("lwarpmk: ===") + print ("lwarpmk: File error trying to copy to lwarp_one_limage.cmd") + print ("lwarpmk: ===") + os.exit(1) ; + end +end -- create lwarp_one_limage.cmd -- Scan lateximages.txt for line in limagesfile:lines() do -- lwimgpage is the page number in the PDF which has the image --- lwimgnum is the sequential lateximage number to assign for the image -i,j,lwimgpage,lwimgnum = string.find (line,"|(.*)|(.*)|") +-- lwimghash is true if this filename is a hash +-- lwimgname is the lateximage filename root to assign for the image +i,j,lwimgpage,lwimghash,lwimgname = string.find (line,"|(.*)|(.*)|(.*)|") -- For each entry: if ( (i~=nil) ) then +-- Skip is this image is hashed and already exists: +local lwimgfullname = "lateximages" .. dirslash .. lwimgname .. ".svg" +if ( + (lwimghash ~= "true") or + (lfs.attributes(lwimgfullname,"mode")==nil) -- file not exists +) +then -- not hashed or not exists: +-- Print the name of the file being generated: +print ( "lwarpmk: " .. lwimgname ) +-- Touch/create the dest so that only once instance tries to build it: +err = os.execute(newtouchname .. " " .. lwimgfullname) +if ( err ~= 0 ) then + print ("lwarpmk: ===") + print ("lwarpmk: File error trying to touch " .. lwimgfullname) + print ("lwarpmk: ===") + os.exit(1) ; +end -- Separate out the image into its own single-page pdf: +if opsystem=="Unix" then +-- For Unix / Linux / Mac OS: err = os.execute( -"pdfseparate -f " .. lwimgpage .. " -l " .. - lwimgpage .. " " .. sourcename .."_html.pdf lateximagetemp-%d.pdf") +-- print ( +cmdgroupopenname .. +"pdfseparate -f " .. lwimgpage .. " -l " .. lwimgpage .. " " .. + sourcename .."_html.pdf " .. + "lateximages" .. dirslash .."lateximagetemp-%d" .. ".pdf" .. + seqname .. -- Crop the image: -err = os.execute( -"pdfcrop lateximagetemp-" .. lwimgpage ..".pdf lateximage-" .. lwimgnum ..".pdf") -if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end +"pdfcrop lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf " .. + "lateximages" .. dirslash .. lwimgname .. ".pdf" .. + seqname .. -- Convert the image to svg: -err = os.execute( -"pdftocairo -svg lateximage-" .. lwimgnum ..".pdf lateximage-" .. lwimgnum ..".svg") -if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end --- Move the result into lateximages/: -err = os.execute( -mvname .. " lateximage-" .. lwimgnum ..".svg lateximages" .. dirslash ) -if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end +"pdftocairo -svg lateximages" .. dirslash .. lwimgname .. ".pdf " .. + "lateximages" .. dirslash .. lwimgname ..".svg" .. + seqname .. -- Remove the temporary files: -err = os.execute( -rmname .. " lateximage-" .. lwimgnum ..".pdf lateximagetemp-" .. lwimgpage ..".pdf") -if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end +rmname .. " lateximages" .. dirslash .. lwimgname .. ".pdf" .. seqname .. +rmname .. " lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf" .. +cmdgroupclosename .. " >/dev/null " .. bgname +) +elseif opsystem=="Windows" then +-- For Windows +err = os.execute ( + "start /b \"\" lwarp_one_limage " .. + lwimgpage .. " " .. + lwimghash .. " " .. + lwimgname .. " " .. + sourcename .. " <nul >nul" +) +end -- Windows +if ( err ~= 0 ) then + print ("lwarpmk: ===") + print ("lwarpmk: File error trying to create one lateximage.") + print ("lwarpmk: ===") + os.exit(1) end +end -- not hashed or not exists +end -- not nil end -- do io.close(limagesfile) +print ( "lwarpmk limages: done" ) end -- function -- Use latexmk to compile source and index: -- fsuffix is "" for print, or "_html" for HTML function compilelatexmk ( fsuffix ) - -- The recorder option is required to detect changes in <project>.tex - -- while we are loading <project>_html.tex. - err=os.execute ( "latexmk -pdf -dvi- -ps- -recorder " - .. "-e " - .. opquote - .. "$makeindex = q/" -- $ - .. xindycmd - .. " -M " .. xdyfile - .. " -L " .. language .. " /" - .. opquote - .. " -pdflatex=\"" .. latexname .." %O %S\" " - .. sourcename..fsuffix ..".tex" ) ; - if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end +-- The recorder option is required to detect changes in <project>.tex +-- while we are loading <project>_html.tex. +err=os.execute ( "latexmk -pdf -dvi- -ps- -recorder " + .. "-e " + .. opquote + .. "$makeindex = q/" -- $ + .. xindycmd + .. " -M " .. xdyfile + .. " -L " .. language .. " /" + .. opquote + .. " -pdflatex=\"" .. latexname .." %O %S\" " + .. sourcename..fsuffix ..".tex" ) ; +if ( err ~= 0 ) then + print ("lwarpmk: ===") + print ("lwarpmk: Compile error.") + print ("lwarpmk: ===") + os.exit(1) +end end -- lwarpmk --version : @@ -3701,7 +3901,10 @@ 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}% } @@ -3880,6 +4083,7 @@ end -- not --version #1% \protect\LWR@origtextgreater% \endgroup% +\LWR@traceinfo{LWR@htmltagc: done}% }% } @@ -4039,7 +4243,10 @@ end -- not --version \begin{warpHTML} \NewDocumentEnvironment{BlockClass}{o m}% -{\LWR@htmldivclass[#1]{#2}} +{% + \LWR@origpar% + \LWR@htmldivclass[#1]{#2}% +} {\LWR@htmldivclassend{#2}} \end{warpHTML} \begin{warpprint} @@ -4047,6 +4254,7 @@ end -- not --version \end{warpprint} \begin{warpHTML} \newcommand{\BlockClassSingle}[2]{% +\LWR@origpar% \LWR@htmlelementclassline{div}{#1}{#2}% } \end{warpHTML} @@ -4339,7 +4547,7 @@ end -- not --version \csname p@footnote\endcsname\@thefnmark% }% @currentlabel \color@begingroup% - \renewcommand{\textsuperscript}[1]{\LWR@htmlspan{sup}{##1}}% + \renewrobustcmd{\textsuperscript}[1]{\LWR@htmlspan{sup}{##1}}% \ifthenelse{% \boolean{LWR@doingstartpars} \AND% \cnttest{\value{LWR@lateximagedepth}}{=}{0}% @@ -4480,10 +4688,8 @@ end -- not --version \newcommand*{\LWR@filenamenoblanks}[1]{% \begingroup - \LWR@nullfonts% \renewcommand*{\LWR@htmltagc}[1]{}% -\LWR@traceinfo{LWR@filenamenoblanks \#1: !#1!}% \edef\LWR@thisnewfilename{#1}% \LWR@traceinfo{LWR@filenamenoblanks edef: !\LWR@thisnewfilename!}% \fullexpandarg% @@ -4561,7 +4767,7 @@ end -- not --version } \newcommand*{\LWR@newhtmlfile}[1]{ -\LWR@traceinfo{LWR@newhtmlfile: !#1!} +\LWR@traceinfo{LWR@newhtmlfile} \LWR@htmlelementclassend{section}{textbody} @@ -4593,10 +4799,13 @@ end -- not --version {\renewcommand*{\LWR@thisfilename}{\arabic{LWR@htmlfilenumber}}} \LWR@traceinfo{LWR@newhtmlfile: about to print start file}% +\begingroup% +\LWR@nullfonts% \LWR@htmlblockcomment{% |Start file|% \LWR@htmlsectionfilename{\LWR@thisfilename}|% } +\endgroup% \LWR@stoppars @@ -4944,11 +5153,8 @@ end -- not --version \newcommand*{\LWR@filestart}[1]{ \LWR@traceinfo{LWR@filestart} \begingroup -\LWR@traceinfo{LWR@filestart: A} \LWR@nullfonts -\LWR@traceinfo{LWR@filestart: B} \LWR@htmltag{!DOCTYPE html}\LWR@orignewline -\LWR@traceinfo{LWR@filestart: C} \LWR@htmltag{html lang="\LWR@currentHTMLLanguage"}\LWR@orignewline \LWR@htmltag{head}\LWR@orignewline \LWR@htmltag{meta charset="UTF-8" /}\LWR@orignewline @@ -5392,6 +5598,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% }\LWR@orignewline% pre }{}% \begingroup% +\LWR@orignormalsize% \LWR@origttfamily% \LWR@restoreoriglists% \LWR@FBcancel% @@ -7735,6 +7942,9 @@ autopage-\theLWR@currentautosec% \let\llap\LWR@origllap% \let\rlap\LWR@origrlap% \let\hfilneg\LWR@orighfilneg% +\let\raggedright\LWR@origraggedright +\let\raggedleft\LWR@origraggedleft +\let\centering\LWR@origcentering \let\,\LWR@origcomma% disable HTML short unbreakable space \let\textellipsis\LWR@origtextellipsis% \let\textless\LWR@origtextless% @@ -7847,10 +8057,16 @@ autopage-\theLWR@currentautosec% }% mathjax {% not mathjax + \begin{BlockClass}{displaymath} \begin{lateximage}% - [\textbackslash{[} \LWR@HTMLsanitize{#1} \textbackslash{]}]% + [% + \textbackslash{[} % extra space + \LWR@HTMLsanitize{#1} % extra space + \textbackslash{]}% + ]% \LWR@origdollar\LWR@origdollar#1\LWR@origdollar\LWR@origdollar% \end{lateximage}% + \end{BlockClass} }% not mathjax }% @@ -7858,28 +8074,47 @@ autopage-\theLWR@currentautosec% \newlength{\LWR@singledollarheight} \newlength{\LWR@singledollardepth} -\protected\gdef\LWR@subsingledollar#1{% +\protected\gdef\LWR@subsingledollar#1#2{% \begingroup% -\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }% +\ifboolexpr{% + ( + bool{mathjax} or + ( bool{FormatWP} and bool{WPMarkMath} ) + ) and + ( not test { \ifstrequal {#1} {math image} } ) +}% {% - {\textbackslash(\LWR@HTMLsanitize{#1}\textbackslash)}% + {\textbackslash(\LWR@HTMLsanitize{#2}\textbackslash)}% }% mathjax {% not mathjax \LWR@restoreorigformatting% \LWR@orignormalsize% \global\setlength{\LWR@singledollardepth}{\depthof{% - \LWR@origdollar#1\LWR@origdollar% + \LWR@origdollar#2\LWR@origdollar% }*\real{.8}}% \global\setlength{\LWR@singledollarwidth}{\widthof{% - \LWR@origdollar#1\LWR@origdollar% + \LWR@origdollar#2\LWR@origdollar% }*\real{.8}}% \global\setlength{\LWR@singledollarheight}{\totalheightof{% - \LWR@origdollar#1\LWR@origdollar% + \LWR@origdollar#2\LWR@origdollar% }*\real{.8}}% \LWR@origscriptsize% + \ifdimgreater{\LWR@singledollarwidth}{\LWR@singledollarheight}{% + \def\LWR@singledollarstyle{% + width:\LWR@convertto{em}{\the\LWR@singledollarwidth} em% + }% + }{% \def\LWR@singledollarstyle{% height:\LWR@convertto{em}{\the\LWR@singledollarheight }em% }% + }% + \ifdimless{\LWR@singledollarwidth}{.8em}% + {% + \def\LWR@singledollarstyle{% + height:\LWR@convertto{em}{\the\LWR@singledollarheight }em% + }% + }% + {}% \ifdimless{\LWR@singledollarheight}{.3em}% {% \def\LWR@singledollarstyle{% @@ -7889,22 +8124,35 @@ autopage-\theLWR@currentautosec% {}% \ifdimgreater{\LWR@singledollardepth}{0.01em}{% \def\LWR@singledollardepthstyle{% - \ ; \LWR@origmbox{vertical-align:-\LWR@convertto{em}{\the\LWR@singledollardepth} em} % + \ ; % extra space + \LWR@origmbox{% + vertical-align:-\LWR@convertto{em}{\the\LWR@singledollardepth} em% + } % extra space }% }{% \def\LWR@singledollardepthstyle{}% }% - \begin{lateximage}% - [\textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)]% - [\LWR@singledollarstyle \LWR@singledollardepthstyle]% - \LWR@origdollar#1\LWR@origdollar% + \ifblank{#1}{% + \begin{lateximage}*% + [% + \textbackslash( % + \LWR@HTMLsanitize{#2} % extra space + \textbackslash)% + ]% + [\LWR@singledollarstyle \LWR@singledollardepthstyle]% + }{% + \begin{lateximage}% + [#1]% + [\LWR@singledollarstyle \LWR@singledollardepthstyle]% + }% + \LWR@origdollar#2\LWR@origdollar% \end{lateximage}% }% \endgroup% } \protected\gdef\LWR@singledollar#1${% -\LWR@subsingledollar{#1}% +\LWR@subsingledollar{}{#1}% } \protected\gdef\(#1\){$#1$} @@ -7915,11 +8163,15 @@ autopage-\theLWR@currentautosec% \LetLtxMacro\LWR@origensuredmath\@ensuredmath \renewcommand{\@ensuredmath}[1]{% +\ifbool{mathjax}{% + \LWR@subsingledollar{math image}{\relax#1}% +}{% SVG math \ifmmode% \LWR@origensuredmath{#1}% \else% - \LWR@subsingledollar{\relax#1}% + \LWR@subsingledollar{math image}{\relax#1}% \fi% +}% } \let\math\relax @@ -7987,13 +8239,17 @@ autopage-\theLWR@currentautosec% \LWR@hidelatexequation{equation}{\BODY} } {% not mathjax - \begin{lateximage}[(\LWR@equationtag) \textbackslash{begin\{equation\}} % - \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\BODY}} % - \textbackslash{end\{equation\}}]% alt tag + \begin{BlockClass}{displaymathnumbered} + \begin{lateximage}[% + (\LWR@equationtag) \textbackslash{begin\{equation\}} % extra space + \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\BODY}} % extra space + \textbackslash{end\{equation\}}% + ]% alt tag \LWR@origequation \BODY% contents collected by NewEnviron \LWR@origendequation \end{lateximage}% + \end{BlockClass} }% not mathjax }[% @@ -8072,20 +8328,24 @@ autopage-\theLWR@currentautosec% {% not mathjax \ifbool{LWR@numbereqnarray} { + \begin{BlockClass}{displaymathnumbered} \begin{lateximage}[(\LWR@startingequationtag--\LWR@equationtag) \LWR@addmathjax{eqnarray}{\BODY}] \LWR@origeqnarray \BODY \LWR@origendeqnarray \end{lateximage} + \end{BlockClass} }% {% not LWR@numbereqnarray + \begin{BlockClass}{displaymath} \begin{lateximage}[\LWR@addmathjax{eqnarray*}{\BODY}] \LWR@origeqnarray \BODY \nonumber \LWR@origendeqnarray \end{lateximage} + \end{BlockClass} }% LWR@numbereqnarray }% not mathjax \booltrue{LWR@numbereqnarray} @@ -8106,6 +8366,7 @@ autopage-\theLWR@currentautosec% \LWR@beginhideamsmath } { + \begin{BlockClass}{displaymathnumbered} \begin{lateximage}[\LWR@amsmathbodynumbered{multline}] } } @@ -8118,7 +8379,7 @@ autopage-\theLWR@currentautosec% \boolfalse{LWR@amsmultline} \LWR@addmathjax{multline}{\the\@envbody} } -{\end{lateximage}} +{\end{lateximage}\end{BlockClass}} } @@ -8131,6 +8392,7 @@ autopage-\theLWR@currentautosec% \LWR@beginhideamsmath } { + \begin{BlockClass}{displaymath} \begin{lateximage}[\LWR@amsmathbody{multline*}] } } @@ -8143,7 +8405,7 @@ autopage-\theLWR@currentautosec% \boolfalse{LWR@amsmultline} \LWR@addmathjax{multline*}{\the\@envbody} } -{\end{lateximage}} +{\end{lateximage}\end{BlockClass}} } @@ -8157,6 +8419,7 @@ autopage-\theLWR@currentautosec% \LWR@beginhideamsmath } { + \begin{BlockClass}{displaymathnumbered} \begin{lateximage}[\LWR@amsmathbodynumbered{gather}] } } @@ -8168,7 +8431,7 @@ autopage-\theLWR@currentautosec% \LWR@endhideamsmath \LWR@addmathjax{gather}{\the\@envbody} } -{\end{lateximage}} +{\end{lateximage}\end{BlockClass}} } @@ -8181,6 +8444,7 @@ autopage-\theLWR@currentautosec% \LWR@beginhideamsmath } { + \begin{BlockClass}{displaymath} \begin{lateximage}[\LWR@amsmathbody{gather*}] } } @@ -8192,7 +8456,7 @@ autopage-\theLWR@currentautosec% \LWR@endhideamsmath \LWR@addmathjax{gather*}{\the\@envbody} } -{\end{lateximage}} +{\end{lateximage}\end{BlockClass}} } @@ -8205,6 +8469,7 @@ autopage-\theLWR@currentautosec% \LWR@beginhideamsmath } { + \begin{BlockClass}{displaymathnumbered} \begin{lateximage}[\LWR@amsmathbodynumbered{align}] } } @@ -8216,7 +8481,7 @@ autopage-\theLWR@currentautosec% \LWR@endhideamsmath \LWR@addmathjax{align}{\the\@envbody} } -{\end{lateximage}} +{\end{lateximage}\end{BlockClass}} } @@ -8229,6 +8494,7 @@ autopage-\theLWR@currentautosec% \LWR@beginhideamsmath } { + \begin{BlockClass}{displaymath} \begin{lateximage}[\LWR@amsmathbody{align*}] } } @@ -8240,7 +8506,7 @@ autopage-\theLWR@currentautosec% \LWR@endhideamsmath \LWR@addmathjax{align*}{\the\@envbody} } -{\end{lateximage}} +{\end{lateximage}\end{BlockClass}} } @@ -8253,6 +8519,7 @@ autopage-\theLWR@currentautosec% \LWR@beginhideamsmath } { + \begin{BlockClass}{displaymathnumbered} \begin{lateximage}[\LWR@amsmathbodynumbered{flalign}] } } @@ -8264,7 +8531,7 @@ autopage-\theLWR@currentautosec% \LWR@endhideamsmath \LWR@addmathjax{flalign}{\the\@envbody} } -{\end{lateximage}} +{\end{lateximage}\end{BlockClass}} } @@ -8277,6 +8544,7 @@ autopage-\theLWR@currentautosec% \LWR@beginhideamsmath } { + \begin{BlockClass}{displaymath} \begin{lateximage}[\LWR@amsmathbody{flalign*}] } } @@ -8288,7 +8556,7 @@ autopage-\theLWR@currentautosec% \LWR@endhideamsmath \LWR@addmathjax{flalign*}{\the\@envbody} } -{\end{lateximage}} +{\end{lateximage}\end{BlockClass}} } @@ -8411,7 +8679,7 @@ autopage-\theLWR@currentautosec% \newcommand*{\LWR@amsmathbody}[1] {% -\textbackslash\{begin\}\{#1\} % +\textbackslash\{begin\}\{#1\} % extra space \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\the\@envbody}}% \textbackslash\{end\}\{#1\}% } @@ -8420,14 +8688,14 @@ autopage-\theLWR@currentautosec% {% \ifnumcomp{\value{LWR@startingequation}}{=}{\value{equation}}% {(\LWR@equationtag)}% -{(\LWR@startingequationtag--\LWR@equationtag)} % -\LWR@amsmathbody{#1} % +{(\LWR@startingequationtag--\LWR@equationtag)} % extra space +\LWR@amsmathbody{#1} % extra space } \catcode`\$=\active% -\NewDocumentEnvironment{lateximage}{O{image}O{}} +\NewDocumentEnvironment{lateximage}{s O{image} O{}} {% \LWR@traceinfo{lateximage: starting on \jobname.pdf page \arabic{page}}% \ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}% @@ -8451,9 +8719,21 @@ autopage-\theLWR@currentautosec% \LWR@htmltag{span id="lateximage\arabic{LWR@lateximagenumber}" % class="lateximagesource"}% \LWR@traceinfo{lateximage: about to write to lateximages.txt}% - \immediate\write\LWR@lateximagesfile{% - |\arabic{LWR@LIpage}|\arabic{LWR@externalfilecnt}|% - }% + \IfBooleanTF{#1}% starred + {% hash + \LWR@traceinfo{lateximage: hash true}% + \edef\LWR@hashedname{\LWR@mdfive{\detokenize\expandafter{#2}}}% + \LWR@traceinfo{lateximage: hash is \LWR@hashedname}% + \immediate\write\LWR@lateximagesfile{% + |\arabic{LWR@LIpage}|true|\LWR@hashedname|% + }% + }% hash + {% no hash + \LWR@traceinfo{lateximage: hash false}% + \immediate\write\LWR@lateximagesfile{% + |\arabic{LWR@LIpage}|false|lateximage-\arabic{LWR@externalfilecnt}|% + }% + }% no hash \LWR@traceinfo{lateximage: about to create open comment}% \LWR@htmlopencomment% \addtocounter{LWR@lateximagedepth}{1}% @@ -8490,8 +8770,21 @@ autopage-\theLWR@currentautosec% \LWR@origvspace*{.5\baselineskip}% \LWR@htmlclosecomment% \LWR@traceinfo{lateximage: The page after the image is \arabic{page}}% - \LWR@subinlineimage[#1]{lateximage}% - {lateximages\OSPathSymbol{}\LWR@origmbox{lateximage-\theLWR@externalfilecnt}}{svg}{#2}% + \IfBooleanTF{#1}% starred + {% hash + \LWR@subinlineimage[#2]{lateximage}% + {% + lateximages\OSPathSymbol% + \LWR@origmbox{\LWR@hashedname}% + }{svg}{#3}% + }% hash + {% no hash + \LWR@subinlineimage[#2]{lateximage}% + {% + lateximages\OSPathSymbol% + \LWR@origmbox{lateximage-\theLWR@externalfilecnt}% + }{svg}{#3}% + }% no hash \LWR@ensuredoingapar% \LWR@htmltag{/span}% \ifbool{HTMLDebugComments}{% @@ -8506,7 +8799,7 @@ autopage-\theLWR@currentautosec% \begin{warpprint} -\NewDocumentEnvironment{lateximage}{o o} +\NewDocumentEnvironment{lateximage}{s o o} {\begin{varwidth}[b]{\linewidth}} {\end{varwidth}} @@ -8570,12 +8863,29 @@ autopage-\theLWR@currentautosec% \begin{warpHTML} +\newrobustcmd{\LWR@siunitx@textcelsius}{\HTMLentity{deg}C} +\newrobustcmd{\LWR@siunitx@textdegree}{\HTMLentity{deg}} +\newrobustcmd{\LWR@siunitx@textprime}{\HTMLunicode{2032}} +\newrobustcmd{\LWR@siunitx@textdblprime}{\HTMLunicode{2033}} +\newrobustcmd{\LWR@siunitx@textplanckbar}{\text{\HTMLunicode{0127}}} + +\appto\LWR@restoreorigformatting{ +\renewrobustcmd{\LWR@siunitx@textcelsius}{\text{\ensuremath{^\circ}C}} +\renewrobustcmd{\LWR@siunitx@textdegree}{\text{\ensuremath{^\circ}}} +\renewrobustcmd{\LWR@siunitx@textprime}{\text{\ensuremath{^\prime}}} +\renewrobustcmd{\LWR@siunitx@textdblprime}{\text{\ensuremath{^{\prime\prime}}}} +\renewrobustcmd{\LWR@siunitx@textplanckbar}{\text{\ensuremath{\hbar}}} +} + \PassOptionsToPackage{ detect-mode=true, per-mode=symbol, % fraction is not seen by pdftotext + text-celsius = {\LWR@siunitx@textcelsius}, + text-degree = {\LWR@siunitx@textdegree}, + text-arcminute = {\LWR@siunitx@textprime} , + text-arcsecond = {\LWR@siunitx@textdblprime} , }{siunitx} - \end{warpHTML} \begin{warpprint} @@ -9157,18 +9467,20 @@ width:\LWR@printlength{\LWR@tempwidth}% \LetLtxMacro{\normalfont}{\LWR@nullnormalfont}% \renewcommand*{\,}{-}% \renewcommand*{~}{-}% +\renewcommand*{\newline}{ }% \renewcommand*{\textellipsis}{-}% \renewcommand*{\HTMLunicode}[1]{-}% \renewcommand*{\HTMLentity}[1]{-}% \renewcommand*{\&}{and}% \renewcommand{\textsuperscript}[1]{##1}% \renewcommand{\textsubscript}[1]{##1}% -\LetLtxMacro\underline\LWR@origunderline% +\renewcommand{\underline}[1]{##1}% \RenewDocumentCommand{\LWR@htmlspanclass}{o m +m}{##3}% \DeclareExpandableDocumentCommand{\InlineClass}{+o +m +m}{##3}% \DeclareRobustCommand{\LWR@HTMLtextstyle}[3]{##3}% -\DeclareRobustCommand{\LWR@subsingledollar}[1]{}% -\renewcommand*{\newline}{ }% +\def\(##1\){}% +\def\[##1\]{}% +\renewcommand{\LWR@subsingledollar}[2]{} } @@ -9186,23 +9498,23 @@ width:\LWR@printlength{\LWR@tempwidth}% }% } -\renewcommand*{\mdseries}{\renewcommand*{\LWR@f@series}{md}} +\renewrobustcmd*{\mdseries}{\renewcommand*{\LWR@f@series}{md}} -\renewcommand*{\bfseries}{\renewcommand*{\LWR@f@series}{bf}} +\renewrobustcmd*{\bfseries}{\renewcommand*{\LWR@f@series}{bf}} -\renewcommand*{\rmfamily}{\renewcommand*{\LWR@f@family}{rm}} +\renewrobustcmd*{\rmfamily}{\renewcommand*{\LWR@f@family}{rm}} -\renewcommand*{\sffamily}{\renewcommand*{\LWR@f@family}{sf}} +\renewrobustcmd*{\sffamily}{\renewcommand*{\LWR@f@family}{sf}} -\renewcommand*{\ttfamily}{\renewcommand*{\LWR@f@family}{tt}} +\renewrobustcmd*{\ttfamily}{\renewcommand*{\LWR@f@family}{tt}} -\renewcommand*{\upshape}{\renewcommand*{\LWR@f@shape}{up}} +\renewrobustcmd*{\upshape}{\renewcommand*{\LWR@f@shape}{up}} -\renewcommand*{\itshape}{\renewcommand*{\LWR@f@shape}{it}} +\renewrobustcmd*{\itshape}{\renewcommand*{\LWR@f@shape}{it}} -\renewcommand*{\scshape}{\renewcommand*{\LWR@f@shape}{sc}} +\renewrobustcmd*{\scshape}{\renewcommand*{\LWR@f@shape}{sc}} -\renewcommand*{\normalfont}{\rmfamily\mdseries\upshape} +\renewrobustcmd*{\normalfont}{\rmfamily\mdseries\upshape} \renewcommand{\sp}[1]{\text{<sup>#1</sup>}{}} @@ -9210,12 +9522,12 @@ width:\LWR@printlength{\LWR@tempwidth}% \renewcommand{\sb}[1]{\text{<sub>#1</sub>}{}} -\renewcommand{\textsuperscript}[1]{\LWR@htmlspan{sup}{#1}} +\renewrobustcmd{\textsuperscript}[1]{\LWR@htmlspan{sup}{#1}} \renewcommand{\@textsuperscript}[1]{\LWR@htmlspan{sup}{#1}} \AtBeginDocument{ -\renewcommand{\textsubscript}[1]{\LWR@htmlspan{sub}{#1}} +\renewrobustcmd{\textsubscript}[1]{\LWR@htmlspan{sub}{#1}} } \AtBeginDocument{ @@ -9232,6 +9544,12 @@ width:\LWR@printlength{\LWR@tempwidth}% {underline}{#1}% } +\newcommand{\LWR@overline}[1]{% +\LWR@HTMLtextstyle% + {text-decoration:overline;text-decoration-skip}% + {overline}{#1}% +} + \end{warpHTML} @@ -9243,16 +9561,16 @@ width:\LWR@printlength{\LWR@tempwidth}% \renewrobustcmd*{~}{\HTMLentity{nbsp}} \renewrobustcmd*{\textellipsis}{\HTMLunicode{2026}} -\renewcommand*{\normalsize}{} -\renewcommand*{\small}{} -\renewcommand*{\footnotesize}{} -\renewcommand*{\scriptsize}{} -\renewcommand*{\tiny}{} -\renewcommand*{\large}{} -\renewcommand*{\Large}{} -\renewcommand*{\LARGE}{} -\renewcommand*{\huge}{} -\renewcommand*{\Huge}{} +\renewrobustcmd*{\normalsize}{} +\renewrobustcmd*{\small}{} +\renewrobustcmd*{\footnotesize}{} +\renewrobustcmd*{\scriptsize}{} +\renewrobustcmd*{\tiny}{} +\renewrobustcmd*{\large}{} +\renewrobustcmd*{\Large}{} +\renewrobustcmd*{\LARGE}{} +\renewrobustcmd*{\huge}{} +\renewrobustcmd*{\Huge}{} \DeclareDocumentCommand{\onecolumn}{}{} \DeclareDocumentCommand{\twocolumn}{O{}}{ @@ -9271,8 +9589,8 @@ width:\LWR@printlength{\LWR@tempwidth}% } -\newcommand*{\LWR@newlinebr}{\unskip\LWR@htmltag{br /}\LWR@orignewline}% -\let\newline\LWR@newlinebr +\newrobustcmd*{\LWR@newlinebr}{\unskip\LWR@htmltag{br /}\LWR@orignewline}% +\LetLtxMacro\newline\LWR@newlinebr \LetLtxMacro\LWR@origendofline\\ \NewDocumentCommand{\LWR@endofline}{s o} @@ -9319,7 +9637,7 @@ width:\LWR@printlength{\LWR@tempwidth}% }% {% \LWR@htmltagc{% - span style="width:\LWR@printlength{\LWR@tempwidth}; % + span style="width:\LWR@printlength{\LWR@tempwidth}; % extra space display:inline-block"% }% \ifbool{FormatWP}{% @@ -9339,7 +9657,7 @@ width:\LWR@printlength{\LWR@tempwidth}% \LetLtxMacro{\hspace}{\LWR@hspace} \NewDocumentCommand{\LWR@vspace}{s m}{} -\let\vspace\LWR@vspace +\LetLtxMacro\vspace\LWR@vspace \renewcommand*{\linebreak}[1][]{\newline} @@ -9403,7 +9721,7 @@ width:\LWR@printlength{\LWR@tempwidth}% \LWR@minipagestartpars% }% non-zero width } -\renewcommand{\rule}{\LWR@rule} +\renewrobustcmd{\rule}{\LWR@rule} \end{warpHTML} |