From 0f1badcbe86b6d7368f550992793d1ef0f7c6291 Mon Sep 17 00:00:00 2001 From: Breck Yunits Date: Wed, 26 Apr 2023 09:04:37 -1000 Subject: [PATCH] Add a basic KaTex node for Latex math typesetting in the default distribution. Closes #102 --- grammar/katex.grammar | 24 ++++++++++++++++++++++++ package.json | 2 +- releaseNotes.scroll | 4 ++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 grammar/katex.grammar diff --git a/grammar/katex.grammar b/grammar/katex.grammar new file mode 100644 index 000000000..4c949dd2a --- /dev/null +++ b/grammar/katex.grammar @@ -0,0 +1,24 @@ +katexParser + cruxFromId + extends abstractScrollWithRequirementsParser + catchAllCellType codeCell + catchAllParser lineOfCodeParser + description Use the KaTex library to typeset math. + string requireOnce + + + + javascript + compileInstance() { + const id = this._getUid() + const content = this.content === undefined ? "" : this.content + return `
${content + this.childrenToString()}
` + } \ No newline at end of file diff --git a/package.json b/package.json index 3210fc22a..07b587459 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scroll-cli", - "version": "69.2.0", + "version": "69.3.0", "description": "Tools for thoughts.", "main": "scroll.js", "engines": { diff --git a/releaseNotes.scroll b/releaseNotes.scroll index 2f158bcf2..956849424 100644 --- a/releaseNotes.scroll +++ b/releaseNotes.scroll @@ -4,6 +4,10 @@ startColumns * Here's a list of the notable changes in Scroll. +# 69.3.0 4/26/2023 +- 🎉 Add `katex` keyword. KaTeX: "The fastest math typesetting library for the web." + https://katex.org/ KaTeX + # 69.2.0 4/18/2023 - 🎉 added the `tag` keyword to thought nodes so you can change the compiled html tag (needed in rare circumstances) - 🎉 added the `thought` keyword and standardized vocab to calling the thought node the main node that most nodes extend.