Hi,
I need to display code in my LaTeX document and I have problems with long code snippets. I use LaTeX-code like this:
Code:
\begin{figure}[htb]
\begin{center}
\small
\verbatiminput{source_code.java}
\normalsize
\caption{This is the caption text for the code.}
\label{fig:code_example}
\end{center}
\end{figure}
This works ok with short codes, but longer codes are moved to the end of the document for some reason. Even though code and caption fits to one page. Does anyone have any good suggestions how to display code at LaTeX?
Bookmarks