Commit Graph

3456 Commits

Author SHA1 Message Date
Emily Eisenberg
e6b3cbe7c1 Add font metrics for \iint, \iiint
Also, fix the python dict keys so we actually get the metrics back into the
javascript correctly.

Fixes #56

Auditors: alpert
2014-09-16 16:00:30 -07:00
Adam Mark
5cfa59e5b6 Update README.md
Must specify UTF-8 in document for math characters to render properly.
2014-09-16 11:17:18 -04:00
Jeremy Engel
199bc00385 Fix license typo in README 2014-09-15 18:05:10 -07:00
Emily Eisenberg
aa7052d03a Merge pull request #39 from mgp/master
Fix links to JS source files
2014-09-15 13:24:28 -07:00
Mike Parker
faf69f238a Fix links to JS source files
These links were missing the `src` path component.
2014-09-15 12:51:29 -07:00
Emily Eisenberg
98e1713539 Add google analytics
Auditors: alpert
2014-09-15 11:41:36 -07:00
Ben Alpert
d8c8e32fed Tweak line-height on features list 2014-09-15 10:14:48 -07:00
Emily Eisenberg
f76688b639 Bump version to v0.1.0
Also ready KaTeX for releasing

Auditors: alpert
2014-09-15 03:04:11 -07:00
Emily Eisenberg
35d9d972fd Move js files into src/
Test plan:
- Make sure huxley tests, jasmine tests, make build, make metrics, make test all
  still work.

Auditors: alpert
2014-09-15 02:50:34 -07:00
Emily Eisenberg
032b8a63e6 Improve readme
Add good README and CONTRIBUTING files.

Auditors: alpert
2014-09-15 02:41:19 -07:00
Emily Eisenberg
ae9ec54453 Add logo 2014-09-15 01:55:51 -07:00
Emily Eisenberg
5b56af6c06 Actually update katex 2014-09-15 00:08:09 -07:00
Emily Eisenberg
af0522b8cf Update katex 2014-09-15 00:05:22 -07:00
Ben Alpert
421ff30b26 Add OG meta tags 2014-09-14 23:53:12 -07:00
Emily Eisenberg
cd2b8de05f Make stuff better 2014-09-14 23:52:43 -07:00
Ben Alpert
55e4f1a1b0 opacity 0.8 for demo instructions 2014-09-14 23:27:47 -07:00
Emily Eisenberg
38a6ce7990 Add a Dockerfile for huxley tests
Summary:
Add the dockerfile that I've been using to make huxley screenshots so
others can test their changes by making huxley screenshots. Include a readme
about how to use it correctly.

Test Plan: - Use the dockerfile by running the given commands, see it works

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D12773
2014-09-14 21:30:06 -07:00
Emily Eisenberg
6b674873ea Rename katex.process to katex.render
Test plan:
 - Make sure tests work and huxley tests didn't change

Auditors: alpert
2014-09-14 21:20:27 -07:00
Emily Eisenberg
9dc767041d Improve build process
Summary:
Improve the build process by combining the CSS files, automatically
selecting font files to include, and building .tar.gz and .zip files.

Test Plan:
 - Make sure tests work
 - Make sure huxley screenshots didn't change
 - Make sure zip and tar.gz files contain only files we want to distribute

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D13159
2014-09-14 19:31:38 -07:00
Emily Eisenberg
f63af87f17 Add looots of comments
Summary:
Add comments everywhere! Also fix some small bugs like using Style.id
instead of Style.size, and rename some variables to be more descriptive.

Fixes #22

Test Plan:
 - Make sure the huxley screenshots didn't change
 - Make sure the tests still pass

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D13158
2014-09-14 19:23:39 -07:00
Ben Alpert
e5546071f4 Add TypeKit for Proxima Nova 2014-09-14 16:19:50 -07:00
Ben Alpert
522f7d4a89 Use inverse Fourier transform 2014-09-14 16:11:34 -07:00
Ben Alpert
6ade2efbd5 Add forgotten KA logo 2014-09-14 16:08:07 -07:00
Ben Alpert
79a5687057 Add Travis badge to README
Auditors: emily
2014-09-14 16:02:52 -07:00
Davide P. Cervone
ad004ac668 Preserve RDFa and other non-standard attributes from MathML elements in the HTML-CSS or SVG output. Resolves issue #860, and also handles #502 as a side-effect. 2014-09-14 13:47:20 -04:00
Davide P. Cervone
9bf55785f0 Use proper value of base scaling to reset u and v in super- and subscript positioning. Resolves issue #804. 2014-09-14 11:02:16 -04:00
Davide P. Cervone
0a04a6ce19 Don't clip left or right-hand sides, only top and bottom (which are what need clipping to hide exctra height/depth, and prevent the positioning spans from overlaying the material above). Resolves issue #807, and may hekp issue #646. 2014-09-14 10:33:06 -04:00
Davide P. Cervone
ca196c8e0d Merge branch 'issue835' into develop. Issue #835. 2014-09-14 09:21:44 -04:00
Davide P. Cervone
a26454ac90 Merge branch 'issue917' into develop. Issue #917. 2014-09-14 09:21:18 -04:00
Davide P. Cervone
d38c5632ab Merge branch 'issue918' into develop. Issue #918. 2014-09-14 09:20:55 -04:00
Davide P. Cervone
fe06c828b4 Merge branch 'issue912' into develop. Issue #912. 2014-09-14 09:20:23 -04:00
Davide P. Cervone
f4be986816 Merge branch 'issue913' into develop. Issue #913. 2014-09-14 09:19:48 -04:00
Davide P. Cervone
3ee58a18a5 Merge branch 'issue906' into develop. Issue #906. 2014-09-14 09:18:56 -04:00
Davide P. Cervone
ab9570b614 Merge branch 'issue775' into develop. Issue #775. 2014-09-14 09:18:16 -04:00
Emily Eisenberg
0dca731da6 Add accents
Summary:
Add support for math-mode accents. This involves a couple changes.
First, in order to correctly position the accents, we must know the kern between
every character and the "skewchar" in that font. To do this, we improve our tfm
parser to run the mini-kern-language and calculate kerns. We then export these
into fontMetrics.js.

Then, we add normal support for accents. In particular, we do some special
handling for supsubs around accents. This involves building the supsub
separately without the accent, and then replacing its base with the built
accent.

Finally, the character in the fonts for the \vec command is a combining unicode
character, so it is shifted to the left, but none of the other characters do
this. We add some special handling for \vec to account for this.

Fixes #7

Test Plan:
 - Make sure tests pass
 - Make sure no huxley screenshots changed, and the new one looks good

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D13157
2014-09-13 21:30:35 -07:00
Emily Eisenberg
0d42a902ac Fix dots spacing
\cdots, \ddots, and \vdots are all ords, not puncts.

Test plan:
 - Make sure no huxley tests changed

Auditors: alpert
2014-09-13 19:25:15 -07:00
Ben Alpert
2cc1905c9e Add KA logo 2014-09-13 18:18:46 -07:00
Ben Alpert
ad3dc17d40 Tweak demo spacing 2014-09-13 18:01:45 -07:00
Ben Alpert
ae3374e3c7 More egg-samples 2014-09-13 17:47:43 -07:00
Ben Alpert
1c5305b18a Start making things look fancy 2014-09-13 17:32:37 -07:00
Emily Eisenberg
90573fcaf2 Fix rendering of lists in \left/\right
Test plan:
 - Make sure tests work
 - Make sure screenshots didn't change, and new screenshot looks good

Auditors: alpert
2014-09-13 16:56:15 -07:00
Davide P. Cervone
f07278d3db Make zoom box large enough for overlaps (e.g., when \llap, \rlap, or \smash are used) in SVG and HTML-CSS output. Can't do it effectively for NativeMML, since we don't know anything about overlaps in that case. Resolves issue #835. 2014-09-13 15:34:52 -04:00
Davide P. Cervone
6ed822313f Set the internal bounding box data properly for mpadded elements. Resolves issue #917. 2014-09-13 15:29:49 -04:00
Davide P. Cervone
ce76662083 Have zoom box properly sized for tagged equations in NativeMML output. Resolves issue #918. 2014-09-13 15:26:11 -04:00
Ben Alpert
7df5b4bba8 Add code for generating HTML
Test Plan: Ran unit tests. Looked at `\blue{\displaystyle \left(\dfrac{a^\sigma}{\sin \theta}\right\Updownarrow \intop_{1/2}^{z^z} \sum_{i=0}^\infty x \,dx}` in Chrome and saw the future in my eyes.

Reviewers: emily

Reviewed By: emily

Subscribers: jessie

Differential Revision: http://phabricator.khanacademy.org/D13154
2014-09-12 17:59:26 -07:00
Ben Alpert
3e78a76a47 Enable travis-ci.org
This tests against Node 0.10 (latest stable) and 0.11 (latest dev).

Test Plan: Crossed fingers. In theory we'll see this at https://travis-ci.org/Khan/KaTeX as soon as I push it.

Auditors: emily
2014-09-12 17:50:39 -07:00
Emily Eisenberg
79ab06d88d Get rid of the lookahead-y dots
Summary:
The `\dots` and `\dots{c,o,b,i,m}` commands do more than just show characters,
they add extra space and `\dots` also looks ahead to determine what kind of
environment it is in (see [this math.sx post]
(http://tex.stackexchange.com/questions/122491/difference-of-the-dots)). We
can't support that yet, so remove them.

Also, add comments to the extract_ttf script to show what caracters we are
extracting metrics for.

Test Plan: - Make sure tests work

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D13151
2014-09-12 17:29:49 -07:00
Emily Eisenberg
2920348bdd Fix large integrals in IE 8
IE 8 clips the \int sign when it is `display: inline-block`. This fixes that.

Test plan:
 - Make sure no huxley tests changed

Auditors: alpert
2014-09-12 16:27:48 -07:00
Emily Eisenberg
ad056abbaf Fix undefined maxFontSize
Fix getting a NaN maxFontSize in makeVList because symbolNodes don't have a
maxFontSize property.

Test plan:
 - Make sure no huxley screenshots changed

Auditors: alpert
2014-09-12 15:38:48 -07:00
Emily Eisenberg
6ee2ecf47e Add \dots commands
Add all of the \dots commands, and import their metrics from the ttf files.

Fixes #23

Auditors: alpert
2014-09-12 15:02:18 -07:00