Erasmus Starter Kit
Peter Grogono and Brian Shearing
Sunday 26th April, 2009
Contents
1 Introduction
1
2 Erasmus Software Development
1
2.1 Preparing Source Code . . . .
1
2.2 Compiling and Executing . .
2
2.3 Compiling the Erasmus code .
2
2.4 Compiling the C++ code . . .
5
3 Documentation
5
3.1 Document Structure . . . . .
5
3.2 Source Code . . . . . . . . . .
6
3.3 Other Features of cloe.sty .
7
3.4 Diagrams . . . . . . . . . . .
7
4 Software and Development Tools
7
1 Introduction
The Erasmus project has its own collection of documents and software, but also makes
extensive use of public-domain software packages and tools. The purpose of this docu-
ment is to help you to obtain the software and to learn the conventions associated with
the project.
2 Erasmus Software Development
2.1 Preparing Source Code
The Erasmus compiler (mec) receives a file name 〈prog〉 without extension. It looks
first for a file 〈prog〉.e containing Erasmus source code and then for a file 〈prog〉.tex
containing LATEX with embedded Erasmus source code. The second form is the most
common and is the one that will be discussed here.
The file 〈prog〉.tex can be processed by LATEX to produce a document 〈prog〉.pdf or by
mec to produce a C++ program 〈prog〉.cpp. The C++ program can then be compiled
by a C++ compiler and executed.
Within a source file, Erasmus source code is written between the LATEX commands
\begin{code} and \end{code}. These commands must appear in exactly this form:
1
they cannot be replaced by abbreviations or used as part of other commands. In partic-
ular, you cannot add optional arguments to the command \begin{code}.
Everything else in the file is ignored by the compiler — in other words, it is a comment.
The Erasmus program can be split into as many parts as necessary.
See Section 3 for further information about LATEX source file preparation.
2.2 Compiling and Executing
Executing an Erasmus program requires three steps:
1. Use mec to translate Erasmus code into C++.
2. Use a C++ compiler to compile the C++ code.
3. Execute th