So today, I was setting up Latex in Ubuntu. And actually, it is installed by default in Ubuntu 9.10, but if you don't have it in your version of Ubuntu, all you have to do is type:
sudo apt-get install texlive in the shell. sudo apt-get install <package name> is the command you use for installing any package in Ubuntu. Once you do this, you can compile a simple LaTeX file by typing: latex test.tex where test.tex is the file you want to compile. This will generate two important files: test.dvi test.log The test.dvi is the output of file (dvi stands for device indipendent), and test.log is the log file (it contains information about the compilation process and any warning and error messages). If something goes wrong be sure to check test.log. To display the content of the file simply type: less test.log or more test.log in the shell. Now, back to test.dvi. There are ways for viewing dvi files in Ubuntu, but, we won't go there. Usually when you use Latex, you want to get ps (post script) file or pdf (portable document format) file. To get a ps file, you need to type in: dvips test.dvi gv test.ps The first command converts the dvi file into a ps file. The second command displays the content of the ps file. For the second command to work, you need to have gv (ghostviewer) installed. If this is not the case, just type in sudo pat-get install gv. After you have successfully completed the previous steps, all you have to do to get a pdf version of your file is to type: ps2pdf test.ps This last command will convert the ps file into a pdf file. To view the pdf file type: evince test.pdf and the file will open in a Document Viewer. Well, that's all folks :-D, have fun. For more info on Latex check my blog post with Useful Links for Latex.