Skip to content

Relation operator in mathtext should not be spaced when at end #23315

Open
@QuLogic

Description

@QuLogic

Actually this reveals another bug: I deleted the ddots (etc.) test because they are now recognized as relation operators and extra spaces got added around them, but such spaces should actually not be there because the test string is r'$\dotplus$ $\doteq$ $\doteqdot$ $\ddots$' i.e. the relation operator is at (both) extremities of the dollar-enclosed part, in which case tex does not introduce a space. For a simpler example, consider figtext(.5, .5, "a$=b$", size=24) with or without usetex. With usetex, there's no space between "a" and "=" (whereas there's one between "=" and "b"), whereas mathtext introduces a space on both sides of the "=".

Fixing this bug (which probably involves reusing something like the "Binary operators at start of string should not be spaced" part of the code in def symbol()) should allow keeping the old ddots test, so I'll look into that...

Originally posted by @anntzer in #22950 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions