mirror of
https://github.com/flynx/photobook.git
synced 2025-10-28 18:00:10 +00:00
cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
c3896ba7f9
commit
ea10fa1004
@ -16,116 +16,53 @@
|
|||||||
|
|
||||||
\begin{document} % - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
\begin{document} % - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
\begin{page}
|
% the simplest way to fill...
|
||||||
cliptocellclearances=\cliptocellclearances
|
|
||||||
|
|
||||||
\cliptocellbleeds{5pt}
|
|
||||||
|
|
||||||
cliptocellclearances=\cliptocellclearances
|
|
||||||
|
|
||||||
\cliptocellbleeds{1pt 2pt}
|
|
||||||
|
|
||||||
cliptocellclearances=\cliptocellclearances
|
|
||||||
|
|
||||||
\cliptocellbleeds{1pt 2pt 3pt 4pt}
|
|
||||||
|
|
||||||
cliptocellclearances=\cliptocellclearances
|
|
||||||
\end{page}
|
|
||||||
|
|
||||||
|
|
||||||
\ImagePageFill{}{DSC00403-2}
|
\ImagePageFill{}{DSC00403-2}
|
||||||
|
|
||||||
|
|
||||||
|
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
|
% manual...
|
||||||
|
% NOTE: to fill the page the image cell needs to be placed relative to
|
||||||
|
% the page (papercell / pagecell) and not the text (page env)
|
||||||
\begin{page}
|
\begin{page}
|
||||||
\begin{papercell}
|
\begin{papercell}
|
||||||
\imagecell[fill]{}{DSC00403-2}
|
\imagecell[fill, clearance=-\bleed]{}{DSC00403-2}
|
||||||
\end{papercell}
|
\end{papercell}
|
||||||
\end{page}
|
\end{page}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% XXX for some reason this is not centered correctly but scaling seems
|
|
||||||
% correct -- a page env is not a cell...
|
|
||||||
\begin{page}
|
|
||||||
\imagecell[fill]{}{DSC00403-2}
|
|
||||||
\end{page}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
|
|
||||||
\begin{page}
|
\begin{page}
|
||||||
\begin{leftside}
|
\begin{leftside}
|
||||||
\imagecell[fit]{}{DSC00403-2}
|
\imagecell[fit]{}{DSC00403-2}
|
||||||
\end{leftside}
|
\end{leftside}
|
||||||
|
% XXX seems to be a gap between the image and page border -- need to investigate...
|
||||||
|
% ...setting clearance to 0pt adds a small gap -- is this a stray
|
||||||
|
% space???
|
||||||
\begin{rightside*}
|
\begin{rightside*}
|
||||||
\imagecell[fit, clearance=-\bleed]{}{DSC00403-2}
|
%\imagecell[fit, clearance=0pt]{}{DSC00403-2}
|
||||||
|
\imagecell[fit, clearance=\cliptocellclearances]{}{DSC00403-2}
|
||||||
\end{rightside*}
|
\end{rightside*}
|
||||||
\end{page}
|
\end{page}
|
||||||
|
|
||||||
|
|
||||||
|
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
\begin{page}
|
|
||||||
\begin{leftside}
|
|
||||||
\begin{cliptocell}
|
|
||||||
\imagecell[fit]{}{DSC00403-2}
|
|
||||||
\end{cliptocell}
|
|
||||||
\end{leftside}
|
|
||||||
\begin{rightside}
|
|
||||||
\begin{cliptocell}
|
|
||||||
\imagecell[fit]{}{DSC00403-2}
|
|
||||||
\end{cliptocell}
|
|
||||||
\end{rightside}
|
|
||||||
\end{page}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\begin{page}
|
\begin{page}
|
||||||
\begin{leftside*}
|
\begin{leftside*}
|
||||||
\begin{cliptocell}
|
\imagecell[fill, clearance=\cliptocellclearances]{}{DSC00403-2}
|
||||||
% XXX this breaks things....
|
|
||||||
%\imagecell[fit, clearance={-\bleed} {-\bleed} 0mm {-\bleed}]{}{DSC00403-2}
|
|
||||||
\imagecell[fit, clearance=-\bleed]{}{DSC00403-2}
|
|
||||||
\end{cliptocell}
|
|
||||||
\end{leftside*}
|
\end{leftside*}
|
||||||
\begin{rightside*}
|
\begin{rightside*}
|
||||||
\begin{cliptocell}
|
\imagecell[fill, clearance=\cliptocellclearances]{}{DSC00403-2}
|
||||||
% XXX for some reason this is undefined here...
|
|
||||||
%\cliptocellclearances
|
|
||||||
% XXX \cliptocellclearances does not work yet...
|
|
||||||
%\imagecell[fit, clearance=\cliptocellclearances]{}{DSC00403-2}
|
|
||||||
% XXX this does not seem to be forking correctly...
|
|
||||||
% ...looks like we are not accounting for clearance in offset...
|
|
||||||
\imagecell[fit, clearance={0pt} {-\bleed} {-\bleed} {-\bleed}]{}{DSC00403-2}
|
|
||||||
\end{cliptocell}
|
|
||||||
\end{rightside*}
|
\end{rightside*}
|
||||||
\end{page}
|
\end{page}
|
||||||
|
|
||||||
|
|
||||||
|
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
\begin{page}
|
|
||||||
\begin{leftside}
|
|
||||||
\begin{cliptocell}
|
|
||||||
\imagecell[fill]{}{DSC00403-2}
|
|
||||||
\end{cliptocell}
|
|
||||||
\end{leftside}
|
|
||||||
\begin{rightside*}
|
|
||||||
\begin{cliptocell}
|
|
||||||
% XXX \cliptocellclearances does not work yet...
|
|
||||||
%\imagecell[fill, clearance=\cliptocellclearances]{}{DSC00403-2}
|
|
||||||
% XXX this does not seem to be forking correctly...
|
|
||||||
% ...looks like we are not accounting for clearance in offset...
|
|
||||||
\imagecell[fill, clearance={0pt} {-\bleed} {-\bleed} {-\bleed}]{}{DSC00403-2}
|
|
||||||
\end{cliptocell}
|
|
||||||
\end{rightside*}
|
|
||||||
\end{page}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\GenerateTemplate
|
|
||||||
\GenerateTemplate
|
\GenerateTemplate
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -93,7 +93,7 @@
|
|||||||
|
|
||||||
%%% NOTE: \def\<module-name>@[A-Z]+ macros will be visible to both the
|
%%% NOTE: \def\<module-name>@[A-Z]+ macros will be visible to both the
|
||||||
%%% code and the generated docs...
|
%%% code and the generated docs...
|
||||||
\edef\photobook@FILEVERSION{v0.1.27}
|
\edef\photobook@FILEVERSION{v0.1.28}
|
||||||
\edef\photobook@FILEDATE{2023-08-24}
|
\edef\photobook@FILEDATE{2023-08-24}
|
||||||
|
|
||||||
|
|
||||||
@ -2342,9 +2342,6 @@
|
|||||||
\setlength\photobook@imagecell@clearance@right{0pt}
|
\setlength\photobook@imagecell@clearance@right{0pt}
|
||||||
\newlength\photobook@imagecell@clearance@bottom
|
\newlength\photobook@imagecell@clearance@bottom
|
||||||
\setlength\photobook@imagecell@clearance@bottom{0pt}
|
\setlength\photobook@imagecell@clearance@bottom{0pt}
|
||||||
% XXX LEGACY
|
|
||||||
\newlength\photobook@imagecell@clearance
|
|
||||||
\setlength\photobook@imagecell@clearance{0pt}
|
|
||||||
|
|
||||||
% NOTE: these feel like a hack...
|
% NOTE: these feel like a hack...
|
||||||
\newlength\photobook@imagecell@imgratio
|
\newlength\photobook@imagecell@imgratio
|
||||||
@ -2374,7 +2371,6 @@
|
|||||||
\newcommand\photobook@imagecell@LEFT{%
|
\newcommand\photobook@imagecell@LEFT{%
|
||||||
\def\photobook@imagecell@left{\dimexpr%
|
\def\photobook@imagecell@left{\dimexpr%
|
||||||
+\photobook@imagecell@clearance@left \relax}%
|
+\photobook@imagecell@clearance@left \relax}%
|
||||||
%+\photobook@imagecell@clearance \relax}%
|
|
||||||
\def\photobook@imagecell@captionleft{
|
\def\photobook@imagecell@captionleft{
|
||||||
% XXX not sure why this branch is needed...
|
% XXX not sure why this branch is needed...
|
||||||
\ifKV@imagecell@args@fit
|
\ifKV@imagecell@args@fit
|
||||||
@ -2414,7 +2410,6 @@
|
|||||||
\define@boolkey{imagecell@args}{top}[true]{%
|
\define@boolkey{imagecell@args}{top}[true]{%
|
||||||
\def\photobook@imagecell@top{%
|
\def\photobook@imagecell@top{%
|
||||||
\photobook@imagecell@clearance@top}%
|
\photobook@imagecell@clearance@top}%
|
||||||
%\photobook@imagecell@clearance}%
|
|
||||||
\def\photobook@imagecell@captiontop{%
|
\def\photobook@imagecell@captiontop{%
|
||||||
-\dimexpr
|
-\dimexpr
|
||||||
+\cellheight
|
+\cellheight
|
||||||
@ -2430,7 +2425,6 @@
|
|||||||
\dimexpr
|
\dimexpr
|
||||||
\photobook@imagecell@top
|
\photobook@imagecell@top
|
||||||
+\photobook@imagecell@clearance@bottom \relax}}%
|
+\photobook@imagecell@clearance@bottom \relax}}%
|
||||||
%+\photobook@imagecell@clearance \relax}}%
|
|
||||||
% clearance=<len>...
|
% clearance=<len>...
|
||||||
% clearance=<horizontal> <vertical>...
|
% clearance=<horizontal> <vertical>...
|
||||||
% clearance=<left> <bottom> <right> <top>...
|
% clearance=<left> <bottom> <right> <top>...
|
||||||
@ -2438,7 +2432,7 @@
|
|||||||
% XXX EXPERIMENTAL
|
% XXX EXPERIMENTAL
|
||||||
% XXX this is essentially the same as \photobook@cliptocell@bleeds -- unite...
|
% XXX this is essentially the same as \photobook@cliptocell@bleeds -- unite...
|
||||||
\def\photobook@imagecell@clearances{#1}%
|
\def\photobook@imagecell@clearances{#1}%
|
||||||
\setsepchar{ }
|
\setsepchar{ }%
|
||||||
\readlist*\photobook@imagecell@clearencelist{#1}%
|
\readlist*\photobook@imagecell@clearencelist{#1}%
|
||||||
\setsepchar{,}%
|
\setsepchar{,}%
|
||||||
%% args: size
|
%% args: size
|
||||||
@ -2470,9 +2464,7 @@
|
|||||||
\setlength\photobook@imagecell@clearance@right{%
|
\setlength\photobook@imagecell@clearance@right{%
|
||||||
\photobook@imagecell@clearencelist[3]}%
|
\photobook@imagecell@clearencelist[3]}%
|
||||||
\setlength\photobook@imagecell@clearance@top{%
|
\setlength\photobook@imagecell@clearance@top{%
|
||||||
\photobook@imagecell@clearencelist[4]}\fi%
|
\photobook@imagecell@clearencelist[4]}\fi}%
|
||||||
% XXX LEGACY...
|
|
||||||
\setlength\photobook@imagecell@clearance{#1}}%
|
|
||||||
|
|
||||||
% offsettop=<len> / offsetleft=<len>...
|
% offsettop=<len> / offsetleft=<len>...
|
||||||
% XXX DOC!!!
|
% XXX DOC!!!
|
||||||
@ -2522,12 +2514,10 @@
|
|||||||
\cellwidth
|
\cellwidth
|
||||||
- \photobook@imagecell@clearance@left
|
- \photobook@imagecell@clearance@left
|
||||||
- \photobook@imagecell@clearance@right \relax,
|
- \photobook@imagecell@clearance@right \relax,
|
||||||
%- ((\photobook@imagecell@clearance) * 2) \relax,
|
|
||||||
height=\photobook@imagecell@scale\dimexpr
|
height=\photobook@imagecell@scale\dimexpr
|
||||||
\cellheight
|
\cellheight
|
||||||
- \photobook@imagecell@clearance@top
|
- \photobook@imagecell@clearance@top
|
||||||
- \photobook@imagecell@clearance@bottom \relax]{#3}}%
|
- \photobook@imagecell@clearance@bottom \relax]{#3}}%
|
||||||
%- ((\photobook@imagecell@clearance) * 2) \relax]{#3}}%
|
|
||||||
% fill...
|
% fill...
|
||||||
\else\ifKV@imagecell@args@fill%
|
\else\ifKV@imagecell@args@fill%
|
||||||
% preload image to get its proportions...
|
% preload image to get its proportions...
|
||||||
@ -2548,7 +2538,6 @@
|
|||||||
+ \cellwidth
|
+ \cellwidth
|
||||||
- \photobook@imagecell@clearance@left
|
- \photobook@imagecell@clearance@left
|
||||||
- \photobook@imagecell@clearance@right \relax]{#3}}%
|
- \photobook@imagecell@clearance@right \relax]{#3}}%
|
||||||
%- ((\photobook@imagecell@clearance) * 2) \relax]{#3}}%
|
|
||||||
\else%
|
\else%
|
||||||
\sbox{\photobook@imagebox}{%
|
\sbox{\photobook@imagebox}{%
|
||||||
\includegraphics[%
|
\includegraphics[%
|
||||||
@ -2557,7 +2546,6 @@
|
|||||||
+ \cellheight
|
+ \cellheight
|
||||||
- \photobook@imagecell@clearance@top
|
- \photobook@imagecell@clearance@top
|
||||||
- \photobook@imagecell@clearance@bottom \relax]{#3}}%
|
- \photobook@imagecell@clearance@bottom \relax]{#3}}%
|
||||||
%- ((\photobook@imagecell@clearance) * 2) \relax]{#3}}%
|
|
||||||
\fi\fi\fi%
|
\fi\fi\fi%
|
||||||
%
|
%
|
||||||
\setlength\celloffsetleft{%
|
\setlength\celloffsetleft{%
|
||||||
@ -2606,8 +2594,6 @@
|
|||||||
\setlength\clearanceright{\photobook@imagecell@clearance@right}
|
\setlength\clearanceright{\photobook@imagecell@clearance@right}
|
||||||
\setlength\clearancebottom{\photobook@imagecell@clearance@bottom}
|
\setlength\clearancebottom{\photobook@imagecell@clearance@bottom}
|
||||||
\def\clearances{\photobook@imagecell@clearences}
|
\def\clearances{\photobook@imagecell@clearences}
|
||||||
% XXX LEGACY CLEARANCE
|
|
||||||
%\setlength\clearance{\photobook@imagecell@clearance}%
|
|
||||||
% clear parent...
|
% clear parent...
|
||||||
% XXX might be a good idea to put this into a special reusable cell...
|
% XXX might be a good idea to put this into a special reusable cell...
|
||||||
\ifphotobook@imagecell@captionclearparent%
|
\ifphotobook@imagecell@captionclearparent%
|
||||||
@ -4090,8 +4076,10 @@
|
|||||||
% XXX EXPERIMENTAL
|
% XXX EXPERIMENTAL
|
||||||
\newenvironment{leftside*}{%
|
\newenvironment{leftside*}{%
|
||||||
\begin{leftside}%
|
\begin{leftside}%
|
||||||
\setcliptocellbleeds{{\bleed} {\bleed} 0mm {\bleed}}%
|
\begin{cliptocell}[{\bleed} {\bleed} 0mm {\bleed}]%
|
||||||
|
\setcliptocellbleeds{{\bleed} {\bleed} 0mm {\bleed}}%
|
||||||
}{%
|
}{%
|
||||||
|
\end{cliptocell}
|
||||||
\end{leftside}}
|
\end{leftside}}
|
||||||
|
|
||||||
\newenvironment{rightside}{%
|
\newenvironment{rightside}{%
|
||||||
@ -4103,8 +4091,10 @@
|
|||||||
% XXX EXPERIMENTAL
|
% XXX EXPERIMENTAL
|
||||||
\newenvironment{rightside*}{%
|
\newenvironment{rightside*}{%
|
||||||
\begin{rightside}%
|
\begin{rightside}%
|
||||||
\setcliptocellbleeds{0mm {\bleed} {\bleed} {\bleed}}%
|
\begin{cliptocell}[0mm {\bleed} {\bleed} {\bleed}]%
|
||||||
|
\setcliptocellbleeds{0mm {\bleed} {\bleed} {\bleed}}%
|
||||||
}{%
|
}{%
|
||||||
|
\end{cliptocell}
|
||||||
\end{rightside}}
|
\end{rightside}}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user