diff --git a/examples/test.tex b/examples/test.tex index bc1ccb8..19133a9 100644 --- a/examples/test.tex +++ b/examples/test.tex @@ -36,8 +36,6 @@ \edef\foldmarkoffset{-10mm} %\foldmarksfalse -% XXX should '12cm in in 5cm' size the second panel to 12cm??? -% ...i.e. should we adjust max width when manually sizing panels??? \begin{foldout}[12cm 12cm 5cm] \ImagePageFill{\PageInfo}{\TestImage} \end{foldout} @@ -47,8 +45,6 @@ \emptypage - - \begin{foldout}[in out] auto-calculate \end{foldout} diff --git a/photobook.cls b/photobook.cls index 6445d44..8ffa277 100644 --- a/photobook.cls +++ b/photobook.cls @@ -226,6 +226,15 @@ % XXX check values... \DeclareStringOption{pagefold} +%% \DescribeMacro{foldout=} +% +%% Sets the default fold specification (i.e. sets |\defaultfoldout|). +%% +%% For more information see: \nameref{subsec:Foldout page cells} section. +%% +\DeclareStringOption[2]{foldout}[2] + + %%%%% layout % @@ -652,6 +661,16 @@ \newlength\bindingoffset \setlength\bindingoffset{\photobook@bindingoffset} +%% \DescribeMacro{\defaultfoldout=} +% +%% Set the default fold specification. +%% +%% This can be set via the |foldout| class option. +%% +%% For more information see: \nameref{subsec:Foldout page cells} section. +%% +\edef\defaultfoldout{\photobook@foldout} + %% \DescribeMacro{\flatfold=} % %% Sets the amount of paper to account for a flat fold. @@ -674,6 +693,34 @@ \photobook@pagefold\fi}} \photobook@setpagefold{in} +%% \DescribeMacro{\pagefoldpanels=} +%% \DescribeMacro{\pagefoldpanelfolds=} +% +%% \EXPERIMENTAL +%% +%% Lists page folded panel widths and fold types respectively. +%% +%% |pagefoldpanels| is set automatically for layouts other than |block| +%% and for foldout pages, changing this can mess up fold markers and +%% page cell placement. +%% +%% |pagefoldpanelfolds| is generated when creating a foldout. +%% +% XXX might be a good idea to treat fold-specific vars in the same way +% as cell vars... +% XXX add a generic panel constructor.. +% \foldedcell[]{} +\def\pagefoldpanels{} +\def\pagefoldpanelfolds{} + +%% \DescribeMacro{\foldmarkoffset=} +% +%% Sets the offset of fold marks from outside of page edge (default: |0.5\bleed|). +%% +%% Note that this can either be a command or a dimension. +%% +\def\foldmarkoffset{0.5\bleed} + %% \DescribeMacro{\iffoldmarks} % %% Disable/enable fold marks. @@ -688,24 +735,6 @@ \else% \foldmarkstrue\fi% -%% \DescribeMacro{\pagefoldpanels=} -%% \DescribeMacro{\pagefoldpanelfolds=} -% -%% \EXPERIMENTAL -%% -%% lists page folded panel widths and fold types respectively. -%% -%% |pagefoldpanels| is set automatically for layouts other than |block| -%% and for foldout pages, changing this can mess up fold markers and -%% page cell placement. -%% -%% |pagefoldpanelfolds| is generated when creating a foldout. -%% -% XXX add a generic panel constructor.. -% \foldedcell[]{} -\def\pagefoldpanels{} -\def\pagefoldpanelfolds{} - %% \DescribeMacro{\clearimage=} % %% Image clearance @@ -2849,6 +2878,9 @@ %% automatically calculated and missing folds are the same as the previous %% fold or the default if no folds are specified. %% +%% If not || is given, then the value of |\defaultfoldout| is +%% used (default: |2|). +%% %% Formal || grammar: %% %% \begin{minipage}{\textwidth} @@ -2989,12 +3021,6 @@ \newlength\foldoutwidth \setlength\foldoutwidth{\blockwidth} -% default fold setup... -\edef\foldoutspec{2} - -% XXX length or command??? -\def\foldmarkoffset{0.5\bleed} - % draw in/out fold mark... % % >> \foldinmark[] @@ -3159,7 +3185,7 @@ \newcounter{photobook@foldoutpanel} \setcounter{photobook@foldoutpanel}{1} -\newenvironment{foldout}[1][\foldoutspec]{% +\newenvironment{foldout}[1][\defaultfoldout]{% \begingroup% \setsepchar{ }% \readlist*\photobook@foldout@args{#1}%