reworked imagecell -- now supports caption cell clearing parent cell + tweaks...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2021-09-14 02:17:04 +03:00
parent d87935f49a
commit a4e7e20acb
2 changed files with 254 additions and 119 deletions

View File

@ -28,6 +28,7 @@
%
% XXX ASAP: \clearcaption support...
% XXX add marks -- \ShowMarks{..}
% XXX add fold support...
% XXX unify API -- see CellContent env...
% XXX make this loadable both as a class and as a package...
% \@ifclassloaded{photobook}{<true>}{<false>}
@ -639,7 +640,7 @@
%%
\edef\imageblockoffsettop{\photobook@imageblockoffsettop}
%% \DescribeMacro{\clearcaption=<ratio>}
%% \DescribeMacro{\clearcaption=<len>}
%
%% Block caption clearance from edge of parent cell.
%%
@ -648,7 +649,7 @@
\newlength\clearcaption
\setlength\clearcaption{0pt}
%% \DescribeMacro{\captioncellspacing=<ratio>}
%% \DescribeMacro{\captioncellspacing=<len>}
%
%% Block caption spacing from parent cell.
%%
@ -659,6 +660,12 @@
\setlength\captioncellspacing{5pt}
%% \DescribeMacro{\captionclearpage=<len>}
%
%%
\def\captionclearpage{\clearimage}
%----------------------------------------------------------------------
%%%% Initialization
@ -1589,6 +1596,7 @@
\end{clipbox*}}
%% \DescribeMacro{\imagecell\{..\}}
%
%% Place image in cell.
@ -1707,19 +1715,19 @@
%% \begin{minipage}{\textwidth}
%% \begin{verbatim}
%%
%% +-----------------+ - - caption cell size
%% . . .
%% +-----------------+ .
%% | | .
%% ..+-----------------+.. . +
%% . |.caption cell .| . |
%% . | . . | . |
%% . | . | . |
%% . | . . | . |
%% . |. .| . |
%% ..+-----------------+.. . +
%% | |
%% +-----------------+
%% +-----------------+ - - caption cell size
%% . . .
%% +-----------------+ .
%% | | .
%% ..+-----------------+.. . +
%% . |.caption cell .| . |
%% . | . . | . |
%% . | . | . |
%% . | . . | . |
%% . |. .| . |
%% ..+-----------------+.. . +
%% | |
%% +-----------------+
%%
%% \end{verbatim}
%% \end{minipage}
@ -1727,6 +1735,11 @@
%% |<caption-cell>| occupies the same space as the image clipped by the
%% containing cell and provides all the cell functionality.
%%
%% If |captionclearparent| is set, the |<caption-cell>| will fit into an
%% intersection between the image area and the parent cell padded by
%% |captionclearparent|.
%%
% XXX do we need captionclearparent to be directional (a-la margin in adjustbox)???
% XXX might be a good idea to split this into two parts:
% - \aligncell{..}
% - \imagecell{caption}{image}
@ -1825,6 +1838,7 @@
\setlength\photobook@imagecell@clearance{#1}}%
% offsettop=<len> / offsetleft=<len>...
% XXX DOC!!!
\newlength\photobook@imagecell@offsettop%
\setlength\photobook@imagecell@offsettop{0pt}%
\define@key{imagecell@args}{offsettop}[0pt]{%
@ -1844,10 +1858,14 @@
\define@choicekey{imagecell@args}{captionalign}{t,c,b}[t]{%
\def\photobook@imagecell@captionalign{#1}}
% XXX add offset support...
% ...i.e. an argument that will shift the image v/h from base position.
% also need to shift the caption box accordingly but still keep it
% within the cell...
% captionclearparent=<len>...
% XXX DOC!!!
\newif\ifphotobook@imagecell@captionclearparent
\newlength\photobook@imagecell@captionclearparent
\define@key{imagecell@args}{captionclearparent}[0pt]{%
\setlength\photobook@imagecell@captionclearparent{#1}%
\photobook@imagecell@captionclearparenttrue}
% XXX can we make this an env???
\newcommand\imagecell[3][]{%
\begingroup%
@ -1896,64 +1914,113 @@
+ \cellheight
- ((\photobook@imagecell@clearance) * 2) \relax]{#3}}%
\fi\fi\fi%
%
\setlength\celloffsetleft{%
\dimexpr
\photobook@imagecell@offsetleft
+ \photobook@imagecell@left \relax}%
\setlength\celloffsettop{%
\dimexpr
\photobook@imagecell@offsettop
+ \photobook@imagecell@top \relax}%
%
%
% place image box...
% XXX for some odd reason without this the alignment completely breaks...
\vspace{0pt}%
\adjustbox{%
%fbox=0.1pt 0pt 0pt,
margin=
{\dimexpr
\photobook@imagecell@offsetleft
+ \photobook@imagecell@left \relax}
0pt 0pt
{\dimexpr
\photobook@imagecell@offsettop
+ \photobook@imagecell@top \relax}}{%
% image....
\usebox\photobook@imagebox%
%
% caption cell...
% XXX make this conditional -- if caption is not empty...
\begingroup%
% setup the cell env...
\setlength\clearance{\photobook@imagecell@clearance}%
% NOTE: this needs the original \cellwidth...
\setlength\celloffsetleft{%
\mindim{%
\wd\photobook@imagebox
}{%
+\cellwidth
-\photobook@imagecell@captionleft
-0.5\dimexpr
+\cellwidth
-\wd\photobook@imagebox \relax}}%
\setlength\cellparentwidth{\cellwidth}%
\setlength\cellparentheight{\cellheight}%
\setlength\cellwidth{%
\mindim{\wd\photobook@imagebox}{\cellwidth}}%
\setlength\cellheight{%
\mindim{\ht\photobook@imagebox}{\cellheight}}%
% NOTE: this needs the new \cellheight...
\setlength\celloffsettop{%
\mindim{%
0pt
}{%
+ 0.5\dimexpr
+\cellheight
-\ht\photobook@imagebox
-\photobook@imagecell@captiontop \relax}}%
%
% place the caption cell...
\smash{\makebox[0pt][l]{%
\hspace{-\celloffsetleft}{%
\setlength\fboxsep{0pt}%
% adjust top if image is taller than cell...
\raisebox{-\celloffsettop}{%
\begin{minipage}[b][\cellheight][\photobook@imagecell@captionalign]{\cellwidth}%
\ignorespaces%
#2%
\end{minipage}}}}}%
\endgroup}%
\smash{\makebox[0pt][l]{%
\adjustbox{%
margin={\celloffsetleft} 0pt 0pt {\celloffsettop},
valign=T}{%
\usebox\photobook@imagebox}}}%
%
%
% prepare for caption cell...
\setlength\cellparentwidth{\cellwidth}%
\setlength\cellparentheight{\cellheight}%
\setlength\cellwidth{%
\mindim{
\wd\photobook@imagebox
+ \mindim{\celloffsetleft}{0pt}
}{
\cellwidth}}%
\setlength\cellheight{%
\mindim{
\ht\photobook@imagebox
+ \mindim{\celloffsettop}{0pt}
}{
\cellheight}}%
\setlength\celloffsetleft{%
\maxdim{\celloffsetleft}{0pt}}%
\setlength\celloffsettop{%
\maxdim{\celloffsettop}{0pt}}%
\setlength\clearance{\photobook@imagecell@clearance}%
% clear parent...
% XXX might be a good idea to put this into a special reusable cell...
\ifphotobook@imagecell@captionclearparent%
% trim vertical...
% XXX this seems overcomplicated...
\setlength\cellheight{%
\mindim{
\cellheight
% trim from both sides....
}{\mindim{
\cellparentheight
- 2\photobook@imagecell@captionclearparent
% trim from bottom...
}{\mindim{
\cellheight
+ \celloffsettop
- \photobook@imagecell@captionclearparent
% trim from top...
}{
\cellparentheight
- \photobook@imagecell@captionclearparent
- \celloffsettop}}}}%
% offset top...
\setlength\celloffsettop{
\maxdim{
\celloffsettop
+ (\photobook@imagecell@captionclearparent - \celloffsettop)
}{
\celloffsettop}}%
% trim horizontal...
% XXX this seems overcomplicated...
\setlength\cellwidth{%
\mindim{
\cellwidth
% trim from both sides....
}{\mindim{
\cellparentwidth
- 2\photobook@imagecell@captionclearparent
% trim from right...
}{\mindim{
\cellwidth
+ \celloffsetleft
- \photobook@imagecell@captionclearparent
% trim from left...
}{
\cellparentwidth
- \photobook@imagecell@captionclearparent
- \celloffsetleft}}}}%
% offset left...
\setlength\celloffsetleft{
\maxdim{
\celloffsetleft
+ (\photobook@imagecell@captionclearparent - \celloffsetleft)
}{
\celloffsetleft}}\fi%
%
%
% place caption box...
\smash{\makebox[0pt][l]{%
\adjustbox{%
%cfbox=gray 0.5pt 0pt 0pt,
margin={\celloffsetleft} 0pt 0pt {\celloffsettop},
minipage=[b][\cellheight][\photobook@imagecell@captionalign]{\cellwidth},
valign=T}{%
\ignorespaces%
#2}}}%
\endgroup}
@ -2024,11 +2091,6 @@
%% in the same cell that takes up space, e.g. text, pictures, ...etc.
%% Captions are mainly suited to play well with image cells.
%%
% XXX make captions clear left/right of page...
% XXX need a way to make caption boxes independent of other cell content...
% ...two ways to do this that come to mind:
% - place cell content into a 0-space cell
% - place captions outside of the actual cell...
% over / top / center / bottom / under...
\define@boolkey{captioncell@args}{over}[true]{%
@ -2120,7 +2182,7 @@
%%
%% See samples for better illustration.
%%
% XXX make captions clear top/bottom of page...
% bottomup / topdown...
\def\photobook@vcaptioncell@orientation{bottomup}
\define@boolkey{vcaptioncell@args}{bottomup}[true]{%
@ -2216,7 +2278,7 @@
%% \DescribeMacro{\captionblockcell\{..\}}
%
%% \EXPERIMENTAL
%% Add caption into a box left/right of current cell.
%%
%% \begin{minipage}{\textwidth}
%% \begin{verbatim}
@ -2246,7 +2308,6 @@
%% \end{minipage}
%%
% XXX make captions clear top/bottom of page...
% XXX add cell spacing...
% XXX need to do a caption block -- a cell to one side of an image to the
% end of the page...
% XXX can we use the normal caption and simply insert a minipage of the
@ -2281,6 +2342,16 @@
\define@key{captionblockcell@args}{clearance}{%
\setlength\photobook@captionblockcell@clearance{#1}}
% XXX should this clear only top/bottom or all sides???
% XXX doc!!
% XXX do we need this here???
\define@boolkey{captionblockcell@args}{constraintoparent}[true]{}
\newlength\photobook@captionblockcell@clearparent
\setlength\photobook@captionblockcell@clearparent{0pt}
\define@key{captionblockcell@args}{clearparent}{%
\setlength\photobook@captionblockcell@clearparent{#1}%
\KV@captionblockcell@args@constraintoparenttrue}
% spacing=<len> (default: \captioncellspacing)
\newlength\photobook@captionblockcell@spacing
\setlength\photobook@captionblockcell@spacing{0pt}
@ -2296,13 +2367,20 @@
% showbox
\define@boolkey{captionblockcell@args}{showbox}[true]{}
\newcommand\photobook@captionblockcell@content[1]{%
\begin{minipage}[t][\cellheight][\photobook@captionblockcell@valign]{\cellwidth}%
\begin{\photobook@captionblockcell@align}%
\ignorespaces%
#1%
\end{\photobook@captionblockcell@align}%
\end{minipage}}
\newcommand\photobook@captionblockcell@content[2][0pt]{%
\hspace{\celloffsetleft}{%
\begin{adjustbox}{
% NOTE: we need to draw the border before we set margins
% to show the original box...
fbox=#1 0pt 0pt,
margin=0pt 0pt 0pt \celloffsettop,
minipage=[t][\cellheight][\photobook@captionblockcell@valign]{\cellwidth},
valign=T}%
\begin{\photobook@captionblockcell@align}%
\ignorespaces%
#2%
\end{\photobook@captionblockcell@align}%
\end{adjustbox}}}
% XXX revise how \clearance is handled...
% XXX do we need top/bottom boxes???
@ -2312,7 +2390,7 @@
% XXX add tweak support...
\newcommand\captionblockcell[2][]{%
% XXX should this be within the group???
\setkeys{captionblockcell@args}{
\setkeys{captionblockcell@args}{%
left,
valign=b,
clearance=\clearcaption,
@ -2322,7 +2400,8 @@
\smash{\makebox[0pt][l]{%
\begingroup%
% setup cell context...
\setlength\clearcaption{\photobook@captionblockcell@clearance}%
\setlength\clearcaption{%
\photobook@captionblockcell@clearance}%
\setlength\photobook@captionblockcell@tmplen{\cellwidth}%
\setlength\cellwidth{%
\ifnum \photobook@captionblockcell@width = 0%
@ -2335,7 +2414,8 @@
- \clearance \relax%
\else%
\photobook@captionblockcell@width\fi}%
\setlength\cellparentwidth{\photobook@captionblockcell@tmplen}%
\setlength\cellparentwidth{%
\photobook@captionblockcell@tmplen}%
\setlength\celloffsetleft{%
\ifKV@captionblockcell@args@left%
\dimexpr
@ -2346,25 +2426,59 @@
\cellparentwidth
+ \photobook@captionblockcell@spacing \relax%
\fi}%
% clear parent...
% XXX do we need this here???
\ifKV@captionblockcell@args@constraintoparent%
% offset top...
\setlength\celloffsettop{%
\mindim{
\photobook@captionblockcell@clearparent - \celloffsettop
}{
\photobook@captionblockcell@clearparent}}%
% trim cell top...
\ifdim \celloffsettop > 0pt%
\setlength\cellheight{%
\cellheight - \celloffsettop}\fi%
% trim cell bottom...
\ifdim \dimexpr
\cellheight
+ \celloffsettop \relax%
> \dimexpr
\cellparentheight
- \photobook@captionblockcell@clearparent \relax%
\setlength\cellheight{%
\dimexpr
\cellparentheight
- \mindim{
\cellheight - \cellparentheight
}{
2\photobook@captionblockcell@clearparent} \relax}\fi%
% do not clear parent...
\else%
\setlength\celloffsettop{0pt}\fi%
%
\hspace{\celloffsetleft}{%
\ifKV@captionblockcell@args@showbox%
\fbox{%
\photobook@captionblockcell@content{#2}}%
\else%
\photobook@captionblockcell@content{#2}\fi}%
% place...
\ifKV@captionblockcell@args@showbox%
\photobook@captionblockcell@content[0.1pt]{#2}%
\else%
\photobook@captionblockcell@content{#2}\fi%
\endgroup}}%
\ignorespaces}
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%%%%% Paper cells
%
%% Paper and page cells are very similar but differ in one aspect -- paper
%% cells represent the paper as indicated by |layoutmode=<layout>| while
%% page cells are always the size of the page block, i.e. |layoutmode=block|.
%%
%% \DescribeEnv{papercell}
%
%% Paper cell.
%%
%% This does not include bleeds and is independent of |layoutmode|.
%% This does not include bleeds.
%%
\newenvironment{papercell}{%
\begin{cell*}{\bleed, \bleed}{\blockwidth}{\blockheight}%
@ -2386,6 +2500,10 @@
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%%%%% Page cells
%
%% Page cells always correspond to the page block size, i.e. |layoutmode=block|
%% regardless of the actual |layoutmode| set currently.
%%
%% \DescribeEnv{pagecell}
%% \DescribeEnv{pagecell*}
@ -2416,8 +2534,10 @@
%% The star version accounts for |\bindingoffset|.
%%
%% Note that |layoutmode|'s other than block will change the paper size
%% but will not affect this.
%% but will not affect this either in size (block size) or in position
%% (top-left).
%%
% XXX should there be a way to position this is layout modes other than block???
\newenvironment{pagecell}{%
\begin{cell*}{\bleed,\bleed}{\pageblockwidth}{\pageblockheight}%
}{%
@ -2455,8 +2575,7 @@
%% \end{verbatim}
%% \end{minipage}
%%
%% Note that |layoutmode|'s other than block will change the paper size
%% but will not affect this.
%% Note that as with |pagecell| this is not affected by |layoutmode|.
%%
\newenvironment{pagebleedcell}{%
\begin{cell*}{0mm, 0mm}{\bleedblockwidth}{\bleedblockheight}%
@ -2550,7 +2669,8 @@
%% >> \begin{spreadtopages} .. \end{spreadtopages}
%% >> \begin{spreadtopages}[<page-count>] .. \end{spreadtopages}
%%
%% |spreadtopages*| creates a named save cell.
%% |spreadtopages*| creates a named save cell only allowing the pages
%% to be placed manually via |\usespreadpage{..}|.
%%
%% >> \begin{spreadtopages*}{<name>} .. \end{spreadtopages*}
%% >> \begin{spreadtopages*}[<page-count>]{<name>} .. \end{spreadtopages*}
@ -2564,7 +2684,7 @@
%% not use a |page| environment, enabling the user to populate the page
%% with other elements.
%%
%% Page numbers a re 1-based.
%% Page numbers are 1-based.
%%
%% Note that the cell created by |spreadtopages*| env is a normal save
%% cell and can be manipulated via |\usecell{..}| and |\usecell*{..}|.
@ -3008,7 +3128,6 @@
\ResettableMacro{ImagePageCaption}[1]{%
\captioncell[under, align=flushright]{%
\captionformat{#1}}}
\ImagePageTemplate{ImagePage}{%
\clearpage%
\begin{page}%
@ -3021,6 +3140,7 @@
{\imageblockheight\pagetextheight}%
\imagecell[fit,
scale=\imagescale,
%captionclearparent=\captionclearpage,
#1]{#2}{#3}%
\end{inlinecell*}%
\end{center}%
@ -3064,7 +3184,6 @@
\ResettableMacro{ImagePageClearCaption}[1]{%
\captioncell[under, align=flushright]{%
\captionformat{#1}}}
\ImagePageTemplate{ImagePageClear}{%
\clearpage%
\begin{page}%
@ -3076,6 +3195,7 @@
scale=\imagescale,
offsettop=\imageoffsettop,
offsetleft=\imageoffsetleft,
captionclearparent=\captionclearpage,
#1]{#2}{#3}%
\end{pagecell*}%
\end{page}}
@ -3138,7 +3258,7 @@
#1]{#2}{#3}}
\ResettableMacro{ImagePageClearLCaption}[1]{%
\captionblockcell[right]{%
\captionblockcell[right, clearance=\captionclearpage]{%
\captionformat{#1}}}
\ImagePageTemplate{ImagePageClearL}{%
\ImagePageClear*[%
@ -3146,7 +3266,7 @@
#1]{#2}{#3}}
\ResettableMacro{ImagePageClearRCaption}[1]{%
\captionblockcell[left]{%
\captionblockcell[left, clearance=\captionclearpage]{%
\captionformat{#1}}}
\ImagePageTemplate{ImagePageClearR}{%
\ImagePageClear*[%
@ -3247,6 +3367,7 @@
scale=\imagescale,
offsettop=\imageoffsettop,
offsetleft=\imageoffsetleft,
captionclearparent=\captionclearpage,
#1]{#2}{#3}%
\end{pagecell}%
\end{page}%
@ -3318,7 +3439,7 @@
#1]{#2}{#3}}
\ResettableMacro{ImagePageFitLCaption}[1]{%
\captionblockcell[right]{%
\captionblockcell[right, clearance=\captionclearpage]{%
\captionformat{#1}}}
\ImagePageTemplate{ImagePageFitL}{%
\ImagePageFit*[%
@ -3326,7 +3447,7 @@
#1]{#2}{#3}}
\ResettableMacro{ImagePageFitRCaption}[1]{%
\captionblockcell[left]{%
\captionblockcell[left, clearance=\captionclearpage]{%
\captionformat{#1}}}
\ImagePageTemplate{ImagePageFitR}{%
\ImagePageFit*[%
@ -3371,7 +3492,6 @@
\ResettableMacro{ImagePageFillCaption}[1]{%
\captioncell[top, align=flushright]{%
\captionformat{#1}}}
\ImagePageTemplate{ImagePageFill}{%
\ImagePageFit*[%
fill,
@ -3412,7 +3532,6 @@
\ResettableMacro{ImageHalfPageLCaption}[1]{%
\captioncell[bottom, align=flushright]{%
\captionformat{#1}}}
\ImagePageTemplate{ImageHalfPageL}{%
\begin{spreadtopages*}[2]{photobook@ImageHalfPageL@cell}%
\imagecell[%
@ -3421,6 +3540,7 @@
scale=\imagescale,
offsettop=\imageoffsettop,
offsetleft=\imageoffsetleft,
captionclearparent=\captionclearpage,
#1]{#2}{#3}%
\end{spreadtopages*}%
%
@ -3463,7 +3583,6 @@
\ResettableMacro{ImageHalfPageRCaption}[1]{%
\captioncell[bottom, align=flushright]{%
\captionformat{#1}}}
\ImagePageTemplate{ImageHalfPageR}{%
\begin{spreadtopages*}[2]{photobook@ImageHalfPageR@cell}%
\imagecell[%
@ -3472,6 +3591,7 @@
scale=\imagescale,
offsettop=\imageoffsettop,
offsetleft=\imageoffsetleft,
captionclearparent=\captionclearpage,
#1]{#2}{#3}%
\end{spreadtopages*}%
%
@ -3520,7 +3640,6 @@
\ResettableMacro{ImageSpreadCaption}[1]{%
\captioncell[under]{%
\captionformat{#1}}}
\ImagePageTemplate{ImageSpread}{%
\cleartoleftpage%
\begin{spreadtopages}[2]%
@ -3530,6 +3649,7 @@
scale=\imagescale,
offsettop=\imageoffsettop,
offsetleft=\imageoffsetleft,
captionclearparent=\captionclearpage,
#1]{#2}{#3}%
\end{spreadtopages}}
@ -3589,7 +3709,7 @@
#1]{#2}{#3}}
\ResettableMacro{ImageSpreadLCaption}[1]{%
\captionblockcell[right]{%
\captionblockcell[right, clearance=\captionclearpage]{%
\captionformat{#1}}}
\ImagePageTemplate{ImageSpreadL}{%
\ImageSpread*[%
@ -3597,7 +3717,7 @@
#1]{#2}{#3}}
\ResettableMacro{ImageSpreadRCaption}[1]{%
\captionblockcell[left]{%
\captionblockcell[left, clearance=\captionclearpage]{%
\captionformat{#1}}}
\ImagePageTemplate{ImageSpreadR}{%
\ImageSpread*[%
@ -3648,6 +3768,7 @@
scale=\imagescale,
offsettop=\imageoffsettop,
offsetleft=\imageoffsetleft,
captionclearparent=\captionclearpage,
#1]{#2}{#3}%
\end{spreadtopages}}
@ -3711,13 +3832,13 @@
\ImageSpreadFit*[bottom, #1]{#2}{#3}}
\ResettableMacro{ImageSpreadFitLCaption}[1]{%
\captionblockcell[right]{%
\captionblockcell[right, clearance=\captionclearpage]{%
\captionformat{#1}}}
\ImagePageTemplate{ImageSpreadFitL}{%
\ImageSpreadFit*[left, #1]{#2}{#3}}
\ResettableMacro{ImageSpreadFitRCaption}[1]{%
\captionblockcell[left]{%
\captionblockcell[left, clearance=\captionclearpage]{%
\captionformat{#1}}}
\ImagePageTemplate{ImageSpreadFitR}{%
\ImageSpreadFit*[right, #1]{#2}{#3}}
@ -3760,7 +3881,6 @@
\ResettableMacro{ImageSpreadFillCaption}[1]{%
\captioncell[bottom, align=flushright]{%
\captionformat{#1}}}
\ImagePageTemplate{ImageSpreadFill}{%
\cleartoleftpage%
\begin{spreadtopages}[2]%
@ -3770,6 +3890,7 @@
scale=\imagescale,
offsettop=\imageoffsettop,
offsetleft=\imageoffsetleft,
captionclearparent=\captionclearpage,
#1]{#2}{#3}%
\end{spreadtopages}}

View File

@ -20,6 +20,7 @@
\setlength\parindent{0pt}
\edef\TestImage{DSC00403-2}
\edef\TestImageV{DSC00403-2vert}
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -30,6 +31,19 @@
\begin{document}
\ImagePageClearR{ImagePageClearR}{\TestImageV}
%\ImagePageClearL[captionclearparent=2cm]{ImagePageClearL}{\TestImage}
\ImagePageClearL[center, captionclearparent=15mm]{ImagePageClearL}{\TestImageV}
\ImagePageClearL[captionclearparent=15mm]{ImagePageClearL}{\TestImageV}
\ImagePageFitL[captionclearparent=15mm]{ImagePageFitL}{\TestImageV}
\ImagePageFitR[captionclearparent=15mm]{ImagePageFitR}{\TestImageV}
\ImagePageFitT[captionclearparent=15mm]{ImagePageFitT}{\TestImage}
\ImagePageFitB[captionclearparent=15mm]{ImagePageFitB}{\TestImage}
\ImagePageFill{ImagePageFill}{\TestImageV}
\ImagePageFill[captionclearparent=15mm]{ImagePageFill}{\TestImageV}
\end{document}