5

I write a presentation in German language, so I use

\usepackage[ngerman]{babel}

Now, I want to write "UTF-8" but the output looks like that:

scrrenshot

How can I fix it?

Thank you for your help!

MWE:

\documentclass{beamer}

\usetheme{Boadilla}

\usepackage[ngerman]{babel}

\begin{document}

    \begin{frame}
        \texttt{"UTF-8"}
    \end{frame}

\end{document}
mrbela
  • 1,129

1 Answers1

7

The " character is defined as a shorthand for \" which is why you get the umlaut on the U. Assuming you are writing umlauts directly in your source anyway, you likely don't need the shorthand, so the easiest solution is to turn it off. You can do this by adding the shorthands = off option to babel:

\documentclass{beamer}

\usetheme{Boadilla}

\usepackage[ngerman,shorthands=off]{babel}

\begin{document}

    \begin{frame}
        \texttt{"UTF-8"}
    \end{frame}

\end{document}
Alan Munn
  • 218,180