I have a custom verbatim environment and use Spanish option in babel
.
The code below, instead of printing "command"
in verbatim, replaces "c
with ç
. Changes also occur with every vocal used after "
, as well as y
. Using "r
gives a compilation error:
Bad character code (-1). \end{frame}
Other letters seem to offer no problem at all.
If I remove the babel
package, problem disappears. Similarly, if do not use my redefined environment, problem disappears. That's as far as I could get with my debugging. Can't figure out the source of the problem. Seems to be some incompatibility between \semiverbatim
and Spanish. Any ideas?
\documentclass{beamer}
\usetheme{default}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\renewenvironment{verbatim}
{\semiverbatim\color{red}}
{\endsemiverbatim}
\begin{document}
\begin{frame}[fragile]
\begin{verbatim}
"command"
\end{verbatim}
\end{frame}
\end{document}
shorthands=off
to the options of thebabel
package.textspanish
. Use\ldots
($t \ldots R$
) for spacing, or switch language (${\selectlanguage{english}...}$
), with, in the latter example, the language being added tobabel
options:\usepackage[english,spanish,
... Only a workaround, though.shorthands=off
butes-noshorthands
, as suggested in documentation. No dots problems here.