[Tex/LaTex] Disable babel’s shorthands

babelpreambleshorthands

I want to disable babel's shorthands in my own sty file.

But since I can use \shorthands{off} only inside the document environment, I struggle with this.

Is there a way to disable babel's shorthands in the preamble already?

Best Answer

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\let\LanguageShortHands\languageshorthands
\def\languageshorthands#1{}
\begin{document}

"`foo"'

\LanguageShortHands{ngerman}
"`foo"'
\end{document}
Related Question