My tabs inside the tcblisting
environment are not showing correctly and becomes "^^I". I have tried everything to fix this but not worked. Could anyone please help me so the tabs are displayed correctly in tcblisting
? (As illustrated in the sample code, lstlisting
seems have no problem with tabs.)
\documentclass{article}
\usepackage[dvipsnames]{xcolor}
\usepackage{tcolorbox}
\tcbuselibrary{listings}
\usepackage{lstautogobble}
\lstset{language=[LaTeX]TeX,
keywordstyle=\color{blue},commentstyle=\color{ForestGreen},stringstyle=\color{Maroon},
basicstyle=\ttfamily\footnotesize, frame=tb, rulesepcolor=\color{Gray},
showspaces=false, showstringspaces=false,
tabsize=4, aboveskip=10pt, belowskip=10pt,
lineskip=2pt, breaklines,
autogobble}
\begin{document}
\begin{tcblisting}{}
\begin{enumerate}
\item First % some comment
\item Second
\end{enumerate}
\end{tcblisting}
\begin{lstlisting}{}
\begin{enumerate}
\item First % some comment
\item Second
\end{enumerate}
\end{lstlisting}
\end{document}
^^I
, i would say this is correct. How do you want to distingush between a tab and space?