Handin Criteria
In order to preserve resources and make grading more convenient, we will be doing paperless submissions this year. For all homework assignments (except HW2) we will require you to submit PDF files of your work.
We ask that you put all your answers on a seperate sheet of paper. Since these will probably never be printed out, this won't kill the environment.
How to generate PDF's
- LaTeX: If you are using LaTeX, you can typeset the work on you .tex file by typing in a terminal:
pdflatex <filename.tex>
This produces three files: a log file, an aux file, and a pdf file. You can ignore and/or delete the non-pdf files. If you like, here is an executable script that will runpdflatexand remove the two useless files in one command. - Word: In most versions of Word, there is a PDF option in the Save As menu.
If there isn't... - Others/General Case: If your program is WYSIWYG (say, OpenOffice), there's a good chance you can 'print to PDF' from the Print menu.

- Else: E-mail the TA's if you continue to have problems ^_^
LaTeX Tips
Resources
Thinking of using LaTeX? Good thinking! Paul thinks learning LaTeX was one of the best investments he's made as a CS major, and Hideaki claims "you owe it to yourself as a CS student to learn it." So if it's your first time, welcome!
This book is a great resource and reference, but it is lengthy. Fear not, you only really need to read a few of its chapters to know 90% of all the work you'll ever do in LaTeX.
If you are on a SunLab machine, you can run kile, a great editor specially crafted for LaTeX. From kile you can typeset and preview your document, as well as lookup symbols and insert them dynamically.
For Mac users, TeXShop is a great editor for the same reasons: you can typeset at the press of a button, store macros, and more.
Finally, we provide a blank template file that takes care of most of the scaffolding required to get a LaTeX document running, from here you simply fill in your answers and typeset them.
Specific to CS127
There are a few specific snags to keep track of when doing documents for CS127:
- Underscores: This is probably the biggest snag of writing DB material in LaTeX, as underscores are normally for subscripts. Like all special characters in LaTeX, you can escape it with a backslash '\'.
For example, instead of writing first_name, last_name, you need to write first\_name, last\_name. If you forget, don't worry, as TeX will throw an error and won't typeset your file. - Tables: If you'd like to express data as a table in LaTeX, there are a number of ways to do this, the most simple being the
tabularenvironment. A great tutorial can be found here. As an example:
\begin{tabular}{c | c | c} first\_name & last\_name & age \\ \hline \hline ``Saurya'' & ``Velagapudi'' & 20 \\ ``Paul'' & ``Meier'' & 57 \\ ``Stan'' & ``Zdonik'' & $\aleph_1$ \end{tabular}Produces:
- Common Symbols: For relational algebra, these are the symbols you will most commonly use:
Symbol Name Symbol Name 
\sigma 
\rho 
\pi 
\times 
\bowtie 
\div 
\cup 
\cap
Word
Since Word is WYSIWYG, you'll likely notice problems as they come along. That being said, if you've never used Word for math before, you might wonder how to get these symbols. You can use Equation Editor.