javaeclipselatexcode-translation

How to "Export" code the right way?


I have a project in Java and I need to make a code listing in part of my LaTeX documentation with all my classes and code. What is the best way to export the code? Is it simply just copy and paste, or is there a way to export the code properly to keep all the formatting?


Solution

  • I found a way: http://texblog.wordpress.com/2008/04/02/include-source-code-in-latex-with-listings/

    although, this way the code seems to run off the page..