PDFPipe

Marks on the page / Step by step instructions

Numbered steps that stay readable when followed one handed

An ordered procedure with prominent numbers, followed by somebody holding the document while doing something else.

Why this block is harder than it looks

Instructions are read differently from prose: the reader looks away, does something, and comes back needing to find their place again. That single behaviour dictates the layout, and a normal ordered list defeats it, because the numbers are small, close to the text, and hard to relocate at a glance. The other failure is a step that spans a page break, so a reader turns the page halfway through an action and loses the first half of it.

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.

  • Set the numbers large and in a fixed left column, so a reader coming back to the page finds their place by number rather than by rereading.
  • One action per step. A step containing two actions is a step somebody half completes.
  • Keep each step whole with break-inside: avoid, without exception. A split step is the specific failure this layout exists to prevent.
  • Give generous vertical space between steps. Density is the enemy of relocating your place.
  • Put any warning before the step it applies to, not after, and use the callout box treatment so it is visibly not a step.
  • Number continuously through the procedure and do not restart on a new page. A reader looking for step 12 needs there to be exactly one.

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.

html
<ol class="steps">
  <li>
    <p>Isolate the supply at the distribution board and fit the lock.</p>
  </li>
  <li>
    <p>Confirm the circuit is dead with a tester that has been proved before
      and after the test.</p>
  </li>
</ol>

<style>
  .steps {
    list-style: none;
    counter-reset: step;
    margin: 0;
    padding: 0;
  }
  .steps li {
    counter-increment: step;
    break-inside: avoid;              /* a step is never split */
    display: grid;
    grid-template-columns: 12mm 1fr;  /* numbers in a fixed column */
    gap: 4mm;
    margin-bottom: 7pt;
    align-items: start;
  }
  .steps li::before {
    content: counter(step);
    font-size: 15pt;
    font-weight: 700;
    line-height: 1;
    color: #d23a1d;
  }
  .steps p { margin: 0; font-size: 9.5pt; line-height: 1.45; }
</style>

What breaks when it is built the obvious way

Using a default ordered list. The numbers are body size, sit tight against the text, and are indistinguishable from it at a glance, so a reader coming back to the page has to read to find their place, which on a procedure being carried out is exactly the moment a step gets missed.

How to prove it survived pagination

Print it, read step three, look away for ten seconds, then find step four without reading anything else. If you have to scan the text, the numbers are not prominent enough. Then push a long step near a page boundary and confirm it moves whole.

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 hot work permit 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.

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.