[tex-live] serious `slovak' Babel bug

Zdenek Wagner zdenek.wagner at gmail.com
Mon Jan 4 15:32:45 CET 2010


2010/1/4 Ulrike Fischer <news3 at nililand.de>:
> Am Mon, 04 Jan 2010 08:50:51 +0100 (CET) schrieb Werner LEMBERG:
>
>> Folks,
>>
>>
>> is it useful today to report Babel bugs to the LaTeX bug database?  Does
>> anybody take care of answering them or even fixing issues?
>>
>> Here's a quite serious bug:
>>
>>   \documentclass{article}
>>
>>   \usepackage[slovak,USenglish]{babel}
>>
I know about it. ^ is used as a shorthand so that if a user is not
able to type the character on the keyboard, it is possible to type
just ^o instead of \^{o}. The definition is smart, it handles math
correctly but the problem is that ^^78 is handled by the "TeX mouth",
i.e. cannot be handled by macros. Slovak.ltx was deveoped by Petr
Tesarik. He wrote me that he took this feature from an older version
of slovak.sty and included it just not to break compatibility with
legacy documents. I personally do not like ^ as a shorthand character
but Slovak users should say whether they need it or whether we can
remove it.

>>   \begin{document}
>>
>>   ^^78
>>
>>   \end{document}
>>
>>   ===>
>>
>>     ! Missing $ inserted.
>>     <inserted text>
>>                     $
>>     l.7 ^
>>          ^78
>>     ?
>>
>> It might be acceptable that the ^^xx notation fails within a Slovakian
>> language environment since the circumflex has been made a shorthand,
>> but this is not the case here.
>
> This is a general babel behaviour: the catcodes of the various
> shorthands are not reset at language switches. I reported this in
> comp.text.tex some month ago
> (http://groups.google.de/group/comp.text.tex/browse_thread/thread/86d6d296ae28016e?fwc=1)
>
> In some cases it is enough to use \shorthandoff. In other (like
> yours) you must explicitly reset the catcode
>
> \documentclass{article}
> \usepackage[czech,%make - active
>            slovak,USenglish]{babel}
> \begin{document}
> %\catcode`\-=12
> \shorthandoff{-}
> \begin{tabular}{ll}
> a & b\\\cline{1-2}
> \end{tabular}
>
> \catcode`\^=7
> %\shorthandoff{^}
> ^^74
>
> \end{document}
>
>>  Especially in the light of the recent discussion of using
>> the ^^xx notation instead of `real' 8bit character codes it's quite
>> important IMHO to fix this problem.
>
> Well I doubt a bit that many users use ^^xx in the document, and ^
> in math works still fine.
>
> --
> Ulrike Fischer
>
>



-- 
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz


More information about the tex-live mailing list