Skip to content

Readme katex fix - #2

Merged
carlocamilloni merged 2 commits into
mainfrom
readme-katex-fix
Sep 18, 2026
Merged

carlocamilloni merged 2 commits into
mainfrom
readme-katex-fix

Conversation

@carlocamilloni

Copy link
Copy Markdown
Member

No description provided.

GitHub's KaTeX renderer does not allow \operatorname; it rendered as literal
text with a warning. \mathrm{logit} and \mathrm{Var} render the same way and
are supported.
GitHub's markdown preprocessor applies CommonMark backslash-escaping (any ASCII
punctuation may be backslash-escaped) even inside $$ ... $$ blocks, before the
math is handed to KaTeX. \; \, and \! are backslash followed by punctuation, so
the backslash was silently consumed, leaving literal ';', ',' and '!' characters
in the rendered equations (e.g. 'k_UF;=;...'). Word-based commands (\mathrm,
\text, \Big, \left, \qquad, ...) are backslash + letters and are unaffected,
which is why only the thin-space macros broke.

Fix: drop \; \, \! from all equations and rely on KaTeX's default operator
spacing (whitespace is otherwise insignificant in math mode, so removing them
does not change layout). Two cosmetic leftover spaces inside exponents tidied.
@carlocamilloni
carlocamilloni merged commit 174efad into main Sep 18, 2026
3 checks passed
@carlocamilloni
carlocamilloni deleted the readme-katex-fix branch September 18, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants