Skip to content

Commit

Permalink
Added example with a pagebreak in the middle of a paragraph
Browse files Browse the repository at this point in the history
  • Loading branch information
HadrienGardeur committed Oct 10, 2024
1 parent b6cb852 commit aa97eea
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions examples/read-aloud/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,21 +142,55 @@

## Pagebreaks

> This is an experimental approach based on templated text where `{pagebreak}` can be substituted by the reading system based on user preferences.
### HTML

```html
<span id="pg04" role="doc-pagebreak" epub:type="pagebreak" title="4"/>
<p>And the next pagebreak is in the middle <span id="pg05" role="doc-pagebreak" epub:type="pagebreak" title="4"/> of a sentence.</p>
```

### JSON

```json
{
"role": ["pagebreak"],
"text": "4"
"guided": [
{
"role": ["pagebreak"],
"text": "4"
},
{
"role": ["paragraph"],
"text": "And the next pagebreak is in the middle {pagebreak} of a sentence.",
"children": [
{
"role": ["pagebreak"],
"text": "5"
}
]
}
]
}
```

### Read-aloud output

**User preference set to read pagebreaks at the end of the text**

* Pagebreak. Page: 4.
* And the next pagebreak is in the middle of a sentence.
* Pagebreak. Page: 5.

**User preference set to read pagebreaks in the middle of the text**

* Pagebreak. Page: 4.
* And the next pagebreak is in the middle (Pagebreak. Page: 5.) of a sentence.

**User preference set to skip pagebreaks**

* And the next pagebreak is in the middle of a sentence.

## Lists

### HTML
Expand Down

0 comments on commit aa97eea

Please sign in to comment.