mirror of
https://github.com/flynx/photobook.git
synced 2025-12-17 00:51:39 +00:00
minor refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
c42d8a4208
commit
2034e4fdfe
@ -2003,42 +2003,45 @@
|
|||||||
\newlength\photobook@cliptocell@bottom
|
\newlength\photobook@cliptocell@bottom
|
||||||
\setlength\photobook@cliptocell@bottom{0mm}%
|
\setlength\photobook@cliptocell@bottom{0mm}%
|
||||||
|
|
||||||
|
% XXX EXPERIMENTAL
|
||||||
|
% XXX should this set the setsepchar back to default???
|
||||||
|
\newcommand\cliptocellbleeds[1]{
|
||||||
|
\setsepchar{ }%
|
||||||
|
\readlist*\photobook@cliptocell@bleeds{#1}%
|
||||||
|
% args: size
|
||||||
|
\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%
|
||||||
|
% args: 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%
|
||||||
|
% args: left bottom right top
|
||||||
|
\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}
|
||||||
|
|
||||||
\newenvironment{cliptocell}[1][0mm]{%
|
\newenvironment{cliptocell}[1][0mm]{%
|
||||||
\begingroup%
|
\begingroup%
|
||||||
\setsepchar{ }%
|
\cliptocellbleeds{#1}
|
||||||
\readlist*\photobook@cliptocell@bleeds{#1}%
|
|
||||||
%
|
|
||||||
% args: size
|
|
||||||
\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%
|
|
||||||
% args: 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%
|
|
||||||
% args: left bottom right top
|
|
||||||
\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%
|
|
||||||
%
|
|
||||||
% NOTE: the spaces at the end of each line here are significant!!
|
% NOTE: the spaces at the end of each line here are significant!!
|
||||||
\begin{trimbox}{{\photobook@cliptocell@left} %
|
\begin{trimbox}{{\photobook@cliptocell@left} %
|
||||||
{\photobook@cliptocell@bottom} %
|
{\photobook@cliptocell@bottom} %
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user