summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-07-04 21:23:20 +0000
committerKarl Berry <karl@freefriends.org>2021-07-04 21:23:20 +0000
commitf262a7d129a86f7fa0eb16a7106ee426eee88d42 (patch)
treec93c9239fd5c147daf43ac9b0d5fec878956c25a /Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty
parent2026845171ebe3af57cd37c7d03ebf1b2970a62c (diff)
lwarp
git-svn-id: svn://tug.org/texlive/trunk@59834 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty35
1 files changed, 26 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty
index 0e7fdfb75bf..63ffeb1ef23 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty
@@ -52,10 +52,10 @@
\renewcommand*{\KFLT@maybeendfloatrow}{%
\ifnumless{\value{KFLT@thiscol}}{\value{KFLT@numcols}}%
- {}% thiscol < numcols
- {% >=
- \defcounter{KFLT@thiscol}{0}%
- }%
+ {}% thiscol < numcols
+ {% >=
+ \defcounter{KFLT@thiscol}{0}%
+ }%
}%
\renewcommand{\KFLT@trackrows}%
@@ -78,17 +78,34 @@
\LWR@traceinfo{KFLT@onefigureimage}%
\ifthenelse{\NOT\equal{\KFLT@lw}{}}%
{%
- \KFLT@frame{\includegraphics%
- [scale=\KFLT@s,width=\KFLT@imagewidth]{#1}}%
+ \ifdimgreater{\KFLT@h}{0pt}%
+ {%
+ \KFLT@frame{%
+ \includegraphics%
+ [%
+ scale=\KFLT@s,%
+ width=\KFLT@imagewidth,%
+ height=\KFLT@h,%
+ \KFLT@keepaspectratio,%
+ ]{#1}%
+ }%
+ }%
+ {%
+ \KFLT@frame{\includegraphics%
+ [scale=\KFLT@s,width=\KFLT@imagewidth]{#1}}%
+ }%
}%
{% not linewidth
\ifthenelse{\dimtest{\KFLT@w}{>}{0pt}}%
{% width is given
\ifthenelse{\dimtest{\KFLT@h}{>}{0pt}}%
{% w and h
- \KFLT@frame{\includegraphics%
- [scale=\KFLT@s,%
- width=\KFLT@imagewidth,height=\KFLT@h]{#1}}%
+ \KFLT@frame{\includegraphics[%
+ scale=\KFLT@s,%
+ width=\KFLT@imagewidth,%
+ height=\KFLT@h,%
+ \KFLT@keepaspectratio,%
+ ]{#1}}%
}% w and h
{% only w
\KFLT@frame{\includegraphics%