Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MathML <mo> created for each adjacent Rel symbol #220

Open
LynnKirby opened this issue Jun 19, 2023 · 5 comments
Open

MathML <mo> created for each adjacent Rel symbol #220

LynnKirby opened this issue Jun 19, 2023 · 5 comments

Comments

@LynnKirby
Copy link

LynnKirby commented Jun 19, 2023

According to the TeXBook, adjacent Rel symbols shouldn't have space between them. In the MathML output, multiple <mo> are created for each symbol which doesn't seem correct. Example of current behaviour:

Input: :::

MathML output:

<mo>:</mo>
<mo>:</mo>
<mo>:</mo>

I would expect only one element to be output. This is what MathJax does, for example.

@LynnKirby LynnKirby changed the title Adjacent Rel symbols should not have space MathML <mo> created for each adjacent Rel symbol Jun 19, 2023
@LynnKirby
Copy link
Author

Actually, spacing attributes are probably more correct than collapsing the symbols into one element. E.g.

<mo rspace=0>:</mo>
<mo rspace=0>:</mo>
<mo>:</mo>

@jgm
Copy link
Owner

jgm commented Jun 20, 2023

I'm curious, why is the latter better?

@LynnKirby
Copy link
Author

An <mo> element is semantically a single operator. It's only correct to collapse adjacent symbols into a single element when the intention is given (like using \mathop{}).

@jgm
Copy link
Owner

jgm commented Jun 20, 2023

Can you give page reference to the relevant part of the TeX book?

@LynnKirby
Copy link
Author

The table at chapter 18, page 170 gives the amount of inter-element spacing. Following the rules in appendix G, adjacent Rel aren't otherwise transformed so the (lack of) spacing applies directly.

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

No branches or pull requests

2 participants