# How to load custom minted lexer from file with czech babel

I would like to distribute my own lexer with latex sources. I use:

\begin{minted}{myLexer.py:MyLexerClassName -x}
setMinAndMax
\end{minted}


which works fine. But when I use czech babel, compilation fails with error: "The control sequence marked < to be read again > should not appear between \csname and \endcsname."

Full code:

\documentclass{article}
\usepackage[czech]{babel}
\usepackage{minted}

\begin{document}

\begin{minted}{myLexer.py:MyLexerClassName -x}
setMinAndMax
\end{minted}

\end{document}


When it works (one of the choices):

1. If I use system lexer
2. If I don't use babel package
3. If I use other language (I tried magyar)

Ultimately I would like to use this in beamer environment, but beamer is not the source of the problem.

• Welcome to TeX.Stackexchange! Just a guess: maybe it could help to switch off some czech specific \shorthandoff, but I don't know which shortshands are used in czech, neither can I test without your lexer. – user36296 Oct 27 '18 at 13:26

\usepackage[czech]{babel}

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