8

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.
Yossi Farjoun
  • 13,274
  • 10
  • 74
  • 96

2 Answers2

7
\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.

egreg
  • 1,121,712
6

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.

Boris
  • 38,129