summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/keyfloat/keyfloat.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/keyfloat/keyfloat.dtx')
-rw-r--r--macros/latex/contrib/keyfloat/keyfloat.dtx69
1 files changed, 28 insertions, 41 deletions
diff --git a/macros/latex/contrib/keyfloat/keyfloat.dtx b/macros/latex/contrib/keyfloat/keyfloat.dtx
index 7be362c421..5baa10608e 100644
--- a/macros/latex/contrib/keyfloat/keyfloat.dtx
+++ b/macros/latex/contrib/keyfloat/keyfloat.dtx
@@ -17,7 +17,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{keyfloat}
-%<package> [2021/06/08 v2.04 Key/value interface for floats and subfloats.]
+%<package> [2021/06/11 v2.05 Key/value interface for floats and subfloats.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -317,7 +317,7 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
%<*package>
% \fi
%
-% \CheckSum{1326}
+% \CheckSum{1320}
%
% \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
@@ -356,6 +356,7 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% \changes{v2.03}{2021/05/28}{Fixed \cs{hbadness} w/ \cs{relax}.}
% \changes{v2.03}{2021/05/28}{2021/05/28}
% \changes{v2.04}{2021/06/08}{2021/06/08}
+% \changes{v2.05}{2021/06/11}{2021/06/11}
@@ -793,6 +794,8 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
%
% \subsection{Keys and values}
%
+% \changes{v2.05}{2021/06/11}{Docs: Fixed braces for multi-word values.}
+%
% \newcommand{\largebullet}{{\Large\textbullet}}
%
% \begin{keytable}[bp]{c={Keys and values — part I},l={tab:keyvals},stretch=1.5}
@@ -805,13 +808,13 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% \textrm{Key} & Sub\tnote{a} & Description & \textrm{Example} \\
% \midrule
% c & \largebullet & An unstarred caption.
-% If empty, creates a figure with a number but no caption. & c={A caption} \\
+% If empty, creates a figure with a number but no caption. & c=\{A caption\} \\
% cstar & \largebullet & A starred caption. Creates a float without a number.
-% If empty, creates a figure with no number or caption. & cstar={No Num} \\
-% sc & \largebullet & The short caption for the \acro{LOF}/\acro{LOT}, even if cstar. & sc={Short cap} \\
+% If empty, creates a figure with no number or caption. & cstar=\{No Num\} \\
+% sc & \largebullet & The short caption for the \acro{LOF}/\acro{LOT}, even if cstar. & sc=\{Short cap\} \\
% cont & \largebullet & Continued float? & cont \\
% l & \largebullet & The label. Enclose in braces if a comma is included.
-% Ignored in unnumbered floats. & l=fig:A name \\
+% Ignored in unnumbered floats. & l=fig:alabel \\
% ap, aup & \largebullet & Artist/author's prefix, such as ``Mr.''\,\tnote{b} & ap=Mr. \\
% af, auf & \largebullet & Artist/author's first name.\tnote{b} & af=First \\
% al, aul & \largebullet & Artist/author's last name.\tnote{b} & al=Last \\
@@ -820,10 +823,10 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% Enclose in braces if a comma is included.
% May need \cs{protect} before macro calls.
% Fully-justified alignment.
-% & t={Paragraphs} \\
-% tc & \largebullet & Additional text, aligned to the center. & tc={Paragraphs} \\
-% tl & \largebullet & Additional text, aligned to the left. & tl={Paragraphs} \\
-% tr & \largebullet & Additional text, aligned to the right. & tr={Paragraphs} \\
+% & t=\{Paragraphs\} \\
+% tc & \largebullet & Additional text, aligned to the center. & tc=\{Paragraphs\} \\
+% tl & \largebullet & Additional text, aligned to the left. & tl=\{Paragraphs\} \\
+% tr & \largebullet & Additional text, aligned to the right. & tr=\{Paragraphs\} \\
% \bottomrule
% \end{tabular}
% \begin{tablenotes}
@@ -843,6 +846,7 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% \end{keytable}
+% \changes{v2.05}{2021/06/11}{Docs: Fixed \optn{r} key.}
% \begin{keytable}{
% c={Keys and values — part II},cont,stretch=1.5}
@@ -866,7 +870,7 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% & w=2in \\
% h & --- & Set the actual height, images only. & w=2in \\
% s & --- & Set the image scale, images only. & s=3 \\
-% a & --- & Set the rotation angle; counter-clockwise degrees. & r=90 \\
+% r & --- & Set the rotation angle; counter-clockwise degrees. & r=90 \\
% f & --- & Selects a loose frame with the current \cs{fboxsep}.
% Only rotated with \cs{keyfig}. & f \\
% ft & --- & Selects a tight frame with no \cs{fboxsep}. Useful for photographs,
@@ -1939,34 +1943,6 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
%
-% \subsection{Patching \pkg{wrapfig}}
-%
-% A minor patch to allow \pkg{wrapfig} to expand its argument for the
-% number of narrow lines.
-% This allows it to be programmed by \pkg{keyfloat}.
-%
-% \cs{WF@wr} will not be defined if using \pkg{lwarp} with \HTML\ output.
-% \changes{v2.04}{2021/06/08}{Patch \pkg{wrapfig}.}
-% \begin{macrocode}
-\RequirePackage{xpatch}
-
-\ifdef{\WF@wr}
-{
- \xpatchcmd{\WF@wr}
- {\gdef}
- {\xdef}
- {}
- {
- \PackageError{keyfloat}
- {Unable to patch wrapfig \protect\WF@wr}
- {Please inform the keyfloat author.}
- }
-}
-{}
-% \end{macrocode}
-
-
-
% \DescribePackage{gettitlestring} Used by \pkg{hyperref} and \pkg{nameref}.
%
% \changes{v0.13}{2017/01/14}{Fix: Expands names in references.}
@@ -3663,8 +3639,19 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% \changes{v2.04}{2021/06/08}{Added \optn{wn} and \optn{wo}.}
% \begin{macrocode}
\KFLT@findwidths%
- \wrapfloat{\KFLT@type}[\KFLT@wn]{\KFLT@wp}[\KFLT@wo]%
- {\KFLT@wrapwidth+2\KFLTlooseframewidth}%
+% \end{macrocode}
+%
+% Expand the arguments for \pkg{wrapfig}:
+% \changes{v2.05}{2021/06/11}{No longer patch \pkg{wrapfig} for expansion.}
+% \begin{macrocode}
+ \edef\next{%
+ \noexpand\wrapfloat%
+ {\KFLT@type}[\KFLT@wn]{\KFLT@wp}[\KFLT@wo]%
+ {\KFLT@wrapwidth+2\KFLTlooseframewidth}%
+ }%
+ \next%
+% \end{macrocode}
+% \begin{macrocode}
\minipage{\KFLT@wrapwidth+2\KFLTlooseframewidth}%
% \end{macrocode}
%