Document formatting guidelines

Statistics & Probability - math474 Spring 2024

Overview

Everyone writes reports. Mathematics and derivations are usually best done by hand, but data analysis projects typically require the use of some software, if for nothing else then for data processing and visualization.

This document gives some information on how to format submissions for this course when they are not handwritten.

How to create Markdown files

Option 1: using an online editor

Simple markdown documents can be edited in an online editor! This will work for many of you, so you don’t have to download anything. For example, go to dilinger.io.
Once you open the site, you will have a blank .md document ready. Just start typing!

Dilinger.io allows you to import your plain text document from places like Dropbox, Drive, etc; preview them as PDF or HTML; download / export as Markdown source (this is needed for editing work!) or as HTML or as PDF. You can also export to Dropbox, Google drive, etc.

TIP: Possibly an easiest approach is to edit the report as a plain text file on your computer, follow Markdown formatting ideas as described in this document below, and then import to Dillinger to generate a PDF of your report or homework for submission.

Option 2: on your computer using RStudio

This particular document was created using RMarkdown. You can read more about it here and check out a cheat sheet here, which will guide you through installing RStudio, and from there the moment you create a new .Rmd document, it will be a working template to start from. If you are used to using LaTeX, no worries: it can be embedded into Markdown, with overall simpler formatting.

Once you edit your document in Rstudio you can click the button “knit” which will generate an html file and you can submit that. You can also generate a PDF instead – simply replace html_document in the document preamble by pdf_document, and knit again!

Technical information: bibliography, figures, tables, and code

What to do with the bibliography and citations

We are flexible, but would be happy to have you help us format properly if that is possible.

Ultimately, we need your references in a bibtex file! If you’ve never heard of it, you can start with plain text and then obtain one online like this: copy and paste using the instructions on this site anystyle.io. For more information, please read this.

Note: in Markdown, your bibliography items will not appear in the formatted document unless you do the following things:

  • save your bilbiography in a file called, for example, mybiblio.bib, formatted according to bibtex;
  • add a line bibliography: mybiblio.bib at the preamble of this document; and
  • actually cite the references in text;
  • end your document with an empty ‘References’ section, as shown in this document. Markdown will then automatically format everything and place the bibliography at the right place, in the right order.

Luckily, citations in Markdown are super easy. For example, for a citation whose key is testCitation, which can be seen by looking at the bib file2 which will say something like @article{testCitation,, you can cite it like this:

@testCitation says .... some quote. 
Also, for more information, see [@testCitation]. 
You can also say things like:  Dylan says [-@testCitation]...

The code above produces the following:

Mojsilović, Peifer, and Petrović (2023) says …. some quote. Also, for more information, see (Mojsilović, Peifer, and Petrović 2023). You can also say things like: Dylan says (2023)

TIP: if you are having trouble or using an online editor, just include plain text bibliography manually within a References section. A production editor will do the final formatting.

Including figures

Figure 1: All figures must be numbered and have a caption stating what the figure is.

In order to include a figure, you should specify the path. You will need to submit all your figures figures with your report before publication! Save them in a folder, zip, and upload; or upload one by one, as supplementary files, on the site when you create your submission.

Note that the figure caption will not appear unless there is a blank line after the figure.

Requirement: you will need to submit all figures as separate .png, .jpg, or .pdf files. Please make sure to give filenames that are easy to call for an editor, for example, “Figure 1” file should be named something like “yourname.figure1.png” or “yourname.fig1.png” or simply “yourname.1.png” - no spaces please.

Including tables

here’s a markdown table with a caption!
column 1 column 2 column 3
one 4 $1
two hello ‘code’
Total cost: $4

Including code

Here is a code chunk. It does not specify what language the code is written in,
so it's not executed.

Now, I have knitted this .Rmd document in RStudio, so I can do things like the following:

# here is an R code chunk.
print("hello world")  
## [1] "hello world"

References

Mojsilović, Jelena, Dylan Peifer, and Sonja Petrović. 2023. “Learning a Performance Metric of Buchberger’s Algorithm.” Involve, a Journal of Mathematics 16 (2): 227–48.

  1. About the author.↩︎

  2. A bib file is just a plain text formatted to be parsed automatically. Open it!↩︎