These pages will help you write problem sets in LaTEX.
http://courses.csail.mit.edu/6.044/fall96/handouts.html
http://courses.csail.mit.edu/6.044/fall96/handouts/inputs/