mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 11:18:39 +00:00
Add braces around displaystyle
This makes a difference for expressions like `2 \choose 3`. Auditors: emily
This commit is contained in:
@@ -36,7 +36,7 @@ Make sure to include the CSS and font files, but there is no need to include the
|
|||||||
These APIs default to inline math typesetting; for display math you can prepend `\displaystyle` ([#66](https://github.com/Khan/KaTeX/issues/66)):
|
These APIs default to inline math typesetting; for display math you can prepend `\displaystyle` ([#66](https://github.com/Khan/KaTeX/issues/66)):
|
||||||
|
|
||||||
```js
|
```js
|
||||||
katex.render("\\displaystyle " + formula, element);
|
katex.render("\\displaystyle {" + formula + "}, element);
|
||||||
// OR
|
// OR
|
||||||
var html = katex.renderToString("\\displaystyle " + formula);
|
var html = katex.renderToString("\\displaystyle " + formula);
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user