diff --git a/examples/endpaper.tex b/examples/endpaper.tex index 14408d3..e16e909 100644 --- a/examples/endpaper.tex +++ b/examples/endpaper.tex @@ -16,116 +16,53 @@ \begin{document} % - - - - - - - - - - - - - - - - - - - - - - - - - - - -\begin{page} - cliptocellclearances=\cliptocellclearances - - \cliptocellbleeds{5pt} - - cliptocellclearances=\cliptocellclearances - - \cliptocellbleeds{1pt 2pt} - - cliptocellclearances=\cliptocellclearances - - \cliptocellbleeds{1pt 2pt 3pt 4pt} - - cliptocellclearances=\cliptocellclearances -\end{page} - - +% the simplest way to fill... \ImagePageFill{}{DSC00403-2} +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +% manual... +% NOTE: to fill the page the image cell needs to be placed relative to +% the page (papercell / pagecell) and not the text (page env) \begin{page} \begin{papercell} - \imagecell[fill]{}{DSC00403-2} + \imagecell[fill, clearance=-\bleed]{}{DSC00403-2} \end{papercell} \end{page} -% XXX for some reason this is not centered correctly but scaling seems -% correct -- a page env is not a cell... -\begin{page} - \imagecell[fill]{}{DSC00403-2} -\end{page} - - - % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \begin{page} \begin{leftside} \imagecell[fit]{}{DSC00403-2} \end{leftside} +% XXX seems to be a gap between the image and page border -- need to investigate... +% ...setting clearance to 0pt adds a small gap -- is this a stray +% space??? \begin{rightside*} - \imagecell[fit, clearance=-\bleed]{}{DSC00403-2} + %\imagecell[fit, clearance=0pt]{}{DSC00403-2} + \imagecell[fit, clearance=\cliptocellclearances]{}{DSC00403-2} \end{rightside*} \end{page} - -\begin{page} -\begin{leftside} - \begin{cliptocell} - \imagecell[fit]{}{DSC00403-2} - \end{cliptocell} -\end{leftside} -\begin{rightside} - \begin{cliptocell} - \imagecell[fit]{}{DSC00403-2} - \end{cliptocell} -\end{rightside} -\end{page} - - +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \begin{page} \begin{leftside*} - \begin{cliptocell} - % XXX this breaks things.... - %\imagecell[fit, clearance={-\bleed} {-\bleed} 0mm {-\bleed}]{}{DSC00403-2} - \imagecell[fit, clearance=-\bleed]{}{DSC00403-2} - \end{cliptocell} + \imagecell[fill, clearance=\cliptocellclearances]{}{DSC00403-2} \end{leftside*} \begin{rightside*} - \begin{cliptocell} - % XXX for some reason this is undefined here... - %\cliptocellclearances - % XXX \cliptocellclearances does not work yet... - %\imagecell[fit, clearance=\cliptocellclearances]{}{DSC00403-2} - % XXX this does not seem to be forking correctly... - % ...looks like we are not accounting for clearance in offset... - \imagecell[fit, clearance={0pt} {-\bleed} {-\bleed} {-\bleed}]{}{DSC00403-2} - \end{cliptocell} + \imagecell[fill, clearance=\cliptocellclearances]{}{DSC00403-2} \end{rightside*} \end{page} +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\begin{page} -\begin{leftside} - \begin{cliptocell} - \imagecell[fill]{}{DSC00403-2} - \end{cliptocell} -\end{leftside} -\begin{rightside*} - \begin{cliptocell} - % XXX \cliptocellclearances does not work yet... - %\imagecell[fill, clearance=\cliptocellclearances]{}{DSC00403-2} - % XXX this does not seem to be forking correctly... - % ...looks like we are not accounting for clearance in offset... - \imagecell[fill, clearance={0pt} {-\bleed} {-\bleed} {-\bleed}]{}{DSC00403-2} - \end{cliptocell} -\end{rightside*} -\end{page} - - - - - -\GenerateTemplate \GenerateTemplate diff --git a/photobook.cls b/photobook.cls index 753402f..5f0de8f 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.27} +\edef\photobook@FILEVERSION{v0.1.28} \edef\photobook@FILEDATE{2023-08-24} @@ -2342,9 +2342,6 @@ \setlength\photobook@imagecell@clearance@right{0pt} \newlength\photobook@imagecell@clearance@bottom \setlength\photobook@imagecell@clearance@bottom{0pt} -% XXX LEGACY -\newlength\photobook@imagecell@clearance -\setlength\photobook@imagecell@clearance{0pt} % NOTE: these feel like a hack... \newlength\photobook@imagecell@imgratio @@ -2374,7 +2371,6 @@ \newcommand\photobook@imagecell@LEFT{% \def\photobook@imagecell@left{\dimexpr% +\photobook@imagecell@clearance@left \relax}% - %+\photobook@imagecell@clearance \relax}% \def\photobook@imagecell@captionleft{ % XXX not sure why this branch is needed... \ifKV@imagecell@args@fit @@ -2414,7 +2410,6 @@ \define@boolkey{imagecell@args}{top}[true]{% \def\photobook@imagecell@top{% \photobook@imagecell@clearance@top}% - %\photobook@imagecell@clearance}% \def\photobook@imagecell@captiontop{% -\dimexpr +\cellheight @@ -2430,7 +2425,6 @@ \dimexpr \photobook@imagecell@top +\photobook@imagecell@clearance@bottom \relax}}% - %+\photobook@imagecell@clearance \relax}}% % clearance=... % clearance= ... % clearance= ... @@ -2438,7 +2432,7 @@ % XXX EXPERIMENTAL % XXX this is essentially the same as \photobook@cliptocell@bleeds -- unite... \def\photobook@imagecell@clearances{#1}% - \setsepchar{ } + \setsepchar{ }% \readlist*\photobook@imagecell@clearencelist{#1}% \setsepchar{,}% %% args: size @@ -2470,9 +2464,7 @@ \setlength\photobook@imagecell@clearance@right{% \photobook@imagecell@clearencelist[3]}% \setlength\photobook@imagecell@clearance@top{% - \photobook@imagecell@clearencelist[4]}\fi% - % XXX LEGACY... - \setlength\photobook@imagecell@clearance{#1}}% + \photobook@imagecell@clearencelist[4]}\fi}% % offsettop= / offsetleft=... % XXX DOC!!! @@ -2522,12 +2514,10 @@ \cellwidth - \photobook@imagecell@clearance@left - \photobook@imagecell@clearance@right \relax, - %- ((\photobook@imagecell@clearance) * 2) \relax, height=\photobook@imagecell@scale\dimexpr \cellheight - \photobook@imagecell@clearance@top - \photobook@imagecell@clearance@bottom \relax]{#3}}% - %- ((\photobook@imagecell@clearance) * 2) \relax]{#3}}% % fill... \else\ifKV@imagecell@args@fill% % preload image to get its proportions... @@ -2548,7 +2538,6 @@ + \cellwidth - \photobook@imagecell@clearance@left - \photobook@imagecell@clearance@right \relax]{#3}}% - %- ((\photobook@imagecell@clearance) * 2) \relax]{#3}}% \else% \sbox{\photobook@imagebox}{% \includegraphics[% @@ -2557,7 +2546,6 @@ + \cellheight - \photobook@imagecell@clearance@top - \photobook@imagecell@clearance@bottom \relax]{#3}}% - %- ((\photobook@imagecell@clearance) * 2) \relax]{#3}}% \fi\fi\fi% % \setlength\celloffsetleft{% @@ -2606,8 +2594,6 @@ \setlength\clearanceright{\photobook@imagecell@clearance@right} \setlength\clearancebottom{\photobook@imagecell@clearance@bottom} \def\clearances{\photobook@imagecell@clearences} - % XXX LEGACY CLEARANCE - %\setlength\clearance{\photobook@imagecell@clearance}% % clear parent... % XXX might be a good idea to put this into a special reusable cell... \ifphotobook@imagecell@captionclearparent% @@ -4090,8 +4076,10 @@ % XXX EXPERIMENTAL \newenvironment{leftside*}{% \begin{leftside}% - \setcliptocellbleeds{{\bleed} {\bleed} 0mm {\bleed}}% + \begin{cliptocell}[{\bleed} {\bleed} 0mm {\bleed}]% + \setcliptocellbleeds{{\bleed} {\bleed} 0mm {\bleed}}% }{% + \end{cliptocell} \end{leftside}} \newenvironment{rightside}{% @@ -4103,8 +4091,10 @@ % XXX EXPERIMENTAL \newenvironment{rightside*}{% \begin{rightside}% - \setcliptocellbleeds{0mm {\bleed} {\bleed} {\bleed}}% + \begin{cliptocell}[0mm {\bleed} {\bleed} {\bleed}]% + \setcliptocellbleeds{0mm {\bleed} {\bleed} {\bleed}}% }{% + \end{cliptocell} \end{rightside}}