public Msubsup(IBuildable[] contents) { // handle star superscript List <IBuildable> localCopy = new List <IBuildable>(contents); if (localCopy.Count == 3) { Mo mo = localCopy[2] as Mo; if (mo != null && mo.IsTimesOrStar) { Mi subscript = localCopy[1] as Mi; if (subscript != null) { subscript.Content += Semantics.starPrefix; localCopy.RemoveAt(2); } else { // maybe the subscript is an mrow Mrow row = localCopy[1] as Mrow; if (row != null && row.LastElement != null && row.LastElement is WithTextContent) { WithTextContent lastElem = (WithTextContent)row.LastElement; lastElem.Content += Semantics.starPrefix; localCopy.RemoveAt(2); } } } } base.contents = localCopy.ToArray(); }
public override void Visit(StringBuilder sb, BuildContext context) { if (contents.Length == 3) { // is the first one an operator? Mo mo = contents[0] as Mo; if (mo != null) { if (mo.IsSigma) { //todo: summation! } } } else { sb.Append("Munderover must have 3 items"); } }