mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-13 06:58:40 +00:00
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:
@@ -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; }
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user