Physics 256 - Sample of the homework report

by Eugeniy E. Mikhailov

Fall 2016

Problem statement

Write a function which finds a maximum out of two user supplied numbers.

Report

LaTeX for reports

I strongly recommend to learn how to use LaTeX for report writing. While it is not as obvious to use as conventional word processing software, it saves a lot of time taking formating task away from you. Note in above example how listing of the program formatted without any effort from the user.

Below is a link to The not so Short Introduction to LaTeX.

Tex source of the sample report

Download and put all files in the same directory before asking LaTeX to compile

If you are new to LaTeX

It might be hard to jump start LaTeX without help, since you need to download its distribution and to some extent know what to do with it. But this days there are user friendly online alternatives.

For example try Overleaf.

If you have your own local installation of LaTeX

Run several times the command:

pdflatex sample_report.tex

You need to do it at least 2 times (more if you use bibliography), otherwise instead of figure numbers and citations you will see ‘??’. Latex takes care of the page numbering and references to the listing thus several executions are required. This is similar to the execution of the parser, compiler, and linker for compiling languages.

Results of above compilation

Important note

Make sure that you are not using jpg or jpg-originated files (except for photos). Such files use lossy compression which makes text blurry and unreadable. The best option is to have your figures in the vector formats eps, ps, pdf, or image files with loss-less compression i.e. png.

The points will be deducted if I spot jpg usage.