Commit Graph

346 Commits

Author SHA1 Message Date
Kevin Barabash
72027a1a56 Merge pull request #330 from xymostech/add-vert-separator
Add | column separators to arrays.
2015-08-28 10:29:26 -06:00
Emily Eisenberg
3a8adbf595 Add | column separators to arrays.
This adds the ability to add `|` to a column description and have
vertical separators be added. I added types to the column descriptions
and added some logic to handle the separators when building the vertical
lists of the array.

Test plan:
 - See the Arrays screenshot looks good.
 - `make test`
2015-08-28 08:50:42 -07:00
Kevin Barabash
1b5834d894 Merge pull request #334 from Khan/revert-333-gitter-badge
Revert "Add a Gitter chat badge to README.md"
2015-08-21 21:19:25 -06:00
Kevin Barabash
d772aab6d5 Revert "Add a Gitter chat badge to README.md" 2015-08-21 21:14:55 -06:00
Kevin Barabash
bc4c270220 Merge pull request #333 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2015-08-21 21:06:08 -06:00
The Gitter Badger
2af1ad2ffc Added Gitter badge 2015-08-22 02:55:03 +00:00
Kevin Barabash
2d9a6f323c Merge pull request #291 from kevinb7/fonts-p2_rendering
Adds math commands, HTML rendering, and screenshotter tests.
2015-08-19 22:07:34 -06:00
Kevin Barabash
fd2d58fd80 Adds math commands, HTML rendering, and screenshotter tests.
This is part 2 of 3.  Part 1 added new fonts metrics.  Part 2 will add MathML support and unit tests.
2015-08-19 22:04:34 -06:00
Kevin Barabash
f32d615813 Merge pull request #294 from gagern/symtypes
Fix symbol group types
2015-08-19 17:44:11 -06:00
Martin von Gagern
9942283db0 Fix incorrect symbol types
These symbols should have different types, according to symgroups.js
2015-08-19 22:57:05 +02:00
Martin von Gagern
1846929110 Add tool to check symbol group types against LaTeX
At the moment, the tool isn't suitable for automatic regression tests yet,
since some symbols will require human verification.  That might change in
the future though, with a list of manually verified symbols which can be
skipped in automatic verification.  For this reason the file got placed into
the test directory.
2015-08-19 22:56:41 +02:00
Kevin Barabash
cb9f765e06 Merge pull request #310 from gagern/ssYaml
Switch Screenshotter data from JSON to YAML
2015-08-18 21:00:20 -06:00
Kevin Barabash
1da8c8938b Merge pull request #323 from blaiprat/fontMetricsData_js
Generate fontMetricsData as JavaScript
2015-08-06 11:15:00 -07:00
Martin von Gagern
758f4a73d9 Merge remote-tracking branch 'origin/master' into ssYaml 2015-08-06 10:18:04 +02:00
Blai Pratdesaba
236b7925f1 Add missing semicolon at the end of fontMetricsData 2015-08-06 09:17:42 +01:00
Blai Pratdesaba
8cd71830c2 Generate fontMetricsData as JavaScript 2015-08-05 19:52:42 +01:00
Martin von Gagern
62a8b2d4e7 Whitelist keys to include in ss_data query strings 2015-08-03 22:45:22 +02:00
Kevin Barabash
b2d2df9bef Merge pull request #317 from JeffEverett/unsupported_commands
Added support for visual depiction of unsupported commands
2015-07-29 10:55:04 -07:00
Kevin Barabash
76d87e8f90 Merge pull request #319 from JeffEverett/fix_limit_controls
Fixed limit controls in textstyle
2015-07-29 09:05:39 -07:00
Kevin Barabash
4a507c40f1 Merge pull request #290 from kevinb7/fonts-p1_metrics
Adds font metrics to support font commands.
2015-07-29 09:04:33 -07:00
Jeff Everett
9b0f42ea50 Fixed limit controls in textstyle 2015-07-28 15:22:30 -06:00
Jeff Everett
e1c221273c Added support for visual depiction of unsupported commands 2015-07-28 00:50:08 -06:00
Kevin Barabash
4be3931cb5 Merge pull request #314 from JeffEverett/limits_and_nolimits
Add support for \limits and \nolimits controls
2015-07-24 19:53:55 -06:00
Jeff Everett
5d83bb8cc0 Added support for \limits and \nolimits controls 2015-07-24 19:33:09 -06:00
Kevin Barabash
0dc9eed1c4 Disable chrome screenshotter tests until we can determine why it's producing different results.
Test Plan:
- run `make screenshots` and verify that it doesn't start the chrome docker image

Auditors: alpert, emily
2015-07-22 22:12:39 -06:00
Kevin Barabash
bd275b85d7 Update make screenshots to run the new screenshotter
Test Plan:
- run `make screenshots` and verify that the screenshotter runs

Auditors: alpert
2015-07-22 22:06:16 -06:00
Kevin Barabash
476eebf3c5 Merge pull request #299 from gagern/delimiters
Provide more delimiters
2015-07-19 21:14:13 -06:00
Emily Eisenberg
2600587f78 Update master version numbers
Summary: Update the version numbers on master to <the-next-version>-pre.

Test plan:
 - ???

Auditors: kevinb, alpert
2015-07-16 14:20:29 -07:00
Emily Eisenberg
ce99abd1f2 Update Dockerfile for ttfautohint, update metrics
Summary:
Update the MathJaxFonts `Dockerfile` to enable the use of
`ttfautohint` which hints our fonts better. Also, fix the location that
batik is downloaded from, update some formatting in the `Dockerfile`,
and update the fonts and metrics.

Test Plan:
 - Compare a rendered `= - A z 4 \Longrightarrow \Sigma \Biggl(` in
   Chrome on Windows at font sizes 10px to 20px before and after this
   change.
 - See that characters look about the same, or better.
 - See that the screenshot tests didn't change in firefox (maybe firefox
   runs the same autohinting algorithm that we do?), and don't visually
   change in chrome

Reviewers: kevinb, alpert

Reviewed By: kevinb, alpert

Differential Revision: https://phabricator.khanacademy.org/D18977
2015-07-16 12:01:26 -07:00
Martin von Gagern
fb403fa9eb Switch Screenshotter data from JSON to YAML
Escaping TeX in JSON as query strings is a pain: you have to double all the
\\, you have to escape the & and the #, you can't easily include line breaks
for readability, and so on.  YAML solves most of these problems for most of
the situations.  Now each test case can be structured, while simple test
cases only consist of a line of verbatim TeX code, with no escaping.

The most troublesome items remaining are lines starting in { since in YAML
these would denote inline mapping types. We use block notation for these.
2015-07-16 08:57:17 +02:00
Kevin Barabash
a3031af307 Merge pull request #308 from gagern/selenium-images
Automatically start a development server
2015-07-15 07:50:37 -06:00
Kevin Barabash
e0c75df7b7 Merge pull request #309 from gagern/chromeScreenshotUpdates
Update chrome screenshots
2015-07-15 07:49:45 -06:00
Martin von Gagern
9752d02748 Automatically start a development server
This avoids one of the few requirements we have left: you no longer have to
start a KaTeX development server, the script will do it for you, using a
random port number.

To reproduce the old behaviour, explicitely state --katex-port=7936.
2015-07-15 15:41:29 +02:00
Martin von Gagern
b7e1581869 Update chrome screenshots
I forgot to re-create these after rebasing.
2015-07-15 15:40:31 +02:00
Kevin Barabash
a18db36296 Merge pull request #264 from gagern/selenium-images
Selenium images
2015-07-14 10:13:56 -06:00
Martin von Gagern
6f65f685f3 Add screenshots taken from Chrome 2015-07-14 18:09:58 +02:00
Martin von Gagern
5d155c75db Switch from own docker image to standard selenium images
Since the Selenium images are available for download, and downloading them
is usually faster than building them from scratch, this makes taking
screenshots easier.  Furthermore, since the Selenium image is not specific
to KaTeX, it could as well be used for other purposes, thus saving space
since a single image can be used in multiple projects.

This change also deals with the non-determinism in the Lap screenshot:
We detect the one known (and accepted) alternate rendering and change the
output file name to Lap_alt in this case.  So either Lap or Lap_alt gets
saved to, and if the image is different from both, then one of these files
will show a modification.  On the other hand, if it is equal to either of
these, then the matching one will get overwritten, showing no change.
2015-07-14 18:09:58 +02:00
Kevin Barabash
b1d5311898 Merge pull request #306 from gagern/browserifyUpdate
Update development server for new browserify version
2015-07-14 06:56:50 -06:00
Martin von Gagern
11970ee965 Update development server for new browserify version
Current browserify no longer accepts an options hash to the bundle method.
2015-07-14 09:51:20 +02:00
Kevin Barabash
67147b18ac Adds font metrics to support font commands.
This is part 1 of 3.  Rendering, screenshots, MathML, and unit tests will
follow in susbequent pull requests.
2015-07-10 21:50:04 -06:00
Kevin Barabash
549c2bf858 Merge pull request #293 from gagern/matrices
Matrices should be of type ord
2015-07-10 09:52:49 -06:00
Martin von Gagern
6362e0f8f2 Test case demonstrating the desired spacing around an array 2015-07-10 17:37:53 +02:00
Martin von Gagern
8bff74ca09 Change group type of array from inner to ord
This is a consequence of Rule 8 of Appendix G of The Tex Book.
2015-07-10 17:37:53 +02:00
Martin von Gagern
f05ff9c5fa Offer some help working out the types of math formula atoms 2015-07-10 17:36:52 +02:00
Kevin Barabash
6357a34828 Merge pull request #303 from gagern/metrics
Improve font metrics creation
2015-07-10 09:07:59 -06:00
Martin von Gagern
b290d4ad76 Switch from fontforge to fonttools
The dependencies of fonttools are much lighter than fontforge, and since all
we need are some metrics, fonttools is very much up to that task.

This addresses issue #288.
2015-07-10 14:32:02 +02:00
Martin von Gagern
d26a67f220 Avoid non-determinisms related to font metric generation
We had some duplicate mappings in mappings to start with.  Now we have some
code to complain loudly about these, and all currently existing duplicates
have been dealt with.

We also had a problem where in some Python dict, existing stuff was using
strings as keys while new data would use numeric indices, thus not
overwriting the previous value.  Now we always use strings as keys.

Along the road, the italic dotless i and j symbols were changed
so that they now are taken from cmmi10 instead of cmti10.
2015-07-10 14:30:42 +02:00
Martin von Gagern
86115b8fce Format font metrix data to have one row for each glyph
This will make reviewing modifications easier, since the affected glyphs
will be more readily visible in the diff.
The formatting tool was applied to the existing data, instead of
regenerating the data, so the semantic content should be unmodified.
2015-07-10 14:30:42 +02:00
Martin von Gagern
1603162267 Save auto-generated font metrics data to separate JSON file
This separates auto-generated code from manually created code.
We need a more recent version of browserify to directly require JSON.
Note that the data was copied, not recreated, so it has not been changed.
This addresses issue #301.
2015-07-10 14:30:41 +02:00
Martin von Gagern
1f8610cebe Auto-detect python binary
We now try whether there is an executable called python2, and if so,
use that in preference to python when executing the metric computation.
Furthermore, we allow the user to specify the path of the python binary
using the PYTHON variable of make, i.e. “make PYTHON=/foo/python2 metrics”.
2015-07-09 14:44:01 +02:00