Is it possible to unindent the code inserted using \lstinputlisting? In particular I'd like to be able to unindent by a fixed amount of whitespace.
I have to write a relation on a OS scripting course and I'd like to include the sources of some bash scripts. I noticed that gobble is ignored by \lstinputlisting but I'd like to avoid to copy-paste the code and unindent it by hand. Is there any solution for this?
gobblehas no effect when usinglstinputlisting. Is it impractical to unindent by hand? Do you have a large code section, or lots of files to be unindented? In any event, you may want to give a try to themintedpackage. – guillem Nov 19 '12 at 15:11mintedpackage. – Bakuriu Nov 19 '12 at 15:48gobbleoption ofmintedpackage works well on\inputminted[gobble=n,...]{language}{file}. It eliminates the first n characters, even if they are not whitespaces. – guillem Nov 20 '12 at 14:07\VerbatimInputfrom packagefancyvrbIt takes gobble into account – Herbert Nov 21 '12 at 7:05