summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-01-19 22:08:59 +0000
committerKarl Berry <karl@freefriends.org>2017-01-19 22:08:59 +0000
commitbac3f1c65ba83c162797e82221d22669fbe2e946 (patch)
tree1fec19184bd1fb866c6c8eef83388145b5ac8ee8 /Master
parent840f20ebce0d764284d183b23976a92095eb662a (diff)
keyfloat (19jan17)
git-svn-id: svn://tug.org/texlive/trunk@42996 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/keyfloat/README2
-rw-r--r--Master/texmf-dist/doc/latex/keyfloat/keyfloat.pdfbin863341 -> 869213 bytes
-rw-r--r--Master/texmf-dist/source/latex/keyfloat/keyfloat.dtx167
-rw-r--r--Master/texmf-dist/tex/latex/keyfloat/keyfloat.sty50
4 files changed, 157 insertions, 62 deletions
diff --git a/Master/texmf-dist/doc/latex/keyfloat/README b/Master/texmf-dist/doc/latex/keyfloat/README
index 99fd3a20ea5..199f41cde1a 100644
--- a/Master/texmf-dist/doc/latex/keyfloat/README
+++ b/Master/texmf-dist/doc/latex/keyfloat/README
@@ -1,7 +1,7 @@
The LaTeX keyfloat package
Provides a key/value interface for generating floats.
-v0.12 — 2016/12/09
+v0.13 — 2017/01/18
Copyright 2016 Brian Dunn — www.BDTechConcepts.com
LaTeX Project Public License, version 1.3
diff --git a/Master/texmf-dist/doc/latex/keyfloat/keyfloat.pdf b/Master/texmf-dist/doc/latex/keyfloat/keyfloat.pdf
index 36b1500e5c0..67492e2783a 100644
--- a/Master/texmf-dist/doc/latex/keyfloat/keyfloat.pdf
+++ b/Master/texmf-dist/doc/latex/keyfloat/keyfloat.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/keyfloat/keyfloat.dtx b/Master/texmf-dist/source/latex/keyfloat/keyfloat.dtx
index a9455f2ca39..848e2bd37f9 100644
--- a/Master/texmf-dist/source/latex/keyfloat/keyfloat.dtx
+++ b/Master/texmf-dist/source/latex/keyfloat/keyfloat.dtx
@@ -17,7 +17,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{keyfloat}
-%<package> [2016/12/09 v0.12 Key/value interface for floats and the subcaption package.]
+%<package> [2017/01/18 v0.13 Key/value interface for floats and the subcaption package.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -316,7 +316,7 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
%<*package>
% \fi
%
-% \CheckSum{1013}
+% \CheckSum{1021}
%
% \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
@@ -339,6 +339,10 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% \changes{v0.12}{2016/12/09}{\ 2016/12/09}
% \changes{v0.12}{2016/12/02}{Docs: Loading keyfloat.}
% \changes{v0.12}{2016/12/05}{Docs: Improved index.}
+% \changes{v0.13}{2017/01/18}{\ 2017/01/18}
+% \changes{v0.13}{2017/01/12}{Docs: Other Settings.}
+
+
@@ -518,10 +522,12 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% environment.
% \item Subfloats may be generated by placing them inside a \env{keysubfigs}
% or \env{keysubtabs} environment.
-% \item The number of columns is specified, and extra
-% floats are placed onto additional rows.
+% \item Dynamic layout: The number of columns is specified. Extra
+% floats are placed onto additional rows as needed, with the final row
+% adjusted to compensate for leftovers.
% \item Floats may be placed [H]ere.
% \item Floats may be placed in the [M]argin.
+% \item Floats may be placed with text [W]rapped around them.
% \item Floats may be starred to span two columns.
% \item Continued floats may be used to repeat the previous float number.
% \item A figure may contain an image, with additional sizing, rotation, and a frame.
@@ -544,7 +550,7 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
%
% Blue margin tags are used to help quickly find information, and often
% \margintag{margin tags}
-% indicate the destination of index entires.
+% indicate the destination of index entries.
%
% Several warnings are noted in the text. Watch out for these special cases.
% \watchout[warnings]
@@ -625,7 +631,7 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% \DescribeEnv{keysubtabs} * \oarg{loc} \marg{numcols} \marg{keys} \\
% A group of subtables typeset in rows.
% May not be nested.
-% See \cref{ex:keysubfigs}.
+% See \cref{ex:keysubtabs}.
%
% \DescribeEnv{marginfigure} \oarg{offset} \\
% A figure placed into the margin, with an optional vertical offset.
@@ -668,13 +674,13 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% container environments may have their own star and [loc] options.
%
%
+% \clearpage
+%
%
%
-% \clearpage
%
% \subsection{Keys and Values}
%
-%
% \newcommand{\largebullet}{{\Large\textbullet}}
%
% \begin{keytable}[bp]{c={Keys and Values — Part I},l={tab:keyvals},stretch=1.5}
@@ -838,7 +844,29 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% the capitalized key allows \LaTeX\ to try to find the best location.
% The default is |O|.
% \end{keytable}
-
+%
+%
+% \clearpage
+%
+% \subsection{Other Settings}
+%
+% \DescribeMacro{\KFLTtightframe} \marg{contents} Frames the contents without separation.
+%
+% \DescribeMacro{\KFLTlooseframe} \marg{contents} Frames the contents with separation.
+%
+% These may be used to re-define how contents are framed. The default
+% is a simple \cs{fbox}.
+%
+% \DescribeLength{\KFLTtightframewidth} Combined width of the frame and separation
+% for each of tight and loose frames. These settings should be adjusted when
+% changing the frame width and/or separation. The value should be equivalent
+% to \cs{fboxwidth} plus \cs{fboxsep}.
+% \DescribeLength{\KFLTlooseframewidth}
+%
+% \DescribeLength{\KFLTimageboxwidth} The computed width of the image.
+% Useful to enclose an mdframed environment to restrict its width.
+% See \cref{ex:customframe}.
+%
%
%
%
@@ -1004,8 +1032,11 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% \margintag{frame rotation}\index{frame>rotation}
% \index{troubleshooting>rotating>frame}
%
+% \clearpage
+%
% \begin{dtxexample}[\Cref{fig:here}]{Located [H]ere}
% \keytab[H]{c={A table [H]},l=fig:here}{\testtable}
+% \keyfig[H]{f,w=1in,c={A keyfig [H]}}{image}
% \end{dtxexample}
%
% \Cref{fig:here} is to be placed ``[H]ere'', and therefore may appear
@@ -1015,6 +1046,7 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% Place a \cs{clearpage} before or after to re-sync, if necessary.
%
%
+% \clearpage
%
% \begin{dtxexample}[See fig: ``A starred caption''.]{Unnumbered float}
% \keyfig[H]{f,cstar={A starred caption}}{image}
@@ -1042,6 +1074,8 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% unnumbered entry in the List of Figures.
%
%
+% \clearpage
+%
% \begin{dtxexample}
% [See fig: ``Optional text which is not a caption.'']
% {An unnumbered in-text image}
@@ -1056,6 +1090,8 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% Also see \cref{ex:keyparbox}.
%
%
+% \clearpage
+%
% \begin{dtxexample}[\Cref{fig:nexttoparbox}, and the box to its left.]
% {A box without a caption.\label{ex:keyparbox}}
% \begin{keyfloats}{2}
@@ -1065,7 +1101,7 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% }{Some contents.}
% \keyfig{c=Next to a \cs{keyparbox},l=fig:nexttoparbox}{image}
% \end{keyfloats}
-% \keyparbox[H]{f,lw=.5}{A \cs{keyparbox} [H], outside the floatrow.}
+% \keyparbox[H]{f,lw=.5}{A \cs{keyparbox} [H], outside the row.}
% \end{dtxexample}
%
% A \cs{keyparbox} is a \cs{keyfigbox} with |cstar={}|,
@@ -1186,6 +1222,14 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% \hspace*{2em}|\begin{keysubfigs}*{2}{|key/vals \dots|}|
%
%
+% \begin{dtxexample}[\Cref{tab:subtabs}]{Subtables [H] — \env{keysubtabs} environment\label{ex:keysubtabs}}
+% \begin{keysubtabs}[H]{2}{c=Subtables [H],l=tab:subtabs}
+% \keytab{c={First subtable},l=fig:firstsubtab}{\testtable}
+% \keytab{c={Second subtable},l=fig:secondsubtab}{\testwidetable}
+% \end{keysubtabs}
+% \end{dtxexample}
+%
+%
%
% \clearpage
%
@@ -1314,7 +1358,7 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% t=Text text text text text text text text text
% }{The contents.}
% \lipsum[1]
-% \keyparbox[W]{w=.75in}{\centering A \cs{keyparbox.}}
+% \keyparbox[W]{w=1in}{A \cs{keyparbox}[W] and some more text.}
% \lipsum[2]
% \end{dtxexample}
%
@@ -1344,9 +1388,11 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% \begin{dtxexample}[\Cref{fig:customframe,fig:customlooseframe}]
% {Custom frames with \pkg{mdframed}\label{ex:customframe}}
% \renewcommand{\KFLTtightframe}[1]{%
+% \begin{minipage}{\KFLTimageboxwidth}
% \begin{mdtightframe}%
% #1
% \end{mdtightframe}%
+% \end{minipage}
% }
% \setlength{\KFLTtightframewidth}{1pt}
%
@@ -1357,7 +1403,7 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% }
% \setlength{\KFLTlooseframewidth}{4pt}
%
-% \keyfig{ft,c=Custom-framed image,l=fig:customframe}{image}
+% \keyfig{ft,c=Custom-framed image,l=fig:customframe,r=90}{image}
% \keyfigbox{f,c=Custom loosely-framed box,
% l=fig:customlooseframe}{A loosely-framed box.}
% \end{dtxexample}
@@ -1369,6 +1415,10 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% \watchout[\pkg{mdframed} width]
% even if the left/right margins are explicitly set, which
% causes extra vertical space when rotated.
+% Because of this, the framed object is enclosed inside a minipage
+% whose width is precomputed based on the object itself, then
+% set in \cs{KFLTimageboxwidth}. Any shadow may fall outside this
+% box.
% \index{troubleshooting>rotating>extra space}
% \index{troubleshooting>mdframed}
%
@@ -1436,7 +1486,7 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% \end{dtxexample}
%
%
-% \begin{dtxexample}[\Cref{fig:artistpar}]{Artist's name — arbitary contents}
+% \begin{dtxexample}[\Cref{fig:artistpar}]{Artist's name — arbitrary contents}
% \tdnameright
% \begin{keyfigure}{f,ap=Mr.,al=Last,
% c=Artist's name — arbitrary contents,l=fig:artistpar}
@@ -1454,7 +1504,6 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% may be used to align the name.
%
%
-% \clearpage
%
% \begin{dtxexample}[\Cref{fig:artistcollection}]{Subfloats with an artist}
% \begin{keysubfigs}{2}{
@@ -1622,7 +1671,7 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% \begin{macrocode}
\RequirePackage{calc}
% \end{macrocode}
-% \DescribePackage{rotating} Provides rotation via then \env{turn} environment:
+% \DescribePackage{rotating} Provides rotation via the \env{turn} environment:
% \begin{macrocode}
\RequirePackage{rotating}
% \end{macrocode}
@@ -1634,6 +1683,35 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% \begin{macrocode}
\RequirePackage{wrapfig}
% \end{macrocode}
+%
+%
+% Package error if floatrow was loaded:
+%
+% \changes{v0.13}{2017/01/12}{Error if \pkg{floatrow} was loaded.}
+%
+% \begin{macrocode}
+\@ifpackageloaded{floatrow}
+{
+\PackageError{keyfloat}
+{The keyfloat conflicts with the floatrow package.
+Remove floatrow to use keyfloat.}
+{Keyfloat uses the caption and subcaption packages to
+provide similar functionality to floatrow.}
+}
+{}
+% \end{macrocode}
+
+
+
+%
+% \DescribePackage{gettitlestring} Used by \pkg{hyperref} and \pkg{nameref}.
+%
+% \changes{v0.13}{2017/01/14}{Fix: Expands names in references.}
+%
+% Expand names used in titles:
+% \begin{macrocode}
+\PassOptionsToPackage{expand}{gettitlestring}
+% \end{macrocode}
% Rows of floats are created by a simple \env{minipage} environment,
@@ -2376,12 +2454,12 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}%
% Figures the width of the contents of \cs{KFLT@envbox} plus the frame:
% \begin{macrocode}
\newcommand{\KFLT@findenvboxwidth}{%
-\settowidth{\KFLT@envboxwidth}{\usebox{\KFLT@envbox}}%
+\settowidth{\KFLTimageboxwidth}{\usebox{\KFLT@envbox}}%
\ifthenelse{\boolean{KFLT@ft}}%
-{\addtolength{\KFLT@envboxwidth}{2\KFLTtightframewidth}}%
+{\addtolength{\KFLTimageboxwidth}{2\KFLTtightframewidth}}%
{% not tightframe
\ifthenelse{\boolean{KFLT@f}}%
-{\addtolength{\KFLT@envboxwidth}{2\KFLTlooseframewidth}}%
+{\addtolength{\KFLTimageboxwidth}{2\KFLTlooseframewidth}}%
{}% no frame
}% not looseframe
}
@@ -2457,9 +2535,9 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
% Encapsulate the frame in case the
% custom frame commands used pars:
% \begin{macrocode}
-\begin{minipage}{\KFLT@envboxwidth}%
+% \begin{minipage}{\KFLTimageboxwidth}%
\KFLT@frame{\usebox{\KFLT@envbox}}%
-\end{minipage}%
+% \end{minipage}%
\unskip%
\end{turn}%
}
@@ -2798,6 +2876,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
% \end{macrocode}
% Add some space, then create a full-width minipage to contain the text:
% \begin{macrocode}
+\unskip%
\addvspace{2ex}%
\begin{minipage}{\linewidth}%
% \end{macrocode}
@@ -2926,12 +3005,22 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
% \end{macro}
+% \DescribeLength{\KFLTimageboxwidth} The computed width of the object.
+%
+% \changes{v0.13}{2017/01/12}{\cs{KFLTimageboxwidth}: Added.}
+%
+% This may be used as the width parameter of a minipage to encase the object.
+%
+% \begin{macrocode}
+\newlength{\KFLTimageboxwidth}
+% \end{macrocode}
+
+
% \begin{environment}{KFLT@boxinner}
%
% Typeset the contents in a width which depends on the keys.
% \begin{macrocode}
\newsavebox{\KFLT@envbox}
-\newlength{\KFLT@envboxwidth}
\NewDocumentEnvironment{KFLT@boxinner}{}
{% keyboxinner
@@ -3028,7 +3117,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
% \begin{macrocode}
\ifthenelse{\equal{#2}{W}}%
% \end{macrocode}
-% Place [W], so create a wrapfloat:
+% Place [W], so create a wrapfloat from the \pkg{wrapfig} package:
% \begin{macrocode}
{% [W]
% \end{macrocode}
@@ -3040,11 +3129,10 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
\csname wrap\KFLT@type\endcsname{\KFLT@wp}%
{\KFLT@imagewidth+2\KFLTlooseframewidth}%
% \end{macrocode}
-% The interior contents default to the full linewidth.
-% This may be changed by a fixed width when
-% \cs{KFLT@findwidths} is about to be done again.
+% Change the interior image to the discovered fixed width.
% \begin{macrocode}
-\renewcommand{\KFLT@lw}{1}%
+\renewcommand{\KFLT@lw}{}%
+\renewcommand{\KFLT@w}{\KFLT@imagewidth}%
}% [W]
{% not [W]
%
@@ -3067,6 +3155,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
% Place [H], so create an inline minipage:
% \begin{macrocode}
{% [H]
+\par\addvspace{\baselineskip}%
\noindent\minipage{\linewidth}%
\captionsetup{type=\KFLT@type}%
}% [H]
@@ -3097,10 +3186,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
% \end{macrocode}
% Typeset the contents:
% \begin{macrocode}
-\begin{center}%
-\unskip%
-\minipage{\linewidth}%
-\centering%
+\center\unskip%
}% boxouter
% \end{macrocode}
%
@@ -3108,9 +3194,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
%
% \begin{macrocode}
{% endboxouter
-\endminipage%
-\end{center}%
-\unskip\addvspace{2ex}%
+\endcenter\unskip%
% \end{macrocode}
% Optionally print artist's name and additional text:
% \begin{macrocode}
@@ -3158,6 +3242,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
\ifthenelse{\equal{#2}{H}}%
{%
\endminipage% [H]
+\par\addvspace{\baselineskip}%
}%
{% not [H]
\IfBooleanTF{#1}% starred float?
@@ -3204,7 +3289,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
% \subsection{The \cs{keyfig} Macro}
-% \begin{macro}{\keyfig} * \oarg{loc} \marg{\keyvalsarg} \marg{image filename}
+% \begin{macro}{\keyfig} * \oarg{2: loc} \marg{3: \keyvalsarg} \marg{4: image filename}
%
% A user-level macro to generate a figure with an image.
% This may be used by itself, or inside a \env{keyfloats} or
@@ -3217,7 +3302,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
\KFLT@trackrows%
\KFLT@boxkeys{#3}{figure}{lof}%
% \end{macrocode}
-% After setting default values, overridge with the filename:
+% After setting default values, override with the filename:
% \begin{macrocode}
\renewcommand{\KFLT@i}{#4}%
\begingroup%
@@ -3528,8 +3613,7 @@ environment inside another, or inside a keyfloats.}%
\setboolean{KFLT@subgrpcstar}{false}%
\renewcommand{\KFLT@subgrpsc}{}%
\setboolean{KFLT@subgrpscgiven}{false}%
-\renewcommand{\KFLT@subgrptype}{figure}%
-\renewcommand{\KFLT@subgrplisttype}{lof}%
+\KFLT@setsubgrpfigure%
\renewcommand{\KFLT@subgrpl}{}%
\renewcommand{\KFLT@subgrpap}{}%
\renewcommand{\KFLT@subgrpaf}{}%
@@ -3549,6 +3633,8 @@ environment inside another, or inside a keyfloats.}%
% \begin{macro}{\KFLT@subfloats} \marg{starred?} \marg{loc} \marg{cols} \marg{\keyvalsarg}
%
+% \changes{v0.13}{2017/01/16}{Fix: Subfloat type selection.}
+%
% Start a subfloat environment
% \begin{macrocode}
\NewDocumentCommand{\KFLT@subfloats}{m m m +m}
@@ -3581,7 +3667,7 @@ environment inside another, or inside a keyfloats.}%
% \begin{macrocode}
{%
\IfBooleanTF{#1}%
-{\begin{\KFLT@type*}[#2]}{\begin{\KFLT@type}[#2]}%
+{\begin{\KFLT@subgrptype*}[#2]}{\begin{\KFLT@subgrptype}[#2]}%
}%
% \end{macrocode}
% Set the caption type:
@@ -3594,7 +3680,7 @@ environment inside another, or inside a keyfloats.}%
% \end{macrocode}
% Center the contents:
% \begin{macrocode}
-\centering%
+\center\unskip%
% \end{macrocode}
% If this is a table, place the caption above the contents:
% \begin{macrocode}
@@ -3625,6 +3711,7 @@ environment inside another, or inside a keyfloats.}%
% End the group containing the subfloats:
% \begin{macrocode}
\endgroup%
+\unskip\endcenter%
% \end{macrocode}
% A little extra space at the bottom:
% \begin{macrocode}
@@ -3644,7 +3731,7 @@ environment inside another, or inside a keyfloats.}%
{\end{minipage}\bigbreak}% was [H]
{% not [H]:
\IfBooleanTF{#1}% starred?
-{\end{\KFLT@type*}}{\end{\KFLT@type}}%
+{\end{\KFLT@subgrptype*}}{\end{\KFLT@subgrptype}}%
}% not [H]
% \end{macrocode}
% Unnest the environment:
diff --git a/Master/texmf-dist/tex/latex/keyfloat/keyfloat.sty b/Master/texmf-dist/tex/latex/keyfloat/keyfloat.sty
index 6a720f7672d..533b436555f 100644
--- a/Master/texmf-dist/tex/latex/keyfloat/keyfloat.sty
+++ b/Master/texmf-dist/tex/latex/keyfloat/keyfloat.sty
@@ -19,8 +19,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{keyfloat}
- [2016/12/09 v0.12 Key/value interface for floats and the subcaption package.]
-
+ [2017/01/18 v0.13 Key/value interface for floats and the subcaption package.]
@@ -38,6 +37,17 @@
\RequirePackage{rotating}
\RequirePackage{placeins}
\RequirePackage{wrapfig}
+\@ifpackageloaded{floatrow}
+{
+\PackageError{keyfloat}
+{The keyfloat conflicts with the floatrow package.
+Remove floatrow to use keyfloat.}
+{Keyfloat uses the caption and subcaption packages to
+provide similar functionality to floatrow.}
+}
+{}
+
+\PassOptionsToPackage{expand}{gettitlestring}
@@ -269,12 +279,12 @@
}% not looseframe
}
\newcommand{\KFLT@findenvboxwidth}{%
-\settowidth{\KFLT@envboxwidth}{\usebox{\KFLT@envbox}}%
+\settowidth{\KFLTimageboxwidth}{\usebox{\KFLT@envbox}}%
\ifthenelse{\boolean{KFLT@ft}}%
-{\addtolength{\KFLT@envboxwidth}{2\KFLTtightframewidth}}%
+{\addtolength{\KFLTimageboxwidth}{2\KFLTtightframewidth}}%
{% not tightframe
\ifthenelse{\boolean{KFLT@f}}%
-{\addtolength{\KFLT@envboxwidth}{2\KFLTlooseframewidth}}%
+{\addtolength{\KFLTimageboxwidth}{2\KFLTlooseframewidth}}%
{}% no frame
}% not looseframe
}
@@ -310,9 +320,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
\unskip%
\KFLT@findenvboxwidth%
\begin{turn}{\KFLT@r}%
-\begin{minipage}{\KFLT@envboxwidth}%
\KFLT@frame{\usebox{\KFLT@envbox}}%
-\end{minipage}%
\unskip%
\end{turn}%
}
@@ -475,6 +483,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
{}% no text
{% text to add
{% local
+\unskip%
\addvspace{2ex}%
\begin{minipage}{\linewidth}%
\csname KFLT@#1textalign\endcsname%
@@ -526,8 +535,9 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
}% KFLT@addartisttext
}% tocdata not loaded
+\newlength{\KFLTimageboxwidth}
+
\newsavebox{\KFLT@envbox}
-\newlength{\KFLT@envboxwidth}
\NewDocumentEnvironment{KFLT@boxinner}{}
{% keyboxinner
@@ -569,7 +579,8 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
\KFLT@findwidths%
\csname wrap\KFLT@type\endcsname{\KFLT@wp}%
{\KFLT@imagewidth+2\KFLTlooseframewidth}%
-\renewcommand{\KFLT@lw}{1}%
+\renewcommand{\KFLT@lw}{}%
+\renewcommand{\KFLT@w}{\KFLT@imagewidth}%
}% [W]
{% not [W]
\ifthenelse{\equal{#2}{M}}%
@@ -580,6 +591,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
{% not [M}
\ifthenelse{\equal{#2}{H}}%
{% [H]
+\par\addvspace{\baselineskip}%
\noindent\minipage{\linewidth}%
\captionsetup{type=\KFLT@type}%
}% [H]
@@ -594,15 +606,10 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
\ifthenelse{\boolean{KFLT@cont}}{\ContinuedFloat}{}%
\KFLT@findwidths%
\KFLT@captioniftype{table}{}%
-\begin{center}%
-\unskip%
-\minipage{\linewidth}%
-\centering%
+\center\unskip%
}% boxouter
{% endboxouter
-\endminipage%
-\end{center}%
-\unskip\addvspace{2ex}%
+\endcenter\unskip%
\KFLT@addartisttext{}%
\KFLT@captioniftype{figure}{}%
\ifthenelse{\boolean{KFLT@inkeysubfloats}}%
@@ -624,6 +631,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
\ifthenelse{\equal{#2}{H}}%
{%
\endminipage% [H]
+\par\addvspace{\baselineskip}%
}%
{% not [H]
\IfBooleanTF{#1}% starred float?
@@ -810,8 +818,7 @@ environment inside another, or inside a keyfloats.}%
\setboolean{KFLT@subgrpcstar}{false}%
\renewcommand{\KFLT@subgrpsc}{}%
\setboolean{KFLT@subgrpscgiven}{false}%
-\renewcommand{\KFLT@subgrptype}{figure}%
-\renewcommand{\KFLT@subgrplisttype}{lof}%
+\KFLT@setsubgrpfigure%
\renewcommand{\KFLT@subgrpl}{}%
\renewcommand{\KFLT@subgrpap}{}%
\renewcommand{\KFLT@subgrpaf}{}%
@@ -835,11 +842,11 @@ environment inside another, or inside a keyfloats.}%
}%
{%
\IfBooleanTF{#1}%
-{\begin{\KFLT@type*}[#2]}{\begin{\KFLT@type}[#2]}%
+{\begin{\KFLT@subgrptype*}[#2]}{\begin{\KFLT@subgrptype}[#2]}%
}%
\captionsetup*{type=\KFLT@subgrptype}%
\ifthenelse{\boolean{KFLT@subgrpcont}}{\ContinuedFloat}{}%
-\centering%
+\center\unskip%
\KFLT@captioniftype{table}{subgrp}%
\defcounter{KFLT@numcols}{#3}%
\defcounter{KFLT@thiscol}{0}%
@@ -848,6 +855,7 @@ environment inside another, or inside a keyfloats.}%
\newcommand*{\KFLT@endsubfloats}[2]{%
\endgroup%
+\unskip\endcenter%
\par\addvspace{\bigskipamount}%
\KFLT@addartisttext{subgrp}%
\KFLT@captioniftype{figure}{subgrp}%
@@ -855,7 +863,7 @@ environment inside another, or inside a keyfloats.}%
{\end{minipage}\bigbreak}% was [H]
{% not [H]:
\IfBooleanTF{#1}% starred?
-{\end{\KFLT@type*}}{\end{\KFLT@type}}%
+{\end{\KFLT@subgrptype*}}{\end{\KFLT@subgrptype}}%
}% not [H]
\setboolean{KFLT@inkeysubfloats}{false}%
}