Skip to content

Support \multicolumn cells in math arrays #304

Open

Description

@Happypig375

Implement \multicolumn{count}{alignment}{content} for math array-style tables using explicit spanning-cell metadata and layout.

Scope:

  • Accept the command only as a table cell in supported math array/matrix environments.
  • Require a positive integer count, an l, c, or r alignment, and a content group.
  • Represent the span and alignment in the table model; do not flatten it into an ordinary cell or pre-spaced LaTeX.

Acceptance criteria:

  • Column measurement reserves the combined spanned width and inter-column spacing exactly once.
  • Following cells begin after the occupied columns; spans beyond the table width and overlapping/impossible placements are rejected at the correct source position.
  • Left, center, and right alignment apply within the full spanned width.
  • Vertical rules, neighboring cells, table delimiters, and the \hline support from Port iosMath 2026 commits to CSharpMath #264 use the resulting table geometry correctly.
  • Serialization emits a canonical \multicolumn{count}{alignment}{content} and parse → serialize → parse preserves table equality.
  • Tests cover one-column and full-width spans, partial spans followed by cells, all alignments, nested math, multiple rows, vertical rules, and \hline combinations.
  • Zero, negative, non-numeric, too-large, missing, nested/unsupported, and invalid-alignment inputs produce deterministic position-aware errors.

Parent table-layout issue: #195.

Activity

  1. added
    Type/Enhancement
    Area/Parsing
    Area/Rendering
    on Aug 30, 2026
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/ParsingArea/RenderingType/Enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions