diff --git a/Makefile b/Makefile index ecccb2977..21003aee9 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,8 @@ -UNAME=$(shell uname) - .PHONY: build setup copy serve clean metrics build: setup build/katex.js build/katex.less.css -ifeq ($(UNAME),Darwin) -build: pdiff -endif setup: npm install -ifeq ($(UNAME),Darwin) - which webkit2png || brew install webkit2png - which gm || brew install graphicsmagick -endif compress: build/katex.min.js @printf "Minified, gzipped size: " @@ -29,13 +20,6 @@ build/katex.less.css: static/katex.less serve: node server.js -pdiff: - @printf "Creating new pdiff image...\n" - @webkit2png http://localhost:7936/test/pdiff.html -F --transparent -D build -o pdiff - @mv build/pdiff-full.png build/pdiff.png - @printf "Comparing to reference pdiff image...\n" - @node test/pdiff.js - metrics: cd metrics && ./mapping.pl | ./extract_tfms.py | ./replace_line.py diff --git a/test/pdiff.html b/test/pdiff.html deleted file mode 100644 index fbea24db3..000000000 --- a/test/pdiff.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - KaTeX Perceptual Diff - - - - - - - -
1\le2+2=4\ge3\ne\pi
-
x^{x^{x_b}_b}x_{b_b}x^x_b
-
\tiny{a}\scriptsize{b}\footnotesize{c}\small{d}\normalsize{e}f
-
\blue{a}\orange{b}\pink{c}\red{d}\green{e}\gray{f}\purple{g}
-
\angle ABC \approx \frac{3}{4}\!\lvert x \rvert \cos\theta
-
\langle a , b \rangle \colon \div \pm \infty
-
(mn)^3=\blue{m^3n^3}\in\dfrac{5m^4\cdot\blue{m^3n^3}}{15m^2} \dfrac{5m^7n^3}{15m^2}
-
\blue\dfrac{\frac{\phi^2}{3}-G_a^{x^3}}{2\times3+4}+\orange\dfrac{(x^2+y^2)^\frac{1}{2}}{\tan\psi^\tau+2/3}
-
\quad 800\cdot (\frac{1}{2})^{\frac{t}{14}}=50
-
text text text\dfrac{stuff}{things}text text text
- - diff --git a/test/pdiff.js b/test/pdiff.js deleted file mode 100644 index db8915eb5..000000000 --- a/test/pdiff.js +++ /dev/null @@ -1,37 +0,0 @@ -var fs = require('fs'), - gm = require('gm'), - path = require('path'); - -var original = path.join(__dirname, 'pdiff.png'), - modified = path.join(__dirname, '../build/pdiff.png'), - difference = path.join(__dirname, '../build/DIFF.png'); - -var colors = { - reset: "\033[0m", - red: "\033[31m", - green: "\033[32m" -}; - -function log(message, color) { - console.log(color + message + colors.reset); -} - -gm.compare(original, modified, /* tolerance */ 0, function(err, isEqual) { - if (err) { - console.error(err); - } else if (isEqual) { - log("No perceptible differences.", colors.green); - // Remove any previously generated difference images - fs.unlink(difference, function() {}); - } else { - log("Perceptible difference detected! See build/DIFF.png", colors.red); - // Generate new difference image - gm.compare(original, modified, { - /* output */ file: difference - }, function(err) { - if (err) { - console.error(err); - } - }); - } -}); \ No newline at end of file diff --git a/test/pdiff.png b/test/pdiff.png deleted file mode 100644 index dce413d7e..000000000 Binary files a/test/pdiff.png and /dev/null differ