texlive[59834] trunk: lwarp
commits+karl at tug.org
commits+karl at tug.org
Sun Jul 4 23:23:21 CEST 2021
Revision: 59834
http://tug.org/svn/texlive?view=revision&revision=59834
Author: karl
Date: 2021-07-04 23:23:20 +0200 (Sun, 04 Jul 2021)
Log Message:
-----------
lwarp
Modified Paths:
--------------
trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
trunk/Master/texmf-dist/doc/latex/lwarp/README.txt
trunk/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
Modified: trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua 2021-07-04 21:22:18 UTC (rev 59833)
+++ trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua 2021-07-04 21:23:20 UTC (rev 59834)
@@ -2,7 +2,7 @@
-- Copyright 2016-2021 Brian Dunn
-printversion = "v0.898"
+printversion = "v0.899"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -66,7 +66,9 @@
-- Split one large sourcefile into a number of files,
-- starting with destfile.
-- The file is split at each occurance of <!--|Start file|newfilename|*
+-- If lwarp is in use, sets usinglwarp.
--
+usinglwarp = false ;
print ("lwarpmk: Splitting " .. sourcefile .. " into " .. destfile) ;
local sfile = io.open(sourcefile)
io.output(destfile)
@@ -76,11 +78,23 @@
-- split the file
io.output(newfilename) ;
else
+if ( (i~= nil) and (copen == "<!--") and (cstart == "Using lwarp")) then
+ -- verified the use of \usepackage{lwarp}
+ usinglwarp = true ;
+else
-- not a splitpoint
io.write (line .. "\n") ;
-end
+end end
end -- do
io.close(sfile)
+if ( usinglwarp == false ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: \\usepackage{lwarp} was not detected.")
+ print ("lwarpmk: The HTML output will not be correct.")
+ print ("lwarpmk: Ensured that \\usepackage{lwarp} is enabled,")
+ print ("lwarpmk: then lwarpmk print and lwarpmk HTML again.")
+ print ("lwarpmk: ===")
+end
end -- function
function cvalueerror ( line, linenum , cvalue )
Modified: trunk/Master/texmf-dist/doc/latex/lwarp/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lwarp/README.txt 2021-07-04 21:22:18 UTC (rev 59833)
+++ trunk/Master/texmf-dist/doc/latex/lwarp/README.txt 2021-07-04 21:23:20 UTC (rev 59834)
@@ -1,5 +1,5 @@
-LaTeX lwarp package v0.898 README.txt
+LaTeX lwarp package v0.899 README.txt
Files included are:
Modified: trunk/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua 2021-07-04 21:22:18 UTC (rev 59833)
+++ trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua 2021-07-04 21:23:20 UTC (rev 59834)
@@ -2,7 +2,7 @@
-- Copyright 2016-2021 Brian Dunn
-printversion = "v0.898"
+printversion = "v0.899"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -66,7 +66,9 @@
-- Split one large sourcefile into a number of files,
-- starting with destfile.
-- The file is split at each occurance of <!--|Start file|newfilename|*
+-- If lwarp is in use, sets usinglwarp.
--
+usinglwarp = false ;
print ("lwarpmk: Splitting " .. sourcefile .. " into " .. destfile) ;
local sfile = io.open(sourcefile)
io.output(destfile)
@@ -76,11 +78,23 @@
-- split the file
io.output(newfilename) ;
else
+if ( (i~= nil) and (copen == "<!--") and (cstart == "Using lwarp")) then
+ -- verified the use of \usepackage{lwarp}
+ usinglwarp = true ;
+else
-- not a splitpoint
io.write (line .. "\n") ;
-end
+end end
end -- do
io.close(sfile)
+if ( usinglwarp == false ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: \\usepackage{lwarp} was not detected.")
+ print ("lwarpmk: The HTML output will not be correct.")
+ print ("lwarpmk: Ensured that \\usepackage{lwarp} is enabled,")
+ print ("lwarpmk: then lwarpmk print and lwarpmk HTML again.")
+ print ("lwarpmk: ===")
+end
end -- function
function cvalueerror ( line, linenum , cvalue )
Modified: trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx 2021-07-04 21:22:18 UTC (rev 59833)
+++ trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx 2021-07-04 21:23:20 UTC (rev 59834)
@@ -16,7 +16,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{lwarp}
-%<package> [2021/05/24 v0.898 Allows LaTeX to directly produce HTML5 output.]
+%<package> [2021/06/29 v0.899 Allows LaTeX to directly produce HTML5 output.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -2828,6 +2828,8 @@
\cs{keyfig}, instead of \optn{lw}-proportional widths.
(The \optn{[H]} option forces the use of a minipage, which internally adjusts for
a virtual 6-inch wide minipage, which then corrupts the \optn{lw} option.)
+
+For wrapped figures, overhang and number of lines are ignored.
}
\newcommand{\limitssiunitx}{%
@@ -3098,7 +3100,7 @@
%<*package>
% \fi
%
-% \CheckSum{54272}
+% \CheckSum{54297}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -3238,6 +3240,7 @@
% \changes{v0.896}{2021/04/08}{\ 2021/04/08}
% \changes{v0.897}{2021/05/24}{\ 2021/05/24}
% \changes{v0.898}{2021/05/29}{\ 2021/05/29}
+% \changes{v0.899}{2021/06/29}{\ 2021/06/29}
@@ -3341,6 +3344,8 @@
% \begin{center}
% \setlength{\parskip}{1ex}
% \color{blue}
+% For a quick-start tutorial, see \cref{sec:tutorial}, \nameref{sec:tutorial}.
+%
% For a list of supported features, see \cref{tab:supported}: \nameref{tab:supported}.
%
% To update existing projects, see \cref{sec:updates}: \nameref{sec:updates}.
@@ -3461,6 +3466,15 @@
%
% \begin{description}
% \needspace{2\baselineskip}
+% \item[v0.899:] Minor updates.
+% \begin{itemize}
+% \item \prog{lwarpmk}: Warns if |\usepackage{lwarp}| is not detected.
+% \item \pkg{graphics}: Added support for \optn{keepaspectratio}.
+% \margintag{packages}
+% \item \pkg{keyfloat}: Fix: \optn{lw} with \optn{h}.
+% \item \pkg{multicol}: Improved \CSS.
+% \end{itemize}
+% \needspace{2\baselineskip}
% \item[v0.898:] Minor updates.
% \begin{itemize}
% \item Fewer underfull \cs{hbox} warnings.
@@ -6790,6 +6804,16 @@
%
% \subsection{Compiling the print version with \prog{lwarpmk}}
%
+% \newcommand*{\LWRenablelwarpmk}{%
+% If you have not yet done so,
+% \trouble[Enable \prog{lwarpmk}]{lwarpmk=\filenm{lwarpmk.conf}}
+% \trouble{lwarpmk=\prog{lwarpmk}}
+% add \texttt{\cs{usepackage}\{lwarp\}} to the document,
+% then compile the project a single time using \prog{pdflatex}, \prog{lualatex},
+% or \prog{xelatex}. This generates the file \filenm{lwarpmk.conf},
+% which then allows the \prog{lwarpmk} program to be used.
+% }
+%
% The \prog{lwarpmk} utility program is used to compile either the printed or
% the \HTML\ version of the document.
%
@@ -6797,6 +6821,8 @@
%
% \begin{enumerate}
%
+% \item \LWRenablelwarpmk
+%
% \item Re-compile the print version: \userentry{lwarpmk print}
%
% \prog{lwarpmk} prints an introduction then checks to see if the document
@@ -6846,6 +6872,7 @@
% |lwarpmk html| is used to recompile an \HTML\ version of the document.
%
% \begin{enumerate}
+% \item \LWRenablelwarpmk
% \item Compile the \HTML\ version:
% \userentry{lwarpmk html}
%
@@ -17720,6 +17747,7 @@
% \changes{v0.893}{2020/10/18}{\filenm{lwarp.css}: Added \pkg{keystroke}.}
% \changes{v0.894}{2020/12/15}{\filenm{lwarp.css}: \TeX\ logos no longer below baseline.}
% \changes{v0.896}{2021/03/04}{\filenm{lwarp.css}: Added \element{main}, adjusted \element{sidetoccontainer} margin.}
+% \changes{v0.899}{2021/06/25}{\filenm{lwarp.css}: Improved \pkg{multicol}.}
%
% ^^A *lwarp.css
%
@@ -19103,8 +19131,11 @@
div.multicolsheading { -webkit-column-span: all;
-moz-column-span: all; column-span: all; }
-div.multicols { -webkit-columns: 3 380px ;
- -moz-columns: 3 380px ; columns: 3 380px ; }
+div.multicols {
+ -webkit-columns: 3 auto ;
+ -moz-columns: 3 auto ;
+ columns: 3 auto ;
+}
div.multicols p {margin-top: 0ex}
@@ -19412,6 +19443,14 @@
/* Only display the sidetoc's webpage title if a small screen */
span.sidetocthetitle { display: none }
+ at media screen and (max-width: 100em) {
+ div.multicols {
+ -webkit-columns: 2 auto ;
+ -moz-columns: 2 auto ;
+ columns: 2 auto ;
+ }
+}
+
@media screen and (max-width: 50em) {
div.sidetoccontainer {
float: none ;
@@ -19432,6 +19471,11 @@
display:block ;
margin: 1ex 1em 1ex 1em ;
}
+ div.multicols {
+ -webkit-columns: 1 auto ;
+ -moz-columns: 1 auto ;
+ columns: 1 auto ;
+ }
}
@media print {
@@ -20505,6 +20549,7 @@
% \changes{v0.81}{2020/03/04}{\prog{lwarpmk}: Improved error if in \pkg{lwarp} source directory.}
% \changes{v0.84}{2020/03/30}{\prog{lwarpmk}: \optn{clean} also removes \filenm{comment_*.cut}}
% \changes{v0.89}{2020/08/29}{\prog{lwarpmk}: \optn{clean} also removes \filenm{*.bbl}}
+% \changes{v0.899}{2021/05/30}{\prog{lwarpmk}: Warn if \pkg{lwarp} package not detected.}
%
% The following is only generated if the \optn{lwarpmk} option
% was given to \pkg{lwarp}.
@@ -20520,7 +20565,7 @@
-- Copyright 2016-2021 Brian Dunn
-printversion = "v0.898"
+printversion = "v0.899"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -20587,7 +20632,9 @@
-- Split one large sourcefile into a number of files,
-- starting with destfile.
-- The file is split at each occurance of <!--|Start file|newfilename|*
+-- If lwarp is in use, sets usinglwarp.
--
+usinglwarp = false ;
print ("lwarpmk: Splitting " .. sourcefile .. " into " .. destfile) ;
local sfile = io.open(sourcefile)
io.output(destfile)
@@ -20597,11 +20644,23 @@
-- split the file
io.output(newfilename) ;
else
+if ( (i~= nil) and (copen == "<!--") and (cstart == "Using lwarp")) then
+ -- verified the use of \usepackage{lwarp}
+ usinglwarp = true ;
+else
-- not a splitpoint
io.write (line .. "\n") ;
-end
+end end
end -- do
io.close(sfile)
+if ( usinglwarp == false ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: \\usepackage{lwarp} was not detected.")
+ print ("lwarpmk: The HTML output will not be correct.")
+ print ("lwarpmk: Ensured that \\usepackage{lwarp} is enabled,")
+ print ("lwarpmk: then lwarpmk print and lwarpmk HTML again.")
+ print ("lwarpmk: ===")
+end
end -- function
@@ -27173,10 +27232,23 @@
% \begin{macrocode}
\LWR at traceinfo{LWR at lwarpStart: Starting new file.}
\LWR at filestart
-\LWR at traceinfo{LWR at lwarpStart: Generating first header.}
% \end{macrocode}
+% Tell \prog{lwarpmk} that the \pkg{lwarp} package is in use.
+% This allows \prog{lwarpmk} to warn if |usepackage{lwarp}| was somehow
+% disabled.
+% \changes{v0.899}{2021/05/30}{Warn if \pkg{lwarp} package not detected.}
+% \begin{macrocode}
+\begingroup%
+\LWR at nullfonts%
+\LWR at htmlblockcomment{%
+|Using lwarp|%
+\LWR at htmlsectionfilename{\LWR at thisfilename}|%
+}
+\endgroup%
+% \end{macrocode}
% \changes{v0.73}{2019/06/23}{Fix: Empty header/footer.}
% \begin{macrocode}
+\LWR at traceinfo{LWR at lwarpStart: Generating first header.}
\ifdefempty{\LWR at firstpagetop}{}{%
\LWR at htmltag{header}\LWR at orignewline
\LWR at startpars
@@ -39611,6 +39683,7 @@
\setcounter{LWR at virtualpagedepth}{0}
% \end{macrocode}
%
+%
% \begin{environment}{LWR at setvirtualpage} * \oarg{columns}
%
% If not nesting a minipage, adjust \cs{linewidth}, \cs{textwidth},
@@ -58518,6 +58591,10 @@
\newcommand*{\LWR at igangle}{}
\newcommand*{\LWR at igxscale}{1}
\newcommand*{\LWR at igyscale}{1}
+
+\newbool{LWR at igkeepaspectratio}
+\boolfalse{LWR at igkeepaspectratio}
+
\newcommand*{\LWR at igclass}{inlineimage}
% \end{macrocode}
% \changes{v0.65}{2018/12/19}{\pkg{graphics}: Added \cs{includegraphics} \attribute{alt} key.}
@@ -58589,6 +58666,14 @@
% \end{macrocode}
%
%
+% Handle \optn{keepaspectratio} key:
+% \changes{v0.899}{2021/06/25}{\pkg{graphics}: Supports \optn{keepaspectratio}.}
+% \begin{macrocode}
+\define at key{igraph}{keepaspectratio}[false]{%
+ \booltrue{LWR at igkeepaspectratio}%
+}
+% \end{macrocode}
+%
% Handle \optn{origin} key:
% \changes{v0.52}{2018/03/27}{\pkg{graphics}: Added defaults.}
% \begin{macrocode}
@@ -58648,7 +58733,6 @@
\define at key{igraph}{viewport}{}
\define at key{igraph}{trim}{}
\define at key{igraph}{totalheight}{}
-\define at key{igraph}{keepaspectratio}[true]{}
\define at key{igraph}{clip}[true]{}
\define at key{igraph}{draft}[true]{}
\define at key{igraph}{type}{}
@@ -58772,7 +58856,7 @@
% \end{noindmacro}
-% \begin{noindmacro}{\LWR at ig@wpimagesizes} * \oarg{2: options} \oarg{3: options} \marg{4: filename}
+% \begin{noindmacro}{\LWR at ig@useactualimagesize} * \oarg{2: options} \oarg{3: options} \marg{4: filename}
%
% If formatting for a word processor, find and set the actual image size,
% without rotation, using \PDF\ instead of \SVG\ to find the original bounding box:
@@ -58781,83 +58865,86 @@
% \changes{v0.62}{2018/10/27}{\pkg{graphics}: Fix: \bool{FormatWP}.}
% \changes{v0.79}{2019/12/09}{\pkg{graphics}: Factored from \cs{LWR at includegraphicsb}.}
% \begin{macrocode}
-\newcommand*{\LWR at ig@wpimagesizes}[4]{%
- \ifbool{FormatWP}{%
- \begingroup%
- \LWR at restoreorigformatting%
- \ifpdf%
- \appto\LWR at restoreorigformatting{%
- \DeclareGraphicsExtensions{%
- .pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG%
- }%
+\newcommand*{\LWR at ig@useactualimagesize}[4]{%
+ \begingroup%
+ \LWR at restoreorigformatting%
+ \ifpdf%
+ \appto\LWR at restoreorigformatting{%
+ \DeclareGraphicsExtensions{%
+ .pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG%
}%
- \else% \ifpdf
- \ifXeTeX%
- \appto\LWR at restoreorigformatting{%
- \DeclareGraphicsExtensions{%
- .pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG%
- }%
+ }%
+ \else% \ifpdf
+ \ifXeTeX%
+ \appto\LWR at restoreorigformatting{%
+ \DeclareGraphicsExtensions{%
+ .pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG%
}%
- \else%
- \appto\LWR at restoreorigformatting{%
- \DeclareGraphicsExtensions{%
- .eps,.EPS,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG%
+ }%
+ \else%
+ \appto\LWR at restoreorigformatting{%
+ \DeclareGraphicsExtensions{%
+ .eps,.EPS,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG%
+ }%
+ }%
+ \fi%
+ \fi% \ifpdf
+% \end{macrocode}
+% For a word processor, do not use rotation:
+% \begin{macrocode}
+ \ifbool{FormatWP}{\define at key{Gin}{angle}{}}{}%
+% \end{macrocode}
+% \begin{macrocode}
+ \IfBooleanTF{#1}%
+ {% starred
+ \IfValueTF{#3}%
+ {%
+ \global\sbox{\LWR at imagesizebox}{%
+ \LWR at origincludegraphics*[#2][#3]{#4}%
}%
}%
- \fi%
- \fi% \ifpdf
- \define at key{Gin}{angle}{}%
- \IfBooleanTF{#1}%
- {% starred
- \IfValueTF{#3}%
+ {%
+ \IfValueTF{#2}%
{%
\global\sbox{\LWR at imagesizebox}{%
- \LWR at origincludegraphics*[#2][#3]{#4}%
+ \LWR at origincludegraphics*[#2]{#4}%
}%
- }%
- {%
- \IfValueTF{#2}%
- {%
- \global\sbox{\LWR at imagesizebox}{%
- \LWR at origincludegraphics*[#2]{#4}%
- }%
- }{%
- \global\sbox{\LWR at imagesizebox}{%
- \LWR at origincludegraphics*{#4}%
- }%
+ }{%
+ \global\sbox{\LWR at imagesizebox}{%
+ \LWR at origincludegraphics*{#4}%
}%
}%
- }% starred
- {% not starred
- \IfValueTF{#3}%
+ }%
+ }% starred
+ {% not starred
+ \IfValueTF{#3}%
+ {%
+ \global\sbox{\LWR at imagesizebox}{%
+ \LWR at origincludegraphics[#2][#3]{#4}%
+ }%
+ }%
+ {%
+ \IfValueTF{#2}%
{%
\global\sbox{\LWR at imagesizebox}{%
- \LWR at origincludegraphics[#2][#3]{#4}%
+ \LWR at origincludegraphics[#2]{#4}%
}%
- }%
- {%
- \IfValueTF{#2}%
- {%
- \global\sbox{\LWR at imagesizebox}{%
- \LWR at origincludegraphics[#2]{#4}%
- }%
- }{%
- \global\sbox{\LWR at imagesizebox}{%
- \LWR at origincludegraphics{#4}%
- }%
+ }{%
+ \global\sbox{\LWR at imagesizebox}{%
+ \LWR at origincludegraphics{#4}%
}%
}%
- }% not starred
- \endgroup%
- \settowidth{\LWR at igwidth}{\usebox{\LWR at imagesizebox}}%
- \global\renewcommand*{\LWR at igwidthstyle}{%
- width:\LWR at printlength{\LWR at igwidth}%
}%
- \settoheight{\LWR at igheight}{\usebox{\LWR at imagesizebox}}%
- \global\renewcommand*{\LWR at igheightstyle}{%
- height:\LWR at printlength{\LWR at igheight}%
- }%
- }{}% FormatWP
+ }% not starred
+ \endgroup%
+ \settowidth{\LWR at igwidth}{\usebox{\LWR at imagesizebox}}%
+ \global\renewcommand*{\LWR at igwidthstyle}{%
+ width:\LWR at printlength{\LWR at igwidth}%
+ }%
+ \settoheight{\LWR at igheight}{\usebox{\LWR at imagesizebox}}%
+ \global\renewcommand*{\LWR at igheightstyle}{%
+ height:\LWR at printlength{\LWR at igheight}%
+ }%
}
% \end{macrocode}
% \end{noindmacro}
@@ -59002,6 +59089,7 @@
\renewcommand*{\LWR at igxscale}{1}%
\renewcommand*{\LWR at igyscale}{1}%
\renewcommand*{\LWR at igclass}{inlineimage}%
+ \boolfalse{LWR at igkeepaspectratio}%
% \end{macrocode}
% \changes{v0.65}{2018/12/19}{\pkg{graphics}: Added \cs{includegraphics} \attribute{alt} key.}
% \changes{v0.74}{2019/08/20}{\pkg{graphics}: Add \cs{ThisAltText}.}
@@ -59055,10 +59143,15 @@
% \end{macrocode}
% ^^A \LWR at sanitize{\LWR at parsedfilename}%
%
-% If formatting for a word processor, find and set the actual image size,
+% If formatting for a word processor, or if using \optn{keepaspectratio},
+% find and set the actual image size,
% without rotation, using \PDF\ instead of \SVG\ to find the original bounding box:
+% \changes{v0.899}{2021/06/25}{\pkg{graphics}: Supports \optn{keepaspectratio}.}
% \begin{macrocode}
- \LWR at ig@wpimagesizes{#1}{#2}{#3}{#4}%
+ \ifboolexpr{
+ bool {FormatWP} or
+ bool {LWR at igkeepaspectratio}
+ }{\LWR at ig@useactualimagesize{#1}{#2}{#3}{#4}}{}%
% \end{macrocode}
%
% Create the \HTML\ reference with the graphicspath, filename, extension,
@@ -61926,10 +62019,10 @@
\renewcommand*{\KFLT at maybeendfloatrow}{%
\ifnumless{\value{KFLT at thiscol}}{\value{KFLT at numcols}}%
- {}% thiscol < numcols
- {% >=
- \defcounter{KFLT at thiscol}{0}%
- }%
+ {}% thiscol < numcols
+ {% >=
+ \defcounter{KFLT at thiscol}{0}%
+ }%
}%
\renewcommand{\KFLT at trackrows}%
@@ -61967,8 +62060,25 @@
% \begin{lrbox}{\KFLT at envbox}%
\ifthenelse{\NOT\equal{\KFLT at lw}{}}%
{%
- \KFLT at frame{\includegraphics%
- [scale=\KFLT at s,width=\KFLT at imagewidth]{#1}}%
+% \end{macrocode}
+% \changes{v0.899}{2021/06/25}{\pkg{keyfloat}: Fix: \optn{lw} w/ \optn{h}.}
+% \begin{macrocode}
+ \ifdimgreater{\KFLT at h}{0pt}%
+ {%
+ \KFLT at frame{%
+ \includegraphics%
+ [%
+ scale=\KFLT at s,%
+ width=\KFLT at imagewidth,%
+ height=\KFLT at h,%
+ \KFLT at keepaspectratio,%
+ ]{#1}%
+ }%
+ }%
+ {%
+ \KFLT at frame{\includegraphics%
+ [scale=\KFLT at s,width=\KFLT at imagewidth]{#1}}%
+ }%
}%
{% not linewidth
\ifthenelse{\dimtest{\KFLT at w}{>}{0pt}}%
@@ -61975,9 +62085,12 @@
{% width is given
\ifthenelse{\dimtest{\KFLT at h}{>}{0pt}}%
{% w and h
- \KFLT at frame{\includegraphics%
- [scale=\KFLT at s,%
- width=\KFLT at imagewidth,height=\KFLT at h]{#1}}%
+ \KFLT at frame{\includegraphics[%
+ scale=\KFLT at s,%
+ width=\KFLT at imagewidth,%
+ height=\KFLT at h,%
+ \KFLT at keepaspectratio,%
+ ]{#1}}%
}% w and h
{% only w
\KFLT at frame{\includegraphics%
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty 2021-07-04 21:22:18 UTC (rev 59833)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty 2021-07-04 21:23:20 UTC (rev 59834)
@@ -50,6 +50,10 @@
\newcommand*{\LWR at igangle}{}
\newcommand*{\LWR at igxscale}{1}
\newcommand*{\LWR at igyscale}{1}
+
+\newbool{LWR at igkeepaspectratio}
+\boolfalse{LWR at igkeepaspectratio}
+
\newcommand*{\LWR at igclass}{inlineimage}
\newcommand*{\LWR at igalt}{\ImageAltText}
@@ -93,6 +97,9 @@
{}% not px
}{}% end of length > 0pt
}
+\define at key{igraph}{keepaspectratio}[false]{%
+ \booltrue{LWR at igkeepaspectratio}%
+}
\define at key{igraph}{origin}[c]{%
\renewcommand*{\LWR at igorigin}{#1}%
}
@@ -120,7 +127,6 @@
\define at key{igraph}{viewport}{}
\define at key{igraph}{trim}{}
\define at key{igraph}{totalheight}{}
-\define at key{igraph}{keepaspectratio}[true]{}
\define at key{igraph}{clip}[true]{}
\define at key{igraph}{draft}[true]{}
\define at key{igraph}{type}{}
@@ -170,83 +176,81 @@
}%
}
-\newcommand*{\LWR at ig@wpimagesizes}[4]{%
- \ifbool{FormatWP}{%
- \begingroup%
- \LWR at restoreorigformatting%
- \ifpdf%
- \appto\LWR at restoreorigformatting{%
- \DeclareGraphicsExtensions{%
- .pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG%
- }%
+\newcommand*{\LWR at ig@useactualimagesize}[4]{%
+ \begingroup%
+ \LWR at restoreorigformatting%
+ \ifpdf%
+ \appto\LWR at restoreorigformatting{%
+ \DeclareGraphicsExtensions{%
+ .pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG%
}%
- \else% \ifpdf
- \ifXeTeX%
- \appto\LWR at restoreorigformatting{%
- \DeclareGraphicsExtensions{%
- .pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG%
- }%
+ }%
+ \else% \ifpdf
+ \ifXeTeX%
+ \appto\LWR at restoreorigformatting{%
+ \DeclareGraphicsExtensions{%
+ .pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG%
}%
- \else%
- \appto\LWR at restoreorigformatting{%
- \DeclareGraphicsExtensions{%
- .eps,.EPS,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG%
+ }%
+ \else%
+ \appto\LWR at restoreorigformatting{%
+ \DeclareGraphicsExtensions{%
+ .eps,.EPS,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG%
+ }%
+ }%
+ \fi%
+ \fi% \ifpdf
+ \ifbool{FormatWP}{\define at key{Gin}{angle}{}}{}%
+ \IfBooleanTF{#1}%
+ {% starred
+ \IfValueTF{#3}%
+ {%
+ \global\sbox{\LWR at imagesizebox}{%
+ \LWR at origincludegraphics*[#2][#3]{#4}%
}%
}%
- \fi%
- \fi% \ifpdf
- \define at key{Gin}{angle}{}%
- \IfBooleanTF{#1}%
- {% starred
- \IfValueTF{#3}%
+ {%
+ \IfValueTF{#2}%
{%
\global\sbox{\LWR at imagesizebox}{%
- \LWR at origincludegraphics*[#2][#3]{#4}%
+ \LWR at origincludegraphics*[#2]{#4}%
}%
- }%
- {%
- \IfValueTF{#2}%
- {%
- \global\sbox{\LWR at imagesizebox}{%
- \LWR at origincludegraphics*[#2]{#4}%
- }%
- }{%
- \global\sbox{\LWR at imagesizebox}{%
- \LWR at origincludegraphics*{#4}%
- }%
+ }{%
+ \global\sbox{\LWR at imagesizebox}{%
+ \LWR at origincludegraphics*{#4}%
}%
}%
- }% starred
- {% not starred
- \IfValueTF{#3}%
+ }%
+ }% starred
+ {% not starred
+ \IfValueTF{#3}%
+ {%
+ \global\sbox{\LWR at imagesizebox}{%
+ \LWR at origincludegraphics[#2][#3]{#4}%
+ }%
+ }%
+ {%
+ \IfValueTF{#2}%
{%
\global\sbox{\LWR at imagesizebox}{%
- \LWR at origincludegraphics[#2][#3]{#4}%
+ \LWR at origincludegraphics[#2]{#4}%
}%
- }%
- {%
- \IfValueTF{#2}%
- {%
- \global\sbox{\LWR at imagesizebox}{%
- \LWR at origincludegraphics[#2]{#4}%
- }%
- }{%
- \global\sbox{\LWR at imagesizebox}{%
- \LWR at origincludegraphics{#4}%
- }%
+ }{%
+ \global\sbox{\LWR at imagesizebox}{%
+ \LWR at origincludegraphics{#4}%
}%
}%
- }% not starred
- \endgroup%
- \settowidth{\LWR at igwidth}{\usebox{\LWR at imagesizebox}}%
- \global\renewcommand*{\LWR at igwidthstyle}{%
- width:\LWR at printlength{\LWR at igwidth}%
}%
- \settoheight{\LWR at igheight}{\usebox{\LWR at imagesizebox}}%
- \global\renewcommand*{\LWR at igheightstyle}{%
- height:\LWR at printlength{\LWR at igheight}%
- }%
- }{}% FormatWP
+ }% not starred
+ \endgroup%
+ \settowidth{\LWR at igwidth}{\usebox{\LWR at imagesizebox}}%
+ \global\renewcommand*{\LWR at igwidthstyle}{%
+ width:\LWR at printlength{\LWR at igwidth}%
+ }%
+ \settoheight{\LWR at igheight}{\usebox{\LWR at imagesizebox}}%
+ \global\renewcommand*{\LWR at igheightstyle}{%
+ height:\LWR at printlength{\LWR at igheight}%
+ }%
}
\newcommand*{\LWR at ig@htmltag}{%
@@ -316,6 +320,7 @@
\renewcommand*{\LWR at igxscale}{1}%
\renewcommand*{\LWR at igyscale}{1}%
\renewcommand*{\LWR at igclass}{inlineimage}%
+ \boolfalse{LWR at igkeepaspectratio}%
\ifdefvoid{\LWR at ThisAltText}{%
\edef\LWR at igalt{\ImageAltText}%
}{%
@@ -338,7 +343,10 @@
\filename at parse{\LWR at parsedfilename}%
\StrSubstitute{\LWR at parsedfilename}{//}{/}[\LWR at parsedfilename]%
\LWR at traceinfo{LWR at parsedfilename is \LWR at parsedfilename}%
- \LWR at ig@wpimagesizes{#1}{#2}{#3}{#4}%
+ \ifboolexpr{
+ bool {FormatWP} or
+ bool {LWR at igkeepaspectratio}
+ }{\LWR at ig@useactualimagesize{#1}{#2}{#3}{#4}}{}%
\LWR at traceinfo{LWR at includegraphicsb: about to create href}%
\LWR at href{\LWR at parsedfilename}%
{% start of href
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty 2021-07-04 21:22:18 UTC (rev 59833)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty 2021-07-04 21:23:20 UTC (rev 59834)
@@ -52,10 +52,10 @@
\renewcommand*{\KFLT at maybeendfloatrow}{%
\ifnumless{\value{KFLT at thiscol}}{\value{KFLT at numcols}}%
- {}% thiscol < numcols
- {% >=
- \defcounter{KFLT at thiscol}{0}%
- }%
+ {}% thiscol < numcols
+ {% >=
+ \defcounter{KFLT at thiscol}{0}%
+ }%
}%
\renewcommand{\KFLT at trackrows}%
@@ -78,8 +78,22 @@
\LWR at traceinfo{KFLT at onefigureimage}%
\ifthenelse{\NOT\equal{\KFLT at lw}{}}%
{%
- \KFLT at frame{\includegraphics%
- [scale=\KFLT at s,width=\KFLT at imagewidth]{#1}}%
+ \ifdimgreater{\KFLT at h}{0pt}%
+ {%
+ \KFLT at frame{%
+ \includegraphics%
+ [%
+ scale=\KFLT at s,%
+ width=\KFLT at imagewidth,%
+ height=\KFLT at h,%
+ \KFLT at keepaspectratio,%
+ ]{#1}%
+ }%
+ }%
+ {%
+ \KFLT at frame{\includegraphics%
+ [scale=\KFLT at s,width=\KFLT at imagewidth]{#1}}%
+ }%
}%
{% not linewidth
\ifthenelse{\dimtest{\KFLT at w}{>}{0pt}}%
@@ -86,9 +100,12 @@
{% width is given
\ifthenelse{\dimtest{\KFLT at h}{>}{0pt}}%
{% w and h
- \KFLT at frame{\includegraphics%
- [scale=\KFLT at s,%
- width=\KFLT at imagewidth,height=\KFLT at h]{#1}}%
+ \KFLT at frame{\includegraphics[%
+ scale=\KFLT at s,%
+ width=\KFLT at imagewidth,%
+ height=\KFLT at h,%
+ \KFLT at keepaspectratio,%
+ ]{#1}}%
}% w and h
{% only w
\KFLT at frame{\includegraphics%
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty 2021-07-04 21:22:18 UTC (rev 59833)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty 2021-07-04 21:23:20 UTC (rev 59834)
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2021/05/24 v0.898 Allows LaTeX to directly produce HTML5 output.]
+ [2021/06/29 v0.899 Allows LaTeX to directly produce HTML5 output.]
@@ -3674,8 +3674,11 @@
div.multicolsheading { -webkit-column-span: all;
-moz-column-span: all; column-span: all; }
-div.multicols { -webkit-columns: 3 380px ;
- -moz-columns: 3 380px ; columns: 3 380px ; }
+div.multicols {
+ -webkit-columns: 3 auto ;
+ -moz-columns: 3 auto ;
+ columns: 3 auto ;
+}
div.multicols p {margin-top: 0ex}
/* Used for xfrac and nicefrac: */
@@ -3965,6 +3968,14 @@
/* Only display the sidetoc's webpage title if a small screen */
span.sidetocthetitle { display: none }
+ at media screen and (max-width: 100em) {
+ div.multicols {
+ -webkit-columns: 2 auto ;
+ -moz-columns: 2 auto ;
+ columns: 2 auto ;
+ }
+}
+
@media screen and (max-width: 50em) {
div.sidetoccontainer {
float: none ;
@@ -3985,6 +3996,11 @@
display:block ;
margin: 1ex 1em 1ex 1em ;
}
+ div.multicols {
+ -webkit-columns: 1 auto ;
+ -moz-columns: 1 auto ;
+ columns: 1 auto ;
+ }
}
@media print {
@@ -4746,7 +4762,7 @@
-- Copyright 2016-2021 Brian Dunn
-printversion = "v0.898"
+printversion = "v0.899"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -4810,7 +4826,9 @@
-- Split one large sourcefile into a number of files,
-- starting with destfile.
-- The file is split at each occurance of <!--|Start file|newfilename|*
+-- If lwarp is in use, sets usinglwarp.
--
+usinglwarp = false ;
print ("lwarpmk: Splitting " .. sourcefile .. " into " .. destfile) ;
local sfile = io.open(sourcefile)
io.output(destfile)
@@ -4820,11 +4838,23 @@
-- split the file
io.output(newfilename) ;
else
+if ( (i~= nil) and (copen == "<!--") and (cstart == "Using lwarp")) then
+ -- verified the use of \usepackage{lwarp}
+ usinglwarp = true ;
+else
-- not a splitpoint
io.write (line .. "\n") ;
-end
+end end
end -- do
io.close(sfile)
+if ( usinglwarp == false ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: \\usepackage{lwarp} was not detected.")
+ print ("lwarpmk: The HTML output will not be correct.")
+ print ("lwarpmk: Ensured that \\usepackage{lwarp} is enabled,")
+ print ("lwarpmk: then lwarpmk print and lwarpmk HTML again.")
+ print ("lwarpmk: ===")
+end
end -- function
function cvalueerror ( line, linenum , cvalue )
@@ -7993,6 +8023,13 @@
\LWR at origpagenumbering{arabic}
\LWR at traceinfo{LWR at lwarpStart: Starting new file.}
\LWR at filestart
+\begingroup%
+\LWR at nullfonts%
+\LWR at htmlblockcomment{%
+|Using lwarp|%
+\LWR at htmlsectionfilename{\LWR at thisfilename}|%
+}
+\endgroup%
\LWR at traceinfo{LWR at lwarpStart: Generating first header.}
\ifdefempty{\LWR at firstpagetop}{}{%
\LWR at htmltag{header}\LWR at orignewline
More information about the tex-live-commits
mailing list.