mirror of
https://github.com/flynx/photobook.git
synced 2025-12-17 00:51:39 +00:00
working on foldout panels...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
287d97d794
commit
e88ea08060
@ -33,32 +33,36 @@
|
|||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
\ImagePageFill{\PageInfo}{\TestImage}
|
|
||||||
|
|
||||||
%\begin{resizedpages}{2\blockwidth}{\blockheight}
|
\setsepchar{-}
|
||||||
% \ImagePageFill{\PageInfo}{\TestImageV}
|
\readlist*\lst{1-2}
|
||||||
|
|
||||||
|
item @1: \lst[1]
|
||||||
|
\par
|
||||||
|
len: \lstlen
|
||||||
|
|
||||||
|
\par
|
||||||
|
|
||||||
|
\ifnum\lstlen<2
|
||||||
|
one item
|
||||||
|
\else
|
||||||
|
two or more items
|
||||||
|
\fi
|
||||||
|
|
||||||
|
|
||||||
|
%\ImagePageFill{\PageInfo}{\TestImage}
|
||||||
|
%
|
||||||
|
%\begin{foldout}[3]
|
||||||
|
% \ImagePageFill{\PageInfo}{\TestImageV}%
|
||||||
% \ImagePageFill{\PageInfo}{\TestImage}
|
% \ImagePageFill{\PageInfo}{\TestImage}
|
||||||
%\end{resizedpages}
|
%\end{foldout}
|
||||||
%
|
%
|
||||||
%\ImagePage{Caption text}{\TestImage}
|
%\ImagePage{Caption text}{\TestImage}
|
||||||
|
%\ImagePage{Caption text}{\TestImageV}
|
||||||
%
|
%
|
||||||
%\begin{resizedpages}{3\blockwidth}{\blockheight}
|
%\begin{foldout}[3]
|
||||||
% \ImagePage{Caption text}{\TestImage}
|
% \ImagePageFill{\PageInfo}{\TestImage}
|
||||||
%\end{resizedpages}
|
%\end{foldout}
|
||||||
%
|
|
||||||
%\ImagePage{Caption text}{\TestImage}
|
|
||||||
|
|
||||||
\begin{foldout}[3]
|
|
||||||
\ImagePageFill{\PageInfo}{\TestImageV}%
|
|
||||||
\ImagePageFill{\PageInfo}{\TestImage}
|
|
||||||
\end{foldout}
|
|
||||||
|
|
||||||
\ImagePage{Caption text}{\TestImage}
|
|
||||||
\ImagePage{Caption text}{\TestImageV}
|
|
||||||
|
|
||||||
\begin{foldout}[3]
|
|
||||||
\ImagePageFill{\PageInfo}{\TestImage}
|
|
||||||
\end{foldout}
|
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|
||||||
|
|||||||
@ -2827,22 +2827,61 @@
|
|||||||
\def\foldoutcellwidths{}
|
\def\foldoutcellwidths{}
|
||||||
|
|
||||||
|
|
||||||
% XXX might be a good idea to add panel spanning...
|
\newlength\photobook@foldoutoffset@sum
|
||||||
|
\setlength\photobook@foldoutoffset@sum{0pt}
|
||||||
|
|
||||||
|
% >> \photobook@foldoutoffset{<from>}{<to>}
|
||||||
|
%
|
||||||
|
% XXX doc [from, to[
|
||||||
|
% XXX this can't be used outside of a foldout...
|
||||||
|
\newcommand\photobook@foldoutoffset[2]{%
|
||||||
|
\begingroup%
|
||||||
|
\ifnum #1 < #2%
|
||||||
|
% XXX account for even/odd pages...
|
||||||
|
\xintFor* ##1 in {%
|
||||||
|
\xintSeq{ #1 }{ \xintiiMin{#2}{\foldoutcellwidthslen} - 1 }} \do {%
|
||||||
|
\setlength\photobook@foldoutoffset@sum{%
|
||||||
|
\photobook@foldoutoffset@sum%
|
||||||
|
+ \foldoutcellwidths[##1]}}\fi%
|
||||||
|
%
|
||||||
|
\the\photobook@foldoutoffset@sum%
|
||||||
|
\endgroup}
|
||||||
|
|
||||||
|
|
||||||
|
\newlength\photobook@foldoutcell@left
|
||||||
|
\setlength\photobook@foldoutcell@left{0pt}
|
||||||
|
\newlength\photobook@foldoutcell@width
|
||||||
|
\setlength\photobook@foldoutcell@width{0pt}
|
||||||
|
|
||||||
% XXX need to clip left/right of all but first/last panels...
|
% XXX need to clip left/right of all but first/last panels...
|
||||||
|
% XXX this can't be used outside of a foldout...
|
||||||
\newenvironment{foldoutcell}[1][1]{%
|
\newenvironment{foldoutcell}[1][1]{%
|
||||||
\setsepchar{-}%
|
\begingroup%
|
||||||
\readlist*\photobook@foldoutcell@panels{#1}%
|
\setsepchar{-}%
|
||||||
% XXX
|
\readlist*\photobook@foldoutcell@panels{#1}%
|
||||||
%
|
% left offset...
|
||||||
\begin{cell*}{
|
\setlength\photobook@foldoutcell@left{%
|
||||||
% XXX + sum of panels upto start
|
\photobook@foldoutoffset{1}{\photobook@foldoutcell@panels[1]}}%
|
||||||
\bleed,
|
% panel width...
|
||||||
\bleed}%
|
\ifnum \photobook@foldoutcell@panelslen > 1%
|
||||||
% XXX cur sum of cur panel + next n...
|
\setlength\photobook@foldoutcell@width{%
|
||||||
{ \pageblockwidth }%
|
\photobook@foldoutoffset{
|
||||||
{\pageblockheight}%
|
\photobook@foldoutcell@panels[1]%
|
||||||
|
}{%
|
||||||
|
% XXX do we add 1 here???
|
||||||
|
\photobook@foldoutcell@panels[2] + 1}}%
|
||||||
|
\else%
|
||||||
|
\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)...
|
||||||
|
\begin{cell*}%
|
||||||
|
{\photobook@foldoutcell@left, \bleed}%
|
||||||
|
{\photobook@foldoutcell@width}{\pageblockheight}%
|
||||||
}{%
|
}{%
|
||||||
\end{cell*}}
|
\end{cell*}%
|
||||||
|
\endgroup}
|
||||||
|
|
||||||
|
|
||||||
% XXX revise starting dimensions...
|
% XXX revise starting dimensions...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user