Davide P. Cervone
a6f9e65af3
Simplify mfrac layout. (Don't try to force the division line to be on the baseline so that it is always raised to the correct place by a vertical align of .25em; instead, just shift the whole stack appropriately. This may cause misalignment if we can't measure the parts exactly, however, but should speed things up a bit.)
2015-03-10 19:08:32 -04:00
Davide P. Cervone
d878d3add2
Don't need bbox.H and bbox.D now that ascent and descent are equal (so center is baseline).
2015-03-10 16:00:42 -04:00
Davide P. Cervone
9ed49e85e4
Alter fonts to make ascent=descent so that line-height:0 makes its axis along the baseline. That should simplify things (though it may make unknown characters harder to handle -- we'll see).
2015-03-10 13:38:23 -04:00
Emily Eisenberg
e1fb6e667c
Merge pull request #176 from janmarthedal/bin-symbols
...
Make \bigtriangledown, \oplus and others Bin operators (and not Ord)
2015-03-10 08:37:46 -07:00
Davide P. Cervone
434606ae1f
Use proper spacing before msubsup.
2015-03-09 16:23:00 -04:00
Davide P. Cervone
e5a09146dd
Use proper thickness for separation of root from base.
2015-03-09 15:59:16 -04:00
Davide P. Cervone
36da633619
Implement TeX rules for radicals.
2015-03-09 15:40:26 -04:00
Emily Eisenberg
91376a4d26
Fix MathML CSS
...
Summary: Make the CSS rules that hide the MathML rendering not
`!important`, so that they can be overridden. Also, remove the useless
`math.katex` rule.
Fixes #197
Test plan:
- `make test`
- See that huxley screenshots haven't changed
Auditors: alpert
2015-03-09 12:22:43 -07:00
Davide P. Cervone
f629bfe783
Better bounding boxes for horizontal stretchy characters, and handle case where no extenders are needed.
2015-03-09 10:14:39 -04:00
Davide P. Cervone
af043917bd
Handle horizontal stretchy characters. (still need to add some font data and check overbraces when extenders aren't needed.)
2015-03-09 09:31:09 -04:00
Davide P. Cervone
1e826519af
Add vertical stretchy delimiters
2015-03-08 15:04:57 -04:00
Davide P. Cervone
7764748a63
Get position of overscript correct, and don't combine bboxes unnecessarily.
2015-03-08 09:48:49 -04:00
Peter Dave Hello
ba3bbe7558
bump version number to v0.2.0 in cdn url
2015-03-08 13:53:43 +08:00
Davide P. Cervone
8b9c18e1b4
Only update bbox widths when the boxes exist
2015-03-07 11:18:55 -05:00
Davide P. Cervone
d6bb1f55d5
Fix \mathchoice to use renamed CHTMLcreateNode function
2015-03-07 11:12:01 -05:00
Davide P. Cervone
dc923adf8f
Fix comments at top of file.
2015-03-07 11:11:36 -05:00
Davide P. Cervone
3619421fab
Add some comments to separate the methods from one another
2015-03-07 11:00:49 -05:00
Davide P. Cervone
f9849b87d3
Convert tabls to spaces
2015-03-07 10:55:47 -05:00
Davide P. Cervone
c502910eb7
Better handling of bboxes in mfrac, msubsup, munderover, mspace.
2015-03-07 10:54:46 -05:00
Davide P. Cervone
61db5330a7
Add combineBBoxes() method, and use it in mpadded and mrow. Also use bbox.t and bbox.b to indicate the actual extent of ink (which can be altered by mpadded). This will be used in zooming to determine the size of the box needed for the actual ink. These are similar to bbox.l and bbox.r, which can be outside the width of the objects.
2015-03-06 11:57:21 -05:00
Davide P. Cervone
553a71bb44
Make sure that mphantom acts like a box with text, so that the sizing and baseline positioning are correct.
2015-03-05 15:43:36 -05:00
Davide P. Cervone
e630f1f1f2
Use original bounding box for CHTMLdimen computations in mpadded.
2015-03-05 08:04:18 -05:00
Davide P. Cervone
09bdc86660
Make msubsup one routine so that munderover can call it for moveable limits.
2015-03-05 07:59:23 -05:00
Davide P. Cervone
8f0747965c
Implement TeX spacing for super and subscripts
2015-03-05 07:39:05 -05:00
Davide P. Cervone
b8ae3b9817
Actually set the height of the under- or over-script when baseline spacing is not wanted, and make sure the proper node type is created for mover.
2015-03-04 17:35:12 -05:00
Davide P. Cervone
0ba42d10b0
Fix depth of stack when underscript depth is negative.
2015-03-04 17:10:04 -05:00
Davide P. Cervone
f3fdb12f8c
Fix accents to work in Safari (also simplifies the structure in this case).
2015-03-04 17:03:24 -05:00
Davide P. Cervone
e72eef13c5
Mark need to rework for Safari.
2015-03-04 13:09:43 -05:00
Davide P. Cervone
23b66a9ae9
Implement TeX spacing for munderover, including delta offsets, skew values, proper accents, and so on. Still need stretchy characters. Still need to fix a spacing problem with accents in Safari.
2015-03-04 13:08:06 -05:00
Davide P. Cervone
18e5a0ef6d
Rename CHTMLstretchChild to CHTMLstretchChildV, and add CHTMLstretchChildH (still to be implemented in mo).
2015-03-04 12:54:46 -05:00
Davide P. Cervone
09aebdbf27
Refactor bounding box utility routines.
2015-03-04 12:51:09 -05:00
Davide P. Cervone
96e8ce8410
Maintain skew data in bbox.
2015-03-04 12:40:28 -05:00
Emily Eisenberg
278e4ae3c2
Upgrade katex to v0.2.0
2015-03-03 11:38:30 -08:00
Ben Alpert
c901083e59
Release 0.2.0
2015-03-01 18:44:07 -08:00
Emily Eisenberg
aaeab1200c
Add MathML rendering to improve accessibility
...
Summary:
This adds support for rendering KaTeX to both HTML and MathML
with the intent of improving accessibility. To accomplish this, both
MathML and HTML are rendered, but with the MathML visually hidden and
the HTML spans aria-hidden. Hopefully, this should produce much better
accessibility for KaTeX.
Should fix/improve #38
Closes #189
Test Plan:
- Ensure all the tests, and the new tests, still pass.
- Ensure that for each of the group types in `buildHTML.js`, there is a
corresponding one in `buildMathML.js`.
- Ensure that the huxley screenshots didn't change (except for
BinomTest, which changed because I fixed a bug in `buildHTML` where
`genfrac` didn't have a `groupToType` mapping).
- Run ChromeVox on the test page, render some math. (for example,
`\sqrt{x^2}`)
- Ensure that a mathy-sounding expression is read. (I hear "group
square root of x squared math").
- Ensure that nothing else is read (like no "x" or "2").
- Ensure that MathML markup is generated correctly and is interpreted
by the browser correctly by running
`document.getElementById("math").innerHTML =
katex.renderToString("\\sqrt{x^2}");` and seeing that the same speech
is read.
Reviewers: john, alpert
Reviewed By: john, alpert
Subscribers: alpert, john
Differential Revision: https://phabricator.khanacademy.org/D16373
2015-03-01 18:33:20 -08:00
Ben Alpert
2349a1ed85
Merge pull request #127 from kevinb7/contrib_style_decls
...
Added rule to the style guide section for where to declare variables
2015-03-01 18:27:21 -08:00
Davide P. Cervone
625229566f
Adjust merror CSS.
2015-03-01 18:12:45 -05:00
Davide P. Cervone
74e054397c
Give mpadded elements the correct bbox.
2015-03-01 18:04:23 -05:00
Davide P. Cervone
8de643d619
Clear all useMMLspacing flags for mfenced.
2015-03-01 17:54:41 -05:00
Davide P. Cervone
f43f94a9e1
Update mpadded to work with new custom tags and line-height
2015-03-01 14:14:29 -05:00
Davide P. Cervone
c1402235ba
Implement TeX fraction rules (still need to do bevelled fraction).
2015-03-01 12:56:17 -05:00
Davide P. Cervone
03ff8e5a25
Add TeX font parameters, and switch to TeX.axis_height rather than AXISHEIGHT. (Use in mtable will be fixed later.)
2015-03-01 10:48:53 -05:00
Davide P. Cervone
7b723003bf
Fix up some CSS, and some other minor details.
2015-03-01 10:39:13 -05:00
Davide P. Cervone
6399338521
Preliminary change to custom tag names (for easier readability, and less chance of CSS bleed-through).
2015-02-27 10:55:43 -05:00
Davide P. Cervone
8f5677f2de
Remove unwanted '+' from @font-face declaration.
2015-02-27 10:36:21 -05:00
Davide P. Cervone
a26b6426fe
Make bounding boxes for character based on line-height:0 rather than line-height:normal (the other varried too much from browser to browser and failed to match the internal dimensions). The HFUZZ and DFUZZ may need to be adjusted, and may need to be made browser specific (argh), but that might be able to be done through CSS.
2015-02-27 10:35:06 -05:00
Davide P. Cervone
a05227995c
Merge branch 'develop' into chtml. (Update to v2.5.1)
2015-02-25 18:44:54 -05:00
Davide P. Cervone
ad66602529
Merge remote-tracking branch 'dpvc/hotfix-2.5' into develop
2015-02-25 18:34:17 -05:00
Peter Krautzberger
574d4a3e96
Merge pull request #1065 from dpvc/hotfix-2.5
...
Release of v2.5.1
2015-02-25 17:39:43 +01:00
Davide P. Cervone
48b594afce
Repack and recombine for v2.5.1 release.
2015-02-25 11:05:38 -05:00