Compare commits

...

16 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
9ad5a81054 Updated docs to better reflect the paperwidth/paperheigt within the page geometry...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-07-18 13:23:56 +03:00
d92251976b
typo fix... 2023-11-14 22:46:50 +03:00
949cd945b0 cleanup the markdown doc build, still not usable without manual tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-09-19 21:27:41 +03:00
be6bc7ba4d ...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-09-18 22:54:50 +03:00
db9497cfb4 ...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-09-18 01:08:04 +03:00
2983290550 added link to github releases for docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-09-18 01:07:01 +03:00
28 changed files with 461 additions and 85 deletions

View File

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

View File

@ -85,8 +85,7 @@ endif
# markdown dialect... # markdown dialect...
# #
# XXX still needs some tweaking... MD_FORMAT ?= gfm
MD_FORMAT ?= markdown_github
# debug output... # debug output...
@ -173,26 +172,11 @@ LN := cp -l
# - |..| - verbatim does not work... # - |..| - verbatim does not work...
# - || - parts of doc omitted... # - || - parts of doc omitted...
# - verbatim blocks get merged sometimes... # - verbatim blocks get merged sometimes...
# - does not resolve \jobname in include...
# - ... # - ...
# ...not sure if this can be tweaked... # ...not sure if this can be tweaked...
#%.md: %.tex
# pandoc -t $(MD_FORMAT) -s $< -o $@
# XXX EXPERIMENTAL...
# XXX revise:
# ...for this to work we need to replace:
# \documentclass{ltxdoc}
# to:
# \documentclass[markdownextra]{internet}
# XXX install the internet class...
# https://github.com/loopspace/latex-to-internet
# ...needs testing...
%.md: %.tex %.md: %.tex
cat $< \ pandoc -t $(MD_FORMAT) -s $< -o $@
| sed 's/documentclass{ltxdoc}/documentclass[markdownextra]{internet}/' \
> $<.tmp
mv $<{.tmp,}
$(TEX) $< $(STDERR)
# meta-section... # meta-section...

View File

@ -28,7 +28,7 @@ $ make install
The `photobook` document class requires a set of modules to be installed The `photobook` document class requires a set of modules to be installed
for it to function, the full list is included in the docs and can be for it to function, the full list is included in the docs and can be
printed by calling: generated and printed by calling:
```shell ```shell
$ make depends $ make depends
``` ```
@ -39,7 +39,8 @@ For more info on `make` targets see the: [./Makefile](./Makefile)
# Documentation # Documentation
Pre-built documentation can be found on Pre-built documentation can be found in the
[Github releases](https://github.com/flynx/photobook/releases/latest) or on
[CTAN](http://mirrors.ctan.org/macros/latex/contrib/photobook/photobook.pdf). [CTAN](http://mirrors.ctan.org/macros/latex/contrib/photobook/photobook.pdf).
@ -69,7 +70,7 @@ Build requirements for docs:
## Notes ## Notes
- The main refetence is inline with the source [photobook.cls](./photobook.cls) - The main reference is maintained inline with the source [photobook.cls](./photobook.cls)
thus it is both human-readable next to the code it documents and is thus it is both human-readable next to the code it documents and is
used to build the `photobook.pdf`. used to build the `photobook.pdf`.
Extracting the documentation source (`photobook*.tex`) is done Extracting the documentation source (`photobook*.tex`) is done

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

View File

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

View File

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

View File

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

View File

@ -17,7 +17,7 @@
\begin{document} % - - - - - - - - - - - - - - - - - - - - - - - - - - - \begin{document} % - - - - - - - - - - - - - - - - - - - - - - - - - - -
% the simplest way to fill... % the simplest way to fill...
\ImagePageFill{}{DSC00403-2} \ImagePageFill{}{landscape}
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -27,7 +27,7 @@
% the page (papercell / pagecell) and not the text (page env) % the page (papercell / pagecell) and not the text (page env)
\begin{page} \begin{page}
\begin{papercell} \begin{papercell}
\imagecell[fill, clearance=-\bleed]{}{DSC00403-2} \imagecell[fill, clearance=-\bleed]{}{landscape}
\end{papercell} \end{papercell}
\end{page} \end{page}
@ -38,20 +38,20 @@
% control #1 -- works fine... % control #1 -- works fine...
\begin{page} \begin{page}
\begin{leftside} \begin{leftside}
\imagecell[fit]{}{DSC00403-2} \imagecell[fit]{}{landscape}
\end{leftside} \end{leftside}
\begin{rightside} \begin{rightside}
\imagecell[fit]{}{DSC00403-2} \imagecell[fit]{}{landscape}
\end{rightside} \end{rightside}
\end{page} \end{page}
\begin{page} \begin{page}
\begin{leftside} \begin{leftside}
\imagecell[fill, right, clearance=\cliptocellclearances]{}{DSC00403-2} \imagecell[fill, right, clearance=\cliptocellclearances]{}{landscape}
\end{leftside} \end{leftside}
\begin{rightside} \begin{rightside}
\imagecell[fill, left, clearance=\cliptocellclearances]{}{DSC00403-2} \imagecell[fill, left, clearance=\cliptocellclearances]{}{landscape}
\end{rightside} \end{rightside}
\end{page} \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{page}
\begin{frontcover} \begin{frontcover}
\begin{cliptocell}[0mm \bleed] \begin{cliptocell}[0mm \bleed]
\imagecell[fill, clearance=-\bleed]{}{DSC00403-2} \imagecell[fill, clearance=-\bleed]{}{landscape}
\end{cliptocell} \end{cliptocell}
\end{frontcover} \end{frontcover}
\begin{backcover} \begin{backcover}
\begin{cliptocell}[0mm \bleed] \begin{cliptocell}[0mm \bleed]
\imagecell[fill, clearance=-\bleed]{}{DSC00403-2} \imagecell[fill, clearance=-\bleed]{}{landscape}
\end{cliptocell} \end{cliptocell}
\end{backcover} \end{backcover}
\begin{spine} \begin{spine}
\begin{cliptocell}[0mm \bleed] \begin{cliptocell}[0mm \bleed]
\imagecell[fill, clearance=-\bleed]{}{DSC00403-2} \imagecell[fill, clearance=-\bleed]{}{landscape}
\end{cliptocell} \end{cliptocell}
\end{spine} \end{spine}
\begin{frontflap} \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} \setlength\parindent{0pt}
\edef\TestImage{DSC00403-2} \edef\TestImage{landscape}
\edef\TestImageV{DSC00403-2vert} \edef\TestImageV{portrait}
\writeimagelistfalse \writeimagelistfalse

View File

@ -19,8 +19,8 @@
\setlength\parindent{0pt} \setlength\parindent{0pt}
\edef\TestImage{DSC00403-2} \edef\TestImage{landscape}
\edef\TestImageV{DSC00403-2vert} \edef\TestImageV{portrait}
\writeimagelistfalse \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} \setlength\parindent{0pt}
\edef\TestImage{DSC00403-2} \edef\TestImage{landscape}
\edef\TestImageV{DSC00403-2vert} \edef\TestImageV{portrait}
\writeimagelistfalse \writeimagelistfalse

View File

@ -38,6 +38,7 @@
% %
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% %
%
% XXX ASAP: imagecell: photobook@imagecell@left and photobook@imagecell@top % XXX ASAP: imagecell: photobook@imagecell@left and photobook@imagecell@top
% should explicitly account for clearence@left and clearence@top resp. % should explicitly account for clearence@left and clearence@top resp.
% XXX ASAP: imagecell: clearance should have the same semantics as cliptocell % XXX ASAP: imagecell: clearance should have the same semantics as cliptocell
@ -88,12 +89,25 @@
% cell/cell* depend on absolute mode being set globally % 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 %%% 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.29} \edef\photobook@FILEVERSION{v0.1.31}
\edef\photobook@FILEDATE{2023-08-24} \edef\photobook@FILEDATE{2024-07-19}
%% \documentclass{ltxdoc} %% \documentclass{ltxdoc}
@ -131,8 +145,8 @@
%%% \newcommand\DescribeGlobal[1]{% %%% \newcommand\DescribeGlobal[1]{%
%%% \DescribeMacro{#1}} %%% \DescribeMacro{#1}}
%% %%
%% \newcommand\LEGACY[1][]{\fbox{LEGACY #1}} %% \newcommand\LEGACY[1][]{\fbox{LEGACY\ifstrempty{#1}{}{ #1}}}
%% \newcommand\EXPERIMENTAL[1][]{\fbox{EXPERIMENTAL #1}} %% \newcommand\EXPERIMENTAL[1][]{\fbox{EXPERIMENTAL\ifstrempty{#1}{}{ #1}}}
%% %%
%%% sections to new pages... %%% sections to new pages...
%% \newcommand\sectionbreak{\Needspace{5\baselineskip}} %% \newcommand\sectionbreak{\Needspace{5\baselineskip}}
@ -248,26 +262,27 @@
%% \begin{minipage}{\textwidth} %% \begin{minipage}{\textwidth}
%% \begin{verbatim} %% \begin{verbatim}
%% %%
%% <-------------------------------------------------> paperwidth
%% <---> bleed <---> bleed %% <---> bleed <---> bleed
%% %% paperheight v
%% + - - - - - - - - - - - - - - - - - - - - - - + - + ^ %% + - - - - - - - - - - - - - - - - - - - - - - + - + ^ . . . ---
%% . . . | bleed %% . . . | bleed .
%% . +-----------------------------------------+----- v . . --- %% . +-----------------------------------------+----- v . . ---
%% . | ^ . . = . %% . | ^ . . = . .
%% . | . . . . . . | . . . = . ^ %% . | . . . . . . | . . . = . ^
%% . |<-- blockwidth ------------------------->= . | %% . |<-- blockwidth ------------------------->= . | .
%% . | . | . . . = . | %% . | . | . . . = . |
%% . | | . . = . textheight %% . | | . . = . textheight .
%% . | . Page | . . . = . | %% . | . Page | . . . = . |
%% . | blockheight . . = . | %% . | blockheight . . = . | .
%% . | . | . . <--> bindingoffset | %% . | . | . . <--> bindingoffset |
%% . | | . . = . | %% . | | . . = . | .
%% . | . . . . . . | . <--> gutteroffset v %% . | . . . . . . | . <--> gutteroffset v
%% . | v . . = . %% . | v . . = . .
%% . +-----------------------------------------+----- ^ . . --- %% . +-----------------------------------------+----- ^ . . ---
%% . . . . | bleed %% . . . . | bleed .
%% + - - - - - - - - - - - - - - - - - - - - - - + - + v %% + - - - - - - - - - - - - - - - - - - - - - - + - + v . . . ---
%% . . %% . . ^
%% | <-- textwidth --------------> . | %% | <-- textwidth --------------> . |
%% ^ gutter %% ^ gutter
%% %%
@ -278,6 +293,9 @@
%% account for |\gutteroffset|, namely macros that do not display content %% account for |\gutteroffset|, namely macros that do not display content
%% with bleeds. %% with bleeds.
%% %%
%% Also note that bleeds are included in \href{https://ctan.org/pkg/geometry}{geometry}'s
%% |\paperwidth| and |\paperheight|.
%%
% NOTE: if blockwidth/blockheight are set they will force recalculations % NOTE: if blockwidth/blockheight are set they will force recalculations
% and overriding of the paperwidth/paperheight if they were changed % and overriding of the paperwidth/paperheight if they were changed
% by the user code anywhere between \documentclass[..]{photobook} % by the user code anywhere between \documentclass[..]{photobook}
@ -917,7 +935,7 @@
%% \DescribeMacro{\imageblockoffsettop=<ratio>} %% \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. %% derived templates.
%% %%
\edef\imageblockoffsettop{\photobook@imageblockoffsettop} \edef\imageblockoffsettop{\photobook@imageblockoffsettop}
@ -2515,8 +2533,9 @@
% NOTE: here we calculate image/cell eccentricity to decide % NOTE: here we calculate image/cell eccentricity to decide
% to fit to width or heigh of cell... % to fit to width or heigh of cell...
% NOTE: did I say that I "love" how LaTeX does basic math?? % 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{% \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{% \setlength\photobook@imagecell@cellratio{%
1pt * \ratio{\cellwidth}{\cellheight}}% 1pt * \ratio{\cellwidth}{\cellheight}}%
\ifdim \photobook@imagecell@imgratio < \photobook@imagecell@cellratio% \ifdim \photobook@imagecell@imgratio < \photobook@imagecell@cellratio%
@ -2524,7 +2543,7 @@
\includegraphics[% \includegraphics[%
keepaspectratio, keepaspectratio,
width=\photobook@imagecell@scale\dimexpr width=\photobook@imagecell@scale\dimexpr
+ \cellwidth \cellwidth
- \photobook@imagecell@clearance@left - \photobook@imagecell@clearance@left
- \photobook@imagecell@clearance@right \relax]{#3}}% - \photobook@imagecell@clearance@right \relax]{#3}}%
\else% \else%
@ -2532,7 +2551,7 @@
\includegraphics[% \includegraphics[%
keepaspectratio, keepaspectratio,
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}}%
\fi\fi\fi% \fi\fi\fi%
@ -4848,8 +4867,9 @@
% align center -> check if image fits vertically... % align center -> check if image fits vertically...
\ifphotobook@ImagePageFit@centered\else% \ifphotobook@ImagePageFit@centered\else%
\sbox{\photobook@imagebox}{\includegraphics{#3}}% \sbox{\photobook@imagebox}{\includegraphics{#3}}%
% NOTE: \ratio{..}{..} here can break, see Issues for more info...
\setlength\photobook@ImagePageFit@imgratio{% \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 % NOTE: subtracting \bindingoffset from \cellwidth here makes sure that
% we avoid offsetting images close enough in ratio to the page and % we avoid offsetting images close enough in ratio to the page and
% messing up bleeds... % messing up bleeds...
@ -5682,7 +5702,7 @@
%% \DescribeMacro{\TEX} %% \DescribeMacro{\TEX}
%% \DescribeMacro{\LATEX} %% \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{% \def\TEX{%
{\fontfamily{lmr}\selectfont \TeX}} {\fontfamily{lmr}\selectfont \TeX}}
@ -5691,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... % Index...
% %

View File

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

View File

@ -45,7 +45,7 @@
\usepackage{fontspec} \usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Open Sans} \setmainfont[Mapping=tex-text]{Open Sans}
\setsansfont[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\titlefont[Mapping=tex-text]{Open Sans Light}
\newfontfamily\sectiontitlefont[Mapping=tex-text]{Open Sans Light} \newfontfamily\sectiontitlefont[Mapping=tex-text]{Open Sans Light}

View File

@ -42,10 +42,13 @@
%\fontsize{30pt}{36pt}\selectfont %\fontsize{30pt}{36pt}\selectfont
% fonts... % fonts...
%\usepackage{ascii}
%\usepackage[default,oldstyle,scale=0.95]{opensans}
%\usepackage[T1]{fontenc}
\usepackage{fontspec} \usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Open Sans} \setmainfont[Mapping=tex-text]{Open Sans}
\setsansfont[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\titlefont[Mapping=tex-text]{Open Sans Light}
\newfontfamily\sectiontitlefont[Mapping=tex-text]{Open Sans Light} \newfontfamily\sectiontitlefont[Mapping=tex-text]{Open Sans Light}