Skip to content

Commit 408f0ff

Browse files
authored
[readme] add documentation (#312)
document result.errors, result.height, result.width Fixes #310
1 parent 3eff897 commit 408f0ff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ The `start` method start (and restarts) mathjax-node. This allows reconfiguratio
9696

9797
**Note.** This is done automatically when `typeset` is first called (see below).
9898

99-
### `typset(options, callback)`
99+
### `typeset(options, callback)`
100100

101101
The `typeset` method is the main method of mathjax-node. It expects a configuration object `input` and a `callback`.
102102

@@ -140,6 +140,7 @@ The `result` object will contain (at most) the following structure:
140140

141141
```javascript
142142
{
143+
errors: // an array of MathJax error messages if any errors occurred
143144
mml: // a string of MathML markup if requested
144145
mmlNode: // a jsdom node of MathML markup if requested
145146
html: // a string of HTML markup if requested
@@ -148,6 +149,8 @@ The `result` object will contain (at most) the following structure:
148149
svg: // a string of SVG markup if requested
149150
svgNode: // a jsdom node of SVG markup if requested
150151
style: // a string of CSS inline style if SVG requested
152+
height: // a string containing the height of the SVG output if SVG was requested
153+
width: // a string containing the width of the SVG output if SVG was requested
151154
speakText: // a string of speech text if requested
152155

153156
state: { // the state object (if useGlobalCache or equationNumbers is set)

0 commit comments

Comments
 (0)