diff --git a/examples/cliptocell-test.tex b/examples/cliptocell-test.tex index 789796f..755f4b5 100644 --- a/examples/cliptocell-test.tex +++ b/examples/cliptocell-test.tex @@ -74,9 +74,6 @@ \end{inlinecell*}}% \end{page}% -\begin{page}% -\end{page}% - \end{document} %------------------------------------------------------- % vim:set ts=4 sw=4 : diff --git a/examples/cover.tex b/examples/cover.tex index 2d62ea8..8e775c0 100644 --- a/examples/cover.tex +++ b/examples/cover.tex @@ -51,13 +51,11 @@ \end{cliptocell} \end{backcover} - % comment these out to remove the cover template outlines... \textblockrulecolour{white} \textcolor{white} \GenerateTemplate \end{page} - \end{document} diff --git a/examples/endpaper.tex b/examples/endpaper.tex index 22cfa32..c7d5261 100644 --- a/examples/endpaper.tex +++ b/examples/endpaper.tex @@ -38,11 +38,10 @@ -% XXX ignores layoutmode=endpaper.... \begin{page} -\begin{pagecell} +\begin{papercell} \imagecell[fill]{}{DSC00403-2} -\end{pagecell} +\end{papercell} \end{page} diff --git a/photobook.cls b/photobook.cls index aba30dc..8b0960a 100644 --- a/photobook.cls +++ b/photobook.cls @@ -93,7 +93,7 @@ %%% NOTE: \def\@[A-Z]+ macros will be visible to both the %%% code and the generated docs... -\edef\photobook@FILEVERSION{v0.1.26} +\edef\photobook@FILEVERSION{v0.1.27} \edef\photobook@FILEDATE{2023-08-24} @@ -2013,7 +2013,7 @@ %% \DescribeEnv{cliptocell} -%% \DescribeEnv{cliptocellbleeds} +%% \DescribeEnv{setcliptocellbleeds} % %% Clip content to parent cell. %% @@ -2046,24 +2046,27 @@ \setlength\photobook@cliptocell@right{0mm}% \newlength\photobook@cliptocell@bottom \setlength\photobook@cliptocell@bottom{0mm}% + +\def\cliptocellbleeds{{0mm} {0mm} {0mm} {0mm}}% \def\cliptocellclearances{{0mm} {0mm} {0mm} {0mm}}% %% Set the default bleeds for |cliptocell| environments %% -%% >> \cliptocellbleeds{} -%% >> \cliptocellbleeds{ } -%% >> \cliptocellbleeds{ } +%% >> \setcliptocellbleeds{} +%% >> \setcliptocellbleeds{ } +%% >> \setcliptocellbleeds{ } %% %% This will only affect |cliptocell| environments on the same level, %% without affecting the nested |cliptocell|s. %% +%%% \DescribeEnv{cliptocellbleeds= } %%% \DescribeEnv{cliptocellclearances= } %%% -%%% Set by |\cliptocellbleeds{..}| and contains clearances (negative -%%% clipping bleeds) usable by imagecell. +%%% Set by |\setcliptocellbleeds{..}| and contain bleeds and clearances (negative +%%% clipping bleeds) respectively, usable by imagecell and others. %%% %%% XXX still testing.... -\newcommand\cliptocellbleeds[1]{ +\newcommand\setcliptocellbleeds[1]{ \setsepchar{ }% \readlist*\photobook@cliptocell@bleeds{#1}% \setsepchar{,}% @@ -2100,6 +2103,11 @@ % NOTE: trailing spaces here are significant... % XXX should we use \the here? % ...it makes things printable... + \def\cliptocellbleeds{% + {\the\photobook@cliptocell@left} % + {\the\photobook@cliptocell@bottom} % + {\the\photobook@cliptocell@right} % + {\the\photobook@cliptocell@top}} \def\cliptocellclearances{% {-\the\photobook@cliptocell@left} % {-\the\photobook@cliptocell@bottom} % @@ -2109,7 +2117,7 @@ % XXX use \cliptocellclearances as default... \newenvironment{cliptocell}[1][0mm]{% \begingroup% - \cliptocellbleeds{#1} + \setcliptocellbleeds{#1} % NOTE: the spaces at the end of each line here are significant!! \begin{trimbox}{{\photobook@cliptocell@left} % {\photobook@cliptocell@bottom} % @@ -2120,7 +2128,7 @@ {\cellwidth + \photobook@cliptocell@right} % {\height + \photobook@cliptocell@top}}% % set defaults for nested cells... - \cliptocellbleeds{0mm}% + \setcliptocellbleeds{0mm}% \begin{minipage}[t][\cellheight][t]{\cellwidth}% \ignorespaces% }{% @@ -4079,7 +4087,7 @@ % XXX EXPERIMENTAL \newenvironment{leftside*}{% \begin{leftside}% - \cliptocellbleeds{{\bleed} {\bleed} 0mm {\bleed}}% + \setcliptocellbleeds{{\bleed} {\bleed} 0mm {\bleed}}% }{% \end{leftside}} @@ -4092,7 +4100,7 @@ % XXX EXPERIMENTAL \newenvironment{rightside*}{% \begin{rightside}% - \cliptocellbleeds{0mm {\bleed} {\bleed} {\bleed}}% + \setcliptocellbleeds{0mm {\bleed} {\bleed} {\bleed}}% }{% \end{rightside}} @@ -4872,7 +4880,8 @@ %\clearpage% \begin{page}% % NOTE: this does not account for \bindingoffset... - \begin{pagecell}% + % XXX should this be a page or a paper cell??? + \begin{papercell}% \imagecell[% center, clearance=-\bleed, @@ -4881,7 +4890,7 @@ offsetleft=\imageoffsetleft, captionclearparent=\captionclearpage, #1]{#2}{#3}% - \end{pagecell}% + \end{papercell}% \end{page}% % special case: centered vertical image -> account for \bindingoffset... \else%