6

I'm trying to hyphenate a chemical name and have come into difficulty. The word I'm trying to hyphenate is poly(ethyeneglycol).

I'm using babel and inputenc. I've tried specifying a custom hyphenation pattern using \hyphenation{poly(ethylene-glycol)} but it fails to complete.

Being chemistry terminology I wondered if this was dealt with by a chemistry package such as mhchem but have not found a package that does it.

egreg
  • 1,121,712
Darling
  • 3,597
  • I have noticed all your words "hyphenate" were missing the h, including the command \hyphenation{poly(ethylene-glycol)}. I corrected them all in your question, but perhaps your code needs to be corrected as well? Maybe is just a misspelling problem? – Vivi Jun 13 '12 at 16:19
  • 2
    Have you looked at bpchem and the \IUPAC macro? – Joseph Wright Jun 13 '12 at 16:23
  • Hi Joseph, the IUPAC macro didn't seem to do anything to it. Thanks everyone. – Darling Jun 14 '12 at 10:14

1 Answers1

9

Techically, ( and ) are not letters, so they won't participate to hyphenation. You can make them acceptable with the following trick, which should have no adverse effect with normal input:

\lccode`\(=`\(
\lccode`\)=`\) 
\hyphenation{poly(ethylene-glycol)}

A different strategy could be to define a macro:

\newcommand{\Q}[1]{(\nobreak\hspace{0pt}#1)}
\hyphenation{ethylene-glycol} % TeX incorrectly hyphenates this word

and use

poly\Q{ethyleneglycol}
Mico
  • 506,678
egreg
  • 1,121,712