Skip to content

Always serialize editor scripts with braces #197

Description

@charlesroddie

The editor's LaTeX serializer currently removes braces from one-atom scripts, producing x^2 and \log_2(x), while multi-atom scripts necessarily use braces. Use one canonical form for both cases: x^{2} and \log_{2}(x).

Acceptance criteria:

  • The parser continues to accept braced and unbraced one-token scripts.
  • MathListToLaTeX always emits braces around subscripts and superscripts, including a single atom.
  • MathKeyboard/editor output uses the same canonical form.
  • Round-trip and editor keypress tests cover single-token, multi-token, nested, and empty/placeholder scripts.
  • Document the intentional serialized-string change for consumers comparing LaTeX text.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area/EditorThe math editor, keyboard, cursor, or editing model.Type/EnhancementA concrete change to CSharpMath behavior or capability.good first issueApproachable for a first contribution; scope and acceptance criteria are clear.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions