🌲 digital garden
https://rizaldy.club
2f99339dcf
ox-hugo currently supports the following syntax for latex equations: - https://orgmode.org/manual/LaTeX-fragments.html - https://ox-hugo.scripter.co/doc/equations This syntax is supported by mathjax as is mentioned in the ox-hugo documentation. But quartz uses remark-math which has some issues with the \( \) syntax. See https://github.com/remarkjs/remark-math/issues/39 This change adds few more transformations to the OxHugoFlavouredMarkdown plugin, which makes a best effort conversion of this syntax into what the Quartz Latex transformer plugin supports. With these changes, the generated files show latex formatting with default quartz configuration. Sidenote on `\_` escape by ox-hugo: ox-hugo escapes, _ using \_, we match against it after we transform equations into what quartz supports($$ and $). This could be achieved using lookaround like regex as follows ```js (?<=(\$|\$\$)[\s\S]*) -> Positive lookbehind for $ or $$ \\_ -> Matches \_ (?=[\s\S]*(?:\1)) Positive lookahead for $ or $$ if matched const escapedUnderscoreRegex = new RegExp(/(?<=(\$|\$\$)[\s\S]*)\\_(?=[\s\S]*(?:\1))/, "g") ```` But since lookahead/behind can slow things down on large files, we just look up all equations with $ and $$ delimiters and then try replacing \_ |
||
---|---|---|
.github | ||
content | ||
docs | ||
quartz | ||
.gitattributes | ||
.gitignore | ||
.npmrc | ||
.prettierignore | ||
.prettierrc | ||
CODE_OF_CONDUCT.md | ||
globals.d.ts | ||
index.d.ts | ||
LICENSE.txt | ||
package-lock.json | ||
package.json | ||
quartz.config.ts | ||
quartz.layout.ts | ||
README.md | ||
tsconfig.json |
Quartz v4
“[One] who works with the door open gets all kinds of interruptions, but [they] also occasionally gets clues as to what the world is and what might be important.” — Richard Hamming
Quartz is a set of tools that helps you publish your digital garden and notes as a website for free. Quartz v4 features a from-the-ground rewrite focusing on end-user extensibility and ease-of-use.
If you are looking for Quartz v3, you can find it on the hugo
branch.
🔗 Read the documentation and get started: https://quartz.jzhao.xyz/