Behaviour SwRS-MDOKFSTUDIO-PALETTE-133
Math wraps the selection in an inline, display or aligned equation
When the writer presses Math and chooses a kind of the menu of `Inline $…$`, `Display $$` and Aligned equations, the extension SHALL write the selection, or a sample, as `$text$`, as a `$$` block or as a `$$` block with a begin and end align environment, and refuse any other kind.
Part of StRS-MDOKFSTUDIO-PALETTE-021, outside the paths drawn on its map.
Scenarios 5
The situations the tests check; open one to read it.
nominalThe menu
Giventhe MyST mode
Whenthe writer presses Math
Thenthe menu has the three entries with the values inline, display and aligned, and the tooltip reads Math (choose inline, display or aligned)
nominalInline
Giventhe text a b c with b selected
WhenInline is chosen
Thenthe text is `a $b$ c` with b selected
nominalBlock
Giventhe caret after Intro
WhenAligned is chosen
Thena `$$` block with the align environment and the sample a &= b follows Intro after a blank line, with the sample selected
boundarySamples with no selection
| Kind | Sample written with no selection |
|---|---|
| Inline | x |
| Display | E = mc^2 |
| Aligned | a &= b |
refusalUnknown kind
Giventhe argument bogus
Whenthe math action runs
Thenno edit is produced