How to break words into syllables in LaTeX correctly

legami picture legami · Sep 29, 2010 · Viewed 24.8k times · Source

I am writing my MSc with LaTeX and I have the problem that sometimes my words are divided in a wrong way.

My language is spanish and I'm using babel package.

How could I solve it?

For example: propuestos appears prop-uestos (uestos in next line). It should be pro-puestos.

Thanks!!

Answer

zwol picture zwol · Sep 29, 2010

If you only have a small number of hyphenation errors to correct, you can use \hyphenation to fix them. For instance: \hyphenation{pro-puestos}. This command goes after \documentclass and before \begin{document}.

You can put more than one dash in, if you want to give TeX more line-breaking options: \hyphenation{tele-mun-dos}. You can list many words inside the braces; put spaces between them.

If more than a handful of words are wrong, though, TeX is probably using hyphenation patterns for the wrong language -- and if "propuestos" were an English word, it would be hyphenated after "prop", so that's another point in favor of that theory. Do you get a message like this when you run LaTeX?

Package babel Warning: No hyphenation patterns were loaded for
(babel)                the language `Spanish'
(babel)                I will use the patterns loaded for \language=0 instead.

If so you need to reconfigure your TeX installation with Spanish hyphenation turned on. There should be instructions for that in the manuals that came with the installation. Unfortunately, this is one of the places where TeX's age shows through -- you can't just load a package with the proper hyphenation rules (or Babel would do that); you have to do it when compiling the "base format" with INITEX, which is a maintenance operation. Modern TeX installations have nice utilities for that but they're all different and I don't know which one you're using.