Thursday, July 30, 2009

What is the best way to put snippits of programming code in a LaTeX document?

I am learning the statistical program R the same time I am learning LaTeX. I want to create LaTeX documents which have both a description of the code and snippets of example code in them. How is the best way to go about this?

What is the best way to put snippits of programming code in a LaTeX document?
{\tt \small


\begin{verbatim}


int main(void)


{


fprintf(stdout, "Hello, World!\n");


return 0;


}


\end{verbatim}


}


No comments:

Post a Comment