summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-04-20 20:00:08 +0000
committerKarl Berry <karl@freefriends.org>2023-04-20 20:00:08 +0000
commit73ec52c88644cf508ac5ebe3b54b7194546fd02f (patch)
treeb5a8642fd85258359c7788e0a97bc60c551374ef
parent2acd10f2d899823c536987be9b10c5da7d325980 (diff)
photobook (20apr23)
git-svn-id: svn://tug.org/texlive/trunk@66905 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/photobook/photobook.pdfbin142873 -> 143331 bytes
-rwxr-xr-xMaster/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh15
-rw-r--r--Master/texmf-dist/doc/latex/photobook/scripts/make-spreads.sh9
-rw-r--r--Master/texmf-dist/tex/latex/photobook/photobook.cls92
4 files changed, 91 insertions, 25 deletions
diff --git a/Master/texmf-dist/doc/latex/photobook/photobook.pdf b/Master/texmf-dist/doc/latex/photobook/photobook.pdf
index a6f4a5d2d19..2dd314039cd 100644
--- a/Master/texmf-dist/doc/latex/photobook/photobook.pdf
+++ b/Master/texmf-dist/doc/latex/photobook/photobook.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh b/Master/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh
index 9119cd6e821..5461207f058 100755
--- a/Master/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh
+++ b/Master/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh
@@ -54,13 +54,6 @@ printhelp(){
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 @@ while true ; do
;;
-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
;;
diff --git a/Master/texmf-dist/doc/latex/photobook/scripts/make-spreads.sh b/Master/texmf-dist/doc/latex/photobook/scripts/make-spreads.sh
index 1b10fc56cce..6505e1091f0 100644
--- a/Master/texmf-dist/doc/latex/photobook/scripts/make-spreads.sh
+++ b/Master/texmf-dist/doc/latex/photobook/scripts/make-spreads.sh
@@ -177,38 +177,45 @@ while true ; do
-a|--annotate)
ANOTATE_IMAGE_PATHS=1
shift
+ continue
;;
-c)
$CONFIG="$2"
[ -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
;;
diff --git a/Master/texmf-dist/tex/latex/photobook/photobook.cls b/Master/texmf-dist/tex/latex/photobook/photobook.cls
index 8dfe501db37..14016662b4a 100644
--- a/Master/texmf-dist/tex/latex/photobook/photobook.cls
+++ b/Master/texmf-dist/tex/latex/photobook/photobook.cls
@@ -79,7 +79,7 @@
%%% NOTE: \def\<module-name>@[A-Z]+ macros will be visible to both the
%%% code and the generated docs...
-\edef\photobook@FILEVERSION{v0.1.18}
+\edef\photobook@FILEVERSION{v0.1.19}
\edef\photobook@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,13 +1966,78 @@
%
%% 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@cliptocell@left
+\setlength\photobook@cliptocell@left{0mm}%
+\newlength\photobook@cliptocell@top
+\setlength\photobook@cliptocell@top{0mm}%
+\newlength\photobook@cliptocell@right
+\setlength\photobook@cliptocell@right{0mm}%
+\newlength\photobook@cliptocell@bottom
+\setlength\photobook@cliptocell@bottom{0mm}%
+
+\newenvironment{cliptocell}[1][0mm]{%
+ \begingroup%
+ \setsepchar{ }%
+ \readlist*\photobook@cliptocell@bleeds{#1}%
+ %
+ % bleed
+ \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%
+ % 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%
+ % left top right bottom
+ \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%
+ %
+ % XXX the spaces at the end of each line here are significant...
+ \begin{trimbox}{{\photobook@cliptocell@left} %
+ {\photobook@cliptocell@bottom} %
+ {\photobook@cliptocell@right} %
+ {\photobook@cliptocell@top}}%
+ \begin{clipbox*}{{-\photobook@cliptocell@left} %
+ {\height - \cellheight - \photobook@cliptocell@bottom} %
+ {\cellwidth + \photobook@cliptocell@right} %
+ {\height + \photobook@cliptocell@top}}%
+ \begin{minipage}[t][\cellheight][t]{\cellwidth}%
+ \ignorespaces%
+ }{%
+ \end{minipage}%
+ \end{clipbox*}%
+ \end{trimbox}%
+ \endgroup}
+
@@ -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},%