texlive[66905] Master/texmf-dist: photobook (20apr23)

commits+karl at tug.org commits+karl at tug.org
Thu Apr 20 22:00:08 CEST 2023


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

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/photobook/photobook.pdf
    trunk/Master/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh
    trunk/Master/texmf-dist/doc/latex/photobook/scripts/make-spreads.sh
    trunk/Master/texmf-dist/tex/latex/photobook/photobook.cls

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

Modified: trunk/Master/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh
===================================================================
--- trunk/Master/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh	2023-04-20 19:59:57 UTC (rev 66904)
+++ trunk/Master/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh	2023-04-20 20:00:08 UTC (rev 66905)
@@ -54,13 +54,6 @@
 	echo "      in both the repo and in installed form, so .dtx is not used."
 }
 
-# Usage: printerror MESSAGE...
-printerror(){
-	echo Error: $@
-	echo
-	printusage
-}
-
 # Usage: printmsg TEXT
 printmsg(){
 	# print message...
@@ -88,21 +81,23 @@
 			;;
 		-p|--prefix)
 			PREFIX=$2
-			shift
-			shift
+			shift 2
+			continue
 			;;
 		-s|--strip)
 			STRIP_DOC=1
 			shift
+			continue
 			;;
 		-n|--no-msg)
 			NO_MSG=1
 			shift
+			continue
 			;;
 
 		# handle unknown options...
 		-*|--*)
-			printerror "unknown option \"$1\""
+			echo "Error: unknown option: \"$1\"" >&2
 			exit
 			;;
 

Modified: trunk/Master/texmf-dist/doc/latex/photobook/scripts/make-spreads.sh
===================================================================
--- trunk/Master/texmf-dist/doc/latex/photobook/scripts/make-spreads.sh	2023-04-20 19:59:57 UTC (rev 66904)
+++ trunk/Master/texmf-dist/doc/latex/photobook/scripts/make-spreads.sh	2023-04-20 20:00:08 UTC (rev 66905)
@@ -177,6 +177,7 @@
 		-a|--annotate)
 			ANOTATE_IMAGE_PATHS=1
 			shift
+			continue
 			;;
 		-c)
 			$CONFIG="$2"
@@ -183,32 +184,38 @@
 			[ -e "$CONFIG" ] \
 				&& source "$CONFIG"
 			shift 2
+			continue
 			;;
 
 		--templates)
 			TEMPLATE_DIR=$2
 			shift 2
+			continue
 			;;
 		--single-image-tpl)
 			IMAGE_SPREAD[1]=$2
 			shift 2
+			continue
 			;;
 		--double-image-tpl)
 			IMAGE_SPREAD[2]=$2
 			shift 2
+			continue
 			;;
 		--text-spread-tpl)
 			IMAGE_SPREAD[0]=$2
 			shift 2
+			continue
 			;;
 		--captions)
 			CAPTION_DIR=$2
 			shift 2
+			continue
 			;;
 
 		# handle unknown options...
 		-*|--*)
-			echo "Error: unknown option \"$1\""
+			echo "Error: unknown option \"$1\"" >&2
 			exit
 			;;
 

Modified: trunk/Master/texmf-dist/tex/latex/photobook/photobook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/photobook/photobook.cls	2023-04-20 19:59:57 UTC (rev 66904)
+++ trunk/Master/texmf-dist/tex/latex/photobook/photobook.cls	2023-04-20 20:00:08 UTC (rev 66905)
@@ -79,7 +79,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.18}
+\edef\photobook at FILEVERSION{v0.1.19}
 \edef\photobook at FILEDATE{2023-04-11}
 
 
@@ -1537,8 +1537,8 @@
 	\end{adjustbox}}
 
 
-%M \DescribeEnv{CellContent}
-%M \DescribeEnv{CellContent*}
+%M \DescribeEnv{MinipageCellContent}
+%M \DescribeEnv{MinipageCellContent*}
 %
 %M \EXPERIMENTAL
 %M
@@ -1817,6 +1817,9 @@
 %
 %% \EXPERIMENTAL
 %%
+%% This a cell wrapper for |adjustbox|.
+%%
+% XXX DOC
 \newenvironment{adjustcell*}[4][t]{%
 	\begin{adjustbox}{#2}%
 		\vspace{0pt}%
@@ -1963,16 +1966,81 @@
 %
 %% Clip content to parent cell.
 %%
-\newenvironment{cliptocell}{%
-	\begin{clipbox*}{0cm {\height - \cellheight} {\cellwidth} {\height}}%
-	\begin{minipage}[t][\cellheight][t]{\cellwidth}% 
-		\ignorespaces%
-}{%
-	\end{minipage}%
-	\end{clipbox*}}
+%%	>> \begin{cliptocell} ... \end{cliptocell}
+%%
+%% Clip content to cell adding bleeds
+%%
+%%	>> \begin{cliptocell}[<size>] ... \end{cliptocell}
+%%	>> \begin{cliptocell}[<horizontal> <vertical>] ... \end{cliptocell}
+%%	>> \begin{cliptocell}[<left> <bottom> <right> <top>] ... \end{cliptocell}
+%%
+%% Clipping to bleeds will not affect the cell content positioning.
+%%
+\newlength\photobook at cliptocell@left
+\setlength\photobook at cliptocell@left{0mm}%
+\newlength\photobook at cliptocell@top
+\setlength\photobook at cliptocell@top{0mm}%
+\newlength\photobook at cliptocell@right
+\setlength\photobook at cliptocell@right{0mm}%
+\newlength\photobook at cliptocell@bottom
+\setlength\photobook at cliptocell@bottom{0mm}%
 
+\newenvironment{cliptocell}[1][0mm]{%
+	\begingroup%
+		\setsepchar{ }%
+		\readlist*\photobook at cliptocell@bleeds{#1}%
+		%
+		% bleed
+		\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%
+		% 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%
+		% left top right bottom
+		\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%
+		%
+		% XXX the spaces at the end of each line here are significant...
+		\begin{trimbox}{{\photobook at cliptocell@left} %
+				{\photobook at cliptocell@bottom} %
+				{\photobook at cliptocell@right} %
+				{\photobook at cliptocell@top}}%
+		\begin{clipbox*}{{-\photobook at cliptocell@left} %
+				{\height - \cellheight - \photobook at cliptocell@bottom} %
+				{\cellwidth + \photobook at cliptocell@right} %
+				{\height + \photobook at cliptocell@top}}%
+		\begin{minipage}[t][\cellheight][t]{\cellwidth}% 
+			\ignorespaces%
+	}{%
+		\end{minipage}%
+		\end{clipbox*}%
+		\end{trimbox}%
+	\endgroup}
 
 
+
+
 %% \DescribeMacro{\imagecell\{..\}}
 %
 %% Place image in cell.
@@ -2949,10 +3017,6 @@
 %% but will not affect this either in size (block size) or in position 
 %% (top-left).
 %%
-%\newenvironment{pagecell}{%
-%	\begin{cell*}{\bleed,\bleed}{\pageblockwidth}{\pageblockheight}%
-%}{%
-%	\end{cell*}}
 \newenvironment{pagecell}{%
 	\begin{cell*}{%
 			\bleed + \ifnumodd{\thepage}{\bindingoffset}{0pt},%



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