photobook/examples/cliptocell-test.tex
Alex A. Naanou 6ef54c6939 updated docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-09-11 22:48:44 +03:00

93 lines
2.4 KiB
TeX

%----------------------------------------------------------------------
\documentclass[
layoutmode=block,
% page size...
blockwidth=240mm, blockheight=220mm,
bleed=4mm,
gutteroffset=5mm,
bindingoffset=0mm,
% image block configuration...
imageblockwidth=0.98, imageblockheight=0.98,
imageblockoffsettop=0,
% misc...
9pt,final,openany
]{photobook}
\usepackage{lipsum}
\usepackage{ragged2e}
% XXX for some reason this is not in the top/left corner...
% XXX bug in photobook???
\newcommand\CaptionBox[1][Caption]{%
\setlength\fboxsep{0pt}%
\fbox{%
\setlength\fboxsep{1pt}%
\colorbox{white}{\tiny #1}}}
\begin{document} %-----------------------------------------------------
\setlength\parindent{0em}
\newlength\cellsize
\setlength\cellsize{25mm}
\renewcommand\fbox{\fcolorbox{red}{white}}
\begin{page}%
|cliptocell| bleeds
\par%
\vspace{6mm}%
\setlength\fboxsep{0pt}%
\fbox{%
\begin{inlinecell*}{\cellsize}{\cellsize}%
\imagecell[fill, clearance=-6mm]{\CaptionBox[no clip]}{DSC00403-2}%
\end{inlinecell*}}%
\hspace{1cm}%
\fbox{%
\begin{inlinecell*}{\cellsize}{\cellsize}%
\begin{cliptocell}%
\imagecell[fill, clearance=-6mm]{\CaptionBox[default=0pt]}{DSC00403-2}%
\end{cliptocell}%
\end{inlinecell*}}%
\hspace{1cm}%
\fbox{%
\begin{inlinecell*}{\cellsize}{\cellsize}%
\begin{cliptocell}[5mm]%
\imagecell[fill, clearance=-6mm]{\CaptionBox[5mm]}{DSC00403-2}%
\end{cliptocell}%
\end{inlinecell*}}%
\hspace{1cm}%
\fbox{%
\begin{inlinecell*}{\cellsize}{\cellsize}%
\begin{cliptocell}[1mm 5mm]%
\imagecell[fill, clearance=-6mm]{\CaptionBox[1mm 5mm]}{DSC00403-2}%
\end{cliptocell}%
\end{inlinecell*}}%
\hspace{1cm}%
\fbox{%
\begin{inlinecell*}{\cellsize}{\cellsize}%
\begin{cliptocell}[1mm 2mm 3mm 4mm]%
\imagecell[fill, clearance=-6mm]{\CaptionBox[1mm 2mm 3mm 4mm]}{DSC00403-2}%
\end{cliptocell}%
\end{inlinecell*}}%
\end{page}%
\begin{page}%
\fbox{%
\begin{inlinecell*}{\cellsize}{\cellsize}%
% XXX this is offset by 1mm for some reason...
\imagecell[fit]{}{DSC00403-2}%
\end{inlinecell*}}%
\hspace{1cm}%
\fbox{%
\begin{inlinecell*}{\cellsize}{\cellsize}%
\imagecell[fit, clearance=-1mm -2mm -3mm -4mm]{}{DSC00403-2}%
\end{inlinecell*}}%
\end{page}%
\end{document} %-------------------------------------------------------
% vim:set ts=4 sw=4 :