summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-03-20 18:49:29 +0000
committerKarl Berry <karl@freefriends.org>2023-03-20 18:49:29 +0000
commitde343c6345458eeecb357387e878b9dff9a5376c (patch)
tree8779162b93d1368cce85fc1fc5a66bcdabeb967f
parent2d9d1b05c105cb59d7cb0dda42da6aef170c49f6 (diff)
photobook (19mar23)
git-svn-id: svn://tug.org/texlive/trunk@66601 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/photobook/Makefile42
-rw-r--r--Master/texmf-dist/doc/latex/photobook/photobook.pdfbin140737 -> 141677 bytes
-rw-r--r--Master/texmf-dist/doc/latex/photobook/scripts/README.md40
-rwxr-xr-xMaster/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh4
-rw-r--r--Master/texmf-dist/doc/latex/photobook/scripts/make-spreads.cfg.example39
-rw-r--r--Master/texmf-dist/doc/latex/photobook/scripts/make-spreads.sh271
-rw-r--r--Master/texmf-dist/tex/latex/photobook/photobook.cls17
-rw-r--r--Master/tlpkg/tlpsrc/photobook.tlpsrc36
8 files changed, 270 insertions, 179 deletions
diff --git a/Master/texmf-dist/doc/latex/photobook/Makefile b/Master/texmf-dist/doc/latex/photobook/Makefile
index 39b57fa353c..7bebae3ec83 100644
--- a/Master/texmf-dist/doc/latex/photobook/Makefile
+++ b/Master/texmf-dist/doc/latex/photobook/Makefile
@@ -45,6 +45,7 @@
.EXPORT_ALL_VARIABLES:
+
# NOTE: this makes things run consistently on different systems including
# things like Android...
SHELL := bash
@@ -58,8 +59,9 @@ MODULE := photobook
VERSION = $(strip $(shell \
cat $(MODULE).cls \
| grep 'VERSION{' \
- | sed 's/.*{\(.*\)}.*/\1/' \
- | sed 's/v//'))
+ | sed \
+ -e 's/.*{\(.*\)}.*/\1/' \
+ -e 's/v//'))
DATE = $(strip $(shell date "+%Y%m%d%H%M"))
COMMIT = $(strip $(shell git rev-parse HEAD))
@@ -123,6 +125,7 @@ DIST_NORMAL_FILES = \
README.md \
LICENSE \
Makefile \
+ DEPENDS.txt \
$(MODULE).cls \
$(MODULE).pdf
DIST_FILES = \
@@ -239,6 +242,16 @@ LN := cp -l
> $@
+# list of dependencies...
+#
+DEPENDS.txt: $(MODULE).cls
+ cat $< \
+ | egrep -zo '\s*\\RequirePackage(\[[^]]*\])?\{[^}]*\}' \
+ | sed 's/.*{\(.*\)}/hard \1\n/' \
+ | grep -a hard \
+ > $@
+
+
#----------------------------------------------------------------------
# Info targets...
@@ -287,18 +300,35 @@ ctan-dist: dist
cp -f $(DIST_DIR)/$(DIST_NAME).zip $(DIST_DIR)/$(MODULE).zip
-
.PHONY: tag
tag:
@echo "Will create and publish git tag:"
@echo " v$(VERSION)"
@echo "Last 5 tags:"
@git tag -l 'v[0-9]*'\
+ | sort -V \
| tail -n 5 \
| sed 's/^/ /' \
| tac
- @echo "Note that this must be done after a commit."
- @read -p "(press any key to continue or ctrl-c to cancel)"
+# # check if we need to bug the user about committing and/or pushing stuff...
+ @\
+ UNCOMITTED=$$(git status --porcelain=v1 2> /dev/null | grep -v '??' | wc -l) ;\
+ UNPUSHED=$$(git log origin..HEAD | wc -l) ;\
+ if ! [ $$UNCOMITTED = 0 ] ; then \
+ echo ;\
+ echo "WARNING: Uncommited changes found!" ;\
+ fi ;\
+ if ! [ $$UNPUSHED = 0 ] ; then \
+ [ $$UNCOMITTED = 0 ] \
+ && echo ;\
+ echo "WARNING: Unpushed commits found!" ;\
+ fi ;\
+ if ! [ $$UNCOMITTED = 0 ] || ! [ $$UNPUSHED = 0 ] ; then \
+ echo ;\
+ echo "Note that this must be done after a commit and a push." ;\
+ echo "(press any key to continue or ctrl-c to cancel)" ;\
+ read ;\
+ fi ;\
git tag "v$(VERSION)"
git push origin "v$(VERSION)"
@@ -390,7 +420,7 @@ sweep:
.PHONY: clean
clean: sweep
- rm -rf $(DIST_DIR) $(BUILD_DIR) $(MODULE).md *.pdf
+ rm -rf $(DIST_DIR) $(BUILD_DIR) $(MODULE).md DEPENDS.txt *.pdf
diff --git a/Master/texmf-dist/doc/latex/photobook/photobook.pdf b/Master/texmf-dist/doc/latex/photobook/photobook.pdf
index 64778bbbf3a..cf3f1d0754a 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/README.md b/Master/texmf-dist/doc/latex/photobook/scripts/README.md
index 5970cfbb725..2e00881f705 100644
--- a/Master/texmf-dist/doc/latex/photobook/scripts/README.md
+++ b/Master/texmf-dist/doc/latex/photobook/scripts/README.md
@@ -4,9 +4,9 @@ Support scripts
<!-- TOC depthfrom:2 -->
-- [make-spreads.sh](#make-imagessh)
- - [The process](#the-process)
- - [Automatic template inferenceing](#automatic-template-inferenceing)
+- [make-spreads.sh](#make-spreadssh)
+ - [Theory of operation](#theory-of-operation)
+ - [Automatic template inferencing](#automatic-template-inferencing)
- [Manual template selection](#manual-template-selection)
- [Template tweaking](#template-tweaking)
- [Manual spread layouts](#manual-spread-layouts)
@@ -23,7 +23,9 @@ Support scripts
`make-spreads.sh`
----------------
-Generate LaTeX block of pages from a directory tree.
+<!-- XXX add a TL;DR, "quick start" or "cheat sheet" section... abstract? -->
+
+Generate LaTeX block of pages/spreads from a directory tree.
This was initially intended as a means to convert the exported directory
tree from an image viewer where image/text sequencing was done, but it
@@ -104,7 +106,7 @@ $ make-spreads.sh --help
```
-### The process
+### Theory of operation
<!-- XXX spreads vs. pages -->
@@ -196,7 +198,18 @@ If only one image/text file is provided then `make-spreads.sh` will set it
on the right page of the spread using the appropriate page template and
leave the left page blank.
-<!-- XXX do we need a `blankpage.tex` template??? -->
+A black page uses `blankpage.tex` template if available, otherwise a
+trivial blank page is used:
+```latex
+\null
+\newpage
+```
+
+<!-- XXX
+Template search order:
+- spread directory
+- template directory
+-->
#### Manual template selection
@@ -250,6 +263,8 @@ If `layout.tex` is present it will be included as the page layout/template.
Any paths in the `layout.tex` should be relative to the location the
built block .tex file will be located, usually to the project root.
+Template field substitution is done as for all other templates.
+
### Templates
@@ -315,8 +330,7 @@ but with a .txt extension.
All the configuration options can be given in a configuration file as
well as environment variables.
-<!-- XXX this is not true at the moment, not sure if this is a bug or a feature...
-Environment variables take precedence over the configuration file. -->
+Environment variables take precedence over the configuration file.
The default `make-images.cfg` would look something like:
```shell
@@ -361,6 +375,11 @@ IMAGE_SPREAD=(
)
```
+An explicit configuration file can be manually specified:
+```shell
+$ make-spreads.sh -c <path> ..
+```
+
---
@@ -375,6 +394,7 @@ $ cls2tex.sh --help
```
The `--help` says it all:
+<!-- :r !cl2tex.sh --help -->
```
Generate docs from latex package/class
@@ -392,8 +412,8 @@ This will:
- read the INPUT
- keep lines starting with \def\<module-name>@[A-Z]\+
- keep lines starting with '%%'
- - %%%%% Text -> \subsection(Text)
- - %%%% Text -> \section(Text)
+ - %%%%% Text -> \subsection{Text}
+ - %%%% Text -> \section{Text}
- %% >> code -> \begin{verbatim}code\end{verbatim}
- write the result to OUTPUT
diff --git a/Master/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh b/Master/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh
index d7e6c1013ea..34cf872b1d9 100755
--- a/Master/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh
+++ b/Master/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh
@@ -26,8 +26,8 @@ printhelp(){
echo " - read the INPUT"
echo " - keep lines starting with \\def\\<module-name>@[A-Z]\\+"
echo " - keep lines starting with '%%'"
- echo " - %%%%% Text -> \\subsection(Text)"
- echo " - %%%% Text -> \\section(Text)"
+ echo " - %%%%% Text -> \\subsection{Text}"
+ echo " - %%%% Text -> \\section{Text}"
echo " - %% >> code -> \\begin{verbatim}code\\end{verbatim}"
echo " - write the result to OUTPUT"
echo
diff --git a/Master/texmf-dist/doc/latex/photobook/scripts/make-spreads.cfg.example b/Master/texmf-dist/doc/latex/photobook/scripts/make-spreads.cfg.example
new file mode 100644
index 00000000000..4627fee3397
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/photobook/scripts/make-spreads.cfg.example
@@ -0,0 +1,39 @@
+# if non-empty make-spreads.sh will add image paths to pdf notes...
+ANOTATE_IMAGE_PATHS=
+
+# file extensions to treat as text (separated with "|")
+TEXT_FORMATS=txt
+
+# file extensions to treat as images (separated with "|")
+IMAGE_FORMATS=jpeg|jpg|png|pdf|svg|eps
+
+# default directory spread definitions are located in...
+SPREADS_DIR=spreads/
+
+# if non-empty link link images to matching ones from this directory...
+IMAGE_HIRES_DIR=
+
+# directory where external captions are stored...
+CAPTION_DIR=captions/
+
+# root template directory...
+TEMPLATE_DIR=templates/
+
+# empty page template...
+EMPTY_PAGE=emptypage
+
+# text page template...
+TEXT_PAGE=textpage
+
+# image page template...
+IMAGE_PAGE=imagepage
+
+# spread templates...
+IMAGE_SPREAD=(
+ #
+ # +------- number of found images
+ # / +-- template name
+ # / /
+ [0]=text-spread
+ [2]=image-image
+)
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 57be2ff448d..1b10fc56cce 100644
--- a/Master/texmf-dist/doc/latex/photobook/scripts/make-spreads.sh
+++ b/Master/texmf-dist/doc/latex/photobook/scripts/make-spreads.sh
@@ -2,75 +2,15 @@
shopt -s nullglob extglob
#----------------------------------------------------------------------
-#
-# TIP: It is better to think of a visual book as a set of spreads
-# rather than a set of pages, hence the focus on spreads in the
-# code below.
-# The main unit of a "visual" book is a spread, it's the thing
-# you see when you hold the book open, and the main workflow
-# when building a book is creating spreads and ordering them so
-# a single page is almost never treated as an independent unit.
-# TIP: it is not recommended to use too many templates, the layout
-# should be and feel structured and this structure should not be
-# too complex for the average reader to get comfortable in.
-#
+#
+# For docs see README.md
+#
#
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-#
-# Template structure:
-# templates/
-# spread.tex
-# imagepage.tex
-# textpage.tex
-# ...
-# captions/
-# <image>.txt
-# image caption.
-# this is separated to decouple caption writing from the
-# changes to the layout/sequencing and this drastically
-# simplify the work with writers.
-# For this reason this takes priority over local captions (XXX revise).
-# ...
-# $SPREADS_DIR/
+#
+# XXX DOC:
# $spread/
-# tweaks.tex
-# template tweaks.
-# loaded before the templates are handled.
-# layout.tex
-# manual layout of spread.
-# if given rest of directory contents are
-# ignored.
-# fields:
-# ${IMAGE0}
-# replaced with image path
-# ${CAPTION0}
-# replaced with content of caption file if found
-# and empty otherwise.
-# ${TEXT0}
-# replaced with the content of a text file if
-# found and empty otherwise.
-# ...
-# NOTE: if images are included, hi-res source
-# substitution is not done here.
-# NOTE: fields are ordered and matched according to their
-# position and not their number, e.g. in the following
-# sequence:
-# IMAGE, IMAGE10, IMAGE20, ..,
-# CAPTION2, CAPTION7, CAPTION12, ..
-# IMAGE10 will be filled with the second found image
-# and CAPTION7 will be filled with the second found
-# caption.
-# <spread-template-name>.tpl
-# indicates the spread template to use.
-# if given the rest of the .tex files in
-# directory are ignored.
-# resolves to:
-# templates/<spread-template-name>.tex
-# fields:
-# ${IMAGE0}
-# ${CAPTION0}
-# ${TEXT0}
-# ...
+# ...
# imagepage.tex
# image page template.
# fields:
@@ -87,73 +27,50 @@ shopt -s nullglob extglob
# <spread-template-name>-textpage.tpl
# indicates the image/text page template to use.
# ignored if explicit templates are given.
-# fields:
-# ${IMAGE}
-# ${CAPTION}
-# ${TEXT}
-# ...
-# 00-<image>.png
-# image.
-# if $IMAGE_HIRES_DIR is set then this will
-# resolve to:
-# $IMAGE_HIRES_DIR/<image>
-# supported formats:
-# .jpeg, .png, .pdf, .svg, .eps
-# (see $IMAGE_FORMATS)
-# 00-<image>.txt
-# local image caption text.
-# NOTE: this must be named the same as the image.
-# 01-<text>.txt
-# text.
# ...
-# ...
-#
-#
-# Env variables:
-# ANOTATE_IMAGE_PATHS=
-# TEXT_FORMATS=<ext>|..
-# IMAGE_FORMATS=<ext>|..
-# SPREADS_DIR=<path>
-# IMAGE_HIRES_DIR=<path>
-# sets the path to which the hi-res images are resolved.
-# CAPTION_DIR=<path>
-# TEMPLATE_DIR=<path>
-# EMPTY_PAGE=<name>
-# TEXT_PAGE=<name>
-# IMAGE_PAGE=<name>
-# IMAGE_SPREAD=<array>
-#
-#
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-#
-# XXX
#
#
#
#----------------------------------------------------------------------
-
# load config...
+
CONFIG=${CONFIG:=$(basename ${0%.*}).cfg}
+# prepend CFG_ to settings in config...
+# NOTE: this is done to prevent them overriding the environment...
[ -e $CONFIG ] \
- && source "$CONFIG"
+ && eval $(cat "$CONFIG" \
+ | sed -e 's/^\(\s*\)\([A-Z_]\+=\)/\1CFG_\2/')
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# defaults...
+#
# NOTE: all of these options can be either set in the $CONFIG file or
# set in the script env.
# NOTE: env takes priority over $CONFIG
# if set add pdf annotations of paths to each image...
+ANOTATE_IMAGE_PATHS=${ANOTATE_IMAGE_PATHS:=$CFG_ANOTATE_IMAGE_PATHS}
ANOTATE_IMAGE_PATHS=${ANOTATE_IMAGE_PATHS:=}
# supported formats/extensions...
+TEXT_FORMATS=${TEXT_FORMATS:=$CFG_TEXT_FORMATS}
TEXT_FORMATS=${TEXT_FORMATS:=txt}
+
+IMAGE_FORMATS=${IMAGE_FORMATS:=$CFG_IMAGE_FORMATS}
IMAGE_FORMATS=${IMAGE_FORMATS:=jpeg|jpg|png|pdf|svg|eps}
+
+SPREADS_DIR=${SPREADS_DIR:=$CFG_SPREADS_DIR}
SPREADS_DIR=${SPREADS_DIR:=spreads/}
+
+IMAGE_HIRES_DIR=${IMAGE_HIRES_DIR:=$CFG_IMAGE_HIRES_DIR}
IMAGE_HIRES_DIR=${IMAGE_HIRES_DIR:=}
+
+CAPTION_DIR=${CAPTION_DIR:=$CFG_CAPTION_DIR}
CAPTION_DIR=${CAPTION_DIR:=captions/}
+
+TEMPLATE_DIR=${TEMPLATE_DIR:=$CFG_TEMPLATE_DIR}
TEMPLATE_DIR=${TEMPLATE_DIR:=templates/}
# Default templates
@@ -161,18 +78,30 @@ TEMPLATE_DIR=${TEMPLATE_DIR:=templates/}
# page components...
# page templates...
+EMPTY_PAGE=${EMPTY_PAGE:=$CFG_EMPTY_PAGE}
EMPTY_PAGE=${EMPTY_PAGE:=emptypage}
+
+TEXT_PAGE=${TEXT_PAGE:=$CFG_TEXT_PAGE}
TEXT_PAGE=${TEXT_PAGE:=textpage}
+
+IMAGE_PAGE=${IMAGE_PAGE:=$CFG_IMAGE_PAGE}
IMAGE_PAGE=${IMAGE_PAGE:=imagepage}
# dynamic spread templates...
# NOTE: the index here corresponds to the number of images found in a
# spread directory...
if [ ${#IMAGE_SPREAD[@]} = 0 ] ; then
- IMAGE_SPREAD=(
- [0]=text-spread
- [2]=image-image
- )
+ if [ ${#CFG_IMAGE_SPREAD[@]} != 0 ] ; then
+ IMAGE_SPREAD=()
+ for i in ${!CFG_IMAGE_SPREAD[@]} ; do
+ IMAGE_SPREAD[$i]=${CFG_IMAGE_SPREAD[$i]}
+ done
+ else
+ IMAGE_SPREAD=(
+ [0]=text-spread
+ [2]=image-image
+ )
+ fi
fi
@@ -188,17 +117,18 @@ printhelp(){
echo
echo "Arguments:"
echo " -h --help - print this help and exit."
+ echo " -c PATH - load configuration from PATH."
echo " -a --annotate"
echo " - add annotations with image paths to pages."
- echo " --templates=PATH"
+ echo " --templates PATH"
echo " - path to search for templates (default: $TEMPLATE_DIR)."
- echo " --single-image-tpl=NAME"
+ echo " --single-image-tpl NAME"
echo " - single image default template (default: ${IMAGE_SPREAD[1]})."
- echo " --double-image-tpl=NAME"
+ echo " --double-image-tpl NAME"
echo " - double image default template (default: ${IMAGE_SPREAD[2]})."
- echo " --text-spread-tpl=NAME"
+ echo " --text-spread-tpl NAME"
echo " - text spread default template (default: ${IMAGE_SPREAD[0]})."
- echo " --captions=PATH"
+ echo " --captions PATH"
echo " - path to search for captions (default: $CAPTION_DIR)."
echo
echo "Parameters:"
@@ -248,31 +178,32 @@ while true ; do
ANOTATE_IMAGE_PATHS=1
shift
;;
+ -c)
+ $CONFIG="$2"
+ [ -e "$CONFIG" ] \
+ && source "$CONFIG"
+ shift 2
+ ;;
--templates)
TEMPLATE_DIR=$2
- shift
- shift
+ shift 2
;;
--single-image-tpl)
IMAGE_SPREAD[1]=$2
- shift
- shift
+ shift 2
;;
--double-image-tpl)
IMAGE_SPREAD[2]=$2
- shift
- shift
+ shift 2
;;
--text-spread-tpl)
IMAGE_SPREAD[0]=$2
- shift
- shift
+ shift 2
;;
--captions)
CAPTION_DIR=$2
- shift
- shift
+ shift 2
;;
# handle unknown options...
@@ -289,7 +220,7 @@ done
if [ -z $1 ] ; then
- SPREADS_DIR=pages/
+ SPREADS_DIR=spreads/
else
SPREADS_DIR=$1/
fi
@@ -348,24 +279,44 @@ readCaption(){
# getTemplate SPREAD TYPE
#
getTemplate(){
- local SPREAD=$1
- local TYPE=$2
- local TEMPLATE=($SPREAD/*-$TYPE.tex)
- if [ -z $TEMPLATE ] ; then
- TEMPLATE=($SPREAD/*-$TYPE.tpl)
- if ! [ -z $TEMPLATE ] ; then
- TEMPLATE=${TEMPLATE/$SPREAD\//}
- TEMPLATE=${TEMPLATE/[0-9]-/}
- TEMPLATE="$TEMPLATE_DIR/${TEMPLATE[0]%-${TYPE}.*}.tex"
+ local spread=$1
+ local name=$2
+ local template
+
+ if [[ $name =~ .*\.tex ]] ; then
+ # already an existing template...
+ if [ -e "$name" ] ; then
+ echo $name
+ return
fi
+ # normalize...
+ name=${name%.tex}
+ # normalize template name...
+ elif [[ $name =~ .*\.tpl ]] ; then
+ name=$( echo $name \
+ | sed \
+ -e 's/.tpl$//' \
+ -e "s%$spread/%%" \
+ -e 's/^[0-9]\+-//' )
fi
- if [ -z $TEMPLATE ] ; then
- TEMPLATE="$TEMPLATE_DIR/${TYPE}.tex"
+
+ # local template...
+ template=($spread/*-$name.tex)
+ if [ ${#template[@]} != 0 ] ; then
+ template=${template[0]}
+ else
+ template=($spread/$name.tex)
fi
- if ! [ -e $TEMPLATE ] ; then
- return
+ # global template...
+ if [ -z $template ] \
+ || ! [ -e "$template" ] ; then
+ template="$TEMPLATE_DIR/${name}.tex"
fi
- echo $TEMPLATE
+ # check if the thing exists...
+ if ! [ -e $template ] ; then
+ return 1
+ fi
+ echo $template
}
@@ -429,7 +380,7 @@ populateTemplate(){
local i=0
for var in ${slots[@]} ; do
name=${var//[0-9]/}
- if ! [ ${name} = "IMAGE" ] ; then
+ if [ ${name} != "IMAGE" ] ; then
continue
fi
@@ -449,14 +400,14 @@ populateTemplate(){
i=$(( i + 1 ))
val=${val//\//\\/}
- text=$(echo -e "${text}" | \
+ text=$(echo "${text}" | \
sed "s/\${${var}}/${val%.*}/g")
done
# pass 2: captions...
for var in ${slots[@]} ; do
name=${var//[0-9]/}
- if ! [ ${name} = "CAPTION" ] ; then
+ if [ ${name} != "CAPTION" ] ; then
continue
fi
@@ -472,7 +423,7 @@ populateTemplate(){
val=$(readCaption "${val}")
fi
- text=$(echo -e "${text}" | \
+ text=$(echo "${text}" | \
sed "s/\${${var}}/${val}/g")
done
@@ -493,14 +444,14 @@ populateTemplate(){
done
val=${val//\//\\/}
- text=$(echo -e "${text}" | \
+ text=$(echo "${text}" | \
sed "s/\${${var}}/${val}/g")
done
# print out the filled template...
echo % template: $tpl
- echo -e "${text}"
- return 0
+ echo "${text}"
+ return
}
@@ -641,27 +592,29 @@ handleSpread(){
# ignore the rest of the items when we are done
# creating two pages...
[ $C == 2 ] \
- && return 0
+ && return
done
fi
fi
# formatting done...
[ -z $template ] \
- && return 0
-
- # format template path...
- template=${template/$spread\//}
- template=${template/[0-9]-/}
- # get...
- template="${template[0]%.*}.tex"
- if ! [ -e "$template" ] ; then
- template="$TEMPLATE_DIR/${template[0]%.*}.tex"
+ && return
+
+ # resolve the template path...
+ local p=$template
+ template=$(getTemplate "$spread" "$template")
+
+ # not found...
+ if [ -z $template ] ; then
+ echo "%"
+ echo "% ERROR: could not resolve template: $p" | tee >(cat >&2)
+ echo "%"
fi
fi
populateTemplate "$spread" "$template" "${img[@]}" "${txt[@]}"
- return 0
+ return $?
}
diff --git a/Master/texmf-dist/tex/latex/photobook/photobook.cls b/Master/texmf-dist/tex/latex/photobook/photobook.cls
index 8f9da6cf24d..0ade3c4ac0b 100644
--- a/Master/texmf-dist/tex/latex/photobook/photobook.cls
+++ b/Master/texmf-dist/tex/latex/photobook/photobook.cls
@@ -76,8 +76,8 @@
%%% NOTE: \def\<module-name>@[A-Z]+ macros will be visible to both the
%%% code and the generated docs...
-\edef\photobook@FILEVERSION{v0.1.10}
-\edef\photobook@FILEDATE{2023-03-11}
+\edef\photobook@FILEVERSION{v0.1.15}
+\edef\photobook@FILEDATE{2023-03-18}
%% \documentclass{ltxdoc}
@@ -1156,6 +1156,19 @@
\InitPages%
\ResetFoldMarks}
+%% \DescribeMacro{\ChangeLayout}
+%
+%% Change document layout.
+%
+%% >> \ChangeLayout{<layoutmode>}
+%
+%% This is a shorthand for |\def\layoutmode{<layoutmode>}| and then
+%% |\ReInitPages|, and as this is changing any other parameters that may
+%% affect the layout, this should be done last.
+%%
+\newcommand\ChangeLayout[1]{%
+ \def\layoutmode{#1}%
+ \ReInitPages}
%----------------------------------------------------------------------
diff --git a/Master/tlpkg/tlpsrc/photobook.tlpsrc b/Master/tlpkg/tlpsrc/photobook.tlpsrc
index e69de29bb2d..a8d75a833ca 100644
--- a/Master/tlpkg/tlpsrc/photobook.tlpsrc
+++ b/Master/tlpkg/tlpsrc/photobook.tlpsrc
@@ -0,0 +1,36 @@
+hard kvoptions
+#hard calc (in tools)
+hard xargs
+#hard ifthen (in base)
+hard iftex
+hard pgf
+#hard pgffor
+hard xint
+#hard xinttools (in xint)
+hard listofitems
+hard xkeyval
+hard etoolbox
+hard atbegshi
+#hard afterpage (in tools)
+hard changepage
+hard hyperref
+hard pdfcomment
+hard eso-pic
+hard environ
+hard numprint
+#hard trimclip (in adjustbox)
+hard xcolor
+hard pagecolor
+hard colorspace
+hard graphics
+#hard graphicx
+hard adjustbox
+hard textpos
+hard fancyvrb
+#hard tikz (in pgf)
+hard mdframed
+hard flowfram
+#hard rotating (in graphics)
+hard fancyhdr
+hard pdfpages
+hard geometry