summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/keyfloat
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-05-29 20:24:04 +0000
committerKarl Berry <karl@freefriends.org>2021-05-29 20:24:04 +0000
commit70af71c72e5d0a76f8adf71fb52c6e16261e77c6 (patch)
treec52dbad337ddede13fb57f227ac70a5b3916bb58 /Master/texmf-dist/tex/latex/keyfloat
parent8b1303eb20633b1b95746ba0d96e0bc8d31bf998 (diff)
keyfloat (29may21)
git-svn-id: svn://tug.org/texlive/trunk@59389 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/keyfloat')
-rw-r--r--Master/texmf-dist/tex/latex/keyfloat/keyfloat.sty47
1 files changed, 40 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/keyfloat/keyfloat.sty b/Master/texmf-dist/tex/latex/keyfloat/keyfloat.sty
index 6c18d0c7f2b..8662890c5c0 100644
--- a/Master/texmf-dist/tex/latex/keyfloat/keyfloat.sty
+++ b/Master/texmf-dist/tex/latex/keyfloat/keyfloat.sty
@@ -18,7 +18,9 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{keyfloat}
- [2019/09/23 v2.01 Key/value interface for floats and subfloats.]
+ [2021/05/28 v2.03 Key/value interface for floats and subfloats.]
+
+
@@ -59,7 +61,6 @@
\KFLT@prohibitpackage{subfig}{subcaption}
\KFLT@prohibitpackage{subfigure}{subcaption}
\KFLT@prohibitpackage{subfloat}{subcaption}
-\KFLT@prohibitpackage{float}{newfloat}
\KFLT@prohibitpackage{floatflt}{wrapfig}
\RequirePackage{etoolbox}[2011/01/03]%
\RequirePackage{xparse}
@@ -204,6 +205,17 @@
\define@key{KFLT@keys}{wp}{\renewcommand{\KFLT@wp}{#1}}
\newcommand{\KFLT@wp}{O}
+\define@key{KFLT@keys}{wlw}{%
+ \renewcommand{\KFLT@wlw}{#1}%
+ \setlength{\KFLT@ww}{0pt}%
+}
+\newcommand*{\KFLT@wlw}{}
+\define@key{KFLT@keys}{ww}{%
+ \setlength{\KFLT@ww}{#1}%
+ \renewcommand{\KFLT@wlw}{}%
+}
+\newlength{\KFLT@ww}
+
\define@key{KFLT@keys}{va}{\renewcommand{\KFLT@va}{#1}}
\newcommand{\KFLT@va}{c}
@@ -282,6 +294,8 @@
\newlength{\KFLT@imagewidth}
\newlength{\KFLT@boxwidth}
+\newlength{\KFLT@wrapwidth}
+
\newcommand*{\KFLT@findwidths}{%
\ifbool{KFLT@ft}% tight frame?
{\setlength{\KFLT@boxwidth}{\linewidth - 2\KFLTtightframewidth}}%
@@ -293,10 +307,20 @@
\ifdimgreater{\KFLT@w}{0pt}%
{\setlength{\KFLT@imagewidth}{\KFLT@w}}%
{% width not given
- \ifcsempty{\KFLT@lw}%
+ \ifcsempty{KFLT@lw}%
{\setlength{\KFLT@imagewidth}{\KFLT@boxwidth}}%
{\setlength{\KFLT@imagewidth}{\KFLT@lw\KFLT@boxwidth}}%
}% width not given
+ \ifdimgreater{\KFLT@ww}{0pt}%
+ {%
+ \setlength{\KFLT@wrapwidth}{\KFLT@ww}}%
+ {% width not given
+ \ifcsempty{KFLT@wlw}%
+ {%
+ \setlength{\KFLT@wrapwidth}{\KFLT@imagewidth}}%
+ {%
+ \setlength{\KFLT@wrapwidth}{\KFLT@wlw\KFLT@boxwidth}}%
+ }% width not given
}
\newcommand{\KFLTtightframe}[1]{%
\setlength{\fboxsep}{0pt}%
@@ -519,6 +543,8 @@
\renewcommand{\KFLT@stretch}{1}%
\setlength{\KFLT@mo}{-1.2ex}%
\renewcommand{\KFLT@wp}{O}%
+ \renewcommand{\KFLT@wlw}{}%
+ \setlength{\KFLT@ww}{0pt}%
\renewcommand{\KFLT@va}{c}%
}
@@ -562,6 +588,7 @@
{% local
\addvspace{\smallskipamount}%
\begin{minipage}{\linewidth}%
+ \hbadness=10000\relax%
\csuse{KFLT@#1textalign}%
\footnotesize%
\setlength{\parskip}{1.5ex}%
@@ -596,6 +623,7 @@
\newcommand*{\KFLT@@addartisttext}[3]{%
\addvspace{\medskipamount}%
\begin{minipage}{\linewidth}%
+ \hbadness=10000\relax%
#3%
\footnotesize\textsc{%
\KFLT@optionalname{\csuse{KFLT@#1a#2p}}%
@@ -681,11 +709,14 @@
{% [W]
\KFLT@findwidths%
\wrapfloat{\KFLT@type}{\KFLT@wp}%
- {\KFLT@imagewidth+2\KFLTlooseframewidth}%
- \minipage{\KFLT@imagewidth+2\KFLTlooseframewidth}%
+ {\KFLT@wrapwidth+2\KFLTlooseframewidth}%
+ \minipage{\KFLT@wrapwidth+2\KFLTlooseframewidth}%
+ \hbadness=10000\relax%
\normalcolor\reset@font\normalsize%
\renewcommand{\KFLT@lw}{}%
\renewcommand{\KFLT@w}{\KFLT@imagewidth}%
+ \renewcommand{\KFLT@wlw}{}%
+ \renewcommand{\KFLT@ww}{0pt}%
}% [W]
{% not [W]
\ifstrequal{#2}{M}%
@@ -781,7 +812,7 @@
\NewDocumentCommand{\KFLT@keyflt}{m m m +m +m}
{%
- \ifcsdef{l@#3}{}{%
+ \ifcsdef{ftype@#3}{}{%
\PackageError{keyfloat}%
{%
\protect\keyflt: Invalid float type.\MessageBreak%
@@ -991,6 +1022,7 @@
{% [W]:
\wrapfloat{figure}{O}{.5\linewidth}%
\minipage{\linewidth}%
+ \hbadness=10000\relax%
\normalcolor\reset@font\normalsize%
}%
{% not [H]:
@@ -1102,6 +1134,7 @@
\wrapfloat{\KFLT@subgrptype}{O}{.5\linewidth}%
\setlength{\KFLT@rowboxwidth}{.5\KFLT@rowboxwidth}%
\minipage{\linewidth}%
+ \hbadness=10000\relax%
\normalcolor\reset@font\normalsize%
}%
{% not [H]:
@@ -1234,7 +1267,6 @@
\addtolength{\KFLT@keywrapwidth}{-#1}%
\addtolength{\KFLT@keywrapwidth}{-2em}%
\minipage[t]{\KFLT@keywrapwidth}%
- %
\setlength{\parskip}{\KFLT@keywrapparskip}%
\setlength{\parindent}{\KFLT@keywrapparindent}%
\booltrue{KFLT@keywrap}%
@@ -1246,6 +1278,7 @@
\begin{minipage}[t]{#1}%
\booltrue{KFLT@keywrap}%
\normalcolor\reset@font\normalsize%
+ \hbadness=10000\relax%
#2%
\par%
\unskip\vspace{\smallskipamount}%