summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/photobook/photobook.cls92
1 files changed, 78 insertions, 14 deletions
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},%