Skip to content

Support scalable \middle delimiters #303

Open

Description

@Happypig375

Support \middle<delimiter> inside a matching \left...\right group so one or more interior delimiters scale with the same enclosed content.

Acceptance criteria:

  • Parse one or multiple \middle delimiters only while building a matching \left...\right group; reject use outside that context with the exact source position.
  • Preserve each middle delimiter and surrounding atom lists in the model and canonical serializer.
  • Size left, middle, and right delimiters from the same group extent while retaining their delimiter-specific glyph assemblies.
  • Cover set-builder notation, nested groups, null boundaries, fractions/matrices, scripts, multiple middles, unsupported delimiters, and missing \right.
  • Add structural measurement tests plus focused rendering goldens in display/text/script styles.

A representative e-TeX use is \left\{ x \middle| y \right\}: https://www.latex-project.org/publications/2020-egreg-TUB-tb127gregorio-math.pdf

Parent backlog: #81.

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