docs: mention wrapping in inline mode (#2972)

* docs: mention wrapping in inline mode

* Apply suggestions from code review

Co-authored-by: Erik Demaine <edemaine@mit.edu>

* Add some CSS examples. 

* fixup! docs/issues: remove fleqn thing

* Minor tweaks

* Link to custom CSS

Co-authored-by: Erik Demaine <edemaine@mit.edu>
This commit is contained in:
Mingye Wang
2021-05-12 22:32:14 +08:00
committed by GitHub
parent aec39f6daf
commit 7933729701
2 changed files with 24 additions and 1 deletions

View File

@@ -49,3 +49,24 @@ the version of the JavaScript file (katex.js), which is defined in `katex.versio
If it is not loaded properly, it'll show:
> The KaTeX stylesheet is not loaded!
## CSS customization
KaTeX's CSS is customizable to some extent. For example, to make individual
display equations scrollable horizontally:
```css
.katex-display { overflow: auto hidden }
```
To allow line breaks in display equations (unlike LaTeX):
```css
.katex-display > .katex { white-space: normal }
/* Add space between broken lines: */
.katex-display > .base { margin: 0.25em 0 }
/* Compensate by reducing space around display math */
.katex-display { margin: 0.5em 0; }
```