apsis-book/frontend/src
dev ec78ac009b Let a formula be copied as the formula
Copying a formula from a page gave one character per line: the SGP4 a_1
block arrived as a hundred and thirty-two lines for a hundred and
thirty-two characters. That is how a browser copies MathML, which is one
element per token and is walked one element at a time.

The rendering was not the fault. The block was measured in place and the
six rows each hold their two cells side by side, with the tokens of a row
sharing a baseline, and a screenshot agrees. What was wrong is what a
reader gets when they take the formula away.

The source is therefore carried beside the MathML in an element that can
be selected, and the MathML is taken out of selection. A copy now yields
the notation the formula was written in, on one line, which is what a
reader can paste into a tool that understands it.

The source is trimmed when it is rendered, because the delimiters of a
display formula sit on their own lines and the newline after the opening
pair was arriving as a leading space.
2026-10-02 12:06:11 +08:00
..
lib web: scroll to the top on navigation, organize the interface by layer, and set the formulas in the tool output 2026-10-01 22:46:56 +08:00
pages web: key a translation by its crate, and drop the facade from the catalog 2026-10-01 23:44:55 +08:00
App.svelte web: scroll to the top on navigation, organize the interface by layer, and set the formulas in the tool output 2026-10-01 22:46:56 +08:00
app.css Let a formula be copied as the formula 2026-10-02 12:06:11 +08:00
main.ts web: add the apsis-web service, content, and frontend 2026-09-27 00:53:20 +08:00