After colon, dot and comma a whitespace is added.
See original GitHub issueDescribe the bug:
Katex renders a division colon :, a dot · and a comma , by adding a space after the sign:

= \frac{24\color{blue}{:6}}{30\color{blue}{:6}}
Expected was:

This can only be achieved by using {:} instead of :. But we cannot start to edit 100,000s of posts of our users that have used : and comma (German decimal!) in their latex.
Same situation is when using · instead of {·}:

Same for comma:

Q: How can we set up Katex to render accordingly so that no whitespace is added?
To Reproduce:
-
Go to https://katex.org/
-
Enter latex:
\frac{12}{100} = 0,12
\\
\frac{12}{100} = 0{,}12
- See different output:

Environment (please complete the following information):
- KaTeX Version: 0.12.0
- Device: Deskto
- OS: Windows 10
- Browser: Chrome
- Version: 85.0.4
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
The Colon and the Semicolon - University of Sussex
While you're studying these examples, notice again that the colon is never preceded by a white space and never followed by anything except...
Read more >Spacing with Punctuation
With a computer, use only one space following periods, commas, semicolons, colons, exclamation points, question marks, and quotation marks.
Read more >Regex to add a space after each comma in Javascript
This regex checks the following character and only replaces if its no a space character. ... Always replace comma and n spaces by...
Read more >space after colon - Microsoft Community
There is one space between the colon and the opening parenthesis. In the Replace With box, enter the expression. : \1. There are...
Read more >How Many Spaces After a Period? One vs. Two Spaces - 2022
When in doubt, use single spacing in research papers, essays, and your creative writing. This is true regardless of whether your sentence ends ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks. I could fix the issue by calling the autorender extension with:
Hmm, we must be running it differently? Here’s what I got with the same input (after adding
\usepackage{color}):I just confirmed on my local PDFLaTeX installation: