SelfscribeDownloadOpen the app

Printed report

Pages with numbered sections, running headers and a chart, ready to print or save as PDF.

Document · Simple · uses print, chart, table

Edit it in the playgroundRead the file

What it shows

Lay out a report as printed pages.

What you learn

Set layout pages, a paper size, a running header and footer, a cover page, numbered headings, a summary box, a chart with a caption, a table that runs on over pages.

Try this

  • Change A5 portrait to A4 portrait in the set page line, and the same text fits on fewer, larger pages.
  • Turn the pages with the arrow keys.
examples/ferry-report.self · 143 lines
~~~ selfscribe
# Lesson: Lay out a report as printed pages.
# You learn: set layout pages, a paper size, a running header and footer, a cover page, numbered headings, a summary box, a chart with a caption, a table that runs on over pages.
# Try this: change `A5 portrait` to `A4 portrait` in the set page line, and the same text fits on fewer, larger pages.
# Try this: turn the pages with the arrow keys.
# summary: Pages with numbered sections, running headers and a chart, ready to print or save as PDF.
# category: writing
# tags: document, simple, work
# uses: print, chart, table
use markdown
set title Printed report
# ---- The pages: shown like a book, on A5 paper, with numbered headings ---------------------
set layout pages
set page A5 portrait margins normal
set style paper numbered
# ---- A line at the top and the foot of every page; {page} is the page's number --------------
set header Hadley Libraries | | Annual report 2025–26
set footer {page}

# ---- The report's colours, each with its shade for dark pages ------------------------------
palette
  ink    #1f3a5f  dark #9cc3f0
  warm   #c0503a  dark #ff9a80
  tint   color-mix(in srgb, var(--ink) 7%, transparent)

# ---- The cover: "+++ cover … +++" holds a kicker, "= Title", "> a line" and "fig" figures --
block  +++ cover ... +++    -> section.cover  { padding-top: 2.4em }  as cover
line   kicker _             -> div.kicker     { font: 700 0.68em/1.4 var(--doc-font-ui); letter-spacing: 0.18em; text-transform: uppercase; color: var(--warm) }  as kicker
line   = _                  -> div.title      { margin: 0.35em 0 0.4em; font: 600 2.7em/1 var(--doc-font-heading); letter-spacing: -0.02em; color: var(--ink) }  as title
line   > _                  -> div.sub        { max-width: 22em; font-size: 1.02em; line-height: 1.45; opacity: 0.8 }  as sub
# "fig 412,000 | visits": split cuts it in two; group gathers the figures in a row of three.
line   fig _                -> div.fig        split "|" span  group div.figs  as fig
class  figs  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1em; margin-top: 5.5em; padding-top: 0.9em; border-top: 3px solid var(--ink) }
class  fig > span:first-child  { display: block; font: 600 1.55em/1 var(--doc-font-heading); color: var(--ink) }
class  fig > span:last-child  { display: block; margin-top: 0.35em; font: 0.7em/1.3 var(--doc-font-ui); opacity: 0.75 }

# ---- "::: summary … :::": a box for the things to remember -----------------------------------
block  ::: summary ... :::  -> aside.summary  { margin: 1em 0 1.4em; padding: 0.8em 1em; border-radius: 8px; border-left: 4px solid var(--ink); background: var(--tint) }  as summary
# ---- "caption: …" under a figure: a small, quiet line ----------------------------------------
line   caption: _           -> div.caption    { margin: 0.3em 0 1.2em; font-size: 0.82em; opacity: 0.72 }  as caption

# ---- ```chart … ```: a chart drawn from a few lines of CSV ------------------------------------
block  ``` chart ... ```    -> chart  verbatim
~~~
+++ cover
kicker Annual report 2025–26
= A year at the library
> Hadley Libraries, April 2025 to March 2026: six branches, a mobile library and 41,300 members.

fig 412,000 | visits, up 13%
fig 612,300 | loans, books and digital
fig 2,940 | events, from rhyme time to job clubs
+++

---page---

## The year in short

::: summary
**In short.** Visits rose by 13% to 412,000. Loans passed 600,000 for the first time since 2019. E-books and audiobooks are now a quarter of all loans. Northfield and St Clement's opened on Sunday afternoons.
:::

The libraries were busier this year than in any year since the pandemic. The rise came from families on Saturday mornings, from students in the exam months, and from the two branches that opened on Sundays.

## Who came

Every visit is counted at the door. Central is still the busiest branch, but the smaller branches grew fastest, St Clement's most of all after its new children's room opened in June.

```chart
type: bar
x: Branch
y: Visits (thousands)
Branch, 2024–25, 2025–26
Central, 168, 181
Northfield, 54, 61
Ashby Road, 48, 52
St Clement's, 31, 39
Willowbrook, 27, 33
Hadley Green, 22, 29
Mobile library, 14, 17
```

caption: Visits by branch, in thousands, April to March.

## What people borrowed

| Kind | Loans | Change |
|---|---|---|
| Books for adults | 241,000 | +3% |
| Books for children | 214,000 | +9% |
| E-books | 96,000 | +22% |
| Audiobooks | 51,000 | +31% |
| Laptops and tablets | 6,200 | new |
| Seeds, from the seed library | 4,100 | +40% |
| **All loans** | **612,300** | **+9%** |

Laptops and tablets were lent for the first time this year, for up to three weeks. Most went to adults applying for work and to pupils without a computer at home.

## Money

Running the service cost £4,425,000. The council paid nine tenths of it, and the rest came from grants, room hire and the Friends of Hadley Libraries.

| Item | £ |
|---|---|
| **Income** | |
| Council grant | 3,980,000 |
| Arts Council grant | 180,000 |
| Friends of Hadley Libraries | 128,000 |
| Room hire | 96,000 |
| Fees and fines | 41,000 |
| **Spending** | |
| Staff | 2,910,000 |
| Books, e-books and audiobooks | 640,000 |
| Buildings and energy | 520,000 |
| Computers and the website | 210,000 |
| The mobile library | 85,000 |
| Events and activities | 60,000 |
| **Total, each side** | **4,425,000** |

## Next year

The service asks the council for three things: Sunday opening at Central from September, a room of 3D printers and sewing machines at Central, and an end to fines for adults, as for children since 2023. The first and last cost little. The making room is a one-off £64,000.

---page---

# About this example

## How it's made

`set layout pages` shows the report as pages to turn, and `set page A5 portrait` gives them their size. The same lines print it and save it as PDF.

`set header` and `set footer` put a line at the top and foot of every page, and `{page}` fills in its number. `numbered` in the style line numbers each `##` heading.

The cover is a `+++ cover` block. `---page---` under it starts the report on a new page, and the two tables run on over as many pages as they need.

## Try it yourself

1. Change `A5 portrait` to `A4 portrait` in the set page line. The report fits on fewer, larger pages.
2. Write `---page---` on its own line above `## Money`. That section starts on a new page.
3. Add `Library at home, 9, 11` to the chart, under the mobile library. A new pair of bars appears.
4. Change `set footer {page}` to `set footer Hadley Libraries | | Page {page} of {pages}`. The foot of every page changes.

Next: *Slide deck* turns a document into slides; *Board report* draws status, risks and money from short lines.