so I'm working on some kind of homework paper about git and I want to insert some console output examples. I'm working with TextMate. I have my LaTeX code indented like every other normal source code, to make it more readable. My question now is, why get listings in my output pdf indented and how do I prevent that.
Some example code:
\begin{lstlisting}
$ git ls-files
README
TU_Logo_SW.pdf
beleg.pdf
beleg.tex
\end{lstlisting}
In my file there is one tab in front of \begin and two in the lines following. When I run pdflatex the code will be indented with two tabstops in the pdf. Quickfix is to format all the listings without indention in my tex file, but thats pretty ugly ;-(
listing
is a verbatim environment, so everything between the\begin
and the\end
is included. As far as I'm aware, there's no way around that. You could try asking this ontex.stackexchange.com
; it's still on-topic here, but you might get a quicker response. (I also removed thegit
tag, as this isn't really about git, just formatting code in LaTeX.) – Cascabel