Gutterpress proof

Markdown & CSS, typeset for printOpen source · by Dimm City

Visual Elements

Callouts highlight critical information. Images bring pages to life. This chapter covers both --- from basic syntax to full-bleed artwork and print-safe image requirements.

Callouts

Callouts draw attention to important information. Gutterpress ships GitHub's alert syntax as the bundled Callouts feature (gutterpress-gfm-alerts, issue #237) --- turn it on from the recommended-features list. It is off by default, so a book that never asked for callouts keeps rendering > [!NOTE] exactly as it always did: a plain blockquote whose first line is the marker.

Five types, the GitHub set, matched case-insensitively:

> [!NOTE]
> General information, context, or explanations.

> [!TIP]
> Helpful advice, shortcuts, or best practices.

> [!IMPORTANT]
> Things the reader must not skip.

> [!WARNING]
> Cautions, important considerations, potential issues.

> [!CAUTION]
> Critical warnings --- data loss, irreversible actions.

The marker goes alone on its own line; the body follows on the next line(s). Each renders as unbranded structure in core's own vocabulary --- a .gp-alert box carrying .gp-alert-<type>, with a .gp-alert-title paragraph holding the label --- so any theme can restyle it, and an unthemed book still prints a legible rule and label.

Anything that is not one of those five ([!DANGER], [!INFO], a typo) does not match and prints as an ordinary blockquote. Branded extras such as the Dimm City plugin's [!DM] / [!VIBE] / [!ORIGIN] come from that plugin, layered on top of .gp-alert, not from core.

Titles and multi-paragraph callouts

The marker line carries only the marker --- > [!WARNING] Read this is not recognised. Put a title in the body instead, and prefix every continuation line with >:

> [!WARNING]
> **Read this carefully.** This callout spans multiple paragraphs.
>
> Each paragraph needs the `>` prefix.
>
> - Lists work inside callouts
> - **Bold**, *italic*, and `code` formatting too

Callout guidance

Use at most 2--3 callouts per page --- overuse reduces impact. Match the type to the severity:

Type Use for
Note Context, background, explanations
Tip Optional improvements, shortcuts
Important Things the reader must not skip
Warning Things that could go wrong
Caution Critical issues, data loss, irreversible actions

Colours come from the theme: core sets one accent per type as an author-overridable --gp-alert-<type>-color custom property.

Images

Basic image syntax

![Alt text](assets/image.jpg)

![Image with title](assets/diagram.png "Caption text")

Always provide meaningful alt text. For purely decorative images, use empty alt text --- leave the brackets empty: ![].

Where images live: put the image file inside your project folder and reference it with a path relative to the manifest --- Gutterpress copies exactly the images your markdown (or CSS) references, keeping your own folder structure in the output. There's no directory to declare. A reference that points outside the project (../shared/logo.png) fails the build with a message telling you to copy the file in instead.

Image sizing

Use markdown-it-attrs (bundled --- no install step needed) for precise sizing:

![Portrait](assets/portrait.jpg){width="300px"}

![Landscape](assets/landscape.jpg){width="80%"}

Common image classes

Core Gutterpress ships a small, composable gp-* vocabulary for placing images --- plain CSS rules in GUTTERPRESS_CSS, always present, no plugin or theme required. markdown-it-attrs (also bundled) is what lets you attach {.gp-right} and friends to an image. Pick one position word, and optionally add a size, a spacing, and a shape word --- the classes compose:

![Float right, 30% width](assets/small.jpg){.gp-right .gp-size-30}

![Centered, half width](assets/photo.jpg){.gp-center .gp-size-50}

![Float left, roomy text wrap](assets/portrait.jpg){.gp-left .gp-loose}

![Full width](assets/wide.jpg){.gp-full}

Positions (text wraps around the floats; the image's vertical spot on the page is simply where it appears in your markdown):

Class What it does
.gp-left Floats left with clearance margins, capped at 50% width
.gp-right Floats right with clearance margins, capped at 50% width
.gp-center Centers a block-level image (display: block; margin: 0 auto)
.gp-full Fills the page's content width (width: 100%)
.gp-bleed Own page, edge-to-edge --- see Full-bleed artwork
.gp-pin Pins to a spot on the page instead of flowing --- see Pinned images
.gp-flush With .gp-pin + an edge: runs to the paper's edge, past the printer's safe area (Problems notes it)

Sizes (work with any position, including .gp-pin; an explicit size overrides the floats' 50% cap; for the full width use .gp-full):

Class Width
.gp-size-10 10% of the column
.gp-size-20 20%
.gp-size-30 30%
.gp-size-40 40%
.gp-size-50 50%
.gp-size-60 60%
.gp-size-70 70%
.gp-size-80 80%
.gp-size-90 90%

Spacing (how much room a float leaves for the text wrapping around it --- no class means the normal 1em):

Class Clearance
.gp-tight 0.5em
.gp-loose 2em

Under the hood the presets set the --gp-gap custom property, so a stylesheet can also tune the clearance directly (img { --gp-gap: 0.75em }).

Migrating from the old class names? The pre-vocabulary utilities --- .center, .float-left, .float-right, .full-width, .full-bleed --- were removed when the gp-* vocabulary shipped. Rename them in your markdown (.center → .gp-center, .float-left → .gp-left, .float-right → .gp-right, .full-width → .gp-full, .full-bleed → .gp-bleed); the desktop editor's image menu rewrites the old name for you when you edit an image's position. See docs/migrations/2026-08-gp-image-classes.md.

Shaped text wrap

.gp-shape makes wrapping text follow a floated image's actual visible silhouette instead of its rectangular box --- for cut-out art with a transparent background (PNG or SVG with an alpha channel):

![A creature bursting from the margin](assets/beast.png){.gp-right .gp-shape .gp-loose}

The spacing words (.gp-tight/.gp-loose) set how far the text stays from the visible silhouette, the same way they set float clearance. Details worth knowing:

Pinned images

.gp-pin takes an image out of the text flow entirely and pins it to a spot on the page --- centered by default, or against an edge with .gp-top, .gp-bottom, .gp-left, and .gp-right (the same position words the floats use):

@page

# A Title Page

![Watermark, page center](assets/sigil.png){.gp-pin .gp-size-50}

![Colophon mark, bottom right](assets/mark.png){.gp-pin .gp-bottom .gp-right .gp-size-30}

One horizontal word + one vertical word gives nine positions; sizes compose the same way they do in flow.

A pinned image never moves your text. Your words keep the page's own margins, line for line and page for page, wherever the image is pinned --- the page lays out exactly as it would without the image.

An edge pin sits on the printer's safe line for art. .gp-bottom puts the image on the art-safe line of the bottom edge, not on the paper: the line page.artSafe in manifest.yaml sets on the top, bottom and outside edges, and page.gutter at the binding (where page.artSafe or page.gutter is not set, page.safe stands in for it). For the dtrpg preset that is 0.25in from the trim on the outside edges and 0.5in at the binding, usually between the paper and your text. A book with no safe area set pins to the paper's edge. A centred pin touches no edge and sits in the middle of the text block.

Two rules keep pinning predictable:

Under the hood, Gutterpress frees that one page's margin on the edges a pin uses --- the only way anything reaches past the margin --- gives your text the margin back, and takes care of what freeing it would otherwise cost you:

Pinning art to the paper's edge

.gp-flush is the escape hatch for art that is meant to run off the page: it ignores the safe area and puts the image on the paper's edge instead.

@page

## A page whose art runs off the bottom edge

...text...

![Wall art](assets/wall.png){.gp-pin .gp-bottom .gp-flush .gp-behind}

Printers trim up to 0.125in there, so anything that close to the edge can be cut off: gutterpress validate and the desktop app's Problems panel add a note (not a warning: the class is your choice) for every image that uses .gp-flush. Keep it for art that is meant to bleed off the page, and paint the art so that losing that strip does not matter.

.gp-flush works with any edge, including corners --- {.gp-pin .gp-bottom .gp-right .gp-flush} puts the art in the bottom-right corner of the paper. A centred pin touches no edge, so the class does nothing there. In the desktop app it is the "Run to the paper's edge (ignores the safe area)" checkbox in an image's properties; you never write the class by hand.

The paper's edge is the edge of the page Gutterpress prints. When your page size already contains the bleed (page.bleed, as the dtrpg preset sets), that edge is the bleed line, past the trim; otherwise it is the trim itself, and any bleed your printer wants goes into the artwork and your PDF export settings, the same as for full-bleed artwork.

Full-bleed artwork

.gp-bleed forces the image onto its own page and cancels that page's left/right margins so the image spans the page edge-to-edge horizontally:

![Full page art](assets/artwork.jpg){.gp-bleed}

.gp-bleed produces the edge-to-edge result this way:

It does not: cancel the top/bottom margins, remove headers or footers, or add printer bleed overage past the trim edge. The running head and folio move onto the trim line on the bleed page itself (margin boxes are positioned by the page's own margins, which are zero here) --- if you need to keep them, suppress the ones that would land on the trim edge with a small override targeting @page gp-full-bleed (e.g. @top-center { content: none }); see the native engine styling guide. If you need true bleed --- content that extends past the trim line for a print shop to cut through --- design the artwork to the bled dimensions and add that overage via your PDF export/preflight settings; see Bleed for full-page images below.

Image galleries

Wrap a gallery in a named section so your own stylesheet can choose its layout and fragmentation policy. A plain @section is structural and may split; this guide's .figure class is the opt-in keep-together treatment:

@section .figure
![Image 1](assets/1.jpg){width="30%"}
![Image 2](assets/2.jpg){width="30%"}
![Image 3](assets/3.jpg){width="30%"}
@end-section

Figure with caption

Wrap the image and its caption in @section .figure so they stay together on one page, and tag the caption paragraph with the .figcaption class (via markdown-it-attrs, always available --- see Chapter 5):

@section .figure

![Architecture diagram](assets/diagram.png)

Figure 1: System architecture overview {.figcaption}

@end-section

Resolution requirements

Use Minimum DPI Recommended
Body illustrations 300 300--600
Line art / diagrams 600 600+
Full-bleed artwork 300 300

To calculate pixel dimensions: print width (inches) × DPI = pixel width. An 4-inch image at 300 DPI needs 1,200 pixels.

File formats

Color space

Use RGB color space, saved as sRGB. Ghostscript handles CMYK conversion automatically during the PDF/X pipeline --- you do not need to pre-convert images to CMYK. It reads every image as sRGB, so an AdobeRGB or ProPhoto picture shifts.

The conversion targets DriveThruRPG's printing condition, CGATS21_CRPC1, which reproduces a small range of colours: saturated colours such as a neon magenta or an indigo print noticeably duller. To see it before you print, open the -pdfx.pdf file in Acrobat's Output Preview with the simulation profile set to profiles/CGATS21_CRPC1.icc. A printer on coated paper needs its own profile in pdfx.icc.

Pre-sizing images

Pre-size images to their final print dimensions before adding them to the project:

# Resize to 2400px wide (8-inch image at 300 DPI)
convert input.jpg -resize 2400x output.jpg

# Optimize JPEG quality
convert input.jpg -quality 85 output.jpg

Bleed for full-page images

Add 0.125 inches (3.175 mm) to all edges for full-bleed images:

Page size: 6in × 9in
Image with bleed: 6.25in × 9.25in

At 300 DPI:
  Width:  6.25 × 300 = 1,875 pixels
  Height: 9.25 × 300 = 2,775 pixels

Common Image Issues

Problem Cause Fix
Pixelated in print Resolution below 300 DPI Re-export at 300 DPI minimum
Wrong aspect ratio No object-fit set Use object-fit: cover or contain in CSS
Splits across pages No break-inside rule Apply break-inside: avoid or use full-bleed
White border on bleed Image doesn't extend to edge Add 0.125in bleed on all sides
Color shift in print RGB vs CMYK mismatch Test the CMYK conversion; adjust RGB values

Image Best Practices

Organization

assets/
├── images/
│   ├── chapter-01/
│   │   ├── hero.jpg
│   │   └── diagram-1.png
│   └── chapter-02/
│       └── portrait.jpg
├── icons/
│   └── badge.svg
└── diagrams/
    └── flowchart.svg

Before final submission: