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.sty136
1 files changed, 90 insertions, 46 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index df6b7f398ae..72dfd66c253 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
@@ -6,7 +6,7 @@
%%
%% lwarp.dtx (with options: `package')
%% This is a generated file.
-%% Copyright 2016-2018 Brian Dunn
+%% Copyright 2016-2019 Brian Dunn
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -17,7 +17,8 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2019/04/03 v0.70 Allows LaTeX to directly produce HTML5 output.]
+ [2019/04/29 v0.71 Allows LaTeX to directly produce HTML5 output.]
+
@@ -390,6 +391,7 @@
\LWR@loadafter{mathtools}
\LWR@loadafter{mcaption}
\LWR@loadafter{mdframed}
+\LWR@loadafter{media9}
\LWR@loadafter{memhfixc}
\LWR@loadafter{metalogo}
\LWR@loadafter{metalogox}
@@ -399,9 +401,11 @@
\LWR@loadafter{midpage}
\LWR@loadafter{minitoc}
\LWR@notmemoirloadafter{moreverb}
+\LWR@notmemoirloadafter{movie15}
\LWR@notmemoirloadafter{mparhack}
\LWR@loadafter{multicap}
\LWR@loadafter{multicolrule}
+\LWR@loadafter{multimedia}
\LWR@loadafter{multirow}
\LWR@loadafter{multitoc}
\LWR@loadafter{musicography}
@@ -669,6 +673,11 @@
}
\newcommand*{\LWR@convertto}[2]{\strip@pt\dimexpr #2*65536/\number\dimexpr 1#1}
+\newcommand*{\LWR@printpercentlength}[2]{%
+ \setcounter{LWR@tempcountone}{100*\ratio{#1}{#2}}%
+ \arabic{LWR@tempcountone}%
+}
+
\newcommand*{\LWR@patcherror}[2]{%
\PackageError{lwarp}
{Unable to patch package #1, macro #2}
@@ -1618,11 +1627,13 @@
\fullexpandarg%
\IfSubStr*{\jobname}{-pstool}
{
- \typeout{lwarp: jobname with -pstool is found,}%
- \typeout{lwarp: \space\space not generating configuration files.}%
+ \PackageInfo{lwarp}{%
+ Jobname with -pstool is found.\MessageBreak
+ Not generating lwarp configuration files,%
+ }
}
{
- \typeout{lwarp: generating configuration files}
+ \PackageInfo{lwarp}{Generating lwarp configuration files,}%
\includecomment{LWRwriteconf}
}
\end{warpprint}
@@ -2012,12 +2023,6 @@ blockquote {
margin-right: 2em ;
}
-blockquotation {
- display: block ;
- margin-left: 2em ;
- margin-right: 2em ;
-}
-
/* quotchap is for the quotchap package */
div.quotchap {
display: block ;
@@ -2027,7 +2032,7 @@ div.quotchap {
margin-right: 2em ;
}
-blockquote p, blockquotation p, div.quotchap p {
+blockquote p, div.quotchap p {
line-height: 1.5;
text-align: left ;
font-size: .85em ;
@@ -3951,7 +3956,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-
-- Copyright 2016-2018 Brian Dunn
-printversion = "v0.70"
+printversion = "v0.71"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -4028,6 +4033,20 @@ function cvalueerror ( line, linenum , cvalue )
os.exit(1) ;
end
+function printhowtorecompile ()
+-- Tells the user how to recompile to regenerate the configuration files.
+ print ("lwarpmk: The configuration files lwarpmk.conf and "..sourcename..".lwarpmkconf" )
+ print ("lwarpmk: must be updated. To do so, recompile" )
+ print ("lwarpmk: " , sourcename..".tex" )
+ if ( printlatexcmd == "" ) then
+ print ("lwarpmk: using xe/lua/pdflatex," )
+ else
+ print ("lwarpmk: using the command:")
+ print ("lwarpmk: " , printlatexcmd )
+ end
+ print ("lwarpmk: then use lwarpmk again.")
+end -- printhowtorecompile
+
function ignoreconf ()
-- Global argument index
argindex = 2
@@ -4189,19 +4208,14 @@ end --- for Windows
if ( (package.config:sub(1,1)) ~= dirslash ) then
print ("lwarpmk: ===")
print ("lwarpmk: It appears that lwarpmk.conf is for a different operating system." )
- print ("lwarpmk: To adjust lwarpmk.conf for the current operating system," )
- print ("lwarpmk: recompile the original document using xe/lua/pdflatex." )
- print ("lwarpmk: ")
- print ("lwarpmk: lwarpmk shall attempt to continue...")
+ printhowtorecompile ()
print ("lwarpmk: ===")
+ os.exit(1)
end
-- Error if the configuration file's version is not current:
if ( confversion ~= requiredconfversion ) then
print ("lwarpmk: ===")
- print ("lwarpmk: The configuration files lwarpmk.conf and "..sourcename..".lwarpmkconf" )
- print ("lwarpmk: must be updated. To update the configuration files," )
- print ("lwarpmk: recompile "..sourcename..".tex using xe/lua/pdflatex," )
- print ("lwarpmk: then use lwarpmk again.")
+ printhowtorecompile ()
print ("lwarpmk: ===")
os.exit(1)
end
@@ -4505,7 +4519,7 @@ function createlateximages ()
--
-- See if the document must be recompiled first:
checklimages ()
--- See if the print version exists:
+-- See if the HTML version exists:
checkhtmlpdfexists ()
-- Attempt to create the lateximages:
print ("lwarpmk: Creating lateximages.")
@@ -5592,9 +5606,9 @@ end -- not --version
\LWR@closeparagraph@br%
}% no nested par tags
{% yes nest par tags
+ \@hspacer{\fill}% \hspace*{\fill}
\leavevmode\LWR@orignewline%
\LWR@htmltagc{/\LWR@tagregularparagraph}%
- \LWR@origpar%
\global\boolfalse{LWR@doingapar}%
\global\boolfalse{LWR@minipagethispar}%
\PN@parnotes@auto%
@@ -5654,8 +5668,7 @@ end -- not --version
\LWR@orignewline%
\global\boolfalse{LWR@doingapar}%
\global\boolfalse{LWR@minipagethispar}
-
- }% an intentionally blank line
+ }%
{}%
\ifbool{LWR@doingstartpars}%
{\ClearPreHook{par}}%
@@ -5820,16 +5833,17 @@ end -- not --version
\boolean{LWR@doingstartpars} \AND%
\cnttest{\value{LWR@lateximagedepth}}{=}{0}%
}%
- {}%
- {\LWR@htmltagc{\LWR@tagregularparagraph}\LWR@orignewline}%
+ {}%
+ {\LWR@htmltagc{\LWR@tagregularparagraph}\LWR@orignewline}%
\@makefntext{%
\ignorespaces#1%
}%
\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}%
{}%
{%
+ \leavevmode\LWR@orignewline%
\LWR@htmltagc{/\LWR@tagregularparagraph}%
- \LWR@orignewline%
+ \LWR@origpar%
}%
\color@endgroup%
}% vbox
@@ -7047,17 +7061,16 @@ end -- not --version
\begin{warpHTML}
\renewenvironment*{quote}
{
-\LWR@forcenewpage
-\LWR@htmlblocktag{blockquote}
+ \LWR@forcenewpage
+ \LWR@htmlblocktag{blockquote}
}
{\LWR@htmlblocktag{/blockquote}}
-
\renewenvironment*{quotation}
{
-\LWR@forcenewpage
-\LWR@htmlblocktag{blockquotation}
+ \LWR@forcenewpage
+ \LWR@htmlblocktag{blockquote}
}
-{\LWR@htmlblocktag{/blockquotation}}
+{\LWR@htmlblocktag{/blockquote}}
\end{warpHTML}
@@ -7464,12 +7477,15 @@ end -- not --version
}
\newcommand*{\LWR@closetabledatacell}{%
-\LWR@stoppars%
\global\booltrue{LWR@intabularmetadata}%
-\ifbool{LWR@exitingtabular}{}%
+\ifbool{LWR@exitingtabular}%
+{%
+ \LWR@stoppars%
+}%
{% not exiting tabular
\ifboolexpr{bool{LWR@skippingmrowcell} or bool{LWR@skippingmcolrowcell}}%
{%
+ \LWR@stoppars%
\ifbool{LWR@skippingmcolrowcell}%
{}%
{\LWR@insertatbangcols}%
@@ -7483,7 +7499,7 @@ end -- not --version
}%
{}%
{\LWR@getexparray{LWR@colafterspec}{\arabic{LWR@tableLaTeXcolindex}}}%
- \ifbool{LWR@tableparcell}{\LWR@stoppars}{}%
+ \LWR@stoppars%
\global\boolfalse{LWR@tableparcell}%
\whileboolexpr{test {\ifnumcomp{\value{LWR@cellcolordepth}}{>}{0}}}{%
\LWR@htmltag{/div}\LWR@orignewline%
@@ -7745,13 +7761,6 @@ end -- not --version
}
\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}%
}
@@ -7761,6 +7770,41 @@ end -- not --version
}
+\newcount\LWR@starcount
+\newcommand*{\LWR@expcolspec}{}
+\newcounter{LWR@splitstarindex}
+\newcounter{LWR@splitstarcopies}
+\newcommand*{\LWR@splitstarcontents}{}
+\newcommand*{\expandcolspec}{%
+ \StrPosition{\LWR@origcolspec}{*}[\LWR@tempone]%
+ \whileboolexpr{ test {\ifnumgreater{\LWR@tempone}{0}}}%
+ {%
+ \setcounter{LWR@splitstarindex}{\LWR@tempone}%
+ \addtocounter{LWR@splitstarindex}{-1}%
+ \StrLeft{\LWR@origcolspec}{\value{LWR@splitstarindex}}[\LWR@expcolspec]%
+ \addtocounter{LWR@splitstarindex}{2}%
+ \StrChar{\LWR@origcolspec}{\value{LWR@splitstarindex}}[\LWR@tempone]%
+ \setcounter{LWR@splitstarcopies}{\expandafter\@firstofone\LWR@tempone}%
+ \addtocounter{LWR@splitstarindex}{1}%
+ \StrChar{\LWR@origcolspec}{\value{LWR@splitstarindex}}[\LWR@splitstarcontents]%
+ \ifnumgreater{\value{LWR@splitstarcopies}}{0}%
+ {%
+ \LWR@starcount=\value{LWR@splitstarcopies}%
+ \loop
+ \appto\LWR@expcolspec{%
+ \expandafter\@firstofone\LWR@splitstarcontents%
+ }%
+ \advance \LWR@starcount -1
+ \ifnum \LWR@starcount>0 \repeat
+ }{}%
+ \StrGobbleLeft{\LWR@origcolspec}{\value{LWR@splitstarindex}}[\colspecremainder]%
+ \appto{\LWR@expcolspec}{\colspecremainder}%
+ \edef\LWR@origcolspec{\LWR@expcolspec}%
+ \StrPosition{\LWR@origcolspec}{*}[\LWR@tempone]%
+ }%
+}
+
+
\newbool{LWR@validtablecol}
\newbool{LWR@opttablecol}
\newcommand*{\LWR@parsetablecols}[1]{%
@@ -7768,6 +7812,7 @@ end -- not --version
\renewcommand*{\LWR@origcolspec}{#1}%
\expandarg%
\StrSubstitute{\LWR@origcolspec}{ }{}[\LWR@origcolspec]%
+\expandcolspec%
\setcounter{LWR@tabletotalLaTeXcols}{0}%
\setcounter{LWR@tabletotalLaTeXcolsnext}{1}%
\LWR@setexparray{LWR@colatspec}{leftedge}{}%
@@ -9450,7 +9495,6 @@ autopage-\theLWR@currentautosec%
{%
\LWR@traceinfo{LWR@HTML@caption@begin}%
\begingroup%
-\@setpar{\LWR@closeparagraph\@@par}%
\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}{}{}%
\RenewDocumentCommand{\parbox}{O{t} O{} O{t} m +m}{##5}%
\LWR@figcaption%
@@ -11295,7 +11339,7 @@ autopage-\theLWR@currentautosec%
}{%
\PackageError{lwarp}%
{(width,height) is missing a comma ',' character}%
- {\protect\makebox\space \protect\framebox\space accept
+ {\protect\makebox\space and \protect\framebox\space accept
a size in the format (width,height).}%
}%
}