| 1 |
%% |
| 2 |
%% This is file `lwarp-wrapfig.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% lwarp.dtx (with options: `wrapfig') |
| 8 |
%% This is a generated file. |
| 9 |
%% Copyright 2016-2026 Brian Dunn |
| 10 |
%% |
| 11 |
%% This work may be distributed and/or modified under the |
| 12 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 13 |
%% of this license or (at your option) any later version. |
| 14 |
%% The latest version of this license is in |
| 15 |
%% http://www.latex-project.org/lppl.txt |
| 16 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 17 |
%% version 2005/12/01 or later. |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
\LWR@ProvidesPackageDrop{wrapfig}[2003/01/31] |
| 23 |
\newcommand*{\LWR@wrapposition}{} |
| 24 |
|
| 25 |
\newcommand{\LWR@wrapfig@printHTMLwidth}{\LWR@printlength{\LWR@templengthone}} |
| 26 |
|
| 27 |
\AtBeginDocument{ |
| 28 |
\IfPackageLoadedTF{keyfloat}{ |
| 29 |
\renewcommand{\LWR@wrapfig@printHTMLwidth}{% |
| 30 |
\ifboolexpr{ |
| 31 |
test {\ifnumgreater{\value{KFLT@keyfloatdepth}}{0}} or |
| 32 |
bool {KFLT@inkeysubfloats} |
| 33 |
}% |
| 34 |
{\LWR@printpercentlength{\LWR@templengthone}{\linewidth}\%; }% |
| 35 |
{\LWR@printlength{\LWR@templengthone}}% |
| 36 |
}% |
| 37 |
}{} |
| 38 |
} |
| 39 |
|
| 40 |
\newcommand*{\LWR@subwrapfigure}[2]{% |
| 41 |
\renewcommand*{\LWR@wrapposition}{}% |
| 42 |
\ifthenelse{% |
| 43 |
\equal{#1}{r}\OR\equal{#1}{R}\OR% |
| 44 |
\equal{#1}{o}\OR\equal{#1}{O}% |
| 45 |
}% |
| 46 |
{\renewcommand*{\LWR@wrapposition}{float:right}}% |
| 47 |
{\renewcommand*{\LWR@wrapposition}{float:left}}% |
| 48 |
\setlength{\LWR@templengthone}{#2}% |
| 49 |
\LWR@BlockClassWP{% |
| 50 |
width:\LWR@printlength{\LWR@templengthone}; \LWR@wrapposition; % |
| 51 |
margin:10pt% |
| 52 |
}% |
| 53 |
{% |
| 54 |
width:\LWR@wrapfig@printHTMLwidth; % |
| 55 |
\LWR@wrapposition; % |
| 56 |
}% |
| 57 |
(note)% |
| 58 |
{marginblock}% |
| 59 |
\setlength{\linewidth}{\LWR@templengthone}% |
| 60 |
} |
| 61 |
|
| 62 |
\NewDocumentEnvironment{wrapfigure}{o m o m} |
| 63 |
{% |
| 64 |
\begin{LWR@setvirtualpage}*% |
| 65 |
\LWR@subwrapfigure{#2}{#4}% |
| 66 |
\renewcommand*{\@captype}{figure}% |
| 67 |
} |
| 68 |
{% |
| 69 |
\endLWR@BlockClassWP% |
| 70 |
\end{LWR@setvirtualpage}% |
| 71 |
} |
| 72 |
|
| 73 |
\NewDocumentEnvironment{wraptable}{o m o m} |
| 74 |
{% |
| 75 |
\begin{LWR@setvirtualpage}*% |
| 76 |
\LWR@subwrapfigure{#2}{#4}% |
| 77 |
\renewcommand*{\@captype}{table}% |
| 78 |
} |
| 79 |
{% |
| 80 |
\endLWR@BlockClassWP% |
| 81 |
\end{LWR@setvirtualpage}% |
| 82 |
} |
| 83 |
|
| 84 |
\NewDocumentEnvironment{wrapfloat}{m o m o m} |
| 85 |
{% |
| 86 |
\begin{LWR@setvirtualpage}*% |
| 87 |
\LWR@subwrapfigure{#3}{#5}% |
| 88 |
\renewcommand*{\@captype}{#1}% |
| 89 |
} |
| 90 |
{% |
| 91 |
\endLWR@BlockClassWP% |
| 92 |
\end{LWR@setvirtualpage}% |
| 93 |
} |
| 94 |
|
| 95 |
\newlength{\wrapoverhang} |
| 96 |
|
| 97 |
\endinput |
| 98 |
%% |
| 99 |
%% End of file `lwarp-wrapfig.sty'. |