diff options
author | Karl Berry <karl@freefriends.org> | 2023-09-12 20:15:07 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-09-12 20:15:07 +0000 |
commit | ae70f6a039cf4bacb6b55b7401d55fd2b3d78afc (patch) | |
tree | 080aa708b36a076e3235494beb62d86a3786e62c | |
parent | e05f80dabb2b4383a504a4cb28184707c2a63dfe (diff) |
photobook (12sep23)
git-svn-id: svn://tug.org/texlive/trunk@68254 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/photobook/photobook.pdf | bin | 144593 -> 144969 bytes | |||
-rw-r--r-- | Master/texmf-dist/tex/latex/photobook/photobook.cls | 88 |
2 files changed, 42 insertions, 46 deletions
diff --git a/Master/texmf-dist/doc/latex/photobook/photobook.pdf b/Master/texmf-dist/doc/latex/photobook/photobook.pdf Binary files differindex a51b6c384d6..dc2338a1411 100644 --- a/Master/texmf-dist/doc/latex/photobook/photobook.pdf +++ b/Master/texmf-dist/doc/latex/photobook/photobook.pdf diff --git a/Master/texmf-dist/tex/latex/photobook/photobook.cls b/Master/texmf-dist/tex/latex/photobook/photobook.cls index 54b7d1f0b35..7ecc155de86 100644 --- a/Master/texmf-dist/tex/latex/photobook/photobook.cls +++ b/Master/texmf-dist/tex/latex/photobook/photobook.cls @@ -93,7 +93,7 @@ %%% NOTE: \def\<module-name>@[A-Z]+ macros will be visible to both the %%% code and the generated docs... -\edef\photobook@FILEVERSION{v0.1.26} +\edef\photobook@FILEVERSION{v0.1.28} \edef\photobook@FILEDATE{2023-08-24} @@ -965,8 +965,8 @@ %%% \DescribeMacro{\clearancetop=<len>} %%% \DescribeMacro{\clearanceright=<len>} %%% \DescribeMacro{\clearancebottom=<len>} -% XXX LEGACY CLEARANCE -%%% \DescribeMacro{\clearance=<len>} +% XXX revise... +%%% \DescribeMacro{\clearances=<len's>} % %% Cell geometry. %% @@ -987,7 +987,6 @@ \setlength\celloffsetleft{0pt} \newlength\celloffsettop \setlength\celloffsettop{0pt} -% XXX EXPERIMENTAL CLEARANCE \newlength\clearanceleft \setlength\clearanceleft{0pt} \newlength\clearancetop @@ -997,9 +996,6 @@ \newlength\clearancebottom \setlength\clearancebottom{0pt} \def\clearances{0pt} -% XXX LEGACY CLEARANCE -%\newlength\clearance -%\setlength\clearance{0pt} %% \DescribeMacro{\clearfoldoutgutter=<len>} @@ -1491,6 +1487,9 @@ %% %% Note that this may span more than one page if there is enough stuff %% packed in. +%% Also note that items within the page environment are placed in the +%% same way as in any normal page, for absolute placement use either +%% specific cells/environments like |papercell| or more generic |call|. %% \newenvironment{page}{% % XXX do we need \null here??? @@ -1617,8 +1616,6 @@ %%% \DescribeMacro{\clearancetop=<len>} %%% \DescribeMacro{\clearanceright=<len>} %%% \DescribeMacro{\clearancebottom=<len>} -% XXX LEGACY CLEARANCE -%%% \DescribeMacro{\clearance=<len>} %% %% A cell defines a set of contextual lengths: %% @@ -1750,13 +1747,10 @@ \setlength\cellheight{\photobook@protect@h}% \setlength\celloffsettop{0pt}% \setlength\celloffsetleft{0pt}% - % XXX EXPERIMENTAL CLEARANCE \setlength\clearanceleft{0pt}% \setlength\clearancetop{0pt}% \setlength\clearanceright{0pt}% \setlength\clearancebottom{0pt}% - % XXX LEGACY CLEARANCE - %\setlength\clearance{0pt}% % \begin{MinipageCellContent}[\photobook@minipagecell@parentvalign]{minipagecell}% }{% @@ -2013,7 +2007,7 @@ %% \DescribeEnv{cliptocell} -%% \DescribeEnv{cliptocellbleeds} +%% \DescribeEnv{setcliptocellbleeds} % %% Clip content to parent cell. %% @@ -2046,24 +2040,27 @@ \setlength\photobook@cliptocell@right{0mm}% \newlength\photobook@cliptocell@bottom \setlength\photobook@cliptocell@bottom{0mm}% + +\def\cliptocellbleeds{{0mm} {0mm} {0mm} {0mm}}% \def\cliptocellclearances{{0mm} {0mm} {0mm} {0mm}}% %% Set the default bleeds for |cliptocell| environments %% -%% >> \cliptocellbleeds{<size>} -%% >> \cliptocellbleeds{<horizontal> <vertical>} -%% >> \cliptocellbleeds{<left> <bottom> <right> <top>} +%% >> \setcliptocellbleeds{<size>} +%% >> \setcliptocellbleeds{<horizontal> <vertical>} +%% >> \setcliptocellbleeds{<left> <bottom> <right> <top>} %% %% This will only affect |cliptocell| environments on the same level, %% without affecting the nested |cliptocell|s. %% +%%% \DescribeEnv{cliptocellbleeds=<left> <bottom> <right> <top>} %%% \DescribeEnv{cliptocellclearances=<left> <bottom> <right> <top>} %%% -%%% Set by |\cliptocellbleeds{..}| and contains clearances (negative -%%% clipping bleeds) usable by imagecell. +%%% Set by |\setcliptocellbleeds{..}| and contain bleeds and clearances (negative +%%% clipping bleeds) respectively, usable by imagecell and others. %%% %%% XXX still testing.... -\newcommand\cliptocellbleeds[1]{ +\newcommand\setcliptocellbleeds[1]{ \setsepchar{ }% \readlist*\photobook@cliptocell@bleeds{#1}% \setsepchar{,}% @@ -2100,6 +2097,11 @@ % NOTE: trailing spaces here are significant... % XXX should we use \the here? % ...it makes things printable... + \def\cliptocellbleeds{% + {\the\photobook@cliptocell@left} % + {\the\photobook@cliptocell@bottom} % + {\the\photobook@cliptocell@right} % + {\the\photobook@cliptocell@top}}% \def\cliptocellclearances{% {-\the\photobook@cliptocell@left} % {-\the\photobook@cliptocell@bottom} % @@ -2109,7 +2111,7 @@ % XXX use \cliptocellclearances as default... \newenvironment{cliptocell}[1][0mm]{% \begingroup% - \cliptocellbleeds{#1} + \setcliptocellbleeds{#1} % NOTE: the spaces at the end of each line here are significant!! \begin{trimbox}{{\photobook@cliptocell@left} % {\photobook@cliptocell@bottom} % @@ -2120,7 +2122,7 @@ {\cellwidth + \photobook@cliptocell@right} % {\height + \photobook@cliptocell@top}}% % set defaults for nested cells... - \cliptocellbleeds{0mm}% + \setcliptocellbleeds{0mm}% \begin{minipage}[t][\cellheight][t]{\cellwidth}% \ignorespaces% }{% @@ -2331,9 +2333,6 @@ \setlength\photobook@imagecell@clearance@right{0pt} \newlength\photobook@imagecell@clearance@bottom \setlength\photobook@imagecell@clearance@bottom{0pt} -% XXX LEGACY -\newlength\photobook@imagecell@clearance -\setlength\photobook@imagecell@clearance{0pt} % NOTE: these feel like a hack... \newlength\photobook@imagecell@imgratio @@ -2348,13 +2347,11 @@ \define@boolkey{imagecell@args}{center}[true]{% \def\photobook@imagecell@top{\dimexpr +0.5\cellheight - % XXX EXPERIMENTAL CLEARANCE -- test... +0.5\photobook@imagecell@clearance@top -0.5\photobook@imagecell@clearance@bottom -0.5\ht\photobook@imagebox \relax}% \def\photobook@imagecell@left{\dimexpr +0.5\cellwidth - % XXX EXPERIMENTAL CLEARANCE -- test... +0.5\photobook@imagecell@clearance@left -0.5\photobook@imagecell@clearance@right -0.5\wd\photobook@imagebox \relax}}% @@ -2363,7 +2360,6 @@ \newcommand\photobook@imagecell@LEFT{% \def\photobook@imagecell@left{\dimexpr% +\photobook@imagecell@clearance@left \relax}% - %+\photobook@imagecell@clearance \relax}% \def\photobook@imagecell@captionleft{ % XXX not sure why this branch is needed... \ifKV@imagecell@args@fit @@ -2403,7 +2399,6 @@ \define@boolkey{imagecell@args}{top}[true]{% \def\photobook@imagecell@top{% \photobook@imagecell@clearance@top}% - %\photobook@imagecell@clearance}% \def\photobook@imagecell@captiontop{% -\dimexpr +\cellheight @@ -2419,7 +2414,6 @@ \dimexpr \photobook@imagecell@top +\photobook@imagecell@clearance@bottom \relax}}% - %+\photobook@imagecell@clearance \relax}}% % clearance=<len>... % clearance=<horizontal> <vertical>... % clearance=<left> <bottom> <right> <top>... @@ -2427,7 +2421,7 @@ % XXX EXPERIMENTAL % XXX this is essentially the same as \photobook@cliptocell@bleeds -- unite... \def\photobook@imagecell@clearances{#1}% - \setsepchar{ } + \setsepchar{ }% \readlist*\photobook@imagecell@clearencelist{#1}% \setsepchar{,}% %% args: size @@ -2459,9 +2453,7 @@ \setlength\photobook@imagecell@clearance@right{% \photobook@imagecell@clearencelist[3]}% \setlength\photobook@imagecell@clearance@top{% - \photobook@imagecell@clearencelist[4]}\fi% - % XXX LEGACY... - \setlength\photobook@imagecell@clearance{#1}}% + \photobook@imagecell@clearencelist[4]}\fi}% % offsettop=<len> / offsetleft=<len>... % XXX DOC!!! @@ -2511,12 +2503,10 @@ \cellwidth - \photobook@imagecell@clearance@left - \photobook@imagecell@clearance@right \relax, - %- ((\photobook@imagecell@clearance) * 2) \relax, height=\photobook@imagecell@scale\dimexpr \cellheight - \photobook@imagecell@clearance@top - \photobook@imagecell@clearance@bottom \relax]{#3}}% - %- ((\photobook@imagecell@clearance) * 2) \relax]{#3}}% % fill... \else\ifKV@imagecell@args@fill% % preload image to get its proportions... @@ -2537,7 +2527,6 @@ + \cellwidth - \photobook@imagecell@clearance@left - \photobook@imagecell@clearance@right \relax]{#3}}% - %- ((\photobook@imagecell@clearance) * 2) \relax]{#3}}% \else% \sbox{\photobook@imagebox}{% \includegraphics[% @@ -2546,7 +2535,6 @@ + \cellheight - \photobook@imagecell@clearance@top - \photobook@imagecell@clearance@bottom \relax]{#3}}% - %- ((\photobook@imagecell@clearance) * 2) \relax]{#3}}% \fi\fi\fi% % \setlength\celloffsetleft{% @@ -2589,14 +2577,11 @@ \maxdim{\celloffsetleft}{0pt}}% \setlength\celloffsettop{% \maxdim{\celloffsettop}{0pt}}% - % XXX EXPERIMENTAL CLEARANCE \setlength\clearanceleft{\photobook@imagecell@clearance@left} \setlength\clearancetop{\photobook@imagecell@clearance@top} \setlength\clearanceright{\photobook@imagecell@clearance@right} \setlength\clearancebottom{\photobook@imagecell@clearance@bottom} \def\clearances{\photobook@imagecell@clearences} - % XXX LEGACY CLEARANCE - %\setlength\clearance{\photobook@imagecell@clearance}% % clear parent... % XXX might be a good idea to put this into a special reusable cell... \ifphotobook@imagecell@captionclearparent% @@ -3055,10 +3040,12 @@ - \photobook@captionblockcell@spacing - \cellwidth - \clearcaption + % XXX EXPERIMENTAL CLEARANCE % XXX this is only present in images... - % XXX change this to use \clearanceleft / \clearanceright / ... + - \clearanceleft + %- \clearanceright % XXX LEGACY CLEARANCE - - \clearance + %- \clearance \relax% \else% \photobook@captionblockcell@width\fi}% @@ -4079,8 +4066,10 @@ % XXX EXPERIMENTAL \newenvironment{leftside*}{% \begin{leftside}% - \cliptocellbleeds{{\bleed} {\bleed} 0mm {\bleed}}% + \begin{cliptocell}[{\bleed} {\bleed} 0mm {\bleed}]% + \setcliptocellbleeds{{\bleed} {\bleed} 0mm {\bleed}}% }{% + \end{cliptocell} \end{leftside}} \newenvironment{rightside}{% @@ -4092,8 +4081,10 @@ % XXX EXPERIMENTAL \newenvironment{rightside*}{% \begin{rightside}% - \cliptocellbleeds{0mm {\bleed} {\bleed} {\bleed}}% + \begin{cliptocell}[0mm {\bleed} {\bleed} {\bleed}]% + \setcliptocellbleeds{0mm {\bleed} {\bleed} {\bleed}}% }{% + \end{cliptocell} \end{rightside}} @@ -4872,7 +4863,8 @@ %\clearpage% \begin{page}% % NOTE: this does not account for \bindingoffset... - \begin{pagecell}% + % XXX should this be a page or a paper cell??? + \begin{papercell}% \imagecell[% center, clearance=-\bleed, @@ -4881,7 +4873,7 @@ offsetleft=\imageoffsetleft, captionclearparent=\captionclearpage, #1]{#2}{#3}% - \end{pagecell}% + \end{papercell}% \end{page}% % special case: centered vertical image -> account for \bindingoffset... \else% @@ -5462,6 +5454,10 @@ %% %% This is a no-op for |layoutmode=block|. %% +%% To change text color set |\textcolor{<color>}| the usual way and for +%% line and fill colors use |\textblockrulecolour{<color>}| and +%% |\textblockcolour{<colour>}| respecitvely. +%% % XXX should digits/rounding be configurable??? \newcommand\photobook@TemplateCell[2][mm]{ \begin{center} |