Math
createNodeConverter() enables display-math parsing by default, so a $$ block needs no
configuration:
Compare $200/mo versus $350/mo before you read the integral.
$$
\int_0^1 x^2\,dx = \frac{1}{3}
$$slackmark-node run rather than produced live, so the picture is the renderer's own PNG.Block Kit JSON
Chromium cannot run in a browser, so this figure replays a committed recording of a real createNodeConverter() run (slackmark-node with KaTeX 0.18.1, Chromium via puppeteer 25.3.0). Regenerate it with pnpm docs:raster-examples. The picture is painted from PNG bytes committed to this repo (348×184, 6.6 kB, renderer bytes), substituted for the payload's image reference because a browser cannot fetch it. A capturing stub stood in for the Slack uploader, so the slack_file IDs below are synthetic; a real upload returns workspace file IDs. Nothing else was touched: the JSON below is what convert() returned.
[
{
"type": "rich_text",
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "Compare $200/mo versus $350/mo before you read the integral."
}
]
}
]
},
{
"type": "image",
"alt_text": "display math",
"slack_file": {
"id": "F09DOCS0001"
}
}
]Single-dollar inline math is off by default, so Compare $200/mo versus $350/mo keeps
both dollar signs. Set enableInlineMath: true to read $x^2$ as math; it stays
code-styled text either way, because rasterizing inline formulas would break sentence
flow. Only display math becomes an image.
The built-in KatexRenderer loads KaTeX JavaScript, CSS, and fonts from installed package
bytes, renders inside the isolated browser context, checks dimensions, and returns a PNG.
It runs with trust: false, bounded macro expansion, bounded source, and bounded element
size. When a formula is invalid or hits one of those limits, the Slack result keeps
readable TeX and picks up a structured degradation.
For font size, padding, background, and limits, see Built-in renderers.