This is a known problem, and it is even worse in the HTML
because if the sentence ends
... therefore <m>x = 1</m>.
the period at the end of the sentence can end up on the next
Alex Jordan is working on this, which means that he has code
which can detect when math is directly adjacent to non-math.
And he has a way to fix it in HTML.
So, it is just a matter of implementing a similar solution
in LaTeX. I suspect the analogue is wrapping the string in a
hbox or something else that does not allow line breaks (but that
is just me speculating).
Note that it is always wrong to hand edit the HTML or LaTeX.
But in rare cases you are stuck doing that because there are
things which are not yet properly implemented in PreTeXt -- so two
wrongs make a right.
On Sun, 13 Mar 2022, Sean Fitzpatrick wrote:
> I'll probably get in trouble with Rob and David for saying this, but it's fine to edit your
> (Perhaps it's more correct to say authors shouldn't *have* to edit their LaTeX source.)
> This sounds like something that could be a general improvement worth implementing.
> But when I've got a few tweaks I want to implement in my LaTeX source, I generally ask myself,
> which is easier:
> - implementing the tweak in my LaTeX style sheet (custom xsl)
> - running a quick find/replace on the LaTeX source output
> Often it's the latter.
> On Sun., Mar. 13, 2022, 1:01 a.m. gedeoned...@gmail.com
> Hi devs,it is well known that words like \(F\)-linear are not hyphenated by TeX and
> this could lead to an overfull in output. When you are writing a (La)TeX document the
> typical approach is to check the output and, when an overfull arises, manage the
> single word, possibly inserting the hyphenation points in the word linear by \- or
> (better) by adding a 0-space after the dash
> or (even better) use a \(0\)-space and \nobreakdash- from amsmath
> (the last solution avoids hyphenation just after the dash).
> Of course PreTeXt authors shouldn't modify the LaTeX file once that it is generated, but
> maybe the conversion PreTeXt->LaTeX->PDF could take this in account.
> If the source contains something like
> then the conversion to LaTeX could produce
> Is this possible/reasonable/desirable? Maybe it has been already considered and discarded
> for good reasons (I searched in the forums but I didn't find anything about this)
> You received this message because you are subscribed to the Google Groups "PreTeXt development"
> To unsubscribe from this group and stop receiving emails from it, send an email to
> To view this discussion on the web visithttps://groups.google.com/d/msgid/pretext-dev/CAH%2BNcPa2hPwXsQGwaKSTTSZ-eUCQfexYA%2BSjg%3DUfZJN