texlive[66955] Master/texmf-dist: photobook (27apr23)

commits+karl at tug.org commits+karl at tug.org
Thu Apr 27 22:38:15 CEST 2023


Revision: 66955
          http://tug.org/svn/texlive?view=revision&revision=66955
Author:   karl
Date:     2023-04-27 22:38:15 +0200 (Thu, 27 Apr 2023)
Log Message:
-----------
photobook (27apr23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/photobook/README.md
    trunk/Master/texmf-dist/doc/latex/photobook/photobook.pdf
    trunk/Master/texmf-dist/tex/latex/photobook/photobook.cls

Modified: trunk/Master/texmf-dist/doc/latex/photobook/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/photobook/README.md	2023-04-27 20:37:52 UTC (rev 66954)
+++ trunk/Master/texmf-dist/doc/latex/photobook/README.md	2023-04-27 20:38:15 UTC (rev 66955)
@@ -44,6 +44,12 @@
 
 ## 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 @@
 All rights reserved.
 
 
+<!-- vim:set ts=4 sw=4 nowrap : -->

Modified: trunk/Master/texmf-dist/doc/latex/photobook/photobook.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/latex/photobook/photobook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/photobook/photobook.cls	2023-04-27 20:37:52 UTC (rev 66954)
+++ trunk/Master/texmf-dist/tex/latex/photobook/photobook.cls	2023-04-27 20:38:15 UTC (rev 66955)
@@ -85,7 +85,7 @@
 
 %%% NOTE: \def\<module-name>@[A-Z]+ macros will be visible to both the 
 %%%		code and the generated docs...
-\edef\photobook at FILEVERSION{v0.1.20}
+\edef\photobook at FILEVERSION{v0.1.21}
 \edef\photobook at 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 at 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 at cliptocell@bottom
 \setlength\photobook at 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 at cliptocell@bleeds{#1}%
+	\setsepchar{,}%
+	% args: size
+	\ifnum \photobook at cliptocell@bleedslen = 1%
+		\setlength\photobook at cliptocell@left{%
+			\photobook at cliptocell@bleeds[1]}%
+		\setlength\photobook at cliptocell@bottom{%
+			\photobook at cliptocell@bleeds[1]}%
+		\setlength\photobook at cliptocell@right{%
+			\photobook at cliptocell@bleeds[1]}%
+		\setlength\photobook at cliptocell@top{%
+			\photobook at cliptocell@bleeds[1]}\fi%
+	% args: horizontal vertical
+	\ifnum \photobook at cliptocell@bleedslen = 2%
+		\setlength\photobook at cliptocell@left{%
+			\photobook at cliptocell@bleeds[1]}%
+		\setlength\photobook at cliptocell@bottom{%
+			\photobook at cliptocell@bleeds[2]}%
+		\setlength\photobook at cliptocell@right{%
+			\photobook at cliptocell@bleeds[1]}%
+		\setlength\photobook at cliptocell@top{%
+			\photobook at cliptocell@bleeds[2]}\fi%
+	% args: left bottom right top
+	\ifnum \photobook at cliptocell@bleedslen = 4%
+		\setlength\photobook at cliptocell@left{%
+			\photobook at cliptocell@bleeds[1]}%
+		\setlength\photobook at cliptocell@bottom{%
+			\photobook at cliptocell@bleeds[2]}%
+		\setlength\photobook at cliptocell@right{%
+			\photobook at cliptocell@bleeds[3]}%
+		\setlength\photobook at cliptocell@top{%
+			\photobook at cliptocell@bleeds[4]}\fi}
+
 \newenvironment{cliptocell}[1][0mm]{%
 	\begingroup%
-		\setsepchar{ }%
-		\readlist*\photobook at cliptocell@bleeds{#1}%
-		%
-		% args: size
-		\ifnum \photobook at cliptocell@bleedslen = 1%
-			\setlength\photobook at cliptocell@left{%
-				\photobook at cliptocell@bleeds[1]}%
-			\setlength\photobook at cliptocell@bottom{%
-				\photobook at cliptocell@bleeds[1]}%
-			\setlength\photobook at cliptocell@right{%
-				\photobook at cliptocell@bleeds[1]}%
-			\setlength\photobook at cliptocell@top{%
-				\photobook at cliptocell@bleeds[1]}\fi%
-		% args: horizontal vertical
-		\ifnum \photobook at cliptocell@bleedslen = 2%
-			\setlength\photobook at cliptocell@left{%
-				\photobook at cliptocell@bleeds[1]}%
-			\setlength\photobook at cliptocell@bottom{%
-				\photobook at cliptocell@bleeds[2]}%
-			\setlength\photobook at cliptocell@right{%
-				\photobook at cliptocell@bleeds[1]}%
-			\setlength\photobook at cliptocell@top{%
-				\photobook at cliptocell@bleeds[2]}\fi%
-		% args: left bottom right top
-		\ifnum \photobook at cliptocell@bleedslen = 4%
-			\setlength\photobook at cliptocell@left{%
-				\photobook at cliptocell@bleeds[1]}%
-			\setlength\photobook at cliptocell@bottom{%
-				\photobook at cliptocell@bleeds[2]}%
-			\setlength\photobook at cliptocell@right{%
-				\photobook at cliptocell@bleeds[3]}%
-			\setlength\photobook at cliptocell@top{%
-				\photobook at cliptocell@bleeds[4]}\fi%
-		%
+		\cliptocellbleeds{#1}
 		% NOTE: the spaces at the end of each line here are significant!!
 		\begin{trimbox}{{\photobook at cliptocell@left} %
 				{\photobook at cliptocell@bottom} %
@@ -2049,10 +2070,7 @@
 				{\cellwidth + \photobook at cliptocell@right} %
 				{\height + \photobook at cliptocell@top}}%
 		% set defaults for nested cells...
-		\setlength\photobook at cliptocell@left{0mm}%
-		\setlength\photobook at cliptocell@top{0mm}%
-		\setlength\photobook at cliptocell@right{0mm}%
-		\setlength\photobook at cliptocell@bottom{0mm}%
+		\cliptocellbleeds{0mm}%
 		\begin{minipage}[t][\cellheight][t]{\cellwidth}% 
 			\ignorespaces%
 	}{%
@@ -3558,6 +3576,7 @@
 	\begingroup%
 		\setsepchar{ }%
 		\readlist*\photobook at foldout@args{#1}%
+		\setsepchar{,}%
 		%
 		% defaults...
 		\setcounter{photobook at foldoutpanel}{1}
@@ -3696,6 +3715,7 @@
 	% parse args...
 	\setsepchar{-}%
 	\readlist*\photobook at foldoutcell@panels{#1}%
+	\setsepchar{,}%
 	%
 	% auto advance panel...
 	\ifnum \photobook at foldoutcell@panels[1] = 0%



More information about the tex-live-commits mailing list.