Welcome! Log In Create A New Profile


Creating assignments using LaTeX (MiKTeX) and PDF

Posted by Gustav Bertram 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Creating assignments using LaTeX (MiKTeX) and PDF
May 02, 2008 03:07PM

We are allowed to submit our online assignments in PDF format.

Since LaTeX was written to typeset mathematical texts, and since it can export to PDF, I thought I would try using it for my assignments.

Most Linux systems have a LaTeX implementation already installed. Windows users can use MiKTeX (http://www.miktex.org/) which is an up-to-date LaTeX implementation for Windows. (The only drawback is that the basic package is 80MB!)

The format requirements are:
* Use A4 pages
* Use black text only
* Use only common fonts like Times Roman, Arial, etc.
* Limit your font size to max. 16 for headings and max. 12 for normal text.
* Use a margin of 5cm on the right side (in services and procedures)
* Set margins of at least 2,5 cm on either side (on MyUNISA website)

Since we're exporting to PDF, line breaks and spacing shouldn't be a problem.

I don't know how to set all these options in LaTeX yet, so if there's a LaTeX guru here, I'd appreciate some help.
Re: Creating assignments using LaTeX (MiKTeX) and PDF
May 06, 2008 03:02PM

I will find out and get back to you as soon as possible.

Tertia Horne
Re: Creating assignments using LaTeX (MiKTeX) and PDF
May 06, 2008 03:59PM

I've figured out most of it already.

I found a fairly good introduction on LaTeX (including a section on mathematical typesetting) here:

Interesting fact: The COS101 textbook (Ensley & Crawley) was made using LaTeX! Check the copyright page, near the top.

Here's my assignment2.tex file (% starts comments):

\documentclass[a4paper,11pt]{article} % A4 page, base font of 11pts
\renewcommand{\rmdefault}{ptm} % Set font to Times New Roman
\usepackage{amsmath} % Use mathematics package
\setlength{\baselineskip}{1.6\baselineskip} % Double space lines
\addtolength{\oddsidemargin}{-1in} % Set 5cm margin on right
\addtolength{\evensidemargin}{-1in} % Set 5cm margin on right
% define the title block
\author{Gustav Bertram (43577377)} % set the author
\title{COS101 Assignment 2} % set the title
\date{May 7, 2008} % set the date
\maketitle % show the title
\section*{Question 1} % start a new section, without numbering
a_n = 5n - 2
Re: Creating assignments using LaTeX (MiKTeX) and PDF
May 07, 2008 05:45PM
UPDATE: I've changed my previous post to include the setting for switching the font to Times New Roman!
Re: Creating assignments using LaTeX (MiKTeX) and PDF
May 15, 2008 12:06PM

The instructions for MiKTeX is pretty simple. Download the package, install it, and then whenever you want to create a PDF from your .tex file, at the command line you can just type:

pdflatex file.tex

And a pdf file will be compiled. If there are errors in your file, it will complain though.

A minimal .tex file that you can play with is:

x = y + 15

Here's another introduction to LaTeX, focusing on mathematical typesetting:

Math Into LaTeX
Sorry, only registered users may post in this forum.

Click here to login