The links between the lines of a derivation
\from{name}{…} in the LaTeX of a line marks a sub-term that comes from the
part name of an earlier line. Temml writes the attribute data-from on
the MathML of the sub-term. place/1 gives each link a copy of its source,
with the copies of Expresso.Element.Copy. The copy has the steps of the
line of the link, and it moves from its source to the linked sub-term.
The source of a link is each element with the name in the nearest earlier
line that has the name. An element belongs to the line of its nearest
ancestor with the name of a line. docs/line-links.md gives the design.
A link with the name of a set of Expresso.Element.Math.Each takes one
occurrence of the set: the link number k with that name and that source
line takes the occurrence k of the set in that line.
docs/each-occurrence.md gives the design.
Summary
Functions
Give each link of a math element a copy of its source
Functions
@spec place(Expresso.Element.Math.t()) :: Expresso.Element.Math.t()
Give each link of a math element a copy of its source
The function gives the linked sub-term number n the class link-n, and
each element of a source in the line j the class from-j-name. It then
adds one copy part for each link: from from-j-name to link-n, with the
steps of the part of the line of the link. It raises for a name that no
earlier line has, and for a line with links and with no steps.
A line with steps: 2 shows from its second step, and its copies move from
its first step.
A line of a rewrite takes a step for each group of its phases. The
rewrite of the line gives the step when each part gets its color, such as
the occurrences of the rewrite in the old line and the source of by, the
step when the copies of the kept runs, keep-k-n, move, and the step when
the other copies move. The line shows at its last step.