summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp.sty230
1 files changed, 182 insertions, 48 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index 45aebc5efbf..e041933521a 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2019/03/05 v0.68 Allows LaTeX to directly produce HTML5 output.]
+ [2019/03/21 v0.69 Allows LaTeX to directly produce HTML5 output.]
@@ -51,10 +51,15 @@
\@ifpackageloaded{#1}
{
\PackageError{lwarp}
- {Package #1, or one which uses #1, must be loaded after lwarp}
- {Move \detokenize{\usepackage}{#1} after \detokenize{\usepackage}{lwarp}.
- Package #1 may also be loaded by something else, which must also be moved
- after lwarp.}
+ {%
+ Package #1,\MessageBreak
+ or one which uses #1,\MessageBreak
+ must be loaded after lwarp
+ }
+ {Move \detokenize{\usepackage}{#1} after
+ \detokenize{\usepackage}{lwarp}.\MessageBreak
+ Package #1 may also be loaded by something else,\MessageBreak
+ which must also be moved after lwarp.}
}
{}
}
@@ -96,11 +101,16 @@
\newcommand*{\LWR@loadnever}[2]{%
\PackageError{lwarp}
-{Package #1 is not supported by lwarp's HTML conversion.
-Package(s) #2 may be useful instead}
-{Package #1 might conflict with lwarp in some way,
-or is superceded by another package.
-For a possible alternative, see package(s) #2.}
+{%
+ Package #1 is not supported\MessageBreak
+ by lwarp's HTML conversion.\MessageBreak
+ Package(s) #2 may be useful instead
+}
+{%
+ Package #1 might conflict with lwarp in some way,\MessageBreak
+ or is superceded by another package.\MessageBreak
+ For a possible alternative, see package(s) #2.
+}
}
\newcommand*{\LWR@checkloadnever}[3]{%
\edef\LWR@tempone{#1}%
@@ -111,21 +121,31 @@ For a possible alternative, see package(s) #2.}
\newcommand*{\LWR@earlyloadnever}[2]{%
\@ifpackageloaded{#1}{%
\PackageError{lwarp}
-{Package #1 is not supported by lwarp's HTML conversion.
-Package(s) #2 may be useful instead}
-{Package #1 might conflict with lwarp in some way,
-or is superceded by another package.
-For a possible alternative, see package(s) #2.}
+{%
+ Package #1 is not supported\MessageBreak
+ by lwarp's HTML conversion.\MessageBreak
+ Package(s) #2 may be useful instead
+}
+{%
+ Package #1 might conflict with lwarp in some way,\MessageBreak
+ or is superceded by another package.\MessageBreak
+ For a possible alternative, see package(s) #2.
+}
}{}%
}
\newcommand*{\LWR@earlyclassloadnever}[2]{%
\@ifclassloaded{#1}{%
\PackageError{lwarp}
-{Class #1 is not supported by lwarp's HTML conversion.
-Class(es) #2 may be useful instead}
-{Class #1 might conflict with lwarp in some way,
-or is superceded by another class.
-For a possible alternative, see class(es) #2.}
+{%
+ Class #1 is not supported\MessageBreak
+ by lwarp's HTML conversion.\MessageBreak
+ Class(es) #2 may be useful instead
+}
+{%
+ Class #1 might conflict with lwarp in some way,\MessageBreak
+ or is superceded by another class.\MessageBreak
+ For a possible alternative, see class(es) #2.
+}
}{}%
}
\LWR@earlyclassloadnever{jarticle}{ujarticle}
@@ -237,6 +257,7 @@ For a possible alternative, see class(es) #2.}
\LWR@loadafter{continue}
\LWR@loadafter{copyrightbox}
\LWR@notmemoirloadafter{crop}
+\LWR@loadafter{ctable}
\LWR@loadafter{cuted}
\LWR@loadafter{cutwin}
\LWR@loadafter{dblfloatfix}
@@ -263,6 +284,8 @@ For a possible alternative, see class(es) #2.}
\LWR@loadafter{epsfig}
\LWR@loadafter{epstopdf}
\LWR@loadafter{epstopdf-base}
+\LWR@loadafter{eqlist}
+\LWR@loadafter{eqparbox}
\LWR@loadafter{errata}
\LWR@loadafter{eso-pic}
\LWR@loadafter{eurosym}
@@ -305,6 +328,7 @@ For a possible alternative, see class(es) #2.}
\LWR@loadafter{foreign}
\LWR@loadafter{forest}
\LWR@loadafter{framed}
+\LWR@loadafter{ftcap}
\LWR@loadafter{ftnright}
\LWR@loadafter{fullminipage}
\LWR@loadafter{fullpage}
@@ -343,6 +367,7 @@ For a possible alternative, see class(es) #2.}
\LWR@loadafter{lineno}
\LWR@loadafter{lips}
\LWR@loadafter{listings}
+\LWR@loadafter{listliketab}
\LWR@loadafter{longtable}
\LWR@loadafter{lscape}
\LWR@loadafter{ltablex}
@@ -368,6 +393,7 @@ For a possible alternative, see class(es) #2.}
\LWR@loadafter{microtype}
\LWR@loadafter{midfloat}
\LWR@loadafter{midpage}
+\LWR@loadafter{minitoc}
\LWR@notmemoirloadafter{moreverb}
\LWR@notmemoirloadafter{mparhack}
\LWR@loadafter{multicap}
@@ -503,11 +529,13 @@ For a possible alternative, see class(es) #2.}
\LWR@loadafter{titletoc}
\LWR@notmemoirloadafter{titling}
\LWR@notmemoirloadafter{tocbibind}
+\LWR@loadafter{tocdata}
\LWR@loadafter{tocenter}
\LWR@notmemoirloadafter{tocloft}
\LWR@loadafter{tocstyle}
\LWR@loadafter{todo}
\LWR@loadafter{todonotes}
+\LWR@loadafter{topcapt}
\LWR@loadafter{tram}
\LWR@loadafter{transparent}
\LWR@loadafter{trimclip}
@@ -1125,7 +1153,9 @@ For a possible alternative, see class(es) #2.}
\begin{warpHTML}
\NewDocumentCommand{\LWR@ProvidesPackagePass}{m o}{
-\PackageInfo{lwarp}{Using package `#1' and adding lwarp modifications, including options,}%
+\PackageInfo{lwarp}{%
+ Using package `#1' and adding lwarp modifications,\MessageBreak
+ including options,}%
\IfValueTF{#2}
{\ProvidesPackage{lwarp-#1}[#2]}
{\ProvidesPackage{lwarp-#1}}
@@ -1139,7 +1169,10 @@ For a possible alternative, see class(es) #2.}
}
\NewDocumentCommand{\LWR@ProvidesPackageDrop}{m o}{
-\PackageInfo{lwarp}{Replacing package `#1' with the lwarp version, discarding options,}%
+\PackageInfo{lwarp}{%
+ Replacing package `#1' with the lwarp version,\MessageBreak
+ and discarding options,%
+}%
\IfValueTF{#2}
{\ProvidesPackage{lwarp-#1}[#2]}
{\ProvidesPackage{lwarp-#1}}
@@ -2171,6 +2204,7 @@ div.titlepage {
div.marginblock, div.marginparblock {
max-width:50%;
+ min-width: 10em; /* room for caption */
float:right;
text-align:left;
margin: 1ex 0.5em 1ex 1em ;
@@ -3018,6 +3052,19 @@ span.alg2elinenumber{
/* Used for algorithmicx: */
span.floatright { float: right ; }
+/* keyfloat and tocdata: */
+.floatnotes {
+ margin: 0ex 5% 0ex 5% ;
+ padding: 0ex 1em 0ex 1em ;
+ font-size:.80em ;
+ text-align: left ;
+}
+
+.authorartist{
+ font-size:.70em ;
+ font-style: italic;
+}
+
/* Native LaTeX theorems: */
.theoremcontents { font-style: italic; margin-top: 3ex ; margin-bottom: 3ex ; }
@@ -3867,7 +3914,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-
-- Copyright 2016-2018 Brian Dunn
-printversion = "v0.68"
+printversion = "v0.69"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -6045,13 +6092,17 @@ end -- not --version
\csdef{LWR@filename\LWR@hashedname}{}%
}{%
\PackageError{lwarp}
- {
- Section name ``#1'', at the line number listed below,
- generates the filename ``\LWR@thisfilename'',
- which appears to be a duplicate.
- There is a previous section with an identical or similar name.%
+ {%
+ Section name\MessageBreak
+ ``#1'',\MessageBreak
+ at the line number listed below,\MessageBreak
+ generates the filename\MessageBreak
+ ``\LWR@thisfilename'',\MessageBreak
+ which appears to be a duplicate.\MessageBreak
+ There is a previous section with an\MessageBreak
+ identical or similar name%
}
- {
+ {%
Lwarp sanitizes most symbols and a few common short words
when generating file names, and this may cause a conflict.
}
@@ -7292,6 +7343,10 @@ end -- not --version
\newbool{LWR@skippingmcolrowcell}
+\newbool{LWR@usedmultirow}
+
+\newbool{LWR@foundmrowcell}
+
\newbool{LWR@skipatbang}
\newbool{LWR@emptyatbang}
@@ -7616,6 +7671,17 @@ end -- not --version
\addtocounter{LWR@tablecolspecindex}{2}%
}
+\newcommand*{\LWR@parsestarcolumn}{%
+ \PackageError{lwarp}%
+ {%
+ The tabular star column specifier\MessageBreak
+ *{xx}{yy}\MessageBreak
+ is not yet supported by lwarp%
+ }%
+ {Convert *{xx}{yy} to xx copies of yy.}%
+ \addtocounter{LWR@tablecolspecindex}{2}%
+}
+
\newcommand*{\LWR@parseDcolumn}[1]{%
\LWR@parsenormalcolumn{#1}%
\addtocounter{LWR@tablecolspecindex}{3}%
@@ -7693,6 +7759,7 @@ end -- not --version
\IfStrEq{\LWR@strresult}{b}{\LWR@parsepcolumn{b}}{}%
\IfStrEq{\LWR@strresult}{w}{\LWR@parsewcolumn}{}%
\IfStrEq{\LWR@strresult}{W}{\LWR@parsewcolumn}{}%
+\IfStrEq{\LWR@strresult}{*}{\LWR@parsestarcolumn}{}%
\IfStrEq{\LWR@strresult}{D}{\LWR@parseDcolumn{c}}{}%
\IfStrEq{\LWR@strresult}{X}{\LWR@parsenormalcolumn{X}}{}%
\IfStrEq{\LWR@strresult}{P}{\LWR@parsepcolumn{P}}{}%
@@ -8775,6 +8842,8 @@ rowspan="#2" %
\LWR@nullifyNoAutoSpacing%
\global\boolfalse{LWR@exitingtabular}%
\global\boolfalse{LWR@tabularmutemods}%
+\boolfalse{LWR@usedmultirow}
+\boolfalse{LWR@foundmrowcell}
\global\booltrue{LWR@intabularmetadata}%
\LWR@traceinfo{LWR@@tabular: About to LWR@forecenewpage.}%
\LWR@forcenewpage
@@ -8826,10 +8895,12 @@ rowspan="#2" %
\LWR@maybenewtablerow%
\LWR@tabularleftedge%
\global\booltrue{LWR@skippingmrowcell}%
+ \booltrue{LWR@foundmrowcell}%
}%
\renewcommand*{\mcolrowcell}{%
\LWR@maybenewtablerow%
\global\booltrue{LWR@skippingmcolrowcell}%
+ \booltrue{LWR@foundmrowcell}%
}%
\LetLtxMacro\caption\LWR@longtabledatacaptiontag%
\global\boolfalse{LWR@tableparcell}%
@@ -8873,6 +8944,25 @@ rowspan="#2" %
\addtocounter{LWR@tabulardepth}{-1}%
\protected\gdef&{\LWR@origampmacro}%
\StopDefiningTabulars%
+\ifbool{LWR@usedmultirow}{%
+ \ifbool{LWR@foundmrowcell}%
+ {}%
+ {%
+ \PackageError{lwarp}%
+ {%
+ When using \protect\multirow, \protect\multicolumnrow,\MessageBreak
+ or the bigdelim package,\MessageBreak
+ place \protect\mrowcell\space or \protect\mcolrowcell\MessageBreak
+ in empty cells which are to be skipped.\MessageBreak
+ See the lwarp package documentation:\MessageBreak
+ "Special cases and limitations" -> "Tabular"
+ }%
+ {%
+ See the lwarp package documentation:\MessageBreak
+ "Special cases and limitations" -> "Tabular".
+ }%
+ }%
+}{}%
\LWR@traceinfo{LWR@HTML@endtabular finished}%
}
@@ -9494,6 +9584,8 @@ autopage-\theLWR@currentautosec%
\LetLtxMacro\numberline\LWR@numberline
+\newcommand*{\LWR@maybetocdata}{}
+
\NewDocumentCommand{\hypertoc}{m m +m m}{%
\LWR@traceinfo{hypertoc !#1!#2!#3!#4!}%
\ifthenelse{\cnttest{#1}{<=}{\value{tocdepth}}}%
@@ -9503,6 +9595,7 @@ autopage-\theLWR@currentautosec%
\LWR@htmlrefsectionfilename{autopage-#4}%
\LWR@origpound\LWR@print@mbox{autosec-#4}%
}{#3}{toc#2}%
+ \LWR@maybetocdata%
\LWR@stoppars%
}%
{}%
@@ -9533,6 +9626,7 @@ autopage-\theLWR@currentautosec%
\LWR@htmlrefsectionfilename{autopage-\arabic{LWR@nextautopage}}%
\LWR@origpound\LWR@print@mbox{autoid-\arabic{LWR@nextautoid}}}%
{#4}{toc#2}%
+ \LWR@maybetocdata%
\LWR@stoppars%
}%
{}%
@@ -10582,7 +10676,6 @@ autopage-\theLWR@currentautosec%
\LWR@traceinfo{lateximage: ending outer-most lateximage}%
\endLWR@print@minipage%
\LWR@orignewpage%
- \LWR@print@scriptsize%
\LWR@print@vspace*{.5\baselineskip}%
\LWR@htmlclosecomment%
\LWR@traceinfo{lateximage: The page after the image is \arabic{page}}%
@@ -11118,32 +11211,64 @@ autopage-\theLWR@currentautosec%
\newcommand*{\LWR@HTML@mbox}[1]{#1}
\LWR@formatted{mbox}
-\NewDocumentCommand{\LWR@HTML@makebox}{d() o o m}{%
-\IfValueTF{#2}%
-{%
- {% scope
+\NewDocumentCommand{\LWR@@makebox@paren}{m m}{%
+\IfValueTF{#2}{%
+ \setlength{\LWR@tempwidth}{#1\unitlength}%
+ \setlength{\LWR@tempheight}{#2\unitlength}%
+ \appto{\LWR@temptwo}{%
+ \LWR@print@mbox{width:\LWR@printlength{\LWR@tempwidth}} ; % space
+ \LWR@print@mbox{height:\LWR@printlength{\LWR@tempheight}} ; % space
+ }%
+}{%
+ \PackageError{lwarp}%
+ {(width,height) is missing a comma ',' character}%
+ {\protect\makebox\space \protect\framebox\space accept
+ a size in the format (width,height).}%
+}%
+}
+\newcommand*{\LWR@@makebox@align}[1]{%
\def\LWR@align{center}%
- \ifstrequal{#3}{l}{\def\LWR@align{left}}{}%
- \ifstrequal{#3}{r}{\def\LWR@align{right}}{}%
- \ifstrequal{#3}{s}{\def\LWR@align{justify}}{}%
- \setlength{\LWR@tempwidth}{#2}%
+ \ifstrequal{#1}{l}{\def\LWR@align{left}}{}%
+ \ifstrequal{#1}{r}{\def\LWR@align{right}}{}%
+ \ifstrequal{#1}{s}{\def\LWR@align{justify}}{}%
+ \appto{\LWR@temptwo}{%
+ \LWR@print@mbox{text-align:\LWR@align} ; %
+ }%
+}
+\NewDocumentCommand{\LWR@HTML@makebox}{>{\SplitArgument{1}{,}}d() o o m}{%
+{% scope
+ \def\LWR@temptwo{}%
+ \IfValueTF{#1}%
+ {% (width,height) ..
+ \LWR@@makebox@paren #1%
+ \IfValueT{#2}%
+ {% (width,height) [posn]
+ \LWR@@makebox@align{#2}%
+ }%
+ }%
+ {% [width]
+ \setlength{\LWR@tempwidth}{#2}%
+ \appto{\LWR@temptwo}{%
+ width:\LWR@printlength{\LWR@tempwidth} ; % space
+ }%
+ \IfValueT{#3}%
+ {% [width] [posn]
+ \LWR@@makebox@align{#3}%
+ }%
+ }%
\InlineClass[%
\LWR@print@mbox{display:inline-block} ; %
- \LWR@print@mbox{text-align}:\LWR@align\ ; %
- width:\LWR@printlength{\LWR@tempwidth}%
+ \LWR@temptwo%
]%
{makebox}%
{#4}%
- }% scope
-}%
-{#4}% no width
+}% scope
}
-
\LWR@formatted{makebox}
\LetLtxMacro\LWR@origframebox\framebox
-\NewDocumentCommand{\LWR@HTML@framebox}{o o m}{%
-\fbox{\makebox[#1][#2]{#3}}%
+\NewDocumentCommand{\LWR@HTML@framebox}{d() o o m}{%
+ \fbox{\makebox(#1)[#2][#3]{#4}}%
}
\LWR@formatted{framebox}
@@ -11219,7 +11344,6 @@ color:\LWR@origpound\LWR@tempcolor%
\LetLtxMacro\endfminipage\endLWR@print@fminipage
\end{warpall}
-
\begin{warpHTML}
\NewDocumentEnvironment{LWR@HTML@fminipage}{O{t} o O{t} m}
@@ -11232,7 +11356,17 @@ color:\LWR@origpound\LWR@tempcolor%
\begin{BlockClass}[%
\LWR@fboxstyle ; %
\IfValueT{#2}{height:\LWR@printlength{\LWR@tempheight} ; }%
-width:\LWR@printlength{\LWR@tempwidth}%
+\ifbool{LWR@minipagefullwidth}%
+{\global\boolfalse{LWR@minipagefullwidth}}%
+{%
+ \ifbool{LWR@forceminipagefullwidth}%
+ {}%
+ {%
+ \ifthenelse{\lengthtest{\LWR@tempwidth}=\linewidth}%
+ {}%
+ {width:\LWR@printlength{\LWR@tempwidth} ; }%
+ }%
+}%
]{fminipage}%
}
{%