Possible Duplicate:
Check all hyphenations within a document

I'm having problems with hyphenation patterns in babel's spanish. I'm using MikTeX on Windows and it seems very difficult to solve this problem, at least with my current MikTeX configuration. So, it would be extremely helpful if LaTeX tells me "hey, I've just finished and these are the words I hyphenated, look if they are wrong" when it finish building the document.

Is there a way to accomplish this?

marked as duplicate by lockstep, Mico, Frank Mittelbach, Jake, doncherry Jun 1 '12 at 7:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

migrated from stackoverflow.com May 31 '12 at 16:06

This question came from our site for professional and enthusiast programmers.

  • Welcome to TeX.sx! Your answer was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or edit your answer. Regarding your question, are you getting wrong hyphenations? – egreg May 31 '12 at 16:08
  • Thanks, I already registered here. About the question, I'm indeed getting wrong hyphenations, not according with Spanish rules. – Paulo Bu May 31 '12 at 16:27
  • Please, show a minimal example. Are you loading \usepackage[spanish]{babel}? – egreg May 31 '12 at 16:32
  • Yes, I am loading that package in that way and so far I've researched and this is the proper action to take, the problem is with MikTex engine. I've currently give up to solve it the right way, that's why I'm trying to figure out which are the words MikTex is hyphenating to see which of them are wrong and fix them manually. – Paulo Bu May 31 '12 at 16:36
  • 1
    You have to enable Spanish hyphenation from the MiKTeX control panel. Sorry, but I'm no MiKTeX user; maybe others can help better. – egreg May 31 '12 at 16:54

If you add


to your document the Tex dumps all kinds of information about its line breaking, including where it used hyphenation.




aascac alskcj a awfd acdcnaskca kajhdacnaks kajhd kdcks  jksdh skjd ksj 
aaonescac alskcj a awfd acdtwocnaskca kajhdacnaks kajhd kdcks  jksdh skjd ksj 
aascac alskcj a awfd acdcnaskca kajhdacnaks kajhd kdcks  jksdh skjd ksj 
aascac alskcj a awfd acdcnaskca kajhdacnaks kajhd kdcks  jksdh skjd ksj 


In the log you will see:

awfd acd-c-naskca ka-jh-dac-
@\discretionary via @@10 b=* p=50 d=*
@@11: line 11.3- t=13444 -> @@10
naks ka-jhd kd-cks jksdh

which means a line broke as kajhdac-naks with other hyphens being considered.

That test file has three hyphens as you can see from searching the log fiel with (for example)

egrep -C1 "^@.discretionary" hyph.log

which produces

acdt-woc-naskca ka-jh-dac-
@\discretionary via @@4 b=* p=50 d=*
@@5: line 5.3- t=12330 -> @@4
awfd acd-c-naskca ka-jh-dac-
@\discretionary via @@7 b=* p=50 d=*
@@8: line 8.3- t=12887 -> @@7
awfd acd-c-naskca ka-jh-dac-
@\discretionary via @@10 b=* p=50 d=*
@@11: line 11.3- t=13444 -> @@10
  • But that does give you all attempts TeX made while finding the optimal solution but not only those that actually appear in the document in the end. For that you would to traverse the path back on each paragraph ... well TeX is turing complete, so ... :-) – Frank Mittelbach May 31 '12 at 18:48
  • Ah yes, I could never read that output:-) For the purposes it may be good enough, especially if no one posts anything better... (Although it may be that the OP just hadn't got the right hyphenation tables in the format) – David Carlisle May 31 '12 at 19:29

The releases of MiKTeX prior to 2.9 enabled by default only a small number of hyphenation rules: English, German (old and new orthography) and French.

Enabling hyphenation rules is different from choosing the languages for a document: the simple


doesn't guarantee that correct hyphenation will be performed, unless the language was enabled beforehand and formats have been rebuilt. In the case the language is not enabled, you get the following message in the .log file written during the LaTeX run

No hyphenation patterns were loaded for the language `Spanish'
I will use the patterns loaded for \language=0 instead

The instruction for enabling languages can be found at the following link


enter image description here

After checking the desired languages (spanish, in your case, but also all the others that you need), press "Apply" and then go to the "General" panel

enter image description here

Press the "Update Formats" button. If all's well, a LaTeX run on your document should not present the message any more and the correct Spanish hyphenation will be used.

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