summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-04-27 20:38:15 +0000
committerKarl Berry <karl@freefriends.org>2023-04-27 20:38:15 +0000
commit3cc85aef80038341de3104242cce55aa087ac229 (patch)
treeda1cc2290ade613670e1b42892a5c3d2f9c4df8f /Master/texmf-dist/tex/latex
parentfd9564b21054e27d1e4f4bfcca7683ae3b84e2fb (diff)
photobook (27apr23)
git-svn-id: svn://tug.org/texlive/trunk@66955 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/photobook/photobook.cls112
1 files changed, 66 insertions, 46 deletions
diff --git a/Master/texmf-dist/tex/latex/photobook/photobook.cls b/Master/texmf-dist/tex/latex/photobook/photobook.cls
index 09a8d9a8eb6..a0188d793b8 100644
--- a/Master/texmf-dist/tex/latex/photobook/photobook.cls
+++ b/Master/texmf-dist/tex/latex/photobook/photobook.cls
@@ -85,7 +85,7 @@
%%% NOTE: \def\<module-name>@[A-Z]+ macros will be visible to both the
%%% code and the generated docs...
-\edef\photobook@FILEVERSION{v0.1.20}
+\edef\photobook@FILEVERSION{v0.1.21}
\edef\photobook@FILEDATE{2023-04-22}
@@ -383,9 +383,10 @@
%%
%% blockwidth blockwidth
%% <---------------> <--------------->
-%% <-> coverboardgrow <-> coverboardgrow
-%% <-> coverflap . <-> coverflap
-%% . . . . . .
+%% <-> coverboardgrow. . <-> coverboardgrow
+%% <-> coverflap . . . <-> coverflap
+%% . . . . . . . .
+%% .xx . xx xx . xx. ] fold marks
%% +-------------------++---++-------------------+ ---
%% | + - - - - - - - - ++ - ++ - - - - - - - - + | --^ coverflap
%% | . + - - - - - - - ++ - ++ - - - - - - - + . | --^ coverboardgrow
@@ -397,6 +398,7 @@
%% | . + - - - - - - - ++ - ++ - - - - - - - + . | --v coverboardgrow
%% | + - - - - - - - - ++ - ++ - - - - - - - - + | --v coverflap
%% +-------------------++---++-------------------+ ---
+%% xx xx xx xx ] fold marks
%% . .
%% ^. .^ spinefold
%% . .
@@ -422,8 +424,9 @@
%% . . . .
%% . . blockwidth blockwidth . .
%% . . <---------------> <---------------> . .
-%% . .<-> coverboardgrow <-> coverboardgrow
-%% . . . . . .
+%% . .<-> coverboardgrow. . <-> coverboardgrow
+%% . . . . . . . .
+%% . xx . .x x. . xx . ] fold marks
%% +---++-----------------++---++-----------------++---+ ---
%% | .. + - - - - - - - ++ - ++ - - - - - - - + .. | --^ coverboardgrow
%% | .. . .. .. . .. | ^
@@ -433,6 +436,7 @@
%% | .. . .. .. . .. | v
%% | .. + - - - - - - - ++ - ++ - - - - - - - + .. | --v coverboardgrow
%% +---++-----------------++---++-----------------++---+ ---
+%% xx x x xx ] fold marks
%% .. . . ..
%% ^ jacketwrap . . ^ jacketwrap
%% ^. .^ spinefold
@@ -1075,6 +1079,7 @@
% layout: cover...
\ifcoverlayout
\pagestyle{empty}%
+ % XXX should spinefolds be panels???
\setsepchar{,}%
\readlist*\pagefoldpanels{%
\the\coverflap,
@@ -1108,12 +1113,12 @@
\the\jacketwrap,
\the\dimexpr
\coverboardgrow
+ + \spinefold
+ \pageblockwidth \relax,
- \the\spinefold,
\the\spinewidth,
- \the\spinefold,
\the\dimexpr
\coverboardgrow
+ + \spinefold
+ \pageblockwidth \relax,
\the\jacketwrap,
\the\photobook@jacketflapfront@active}%
@@ -1130,6 +1135,7 @@
% layout: spread/endpaper...
\ifspreadlayout
\pagestyle{empty}%
+ \setsepchar{,}%
\readlist*\pagefoldpanels{%
\the\pageblockwidth,
\the\pageblockwidth}%
@@ -1970,6 +1976,7 @@
%% \DescribeEnv{cliptocell}
+%% \DescribeEnv{cliptocellbleeds}
%
%% Clip content to parent cell.
%%
@@ -2003,42 +2010,56 @@
\newlength\photobook@cliptocell@bottom
\setlength\photobook@cliptocell@bottom{0mm}%
+%% Set the default bleeds for |cliptocell| environments
+%%
+%% >> \cliptocellbleeds{<size>}
+%% >> \cliptocellbleeds{<horizontal> <vertical>}
+%% >> \cliptocellbleeds{<left> <bottom> <right> <top>}
+%%
+%% This will only affect |cliptocell| environments on the same level,
+%% without affecting the nested |cliptocell|s.
+%%
+% XXX should this set the setsepchar back to default???
+% XXX should this be public???
+% ...mainly due to setsepchar...
+\newcommand\cliptocellbleeds[1]{
+ \setsepchar{ }%
+ \readlist*\photobook@cliptocell@bleeds{#1}%
+ \setsepchar{,}%
+ % args: size
+ \ifnum \photobook@cliptocell@bleedslen = 1%
+ \setlength\photobook@cliptocell@left{%
+ \photobook@cliptocell@bleeds[1]}%
+ \setlength\photobook@cliptocell@bottom{%
+ \photobook@cliptocell@bleeds[1]}%
+ \setlength\photobook@cliptocell@right{%
+ \photobook@cliptocell@bleeds[1]}%
+ \setlength\photobook@cliptocell@top{%
+ \photobook@cliptocell@bleeds[1]}\fi%
+ % args: horizontal vertical
+ \ifnum \photobook@cliptocell@bleedslen = 2%
+ \setlength\photobook@cliptocell@left{%
+ \photobook@cliptocell@bleeds[1]}%
+ \setlength\photobook@cliptocell@bottom{%
+ \photobook@cliptocell@bleeds[2]}%
+ \setlength\photobook@cliptocell@right{%
+ \photobook@cliptocell@bleeds[1]}%
+ \setlength\photobook@cliptocell@top{%
+ \photobook@cliptocell@bleeds[2]}\fi%
+ % args: left bottom right top
+ \ifnum \photobook@cliptocell@bleedslen = 4%
+ \setlength\photobook@cliptocell@left{%
+ \photobook@cliptocell@bleeds[1]}%
+ \setlength\photobook@cliptocell@bottom{%
+ \photobook@cliptocell@bleeds[2]}%
+ \setlength\photobook@cliptocell@right{%
+ \photobook@cliptocell@bleeds[3]}%
+ \setlength\photobook@cliptocell@top{%
+ \photobook@cliptocell@bleeds[4]}\fi}
+
\newenvironment{cliptocell}[1][0mm]{%
\begingroup%
- \setsepchar{ }%
- \readlist*\photobook@cliptocell@bleeds{#1}%
- %
- % args: size
- \ifnum \photobook@cliptocell@bleedslen = 1%
- \setlength\photobook@cliptocell@left{%
- \photobook@cliptocell@bleeds[1]}%
- \setlength\photobook@cliptocell@bottom{%
- \photobook@cliptocell@bleeds[1]}%
- \setlength\photobook@cliptocell@right{%
- \photobook@cliptocell@bleeds[1]}%
- \setlength\photobook@cliptocell@top{%
- \photobook@cliptocell@bleeds[1]}\fi%
- % args: horizontal vertical
- \ifnum \photobook@cliptocell@bleedslen = 2%
- \setlength\photobook@cliptocell@left{%
- \photobook@cliptocell@bleeds[1]}%
- \setlength\photobook@cliptocell@bottom{%
- \photobook@cliptocell@bleeds[2]}%
- \setlength\photobook@cliptocell@right{%
- \photobook@cliptocell@bleeds[1]}%
- \setlength\photobook@cliptocell@top{%
- \photobook@cliptocell@bleeds[2]}\fi%
- % args: left bottom right top
- \ifnum \photobook@cliptocell@bleedslen = 4%
- \setlength\photobook@cliptocell@left{%
- \photobook@cliptocell@bleeds[1]}%
- \setlength\photobook@cliptocell@bottom{%
- \photobook@cliptocell@bleeds[2]}%
- \setlength\photobook@cliptocell@right{%
- \photobook@cliptocell@bleeds[3]}%
- \setlength\photobook@cliptocell@top{%
- \photobook@cliptocell@bleeds[4]}\fi%
- %
+ \cliptocellbleeds{#1}
% NOTE: the spaces at the end of each line here are significant!!
\begin{trimbox}{{\photobook@cliptocell@left} %
{\photobook@cliptocell@bottom} %
@@ -2049,10 +2070,7 @@
{\cellwidth + \photobook@cliptocell@right} %
{\height + \photobook@cliptocell@top}}%
% set defaults for nested cells...
- \setlength\photobook@cliptocell@left{0mm}%
- \setlength\photobook@cliptocell@top{0mm}%
- \setlength\photobook@cliptocell@right{0mm}%
- \setlength\photobook@cliptocell@bottom{0mm}%
+ \cliptocellbleeds{0mm}%
\begin{minipage}[t][\cellheight][t]{\cellwidth}%
\ignorespaces%
}{%
@@ -3558,6 +3576,7 @@
\begingroup%
\setsepchar{ }%
\readlist*\photobook@foldout@args{#1}%
+ \setsepchar{,}%
%
% defaults...
\setcounter{photobook@foldoutpanel}{1}
@@ -3696,6 +3715,7 @@
% parse args...
\setsepchar{-}%
\readlist*\photobook@foldoutcell@panels{#1}%
+ \setsepchar{,}%
%
% auto advance panel...
\ifnum \photobook@foldoutcell@panels[1] = 0%