Compare commits

...

29 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
87e8169826 Merge branch 'main' of github.com:flynx/photobook 2023-09-17 17:27:40 +03:00
0e7524a778 leftside and rightside cells' star/non-star versions now follow the general convention of the star version not clipping it's content (POLS).
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-09-17 17:27:28 +03:00
60a4e8b6ef refactored the readme a bit...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-09-16 11:15:01 +03:00
ace4cc3e6f added a ref to the dummy book...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-09-16 11:02:43 +03:00
9579a4cc0b Merge branch 'main' of github.com:flynx/photobook 2023-09-16 10:06:01 +03:00
3d4ec82633 notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-09-16 10:05:49 +03:00
7f2f8b1ff6 fixed typo...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-09-15 14:40:29 +03:00
deaa409acf Merge branch 'main' of github.com:flynx/photobook 2023-09-14 23:16:32 +03:00
73c3f721e3 minor fix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-09-14 23:16:22 +03:00
53b4d58227 chmod +x ...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-09-13 22:56:42 +03:00
3a1da05700 tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-09-13 17:37:43 +03:00
cc06475800 ...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-09-12 18:10:06 +03:00
6ef54c6939 updated docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-09-11 22:48:44 +03:00
28 changed files with 511 additions and 111 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

View File

@ -85,8 +85,7 @@ endif
# markdown dialect...
#
# XXX still needs some tweaking...
MD_FORMAT ?= markdown_github
MD_FORMAT ?= gfm
# debug output...
@ -173,26 +172,11 @@ LN := cp -l
# - |..| - verbatim does not work...
# - || - parts of doc omitted...
# - verbatim blocks get merged sometimes...
# - does not resolve \jobname in include...
# - ...
# ...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
cat $< \
| sed 's/documentclass{ltxdoc}/documentclass[markdownextra]{internet}/' \
> $<.tmp
mv $<{.tmp,}
$(TEX) $< $(STDERR)
pandoc -t $(MD_FORMAT) -s $< -o $@
# meta-section...

View File

@ -12,7 +12,7 @@ Available on:
## Install / Build
The simplest way to install is to use either
[TeX Live](https://www.tug.org/texlive/)'s or [MiLTeX](https://miktex.org/)'s
[TeX Live](https://www.tug.org/texlive/)'s or [MiKTeX](https://miktex.org/)'s
standard way to install modules.
@ -28,7 +28,7 @@ $ make install
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
printed by calling:
generated and printed by calling:
```shell
$ make depends
```
@ -39,9 +39,19 @@ For more info on `make` targets see the: [./Makefile](./Makefile)
# Documentation
Pre-built documentation can be found on
[CTAN](http://mirrors.ctan.org/macros/latex/contrib/photobook/photobook.pdf)
or it can be built from source by:
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).
A full book (dummy) example is included in [./examples/book/](./examples/book/)
and can be used as a reference / starting point.
## Building documentation
Building the reference from source is done by:
```shell
$ make pdf
```
@ -60,7 +70,7 @@ Build requirements for docs:
## 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
used to build the `photobook.pdf`.
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,38 +42,52 @@
\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}%
\begin{page}%
% XXX this is padded by 1mm for some reason -- not sure if it's the
% image or the enclosing cell...
\fbox{%
\begin{inlinecell*}{\cellsize}{\cellsize}%
\imagecell[fit]{}{landscape}%
\end{inlinecell*}}%
\hspace{1cm}%
\fbox{%
\begin{inlinecell*}{\cellsize}{\cellsize}%
\imagecell[fit, clearance=-1mm -2mm -3mm -4mm]{}{landscape}%
\end{inlinecell*}}%
\end{page}%
\end{document} %-------------------------------------------------------
% vim:set ts=4 sw=4 :

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,21 +38,21 @@
% 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}
\end{leftside*}
\begin{rightside*}
\imagecell[fill, left, clearance=\cliptocellclearances]{}{DSC00403-2}
\end{rightside*}
\begin{leftside}
\imagecell[fill, right, clearance=\cliptocellclearances]{}{landscape}
\end{leftside}
\begin{rightside}
\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,14 +38,14 @@
%
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%
% XXX ASAP: imagecell: photobook@imagecell@left and photobook@imagecell@left
%
% 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
% offsts...
% (CLEARANCE)
% XXX ASAP should cover/jacket/endpaper/spread cells set default cliptocell
% bleeds???
% ...needs testing and experimenting...
% XXX ASAP: should \blockwidth include \bindingoffset (current) or not???
% ...currently I think that no, as \blockwidth indicates the outer
% width of the block, and this poses the question:
@ -89,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.28}
\edef\photobook@FILEDATE{2023-08-24}
\edef\photobook@FILEVERSION{v0.1.31}
\edef\photobook@FILEDATE{2024-07-19}
%% \documentclass{ltxdoc}
@ -132,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}}
@ -249,26 +262,27 @@
%% \begin{minipage}{\textwidth}
%% \begin{verbatim}
%%
%% <-------------------------------------------------> paperwidth
%% <---> bleed <---> bleed
%%
%% + - - - - - - - - - - - - - - - - - - - - - - + - + ^
%% . . . | bleed
%% paperheight v
%% + - - - - - - - - - - - - - - - - - - - - - - + - + ^ . . . ---
%% . . . | bleed .
%% . +-----------------------------------------+----- v . . ---
%% . | ^ . . = .
%% . | ^ . . = . .
%% . | . . . . . . | . . . = . ^
%% . |<-- blockwidth ------------------------->= . |
%% . |<-- blockwidth ------------------------->= . | .
%% . | . | . . . = . |
%% . | | . . = . textheight
%% . | | . . = . textheight .
%% . | . Page | . . . = . |
%% . | blockheight . . = . |
%% . | blockheight . . = . | .
%% . | . | . . <--> bindingoffset |
%% . | | . . = . |
%% . | | . . = . | .
%% . | . . . . . . | . <--> gutteroffset v
%% . | v . . = .
%% . | v . . = . .
%% . +-----------------------------------------+----- ^ . . ---
%% . . . . | bleed
%% + - - - - - - - - - - - - - - - - - - - - - - + - + v
%% . .
%% . . . . | bleed .
%% + - - - - - - - - - - - - - - - - - - - - - - + - + v . . . ---
%% . . ^
%% | <-- textwidth --------------> . |
%% ^ gutter
%%
@ -279,6 +293,9 @@
%% account for |\gutteroffset|, namely macros that do not display content
%% 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
% and overriding of the paperwidth/paperheight if they were changed
% by the user code anywhere between \documentclass[..]{photobook}
@ -918,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}
@ -2108,7 +2125,6 @@
{-\the\photobook@cliptocell@right} %
{-\the\photobook@cliptocell@top}}}
% XXX use \cliptocellclearances as default...
\newenvironment{cliptocell}[1][0mm]{%
\begingroup%
\setcliptocellbleeds{#1}
@ -2220,7 +2236,9 @@
%% Image |clearance|. This sets the amount of clearance around an image
%% (default: |0pt|).
%%
%% >> \imagecell[clearance=-4mm]{}{<image>}
%% >> \imagecell[clearance=<size>]{}{<image>}
%% >> \imagecell[clearance=<horizontal> <vertical>]{}{<image>}
%% >> \imagecell[clearance=<left> <bottom> <top> <right>]{}{<image>}
%%
%% \begin{minipage}{\textwidth}
%% \begin{verbatim}
@ -2515,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%
@ -2524,7 +2543,7 @@
\includegraphics[%
keepaspectratio,
width=\photobook@imagecell@scale\dimexpr
+ \cellwidth
\cellwidth
- \photobook@imagecell@clearance@left
- \photobook@imagecell@clearance@right \relax]{#3}}%
\else%
@ -2532,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%
@ -4033,9 +4052,9 @@
%%%%% Endpaper cells
%
%% \DescribeEnv{leftside}
%%% \DescribeEnv{leftside*}
%% \DescribeEnv{leftside*}
%% \DescribeEnv{rightside}
%%% \DescribeEnv{rightside*}
%% \DescribeEnv{rightside*}
%
%% \begin{minipage}{\textwidth}
%% \begin{verbatim}
@ -4051,41 +4070,42 @@
%% \end{verbatim}
%% \end{minipage}
%%
%%% The star versions set the appropriate bleeds for cliptocell.
%%%
%% The non-star versions will clip to bleeds except for the gutter side
%% that has no bleeds.
%%
%% The star versions will not clip.
%%
% XXX for some reason naming these anything starting with endpaper will
% make LaTeX complain that that is already defined...
% ...collision with bools???
\newenvironment{leftside}{%
\newenvironment{leftside*}{%
\begin{cell*}%
{\bleed, \bleed}%
{\pageblockwidth}{\pageblockheight}%
}{%
\end{cell*}}
% XXX EXPERIMENTAL
\newenvironment{leftside*}{%
\begin{leftside}%
\newenvironment{leftside}{%
\begin{leftside*}%
\begin{cliptocell}[{\bleed} {\bleed} 0mm {\bleed}]%
\setcliptocellbleeds{{\bleed} {\bleed} 0mm {\bleed}}%
\setcliptocellbleeds{{\bleed} {\bleed} 0mm {\bleed}}%
}{%
\end{cliptocell}
\end{leftside}}
\end{leftside*}}
\newenvironment{rightside}{%
\newenvironment{rightside*}{%
\begin{cell*}%
{\bleed + \pageblockwidth, \bleed}%
{\pageblockwidth}{\pageblockheight}%
}{%
\end{cell*}}
% XXX EXPERIMENTAL
\newenvironment{rightside*}{%
\begin{rightside}%
\newenvironment{rightside}{%
\begin{rightside*}%
\begin{cliptocell}[0mm {\bleed} {\bleed} {\bleed}]%
\setcliptocellbleeds{0mm {\bleed} {\bleed} {\bleed}}%
\setcliptocellbleeds{0mm {\bleed} {\bleed} {\bleed}}%
}{%
\end{cliptocell}
\end{rightside}}
\end{rightside*}}
@ -4847,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...
@ -5681,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}}
@ -5690,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...
%

4
scripts/make-spreads.sh Normal file → Executable file
View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
shopt -s nullglob extglob
#----------------------------------------------------------------------
@ -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}

View File

@ -42,10 +42,13 @@
%\fontsize{30pt}{36pt}\selectfont
% fonts...
%\usepackage{ascii}
%\usepackage[default,oldstyle,scale=0.95]{opensans}
%\usepackage[T1]{fontenc}
\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}