0

Problem

I am trying to typeset my code using package minted. However, when I chose the default setting (where showspaces and showtabs options are both false by default), some characters (i.e. ^^I)seem to be indicating spaces are shown.

Note the in the following minimal example, the printf("hello, world"); and return 0; are intentionally made to show the aforementioned effects.

\documentclass{article}
\usepackage{minted}

\usepackage[margin=0.5in, nohead]{geometry}

\begin{document}
\begin{minted}[linenos=true, showtabs=false]{cpp}
int main() {
    printf("hello, world");
return 0;
}
\end{minted}

enter image description here

Mr.Robot
  • 257
  • 1
    ^^I is control-i which is tab, the simplest thing is just to use your editor to remove tabs and replace by spaces. (if you try the example as posted above the problem will not appear as this site replaces tabs by spaces in code sections) – David Carlisle Jun 08 '19 at 20:59
  • 2
    The FAQ section of the minted manual (page 33) says: Tabs are being turned into the character sequence ^^I. This happens when you use XeLaTeX. You need to use the -8bit command-line option so that tabs may be written correctly to temporary files. – Marijn Jun 08 '19 at 21:40

0 Answers0