From 73ec52c88644cf508ac5ebe3b54b7194546fd02f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 20 Apr 2023 20:00:08 +0000 Subject: photobook (20apr23) git-svn-id: svn://tug.org/texlive/trunk@66905 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/photobook/photobook.cls | 92 ++++++++++++++++++---- 1 file changed, 78 insertions(+), 14 deletions(-) (limited to 'Master/texmf-dist/tex') 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\@[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}[] ... \end{cliptocell} +%% >> \begin{cliptocell}[ ] ... \end{cliptocell} +%% >> \begin{cliptocell}[ ] ... \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},% -- cgit v1.2.3