mirror of
https://github.com/flynx/photobook.git
synced 2025-12-24 20:21:58 +00:00
Merge branch 'main' of github.com:flynx/photobook into main
This commit is contained in:
commit
8af092cc1d
365
photobook.cls
365
photobook.cls
@ -26,6 +26,9 @@
|
|||||||
%
|
%
|
||||||
%
|
%
|
||||||
%
|
%
|
||||||
|
% XXX revise \clearcaption / \captionclearpage...
|
||||||
|
% XXX add marks -- \ShowMarks{..}
|
||||||
|
% XXX add fold support...
|
||||||
% XXX unify API -- see CellContent env...
|
% XXX unify API -- see CellContent env...
|
||||||
% XXX make this loadable both as a class and as a package...
|
% XXX make this loadable both as a class and as a package...
|
||||||
% \@ifclassloaded{photobook}{<true>}{<false>}
|
% \@ifclassloaded{photobook}{<true>}{<false>}
|
||||||
@ -637,16 +640,17 @@
|
|||||||
%%
|
%%
|
||||||
\edef\imageblockoffsettop{\photobook@imageblockoffsettop}
|
\edef\imageblockoffsettop{\photobook@imageblockoffsettop}
|
||||||
|
|
||||||
%% \DescribeMacro{\clearcaption=<ratio>}
|
%% \DescribeMacro{\clearcaption=<len>}
|
||||||
%
|
%
|
||||||
%% Block caption clearance from edge of parent cell.
|
%% Block caption clearance from edge of parent cell.
|
||||||
%%
|
%%
|
||||||
%% Used as default by |\captionblockcell{..}|
|
%% Used as default by |\captionblockcell{..}|
|
||||||
%%
|
%%
|
||||||
|
% XXX do we need this???
|
||||||
\newlength\clearcaption
|
\newlength\clearcaption
|
||||||
\setlength\clearcaption{0pt}
|
\setlength\clearcaption{0pt}
|
||||||
|
|
||||||
%% \DescribeMacro{\captioncellspacing=<ratio>}
|
%% \DescribeMacro{\captioncellspacing=<len>}
|
||||||
%
|
%
|
||||||
%% Block caption spacing from parent cell.
|
%% Block caption spacing from parent cell.
|
||||||
%%
|
%%
|
||||||
@ -657,6 +661,12 @@
|
|||||||
\setlength\captioncellspacing{5pt}
|
\setlength\captioncellspacing{5pt}
|
||||||
|
|
||||||
|
|
||||||
|
%% \DescribeMacro{\captionclearpage=<len>}
|
||||||
|
%
|
||||||
|
%%
|
||||||
|
\def\captionclearpage{\clearimage}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%----------------------------------------------------------------------
|
%----------------------------------------------------------------------
|
||||||
%%%% Initialization
|
%%%% Initialization
|
||||||
@ -1587,6 +1597,7 @@
|
|||||||
\end{clipbox*}}
|
\end{clipbox*}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%% \DescribeMacro{\imagecell\{..\}}
|
%% \DescribeMacro{\imagecell\{..\}}
|
||||||
%
|
%
|
||||||
%% Place image in cell.
|
%% Place image in cell.
|
||||||
@ -1705,19 +1716,19 @@
|
|||||||
%% \begin{minipage}{\textwidth}
|
%% \begin{minipage}{\textwidth}
|
||||||
%% \begin{verbatim}
|
%% \begin{verbatim}
|
||||||
%%
|
%%
|
||||||
%% +-----------------+ - - caption cell size
|
%% +-----------------+ - - caption cell size
|
||||||
%% . . .
|
%% . . .
|
||||||
%% +-----------------+ .
|
%% +-----------------+ .
|
||||||
%% | | .
|
%% | | .
|
||||||
%% ..+-----------------+.. . +
|
%% ..+-----------------+.. . +
|
||||||
%% . |.caption cell .| . |
|
%% . |.caption cell .| . |
|
||||||
%% . | . . | . |
|
%% . | . . | . |
|
||||||
%% . | . | . |
|
%% . | . | . |
|
||||||
%% . | . . | . |
|
%% . | . . | . |
|
||||||
%% . |. .| . |
|
%% . |. .| . |
|
||||||
%% ..+-----------------+.. . +
|
%% ..+-----------------+.. . +
|
||||||
%% | |
|
%% | |
|
||||||
%% +-----------------+
|
%% +-----------------+
|
||||||
%%
|
%%
|
||||||
%% \end{verbatim}
|
%% \end{verbatim}
|
||||||
%% \end{minipage}
|
%% \end{minipage}
|
||||||
@ -1725,6 +1736,11 @@
|
|||||||
%% |<caption-cell>| occupies the same space as the image clipped by the
|
%% |<caption-cell>| occupies the same space as the image clipped by the
|
||||||
%% containing cell and provides all the cell functionality.
|
%% 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:
|
% XXX might be a good idea to split this into two parts:
|
||||||
% - \aligncell{..}
|
% - \aligncell{..}
|
||||||
% - \imagecell{caption}{image}
|
% - \imagecell{caption}{image}
|
||||||
@ -1823,6 +1839,7 @@
|
|||||||
\setlength\photobook@imagecell@clearance{#1}}%
|
\setlength\photobook@imagecell@clearance{#1}}%
|
||||||
|
|
||||||
% offsettop=<len> / offsetleft=<len>...
|
% offsettop=<len> / offsetleft=<len>...
|
||||||
|
% XXX DOC!!!
|
||||||
\newlength\photobook@imagecell@offsettop%
|
\newlength\photobook@imagecell@offsettop%
|
||||||
\setlength\photobook@imagecell@offsettop{0pt}%
|
\setlength\photobook@imagecell@offsettop{0pt}%
|
||||||
\define@key{imagecell@args}{offsettop}[0pt]{%
|
\define@key{imagecell@args}{offsettop}[0pt]{%
|
||||||
@ -1842,10 +1859,14 @@
|
|||||||
\define@choicekey{imagecell@args}{captionalign}{t,c,b}[t]{%
|
\define@choicekey{imagecell@args}{captionalign}{t,c,b}[t]{%
|
||||||
\def\photobook@imagecell@captionalign{#1}}
|
\def\photobook@imagecell@captionalign{#1}}
|
||||||
|
|
||||||
% XXX add offset support...
|
% captionclearparent=<len>...
|
||||||
% ...i.e. an argument that will shift the image v/h from base position.
|
% XXX DOC!!!
|
||||||
% also need to shift the caption box accordingly but still keep it
|
\newif\ifphotobook@imagecell@captionclearparent
|
||||||
% within the cell...
|
\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???
|
% XXX can we make this an env???
|
||||||
\newcommand\imagecell[3][]{%
|
\newcommand\imagecell[3][]{%
|
||||||
\begingroup%
|
\begingroup%
|
||||||
@ -1894,64 +1915,113 @@
|
|||||||
+ \cellheight
|
+ \cellheight
|
||||||
- ((\photobook@imagecell@clearance) * 2) \relax]{#3}}%
|
- ((\photobook@imagecell@clearance) * 2) \relax]{#3}}%
|
||||||
\fi\fi\fi%
|
\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...
|
% 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...
|
||||||
\vspace{0pt}%
|
\vspace{0pt}%
|
||||||
\adjustbox{%
|
\smash{\makebox[0pt][l]{%
|
||||||
%fbox=0.1pt 0pt 0pt,
|
\adjustbox{%
|
||||||
margin=
|
margin={\celloffsetleft} 0pt 0pt {\celloffsettop},
|
||||||
{\dimexpr
|
valign=T}{%
|
||||||
\photobook@imagecell@offsetleft
|
\usebox\photobook@imagebox}}}%
|
||||||
+ \photobook@imagecell@left \relax}
|
%
|
||||||
0pt 0pt
|
%
|
||||||
{\dimexpr
|
% prepare for caption cell...
|
||||||
\photobook@imagecell@offsettop
|
\setlength\cellparentwidth{\cellwidth}%
|
||||||
+ \photobook@imagecell@top \relax}}{%
|
\setlength\cellparentheight{\cellheight}%
|
||||||
% image....
|
\setlength\cellwidth{%
|
||||||
\usebox\photobook@imagebox%
|
\mindim{
|
||||||
%
|
\wd\photobook@imagebox
|
||||||
% caption cell...
|
+ \mindim{\celloffsetleft}{0pt}
|
||||||
% XXX make this conditional -- if caption is not empty...
|
}{
|
||||||
\begingroup%
|
\cellwidth}}%
|
||||||
% setup the cell env...
|
\setlength\cellheight{%
|
||||||
\setlength\clearance{\photobook@imagecell@clearance}%
|
\mindim{
|
||||||
% NOTE: this needs the original \cellwidth...
|
\ht\photobook@imagebox
|
||||||
\setlength\celloffsetleft{%
|
+ \mindim{\celloffsettop}{0pt}
|
||||||
\mindim{%
|
}{
|
||||||
\wd\photobook@imagebox
|
\cellheight}}%
|
||||||
}{%
|
\setlength\celloffsetleft{%
|
||||||
+\cellwidth
|
\maxdim{\celloffsetleft}{0pt}}%
|
||||||
-\photobook@imagecell@captionleft
|
\setlength\celloffsettop{%
|
||||||
-0.5\dimexpr
|
\maxdim{\celloffsettop}{0pt}}%
|
||||||
+\cellwidth
|
\setlength\clearance{\photobook@imagecell@clearance}%
|
||||||
-\wd\photobook@imagebox \relax}}%
|
% clear parent...
|
||||||
\setlength\cellparentwidth{\cellwidth}%
|
% XXX might be a good idea to put this into a special reusable cell...
|
||||||
\setlength\cellparentheight{\cellheight}%
|
\ifphotobook@imagecell@captionclearparent%
|
||||||
\setlength\cellwidth{%
|
% trim vertical...
|
||||||
\mindim{\wd\photobook@imagebox}{\cellwidth}}%
|
% XXX this seems overcomplicated...
|
||||||
\setlength\cellheight{%
|
\setlength\cellheight{%
|
||||||
\mindim{\ht\photobook@imagebox}{\cellheight}}%
|
\mindim{
|
||||||
% NOTE: this needs the new \cellheight...
|
\cellheight
|
||||||
\setlength\celloffsettop{%
|
% trim from both sides....
|
||||||
\mindim{%
|
}{\mindim{
|
||||||
0pt
|
\cellparentheight
|
||||||
}{%
|
- 2\photobook@imagecell@captionclearparent
|
||||||
+ 0.5\dimexpr
|
% trim from bottom...
|
||||||
+\cellheight
|
}{\mindim{
|
||||||
-\ht\photobook@imagebox
|
\cellheight
|
||||||
-\photobook@imagecell@captiontop \relax}}%
|
+ \celloffsettop
|
||||||
%
|
- \photobook@imagecell@captionclearparent
|
||||||
% place the caption cell...
|
% trim from top...
|
||||||
\smash{\makebox[0pt][l]{%
|
}{
|
||||||
\hspace{-\celloffsetleft}{%
|
\cellparentheight
|
||||||
\setlength\fboxsep{0pt}%
|
- \photobook@imagecell@captionclearparent
|
||||||
% adjust top if image is taller than cell...
|
- \celloffsettop}}}}%
|
||||||
\raisebox{-\celloffsettop}{%
|
% offset top...
|
||||||
\begin{minipage}[b][\cellheight][\photobook@imagecell@captionalign]{\cellwidth}%
|
\setlength\celloffsettop{
|
||||||
\ignorespaces%
|
\maxdim{
|
||||||
#2%
|
\celloffsettop
|
||||||
\end{minipage}}}}}%
|
+ (\photobook@imagecell@captionclearparent - \celloffsettop)
|
||||||
\endgroup}%
|
}{
|
||||||
|
\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}
|
\endgroup}
|
||||||
|
|
||||||
|
|
||||||
@ -2022,11 +2092,6 @@
|
|||||||
%% in the same cell that takes up space, e.g. text, pictures, ...etc.
|
%% in the same cell that takes up space, e.g. text, pictures, ...etc.
|
||||||
%% Captions are mainly suited to play well with image cells.
|
%% 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...
|
% over / top / center / bottom / under...
|
||||||
\define@boolkey{captioncell@args}{over}[true]{%
|
\define@boolkey{captioncell@args}{over}[true]{%
|
||||||
@ -2118,7 +2183,7 @@
|
|||||||
%%
|
%%
|
||||||
%% See samples for better illustration.
|
%% See samples for better illustration.
|
||||||
%%
|
%%
|
||||||
% XXX make captions clear top/bottom of page...
|
|
||||||
% bottomup / topdown...
|
% bottomup / topdown...
|
||||||
\def\photobook@vcaptioncell@orientation{bottomup}
|
\def\photobook@vcaptioncell@orientation{bottomup}
|
||||||
\define@boolkey{vcaptioncell@args}{bottomup}[true]{%
|
\define@boolkey{vcaptioncell@args}{bottomup}[true]{%
|
||||||
@ -2214,7 +2279,7 @@
|
|||||||
|
|
||||||
%% \DescribeMacro{\captionblockcell\{..\}}
|
%% \DescribeMacro{\captionblockcell\{..\}}
|
||||||
%
|
%
|
||||||
%% \EXPERIMENTAL
|
%% Add caption into a box left/right of current cell.
|
||||||
%%
|
%%
|
||||||
%% \begin{minipage}{\textwidth}
|
%% \begin{minipage}{\textwidth}
|
||||||
%% \begin{verbatim}
|
%% \begin{verbatim}
|
||||||
@ -2244,7 +2309,6 @@
|
|||||||
%% \end{minipage}
|
%% \end{minipage}
|
||||||
%%
|
%%
|
||||||
% XXX make captions clear top/bottom of page...
|
% 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
|
% XXX need to do a caption block -- a cell to one side of an image to the
|
||||||
% end of the page...
|
% end of the page...
|
||||||
% XXX can we use the normal caption and simply insert a minipage of the
|
% XXX can we use the normal caption and simply insert a minipage of the
|
||||||
@ -2279,6 +2343,16 @@
|
|||||||
\define@key{captionblockcell@args}{clearance}{%
|
\define@key{captionblockcell@args}{clearance}{%
|
||||||
\setlength\photobook@captionblockcell@clearance{#1}}
|
\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)
|
% spacing=<len> (default: \captioncellspacing)
|
||||||
\newlength\photobook@captionblockcell@spacing
|
\newlength\photobook@captionblockcell@spacing
|
||||||
\setlength\photobook@captionblockcell@spacing{0pt}
|
\setlength\photobook@captionblockcell@spacing{0pt}
|
||||||
@ -2294,13 +2368,20 @@
|
|||||||
% showbox
|
% showbox
|
||||||
\define@boolkey{captionblockcell@args}{showbox}[true]{}
|
\define@boolkey{captionblockcell@args}{showbox}[true]{}
|
||||||
|
|
||||||
\newcommand\photobook@captionblockcell@content[1]{%
|
\newcommand\photobook@captionblockcell@content[2][0pt]{%
|
||||||
\begin{minipage}[t][\cellheight][\photobook@captionblockcell@valign]{\cellwidth}%
|
\hspace{\celloffsetleft}{%
|
||||||
\begin{\photobook@captionblockcell@align}%
|
\begin{adjustbox}{
|
||||||
\ignorespaces%
|
% NOTE: we need to draw the border before we set margins
|
||||||
#1%
|
% to show the original box...
|
||||||
\end{\photobook@captionblockcell@align}%
|
fbox=#1 0pt 0pt,
|
||||||
\end{minipage}}
|
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 revise how \clearance is handled...
|
||||||
% XXX do we need top/bottom boxes???
|
% XXX do we need top/bottom boxes???
|
||||||
@ -2310,7 +2391,7 @@
|
|||||||
% XXX add tweak support...
|
% XXX add tweak support...
|
||||||
\newcommand\captionblockcell[2][]{%
|
\newcommand\captionblockcell[2][]{%
|
||||||
% XXX should this be within the group???
|
% XXX should this be within the group???
|
||||||
\setkeys{captionblockcell@args}{
|
\setkeys{captionblockcell@args}{%
|
||||||
left,
|
left,
|
||||||
valign=b,
|
valign=b,
|
||||||
clearance=\clearcaption,
|
clearance=\clearcaption,
|
||||||
@ -2320,7 +2401,8 @@
|
|||||||
\smash{\makebox[0pt][l]{%
|
\smash{\makebox[0pt][l]{%
|
||||||
\begingroup%
|
\begingroup%
|
||||||
% setup cell context...
|
% setup cell context...
|
||||||
\setlength\clearcaption{\photobook@captionblockcell@clearance}%
|
\setlength\clearcaption{%
|
||||||
|
\photobook@captionblockcell@clearance}%
|
||||||
\setlength\photobook@captionblockcell@tmplen{\cellwidth}%
|
\setlength\photobook@captionblockcell@tmplen{\cellwidth}%
|
||||||
\setlength\cellwidth{%
|
\setlength\cellwidth{%
|
||||||
\ifnum \photobook@captionblockcell@width = 0%
|
\ifnum \photobook@captionblockcell@width = 0%
|
||||||
@ -2333,7 +2415,8 @@
|
|||||||
- \clearance \relax%
|
- \clearance \relax%
|
||||||
\else%
|
\else%
|
||||||
\photobook@captionblockcell@width\fi}%
|
\photobook@captionblockcell@width\fi}%
|
||||||
\setlength\cellparentwidth{\photobook@captionblockcell@tmplen}%
|
\setlength\cellparentwidth{%
|
||||||
|
\photobook@captionblockcell@tmplen}%
|
||||||
\setlength\celloffsetleft{%
|
\setlength\celloffsetleft{%
|
||||||
\ifKV@captionblockcell@args@left%
|
\ifKV@captionblockcell@args@left%
|
||||||
\dimexpr
|
\dimexpr
|
||||||
@ -2344,25 +2427,59 @@
|
|||||||
\cellparentwidth
|
\cellparentwidth
|
||||||
+ \photobook@captionblockcell@spacing \relax%
|
+ \photobook@captionblockcell@spacing \relax%
|
||||||
\fi}%
|
\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}{%
|
% place...
|
||||||
\ifKV@captionblockcell@args@showbox%
|
\ifKV@captionblockcell@args@showbox%
|
||||||
\fbox{%
|
\photobook@captionblockcell@content[0.1pt]{#2}%
|
||||||
\photobook@captionblockcell@content{#2}}%
|
\else%
|
||||||
\else%
|
\photobook@captionblockcell@content{#2}\fi%
|
||||||
\photobook@captionblockcell@content{#2}\fi}%
|
|
||||||
\endgroup}}%
|
\endgroup}}%
|
||||||
\ignorespaces}
|
\ignorespaces}
|
||||||
|
|
||||||
|
|
||||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
%%%%% Paper cells
|
%%%%% 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}
|
%% \DescribeEnv{papercell}
|
||||||
%
|
%
|
||||||
%% Paper cell.
|
%% Paper cell.
|
||||||
%%
|
%%
|
||||||
%% This does not include bleeds and is independent of |layoutmode|.
|
%% This does not include bleeds.
|
||||||
%%
|
%%
|
||||||
\newenvironment{papercell}{%
|
\newenvironment{papercell}{%
|
||||||
\begin{cell*}{\bleed, \bleed}{\blockwidth}{\blockheight}%
|
\begin{cell*}{\bleed, \bleed}{\blockwidth}{\blockheight}%
|
||||||
@ -2384,6 +2501,10 @@
|
|||||||
|
|
||||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
%%%%% Page cells
|
%%%%% 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}
|
||||||
%% \DescribeEnv{pagecell*}
|
%% \DescribeEnv{pagecell*}
|
||||||
@ -2414,8 +2535,10 @@
|
|||||||
%% The star version accounts for |\bindingoffset|.
|
%% The star version accounts for |\bindingoffset|.
|
||||||
%%
|
%%
|
||||||
%% Note that |layoutmode|'s other than block will change the paper size
|
%% 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}{%
|
\newenvironment{pagecell}{%
|
||||||
\begin{cell*}{\bleed,\bleed}{\pageblockwidth}{\pageblockheight}%
|
\begin{cell*}{\bleed,\bleed}{\pageblockwidth}{\pageblockheight}%
|
||||||
}{%
|
}{%
|
||||||
@ -2453,8 +2576,7 @@
|
|||||||
%% \end{verbatim}
|
%% \end{verbatim}
|
||||||
%% \end{minipage}
|
%% \end{minipage}
|
||||||
%%
|
%%
|
||||||
%% Note that |layoutmode|'s other than block will change the paper size
|
%% Note that as with |pagecell| this is not affected by |layoutmode|.
|
||||||
%% but will not affect this.
|
|
||||||
%%
|
%%
|
||||||
\newenvironment{pagebleedcell}{%
|
\newenvironment{pagebleedcell}{%
|
||||||
\begin{cell*}{0mm, 0mm}{\bleedblockwidth}{\bleedblockheight}%
|
\begin{cell*}{0mm, 0mm}{\bleedblockwidth}{\bleedblockheight}%
|
||||||
@ -2548,7 +2670,8 @@
|
|||||||
%% >> \begin{spreadtopages} .. \end{spreadtopages}
|
%% >> \begin{spreadtopages} .. \end{spreadtopages}
|
||||||
%% >> \begin{spreadtopages}[<page-count>] .. \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*}{<name>} .. \end{spreadtopages*}
|
||||||
%% >> \begin{spreadtopages*}[<page-count>]{<name>} .. \end{spreadtopages*}
|
%% >> \begin{spreadtopages*}[<page-count>]{<name>} .. \end{spreadtopages*}
|
||||||
@ -2562,7 +2685,7 @@
|
|||||||
%% not use a |page| environment, enabling the user to populate the page
|
%% not use a |page| environment, enabling the user to populate the page
|
||||||
%% with other elements.
|
%% 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
|
%% Note that the cell created by |spreadtopages*| env is a normal save
|
||||||
%% cell and can be manipulated via |\usecell{..}| and |\usecell*{..}|.
|
%% cell and can be manipulated via |\usecell{..}| and |\usecell*{..}|.
|
||||||
@ -3006,7 +3129,6 @@
|
|||||||
\ResettableMacro{ImagePageCaption}[1]{%
|
\ResettableMacro{ImagePageCaption}[1]{%
|
||||||
\captioncell[under, align=flushright]{%
|
\captioncell[under, align=flushright]{%
|
||||||
\captionformat{#1}}}
|
\captionformat{#1}}}
|
||||||
|
|
||||||
\ImagePageTemplate{ImagePage}{%
|
\ImagePageTemplate{ImagePage}{%
|
||||||
\clearpage%
|
\clearpage%
|
||||||
\begin{page}%
|
\begin{page}%
|
||||||
@ -3019,6 +3141,7 @@
|
|||||||
{\imageblockheight\pagetextheight}%
|
{\imageblockheight\pagetextheight}%
|
||||||
\imagecell[fit,
|
\imagecell[fit,
|
||||||
scale=\imagescale,
|
scale=\imagescale,
|
||||||
|
%captionclearparent=\captionclearpage,
|
||||||
#1]{#2}{#3}%
|
#1]{#2}{#3}%
|
||||||
\end{inlinecell*}%
|
\end{inlinecell*}%
|
||||||
\end{center}%
|
\end{center}%
|
||||||
@ -3062,7 +3185,6 @@
|
|||||||
\ResettableMacro{ImagePageClearCaption}[1]{%
|
\ResettableMacro{ImagePageClearCaption}[1]{%
|
||||||
\captioncell[under, align=flushright]{%
|
\captioncell[under, align=flushright]{%
|
||||||
\captionformat{#1}}}
|
\captionformat{#1}}}
|
||||||
|
|
||||||
\ImagePageTemplate{ImagePageClear}{%
|
\ImagePageTemplate{ImagePageClear}{%
|
||||||
\clearpage%
|
\clearpage%
|
||||||
\begin{page}%
|
\begin{page}%
|
||||||
@ -3074,6 +3196,7 @@
|
|||||||
scale=\imagescale,
|
scale=\imagescale,
|
||||||
offsettop=\imageoffsettop,
|
offsettop=\imageoffsettop,
|
||||||
offsetleft=\imageoffsetleft,
|
offsetleft=\imageoffsetleft,
|
||||||
|
captionclearparent=\captionclearpage,
|
||||||
#1]{#2}{#3}%
|
#1]{#2}{#3}%
|
||||||
\end{pagecell*}%
|
\end{pagecell*}%
|
||||||
\end{page}}
|
\end{page}}
|
||||||
@ -3136,7 +3259,7 @@
|
|||||||
#1]{#2}{#3}}
|
#1]{#2}{#3}}
|
||||||
|
|
||||||
\ResettableMacro{ImagePageClearLCaption}[1]{%
|
\ResettableMacro{ImagePageClearLCaption}[1]{%
|
||||||
\captionblockcell[right]{%
|
\captionblockcell[right, clearance=\captionclearpage]{%
|
||||||
\captionformat{#1}}}
|
\captionformat{#1}}}
|
||||||
\ImagePageTemplate{ImagePageClearL}{%
|
\ImagePageTemplate{ImagePageClearL}{%
|
||||||
\ImagePageClear*[%
|
\ImagePageClear*[%
|
||||||
@ -3144,7 +3267,7 @@
|
|||||||
#1]{#2}{#3}}
|
#1]{#2}{#3}}
|
||||||
|
|
||||||
\ResettableMacro{ImagePageClearRCaption}[1]{%
|
\ResettableMacro{ImagePageClearRCaption}[1]{%
|
||||||
\captionblockcell[left]{%
|
\captionblockcell[left, clearance=\captionclearpage]{%
|
||||||
\captionformat{#1}}}
|
\captionformat{#1}}}
|
||||||
\ImagePageTemplate{ImagePageClearR}{%
|
\ImagePageTemplate{ImagePageClearR}{%
|
||||||
\ImagePageClear*[%
|
\ImagePageClear*[%
|
||||||
@ -3245,6 +3368,7 @@
|
|||||||
scale=\imagescale,
|
scale=\imagescale,
|
||||||
offsettop=\imageoffsettop,
|
offsettop=\imageoffsettop,
|
||||||
offsetleft=\imageoffsetleft,
|
offsetleft=\imageoffsetleft,
|
||||||
|
captionclearparent=\captionclearpage,
|
||||||
#1]{#2}{#3}%
|
#1]{#2}{#3}%
|
||||||
\end{pagecell}%
|
\end{pagecell}%
|
||||||
\end{page}%
|
\end{page}%
|
||||||
@ -3316,7 +3440,7 @@
|
|||||||
#1]{#2}{#3}}
|
#1]{#2}{#3}}
|
||||||
|
|
||||||
\ResettableMacro{ImagePageFitLCaption}[1]{%
|
\ResettableMacro{ImagePageFitLCaption}[1]{%
|
||||||
\captionblockcell[right]{%
|
\captionblockcell[right, clearance=\captionclearpage]{%
|
||||||
\captionformat{#1}}}
|
\captionformat{#1}}}
|
||||||
\ImagePageTemplate{ImagePageFitL}{%
|
\ImagePageTemplate{ImagePageFitL}{%
|
||||||
\ImagePageFit*[%
|
\ImagePageFit*[%
|
||||||
@ -3324,7 +3448,7 @@
|
|||||||
#1]{#2}{#3}}
|
#1]{#2}{#3}}
|
||||||
|
|
||||||
\ResettableMacro{ImagePageFitRCaption}[1]{%
|
\ResettableMacro{ImagePageFitRCaption}[1]{%
|
||||||
\captionblockcell[left]{%
|
\captionblockcell[left, clearance=\captionclearpage]{%
|
||||||
\captionformat{#1}}}
|
\captionformat{#1}}}
|
||||||
\ImagePageTemplate{ImagePageFitR}{%
|
\ImagePageTemplate{ImagePageFitR}{%
|
||||||
\ImagePageFit*[%
|
\ImagePageFit*[%
|
||||||
@ -3369,7 +3493,6 @@
|
|||||||
\ResettableMacro{ImagePageFillCaption}[1]{%
|
\ResettableMacro{ImagePageFillCaption}[1]{%
|
||||||
\captioncell[top, align=flushright]{%
|
\captioncell[top, align=flushright]{%
|
||||||
\captionformat{#1}}}
|
\captionformat{#1}}}
|
||||||
|
|
||||||
\ImagePageTemplate{ImagePageFill}{%
|
\ImagePageTemplate{ImagePageFill}{%
|
||||||
\ImagePageFit*[%
|
\ImagePageFit*[%
|
||||||
fill,
|
fill,
|
||||||
@ -3410,7 +3533,6 @@
|
|||||||
\ResettableMacro{ImageHalfPageLCaption}[1]{%
|
\ResettableMacro{ImageHalfPageLCaption}[1]{%
|
||||||
\captioncell[bottom, align=flushright]{%
|
\captioncell[bottom, align=flushright]{%
|
||||||
\captionformat{#1}}}
|
\captionformat{#1}}}
|
||||||
|
|
||||||
\ImagePageTemplate{ImageHalfPageL}{%
|
\ImagePageTemplate{ImageHalfPageL}{%
|
||||||
\begin{spreadtopages*}[2]{photobook@ImageHalfPageL@cell}%
|
\begin{spreadtopages*}[2]{photobook@ImageHalfPageL@cell}%
|
||||||
\imagecell[%
|
\imagecell[%
|
||||||
@ -3419,6 +3541,7 @@
|
|||||||
scale=\imagescale,
|
scale=\imagescale,
|
||||||
offsettop=\imageoffsettop,
|
offsettop=\imageoffsettop,
|
||||||
offsetleft=\imageoffsetleft,
|
offsetleft=\imageoffsetleft,
|
||||||
|
captionclearparent=\captionclearpage,
|
||||||
#1]{#2}{#3}%
|
#1]{#2}{#3}%
|
||||||
\end{spreadtopages*}%
|
\end{spreadtopages*}%
|
||||||
%
|
%
|
||||||
@ -3461,7 +3584,6 @@
|
|||||||
\ResettableMacro{ImageHalfPageRCaption}[1]{%
|
\ResettableMacro{ImageHalfPageRCaption}[1]{%
|
||||||
\captioncell[bottom, align=flushright]{%
|
\captioncell[bottom, align=flushright]{%
|
||||||
\captionformat{#1}}}
|
\captionformat{#1}}}
|
||||||
|
|
||||||
\ImagePageTemplate{ImageHalfPageR}{%
|
\ImagePageTemplate{ImageHalfPageR}{%
|
||||||
\begin{spreadtopages*}[2]{photobook@ImageHalfPageR@cell}%
|
\begin{spreadtopages*}[2]{photobook@ImageHalfPageR@cell}%
|
||||||
\imagecell[%
|
\imagecell[%
|
||||||
@ -3470,6 +3592,7 @@
|
|||||||
scale=\imagescale,
|
scale=\imagescale,
|
||||||
offsettop=\imageoffsettop,
|
offsettop=\imageoffsettop,
|
||||||
offsetleft=\imageoffsetleft,
|
offsetleft=\imageoffsetleft,
|
||||||
|
captionclearparent=\captionclearpage,
|
||||||
#1]{#2}{#3}%
|
#1]{#2}{#3}%
|
||||||
\end{spreadtopages*}%
|
\end{spreadtopages*}%
|
||||||
%
|
%
|
||||||
@ -3518,7 +3641,6 @@
|
|||||||
\ResettableMacro{ImageSpreadCaption}[1]{%
|
\ResettableMacro{ImageSpreadCaption}[1]{%
|
||||||
\captioncell[under]{%
|
\captioncell[under]{%
|
||||||
\captionformat{#1}}}
|
\captionformat{#1}}}
|
||||||
|
|
||||||
\ImagePageTemplate{ImageSpread}{%
|
\ImagePageTemplate{ImageSpread}{%
|
||||||
\cleartoleftpage%
|
\cleartoleftpage%
|
||||||
\begin{spreadtopages}[2]%
|
\begin{spreadtopages}[2]%
|
||||||
@ -3528,6 +3650,7 @@
|
|||||||
scale=\imagescale,
|
scale=\imagescale,
|
||||||
offsettop=\imageoffsettop,
|
offsettop=\imageoffsettop,
|
||||||
offsetleft=\imageoffsetleft,
|
offsetleft=\imageoffsetleft,
|
||||||
|
captionclearparent=\captionclearpage,
|
||||||
#1]{#2}{#3}%
|
#1]{#2}{#3}%
|
||||||
\end{spreadtopages}}
|
\end{spreadtopages}}
|
||||||
|
|
||||||
@ -3587,7 +3710,7 @@
|
|||||||
#1]{#2}{#3}}
|
#1]{#2}{#3}}
|
||||||
|
|
||||||
\ResettableMacro{ImageSpreadLCaption}[1]{%
|
\ResettableMacro{ImageSpreadLCaption}[1]{%
|
||||||
\captionblockcell[right]{%
|
\captionblockcell[right, clearance=\captionclearpage]{%
|
||||||
\captionformat{#1}}}
|
\captionformat{#1}}}
|
||||||
\ImagePageTemplate{ImageSpreadL}{%
|
\ImagePageTemplate{ImageSpreadL}{%
|
||||||
\ImageSpread*[%
|
\ImageSpread*[%
|
||||||
@ -3595,7 +3718,7 @@
|
|||||||
#1]{#2}{#3}}
|
#1]{#2}{#3}}
|
||||||
|
|
||||||
\ResettableMacro{ImageSpreadRCaption}[1]{%
|
\ResettableMacro{ImageSpreadRCaption}[1]{%
|
||||||
\captionblockcell[left]{%
|
\captionblockcell[left, clearance=\captionclearpage]{%
|
||||||
\captionformat{#1}}}
|
\captionformat{#1}}}
|
||||||
\ImagePageTemplate{ImageSpreadR}{%
|
\ImagePageTemplate{ImageSpreadR}{%
|
||||||
\ImageSpread*[%
|
\ImageSpread*[%
|
||||||
@ -3646,6 +3769,7 @@
|
|||||||
scale=\imagescale,
|
scale=\imagescale,
|
||||||
offsettop=\imageoffsettop,
|
offsettop=\imageoffsettop,
|
||||||
offsetleft=\imageoffsetleft,
|
offsetleft=\imageoffsetleft,
|
||||||
|
captionclearparent=\captionclearpage,
|
||||||
#1]{#2}{#3}%
|
#1]{#2}{#3}%
|
||||||
\end{spreadtopages}}
|
\end{spreadtopages}}
|
||||||
|
|
||||||
@ -3709,13 +3833,13 @@
|
|||||||
\ImageSpreadFit*[bottom, #1]{#2}{#3}}
|
\ImageSpreadFit*[bottom, #1]{#2}{#3}}
|
||||||
|
|
||||||
\ResettableMacro{ImageSpreadFitLCaption}[1]{%
|
\ResettableMacro{ImageSpreadFitLCaption}[1]{%
|
||||||
\captionblockcell[right]{%
|
\captionblockcell[right, clearance=\captionclearpage]{%
|
||||||
\captionformat{#1}}}
|
\captionformat{#1}}}
|
||||||
\ImagePageTemplate{ImageSpreadFitL}{%
|
\ImagePageTemplate{ImageSpreadFitL}{%
|
||||||
\ImageSpreadFit*[left, #1]{#2}{#3}}
|
\ImageSpreadFit*[left, #1]{#2}{#3}}
|
||||||
|
|
||||||
\ResettableMacro{ImageSpreadFitRCaption}[1]{%
|
\ResettableMacro{ImageSpreadFitRCaption}[1]{%
|
||||||
\captionblockcell[left]{%
|
\captionblockcell[left, clearance=\captionclearpage]{%
|
||||||
\captionformat{#1}}}
|
\captionformat{#1}}}
|
||||||
\ImagePageTemplate{ImageSpreadFitR}{%
|
\ImagePageTemplate{ImageSpreadFitR}{%
|
||||||
\ImageSpreadFit*[right, #1]{#2}{#3}}
|
\ImageSpreadFit*[right, #1]{#2}{#3}}
|
||||||
@ -3758,7 +3882,6 @@
|
|||||||
\ResettableMacro{ImageSpreadFillCaption}[1]{%
|
\ResettableMacro{ImageSpreadFillCaption}[1]{%
|
||||||
\captioncell[bottom, align=flushright]{%
|
\captioncell[bottom, align=flushright]{%
|
||||||
\captionformat{#1}}}
|
\captionformat{#1}}}
|
||||||
|
|
||||||
\ImagePageTemplate{ImageSpreadFill}{%
|
\ImagePageTemplate{ImageSpreadFill}{%
|
||||||
\cleartoleftpage%
|
\cleartoleftpage%
|
||||||
\begin{spreadtopages}[2]%
|
\begin{spreadtopages}[2]%
|
||||||
@ -3768,6 +3891,7 @@
|
|||||||
scale=\imagescale,
|
scale=\imagescale,
|
||||||
offsettop=\imageoffsettop,
|
offsettop=\imageoffsettop,
|
||||||
offsetleft=\imageoffsetleft,
|
offsetleft=\imageoffsetleft,
|
||||||
|
captionclearparent=\captionclearpage,
|
||||||
#1]{#2}{#3}%
|
#1]{#2}{#3}%
|
||||||
\end{spreadtopages}}
|
\end{spreadtopages}}
|
||||||
|
|
||||||
@ -3858,7 +3982,8 @@
|
|||||||
% XXX place marks in bleed area...
|
% XXX place marks in bleed area...
|
||||||
% XXX do this for all pages... (???)
|
% XXX do this for all pages... (???)
|
||||||
\newcommand\ShowMarks[1][1pt]{%
|
\newcommand\ShowMarks[1][1pt]{%
|
||||||
% XXX corners...
|
% general...
|
||||||
|
% XXX corners / cut marks...
|
||||||
\ifendpaperlayout%
|
\ifendpaperlayout%
|
||||||
% XXX fold...
|
% XXX fold...
|
||||||
\fi%
|
\fi%
|
||||||
|
|||||||
@ -20,6 +20,7 @@
|
|||||||
\setlength\parindent{0pt}
|
\setlength\parindent{0pt}
|
||||||
|
|
||||||
\edef\TestImage{DSC00403-2}
|
\edef\TestImage{DSC00403-2}
|
||||||
|
\edef\TestImageV{DSC00403-2vert}
|
||||||
|
|
||||||
|
|
||||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
@ -30,6 +31,19 @@
|
|||||||
|
|
||||||
\begin{document}
|
\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}
|
\end{document}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user