[→ B.5]
In this section we present examples for all the various types of text that are possible in GAPDoc:
This is emphasized.
Keywords are typeset like this
and that
.
Arguments of functions have an element. They look like this: x and y.
Code can be written with the Code element: if x = y then Print("Equal"); fi;
or while true do Print("Hello"); od;
.
Filenames have their own element: /usr/local/ca/gap4r2
or pkg/xgap/doc
.
Buttons, menus, menu entries, and such things are also supported: OK or Cancel.
Packages are typeset like this: Small Groups Library
Quoted text: "This is a text in quotes."
Paragraphs are separated by the empty Par
or P
element.
Alternatives for different output formats: This is other than LaTeX output, namely: HTML output.
There are also three elements to typeset "verbatimlike" text. (→ B.6)
The first is a Listing:
Sieve := function(n) # Returns the primes less than n local l,p,i; l := [1..n]; Unbind(l[1]); p := 2; while p^2 <= n do if IsBound(l[p]) then i := 2 * p; while i <= n do Unbind(l[i]); i := i + p; od; fi; p := p + 1; od; return Compacted(l); end;
Here is a Log of a GAP session using this function:
gap> Sieve(100); [ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97 ] gap> Length(last); 25
Here is a GAP Example session that is automatically tested:
gap> s := Size(CharacterTable("M")); 808017424794512875886459904961710757005754368000000000 gap> s < 10^53; false gap> s < 10^54; true
[→ B.7]
There are three types of formulae.
The first is the normal math mode of LaTeX: b_i \cdot b_j = \sum_{k=1}^d h_{ijk} b_k. Then there are displayed formulae:
\Longrightarrow \quad \left(\sum_{i=1}^d x_i b_i \right) \cdot \left(\sum_{j=1}^d y_j b_j \right) = \sum_{k=1}^d \left( \sum_{i,j} x_i y_j h_{ijk} \right) b_k
If possible, use the Alt
element to specify a better readable text version of such a formula as in the following example:
d d d     \ \ \ \ ==> ( ) x_i b_i )( ) y_j b_j ) = ) ( ) x_i y_j h_ijk ) b_k / / / /     i = 1 j = 1 k = 1 i,j
For small formulae without "difficult" parts use the M
element: b_i, x^2, x^2 + 2x + 1 = (x + 1)^2. Note that here whitespace matters for text (or HTML) output.
Here are two formulae containing less than characters which are special characters for XML: a < b < c < d and e < f.
Using the Mode
attribute of a Display
element formulae like
a ⟶ a mod m'
can also be displayed nicely in text and HTML output.
[→ B.8]
In this section we demonstrate various references to parts of this document. Here is a reference to this section: 2.3. Here is a reference to chapter 1, to appendix A, and to subsection 1.11.
We distinguish among others references to functions (see f
(1.21)), to methods with tricky name (see \^\{\}\[\]\<\&
(1.22)), to operations (see MyOperation
(1.23)), to methods (see MyOperation
(1.24) or MyOperation
(1.25)), to filters (see IsBla
(1.27)), to properties (see IsBlubb
(1.28)), to attributes (see NumberBlobbs
(1.29)), to variables (AllBlibbs
(1.210)), to families (see BlibbsFamily
(1.211)), and to info classes (see InfoBlibbs
(1.212)).
There are also references to labels: see here, to other books: see GAPDoc: What is a DTD? or IsSubgroup
(Reference: IsSubgroup) in the GAP reference manual.
References to sections come in two styles: 1 or Sectioning Elements.
Another type of cross referencing is bibliography. Here is a citation: [CR81, (5.22)] is an interesting lemma.
There are also URLs:
http://www.math.rwthaachen.de/
Email addresses have a special element: Frank.Luebeck@Math.RWTHAachen.De
and Homepages another one: http://wwwgroups.mcs.stand.ac.uk/~neunhoef/
And here is a link to the EDIM archives.
One can generate index entries as follows (look up the words "TeXUserGroup", "RWTH", "Aachen, Hauptbahnhof", and "GAPDoc, for GAP programmers").
[→ B.9]
There are
lists
enumerations, and
tables
or:
lists
enumerations, and
tables
or with marks:
not numbered
numbered
twodimensional
Lists can also be nested:
first item of inner enumeration
second item of inner enumeration
first item of inner list
second item of inner list
Here is a table:
Object  Price  available 
Shoe  $1,00  there 
Hat  $2,00  not there 
[→ B.10]
Here is a table of special characters, the first two are special for XML and must be typed in by entities in GAPDoc documents. The other characters are special for LaTeX but in GAPDoc they can be typed directly.
& 
< 
> 
# 
$ 
% 
~ 
\ 
{ 
} 
_ 
^ 

And here are the predefined entities in GAPDoc:
&GAP; 
GAP 
&GAPDoc; 
GAPDoc 
&TeX; 
TeX 
&LaTeX; 
LaTeX 
&BibTeX; 
BibTeX 
&MeatAxe; 
MeatAxe 
&XGAP; 
XGAP 
©right; 
© 
And some more for mathematical symbols: ℂ, ℤ, ℕ, ℙ, ℚ, ℍ, ℝ.
generated by GAPDoc2HTML