mirror of
https://github.com/flynx/photobook.git
synced 2025-10-29 18:30:10 +00:00
some minor refactoring and cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
8b0b07d33c
commit
2b56f8d647
@ -36,8 +36,6 @@
|
|||||||
\edef\foldmarkoffset{-10mm}
|
\edef\foldmarkoffset{-10mm}
|
||||||
%\foldmarksfalse
|
%\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]
|
\begin{foldout}[12cm 12cm 5cm]
|
||||||
\ImagePageFill{\PageInfo}{\TestImage}
|
\ImagePageFill{\PageInfo}{\TestImage}
|
||||||
\end{foldout}
|
\end{foldout}
|
||||||
@ -47,8 +45,6 @@
|
|||||||
\emptypage
|
\emptypage
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\begin{foldout}[in out]
|
\begin{foldout}[in out]
|
||||||
auto-calculate
|
auto-calculate
|
||||||
\end{foldout}
|
\end{foldout}
|
||||||
|
|||||||
@ -226,6 +226,15 @@
|
|||||||
% XXX check values...
|
% XXX check values...
|
||||||
\DeclareStringOption{pagefold}
|
\DeclareStringOption{pagefold}
|
||||||
|
|
||||||
|
%% \DescribeMacro{foldout=<fold-spec>}
|
||||||
|
%
|
||||||
|
%% Sets the default fold specification (i.e. sets |\defaultfoldout|).
|
||||||
|
%%
|
||||||
|
%% For more information see: \nameref{subsec:Foldout page cells} section.
|
||||||
|
%%
|
||||||
|
\DeclareStringOption[2]{foldout}[2]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%%%%% layout
|
%%%%% layout
|
||||||
%
|
%
|
||||||
@ -652,6 +661,16 @@
|
|||||||
\newlength\bindingoffset
|
\newlength\bindingoffset
|
||||||
\setlength\bindingoffset{\photobook@bindingoffset}
|
\setlength\bindingoffset{\photobook@bindingoffset}
|
||||||
|
|
||||||
|
%% \DescribeMacro{\defaultfoldout=<fold-spce>}
|
||||||
|
%
|
||||||
|
%% 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=<len>}
|
%% \DescribeMacro{\flatfold=<len>}
|
||||||
%
|
%
|
||||||
%% Sets the amount of paper to account for a flat fold.
|
%% Sets the amount of paper to account for a flat fold.
|
||||||
@ -674,6 +693,34 @@
|
|||||||
\photobook@pagefold\fi}}
|
\photobook@pagefold\fi}}
|
||||||
\photobook@setpagefold{in}
|
\photobook@setpagefold{in}
|
||||||
|
|
||||||
|
%% \DescribeMacro{\pagefoldpanels=<list>}
|
||||||
|
%% \DescribeMacro{\pagefoldpanelfolds=<list>}
|
||||||
|
%
|
||||||
|
%% \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[<height>]{<index>}
|
||||||
|
\def\pagefoldpanels{}
|
||||||
|
\def\pagefoldpanelfolds{}
|
||||||
|
|
||||||
|
%% \DescribeMacro{\foldmarkoffset=<len>}
|
||||||
|
%
|
||||||
|
%% 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}
|
%% \DescribeMacro{\iffoldmarks}
|
||||||
%
|
%
|
||||||
%% Disable/enable fold marks.
|
%% Disable/enable fold marks.
|
||||||
@ -688,24 +735,6 @@
|
|||||||
\else%
|
\else%
|
||||||
\foldmarkstrue\fi%
|
\foldmarkstrue\fi%
|
||||||
|
|
||||||
%% \DescribeMacro{\pagefoldpanels=<list>}
|
|
||||||
%% \DescribeMacro{\pagefoldpanelfolds=<list>}
|
|
||||||
%
|
|
||||||
%% \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[<height>]{<index>}
|
|
||||||
\def\pagefoldpanels{}
|
|
||||||
\def\pagefoldpanelfolds{}
|
|
||||||
|
|
||||||
%% \DescribeMacro{\clearimage=<len>}
|
%% \DescribeMacro{\clearimage=<len>}
|
||||||
%
|
%
|
||||||
%% Image clearance
|
%% Image clearance
|
||||||
@ -2849,6 +2878,9 @@
|
|||||||
%% automatically calculated and missing folds are the same as the previous
|
%% automatically calculated and missing folds are the same as the previous
|
||||||
%% fold or the default if no folds are specified.
|
%% fold or the default if no folds are specified.
|
||||||
%%
|
%%
|
||||||
|
%% If not |<fold-spec>| is given, then the value of |\defaultfoldout| is
|
||||||
|
%% used (default: |2|).
|
||||||
|
%%
|
||||||
%% Formal |<fold-spec>| grammar:
|
%% Formal |<fold-spec>| grammar:
|
||||||
%%
|
%%
|
||||||
%% \begin{minipage}{\textwidth}
|
%% \begin{minipage}{\textwidth}
|
||||||
@ -2989,12 +3021,6 @@
|
|||||||
\newlength\foldoutwidth
|
\newlength\foldoutwidth
|
||||||
\setlength\foldoutwidth{\blockwidth}
|
\setlength\foldoutwidth{\blockwidth}
|
||||||
|
|
||||||
% default fold setup...
|
|
||||||
\edef\foldoutspec{2}
|
|
||||||
|
|
||||||
% XXX length or command???
|
|
||||||
\def\foldmarkoffset{0.5\bleed}
|
|
||||||
|
|
||||||
% draw in/out fold mark...
|
% draw in/out fold mark...
|
||||||
%
|
%
|
||||||
% >> \foldinmark[<baseline>]
|
% >> \foldinmark[<baseline>]
|
||||||
@ -3159,7 +3185,7 @@
|
|||||||
\newcounter{photobook@foldoutpanel}
|
\newcounter{photobook@foldoutpanel}
|
||||||
\setcounter{photobook@foldoutpanel}{1}
|
\setcounter{photobook@foldoutpanel}{1}
|
||||||
|
|
||||||
\newenvironment{foldout}[1][\foldoutspec]{%
|
\newenvironment{foldout}[1][\defaultfoldout]{%
|
||||||
\begingroup%
|
\begingroup%
|
||||||
\setsepchar{ }%
|
\setsepchar{ }%
|
||||||
\readlist*\photobook@foldout@args{#1}%
|
\readlist*\photobook@foldout@args{#1}%
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user