] >
When you gloss a file with extension .xhtml.gloss, you will be using the xhtml.mv MV file. There are included in this MV file some 'modes' for sectioning, theorems, and referencing. You can use the code found in this page as long as you use the xhtml MV file.
Detailed information on exactly what is contained in each of these modes can be found in the advanced Gloss docs, what follows is a brief overview and some examples.
The section.modes provide means for the author to easily structure their web pages. Sectioning is one case where you use curly brackets instead of indentation to indicate inclusion, and you must have a closing bracket for every section. The different tags you can use to create a section are:
section
para
abstract
bibliography
unnumbered-section
You give a title to a section by typing title[TITLE]
on the line proceeding the section tag:
section { title[TITLE] ...section contents... }
By enclosing your section in the following tags you can also specify certain parameters such as section number, section numbering level, and next subsection:
section-level[VALUE]
section-number[VALUE]
next-subsection[VALUE]
For example, the following code was used to number the sections in this page:
body { section-number[4.3.6] { ;This specifies to start the numbering for all sections inside the section-number tag from 4.3.6 section-level[4] { ;This specifies to start the numbering from 4.3.6.# where the number to increment is the # section { ;This section will have number 4.3.6.1 title[TITLE] p [Some paragraph...] } section { ;This section will have number 4.3.6.2 title [TITLE] } } } }
You can also nest sections to produce subsections.
The module theorem.modes allows the author to present theorems, proofs, examples, exercises etc. in XHTML pages, and also provides for referencing these theorems by using the ID attribute of the theorem tag. I will refer to any use of the following tags as using a theorem object, and the different tags you can use are:
theorem
definition
example
proof
subproof
remark
The following are attributes you can add to a theorem object:
@type[TYPE]
@name[NAME]
@number[NUMBER]
@id[ID]
@class[CLASS]
Assigning a name and number is relatively straightforward, whereas giving an ID to a theorem object allows for easy referencing. I will discuss referencing later. The type and class attributes are more complicated and are used when you want to group theorems together to alter them in bulk later on, via a stylesheet for example. This is fairly advanced and will not be covered in these user docs. Please see the advanced Gloss docs for more information.
Following is an example of using the theorem.modes module:
theorem @type[theorem] @name[my theorem] @number[3.14] @id[mytheorem] @class[theorems] p [This is a theorem, with a little bit of maths: [math 3.14 approx Pi]] proof @type[proof] @name[my theorem proof] @number[3.14] @id[mytheoremproof] @class[thmproofs] p [This is a proof to my theorem with a little bit of maths [math because x = 2]]
Most of the time you will not need any of the fancy attributes:
theorem p [This is a theorem, with a little bit of maths: [math 3.14 approx Pi]] proof p [This is a proof to my theorem with a little bit of maths [math because x = 2]]
You may have seen whilst using or looking at XHTML code that there exists an 'a' tag for hyperreferencing between web pages. This still works as a tag when using Gloss, but a new module has been written that provides a little more structure to the process of hyperreferencing. Whilst in text mode, for example a paragraph tag, the tags included in the hyperref.modes module that you can use are as follows:
...[xref[LOCATION] [CONTENT]]...
...[href[LOCATION] [CONTENT]]...
...[cite[LOCATION] [CONTENT]]...
...[uri[LOCATION]]...
Following is an example of using the hyperref.modes module:
p [This paragraph includes an xref: [xref [contents.xhtml] [Contents]], an href: [href [contents.xhtml] [Contents]], a cite: [xref [contents.xhtml] [...Citation linking to contents page...]], and a uri: [uri [http://www.bham.ac.uk]].]
This page is copyright. Web page design and creation by GLOSS.