] > 4. An Introduction to Gloss

4. An Introduction to Gloss

4.0.1 Gloss

GLOSS is a 'system' written by Dr R.W.Kaye at the University of Birmingham. It converts plain text written in the GLOSS language into XML.

XML, short for Extensible Markup Language, is a general purpose markup language. It is a subset of the language SGML, has many, many applications and allows the user to write their own tags. (A tag is a markup element, we shall see how they are used in the section: The Basics of (X)HTML). Applications of XML, such as XHTML and pMathML, have predefined tags but still inherit the strict rules of XML.

4.0.2 How Gloss Works

4.0.2.1 The 'glosser'

The glosser is the program used to convert your source file into the specified language. It is called (opened) either from the command line, the right-click menu of a gloss file, or from the jEdit gloss plugin.

4.0.2.2 Files Required For The Glosser to Work

The GLOSS system requires two files in order to gloss your source file.

Source File
This is the text file you write in the GLOSS language. Open a text file in your favourite text editor, save it with extension .gloss, and create your web page in this file.
MV File
This file tells the glosser how it should transform your source file. For example, to create an XHTML document you must first create your text file with extension .xhtml.gloss, and then use the xhtml.mv MV file to convert your source text file into xhtml. This process is explained in more detail in the section Glossing a File. The gloss download contains most of the MV files you will need, and certainly the one that you will need to write mathematical websites: xhtml.mv. When the gloss program (the glosser) is called, it will either work out which MV file to use by looking at the name of your source file, or will use an MV file specified by the user.
4.0.2.3 How the Glosser Works

The glosser will need your source file and the necessary MV file. It uses the MV file to 'break down' your source file into 'tokens' and rebuild it according to the MV. The glosser only builds a bare bones output file, and during the gloss process three more files will be copied to the directory of the output file from the gloss install directory. These files help to style your 'bare-bones' document, and need to be in the same directory as your web page. These files are:

.css file
This file is called a stylesheet and defines which styles should be applied to your output file. The styles include background colour, text font and colour, navigator colour and much more. Stylesheets will not be covered in this documentation, but again there are plenty of resources available on the web. Some default styles are included in the default .css file, if you want to change the default simply open and write over the stylesheet. If you wish to return to the default settings: delete the .css file and re-gloss your file, the default .css will be copied over again from the gloss directory.
.js file
This file contains java-script. It is needed when you include theorems in your document and gives you the option of 'hiding' the proofs for the viewer to see if they wish.
.png
PNG files are image files. This file is just an image used in the default page layout.

I will not go into the details of how the glosser actually performs the conversion, if you wish to find out more please go to the gloss homepage.

Since GLOSS writes XML, GLOSS has many applications. The one we shall focus on in this guide is to write mathematical websites.

This page is copyright. Web page design and creation by GLOSS.