views:

91

answers:

1

Hi,

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!!

+4  A: 

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.

Zack
I'm not sure if I understand you, I'm pretty new in LaTeX. Some of my words are OK, but not all (maybe 30% wrong). I am using Latex Editor (LEd), where can I check that configuration? If I use \hypenation I have to add that in my main document or in the word? Thanks a lot :)
andofor
I edited my answer with more instructions for how to use `\hyphenation`. At 30% errors, though, I would bet on the language configuration being wrong. I don't know anything about LEd, sorry, but the place to tweak is probably not the editor, but TeX itself (MikTeX or TeXLive or something like that).
Zack
For MiKTeX, see http://docs.miktex.org/manual/hyphenation.html
Zack
I also have MikTeX so probably is there... anyway thanks Zack )
andofor