mirror of
https://github.com/flynx/photobook.git
synced 2025-11-01 03:40:10 +00:00
some refactoring and tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
2b56f8d647
commit
4b35c876bb
107
photobook.cls
107
photobook.cls
@ -274,7 +274,7 @@
|
|||||||
%%
|
%%
|
||||||
%% Endpaper layout.
|
%% Endpaper layout.
|
||||||
%%
|
%%
|
||||||
% XXX should this use \flatfold
|
% XXX should this use \flatfold???
|
||||||
%% \begin{minipage}{\textwidth}
|
%% \begin{minipage}{\textwidth}
|
||||||
%% \begin{verbatim}
|
%% \begin{verbatim}
|
||||||
%%
|
%%
|
||||||
@ -693,33 +693,22 @@
|
|||||||
\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>}
|
%% \DescribeMacro{\foldmarkoffset=<len>}
|
||||||
%
|
%
|
||||||
%% Sets the offset of fold marks from outside of page edge (default: |0.5\bleed|).
|
%% 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.
|
%% Note that this can either be a command or a dimension.
|
||||||
%%
|
%%
|
||||||
\def\foldmarkoffset{0.5\bleed}
|
%\def\foldmarkoffset{0.5\bleed}
|
||||||
|
\def\foldmarkoffset{2mm}
|
||||||
|
|
||||||
|
%%% \DescribeMacro{\foldmarkscale=<scale>}
|
||||||
|
%
|
||||||
|
%%% Sets fold marker scale/size.
|
||||||
|
%%%
|
||||||
|
% XXX this behaves in an odd way on bottom markers...
|
||||||
|
%\def\foldmarkscale{0.5}
|
||||||
|
\def\foldmarkscale{1}
|
||||||
|
|
||||||
%% \DescribeMacro{\iffoldmarks}
|
%% \DescribeMacro{\iffoldmarks}
|
||||||
%
|
%
|
||||||
@ -2866,6 +2855,35 @@
|
|||||||
%
|
%
|
||||||
%% \EXPERIMENTAL
|
%% \EXPERIMENTAL
|
||||||
%%
|
%%
|
||||||
|
%% A foldout is a special case cell that changes the page format.
|
||||||
|
%%
|
||||||
|
%% In addition to cell lengths a foldout defines a set of additional
|
||||||
|
%% lengths and lists within its context.
|
||||||
|
%%
|
||||||
|
%% \DescribeMacro{\pagefoldpanels=<list>}
|
||||||
|
%% \DescribeMacro{\pagefoldpanelfolds=<list>}
|
||||||
|
%
|
||||||
|
%% 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.
|
||||||
|
%%
|
||||||
|
%% See:
|
||||||
|
%% \href{https://ctan.altspu.ru/macros/generic/listofitems/listofitems-en.pdf}{listofitems}
|
||||||
|
%% for list API.
|
||||||
|
%%
|
||||||
|
% XXX add a generic panel constructor..
|
||||||
|
% \foldedcell[<height>]{<index>}
|
||||||
|
% NOTE: these are wrapped in \@ifundefined{..} to prevent overwriting when
|
||||||
|
% values are defined in \InitPages...
|
||||||
|
\@ifundefined{pagefoldpanels}{%
|
||||||
|
\def\pagefoldpanels{}}
|
||||||
|
\@ifundefined{pagefoldpanelfolds}{%
|
||||||
|
\def\pagefoldpanelfolds{}}
|
||||||
|
|
||||||
%% \DescribeEnv{foldout}
|
%% \DescribeEnv{foldout}
|
||||||
%
|
%
|
||||||
%% Create 2 or more pages in foldout mode.
|
%% Create 2 or more pages in foldout mode.
|
||||||
@ -2881,26 +2899,6 @@
|
|||||||
%% If not |<fold-spec>| is given, then the value of |\defaultfoldout| is
|
%% If not |<fold-spec>| is given, then the value of |\defaultfoldout| is
|
||||||
%% used (default: |2|).
|
%% used (default: |2|).
|
||||||
%%
|
%%
|
||||||
%% Formal |<fold-spec>| grammar:
|
|
||||||
%%
|
|
||||||
%% \begin{minipage}{\textwidth}
|
|
||||||
%% \begin{verbatim}
|
|
||||||
%% <fold-spec> ::=
|
|
||||||
%% <count>
|
|
||||||
%% | <fold>
|
|
||||||
%% | <panels>
|
|
||||||
%% <panels> ::=
|
|
||||||
%% <panel>
|
|
||||||
%% | <panel> <panels>
|
|
||||||
%% <panel> ::=
|
|
||||||
%% <width> <fold>
|
|
||||||
%% | <width>
|
|
||||||
%% | <fold>
|
|
||||||
%% <fold> ::=
|
|
||||||
%% in | out
|
|
||||||
%% \end{verbatim}
|
|
||||||
%% \end{minipage}
|
|
||||||
%%
|
|
||||||
%% \begin{minipage}{\textwidth}
|
%% \begin{minipage}{\textwidth}
|
||||||
%% \begin{verbatim}
|
%% \begin{verbatim}
|
||||||
%%
|
%%
|
||||||
@ -2969,7 +2967,27 @@
|
|||||||
%% \end{verbatim}
|
%% \end{verbatim}
|
||||||
%% \end{minipage}
|
%% \end{minipage}
|
||||||
%%
|
%%
|
||||||
|
%% Formal |<fold-spec>| grammar:
|
||||||
%%
|
%%
|
||||||
|
%% \begin{minipage}{\textwidth}
|
||||||
|
%% \begin{verbatim}
|
||||||
|
%% <fold-spec> ::
|
||||||
|
%% <count>
|
||||||
|
%% | <fold>
|
||||||
|
%% | <panels>
|
||||||
|
%% <panels> ::=
|
||||||
|
%% <panel>
|
||||||
|
%% | <panel> <panels>
|
||||||
|
%% <panel> ::=
|
||||||
|
%% <width> <fold>
|
||||||
|
%% | <width>
|
||||||
|
%% | <fold>
|
||||||
|
%% <fold> ::=
|
||||||
|
%% in | out
|
||||||
|
%% \end{verbatim}
|
||||||
|
%% \end{minipage}
|
||||||
|
%%
|
||||||
|
%
|
||||||
%% \DescribeMacro{\clearfoldoutbinding=<len>}
|
%% \DescribeMacro{\clearfoldoutbinding=<len>}
|
||||||
%% \DescribeMacro{\clearfoldoutedge=<len>}
|
%% \DescribeMacro{\clearfoldoutedge=<len>}
|
||||||
%% \DescribeMacro{\clearfoldoutfold=<len>}
|
%% \DescribeMacro{\clearfoldoutfold=<len>}
|
||||||
@ -3029,13 +3047,14 @@
|
|||||||
% NOTE: these should be used in a box.
|
% NOTE: these should be used in a box.
|
||||||
% NOTE: these are centered in origin.
|
% NOTE: these are centered in origin.
|
||||||
% XXX these can affect the items after -- need to encapsulate...
|
% XXX these can affect the items after -- need to encapsulate...
|
||||||
|
% XXX something's odd with these -- when \foldmarkscale is <1 the bottom falls apart...
|
||||||
% XXX doc...
|
% XXX doc...
|
||||||
\newcommand\foldinmark[1][0pt]{
|
\newcommand\foldinmark[1][0pt]{
|
||||||
\vspace{\dimexpr 3mm + #1 \relax}%
|
\vspace{\dimexpr 3mm + #1 \relax}%
|
||||||
\smash{\makebox[0pt][l]{%
|
\smash{\makebox[0pt][l]{%
|
||||||
% a size-agnostic centering...
|
% a size-agnostic centering...
|
||||||
\hspace{-5mm}{\makebox[1cm][c]{%
|
\hspace{-5mm}{\makebox[1cm][c]{%
|
||||||
\begin{tikzpicture}%
|
\begin{tikzpicture}[scale=\foldmarkscale]%
|
||||||
\draw[white, ultra thick] (-2mm,2mm) -- (0,0) -- (2mm,2mm);
|
\draw[white, ultra thick] (-2mm,2mm) -- (0,0) -- (2mm,2mm);
|
||||||
\draw[white, ultra thick] (0,4mm) -- (0,-2mm);
|
\draw[white, ultra thick] (0,4mm) -- (0,-2mm);
|
||||||
\draw[black, thin] (-2mm,2mm) -- (0,0) -- (2mm,2mm);
|
\draw[black, thin] (-2mm,2mm) -- (0,0) -- (2mm,2mm);
|
||||||
@ -3046,7 +3065,7 @@
|
|||||||
\smash{\makebox[0pt][l]{%
|
\smash{\makebox[0pt][l]{%
|
||||||
% a size-agnostic centering...
|
% a size-agnostic centering...
|
||||||
\hspace{-5mm}{\makebox[1cm][c]{%
|
\hspace{-5mm}{\makebox[1cm][c]{%
|
||||||
\begin{tikzpicture}%
|
\begin{tikzpicture}[scale=\foldmarkscale]%
|
||||||
\draw[white, ultra thick] (-2mm,0) -- (0,2mm) -- (2mm,0);
|
\draw[white, ultra thick] (-2mm,0) -- (0,2mm) -- (2mm,0);
|
||||||
\draw[white, ultra thick] (0,4mm) -- (0,-2mm);
|
\draw[white, ultra thick] (0,4mm) -- (0,-2mm);
|
||||||
\draw[black, thin] (-2mm,0) -- (0,2mm) -- (2mm,0);
|
\draw[black, thin] (-2mm,0) -- (0,2mm) -- (2mm,0);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user