Hey
I'm doing a report for a work at univ.
I want to include the source code of various code files, namely from Flex and Yacc, which generates large files.
So I used the command:
\VerbatimInput[fontsize=\footnotesize,numbers=left]{parserYacc2.y}
but the result is terrible, as the text from this file goes beyond the margins
here's a link to an example:
Edit by localghost: No external links! Attachments go onto the forum server (see Board Rules).
how can i resolve this issue?
A friend told me to just copy & paste all the code inside the latex file under a
\begin{lstlisting}
...
\end{lstlisting}
environment that he gave me, but that is ridiculous imo...
Thx for your time!
General ⇒ Including source code file
NEW: TikZ book now 40% off at Amazon.com for a short time.

Including source code file
Hi,
you can use the \lstinputlisting to input stand alone files to your document; the listings package also offers automatic breaking of long lines. Refer to the package documentation for further details.
you can use the \lstinputlisting to input stand alone files to your document; the listings package also offers automatic breaking of long lines. Refer to the package documentation for further details.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: Including source code file
It works really good, thx a lot!
Funny how I use that package for small snippets of code though the document, but didnt thought of using it for file including...
Funny how I use that package for small snippets of code though the document, but didnt thought of using it for file including...