
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.
18 lines
426 B
Bash
Executable File
18 lines
426 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -x
|
|
imgname=katex/texcmp
|
|
tag=1.1
|
|
imgid=$(docker images | awk "/${imgname//\//\\/} *${tag//./\\.}/{print \$3}")
|
|
cd "$(dirname "$0")" || exit $?
|
|
npm install || exit $?
|
|
if [[ -z ${imgid} ]]; then
|
|
docker build -t "${imgname}:${tag}" . || exit $?
|
|
fi
|
|
base=$(cd ../..; pwd)
|
|
docker run --rm \
|
|
-v "${base}":/KaTeX \
|
|
-w /KaTeX/dockers/texcmp \
|
|
"${imgname}:${tag}" \
|
|
nodejs texcmp.js "$@"
|