# Suppress modification of listings in draft mode

In reference to this: HERE

How can I suppress draft mode from altering my input listings, or, at least rendering a box of the same size as what the listing would occupy.

Draft mode is very useful for all sorts of reasons, but my document gets modified too heavily when the listings get reduced to a single line....

• You can override the global draft option by calling \usepackage[final]{listings}. – egreg Nov 12 '13 at 12:37
• Champion. Perfect. Cheers. – Nicholas Hamilton Nov 12 '13 at 12:44

You can override a global draft option by calling

\usepackage[final]{listings}


or, on a local basis,

\lstinputlisting[print]{<filename>}


Example:

\documentclass[draft]{article}
\usepackage{listings}
\lstset{
basicstyle=\ttfamily,
columns=fullflexible,
language={[LaTeX]TeX}
}
\begin{document}
\lstinputlisting[print]{\jobname.tex}
\end{document}