From bac3f1c65ba83c162797e82221d22669fbe2e946 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 19 Jan 2017 22:08:59 +0000 Subject: keyfloat (19jan17) git-svn-id: svn://tug.org/texlive/trunk@42996 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/keyfloat/keyfloat.sty | 50 +++++++++++++---------- 1 file changed, 29 insertions(+), 21 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 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}% } -- cgit v1.2.3