JavaScript promise rejection: Loading CSS chunk katex failed. (error: https://git.ansonbiggs.com/assets/css/katex.faca27c4.css). Open browser console to see more details. (2)
1
0
mirror of https://gitlab.com/MisterBiggs/brain-quartz.git synced 2025-07-26 00:01:22 +00:00
Files
.github
content
advanced
features
Latex.md
Mermaid diagrams.md
RSS Feed.md
SPA Routing.md
backlinks.md
callouts.md
folder and tag listings.md
full-text search.md
graph view.md
index.md
no-code layout configuration.md
popover previews.md
syntax highlighting.md
table of contents.md
upcoming features.md
tags
build.md
configuration.md
custom domain.md
hosting.md
index.md
migrating from Quartz 3.md
philosophy.md
quartz-transform-pipeline.png
showcase.md
quartz
.gitattributes
.gitignore
.prettierignore
.prettierrc
CODE_OF_CONDUCT.md
LICENSE.txt
README.md
globals.d.ts
index.d.ts
package-lock.json
package.json
quartz.config.ts
quartz.layout.ts
tsconfig.json
brain-quartz/content/features/Latex.md
2023-07-25 21:10:37 -07:00

1.4 KiB

tags
tags
plugin/transformer

Quartz uses Katex by default to typeset both inline and block math expressions at build time.

Formatting

Block Math

Block math can be rendered by delimiting math expression with $$.

$$
f(x) = \int_{-\infty}^\infty
    f\hat(\xi),e^{2 \pi i \xi x}
    \,d\xi
$$

f(x) = \int_{-\infty}^\infty
    f\hat(\xi),e^{2 \pi i \xi x}
    \,d\xi

Inline Math

Similarly, inline math can be rendered by delimiting math expression with a single $. For example, $e^{i\pi} = -1$ produces e^{i\pi} = -1

Escaping symbols

There will be cases where you may have more than one $ in a paragraph at once which may accidentally trigger MathJax/Katex.

To get around this, you can escape the dollar sign by doing \$ instead.

For example:

  • Incorrect: I have $1 and you have $2 produces I have $1 and you have $2
  • Correct: I have \$1 and you have \$2 produces I have $1 and you have $2

MathJax

In quartz.config.ts, you can configure Quartz to use MathJax SVG rendering by replacing Plugin.Latex({ renderEngine: 'katex' }) with Plugin.Latex({ renderEngine: 'mathjax' })

Customization

  • Removing Latex support: remove all instances of Plugin.Latex() from quartz.config.ts.
  • Plugin: quartz/plugins/transformers/latex.ts