Directory macros/latex/contrib/bookaspro
bookaspro
Trim-and-bleed page geometry, proofing marks, and image composition for print-ready illustrated books
Version 2.0.1 — 2026/11/29
Description
bookaspro builds on LaTeX's native typographic quality to provide a ready-to-use workflow for illustrated, print-on-demand books. It consolidates the recurring setup of such projects into a single document class:
- Trim + bleed page geometry. PDF pages are larger than the final (trimmed) book size by a configurable bleed allowance; all typographic margins are measured from the trim line and the bleed is added automatically. Defaults: 170 x 240 mm trim, 3 mm bleed (176 x 246 mm PDF pages), thread-sewn binding offsets, single pages, 1:1 PDF, no crop marks in the final file.
- Book typography. Styled chapter openings (letterspaced label, large title, centered rule), section/subsection styles, centered folios without running heads, classical paragraph indentation, line-height tuning, widow/orphan/broken-hyphenation prevention, float-flow tuning for image-heavy books, justified multi-line captions with continuous figure numbering.
- Unified image macros with one consistent key–value interface:
\imageGrid[options]{files}{caption}{label}— single photos, grids, vertical stacks, rotated photos, wrapped figures, overlaid letters (a, b, c, ...), full-page bleed compositions;\imageColumns[options]{columns}{caption}{label}— top-aligned column compositions with percentage widths;\imageBleed[options]{file}{caption}{label}— full-page covers (uniform scale, no distortion), partial horizontal bleed, vertical full-height bleed, top banners / full footers reaching the physical page edge, centered plate pages, recto/verso parity control, overlaid caption and folio on semi-transparent panels.
- Structural helpers.
\unnumberedchapter{title}(ToC + PDF bookmarks + running-head marks) and\chapterornament(closing asterisks). - Bleed proofing overlay.
\showBleedMargin[options]draws the red trim line, cam crop marks, the dashed blue inner safety margin and the dashed green text-block border on every page (pure drawing, no layout changes), with a data label in millimetres;\hideBleedMargindisables it. - Configurable.
\bookasprosetup{key=value,...}changes any layout or typography parameter, including the caption keyscaptionfont,captionskip,captionmarginandbleedcaptionskip. It must be used in the preamble (it re-applies the page geometry via thegeometrypackage).
All commands, options and comments are in English.
About and development
bookaspro is the result of numerous book-layout projects carried out in LaTeX, consolidated and progressively refined with the help of artificial intelligence. It is being prepared for official publication on CTAN (the Comprehensive TeX Archive Network).
Source code, bug reports, feature requests and release artifacts are managed in the Git repository: https://gitlab.com/stedal80/bookaspro
The current maintainer is Stefano Dalpez.
Requirements
- Engine: LuaLaTeX or XeLaTeX (the class uses
fontspecand OpenType fonts; the main font is TeX Gyre Pagella). - LaTeX format: 2020-10-01 or newer.
- Packages:
iftex,fix-cm,keyval,geometry,fontspec,microtype,graphicx,xcolor,textcomp,csquotes,float,wrapfig,rotating,caption,lscape,longtable,placeins,fancyhdr,emptypage,setspace,titlesec,tikz,hyperref,bookmark— all part of a standard TeX Live or MiKTeX installation.
Installation
Copy bookaspro.cls to a directory searched by TeX, for example:
TEXMFHOME/tex/latex/bookaspro/bookaspro.cls
and the documentation to TEXMFHOME/doc/latex/bookaspro/. Alternatively, keep bookaspro.cls in the same folder as your document. Refresh the file name database if your distribution requires it (mktexlsr, or MiKTeX's automatic refresh).
Usage
\documentclass{bookaspro} % Optional: customize the layout (defaults: 170x240 mm trim, 3 mm bleed) \bookasprosetup{trimwidth=148mm,trimheight=210mm,outer=11mm} % Optional: caption appearance (defaults shown) \bookasprosetup{captionfont=small,captionskip=6pt,captionmargin=1em} % Optional: proofing overlay (remove before printing!) \showBleedMargin[bleed=3mm,margin=5mm] \begin{document} \frontmatter \tableofcontents \mainmatter \chapter{The Ascent} The trail begins at the old hut ... \imageGrid[columns=2,letters=true,captionfont=small,captionskip=6pt] {a,b,c,d}{The four stages of the ascent.}{fig:stages} \imageBleed{panorama}{The ridge at sunset.}{fig:panorama} \chapterornament \unnumberedchapter{Afterword} How this book was made ... \backmatter \listoffigures \end{document}
Compile twice with LuaLaTeX (the bleed overlays use TikZ's "remember picture" mechanism):
lualatex mybook.tex lualatex mybook.tex
Class options
bookaspro understands five options of its own — nofont, notitles, nohyperref, showframe, bleedmarks. Any other option is forwarded to the underlying book class, so the standard book options (11pt, 12pt, oneside, twoside, openright, draft, a4paper, ...) also work. The defaults passed to book are 10pt, twoside and openright, so an explicit 11pt or oneside cleanly overrides them.
Caption configuration
The \bookasprosetup keys captionfont, captionskip, captionmargin and bleedcaptionskip control the appearance of every figure caption. In addition, captionfont and captionskip can be given per figure as options of \imageGrid, \imageColumns and \imageBleed, overriding the global values for that figure only.
See the manual (bookaspro-doc.pdf) for the full reference of every macro, key and default value.
Files
| File | Purpose |
|---|---|
bookaspro.cls |
The class |
bookaspro-doc.tex |
User manual source (compile with pdfLaTeX) |
bookaspro-doc.pdf |
Compiled user manual |
example_bookaspro.tex |
Complete usage example (compile with LuaLaTeX) |
example_bookaspro.pdf |
Compiled usage example |
README.md |
This file |
The example uses the placeholder images example-image-a/b/c provided by the standard mwe package.
License
Copyright (C) 2026 Stefano Dalpez.
This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license or (at your option) any later version. The latest version of this license is in
http://www.latex-project.org/lppl.txt
and version 1.3c or later is part of all distributions of LaTeX version 2005/12/01 or later.
This work has the LPPL maintenance status maintained.
The Current Maintainer of this work is Stefano Dalpez.
This work consists of the files bookaspro.cls, bookaspro-doc.tex, example_bookaspro.tex and README.md.
Download the contents of this package in one zip archive (567.9k).
Bookaspro – Trim-and-bleed page geometry, proofing marks, and image composition for print-ready illustrated books
The bookaspro document class builds on the standard book class to provide a ready-to-use workflow for illustrated, print-on-demand books. It offers a trim-size-plus-bleed page geometry (defaulting to 170x240 mm with 3 mm bleed and binding offset), chapter and section openings, centered folios, configurable caption controls, and structural helpers for unnumbered chapters and closing ornaments.
It includes a key-value set of image macros, covering single photos, grids, vertical stacks,
wrapped figures, multi-column compositions, and full, partial, or vertical
bleed pages. A non-invasive shipout proofing overlay (\showBleedMargin) draws
the trim line, crop marks, inner safety margin, and text-block border on every
page for visual verification before sending the PDF to the printer.
| Package | Bookaspro |
| Home page | |
| Bug tracker | |
| Repository | |
| Version | 2.0.1 |
| Licenses | The LaTeX Project Public License 1.3c |
| Copyright | 2026 Stefano Dalpez |
| Maintainer | Stefano Dalpez |
| Contained in | TeX Live as bookaspro |
| Topics | Class Book publication |