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 Answers1

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

egreg
  • 1,121,712