# Disappearing left quotation mark in \texttt{} when using babel (norwegian)

When using the package babel with the norwegian option (\usepackage[norsk]{babel}), double-quotation marks (") in \texttt{} disappear if they occur before certain letters (e.g., b, d, and f), but not for others. Is there any solution to this?

Minimal working example:

\documentclass[]{article}
\usepackage[norsk]{babel}
\begin{document}
\texttt{"a" "b" "c" "d" "e" "f"}

\texttt{"a"} \texttt{"b"} \texttt{"c"} \texttt{"d"} \texttt{"e"} \texttt{"f"}
\end{document}


with \usepackage[norsk]{babel} (leading " removed sometimes)

without \usepackage[norsk]{babel} (this is how I want it to be)

• As in Danish " is an active character in Norsk, if we look in norsk.ldf we see for example that \declare@shorthand{norsk}{"e}{\textormath{\bbl@disc e{\'e}}{}}, honestly I have no idea what it is doing here, but there is your rexplanation – daleif Nov 18 '19 at 9:22
• Ahh it is explained further in norsk.pdf you should hjave it on your computer, else find it on texdoc.net – daleif Nov 18 '19 at 9:25
• What are you trying to typeset? If you want to show code better use \verb or some other verbatim command. – Ulrike Fischer Nov 18 '19 at 9:29
• this is being generated from a bookdown-markdown file, so I can't change the environment. – thias Nov 18 '19 at 9:33
• If you don't need the " shorthand, disable it with \shorthandoff{"}. You can also use \usepackage[norsk,shorthands=off]{babel} – Ulrike Fischer Nov 18 '19 at 9:45

You can disable shorthands completly

\documentclass[]{article}
\usepackage[norsk,shorthands=off]{babel}
\begin{document}
\texttt{"a" "b" "c" "d" "e" "f"}

\texttt{"a"} \texttt{"b"} \texttt{"c"} \texttt{"d"} \texttt{"e"} \texttt{"f"}
\end{document}


or locally

\documentclass[]{article}
\usepackage[norsk]{babel}
\begin{document}
\texttt{"a" "b" "c" "d" "e" "f"}

\shorthandsoff{"}
\texttt{"a"} \texttt{"b"} \texttt{"c"} \texttt{"d"} \texttt{"e"} \texttt{"f"}
\end{document}