OFB Community Mailing Lists

The following archives are provided as a public service to the community. Opinions archived here do not necessarily represent the opinions of Open for Business or its contributors.

[CS-FSLUG] Babel? Oh my ...

Eduardo Sanchez lists at sombragris.org
Mon May 17 11:17:09 EDT 2004


Well listpeople, this is just to share a weird story hoping to save 
someone a few headaches.

As you know, I am a Slackware user, running right now Slack 9.1. I also 
happen to be both a LaTeX user and a Spanish speaker. Now, while I was 
using my Slack 9.1, I had to use 00.org for most of my text documents 
due to the nature of my work.

However, when I had to go to Latex again to do some text processing. 
When it was the time to process my file, something looked horribly 
wrong. Then I realized what it was: The hyphenation was for English 
instead of Spanish! For example, the word "Seminario" was hyphenated as 
"Sem-inario" instead of the correct "Semi-nario".

Then, when I saw the log for the file, I was able to find this:

================================================================
(/usr/share/texmf/tex/generic/babel/babel.sty
Package: babel 2001/03/01 v3.7h The Babel package

(/usr/share/texmf/tex/generic/babel/spanish.ldf
Language: spanish.ldf 2001/01/30 v4.1c Spanish support from the babel 
system

(/usr/share/texmf/tex/generic/babel/babel.def
File: babel.def 2001/03/01 v3.7h Babel common definitions
\babel at savecnt=\count87
\U at D=\dimen103
)

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

but I knew I had hyphenation patterns for Spanish! Moreover, I did use 
Latex in Slack 9.0 and it worked flawlessly! I was dumbfounded to say 
the least.

I checked in my texmf directory hierarchy, and I found alright the 
language definitions:

================================================================

[eduardo: /usr/share/texmf] $ ls tex/generic/config -al
total 24
drwxr-xr-x   2 root root 4096 2003-03-08 21:56 .
drwxr-xr-x  22 root root 4096 2003-03-08 21:56 ..
-rw-r--r--   1 root root 2905 2001-09-27 06:45 fontmath.cfg
-rw-r--r--   1 root root 2905 2001-09-27 06:45 fonttext.cfg
-rw-r--r--   1 root root 3710 2004-05-17 10:12 language.dat
-rw-r--r--   1 root root 2904 2001-09-27 06:45 preload.cfg
================================================================

Peeking on language.dat I found something revealing. The Spanish 
hyphenation patterns were commented out.

================================================================
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The following languages are disabled by default. Uncomment what you 
need.
% To enable, remove %! and the space.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%! bahasa       inhyph.tex
%! basque       bahyph.tex
%! croatian     hrhyph.tex

[...] 

%! slovene      sihyph23.tex
%! spanish      sphyph.tex
%! turkish      trhyph.tex
================================================================

So I was happy as a clam. I uncommented the line for Spanish, and off I 
went. But when I tried to process that Latex file again, I got the same 
message! Perhaps Latex was not aware of the changes, so I ran texhash, 
to rebuild the internal file tree that Latex uses; but to no avail.

I was really perplexed and especially frustrated because I couldn't make 
this Latex Spanish-aware in something as important as the hyphenation 
patterns. As a last resort, I searched the web. Well, after some 
looking, I found an obscure PostScript file (in Spanish) at this URL:

http://numerix.us.es/curso/curso2.ps

This file had the info I needed. It turned out that after doing your 
changes to language.dat, you must rebuild latex.fmt, using this 
command:

# /usr/share/texmf/bin/initex /usr/share/texmf/tex/latex/base/latex.ltx

this gives you a brand-new latex.fmt and latex.log file. You must 
replace the existing latex.fmt at the location $TEXMF/web2c/latex.fmt 
with the new one.

Only after that I was able to hyphenate in Spanish properly.

Weird, isn'it?

Blessings,


Eduardo
-- 
Prof. Eduardo Sanchez
Asuncion, Paraguay, South America
--------------------------------------------------------------
 That ev'n buried Ashes such a snare
 Of Vintage shall fling up into the Air
   As not a True-believer passing by
 But shall be overtaken unaware.

	-- The Rubaiyat of Omar Khayyam
	   

--------------------------------------------------------------



More information about the Christiansource mailing list
Home About Connect: Twitter Facebook RSS
© 2001-2011 Universal Networks, All Rights Reserved. Some content rights may be held by Universal Networks' providers and used under license. Powered by ServerForest and SAFARI. Learn about our privacy policy here.