[--> 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 "verbatim-like" 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_i b_i ) = ) ( ) x_i y_j h_ijk ) b_k / / / / ----- ----- ----- ----- i = 1 i = 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.
[--> 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.1-1.
We distinguish among others references to functions (see f
(1.2-1)), to methods with tricky name (see \^
(1.2-2)), to operations (see MyOperation
(1.2-3)), to methods (see MyOperation
(1.2-4) or MyOperation
(1.2-5)), to filters (see IsBla
(1.2-6)), to properties (see IsBlubb
(1.2-7)), to attributes (see NumberBlobbs
(1.2-8)), to variables (AllBlibbs
(1.2-9)), to families (see BlibbsFamily
(1.2-10)), and to info classes (see InfoBlibbs
(1.2-11)).
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 (1.).
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.rwth-aachen.de/LDfM/
Email addresses have a special element: Frank.Luebeck@Math.RWTH-Aachen.De
and Homepages another one: http://www.math.rwth-aachen.de/~Max.Neunhoeffer/
One can generate index entries as follows (look up the words "TeX-UserGroup", "RWTH", and "Aachen, Hauptbahnhof").
[--> B.9]
There are
lists
enumerations, and
tables
or:
lists
enumerations, and
tables
or with marks:
not numbered
numbered
two-dimensional
Here is a table:
Object | Price | available |
Shoe | $1,00 | there |
Hat | $2,00 | not there |
[--> B.10]
Here is the table of special characters:
& |
< |
> |
# |
$ |
% |
~ |
\ |
{ |
} |
_ |
^ |
|
And here are the predefined entities in GAPDoc:
&GAP; |
GAP |
&GAPDoc; |
GAPDoc |
&TeX; |
TeX |
&LaTeX; |
LaTeX |
&BibTeX; |
BibTeX |
&MeatAxe; |
MeatAxe |
&XGAP; |
XGAP |
©right; |
(C) |
generated by GAPDoc2HTML