# How to type — or >> in minted?

If I try to type -- or >> (resp. <<), LaTeX puts them together and makes one big -, respectively guillemets. How can I change that behavior? I have to use LuaLaTeX to compile my source.

\documentclass{scrreprt}

\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{minted}

\begin{document}
\begin{minted}{shell-session}
$cat <<EOM >> ./test.txt > Text > Text > EOM$ application --file ./test.txt
\end{minted}
\end{document}

• Welcome to TeX.SX! I cannot reproduce the issue. Can you please add a full (but short) example, from \documentclass up to \end{document}, that shows the problem? – egreg Dec 15 '18 at 11:05
• please provide a complete example including font configuration and tell us if you use pdflatex or lualatex. I can not reproduce issue with up-to-date latex. – user4686 Dec 15 '18 at 11:06
• ii edited my questions and added hopefully all informations you need. – cortesis Dec 15 '18 at 11:22
• if you are using luatex why \usepackage[T1]{fontenc} so disabling most of luatex's font handling? – David Carlisle Dec 15 '18 at 11:52
• David's question was not why you are using lualatex, but why you are using \usepackage[T1]{fontenc} and so breaking the font setup of lualatex. – Ulrike Fischer Dec 15 '18 at 12:08

It is best if you don't load fontenc with LuaLaTeX. If you really need to, then you can disable ligatures for the monospaced font.

\documentclass{scrreprt}

\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{minted}
\usepackage{microtype}

\DisableLigatures{encoding = T1, family = tt* }

\begin{document}

This has ligatures: fi fl ffi ffl,
en-dash --,
em-dash ---,
guillemets <<>>

\begin{minted}{shell-session}
$cat <<EOM >> ./test.txt > Text > Text > EOM$ application --file ./test.txt
\end{minted}

\end{document}