AtlatestRepositorysigil-doc
1
# Semantic lists, tables, and media3
Sigil Doc represents common document structures as model nodes rather than as4
renderer-specific markup. The same manuscript therefore produces accessible HTML,5
native Typst structures, deterministic plain text, and useful traversal events.7
```sigil-doc8
@items9
@item {An unordered item}10
@item11
@p {A nested ordered list:}12
@items[ordered: #t start: 3]13
@item {Number three}14
@item {Number four}15
@end items16
@end item17
@end items19
@table[caption: "Key bindings" columns: '(left center)]20
@row[header: #t]21
@cell {Action}22
@cell {Binding}23
@end row24
@row25
@cell {Open a file}26
@cell {@code{C-x C-f}}27
@end row28
@end table30
@video["video-id"31
provider: 'cloudflare32
title: "A demonstration"33
print: 'omit]{}34
```36
`@items` accepts `ordered:` (default `#f`) and `start:` (default `1`). Each37
direct child must be an `@item`; an item may contain ordinary blocks and nested38
lists.40
`@table` requires one alignment per column (`left`, `center`, or `right`). Rows41
must have exactly that many cells. The first row may use `header: #t`; later42
header rows are rejected. Captions are optional and cells may be empty.44
`@video` is passive metadata. HTML emits a provider-neutral figure for a site45
theme or adapter to enhance; parsing and rendering never fetch or execute media.46
Providers are `cloudflare`, `youtube`, and `url`. Print policy is either `omit`47
or `link`, so a book can deliberately exclude video while retaining it on the48
site. The `link` policy preserves the destination as a clickable Typst link:49
YouTube IDs resolve to `https://www.youtube.com/watch?v=<id>`, Cloudflare Stream50
IDs resolve to `https://iframe.videodelivery.net/<id>`, and `url` sources are51
used directly.