Implementing a Universe Type System for Scala
=============================================

This README file provides some hints on how to build the project report,
the developer and user guide, the presentations, and the task description
from the LaTeX sources.



Directory Layout
****************
.
|-- cdlabel                        Label for the CD.
|-- common                         Common files, like graphics, commonly
|                                  included LaTeX sources, other include 
|                                  files, bibliography, etc.
|-- final_presentation             The final presentation.
|-- intermediate_presentation      The intermediate presentation.
|-- report                         The final report.
`-- task                           The task description.

Most directories contain a Makefile which can be used to build the
content. See below. Calling make in the top level directory will recurse
into all the subdirectories and invoke make.



Dependencies
************

All documents use the KOMA script [1] document classes which aim to be a
replacement to the standard LaTeX2e classes. The presentations are based on
the LaTeX beamer [2] class. In addition, the following, probably
non-standard, packages are used:

o pgf/tikz [3]: A portable graphic format for TeX.
o semantic [4]: LaTeX package which facilitates writing of notation of
                programming languages and compilation.
o listings [5]: A source code printer for LaTeX.
o xkeyval [6]:  An extension of the keyval package.

All diagrams were made using MetaPost [7], using the MetaUML [8] and
MetaObj [9] packages.

If some of those packages are not available globally, they can be installed
to ~/texmf or ~/Library/texmf (on MacOS X) by using the correct directory
layout. This is usually described in the documentation of the respective
package. After installing the files, a call to mktexlsr or similar is
required in order to rebuild the list of files such that LaTeX subsequently
finds them.



Build System
************

The build system uses GNU make in order to create the documentation and the
presentations. There is a top-level Makefile which will invoke make for all
subdirectories. The build system has become quite complex over time. All
makefiles which are used to create some pdf files from LaTeX include the
common/common.mk file. Those for MetaPost to pdf conversion include
common/metapost.mk.

The goals of common.mk take care of many things:
o They add all subdirectories of the current directory to the $TEXINPUTS
  environment variable before calling LaTeX. Hence, it is not required to
  give the full path to a .tex-file in \input{} or \include{}
  statements. However, .tex files with the same name should be avoided.
o It tries to run LaTeX as many times as necessary to update all
  references, citations, table of contents, etc. Unfortunately, it does not
  always work, but in most cases, it will do fine.
o make <file>.pdf will process <file>.tex and create the <file>.pdf file if
  <file>.tex contained a complete document.
o Standard and error output of LaTeX are redirected to the <file>.stdout
  file, and the lines which indicate an error are printed after the LaTeX
  run. Certain errors may cause LaTeX to 'hang' though, as they require
  some input. Pressing return or 'x' followed by return should help in this
  case.

Calling make will in most cases build the pdf of the document. make view
usually uses xpdf to display the generated pdf file, and make clean removes
files generated by LaTeX. metapost.mk is similar in that it adds some
common directories to the $MPINPUTS variable.

Unfortunately, it could be quite hard to build a document without using the
provided build system.



References
**********

[1] http://www.ctan.org/tex-archive/macros/latex/contrib/koma-script/
[2] http://www.ctan.org/tex-archive/macros/latex/contrib/beamer/
[3] http://www.ctan.org/tex-archive/graphics/pgf/base/
[4] http://www.ctan.org/tex-archive/macros/latex/contrib/semantic/
[5] http://www.ctan.org/tex-archive/macros/latex/contrib/listings/
[6] http://www.ctan.org/tex-archive/macros/latex/contrib/xkeyval/
[7] http://www.tug.org/metapost.html
[8] http://www.tug.org/metapost.html
[9] http://www.ctan.org/tex-archive/graphics/metapost/contrib/macros/metaobj/