Repository navigation
v0.8.0
go install github.com/go-slides/slides/cmd/slides@v0.8.0- Overview view (#39): press
oorEscape, use the controller's button, or click the presenter's page counter to see every slide in a grid. It follows marp-cli's bespoke template: arrows, Home and End move, Enter or a click jumps, and it syncs with the presenter view. It adds 4.7 KB to a page. - Presenter view through the parent window (#40):
viewer.SyncParentsyncs the presenter and audience windows withpostMessage, so the presenter view also works where a page has no storage, such as a sandboxed frame. The playground and the VS Code preview use it. - Incremental rendering (#41, #42):
deck.RenderCachere-renders only the slides an edit changed, or whose inherited directives, page number or total changed, and reuses the rest. A byte-for-byte comparison with a full render over random edit sequences checks it. Typing in slide 50 of 100 re-renders one slide: 2.5 ms natively, 11.5 ms in WebAssembly. The VS Code preview after an edit takes 19 ms, against 23–24 ms for Marp for VS Code. The editor package also gives the preview's markup slide by slide, so a preview can patch only what changed. - Line numbers on code blocks (#43–#45, #47):
```go {lineNumbers},{lineNumbers=10}to start at 10, or thelineNumbersdirective (_lineNumbersfor one slide, or from a kind). Slidev's{lines:true}and Pandoc's.numberLinesare read too. The numbers cannot be selected or copied, and are left out of a PDF's extractable text. Each number sits on its own line's baseline, and its colour is mixed from the theme's code colours. - Code callouts (#46, #47): a marker in a comment at the end of a line (
// <1>,# <1>,-- <1>,<!-- <1> -->…), followed by a numbered list after the block, gives a numbered disc on the line and the same disc on its note. This is the syntax of Quarto and of Asciidoctor's comment form. The discs are vector rings in the PDF and editable shapes in PPTX and ODP. They are not copied with the code, and Marp shows the same deck with its plain comments.
A deck that uses none of these renders byte for byte as with v0.7.1; the oracle tests against marp-cli are unchanged. go-webengine v0.12.0 and v0.13.0 add the ch unit, widest-line intrinsic widths and unselectable text kept out of PDF text (go-pdfkit v0.17.0).