In beamer class, when i compile using LaTeX, the output pdf results perfectly the way i expect it to. But when i change it to XeLaTeX, in the lstlisting environment, every tab in the code results in a "^^I"-Placeholder (See output-pdf below). How do I fix this?
if( Bedingung ) {
^^I//Code, der nur ausgefuehrt wird, wenn die Bedingung wahr ist
}
^^I^^I
LaTeX-Code (Reduced to the minimum, one frame as an example):
\begin{document}
\begin{frame}[fragile]{if-Statements}
\begin{block}{Syntax}
\begin{lstlisting}
if( Bedingung ) {
//Code, der nur ausgefuehrt wird, wenn die Bedingung wahr ist
}
\end{lstlisting}
\end{block}
\begin{block}{Logik}
\begin{itemize}
\item Alles innerhalb eines if-Blocks wird nur ausgeführt, wenn die Bedingung (in Klammern) wahr ist.
\end{itemize}
\end{block}
\end{frame}
\end{document}
\documentclass{...}
and ending with\end{document}
.\end{lstlisting}
at the begin of the line. The same I had to apply to\end{frame}
with my version ofbeamer
to get the example compiled (after adding a preamble).fragile
frame.