Marks on the page / Pull quote
A pull quote that does not orphan the paragraph it came from
A short extract set large and apart from the body, used to break up a long document and signal what matters in it.
Why this block is harder than it looks
A pull quote is duplicated text, which means it carries no new information and costs vertical space, so it has to earn its place by improving navigation rather than by decorating. The layout problems follow from being large and out of flow: it can be taller than the space left on a page, it disrupts the text around it if floated, and if it is placed near the passage it quotes, a reader encounters the same sentence twice within a few lines, which reads as an error rather than as emphasis.
The decisions that make it work
Reasons rather than a description of the code. Each of these is a choice that has a wrong answer, and the wrong answer is usually the default.
- Place it several paragraphs away from the passage it quotes, or in a different column, so the repetition is not visible in one glance.
- Set break-inside: avoid on it and accept it moving. A split pull quote has no visual identity left.
- Keep it to about fifteen words. A long pull quote is a paragraph in a larger size and stops functioning as a signal.
- Do not float it into the text on a paged layout. Floats interact badly with page breaks, and a float that lands at the foot of a page pushes text in ways that are hard to predict.
- Set it full measure or centred with generous space above and below, rather than as a bordered box. A box makes it a callout, which is a different thing carrying different information.
- Never introduce new wording. A pull quote that paraphrases is a claim the document does not make anywhere.
The fragment
Markup and the CSS it needs, and nothing else. It expects a document that already has a page rule and a base stylesheet, so paste it into one rather than opening it on its own.
<blockquote class="pull">
The tagging is the mechanism, the reading order is the point, and only one
of them is machine checkable.
</blockquote>
<style>
.pull {
break-inside: avoid; /* moves whole or not at all */
margin: 16pt 0;
padding: 0 12mm;
border: 0; /* not a box: a box is a callout */
font-size: 15pt;
line-height: 1.3;
text-align: center;
color: #333;
}
/* rules above and below, rather than a background */
.pull::before, .pull::after {
content: "";
display: block;
width: 18mm;
height: 0;
margin: 0 auto 10pt;
border-top: 1pt solid #999;
}
.pull::after { margin: 10pt auto 0; }
</style>What breaks when it is built the obvious way
Placing it immediately beside the sentence it quotes. The reader sees the same words twice within an inch, and the second one reads as a duplication bug rather than as emphasis. Several paragraphs of separation is the whole technique.
How to prove it survived pagination
Render and read the page normally. If you notice the repetition, move the quote further from its source. Then push it near a page boundary and confirm it moves whole rather than splitting across the break.
Where it sits in a finished document
This page is one block. The document it belongs to has a page rule, a base stylesheet, a header and everything else around it, and repeating all of that here would make thirty pages that say the same thing. The event programme template is a complete file with this block already in it, so take that and change the fragment rather than assembling one from parts. The property doing most of the work here is covered on its own page, with the support caveats that belong there rather than here.
Frequently asked
Will this fragment work on its own?
Not as a whole document. It has no page rule, no margins and no base type, because those belong to the document rather than to the block, and duplicating them in every fragment would mean thirty copies to keep in step. Paste it into a template that already has them.
Why does it look right in a browser and wrong in the PDF?
Because a browser window is one continuous surface and a document is a stack of fixed rectangles. Nothing in a scrolling view exercises a page boundary, so every break rule in the fragment is inert until the content is paginated. Render the real thing with enough content to cross two or three boundaries, then look.
Do I need a special option on the render request for this?
No. Everything on this page is CSS and markup, which is your side of the boundary. What the render has to give you is a real page size with real margins, and after that the layout is decided by the stylesheet.
Other parts of a document
The blocks that sit next to this one, and one from the next group along so you are not sealed inside a single kind of problem.
Fold marks and punch hole guides that stay clear of the content
Faint marks at the page edge showing where a sheet will be folded or punched, so nothing important lands under a crease or a hole.
One landscape page inside an otherwise portrait document
A single page turned on its side to hold a wide table or drawing, inside a document that is otherwise portrait.
Two column body text that balances and does not strand a heading
Running text set in two columns for the length of a document or a section, rather than for a short list.
Footnotes in a PDF, and what to do when the page cannot hold them
Notes anchored to a marker in the text and printed at the foot of the page, which is a typesetting feature that renderers have implemented unevenly for years.
Event programme, as a complete file
The whole document with this block already in place, ready to copy and change.
break-inside in paged output
The property carrying the weight here, with its real support status.
Every part of a document
The full list, grouped by the kind of problem the block poses.
Paste the fragment into the playground inside a page rule and see what it does at a real page size. That is the only way any of this gets confirmed.