I tried to insert some data using listings package labels(lstset) into pdf which was successful but if the same data is put into a text file ans lstinput it as follows is not successful .Can some one please make the following non-working example work.
\documentclass{report}
\usepackage{listings}
\lstset{basicstyle=\footnotesize\ttfamily,breaklines=true}
\lstset{framextopmargin=50pt,frame=bottomline}
\begin{document}
\begin{lstlisting}
\lstinputlisting{C:/Temp/test.txt}
\end{lstlisting}
\end{document}
OUTPUT:
\lstinputlisting{C:/Temp/test.txt}
Also the contents in test.txt IS AS FOLLOWS
include
main()
{
print "HELLO";
}
Best Answer
The
\lstinputlisting
instruction replaces alstlisting
environment. With your input, you are asking not to interpret\lstinputlisting
.