Compare commits

...

10 Commits

Author SHA1 Message Date
53442622b9 now all images are correct + tiny tweak...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2025-09-12 00:03:31 +03:00
9bbd752c63 added public domain images...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2025-09-07 00:35:49 +03:00
ac0acee865 updated action...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2025-07-14 14:34:57 +03:00
3a3e4acc55 cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2025-07-14 11:41:36 +03:00
7bef61cb0f cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2025-07-14 11:15:10 +03:00
942197fdc9 added text-image spread example
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2025-07-14 11:12:36 +03:00
5e210b54eb minor fix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2025-07-06 13:31:34 +03:00
615463cf72 Merge branch 'muzimuzhi-doc-typo' 2024-07-28 11:31:46 +03:00
Yukai Chou
90708b6ca7
Fix typos in doc 2024-07-28 06:53:12 +08:00
1508055cf3 Woraround an Arythmetic overflow in calc's \ratio{..}{..}, see Issues section in docs.
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-07-19 15:51:42 +03:00
25 changed files with 427 additions and 43 deletions

View File

@ -44,13 +44,13 @@ jobs:
photobook.pdf
- name: Artifacts - build
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build artifacts
path: photobook.pdf
- name: Artifacts - dist
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist artifacts
path: dist/photobook-*.zip

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 KiB

After

Width:  |  Height:  |  Size: 4.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 KiB

After

Width:  |  Height:  |  Size: 4.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 KiB

After

Width:  |  Height:  |  Size: 4.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 KiB

After

Width:  |  Height:  |  Size: 4.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 KiB

After

Width:  |  Height:  |  Size: 4.3 MiB

View File

@ -42,34 +42,34 @@
\setlength\fboxsep{0pt}%
\fbox{%
\begin{inlinecell*}{\cellsize}{\cellsize}%
\imagecell[fill, clearance=-6mm]{\CaptionBox[no clip]}{DSC00403-2}%
\imagecell[fill, clearance=-6mm]{\CaptionBox[no clip]}{landscape}%
\end{inlinecell*}}%
\hspace{1cm}%
\fbox{%
\begin{inlinecell*}{\cellsize}{\cellsize}%
\begin{cliptocell}%
\imagecell[fill, clearance=-6mm]{\CaptionBox[default=0pt]}{DSC00403-2}%
\imagecell[fill, clearance=-6mm]{\CaptionBox[default=0pt]}{landscape}%
\end{cliptocell}%
\end{inlinecell*}}%
\hspace{1cm}%
\fbox{%
\begin{inlinecell*}{\cellsize}{\cellsize}%
\begin{cliptocell}[5mm]%
\imagecell[fill, clearance=-6mm]{\CaptionBox[5mm]}{DSC00403-2}%
\imagecell[fill, clearance=-6mm]{\CaptionBox[5mm]}{landscape}%
\end{cliptocell}%
\end{inlinecell*}}%
\hspace{1cm}%
\fbox{%
\begin{inlinecell*}{\cellsize}{\cellsize}%
\begin{cliptocell}[1mm 5mm]%
\imagecell[fill, clearance=-6mm]{\CaptionBox[1mm 5mm]}{DSC00403-2}%
\imagecell[fill, clearance=-6mm]{\CaptionBox[1mm 5mm]}{landscape}%
\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}%
\imagecell[fill, clearance=-6mm]{\CaptionBox[1mm 2mm 3mm 4mm]}{landscape}%
\end{cliptocell}%
\end{inlinecell*}}%
\end{page}%
@ -79,12 +79,12 @@
% image or the enclosing cell...
\fbox{%
\begin{inlinecell*}{\cellsize}{\cellsize}%
\imagecell[fit]{}{DSC00403-2}%
\imagecell[fit]{}{landscape}%
\end{inlinecell*}}%
\hspace{1cm}%
\fbox{%
\begin{inlinecell*}{\cellsize}{\cellsize}%
\imagecell[fit, clearance=-1mm -2mm -3mm -4mm]{}{DSC00403-2}%
\imagecell[fit, clearance=-1mm -2mm -3mm -4mm]{}{landscape}%
\end{inlinecell*}}%
\end{page}%

View File

@ -28,7 +28,7 @@
% only 2-4 millimeters under the endpaper to account for
% cut and alignment errors...
\begin{cliptocell}[0mm {\coverflap} {\coverflap} {\coverflap}]
\imagecell[fill, clearance=-\coverflap]{}{DSC00403-2}
\imagecell[fill, clearance=-\coverflap]{}{landscape}
% title...
\begin{zinlinecell}
\begin{center}
@ -42,12 +42,12 @@
\end{frontcover}
\begin{spine}
\begin{cliptocell}[0mm \coverflap]
\imagecell[fill, clearance=-\coverflap]{}{DSC00403-2}
\imagecell[fill, clearance=-\coverflap]{}{landscape}
\end{cliptocell}
\end{spine}
\begin{backcover}
\begin{cliptocell}[{\coverflap} {\coverflap} 0mm {\coverflap}]
\imagecell[fill, clearance=-\coverflap]{}{DSC00403-2}
\imagecell[fill, clearance=-\coverflap]{}{landscape}
\end{cliptocell}
\end{backcover}

View File

@ -37,7 +37,7 @@
\end{inlinecell}%
\hspace{\textblockmargin}%
\begin{inlinecell}{0.75\cellwidth - \textblockmargin + \bleed}{\cellheight}%
\imagecell[fill]{}{DSC00403-2}%
\imagecell[fill]{}{landscape}%
\end{inlinecell}
\end{spreadtopages}
@ -45,7 +45,7 @@
\begin{spreadtopages}%
\hspace{-\bleed}%
\begin{inlinecell}{0.75\cellwidth - \textblockmargin + \bleed}{\cellheight}%
\imagecell[fill]{}{DSC00403-2}%
\imagecell[fill]{}{landscape}%
\end{inlinecell}%
\hspace{\textblockmargin}%
\begin{inlinecell}{0.25\cellwidth}{\cellheight}%

View File

@ -28,8 +28,8 @@
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\edef\TestImage{DSC00403-2}
\edef\TestImageV{DSC00403-2vert}
\edef\TestImage{landscape}
\edef\TestImageV{portrait}
\newcommand\Chapter[1]{

View File

@ -17,7 +17,7 @@
\begin{document} % - - - - - - - - - - - - - - - - - - - - - - - - - - -
% the simplest way to fill...
\ImagePageFill{}{DSC00403-2}
\ImagePageFill{}{landscape}
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -27,7 +27,7 @@
% the page (papercell / pagecell) and not the text (page env)
\begin{page}
\begin{papercell}
\imagecell[fill, clearance=-\bleed]{}{DSC00403-2}
\imagecell[fill, clearance=-\bleed]{}{landscape}
\end{papercell}
\end{page}
@ -38,20 +38,20 @@
% control #1 -- works fine...
\begin{page}
\begin{leftside}
\imagecell[fit]{}{DSC00403-2}
\imagecell[fit]{}{landscape}
\end{leftside}
\begin{rightside}
\imagecell[fit]{}{DSC00403-2}
\imagecell[fit]{}{landscape}
\end{rightside}
\end{page}
\begin{page}
\begin{leftside}
\imagecell[fill, right, clearance=\cliptocellclearances]{}{DSC00403-2}
\imagecell[fill, right, clearance=\cliptocellclearances]{}{landscape}
\end{leftside}
\begin{rightside}
\imagecell[fill, left, clearance=\cliptocellclearances]{}{DSC00403-2}
\imagecell[fill, left, clearance=\cliptocellclearances]{}{landscape}
\end{rightside}
\end{page}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

@ -0,0 +1,130 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
version="1.1"
id="svg1"
width="3840"
height="5495"
viewBox="0 0 3840 5495"
sodipodi:docname="Johannes Vermeer - The Girl With The Pearl Earring (1665).svg"
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
inkscape:export-filename="Johannes Vermeer - The Girl With The Pearl Earring (1665).png"
inkscape:export-xdpi="50"
inkscape:export-ydpi="50"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1">
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath2">
<path
style="fill:none;stroke:#ffffff;stroke-width:15.1181;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
d="M 1920,0 0,2747.5 1920,5495 3840,2747.5 Z"
id="path3" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath6">
<rect
style="fill:none;stroke:#ffffff;stroke-width:60.4724;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
id="rect7"
width="500"
height="500"
x="318.06506"
y="257.89059" />
</clipPath>
</defs>
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showguides="true"
inkscape:zoom="0.11632839"
inkscape:cx="1916.9868"
inkscape:cy="2750.8331"
inkscape:window-width="2048"
inkscape:window-height="1115"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g1" />
<g
inkscape:groupmode="layer"
inkscape:label="Image"
id="g1">
<image
width="3840"
height="5495"
preserveAspectRatio="none"
xlink:href="Johannes%20Vermeer%20-%20The%20Girl%20With%20The%20Pearl%20Earring%20(1665).jpg"
id="image1"
sodipodi:insensitive="true"
style="display:inline" />
<g
id="g5"
inkscape:label="large diamond">
<path
style="fill:none;stroke:#000000;stroke-width:60.47244094;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke;stroke-linejoin:miter;stroke-miterlimit:10;stroke-linecap:square"
d="M 1920,0 0,2747.5 1920,5495 3840,2747.5 Z"
id="path1"
clip-path="none"
inkscape:label="black diamond" />
<path
style="fill:none;stroke:#ffffff;stroke-width:30.23622047;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke;stroke-linejoin:miter;stroke-miterlimit:10;stroke-linecap:square"
d="M 1920,0 0,2747.5 1920,5495 3840,2747.5 Z"
id="path4"
clip-path="url(#clipPath2)"
inkscape:label="white diamond" />
</g>
<g
id="g9"
inkscape:label="small diamond">
<rect
style="fill:none;stroke:#000000;stroke-width:60.4724;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
id="rect8"
width="500"
height="500"
x="250"
y="-250"
clip-path="none"
transform="rotate(45)" />
<rect
style="fill:none;stroke:#ffffff;stroke-width:60.4724;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
id="rect5"
width="500"
height="500"
x="318.06506"
y="257.89059"
clip-path="url(#clipPath6)"
transform="rotate(45,647.11071,171.7835)" />
</g>
<use
x="0"
y="0"
xlink:href="#g9"
id="use9"
transform="translate(3132.8932)" />
<use
x="0"
y="0"
xlink:href="#g9"
id="use10"
transform="translate(3132.8932,4787.8932)" />
<use
x="0"
y="0"
xlink:href="#g9"
id="use11"
transform="translate(2.0565886e-5,4789.4527)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 KiB

View File

@ -0,0 +1,174 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
version="1.1"
id="svg1"
width="2000"
height="1350"
viewBox="0 0 2000 1350"
sodipodi:docname="Katsushika Hokusai - The Great Wave off Kanagawa.svg"
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
inkscape:export-filename="Katsushika Hokusai - The Great Wave off Kanagawa.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1">
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath6">
<rect
style="fill:none;stroke:#ffffff;stroke-width:60.4724;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
id="rect7"
width="500"
height="500"
x="318.06506"
y="257.89059" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath1">
<rect
style="fill:none;stroke:#ffffff;stroke-width:60.4724;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
id="rect1"
width="500"
height="500"
x="318.06506"
y="257.89059" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath3">
<rect
style="fill:none;stroke:#ffffff;stroke-width:60.4724;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
id="rect3"
width="500"
height="500"
x="318.06506"
y="257.89059" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4">
<path
style="fill:none;stroke:#ffffff;stroke-width:15.1181;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
d="M 1920,0 0,2747.5 1920,5495 3840,2747.5 Z"
id="path3" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath5">
<use
x="0"
y="0"
xlink:href="#g2"
id="use5" />
</clipPath>
</defs>
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="0.66962963"
inkscape:cx="1000.5531"
inkscape:cy="675"
inkscape:window-width="2048"
inkscape:window-height="1115"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g1" />
<g
inkscape:groupmode="layer"
inkscape:label="Image"
id="g1">
<image
width="2000"
height="1350"
preserveAspectRatio="none"
xlink:href="Katsushika%20Hokusai%20-%20The%20Great%20Wave%20off%20Kanagawa.jpg"
id="image1"
style="display:inline" />
<g
id="g5"
inkscape:label="large diamond"
transform="matrix(0.52086102,0,0,0.24566116,-0.05316214,0.04597332)"
style="display:inline">
<path
style="display:inline;fill:none;stroke:#000000;stroke-width:60.4724;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
d="M 1920,0 0,2747.5 1920,5495 3840,2747.5 Z"
id="path1"
clip-path="none"
inkscape:label="black" />
<g
id="g3"
clip-path="url(#clipPath5)"
inkscape:label="white"
style="display:inline">
<g
inkscape:label="Clip"
id="g2">
<path
style="display:inline;fill:none;stroke:#ffffff;stroke-width:30.2362;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
d="M 1920,0 0,2747.5 1920,5495 3840,2747.5 Z"
id="path4"
clip-path="none"
inkscape:label="white diamond" />
</g>
</g>
</g>
<g
id="g9"
inkscape:label="small diamond"
transform="matrix(0.31062245,0,0,0.31062245,3.6225648,2.1883219)"
style="display:inline">
<rect
style="fill:none;stroke:#000000;stroke-width:60.4724;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
id="rect8"
width="500"
height="500"
x="250"
y="-250"
clip-path="none"
transform="rotate(45)" />
<rect
style="fill:none;stroke:#ffffff;stroke-width:60.4724;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
id="rect5"
width="500"
height="500"
x="318.06506"
y="257.89059"
clip-path="url(#clipPath6)"
transform="rotate(45,647.11071,171.7835)" />
</g>
<use
x="0"
y="0"
xlink:href="#g9"
id="use9"
transform="translate(1776.7342,-2.1240179)" />
<use
x="0"
y="0"
xlink:href="#g9"
id="use10"
transform="translate(1776.7342,1128.1684)" />
<use
x="0"
y="0"
xlink:href="#g9"
id="use11"
transform="translate(-3.6225648,1128.1684)"
style="display:inline" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -25,17 +25,17 @@
\begin{page}
\begin{frontcover}
\begin{cliptocell}[0mm \bleed]
\imagecell[fill, clearance=-\bleed]{}{DSC00403-2}
\imagecell[fill, clearance=-\bleed]{}{landscape}
\end{cliptocell}
\end{frontcover}
\begin{backcover}
\begin{cliptocell}[0mm \bleed]
\imagecell[fill, clearance=-\bleed]{}{DSC00403-2}
\imagecell[fill, clearance=-\bleed]{}{landscape}
\end{cliptocell}
\end{backcover}
\begin{spine}
\begin{cliptocell}[0mm \bleed]
\imagecell[fill, clearance=-\bleed]{}{DSC00403-2}
\imagecell[fill, clearance=-\bleed]{}{landscape}
\end{cliptocell}
\end{spine}
\begin{frontflap}

BIN
examples/landscape.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 MiB

BIN
examples/portrait.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 MiB

View File

@ -19,8 +19,8 @@
\setlength\parindent{0pt}
\edef\TestImage{DSC00403-2}
\edef\TestImageV{DSC00403-2vert}
\edef\TestImage{landscape}
\edef\TestImageV{portrait}
\writeimagelistfalse

View File

@ -19,8 +19,8 @@
\setlength\parindent{0pt}
\edef\TestImage{DSC00403-2}
\edef\TestImageV{DSC00403-2vert}
\edef\TestImage{landscape}
\edef\TestImageV{portrait}
\writeimagelistfalse

View File

@ -0,0 +1,44 @@
%----------------------------------------------------------------------
\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}
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\edef\TestImage{landscape}
%----------------------------------------------------------------------
\begin{document}
% force what's next to left page of spread...
\cleartoleftpage
% text...
\begin{page}
\lipsum[1-3]
\end{page}
% image...
\ImagePage{}{\TestImage}
%----------------------------------------------------------------------
\end{document} % vim:set ts=4 sw=4 :

View File

@ -19,8 +19,8 @@
\setlength\parindent{0pt}
\edef\TestImage{DSC00403-2}
\edef\TestImageV{DSC00403-2vert}
\edef\TestImage{landscape}
\edef\TestImageV{portrait}
\writeimagelistfalse

View File

@ -38,6 +38,7 @@
%
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%
%
% XXX ASAP: imagecell: photobook@imagecell@left and photobook@imagecell@top
% should explicitly account for clearence@left and clearence@top resp.
% XXX ASAP: imagecell: clearance should have the same semantics as cliptocell
@ -88,12 +89,25 @@
% cell/cell* depend on absolute mode being set globally
%
%
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%
% Work around an issue with calc's \ratio{..}{..} breaking into an
% "Arythmetic overflow" when working with large images.
% (see Issues section for more info)
%
% NOTE: if the error persists just make this smaller but note that the
% smaller this gets the greater the error can be for very small
% images
%
\def\CalcOverflowFactor{0.1}%
%----------------------------------------------------------------------
%%% NOTE: \def\<module-name>@[A-Z]+ macros will be visible to both the
%%% code and the generated docs...
\edef\photobook@FILEVERSION{v0.1.30}
\edef\photobook@FILEDATE{2024-07-18}
\edef\photobook@FILEVERSION{v0.1.31}
\edef\photobook@FILEDATE{2024-07-19}
%% \documentclass{ltxdoc}
@ -131,8 +145,8 @@
%%% \newcommand\DescribeGlobal[1]{%
%%% \DescribeMacro{#1}}
%%
%% \newcommand\LEGACY[1][]{\fbox{LEGACY #1}}
%% \newcommand\EXPERIMENTAL[1][]{\fbox{EXPERIMENTAL #1}}
%% \newcommand\LEGACY[1][]{\fbox{LEGACY\ifstrempty{#1}{}{ #1}}}
%% \newcommand\EXPERIMENTAL[1][]{\fbox{EXPERIMENTAL\ifstrempty{#1}{}{ #1}}}
%%
%%% sections to new pages...
%% \newcommand\sectionbreak{\Needspace{5\baselineskip}}
@ -921,7 +935,7 @@
%% \DescribeMacro{\imageblockoffsettop=<ratio>}
%
%% The ration by which the image is raised in |\ImagePage{..}| and
%% The ratio by which the image is raised in |\ImagePage{..}| and
%% derived templates.
%%
\edef\imageblockoffsettop{\photobook@imageblockoffsettop}
@ -2519,8 +2533,9 @@
% NOTE: here we calculate image/cell eccentricity to decide
% to fit to width or heigh of cell...
% NOTE: did I say that I "love" how LaTeX does basic math??
% NOTE: \ratio{..}{..} here can break, see Issues for more info...
\setlength\photobook@imagecell@imgratio{%
1pt * \ratio{\wd\photobook@imagebox}{\ht\photobook@imagebox}}%
1pt * \ratio{\CalcOverflowFactor\wd\photobook@imagebox}{\CalcOverflowFactor\ht\photobook@imagebox}}%
\setlength\photobook@imagecell@cellratio{%
1pt * \ratio{\cellwidth}{\cellheight}}%
\ifdim \photobook@imagecell@imgratio < \photobook@imagecell@cellratio%
@ -2528,7 +2543,7 @@
\includegraphics[%
keepaspectratio,
width=\photobook@imagecell@scale\dimexpr
+ \cellwidth
\cellwidth
- \photobook@imagecell@clearance@left
- \photobook@imagecell@clearance@right \relax]{#3}}%
\else%
@ -2536,7 +2551,7 @@
\includegraphics[%
keepaspectratio,
height=\photobook@imagecell@scale\dimexpr
+ \cellheight
\cellheight
- \photobook@imagecell@clearance@top
- \photobook@imagecell@clearance@bottom \relax]{#3}}%
\fi\fi\fi%
@ -4852,8 +4867,9 @@
% align center -> check if image fits vertically...
\ifphotobook@ImagePageFit@centered\else%
\sbox{\photobook@imagebox}{\includegraphics{#3}}%
% NOTE: \ratio{..}{..} here can break, see Issues for more info...
\setlength\photobook@ImagePageFit@imgratio{%
1pt * \ratio{\wd\photobook@imagebox}{\ht\photobook@imagebox}}%
1pt * \ratio{\CalcOverflowFactor\wd\photobook@imagebox}{\CalcOverflowFactor\ht\photobook@imagebox}}%
% NOTE: subtracting \bindingoffset from \cellwidth here makes sure that
% we avoid offsetting images close enough in ratio to the page and
% messing up bleeds...
@ -5686,7 +5702,7 @@
%% \DescribeMacro{\TEX}
%% \DescribeMacro{\LATEX}
%
%% Convenience macros to display \TeX and \LaTeX in the correct font.
%% Convenience macros to display \TeX\ and \LaTeX\ in the correct font.
%%
\def\TEX{%
{\fontfamily{lmr}\selectfont \TeX}}
@ -5695,6 +5711,26 @@
%----------------------------------------------------------------------
%%%% Issues
%
%% \subsection*{Large images can cause ``Arythmetic overflow"}
%
%% \DescribeMacro{\CalcOverflowFactor=0.1}
%
%% If the issue occurs set |\CalcOverflowFactor| to a smaller value.
%% But note, a value too small can lead to errors in the affected macros,
%% a good value is between 0.1 and 0.01.
%%
%% Also note that it is recommended to pre-size images the print outside
%% of \LaTeX.
%%
%% Affected macros: |\imagecell[fill]{..}{..}|, |\ImagePageFit|.
%%
% The issue occurs in the calc's |\ratio{..}{..}| macro when calculating
% image proportions.
%
%
%----------------------------------------------------------------------
% Index...
%

View File

@ -578,7 +578,7 @@ handleSpread(){
# XXX this will also eat 0-imagepage.tpl / 20-textpage.tpl -- do a better pattern...
if ! [ -z $template ] ; then
template=(`ls "$spread/"*.tpl \
| egrep -v '.*-('${IMAGE_PAGE}'|'${TEXT_PAGE}')\.tpl'`)
| grep -E -v '.*-('${IMAGE_PAGE}'|'${TEXT_PAGE}')\.tpl'`)
fi
# no template explicitly defined -> match auto-template...
if [ -z $layout ] && [ -z $template ] ; then

View File

@ -45,7 +45,7 @@
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Open Sans}
\setsansfont[Mapping=tex-text]{Open Sans}
\setmonofont[Mapping=tex-text, Scale=0.8]{Courier New}
%\setmonofont[Mapping=tex-text, Scale=0.8]{Courier New}
\newfontfamily\titlefont[Mapping=tex-text]{Open Sans Light}
\newfontfamily\sectiontitlefont[Mapping=tex-text]{Open Sans Light}