5

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....

  • 1
    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
6

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}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.