minor tweaks...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2021-09-11 14:52:30 +03:00
parent 6092c77c97
commit 8507790eba

View File

@ -1853,15 +1853,15 @@
% fill... % fill...
\else\ifKV@imagecell@args@fill% \else\ifKV@imagecell@args@fill%
% preload image to get its proportions... % preload image to get its proportions...
\sbox{\photobook@imagebox}{\includegraphics{#3}} \sbox{\photobook@imagebox}{\includegraphics{#3}}%
% constrain minimal dimension of image... % constrain minimal dimension of image...
% NOTE: here we calculate image/cell eccentricity to decide % NOTE: here we calculate image/cell eccentricity to decide
% to fit to width or heigh of cell... % to fit to width or heigh of cell...
% NOTE: did I say that I "love" how LaTeX does basic math?? % NOTE: did I say that I "love" how LaTeX does basic math??
\setlength\photobook@imagecell@imgratio{1pt \setlength\photobook@imagecell@imgratio{%
* \ratio{\wd\photobook@imagebox}{\ht\photobook@imagebox}} 1pt * \ratio{\wd\photobook@imagebox}{\ht\photobook@imagebox}}%
\setlength\photobook@imagecell@cellratio{1pt \setlength\photobook@imagecell@cellratio{%
* \ratio{\cellwidth}{\cellheight}} 1pt * \ratio{\cellwidth}{\cellheight}}%
\ifdim \photobook@imagecell@imgratio < \photobook@imagecell@cellratio% \ifdim \photobook@imagecell@imgratio < \photobook@imagecell@cellratio%
\sbox{\photobook@imagebox}{% \sbox{\photobook@imagebox}{%
\includegraphics[% \includegraphics[%
@ -1875,7 +1875,7 @@
keepaspectratio, keepaspectratio,
height=\photobook@imagecell@scale\dimexpr height=\photobook@imagecell@scale\dimexpr
+ \cellheight + \cellheight
- ((\photobook@imagecell@clearance) * 2) \relax]{#3}} - ((\photobook@imagecell@clearance) * 2) \relax]{#3}}%
\fi\fi\fi% \fi\fi\fi%
% place image box... % place image box...
% XXX for some odd reason without this the alignment completely breaks... % XXX for some odd reason without this the alignment completely breaks...