From d915912a4224451cad4f1883f4d35989d63595af Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 7 Oct 2021 07:13:03 +0300 Subject: [PATCH] foldout panel auto-page-advance worining...... Signed-off-by: Alex A. Naanou --- examples/test.tex | 17 +++++++++++------ photobook.cls | 23 ++++++++++++----------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/examples/test.tex b/examples/test.tex index cbae782..6355c80 100644 --- a/examples/test.tex +++ b/examples/test.tex @@ -51,12 +51,15 @@ \lipsum \lipsum \end{foldoutcell} + % \newpage + % \begin{foldoutcell*} \lipsum \lipsum \lipsum \end{foldoutcell*} + % \begin{foldoutcell*} \begin{cliptocell} \begin{bottomup} @@ -66,17 +69,19 @@ \end{bottomup} \end{cliptocell} \end{foldoutcell*} - % XXX too much goes into right bleed... + % \begin{foldoutcell*} \lipsum \lipsum \lipsum \end{foldoutcell*} - %\begin{foldoutcell} - % \lipsum - % \lipsum - % \lipsum - %\end{foldoutcell} + % + % auto-advance page... + \begin{foldoutcell} + \lipsum + \lipsum + \lipsum + \end{foldoutcell} \end{foldout} \begin{foldout}[in] diff --git a/photobook.cls b/photobook.cls index 2589a5d..0e73a1a 100644 --- a/photobook.cls +++ b/photobook.cls @@ -2803,7 +2803,7 @@ % XXX new cell parameters... % XXX modes... %% -%% Fold mode |in-in| (default): +%% Fold panel sizing for |in in| folds: %% %% \begin{minipage}{\textwidth} %% \begin{verbatim} @@ -2821,7 +2821,7 @@ %% \end{minipage} %% %% -%% Fold mode |in-out|: +%% Fold panel sizing for |in out| folds: %% %% \begin{minipage}{\textwidth} %% \begin{verbatim} @@ -3114,11 +3114,13 @@ %% >> \begin{foldoutcell}[] ... \end{foldoutcell} %% >> \begin{foldoutcell}[-] ... \end{foldoutcell} % -%% If no arguments are given this will create a panel at |foldoutpanel| counter -%% and increment it by one. +%% If no arguments are given this will create a panel at |foldoutpanel| +%% counter and increment it by one. % %% >> \begin{foldoutcell} ... \end{foldoutcell} % +%% This will also auto-advance the page when all panels are created. +%% %% |foldoutcell*| is the same as the non-star version but creates cells %% including bleeds. %% @@ -3149,15 +3151,15 @@ % XXX doc [from, to] % XXX this can't be used outside of a foldout... % XXX should these clip??? +% XXX the following two envs are almost identical... \newenvironment{foldoutcell}[1][0]{% \begingroup% \setsepchar{-}% \readlist*\photobook@foldoutcell@panels{#1}% - % auto advance... + % auto advance panel... \ifnum \photobook@foldoutcell@panels[1] = 0% - % XXX this does not work for some reason... - % ...breaks something later... - \ifnum \value{foldoutpanel} > \foldoutcellwidthslen% + % auto advance page... + \ifnum \value{foldoutpanel} = \foldoutcellwidthslen% % NOTE: this will reset the counter... \newpage\fi% \stepcounter{foldoutpanel}% @@ -3198,9 +3200,8 @@ \readlist*\photobook@foldoutcell@panels{#1}% % auto advance... \ifnum \photobook@foldoutcell@panels[1] = 0% - % XXX this does not work for some reason... - % ...breaks something later... - \ifnum \value{foldoutpanel} > \foldoutcellwidthslen% + % auto advance page... + \ifnum \value{foldoutpanel} = \foldoutcellwidthslen% % NOTE: this will reset the counter... \newpage\fi% \stepcounter{foldoutpanel}%