mirror of
https://github.com/flynx/photobook.git
synced 2025-10-29 10:20:08 +00:00
foldout new syntax almost done...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
a679d8d9d0
commit
b021d37253
@ -43,6 +43,18 @@
|
|||||||
auto-calculate\\
|
auto-calculate\\
|
||||||
\end{foldoutA}
|
\end{foldoutA}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
\begin{foldoutA}[3]
|
||||||
|
count\\
|
||||||
|
\end{foldoutA}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
\begin{foldoutA}[in]
|
||||||
|
in\\
|
||||||
|
\end{foldoutA}
|
||||||
|
|
||||||
%\ImagePageFill{\PageInfo}{\TestImage}
|
%\ImagePageFill{\PageInfo}{\TestImage}
|
||||||
%
|
%
|
||||||
%\begin{foldout}[3]
|
%\begin{foldout}[3]
|
||||||
|
|||||||
@ -2869,7 +2869,8 @@
|
|||||||
% -- fold direction with panel widths
|
% -- fold direction with panel widths
|
||||||
\newlength\foldoutpanelwidth
|
\newlength\foldoutpanelwidth
|
||||||
\setlength\foldoutpanelwidth{0pt}
|
\setlength\foldoutpanelwidth{0pt}
|
||||||
\edef\photobook@foldout@prevfold{in}%
|
\edef\photobook@foldout@count{}
|
||||||
|
\edef\photobook@foldout@prevfold{in}
|
||||||
\edef\foldoutspec{2}
|
\edef\foldoutspec{2}
|
||||||
% XXX revise numbers...
|
% XXX revise numbers...
|
||||||
\newlength\foldoutmaxpanelwidth
|
\newlength\foldoutmaxpanelwidth
|
||||||
@ -2901,32 +2902,49 @@
|
|||||||
\edef\foldoutcellwidths{%
|
\edef\foldoutcellwidths{%
|
||||||
\foldoutcellwidths, \the\foldoutpanelwidth}}
|
\foldoutcellwidths, \the\foldoutpanelwidth}}
|
||||||
|
|
||||||
|
\edef\foldoutfold{in}
|
||||||
|
|
||||||
|
% XXX in/out branches are identical -- unify...
|
||||||
\newenvironment{foldoutA}[1][\foldoutspec]{%
|
\newenvironment{foldoutA}[1][\foldoutspec]{%
|
||||||
\begingroup%
|
\begingroup%
|
||||||
\setsepchar{ }%
|
\setsepchar{ }%
|
||||||
\readlist*\photobook@foldout@args{#1}%
|
\readlist*\photobook@foldout@args{#1}%
|
||||||
% panel count...
|
%
|
||||||
% XXX also check that the arg is not in|out...
|
% defaults...
|
||||||
\setlength\foldoutwidth{0pt}%
|
\setlength\foldoutwidth{0pt}%
|
||||||
|
\setlength\foldoutmaxpanelwidth{\blockwidth}%
|
||||||
|
\edef\photobook@foldout@prevfold{\foldoutfold}%
|
||||||
|
%
|
||||||
|
% panel count...
|
||||||
\ifnum \photobook@foldout@argslen = 1%
|
\ifnum \photobook@foldout@argslen = 1%
|
||||||
% XXX
|
% in...
|
||||||
|
\ifthenelse{\equal{#1}{in}}{%
|
||||||
|
\edef\photobook@foldout@count{2}%
|
||||||
|
\edef\photobook@foldout@prevfold{#1}%
|
||||||
|
% out...
|
||||||
|
}{\ifthenelse{\equal{#1}{out}}{%
|
||||||
|
\edef\photobook@foldout@count{2}%
|
||||||
|
\edef\photobook@foldout@prevfold{#1}%
|
||||||
|
% count...
|
||||||
|
}{%
|
||||||
|
\edef\photobook@foldout@count{#1}}}%
|
||||||
|
%
|
||||||
|
% build the panels...
|
||||||
|
\xintFor* ##1 in {\xintSeq{1}{\photobook@foldout@count}} \do {%
|
||||||
|
\photobook@foldout@pushpanel{%
|
||||||
|
0pt}{\photobook@foldout@prevfold}}%
|
||||||
% fold spec...
|
% fold spec...
|
||||||
\else%
|
\else%
|
||||||
\setlength\foldoutmaxpanelwidth{%
|
|
||||||
\blockwidth}
|
|
||||||
% XXX make the default a global...
|
|
||||||
\edef\photobook@foldout@prevfold{in}%
|
|
||||||
%\xintFor* ##1 in {\xintSeq{1}{\photobook@foldout@argslen}} \do {%
|
|
||||||
\foreachitem \photobook@foldout@opt \in \photobook@foldout@args{%
|
\foreachitem \photobook@foldout@opt \in \photobook@foldout@args{%
|
||||||
% in fold...
|
% in...
|
||||||
\ifthenelse{\equal{\photobook@foldout@opt}{in}}{%
|
\ifthenelse{\equal{\photobook@foldout@opt}{in}}{%
|
||||||
\photobook@foldout@pushpanel{%
|
\photobook@foldout@pushpanel{%
|
||||||
\foldoutpanelwidth}{\photobook@foldout@opt}
|
\foldoutpanelwidth}{\photobook@foldout@opt}%
|
||||||
% prep for next panel...
|
% prep for next panel...
|
||||||
\edef\photobook@foldout@prevfold{%
|
\edef\photobook@foldout@prevfold{%
|
||||||
\photobook@foldout@opt}%
|
\photobook@foldout@opt}%
|
||||||
\setlength\foldoutpanelwidth{0pt}%
|
\setlength\foldoutpanelwidth{0pt}%
|
||||||
% out fold...
|
% out...
|
||||||
}{\ifthenelse{\equal{\photobook@foldout@opt}{out}}{%
|
}{\ifthenelse{\equal{\photobook@foldout@opt}{out}}{%
|
||||||
\photobook@foldout@pushpanel{%
|
\photobook@foldout@pushpanel{%
|
||||||
\foldoutpanelwidth}{\photobook@foldout@opt}
|
\foldoutpanelwidth}{\photobook@foldout@opt}
|
||||||
@ -2948,6 +2966,7 @@
|
|||||||
\foldoutpanelwidth}{\photobook@foldout@prevfold}%
|
\foldoutpanelwidth}{\photobook@foldout@prevfold}%
|
||||||
\fi%
|
\fi%
|
||||||
%
|
%
|
||||||
|
% XXX place fold markers...
|
||||||
}{%
|
}{%
|
||||||
args: \showitems\photobook@foldout@args\\
|
args: \showitems\photobook@foldout@args\\
|
||||||
%w: \lenprint[mm]\foldoutpanelwidth\\
|
%w: \lenprint[mm]\foldoutpanelwidth\\
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user