-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Description
When an equation is sufficiently long, its bounding box can collide with the equation number. There are two scenarios where this happens:
- The equation exceeds the column width. This feature does not address this case.
- The equation fits within the column, but due to center alignment, it extends far enough right to collide with the equation number.
I proposes implementing collision detection and dynamic positioning improve the typography for scenario 2 occurs. Specifically:
Proposed Behavior
- Detect when the bounding boxes of the centered equation and right-aligned equation number collide.
- If a collision is detected and sufficient space remains in the column, progressively offset the equation leftward until either:
- The equation and number no longer collide and achieve satisfactory typographic spacing, or
- The equation reaches the edge of the column.
Note: In the second outcome, the equation would span the full column width and may still collide with the numbering. This is expected behavior, the feature aims to utilize available space, but cannot resolve collisions when the equation genuinely requires the entire column.
Use Case
Near Collision
Here, the equation is uncomfortably close to the numbering when strictly centered in the column. It would look significantly better with a slightly offset to the left.
Collision
Now the equation is actually colliding with the equation number. But there's plenty of room in the column for them not to collide at all.