Commit Graph

11 Commits

Author SHA1 Message Date
Ron Kok
65b47430b5 Support Unicode delimiters (#1207)
* Support Unicode delimiters

This PR adds support for the Unicode versions of \lfloor, \rfloor, \lceil, \rceil, \lgroup, \rgroup, \lmoustache, \rmoustache, \ulcorner, \urcorner, \llcorner, and \lrcorner.

All the mappings agree with `unicode math`

* Change tests from Parse to Build
2018-03-13 09:21:19 -03:00
Ashish Myles
9e22012619 Port delimiter.js to @flow. (#1177)
* Port delimiter.js to @flow.

* Responded to comments.
2018-03-01 19:57:10 -08:00
ylemkimon
439cea3e6e Improve JS spacing (#1103)
* Remove dummy spans for spacing around \href

Spacing around \href is handled in the `buildHTML`

* Make bin cancellation aware of children of fragment and anchor

+ Added getOutermostNode function

* Fix tight spacing not applied

* Add surrounding argument to html.buildExpression

It is an array consisting type of nodes that will be added to the left
and the right, and if given, will be used to determine bin cancellation
and spacings of outermost nodes.

* Fix html.buildExpression call in leftright

* Add dummy span only when given

* Update buildHTML.js
2018-02-13 07:01:56 -05:00
Kevin Barabash
603f12df8d add support for unicode angle brackets, single vertical bar, double vertical bar (#1123)
* add support for unicode angle brackets

* add tests, remove vertical bar changes

* fix 'message not a function' errors
2018-01-31 20:03:16 -05:00
Kevin Barabash
63f541b6e6 Use JS for spacing between atoms instead of CSS (#1070)
* Use JS for spacing between atoms instead of CSS

Summary:
This is the first step towards creating an intermediate representation
that can be used to generate HTML, SVG, and Canvas commands for rendering.
By generating spans that contain the width of the spaces instead of
relying on CSS sibling rules we'll be able to one day replaces the spans
with intermeidate 'Glue' nodes (in a later PR).

An added benefit of this approach is that is enables us to programmatically
change the values for thinspace, mediumspace, and thickspace which will
allow us to implement the \setlength command.

Test Plan:
- npm test
- dockers/Screenshotter/screenshotter.sh --verify

* fixed failures in BinCancellation, BoldSymbol, and OperatorName

* update screenshots

* don't use current size when determining size of spaces, update more screenshots

* fix spacing in SizingBaseline and StyleSwitching

* actually do the right thing for sizing groups

* fix \not for Chrome and Firefox

* do TODOs

* address feedback from the code review

* fix issue in delimsizing.js

* add TODO to think about a better solution in href.js

* fix typos, simplify href, be honest about paddingLeft for \not
2018-01-24 23:03:36 -05:00
Kevin Barabash
c71ee4bdd5 extract handling of implicit leftright groups (#1047)
* extract handling of implicit leftright groups

* address feedback from code review
2018-01-22 18:50:11 -05:00
Ryan Randall
fbffdc5fc7 Webpack dev server (#902)
* Initial webpack config. Moving to ES6 modules. Some module cleanup.

* WIP

* WIP

* Removing commented out code.

* Removing old deps.

* Removing the build script (used for testing).

* Working tests.

* Switching to node api over cli.

* Updating per comments. Still need to fix server.js to properly run the selenium tests.

* Cleaning up the config.

* More cleanup.

* Bringing back server.js for selenium tests.

* Bringing back old dependencies.

* Adding back eslint rules for webpack config. Final cleanup for webpack config.

* Pointing to correct pre-existing module versions. Adding some extra logic to server.js to ensure it gets transpiled properly.

* Getting make build to work again. Updating package.json with some shortcut scripts.

* Resolving conflict.

* Reverting back to commonjs modules.

* Removing extra spaces in babelrc
2017-09-26 12:16:35 -06:00
Ashish Myles
d8060ca9b4 Port functions.js to @flow. (#867)
* Make types in defineFunction stricter and prep for porting functions.js to flow.

* Add more explicit types to functions/delimsizing.js.

* Port functions.js to @flow.
2017-09-10 21:25:36 -04:00
Kevin Barabash
12399da73d make 'names' accept only an array of strings, add warning comments about where new functions should be added 2017-09-02 15:11:44 -04:00
Kevin Barabash
d8116bdc64 update defineFunction to accept a single arg, introduce flow to do some typechecking 2017-09-02 15:11:44 -04:00
Kevin Barabash
a99c7c9e0f extract delimsizing functions into their own file 2017-09-02 15:11:44 -04:00