leqno and fleqn support (#1814)

* leqno support

* Add fleqn support

* Add tests

* Lint fix

* Add leqno and fleqn to website demo
This commit is contained in:
Erik Demaine
2019-01-29 04:40:17 -05:00
committed by ylemkimon
parent 58c36c6fdf
commit 7f778d1543
9 changed files with 82 additions and 12 deletions

View File

@@ -29,6 +29,16 @@ function init() {
options.displayMode = false;
}
// Use `leqno=1` (or `=t`/`=true`/`=y`/`=yes`) to put tags on left side.
if (query.leqno && query.leqno.match(/^(1|t|y)/)) {
options.leqno = true;
}
// Use `fleqn=1` (or `=t`/`=true`/`=y`/`=yes`) to put tags on left side.
if (query.fleqn && query.fleqn.match(/^(1|t|y)/)) {
options.fleqn = true;
}
// Use `strict=warn` for warning strict mode or `strict=error`
// (or `=1`/`=t`/`=true`/`=y`/`=yes`)
// to turn off displayMode (which is on by default).