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 just realized that when I \usepackage[spanish]{babel} I can no longer use ~ as a non-breaking space before n or N.

MWE:

\documentclass{article}
\usepackage[spanish,notilde]{babel}
\begin{document}
h~n h~l
\end{document}

results in

enter image description here

Which is clearly not what I want.

How do I get the original functionality of ~ while also having the babel package with the spanish option?


EDIT:

Hmmm.. the log file says that I'm using Babel <v3.8h>, which as far as I can tell is the newest version. Also when I try to use [spanish,es-notilde] option I get an error

! Package babel Error: Language definition file es-noshorthands.ldf not found.

or with [spanish,es-notilde]:

! Package babel Error: Language definition file es-notilde.ltd not found.

Looking into spanish.ltd I found the following version:

[2005/03/31 v4.2b Spanish support from the babel system]

but I do not know if it is the most current or not.

As the log file is not too large, I'm quoting it here:

Running `LaTeX' on `tildeTest' with ``pdflatex  -interaction=nonstopmode "\input" tildeTest.tex''
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
 %&-line parsing enabled.
entering extended mode
LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, nohyphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak, german, ngerman, danish, esperanto, spanish, catalan, galician, estonian, farsi, finnish, french, greek, monogreek, ancientgreek, croatian, hungarian, interlingua, ibycus, indonesian, icelandic, italian, latin, mongolian, dutch, norsk, polish, portuguese, pinyin, romanian, russian, slovenian, uppersorbian, serbian, swedish, turkish, ukenglish, ukrainian, loaded.
(./tildeTest.tex (/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo))
(/usr/share/texmf/tex/generic/babel/babel.sty
(/usr/share/texmf/tex/generic/babel/spanish.ldf
(/usr/share/texmf/tex/generic/babel/babel.def))

! Package babel Error: Language definition file es-notilde.ldf not found.

See the babel package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.141 \ProcessOptions*

) (./tildeTest.aux) [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
(./tildeTest.aux) )
(see the transcript file for additional information)</usr/share/texmf/fonts/type1/bluesky/cm/cmr10.pfb>
Output written on tildeTest.pdf (1 page, 4802 bytes).
Transcript written on tildeTest.log.
share|improve this question
4  
Your example code works OK in my TeX Live2011 system. Are you perhaps using some outdated version of babel? –  Gonzalo Medina Dec 14 '11 at 0:39
    
@GonzaloMedina You are exactly right: documentation says the behavior described by OP is the obsolete one. –  Boris Dec 14 '11 at 0:52
    
@GonzaloMedina: added verion number and other information to my original question –  Yossi Farjoun Dec 14 '11 at 14:53
1  
@GonzaloMedina: Version of babel at CTAN and TeX Live and MiKTeX is 3.8m. –  Schweinebacke Dec 14 '11 at 15:00
    
@YossiFarjoun: the most recent version of spanish.ldf is [2009/01/02 v5.0h Spanish support from the babel system]. –  Gonzalo Medina Dec 14 '11 at 16:36

2 Answers 2

up vote 5 down vote accepted

The documentation of Babel says that this is an obsolete behavior: the current version does not redefine ~ by default. Upgrading your system may help.

If you cannot upgrade the system, try to use the option es-notilde to babel. This may restore the "old" behavior of ~. I say "may" because I do not know how old is your version :(

UPDATE The current version of spanish.ldf is 2009/01/02 v5.0h. The manual says that tilde stopped to be redifined by default since v5.

share|improve this answer
    
I added version number and other information to my question –  Yossi Farjoun Dec 14 '11 at 14:53
    
Please seee update –  Boris Dec 14 '11 at 16:20
\usepackage[spanish,es-notilde]{babel}

With texdoc spanish (on a TeX Live distribution), you can access at the full documentation.

As Gonzalo points out, this is the default in recent distributions.

share|improve this answer
    
I'm using v3.8h and this doesn't work for me. –  Yossi Farjoun Dec 14 '11 at 14:53
2  
@YossiFarjoun: Try to update. That's an old version. –  Schweinebacke Dec 14 '11 at 15:01

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.