mirror of
https://github.com/flynx/photobook.git
synced 2025-10-28 18:00:10 +00:00
minor tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
6092c77c97
commit
8507790eba
@ -1853,15 +1853,15 @@
|
||||
% fill...
|
||||
\else\ifKV@imagecell@args@fill%
|
||||
% preload image to get its proportions...
|
||||
\sbox{\photobook@imagebox}{\includegraphics{#3}}
|
||||
\sbox{\photobook@imagebox}{\includegraphics{#3}}%
|
||||
% constrain minimal dimension of image...
|
||||
% NOTE: here we calculate image/cell eccentricity to decide
|
||||
% to fit to width or heigh of cell...
|
||||
% NOTE: did I say that I "love" how LaTeX does basic math??
|
||||
\setlength\photobook@imagecell@imgratio{1pt
|
||||
* \ratio{\wd\photobook@imagebox}{\ht\photobook@imagebox}}
|
||||
\setlength\photobook@imagecell@cellratio{1pt
|
||||
* \ratio{\cellwidth}{\cellheight}}
|
||||
\setlength\photobook@imagecell@imgratio{%
|
||||
1pt * \ratio{\wd\photobook@imagebox}{\ht\photobook@imagebox}}%
|
||||
\setlength\photobook@imagecell@cellratio{%
|
||||
1pt * \ratio{\cellwidth}{\cellheight}}%
|
||||
\ifdim \photobook@imagecell@imgratio < \photobook@imagecell@cellratio%
|
||||
\sbox{\photobook@imagebox}{%
|
||||
\includegraphics[%
|
||||
@ -1875,7 +1875,7 @@
|
||||
keepaspectratio,
|
||||
height=\photobook@imagecell@scale\dimexpr
|
||||
+ \cellheight
|
||||
- ((\photobook@imagecell@clearance) * 2) \relax]{#3}}
|
||||
- ((\photobook@imagecell@clearance) * 2) \relax]{#3}}%
|
||||
\fi\fi\fi%
|
||||
% place image box...
|
||||
% XXX for some odd reason without this the alignment completely breaks...
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user