# ^^I in code segment when using Minted

I want to include a code segment, which is written in Go. I did use the minted package for it. But, when I copy paste the code from my editor to Texmaker, the tabs are actually displayed as ^^I. Here is a small screenshot for it: http://prntscr.com/gb78ou

I don't have anything fancy there, just this:

\documentclass[a4paper]{paper}

\usepackage{minted}
\usemintedstyle{colorful}

\begin{document}

\begin{minted}{go}
func ntt(a *[N]uint16, omega *[N/2]uint16) {
for level := uint(0); level < 8; level++ {
for start := uint(0); start < (1 << level); start++ {
jTwiddle := 0
for j := start; j < N-1; j += 2 * (1 << level) {
W := omega[jTwiddle]
jTwiddle++
temp := a[j]
\end{minted}

\end{document}


Any idea how to make the ^^I disappear from the code segment?

• I can't reproduce this. Is your minted up-to-date? – Ulrike Fischer Aug 21 '17 at 15:52
• What engine are you using? pdflatex, xelatex or lualatex? – egreg Aug 21 '17 at 19:25

I can reproduce the issue when compiling the file with XeLaTeX. You should use the -8bit option:

xelatex -8bit -shell-escape filename


You should also add \setminted{tabsize=4} (the default value is 8).

\documentclass[a4paper]{paper}

\usepackage{minted}
\usemintedstyle{colorful}

\setminted{tabsize=4}

\begin{document}

\begin{minted}{go}
func ntt(a *[N]uint16, omega *[N/2]uint16) {
for level := uint(0); level < 8; level++ {
for start := uint(0); start < (1 << level); start++ {
jTwiddle := 0
for j := start; j < N-1; j += 2 * (1 << level) {
W := omega[jTwiddle]
jTwiddle++
temp := a[j]
\end{minted}

\end{document}


With the -8bit command line option I get

Without the option