sile-typesetter / sile

The SILE Typesetter — Simon’s Improved Layout Engine
https://sile-typesetter.org
MIT License
1.67k stars 99 forks source link

feat(math): Support MathML mtext and ms elements #2140

Closed Omikhleia closed 3 weeks ago

Omikhleia commented 1 month ago

Ticking one box in #2138

I am on a quest, sort of...

So let's derive the Quadratic Formula.

image

OlivierNicole commented 1 month ago

This looks like a good working first step. Note that one day we probably want to be able to use SILE commands in \text, just like arbitrary TeX formatting can be applied inside a \text{...}

Omikhleia commented 1 month ago

Note that one day we probably want to be able to use SILE commands in \text, just like arbitrary TeX formatting can be applied inside a \text{...}

But I'd advocate against it, as far as I have a word to say. It's not a "common" denominator for any real use case.

Omikhleia commented 1 month ago

But I'd advocate against it, as far as I have a word to say. It's not a "common" denominator for any real use case.

"Note that one day we probably want to be able to use SILE commands"... Really? Folks, please be much more precise, do you mean SIL in its TeX-like syntax? (as \em and that sort of stuff?). Do you imply there's a real added value in general for this to be true? Do you have, I dunno, a real book project where you desperately need such a thing?

Had you said: "one day we probably want to be able to use Markdown, Djot or other markup in \text", I'd would have raised an eyebrow with interest.

How long does it take for you to understand that SIL is a dead end?

Omikhleia commented 1 month ago

BUT let's go back on topic; there's a PR here, does it pass the bar? Something is better, sometimes, than an idealized nothingness.

alerque commented 3 weeks ago

Hey guys can we take the rhetoric down a notch or two please? I should have caught this earlier but I've spent most of a couple weeks waiting in a hospital and haven't had the energy. This is an entirely volunteer project and interested parties are going to have different ideas and backgrounds. It's okay to disagree, but the last half dozen issues I've looked at today have a bit too much snark. I appreciate the contributions for sure and it's okay to think we're doing some things wrong, but lets take it easy.

Trying to ignore the tone now and address a little point:

How long does it take for you to understand that SIL is a dead end?

Says who? You don't have to use it or like it, but given how much easier it is to read and write manually than XML I don't see it going anywhere. Also it is (or should be) 100% just % syntactic sugar over a semantic document that could just as well have been XML. It is easy to parse and very overhead to maintain, so it is not going anywhere.

That being said I don't see it as any different from any other input format, we should have 100% first class coverage for either XML or SIL (and potentially others in the future), the SIL syntax sugar is not some magic special "this is the SILE way" that gets special treatment.

"Note that one day we probably want to be able to use SILE commands"... Really? Folks, please be much more precise, do you mean SIL in its TeX-like syntax?

I read this as SILE commands, probably matching whatever syntax flavor the parent document is using (XML-ish or TeX-ish or whatever other input module is being used. And yes I agree that text content inside an equation should support the typesetting features of the typesetter, not just plain text. There is precedent for this in every other Math layout system I've seen (including GUI ones used in desktop publishing, for better or worse).

That doesn't mean it has to be in this PR, just saying I'd be open for contributions in that direction.