Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why in the world would you use KaTeX to write a number that is just being used as a number, not part of a mathematical formula? But, if you must, at least use some tricks to make the spacing work correctly: since TeX treats `,` as `mathpunct`, you need to use something like `\$1{,}000{,}000` (or change its catcode) to get something that renders as a plain old non-KaTeXed "$1,000,000" would.


thanks for the tip! I just wanted all the numbers to look the same


Oh, that makes sense! I was so caught up on the article beginning that way that it didn't occur to me that there'd be formulas later on, and it makes sense to want the numbers to appear the same in and out of formulas. Thank you for fixing the spacing, and nice article!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: