working on fold sizing...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2021-10-08 13:59:32 +03:00
parent 74369e9bc6
commit a2dc3bf5bb

View File

@ -2808,8 +2808,9 @@
%% \begin{minipage}{\textwidth} %% \begin{minipage}{\textwidth}
%% \begin{verbatim} %% \begin{verbatim}
%% %%
%% clearfoldoutblock <-> %% \clearfoldoutedge <->
%% <--> clearfoldoutfold . . . . . . <-> %% \clearfoldoutfold <->
%% <--> \clearfoldoutblock
%% (3) /\ (2) %% (3) /\ (2)
%% +---------------------------------+ / \ %% +---------------------------------+ / \
%% +------------------------------- | / %% +------------------------------- | /
@ -2829,8 +2830,8 @@
%% \begin{minipage}{\textwidth} %% \begin{minipage}{\textwidth}
%% \begin{verbatim} %% \begin{verbatim}
%% %%
%% clearfoldoutblock <-> / %% \clearfoldoutedge <-> /
%% <--> clearfoldoutfold (3) / %% <--> \clearfoldoutblock (3) /
%% \ %% \
%% +---------------------------------- \ (2) %% +---------------------------------- \ (2)
%% +---------------------------------+ / %% +---------------------------------+ /
@ -2843,6 +2844,8 @@
%% %%
%% |in out| is drawn, |out it| is the same but reflected. %% |in out| is drawn, |out it| is the same but reflected.
%% %%
%% The size of the paper fold is set by |\paperfoldwidth|.
%%
% XXX order doc secions correctly... % XXX order doc secions correctly...
% XXX foldout modes: % XXX foldout modes:
% fold=in in, % fold=in in,
@ -2866,15 +2869,20 @@
% default fold setup... % default fold setup...
\edef\foldoutspec{2} \edef\foldoutspec{2}
% default fold... % default fold type...
\edef\foldoutfold{in} \edef\foldoutfold{in}
\newlength\clearfoldoutclearblock % width of paper consumed by a fold...
\setlength\clearfoldoutclearblock{0.5mm} \newlength\paperfoldwidth
\setlength\paperfoldwidth{0.5mm}
\newlength\clearfoldoutblock
\setlength\clearfoldoutblock{0.5mm}
\newlength\clearfoldoutfold \newlength\clearfoldoutfold
\setlength\clearfoldoutfold{5mm} \setlength\clearfoldoutfold{5mm}
% clear the foldout's first fold from block cut...
\newlength\clearfoldoutedge \newlength\clearfoldoutedge
\setlength\clearfoldoutedge{1mm} \setlength\clearfoldoutedge{1mm}
@ -2968,23 +2976,23 @@
% >> \photobook@foldout@pushpanel{<width>}{<fold>} % >> \photobook@foldout@pushpanel{<width>}{<fold>}
% XXX setup numbers... % XXX setup numbers...
% XXX need to subract \clearfoldoutblock from the second maxpanelwidth...
\newcommand\photobook@foldout@pushpanel[2]{% \newcommand\photobook@foldout@pushpanel[2]{%
% use default width.... % calculate widths...
% XXX might need to make this a bit more elaborate...
\ifdim #1 = 0pt% \ifdim #1 = 0pt%
% double fold twice in same direction... % double fold twice in same direction...
\ifthenelse{\equal{#2}{\photobook@foldout@prevfold}}{% \ifthenelse{\equal{#2}{\photobook@foldout@prevfold}}{%
\setlength\photobook@foldout@panelwidth{% \setlength\photobook@foldout@panelwidth{%
\photobook@foldout@maxpanelwidth \photobook@foldout@maxpanelwidth
% XXX + \paperfoldwidth
+ 0pt}% - \clearfoldoutfold}%
% different fold directions... % different fold directions -- no resizing needed here...
}{% }{%
\setlength\photobook@foldout@panelwidth{% \setlength\photobook@foldout@panelwidth{%
\photobook@foldout@maxpanelwidth \photobook@foldout@maxpanelwidth
% XXX + \paperfoldwidth}}%
+ 0pt}}% \setlength\photobook@foldout@maxpanelwidth{%
\setlength\photobook@foldout@maxpanelwidth{\photobook@foldout@panelwidth}% \photobook@foldout@panelwidth}%
% explicit width... % explicit width...
\else% \else%
\setlength\photobook@foldout@panelwidth{#1}\fi% \setlength\photobook@foldout@panelwidth{#1}\fi%
@ -3037,8 +3045,11 @@
% %
% defaults... % defaults...
\setlength\foldoutwidth{0pt}% \setlength\foldoutwidth{0pt}%
\setlength\photobook@foldout@maxpanelwidth{\blockwidth}%
\edef\photobook@foldout@prevfold{\foldoutfold}% \edef\photobook@foldout@prevfold{\foldoutfold}%
% initial panel size...
\setlength\photobook@foldout@maxpanelwidth{%
\blockwidth
- \clearfoldoutedge}%
% %
% panel count... % panel count...
\ifnum \photobook@foldout@argslen = 1% \ifnum \photobook@foldout@argslen = 1%
@ -3084,12 +3095,12 @@
\photobook@foldout@pushpanel{% \photobook@foldout@pushpanel{%
\photobook@foldout@panelwidth}{\photobook@foldout@prevfold}\fi% \photobook@foldout@panelwidth}{\photobook@foldout@prevfold}\fi%
% %
% XXX need to disable clearences here...
\setlength\photobook@foldout@panelwidth{\photobook@foldout@opt}}}}% \setlength\photobook@foldout@panelwidth{\photobook@foldout@opt}}}}%
% we ended by a fold -> add trailing panel... % add trailing panel...
\photobook@foldout@pushpanel{% \photobook@foldout@pushpanel{%
\photobook@foldout@panelwidth}{\photobook@foldout@prevfold}% \photobook@foldout@panelwidth}{\photobook@foldout@prevfold}%
\fi% \fi%
% prepare data for cells...
\setsepchar{,}% \setsepchar{,}%
% NOTE: the first element is empty due to how we create these % NOTE: the first element is empty due to how we create these
% i.e. ('' + ',<value>')... % i.e. ('' + ',<value>')...