is it possible to disable babel's shorthands? I found the
"\shorthandoff{chars}" command, but:
* I should know all the shorthands characters in advance, and
* If I provide a non-shorthand character, then I get an error in
terminal.
I generate LaTeX-files automatically, and I'd like to avoid hard-coding
all the language-shorthands mapping into the script. Any better ideas?
Thank you.
--
Oleg Paraschenko olpa@ http://uucode.com/
http://uucode.com/blog/ Generative Programming, XML, TeX, Scheme
> Hello,
>
> is it possible to disable babel's shorthands? I found the
> "\shorthandoff{chars}" command, but:
>
> * I should know all the shorthands characters in advance, and
> * If I provide a non-shorthand character, then I get an error in
> terminal.
>
> I generate LaTeX-files automatically, and I'd like to avoid hard-coding
> all the language-shorthands mapping into the script. Any better ideas?
The following doesn't really disable them but it does make them expand to
the harmless representation of the character in question. Is that what you
want?
\makeatletter
\def\active@prefix#1#2{%
\ifx\protect\@typeset@protect
\string#1%
\else
\ifx\protect\@unexpandable@protect
\noexpand#1%
\else
\protect#1%
\fi
\fi}
\makeatother
--
Morten
thanks for the suggestion. I've finally implemented a solution, which
is also based on hooking babel internals:
[lessbabel.sty]
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{lessbabel}[2005/10/04 Babel without shorthands]
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{babel}}
\ProcessOptions\relax
\RequirePackage{babel}
\def\bbl@activate#1{}
[/lessbabel.sty]
My documents now use
\usepackage[english,german]{lessbabel}
instead of
\usepackage[english,german]{babel}