Commit Graph

10 Commits

Author SHA1 Message Date
Erik Demaine
2ee5c684ee Update texcmp (#1297)
* Update texcmp

I found that the existing docker rules for texcmp did not make a working
installation of LaTeX; in particular, it was missing a lot of the recently
added packages.  I updated to Ubuntu 17.10 and tweaked the package listings
until things compiled again.  Now I can run texcmp again.

* texlive-font-utils not necessary
2018-05-09 09:34:47 -04:00
Martin von Gagern
ad0abbd4e9 Update texcmp to ubuntu 17.04 and avoid mounted host directory (#722)
* Update texcmp to ubuntu 17.04 and avoid mounted host directory

Switch to linux 17.04 in order to have a version of nodejs which understands
ES6 syntax, for the sake of a consistent codebase.
Avoid mounting the host directory, but use “docker cp” instead to transfer
files between host and container.  This should avoid ownership and
permission issues.
Support macros with positional arguments.
Fix one overline example which caused LaTeX failure due to missing braces.

* Extract texcmp results as current user

This allows running the texcmp.sh script using sudo on afs.

* Change texcmp conversion to gray

As per #708, this should increase compatibility with older versions of
imagemagick, and might also do a better job of preserving the original sRGB
color space.

* Abandon tar and use plain docker cp instead

Thanks to Erik Demaine for suggesting this.

* Move npm install into creation of texcmp docker image
2017-06-11 16:02:06 -04:00
Martin von Gagern
bd9db332d2 Turn var into const or let 2017-01-13 22:37:17 -05:00
Martin von Gagern
53e416e296 Revert "Remove trailing commas for IE 9 compatibility"
This reverts commit 4d2e46e7f6.

Having trailing commans makes diffs easier to read as it avoids modifying a
line just to add a trailing comma if there is another item to add at the end
of a list.  There are plans to switch to ES6 notation and to translate that
to ES5 as part of the build process.  Since that translation would remove
trailing commas, the IE9 problems that originally motivated the commit
should vanish soon.
2017-01-11 13:26:00 +01:00
Martin von Gagern
90e25fecc2 Update dependencies to more recent version
All these version ranges include the latest version at the time of this
commit, except for the selenium webdriver.  There version 3 is incompatible
with version 2, and switching to a version 3 library appears to require
switching to version 3 docker images as well, which would entail using
different browser versions which in turn would lead to differences for a
large number of screenshots.  That doesn't appear warranted at this time.
2017-01-09 15:09:43 +01:00
Emily Eisenberg
4d2e46e7f6 Remove trailing commas for IE 9 compatibility
Summary: IE 9 doesn't like trailing commas. When we introduced eslint, we added
a bunch of trailing commas, which makes IE 9 sad.

Test Plan:
 - `make lint`
 - Visit http://localhost:7936/ using IE 9 on browserstack.
 - See that the math loads, and there are no errors in the F12 developer tools.

@kevinb
2017-01-06 19:06:01 -08:00
Martin von Gagern
d5025c61e8 Fix texcmp issues related to bit depth and kerning (#549)
* Ensure bit depth 8
* Print affected file if PNG failed to read (e.g. due to wrong bit depth)
* Disable running Kern test case through TeX as doing so fails
2016-10-22 19:37:18 -04:00
Kevin Barabash
14a58adb90 Migrate to eslint
Summary
We'd like contributors to use the same linter and lint rules that we use
internally.  This diff swaps out eslint for jshint and fixes all lint failures
except for the max-len failures in the test suites.

Test Plan:
- ka-lint src
- make lint
- make test

Reviewers: emily
2015-12-01 10:02:08 -08: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
Martin von Gagern
c562813afa Take snapshots of formulas rendered by LaTeX and compute visual diffs
The same test cases we use for our screenshots from Firefox are now also
being rendered by pdflatex, so the resulting images can be used as reference
for how things are supposed to look (if we concentrate on compatibility with
LaTeX).  To make comparisons even easier, the differences between LaTeX and
Firefox snapshots are rendered in a visual way, using different colors.

Discussed in pull request #268.
2015-07-06 15:54:14 +02:00