summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/photobook
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-04-28 03:01:37 +0000
committerNorbert Preining <norbert@preining.info>2023-04-28 03:01:37 +0000
commitecdd3beb4fb3bcd9ea2f1c6349a68f74a40f1679 (patch)
treef9f048d640b29aaf501c9db5491a351fa48fb2fd /macros/latex/contrib/photobook
parente947b2310e888cd5b10265d596eb332da9f6bdec (diff)
CTAN sync 202304280301
Diffstat (limited to 'macros/latex/contrib/photobook')
-rw-r--r--macros/latex/contrib/photobook/README.md7
-rw-r--r--macros/latex/contrib/photobook/photobook.cls112
-rw-r--r--macros/latex/contrib/photobook/photobook.pdfbin143821 -> 143897 bytes
3 files changed, 73 insertions, 46 deletions
diff --git a/macros/latex/contrib/photobook/README.md b/macros/latex/contrib/photobook/README.md
index bb1379915d..004a438e86 100644
--- a/macros/latex/contrib/photobook/README.md
+++ b/macros/latex/contrib/photobook/README.md
@@ -44,6 +44,12 @@ For more info on `make` targets see the: [./Makefile](./Makefile)
## Notes
+- The main refetence is inline with the source [photobook.cls](./photobook.cls)
+ thus it is both human-readable next to the code it documents and is
+ used to build the `photobook.pdf`.
+ Extracting the documentation source (`photobook*.tex`) is done
+ by [make](./Makefile) via [cls2tex.sh](scripts/README.md#cls2texsh) when
+ building the docs, see them for more info.
- There is a bug in default captions not being typeset correctly if too
long, a workaround is to place them in a `minipage` like this:
```latex
@@ -72,3 +78,4 @@ Copyright (c) 2021-2023, Alex A. Naanou,
All rights reserved.
+<!-- vim:set ts=4 sw=4 nowrap : -->
diff --git a/macros/latex/contrib/photobook/photobook.cls b/macros/latex/contrib/photobook/photobook.cls
index 09a8d9a8eb..a0188d793b 100644
--- a/macros/latex/contrib/photobook/photobook.cls
+++ b/macros/latex/contrib/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%
diff --git a/macros/latex/contrib/photobook/photobook.pdf b/macros/latex/contrib/photobook/photobook.pdf
index f5969aa38f..9368564c5d 100644
--- a/macros/latex/contrib/photobook/photobook.pdf
+++ b/macros/latex/contrib/photobook/photobook.pdf
Binary files differ