pub fn dualize_arglist(
presentation: &str,
args: Vec<Option<Tokens>>,
) -> Result<(Vec<Option<Tokens>>, Vec<Option<Tokens>>)>Expand description
Flesh out two dual (mathematical) forms of a given list of arguments.
Given a list of Tokens (to be expanded into mathematical objects) return two lists (1) The Tokens’ wrapped in an XMAarg, with an ID added (2) a corresponding list of Tokens creating XMRef’s to those IDs
Ah, but there are complications!!! On the one hand, arguments may be hidden, never appearing on the presentation side (all will be passed to the content side); This argues for putting the XMArg’s on the content side. OTOH, they ought to be on the presentation side, so that they can be expanded & digested in the proper context they will be presented, and pick up all the styling (font size, displaystyle..) I don’t know how to work around the latter, so we’ll put args on the presentation side, UNLESS they are hidden, in which case they’ll be on the content side. So, how do we know if they’re hidden? We’ll scan the presentation for #\d, that’s how!