Skip to content

Wrap sideset in an TeXAtom of class OP#809

Merged
dpvc merged 1 commit intodevelopfrom
fix-sideset
May 17, 2022
Merged

Wrap sideset in an TeXAtom of class OP#809
dpvc merged 1 commit intodevelopfrom
fix-sideset

Conversation

@dpvc
Copy link
Copy Markdown
Member

@dpvc dpvc commented May 16, 2022

This PR resolves the issue raised by Peter with \sideset{}{^*}{\sum}_{a\mid A_y} where the final underscore should place its argument under the sum rather than in subscript position. This is done by placing everything into a TeXAtom of class OP so that the limits are placed above and below in displaystyle.

The positioning is not quite the same as in LaTeX, however. You could get the proper placement using

\sideset{}{^*}{\sum}_{a\mid A_y\hphantom{*}}

but I am hesitant to add such phantoms automatically as they would have to be removed in textstyle, and would also require special processing of subscript and superscripts that follow the \sideset. That could be done, but would require additional StackItems to handle it.

@dpvc dpvc requested a review from zorkow May 16, 2022 12:44
@dpvc dpvc added this to the 3.2.1 milestone May 16, 2022
@pkra
Copy link
Copy Markdown
Contributor

pkra commented May 16, 2022

Thanks, @dpvc.

The positioning is not quite the same as in LaTeX,

The change in spacing seems worth it.

but I am hesitant to add such phantoms automatically as they would have to be removed in textstyle, and would also require special processing of subscript and superscripts that follow the \sideset. That could be done, but would require additional StackItems to handle it.

Those phantoms do seem like overkill. I'll let you know if we ever run into very long sideset scripts.

Copy link
Copy Markdown
Member

@zorkow zorkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested and it works.
l

@dpvc dpvc merged commit fea2ab6 into develop May 17, 2022
@dpvc dpvc deleted the fix-sideset branch May 17, 2022 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants