summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/lwarp
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-05-15 21:14:35 +0000
committerKarl Berry <karl@freefriends.org>2017-05-15 21:14:35 +0000
commit9345b56051808302edacfac91556f8a11d4d7fbe (patch)
tree8f8c7d6ba280b5a64eb7a80f788c361ac5dff730 /Master/texmf-dist/source/latex/lwarp
parentdd2663ca8384b982816cfb456c4d53e7a3f17536 (diff)
lwarp (15may17)
git-svn-id: svn://tug.org/texlive/trunk@44369 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/lwarp')
-rw-r--r--Master/texmf-dist/source/latex/lwarp/lwarp.dtx124
1 files changed, 110 insertions, 14 deletions
diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
index 27c7a4d3f13..d974635bdcd 100644
--- a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
+++ b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
@@ -16,7 +16,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{lwarp}
-%<package> [2017/04/29 v0.30 Allows LaTeX to directly produce HTML5 output.]
+%<package> [2017/05/15 v0.31 Allows LaTeX to directly produce HTML5 output.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -972,7 +972,7 @@ This boolean may be tested by the user for later use.
%<*package>
% \fi
%
-% \CheckSum{10974}
+% \CheckSum{10985}
%
% \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
@@ -1041,6 +1041,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.28}{2017/04/14}{\ 2017/04/14}
% \changes{v0.29}{2017/04/15}{\ 2017/04/15}
% \changes{v0.30}{2017/04/29}{\ 2017/04/29}
+% \changes{v0.31}{2017/05/15}{\ 2017/05/15}
@@ -1174,6 +1175,11 @@ This boolean may be tested by the user for later use.
% For a detailed list of changes, see the Change History on page \pageref{sec:changehistory}.
%
% \begin{description}
+% \item[v0.31:] \
+% \begin{itemize}
+% \item Improved compatibility with \pkg{keyfloat},
+% including the new \env{keywrap} environment.
+% \end{itemize}
% \item[v0.30:] \
% \begin{itemize}
% \item \pkg{lwarp-newproject} has been removed, and its functions
@@ -7822,7 +7828,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-
-- Print the usage of the lwarpmk command:
-printversion = "v0.30"
+printversion = "v0.31"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -16931,7 +16937,6 @@ class="lateximagesource"{}} \LWR@orignewline
\begin{warpHTML}
% \end{macrocode}
-
% \begin{environment}{center}
% Replace \env{center} functionality with \CSS\ tags:
% \begin{macrocode}
@@ -16966,6 +16971,7 @@ class="lateximagesource"{}} \LWR@orignewline
% \end{macrocode}
% \end{environment}
+
% \begin{macrocode}
\end{warpHTML}
% \end{macrocode}
@@ -20131,7 +20137,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
%
% Borrowed from the \pkg{lwarp} version of \pkg{keyfloat}:
% \begin{macrocode}
-\DeclareDocumentEnvironment{KFLT@marginfloat}{O{-1.2ex} m}
+\NewDocumentEnvironment{KFLTfloatflt@marginfloat}{O{-1.2ex} m}
{% start
\LWR@maybeincthisfloat%
\LWR@forcenewpage
@@ -20145,12 +20151,12 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
}
\DeclareDocumentEnvironment{floatingfigure}{o m}
- {\begin{KFLT@marginfloat}{figure}}
- {\end{KFLT@marginfloat}}
+ {\begin{KFLTfloatflt@marginfloat}{figure}}
+ {\end{KFLTfloatflt@marginfloat}}
\DeclareDocumentEnvironment{floatingtable}{o +m}
- {\begin{KFLT@marginfloat}{table}#2}
- {\end{KFLT@marginfloat}}
+ {\begin{KFLTfloatflt@marginfloat}{table}#2}
+ {\end{KFLTfloatflt@marginfloat}}
% \end{macrocode}
%
% \iffalse
@@ -21461,6 +21467,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
% \pkg{keyfloat} is supported with minor adjustments.
%
% \changes{v0.20}{2017/01/16}{\pkg{keyfloat}: Added.}
+% \changes{v0.31}{2017/05/12}{\pkg{keyfloat}: Improved compatibility.}
%
% \codehtml
% \begin{macrocode}
@@ -21471,6 +21478,41 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
% \begin{macrocode}
\AtBeginDocument{
% \end{macrocode}
+%
+% ^^A *8* use a virtual line width instead of \linewidth
+% ^^A% Modified to use \cs{LWR@minipagewidth} instead of \cs{linewidth}:
+% ^^A% \begin{macrocode}
+% ^^A\renewcommand*{\KFLT@findwidths}{%
+% ^^A\typeout{*** KFLT@findwidths start}% *8*
+% ^^A% \end{macrocode}
+% ^^A% Default to a box of full \cs{linewidth} minus the potential frame:
+% ^^A% \begin{macrocode}
+% ^^A\ifthenelse{\boolean{KFLT@ft}}% tight frame?
+% ^^A{\setlength{\KFLT@boxwidth}{\linewidth - 2\KFLTtightframewidth}}%
+% ^^A{% not tight frame
+% ^^A\ifthenelse{\boolean{KFLT@f}}% loose frame?
+% ^^A{\setlength{\KFLT@boxwidth}{\linewidth - 2\KFLTlooseframewidth}}%
+% ^^A{\setlength{\KFLT@boxwidth}{\linewidth}}% no frame
+% ^^A}% not tight frame
+% ^^A% \end{macrocode}
+% ^^A% Several width options exist. First see if width was given:
+% ^^A% \begin{macrocode}
+% ^^A\ifthenelse{\dimtest{\KFLT@w}{>}{0pt}}%
+% ^^A% \end{macrocode}
+% ^^A% Width was given:
+% ^^A% \begin{macrocode}
+% ^^A{\setlength{\KFLT@imagewidth}{\KFLT@w}}%
+% ^^A{% width not given
+% ^^A% \end{macrocode}
+% ^^A% Use full \cs{linewidth} or only a fraction:
+% ^^A% \begin{macrocode}
+% ^^A\ifcsempty{\KFLT@lw}%
+% ^^A{\setlength{\KFLT@imagewidth}{\KFLT@boxwidth}}%
+% ^^A{\setlength{\KFLT@imagewidth}{\KFLT@lw\KFLT@boxwidth}}%
+% ^^A}% width not given
+% ^^A\typeout{*** KFLT@findwidths end}% *8*
+% ^^A}
+% ^^A% \end{macrocode}
% \begin{macrocode}
@@ -21505,6 +21547,59 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
% \begin{macrocode}
+\DeclareDocumentEnvironment{marginfigure}{o}
+ {\begin{KFLT@marginfloat}{figure}}
+ {\end{KFLT@marginfloat}}
+
+\DeclareDocumentEnvironment{margintable}{o}
+ {\begin{KFLT@marginfloat}{table}}
+ {\end{KFLT@marginfloat}}
+% \end{macrocode}
+
+
+% ^^A % Modified to vertically align minipage for \HTML\ output:
+% \begin{macrocode}
+\DeclareDocumentEnvironment{keywrap}{m +m}
+{%
+\begin{BlockClass}{marginblock}
+\setlength{\linewidth}{#1}
+#2%
+\end{BlockClass}
+}
+{%
+}
+% \end{macrocode}
+% ^^A \par%
+% ^^A \setlength{\KFLT@keywrapwidth}{\linewidth}%
+% ^^A \addtolength{\KFLT@keywrapwidth}{-#1}%
+% ^^A \addtolength{\KFLT@keywrapwidth}{-2em}%
+% ^^A \minipage[b]{\KFLT@keywrapwidth}%
+% ^^A %
+% ^^A \setlength{\parskip}{\KFLT@keywrapparskip}%
+% ^^A \setlength{\parindent}{\KFLT@keywrapparindent}%
+% ^^A \booltrue{KFLT@keywrap}%
+% ^^A }
+% ^^A {%
+% ^^A \par
+% ^^A \endminipage%
+% ^^A \hfill%
+% ^^A \begin{minipage}[b]{#1}%
+% ^^A \booltrue{KFLT@keywrap}%
+% ^^A #2%
+% ^^A \par
+% ^^A \unskip\vspace{\smallskipamount}
+% ^^A \end{minipage}%
+% ^^A \par
+% ^^A }
+
+% ^^A \BeforeBeginEnvironment{keywrap}{
+% ^^A \setlength{\KFLT@keywrapparskip}{\parskip}
+% ^^A \setlength{\KFLT@keywrapparindent}{\parindent}
+% ^^A }
+% ^^A % \end{macrocode}
+
+
+% \begin{macrocode}
}% AtBeginDocument
% \end{macrocode}
@@ -21515,6 +21610,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
%
%
%
+% \clearpage
%
% \iffalse
%<*layout>
@@ -24064,7 +24160,7 @@ solid
%
% Borrowed from the \pkg{lwarp} version of \pkg{keyfloat}:
% \begin{macrocode}
-\DeclareDocumentEnvironment{KFLT@marginfloat}{O{-1.2ex} m}
+\NewDocumentEnvironment{KFLTsidenotes@marginfloat}{O{-1.2ex} m}
{% start
\LWR@maybeincthisfloat%
\LWR@forcenewpage
@@ -24078,12 +24174,12 @@ solid
}
\RenewDocumentEnvironment{marginfigure}{o}
- {\begin{KFLT@marginfloat}{figure}}
- {\end{KFLT@marginfloat}}
+ {\begin{KFLTsidenotes@marginfloat}{figure}}
+ {\end{KFLTsidenotes@marginfloat}}
\RenewDocumentEnvironment{margintable}{o}
- {\begin{KFLT@marginfloat}{table}}
- {\end{KFLT@marginfloat}}
+ {\begin{KFLTsidenotes@marginfloat}{table}}
+ {\end{KFLTsidenotes@marginfloat}}
% \end{macrocode}
%
% The following were changed by \pkg{sidenotes}, and now are