Closed ahelwer closed 5 months ago
I will attempt to reproduce this on the latest version of Foliate.
I got version 3.1.1 from the nix unstable channel and confirmed this issue still occurs on it.
This seems to be not our bug and not specific to Foliate. I can reproduce this in a plain HTML file in Firefox, WebKitGTK, and Chromium.
Well, shoot. Seems so far upstream that it will be years before it is fixed. Thanks for checking!
Anyway, solved by placing the quotes inside a <mtext>
element inside the <math>
element.
@johnfactotum if I did want to get the ball rolling on upstream fixes, what would be the right bug database to use?
Not sure. You can try searching or reporting the issue to the individual browser engines, like https://bugzilla.mozilla.org/, https://bugs.webkit.org/, https://issues.chromium.org/issues. It's possible that this might be a spec issue, too, in which case you could discuss this in W3C's issue trackers for MathML.
In particular, MathML 3/4 has the following:
an inline math element should be treated as inline (typically exactly as if it were a sequence of words in normal text). In particular, this applies to spacing and linebreaking: for instance, there should not be spaces or line breaks inserted between inline math and any immediately following punctuation.
From https://www.w3.org/TR/MathML3/chapter2.html and https://w3c.github.io/mathml/. But I'm not sure if this is part of MathML Core, which seems to be what browsers are implementing today.
Describe the bug Given an EPUB file with text containing quotation marks (ex: ', ‘, ’, ", “, ”), Foliate should not separate these quotation marks from the text they encapsulate when inserting line breaks. This should also remain true when the encapsulated text is a
<math>...</math>
element.To Reproduce Steps to reproduce the behavior:
Expected behavior I expect Foliate to ensure that quotes stay with the text they encapsulate and are not split across line breaks.
Screenshots
Version: