0

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
1

Thanks samcarter for suggestion. Changing this:

\usepackage[czech]{babel}

to this:

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

solved the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.