From 1a6a16552bad89843c42ccbab0783c6780a0f204 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 8 Jun 2021 20:36:36 +0000 Subject: keyfloat (8jun21) git-svn-id: svn://tug.org/texlive/trunk@59523 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/keyfloat/keyfloat.sty | 28 +++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'Master/texmf-dist/tex/latex/keyfloat') diff --git a/Master/texmf-dist/tex/latex/keyfloat/keyfloat.sty b/Master/texmf-dist/tex/latex/keyfloat/keyfloat.sty index 8662890c5c0..1e4e559f6ef 100644 --- a/Master/texmf-dist/tex/latex/keyfloat/keyfloat.sty +++ b/Master/texmf-dist/tex/latex/keyfloat/keyfloat.sty @@ -18,7 +18,7 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{keyfloat} - [2021/05/28 v2.03 Key/value interface for floats and subfloats.] + [2021/06/08 v2.04 Key/value interface for floats and subfloats.] @@ -73,6 +73,22 @@ \RequirePackage{placeins} \RequirePackage{wrapfig} +\RequirePackage{xpatch} + +\ifdef{\WF@wr} +{ + \xpatchcmd{\WF@wr} + {\gdef} + {\xdef} + {} + { + \PackageError{keyfloat} + {Unable to patch wrapfig \protect\WF@wr} + {Please inform the keyfloat author.} + } +} +{} + \PassOptionsToPackage{expand}{gettitlestring} @@ -202,9 +218,15 @@ \define@key{KFLT@keys}{mo}{\setlength{\KFLT@mo}{#1}} \newlength{\KFLT@mo} +\define@key{KFLT@keys}{wn}{\renewcommand{\KFLT@wn}{#1}} +\newcommand{\KFLT@wn}{} + \define@key{KFLT@keys}{wp}{\renewcommand{\KFLT@wp}{#1}} \newcommand{\KFLT@wp}{O} +\define@key{KFLT@keys}{wo}{\renewcommand{\KFLT@wo}{#1}} +\newcommand{\KFLT@wo}{\wrapoverhang} + \define@key{KFLT@keys}{wlw}{% \renewcommand{\KFLT@wlw}{#1}% \setlength{\KFLT@ww}{0pt}% @@ -542,7 +564,9 @@ \setboolean{KFLT@ft}{false}% \renewcommand{\KFLT@stretch}{1}% \setlength{\KFLT@mo}{-1.2ex}% + \renewcommand{\KFLT@wn}{}% \renewcommand{\KFLT@wp}{O}% + \renewcommand{\KFLT@wo}{\wrapoverhang}% \renewcommand{\KFLT@wlw}{}% \setlength{\KFLT@ww}{0pt}% \renewcommand{\KFLT@va}{c}% @@ -708,7 +732,7 @@ \ifstrequal{#2}{W}% {% [W] \KFLT@findwidths% - \wrapfloat{\KFLT@type}{\KFLT@wp}% + \wrapfloat{\KFLT@type}[\KFLT@wn]{\KFLT@wp}[\KFLT@wo]% {\KFLT@wrapwidth+2\KFLTlooseframewidth}% \minipage{\KFLT@wrapwidth+2\KFLTlooseframewidth}% \hbadness=10000\relax% -- cgit v1.2.3