Improve description of macros

Separate type, meaning and format to clarify the paragraph.
This commit is contained in:
Martin von Gagern 2017-01-13 19:59:36 +01:00 committed by GitHub
parent 0c5d9d55cf
commit a0cd343d85

View File

@ -48,7 +48,7 @@ You can provide an object of options as the last argument to `katex.render` and
- `displayMode`: `boolean`. If `true` the math will be rendered in display mode, which will put the math in display style (so `\int` and `\sum` are large, for example), and will center the math on the page on its own line. If `false` the math will be rendered in inline mode. (default: `false`)
- `throwOnError`: `boolean`. If `true`, KaTeX will throw a `ParseError` when it encounters an unsupported command. If `false`, KaTeX will render the unsupported command as text in the color given by `errorColor`. (default: `true`)
- `errorColor`: `string`. A color string given in the format `"#XXX"` or `"#XXXXXX"`. This option determines the color which unsupported commands are rendered in. (default: `#cc0000`)
- `macros`: Object with `\name` (written `"\\name"` in JavaScript) style properties mapping to Strings that describe the expansion of the macro.
- `macros`: `object`. A collection of custom macros. Each macro is a property with a name like `\name` (written `"\\name"` in JavaScript) which maps to a String that describes the expansion of the macro.
For example: