Pointers for formatting homework using Moodle

CS 173 long-form homeworks are submitted on-line, using moodle type-in boxes. Your submissions should be neat and legible, so that the 173 course staff can understand them easily. Imagine being a grader yourself (which many of you will be in a term or so): is this something you would find easy to read through and check for correctness?

Some simple proofs can be written well using only plain text. Many proofs, however, are hard to read without more sophisticated formatting. You will use latex equation mode to format equations that can't be written nicely in plain text. And you will upload formatted diagrams in jpeg/jpg format for proofs that require them.

Latex equation mode

Latex equation mode is a simple subset of the latex document formatting package widely used in computer science and mathematics. When composing text in moodle or on the piazza discussion forum, latex mode equations are surrounded by double dollar signs ($$). When you push the save or submit button, these equations will be re-formatted to look nice. For example, $$a^{13}$$ will reformat to look like a13.

The following quick-start guides show a variety of commands that you can use within equation mode:

This class requires only very simple use of latex equation mode. So skim these documents for examples of the features you need. Use latex to format equations involving subscripts and superscripts, fractions, summations, and funny symbols. It's ok to write very simple equations (e.g. 7x+32=4) in plain text.

Glitches with latex in moodle

With the current version of moodle, you may encounter occasional glitches when formatting equations with latex. The usual symptom involves garbage characters, including the mysterious string "" inserted in random places. Here are some suggestions for fixing this when it happens:

Diagrams

Many tools are available for creating jpg (aka jpeg) diagrams. Look for one that makes it easy to draw geometrical regions (e.g. circles) and arrows (including curvy ones). Some suggestions are

It is also possible to make nice figures using paint packages, tablet-based presentation tools, and with paper and a scanner. However, this works well only for folks who draw neatly and are practiced with their tools. In the hands of most people, these methods result in pictures that are sloppy, low contrast, and/or too large to fit nicely on a normal screen. In particular, use a real flatbed scanner rather than improvising with (say) the camera on your cell phone. It is your responsibility to ensure that the diagram is neat, high-contrast, a suitable size, and generally easy to grade.

In some cases, it may be helpful to grab a figure from the posted homework (e.g. by screen capture) and annotate it. You are not required to start from scratch.

If you are already familiar with more sophisticated diagram-drawing packages such as gastex, tikz, or ipe, by all means use them.