From 59a5e04920cab0db267b8f54553c86811fb3bd11 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sun, 26 Sep 2021 02:54:14 +0300 Subject: [PATCH] fixes, notes and tweaks... Signed-off-by: Alex A. Naanou --- examples/test.tex | 21 ++++++++++++++++++++- photobook.cls | 29 ++++++++++++++++++++--------- 2 files changed, 40 insertions(+), 10 deletions(-) diff --git a/examples/test.tex b/examples/test.tex index 7efc3aa..8f5a6e7 100644 --- a/examples/test.tex +++ b/examples/test.tex @@ -50,7 +50,26 @@ \begin{foldout}[3] \begin{foldoutcell}[2] - moo + \lipsum + \lipsum + \lipsum + \end{foldoutcell} + \begin{foldoutcell}[3] + \lipsum + \lipsum + \lipsum + \end{foldoutcell} + \newpage + \begin{foldoutcell}[2-3] + \begin{bottomup} + \begin{cliptocell} + \lipsum + \lipsum + \lipsum + \lipsum + \lipsum + \end{cliptocell} + \end{bottomup} \end{foldoutcell} \end{foldout} diff --git a/photobook.cls b/photobook.cls index eee7cfe..c04c729 100644 --- a/photobook.cls +++ b/photobook.cls @@ -1438,6 +1438,13 @@ \setsepchar{,}% \readlist*\photobook@cell@offset{#1}% % + % NOTE: if there is no \null before textblock then it can reset the + % non-standard page boxes... + % ...not sure yet if this is an issue with how/when foldout env + % updates the boxes or with textblock internals, needs + % investigating... + % XXX report this as a bug if issue is in textblock... + \null% \begin{textblock*}{#2}(#1)% \begin{inlinecell*}{#2}{#3}% \setlength\celloffsettop{\photobook@cell@offset[1]}% @@ -2745,17 +2752,19 @@ %% \begin{minipage}{\textwidth} %% \begin{verbatim} %% +%% right page %% - --+-------+-------+- --+-------+-------+ %% = | | | | | %% = (1) | (2) | ... | (n-1) | (n) | %% = | | | | | %% - --+-------+-------+-- -+-------+-------+ %% -%% +-------+-- -+--------+--------+-- - -%% | | | | = -%% | (n+1) | ... | (2n-1) | (2n) = -%% | | | | = -%% +-------+- --+--------+--------+-- - +%% left page +%% +-------+-------+- --+-------+-------+-- - +%% | | | | | = +%% | (1) | (2) | ... | (n-1) | (n) = +%% | | | | | = +%% +-------+-------+-- -+-------+-------+-- - %% %% \end{verbatim} %% \end{minipage} @@ -2837,9 +2846,12 @@ \newcommand\photobook@setfoldoutoffset[3]{% \expandafter\setlength\csname #1\endcsname{0pt}% \ifnum \numexpr #2 \relax < \numexpr #3 \relax% - % XXX account for even/odd pages... \xintFor* ##1 in {% - \xintSeq{#2}{\xintiiMin{#3}{\foldoutcellwidthslen + 1} - 1}} \do {% + \ifnumodd{\thepage}{% + \xintSeq{#2}{\xintiiMin{#3}{\foldoutcellwidthslen + 1} - 1} + }{% + \xintSeq{\xintiiMin{#3}{\foldoutcellwidthslen + 1} - 1}{#2} + }} \do {% \expandafter\setlength\csname #1\endcsname{% \csname #1\endcsname% + \foldoutcellwidths[##1]}}\fi} @@ -2873,8 +2885,7 @@ \setlength\photobook@foldoutcell@width{% \foldoutcellwidths[{\photobook@foldoutcell@panels[1]}]}\fi% % - % XXX need to trim bleeds on left (except panel 1) and right (except panel -1)... - % XXX this (textpos) breaks page size... + % XXX need to clip bleeds on left (except panel 1) and right (except panel -1)... \begin{cell*}{% \photobook@foldoutcell@left,% \bleed}%