CSC 454/654 - Spring 2021 - Mathematical Writing

Your work in this class should be neat and properly formatted. As an upper-level computer science student your work should not only be technical correct, but should be presented professionally. Mathematical writing has rules that should be followed regarding formatting, and you should not just type things up as text. Here is an example of actual student work as typed up by a student in a previous semester:

Define final payoff P, where task i has payoff ti, task i has deadline di, the start day is S, ti is scheduled at si, also define a Boolean for whether the task i is scheduled bi.

We want to maximize P = sum of(ti*bi).

Here is what it should have looked like:

Define final payoff \(P\), where task \(i\) has payoff \(t_i\), task \(i\) has deadline \(d_i\), the start day is \(S\), \(t_i\) is scheduled at \(s_i\), and also define a Boolean for whether the task \(i\) is scheduled \(b_i\).

We want to maximize \(P=\sum t_i\cdot b_i\).

Notice that all variables are in a special “math italics” font, subscripts are properly used, and notation for a summation is used. These are all very important! Remember: Mathematics, including variables and formulas, are not English text, and should not just be typed as if they are. Every time a variable or formula appears, it should be set using mathematics formatting.

The “gold standard” for writing mathematics is LaTeX, which I’ll describe below. There are other options as well, but taking a little bit of time to learn LaTeX will allow you to create the absolute best looking mathematical writing. Both the LaTeX software and easy-to-use websites with LaTeX support are free.

Handwriting and Scanning

The quickest, and for some people the most natural, way to write neat mathematics is by hand. You can do that in this class if you choose, but you must write neatly! You can write using a tablet and stylus, or you can write on paper and scan your solutions. It’s possible to use a cellphone camera to produce a “scanned” version, but you must use “scan to PDF” app to produce a proper and readable PDF document. No matter how you produce this, you need to submit it as a PDF document.

Writing Mathematics with LaTeX

Writing documents with LaTeX is fundamentally different from using a word processor. Word processors like Word or LibreOffice are referred to as WYSIWYG editors, which stands for “What You See Is What You Get” – as you type, you see the text formatted on the screen just like it will appear in printed form. LaTeX works more like writing code, where you write “sourcecode” and then “compile” that into the final typeset document. This has some advantages as far as how LaTeX can do formatting (which is why LaTeX documents often look much nicer than, for example, Microsoft Word documents), but also can be challenging when it comes to getting the formatting just right.

The traditional, and still very common, way to use LaTeX is with a locally-installed version of the software. However, this requires installing the software and appropriate fonts on your computer, figuring out how to coordinate use of a text editor with the LaTeX processing software, etc. A much easier solution that many students use these days is to create a free account at Overleaf, which gives a web-based interface for creating LaTeX documents. With Overleaf there is no software to install, and everything is together in one web browser window. You still need to do the “compile” step each time you want to see how your document looks, but that’s previewed right in your browser as well. Once you have completed your document, you can download a PDF for submission.

The core idea with LaTeX is that text and math are different, and have different modes for typesetting. When mathematics appears in the middle of a regular text paragraph, you surround the math with dollar signs to indicate that it is math. You should do this even when the math is otherwise regular letters, such as variable names. For instance, the following LaTeX sourcecode is what you’d type for defining variables and a bound on them:

   Let $x$ and $y$ be integers such that $x+y\leq 12$.

After typesetting, your document will look like this, with appropriate mathematics fonts and symbols:

Let \(x\) and \(y\) be integers such that \(x+y\leq 12\).

Getting started with LaTeX is pretty simple, but it is so powerful that it can take a long time to master. Just be patient, and if you can’t figure out how to do something you can always ask me. Here are two final resources to get you started:

Writing Mathematics with MS-Word

more info on this soon – just make sure you use the equation editor!

Writing Mathematics with LibreOffce

more info on this soon – just make sure you use the equation editor! I also recommend using the TeXMaths plugin.