A script whose base isn't simple prints as `〖a^b〗^c` in linear text (port of
wordcraft#6084), and LaTeX export copied the brackets into the .tex, where the
exporter's preamble can't set them. They are now a TeX group, `{a^b}^c`; one
without its partner is dropped. Also pins that `〖a+b〗 ^2` keeps the delimiter.
Port of the review fix on wordcraft#6084.
to_linear wrote a script base that isn't simple in parentheses, so sSup(sSup(a, b), c) came out
as (a^b)^c and read back with a visible delimiter. It now writes 〖a^b〗^c, as Word does, and the
parser takes a lone 〖…〗 group as the base itself, as Word builds 〖a+b〗^2, instead of an invisible
delimiter. simple_operand is split out of lin_operand so both use one rule.
From the PR's review: an invisible delimiter that is itself a script base gets an outer pair
(〖〖a〗〗^2); a one-character operator base is written 〖⊗〗_i, since a script after an operator reads
as a pre-script; and only a base just closed by 〗 (after_group) is unwrapped, so an explicit ├a┤^2
keeps its delimiter.
Ported from storytold/wordcraft#6084 (issue wordcraft#6075): its changes to math.rs and
math_linear.rs and its tests/linear_script_base.rs. In the function-name branch of the parser,
where #6083 (stacked scripts) and this PR both change the `attach_script` calls, the stacked-script
chain is kept and the calls pass this PR's new `group` argument (`false`).