cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2021-08-28 13:28:15 +03:00
parent 717033a484
commit 3924525228

View File

@ -1612,7 +1612,7 @@
\def\photobook@captioncell@format#1{% \def\photobook@captioncell@format#1{%
\photobook@captioncell@formatTopAlign{#1}} \photobook@captioncell@formatTopAlign{#1}}
% over/top/center/bottom/under... % over / top / center / bottom / under...
\define@boolkey{captioncell@args}{over}[true]{% \define@boolkey{captioncell@args}{over}[true]{%
\def\photobook@captioncell@format##1{% \def\photobook@captioncell@format##1{%
\vspace{-\dimexpr \cellheight + 2\fboxsep \relax}% \vspace{-\dimexpr \cellheight + 2\fboxsep \relax}%
@ -1634,14 +1634,13 @@
\def\photobook@captioncell@format##1{% \def\photobook@captioncell@format##1{%
\vspace{\dimexpr \cellheight + 2\fboxsep \relax}% \vspace{\dimexpr \cellheight + 2\fboxsep \relax}%
\photobook@captioncell@formatTopAlign{##1}}} \photobook@captioncell@formatTopAlign{##1}}}
% align...
% XXX add more values...
\def\photobook@captioncell@align{} \def\photobook@captioncell@align{}
% XXX for some reason \define@choicekey{..} does not expand macros... % XXX for some reason \define@choicekey{..} does not expand macros...
%\define@choicekey{captioncell@args}{align}{flushleft,center,flushright}{% %\define@choicekey{captioncell@args}{align}{flushleft,center,flushright}{%
\define@key{captioncell@args}{align}{% \define@key{captioncell@args}{align}{%
\def\photobook@captioncell@align{#1}} \def\photobook@captioncell@align{#1}}
% margin...
\def\photobook@captioncell@margin{0pt} \def\photobook@captioncell@margin{0pt}
\define@key{captioncell@args}{margin}{ \define@key{captioncell@args}{margin}{
\def\photobook@captioncell@margin{#1}} \def\photobook@captioncell@margin{#1}}
@ -1653,7 +1652,6 @@
\adjustbox{margin=\photobook@captioncell@margin}{#2}}} \adjustbox{margin=\photobook@captioncell@margin}{#2}}}
%% \DescribeMacro{\vcaptioncell\{..\}} %% \DescribeMacro{\vcaptioncell\{..\}}
% %
%% Vertical caption cell %% Vertical caption cell
@ -1679,6 +1677,14 @@
%% %%
%% See samples for better illustration. %% See samples for better illustration.
%% %%
% helper...
\def\photobook@vcaptioncell@nested#1{%
\captioncell[%
\photobook@vcaptioncell@position,
align=\photobook@vcaptioncell@align,
margin=\photobook@vcaptioncell@margin]{#1}}
% before / left / center / right / after...
\def\photobook@vcaptioncell@position{top} \def\photobook@vcaptioncell@position{top}
\define@boolkey{vcaptioncell@args}{before}[true]{% \define@boolkey{vcaptioncell@args}{before}[true]{%
\def\photobook@vcaptioncell@position{% \def\photobook@vcaptioncell@position{%
@ -1706,7 +1712,7 @@
under% under%
\else% \else%
over\fi}} over\fi}}
% bottomup / topdown...
\newif\ifphotobook@vcaptioncell@bottomup \newif\ifphotobook@vcaptioncell@bottomup
\photobook@vcaptioncell@bottomuptrue \photobook@vcaptioncell@bottomuptrue
\def\photobook@vcaptioncell@orientation{bottomup} \def\photobook@vcaptioncell@orientation{bottomup}
@ -1716,23 +1722,17 @@
\define@boolkey{vcaptioncell@args}{topdown}[true]{% \define@boolkey{vcaptioncell@args}{topdown}[true]{%
\photobook@vcaptioncell@bottomupfalse \photobook@vcaptioncell@bottomupfalse
\def\photobook@vcaptioncell@orientation{topdown}} \def\photobook@vcaptioncell@orientation{topdown}}
% align...
\def\photobook@vcaptioncell@align{} \def\photobook@vcaptioncell@align{}
% XXX for some reason \define@choicekey{..} does not expand macros... % XXX for some reason \define@choicekey{..} does not expand macros...
%\define@choicekey{vcaptioncell@args}{align}{flushleft,center,flushright}{% %\define@choicekey{vcaptioncell@args}{align}{flushleft,center,flushright}{%
\define@key{vcaptioncell@args}{align}{% \define@key{vcaptioncell@args}{align}{%
\def\photobook@vcaptioncell@align{#1}} \def\photobook@vcaptioncell@align{#1}}
% margin...
\def\photobook@vcaptioncell@margin{0pt} \def\photobook@vcaptioncell@margin{0pt}
\define@key{vcaptioncell@args}{margin}{ \define@key{vcaptioncell@args}{margin}{
\def\photobook@vcaptioncell@margin{#1}} \def\photobook@vcaptioncell@margin{#1}}
\def\photobook@vcaptioncell@nested#1{%
\captioncell[%
\photobook@vcaptioncell@position,
align=\photobook@vcaptioncell@align,
margin=\photobook@vcaptioncell@margin]{#1}}
\newcommand\vcaptioncell[2][]{% \newcommand\vcaptioncell[2][]{%
\setkeys{vcaptioncell@args}{left, bottomup, align=flushleft, margin=1pt, #1}% \setkeys{vcaptioncell@args}{left, bottomup, align=flushleft, margin=1pt, #1}%
% %
@ -2136,7 +2136,8 @@
% XXX captions seem not to account for \imageblockoffsettop... % XXX captions seem not to account for \imageblockoffsettop...
%\newcommand\captionsize{\scriptsize} %\newcommand\captionsize{\scriptsize}
\newcommand\captionsize{\fontsize{6.5pt}{8pt}\selectfont} \newcommand\captionsize{%
\fontsize{6.5pt}{8pt}\selectfont}
% XXX move to a better location... (???) % XXX move to a better location... (???)