Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am having trouble with the hyphenation of a project I am writing. More precisely it will not hyphenate the word $\ast$-homomorphism. I have tried with \hyphenation{ho-mo-mor-phism}, but to no luck. Of course I suspect that it is the $\ast$- which courses the problem, but why? and how do I make the word hyphenate?

Here is an example where my problem occurs:

\documentclass[a4paper,10pt,draft]{article}

\hyphenation{ho-mo-mor-phism}

\begin{document}

I would really much like to have the---frequently
appearing---word $\ast$-homomorphism hyphenated.

\end{document}
share|improve this question

2 Answers 2

up vote 7 down vote accepted

The package hypenat is designed to allow for this sort of thing.

\documentclass[a4paper,10pt,draft]{article}
\usepackage{hyphenat}

\begin{document}

I would really much like to have the---frequently
appearing---word $\ast$\hyp{}homomorphism hyphenated.

\end{document}

It makes the the point after the dash breakable, whence the following word can be hyphenated.

hyphenation of homomorphism

(The hyphenation point is slightly different as I actually used the standalone class to produce this image and it did it with a different line width.)

share|improve this answer
1  
Actually between $\ast$ and homomorphism is the only place I don't want the word hyphenated. How do I make hyphenation possible in homomorphism but tell LaTeX that it should not hyphenate after $\ast$? Is there no solution such as \hyphenate{...}, so that you specify where hyphenation is to take place and avoid replacing - with \hyp{} in all occurrences of $\ast$-homomorphism, becuase I already have quite a few pages. –  Kristian Sep 20 '12 at 15:55
    
Ah, that wasn't clear from your question. In that case, I have bad news for you: take a look at tex.stackexchange.com/q/2706/86 Indeed, based on that comment I'd say this question is (unfortunately - given the answer there) a duplicate of that one. –  Loop Space Sep 20 '12 at 16:19
    
No, this was not one of my questions. Your answer just made me ralize that it was a problem I had not thought of. The real question was how to make LaTeX hyphenate the word $\ast$-homomorphism. I'm just sorry that I have to search and replace all the files in my document. But I guess that's life. Thanks. –  Kristian Sep 20 '12 at 17:34

Using a "local hyphenation" technique:

enter image description here

\documentclass[a4paper,10pt,draft]{article}

\begin{document}

I would really much like to have the---frequently
appearing---word $\ast$-ho\-mo\-mor\-phism hyphenated.

\end{document}​
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.