Reinhard Mayr aka Czerwinski wrote:
Hello,

there is a strange situation with hyphenation that seems to depend on my current formatting. The line I wrote is

---
Resulting genotype YRM5: natNT2::PADH-DON1-3mCherry::kanMX6, PADH-meGFP::URA3
---

where "PADH" both times is written with ADH as subscript, therefore these 3 letters are in a math box.

When the text is written in upright characters, all is fine. Due to nomenclature rules the text has to be italic -- and now the hyphenation does not work and the line does not break.

Can anybody please tell me why this is and how to cope with the situation?
Well, the italic font does usually not have exactly the same width as
the upright font, so of course it may hyphenate differently from upright text.

Switching between italic and upright also inserts italic corrections which
makes for even more difference.

Usually, italic text hyphenates fine, but possibly differently from upright text.
(Try it with some paragraphs containing long normal english words.)

Your text have almost no normal words, that may very well cause a
failure to hypenate in some cases.  Bad luck - it worked for upright
but not for the slightly different italic.  I don't think tex will bother
with a hyphen if it doesn't think the result will be any good anyway.

So, with such lines full of very long non-word strings, the solution is
to break the line manually. If you have thousands of such lines and
really need automatic hyphenation, consider creating a custom
hyphenation for the "language" in use here.

Latex support hyphenation for many languages, but language
hyphenation rules don't work very well with non-word strings.

Helge Hafting

Reply via email to