mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-12 06:28:40 +00:00
Summary: Create our own screenshotting script which takes screenshots. This improves over huxley for a couple reasons: - It makes the screenshots the correct size (for some reason, huxley struggles with this). - Its configuration matches more with what we want (we don't need multiple screenshots or interaction, we just want a single static shot) - It runs faster I also changed the docs to reflect this change. Test Plan: - Make sure all of the tests that were in the Huxleyfile are now in ss_data.json - Run the screenshotter docker - Make sure all of the images look reasonable and don't change (except sometimes the Lap test, which has some strange pixel-positioning differences...) Reviewers: kevinb Reviewed By: kevinb Differential Revision: https://phabricator.khanacademy.org/D16731
30 lines
1.3 KiB
Markdown
30 lines
1.3 KiB
Markdown
### How to generate screenshotter images
|
|
----------------------------------------
|
|
|
|
Now you too can generate screenshots from your own computer, and (hopefully)
|
|
have them look mostly the same as the current ones! To start, make a docker
|
|
image from the included Dockerfile using a command like
|
|
|
|
docker build --tag=ss .
|
|
|
|
from within this directory (note you need to have docker installed and running
|
|
for this to work). This will build a docker image with the `ss` tag, which you
|
|
can then use to run dockers based on it.
|
|
|
|
This Dockerfile is set up such that it will run everything and generate all the
|
|
screenshots when the docker is run, so no interactive input is required. All
|
|
that you need to do is mount the KaTeX directory you want to test into the
|
|
`/KaTeX` directory in the docker, and run the `ss` docker, like so:
|
|
|
|
docker run --volume=/your/KaTeX/:/KaTeX ss
|
|
|
|
The `--volume=/your/KaTeX:/KaTeX` switch mounts your KaTeX directory into the
|
|
docker. Note this is a read-write mounting, so the new screenshots will be
|
|
directly placed into your KaTeX directory.
|
|
|
|
Since this docker is very self-contained, there should be no need to do
|
|
interactive management of the docker, but if you feel the need, you can read the
|
|
General Docker Help section of the MathJaxFonts docker readme.
|
|
|
|
That's it!
|