From cbc5a1fa32ba53f7492234c8e4e7a4b19a101c50 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 29 Oct 2021 23:27:21 +0300 Subject: [PATCH] some refactoring... Signed-off-by: Alex A. Naanou --- photobook.cls | 56 +++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/photobook.cls b/photobook.cls index bc3f705..43871b9 100644 --- a/photobook.cls +++ b/photobook.cls @@ -714,8 +714,8 @@ %% % XXX this behaves in an odd way on bottom markers if size is smaller than 6mm... % XXX rename if we are using sboxes for marks... -\newlength\foldmarksize -\setlength\foldmarksize{\photobook@foldmarksize} +\newlength\photobook@foldmarklen +\setlength\photobook@foldmarklen{\photobook@foldmarksize} %\setlength\foldmarksize{6mm} %% \DescribeMacro{\iffoldmarks} @@ -3065,55 +3065,55 @@ \newcommand\ResetFoldMarks{% \sbox{\photobook@foldinmark}{% % XXX MARKOFFSET - %\vspace{0.5\foldmarksize}% + %\vspace{0.5\photobook@foldmarklen}% \smash{\makebox[0pt][l]{% % size-agnostic centering... \hspace{-5mm}{\makebox[1cm][c]{% \begin{tikzpicture}% \draw[white, ultra thick] - (-0.3333\foldmarksize,0.3333\foldmarksize) + (-0.3333\photobook@foldmarklen,0.3333\photobook@foldmarklen) -- (0,0) - -- (0.3333\foldmarksize,0.3333\foldmarksize); + -- (0.3333\photobook@foldmarklen,0.3333\photobook@foldmarklen); \draw[white, ultra thick] - (0,0.6666\foldmarksize) - -- (0,-0.3333\foldmarksize); + (0,0.6666\photobook@foldmarklen) + -- (0,-0.3333\photobook@foldmarklen); \draw[black, thin] - (-0.3333\foldmarksize,0.3333\foldmarksize) + (-0.3333\photobook@foldmarklen,0.3333\photobook@foldmarklen) -- (0,0) - -- (0.3333\foldmarksize,0.3333\foldmarksize); + -- (0.3333\photobook@foldmarklen,0.3333\photobook@foldmarklen); \draw[black, thin] - (0,0.6666\foldmarksize) - -- (0,-0.3333\foldmarksize); + (0,0.6666\photobook@foldmarklen) + -- (0,-0.3333\photobook@foldmarklen); \end{tikzpicture}}}}}} \sbox{\photobook@foldoutmark}{% % XXX MARKOFFSET - %\vspace{0.5\foldmarksize}% + %\vspace{0.5\photobook@foldmarklen}% \smash{\makebox[0pt][l]{% % size-agnostic centering... \hspace{-5mm}{\makebox[1cm][c]{% \begin{tikzpicture}% \draw[white, ultra thick] - (-0.3333\foldmarksize,0) - -- (0,0.3333\foldmarksize) - -- (0.3333\foldmarksize,0); + (-0.3333\photobook@foldmarklen,0) + -- (0,0.3333\photobook@foldmarklen) + -- (0.3333\photobook@foldmarklen,0); \draw[white, ultra thick] - (0,0.6666\foldmarksize) - -- (0,-0.3333\foldmarksize); + (0,0.6666\photobook@foldmarklen) + -- (0,-0.3333\photobook@foldmarklen); \draw[black, thin] - (-0.3333\foldmarksize,0) - -- (0,0.3333\foldmarksize) - -- (0.3333\foldmarksize,0); + (-0.3333\photobook@foldmarklen,0) + -- (0,0.3333\photobook@foldmarklen) + -- (0.3333\photobook@foldmarklen,0); \draw[black, thin] - (0,0.6666\foldmarksize) - -- (0,-0.3333\foldmarksize); + (0,0.6666\photobook@foldmarklen) + -- (0,-0.3333\photobook@foldmarklen); \end{tikzpicture}}}}}}} \ResetFoldMarks % XXX EXPERIMENTAL... % ...if used, make \foldmarksize private... \newcommand\setfoldmarksize[1][6mm]{% - \setlength\foldmarksize{#1}% - %\edef\photobook@foldmarksize{#1}% + \setlength\photobook@foldmarklen{#1}% + %\edef\photobook@foldmarklen{#1}% \ResetFoldMarks} % >> \foldinmark[] @@ -3121,14 +3121,14 @@ % XXX MARKOFFSET for some reason splitting this (#1 kept here while \foldmarksize % is in fold*mark) breaks alignment... %\vspace{#1}% - \vspace{\dimexpr 0.5\foldmarksize + #1 \relax}% + \vspace{\dimexpr 0.5\photobook@foldmarklen + #1 \relax}% \usebox\photobook@foldinmark} % >> \foldoutmark[] \newcommand\foldoutmark[1][0pt]{ % XXX MARKOFFSET for some reason splitting this (#1 kept here while \foldmarksize % is in fold*mark) breaks alignment... %\vspace{#1}% - \vspace{\dimexpr 0.5\foldmarksize + #1 \relax}% + \vspace{\dimexpr 0.5\photobook@foldmarklen + #1 \relax}% \usebox\photobook@foldoutmark} % >> \photobook@foldmark[]{}{, } @@ -3150,9 +3150,9 @@ \end{textblock*}% \endgroup} \newcommand\photobook@topfoldmark[2][in]{% - \photobook@foldmark[-0.5\foldmarksize]{#1}{#2}} + \photobook@foldmark[-0.5\photobook@foldmarklen]{#1}{#2}} \newcommand\photobook@bottomfoldmark[2][in]{% - \photobook@foldmark[0.5\foldmarksize]{#1}{#2}} + \photobook@foldmark[0.5\photobook@foldmarklen]{#1}{#2}} % >> \photobook@markfold[]{} \newcommand\photobook@markfold[2][in]{% \photobook@topfoldmark[#1]{