Rendering .atmxs files¶
.atmxs files are an intermediate format (see
Creating .atmxs files). Several commands consume
them. Some options only support the grid preset and not slideshow, where
they make no sense; see below.
Note The render verbs are named after their output:
automath render htmlproduces HTML,automath render templates/render wrappersproduce JSON.automath render atmxsdoes the opposite — it produces.atmxsfrom a script source (see Creating.atmxsfiles) — so it does not take an.atmxsfile as input.
.atmxs → HTML (stdout)¶
Pass a single .atmxs file to automath render html. The output contains
both the question and answer sections, always visible, with a print button
only (no interactive form). The HTML is printed to standard output.
Supported for both presets:
Font delivery (--font-mode)¶
How fonts reach the produced HTML — embedded (base64 data URI,
self-contained), served (a static URL; needs fonts.served_base_url) or
local (referenced by name, must be installed on the viewing machine) — is
resolved by this precedence:
- the
--font-modeoption onrender html, if given; - otherwise the
font_modeentry stamped in the.atmxs(see Creating.atmxsfiles), if present; - otherwise the
fonts.modeconfig default (shipped asembedded).
So a snapshot stamped with a mode re-renders in that mode by default, and
--font-mode still overrides it for a one-off:
automath render html output.atmxs > static.html # uses the stamp, or the config default
automath render html --font-mode embedded output.atmxs # override for this render
With -w each file is resolved independently, so a batch may mix stamped
modes.
.atmxs → HTML (written next to the file)¶
With -w / --write, the HTML is written next to each source .atmxs file
instead of to stdout. One or more files are accepted. Supported for both
presets. For the grid preset, if a valid rotate entry is present, two
HTML files are written (<stem>0.html and <stem>1.html):
--answers: answers-only page¶
Render a single HTML page containing only the answer sections of one or more
files (one printed page per file, or two when a rotate entry is present).
Useful for printing an answer key. Only supported for grid documents:
Mail-merge template¶
Output a JSON template for mail-merge assembly from exactly one .atmxs file.
The result is printed to stdout (use -o FILE to write it to a file).
Only supported for grid documents:
automath render templates my_snapshot.atmxs
automath render templates my_snapshot.atmxs -o my_sheet.json
Mail-merge HTML wrappers¶
Output a JSON object containing the HTML wrapper parts (head, section
openers, foot) for assembling a mail-merge document. No .atmxs file is
required: