mystmd
mystmd copied to clipboard
Glossary handling not implemented for Typst
Description
I am using the glossary in the HTML rendering, but want to produce a PDF or my document. However, glossary handling is not yet implemented for Typst conversion.
I've got an empty file with front matter to render it all:
---
title: My PDF
exports:
- format: typst
output: Exports/my-thesis.pdf
toc: _toc.yml
---
Here's my traceback:
(base) ➜ Thesis git:(main) ✗ pixi run myst build typst-thesis.md
(node:66585) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
📬 Performing exports:
typst-thesis.md -> Exports/my-thesis.pdf
📖 Built 00-Front-Matter/01-Declaration.md in 66 ms.
📖 Built 00-Front-Matter/02-Abstract.md in 66 ms.
📖 Built 00-Front-Matter/03-Preface.md in 66 ms.
📖 Built 00-Front-Matter/04-Acknowledgements.md in 66 ms.
📖 Built 00-Front-Matter/05-Dedication.md in 66 ms.
📖 Built 00-Front-Matter/06-Glossary.md in 67 ms.
📖 Built 01-Chapters/04-Trackball.md in 60 ms.
📖 Built 01-Chapters/05-Discussion.md in 61 ms.
📖 Built 00-Front-Matter/00-Front-Page.md in 61 ms.
📖 Built 01-Chapters/01-Introduction.md in 327 ms.
📖 Built 01-Chapters/02-Behavioural-Quiescence.md in 326 ms.
📖 Built 01-Chapters/03-Environmental-Gradient.md in 324 ms.
📚 Built 12 pages for export (including 1 dependency) from /Users/roaldarbol/Filen/Thesis in 771 ms.
🌠 Converting 6 images with extensions .pdf to supported formats .svg, .png, .jpg, .jpeg
⛔️ Unhandled Typst conversion for node of "glossary"
📑 Exported typst in 17 s, copying to _build/temp/mystSkrdar/my-thesis.typ
error: label `<term-sleep>` does not exist in the document
┌─ _build/temp/mystSkrdar/my-thesis-introduction.typ:7:0
│
7 │ @term-sleep
│ ^^^^^^^^^^^
Error: Command failed: typst compile /Users/roaldarbol/Filen/Thesis/_build/temp/mystSkrdar/my-thesis.typ
error: label `<term-sleep>` does not exist in the document
┌─ _build/temp/mystSkrdar/my-thesis-introduction.typ:7:0
│
7 │ @term-sleep
│ ^^^^^^^^^^^
Proposed solution
Implementation of glossary. I would think it should be added as is, so just leave the text unaltered, but add the glossary page in its specified location (as in toc if there is one, otherwise just its default location).