Markdown
Markdown adds Markdown as document content: # headings become sections (nested by level), with paragraphs, lists, tables, code blocks, quotes, --- rules and {#id} figures. Headings and maths can take ids: ## Results {#results}, \[ E = mc^2 \] {#eq-energy}.
<KScript.Document title="From Markdown" to="'notes.pdf'">
<Markdown path="chapters/introduction.md" />
<Markdown>
## Summary
- Every chapter is a Markdown file.
- The script puts them together.
</Markdown>
</KScript.Document>import KScript.Document
Document(title: 'From Markdown', to: 'notes.pdf') {
Markdown(path: 'chapters/introduction.md')
Markdown "
## Summary
- Every chapter is a Markdown file.
- The script puts them together.
"
}In Markdown files, $x$ and $$ ... $$ are maths too. In text inside a script, use \( \) and \[ \], since $ is a variable there.