# `Expresso.Handout`
[🔗](https://github.com/rellen/expresso/blob/main/lib/expresso/handout.ex#L1)

The steps of a slide that the handout view shows and that a printer prints

The `handout` option of a slide takes `:all`, `:last`, or the steps of the
slide in the forms of an overlay specification, such as `3`, `2..4`,
`[2, 5]` or `[from: 3]`. A list can also hold `:last`, such as `[2, :last]`,
so an author can name the last step without its number. A `:next` has no
meaning here, because no counter runs for this option.

The `handout` option of the deck takes `:all` or `:last`, and it gives the
value for each slide without the option. The default is `:all`.

The renderer writes a page for each step of each slide, because the speaker
view shows the pages of the current step and of the next step. It marks each
page that this module does not select, and the style sheet then hides that
page in the handout view and on paper.

# `t`

```elixir
@type t() :: %Expresso.Handout{last: boolean(), overlay: Expresso.Overlay.t() | nil}
```

A selection of steps: an overlay specification, the last step, or both

# `new`

```elixir
@spec new(term()) :: {:ok, t()} | {:error, String.t()}
```

Make a selection from the value of a `handout` option

# `pages`

```elixir
@spec pages(t(), pos_integer()) :: {:ok, [pos_integer()]} | {:error, String.t()}
```

Give the steps of a selection, with `max` as the maximum step of the slide

The function gives the steps in order with no repeat. It gives an error for
a step that the slide does not have.

# `printed`

```elixir
@spec printed(Expresso.Deck.t(), Expresso.Slide.t()) :: [pos_integer()]
```

Give the steps of a slide that the handout view shows

The slide gives its selection in the `handout` key of its metadata, and the
deck gives the selection for each slide without that key. The function
raises an `ArgumentError` for a selection that is not valid. The DSL finds
such a selection at compile time, so only a deck from the imperative API can
raise here.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
