A Complete Example (β†’ B.1) Every element shows up Version 1.6.7 February 2024 Frank LΓΌbeck Max NeunhΓΆffer If the subtitle is not sufficient, this element can be used for a slightly longer text on the front page. Frank LΓΌbeck Email: mailto:Frank.Luebeck@Math.RWTH-Aachen.De Max NeunhΓΆffer Email: mailto:neunhoef at mcs.st-and.ac.uk Address: Lehrstuhl fΓΌr Algebra und Zahlentheorie Pontdriesch 14/16 52062 Aachen (Germany) ------------------------------------------------------- Abstract This document tries to use all elements that exist in GAPDoc. In addition, the final output not only contains the usual content, but also an appendix with the source text. There are also links from the usual content to the corresponding source text. This should enable new users to learn GAPDoc quickly. ------------------------------------------------------- Copyright Β© 2000-2024 by Frank LΓΌbeck and Max NeunhΓΆffer ------------------------------------------------------- Acknowledgements We thank Lehrstuhl fΓΌr Algebra und Zahlentheorie (former Lehrstuhl D fΓΌr Mathematik). ------------------------------------------------------- Colophon This is the Colophon page. ------------------------------------------------------- Contents (GAPDoc Example) 1 Sectioning Elements 1.1 Normal subsections 1.1-1 A subsection 1.1-2 Another subsection 1.2 ManSections 1.2-1 f 1.2-2 \^\{\}\[\]\<\& 1.2-3 MyOperation 1.2-4 MyOperation 1.2-5 MyOperation 1.2-6 MyConstructor 1.2-7 IsBla 1.2-8 IsBlubb 1.2-9 NumberBlobbs 1.2-10 AllBlibbs 1.2-11 BlibbsFamily 1.2-12 InfoBlibbs 2 Other Markup 2.1 Various types of text 2.2 Formulae 2.3 Crossreferencing 2.4 Lists and Tables 2.5 Entities and Special Characters A An Appendix B The Source B.1 TitlePage (Source) B.2 Before First Chapter (Source) B.3 First Chapter (Source) B.4 ManSections (Source) B.5 Various Types of Text (Source) B.6 Verbatim-like text (Source) B.7 Formulae (Source) B.8 Crossreferencing (Source) B.9 Lists and Tables (Source) B.10 Entities and Special Characters (Source) B.11 Appendix (Source) ──────────────────────────────────────────────────────────────────────────── Text before chapter 1. (β†’ B.2) 1 Sectioning Elements Text before the section 1.1. (β†’ B.2) 1.1 Normal subsections [β†’ B.3] 1.1-1 A subsection This is text in the first subsection. 1.1-2 Another subsection This is text in the second subsection. This subsection has a label, such that one can reference it. 1.2 ManSections [β†’ B.4] 1.2-1 f β€£ f( x[, y] ) ───────────────────────────────────────────────────── function Returns: an element in IsBlubb (1.2-8) or fail. This function calculates something. 1.2-2 \^\{\}\[\]\<\& β€£ \^\{\}\[\]\<\&( c ) ─────────────────────────────────────────────── method This method is for an operation with a tricky name. 1.2-3 MyOperation β€£ MyOperation( x ) ─────────────────────────────────────────────── operation The operation MyOperation operates on x. 1.2-4 MyOperation β€£ MyOperation( x ) ────────────────────────────────────────────────── method This method calculates something by the generic method. 1.2-5 MyOperation β€£ MyOperation( x[, good_hint] ) ───────────────────────────────────── method This is the super-fast method for the operation MyOperation (1.2-3) if the argument x is in the representation IsBla (1.2-7). It will become even faster if the optional argument good_hint is given. 1.2-6 MyConstructor β€£ MyConstructor( filt, x ) ───────────────────────────────────── constructor The constructor MyConstructor constructs from x an object in filt. 1.2-7 IsBla β€£ IsBla( obj ) ────────────────────────────────────────────── representation For objects in this representation there is a super-fast method (see MyOperation (1.2-5)) for the operation MyOperation (1.2-3). 1.2-8 IsBlubb β€£ IsBlubb( obj ) ────────────────────────────────────────────────── property A property. 1.2-9 NumberBlobbs β€£ NumberBlobbs( obj ) ──────────────────────────────────────────── attribute An attribute. Number of blobbs. 1.2-10 AllBlibbs β€£ AllBlibbs ──────────────────────────────────────────────── global variable This global variable holds a list of all blibbs. 1.2-11 BlibbsFamily β€£ BlibbsFamily ────────────────────────────────────────────────────── family Family of all blibbs. 1.2-12 InfoBlibbs β€£ InfoBlibbs ──────────────────────────────────────────────────── info class This info class is used throughout the library of blibbs. 2 Other Markup 2.1 Various types of text [β†’ 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: or . β€’ 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: Text output. There are also three elements to typeset "verbatim-like" text. (β†’ B.6) The first is a Listing: ──────────────────────────────── GAP code ──────────────────────────────── 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: ──────────────────────────────── Example ───────────────────────────────── 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: ──────────────────────────────── Example ───────────────────────────────── gap> s := Size(CharacterTable("M")); 808017424794512875886459904961710757005754368000000000 gap> s < 10^53;  false gap> s < 10^54; true ──────────────────────────────────────────────────────────────────────────── 2.2 Formulae [β†’ 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. 2.3 Crossreferencing [β†’ 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-7)), to properties (see IsBlubb (1.2-8)), to attributes (see NumberBlobbs (1.2-9)), to variables (AllBlibbs (1.2-10)), to families (see BlibbsFamily (1.2-11)), and to info classes (see InfoBlibbs (1.2-12)). There are also references to labels: see 2.3, 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: https://www.math.rwth-aachen.de/ Email addresses have a special element: mailto:Frank.Luebeck@Math.RWTH-Aachen.De and Homepages another one: https://www.math.rwth-aachen.de/~Frank.Luebeck/ And here is a link to the EDIM archives (https://www.math.rwth-aachen.de/~Frank.Luebeck/gap/EDIM/index.html#ARCHS). One can generate index entries as follows (look up the words "TeX-UserGroup", "RWTH", "Aachen, Hauptbahnhof", and "GAPDoc, for GAP programmers"). 2.4 Lists and Tables [β†’ B.9] There are β€’ lists β€’ enumerations, and β€’ tables or: 1. lists 2. enumerations, and 3. tables or with marks: lists: not numbered enumerations: numbered tables: two-dimensional Lists can also be nested: 1. 1. first item of inner enumeration 2. second item of inner enumeration 2. β€’ 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 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ Table: Prices 2.5 Entities and Special Characters [β†’ 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. β”Œβ”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β” β”‚ & β”‚ < β”‚ > β”‚ # β”‚ $ β”‚ % β”‚ ~ β”‚ \ β”‚ { β”‚ } β”‚ _ β”‚ ^ β”‚ Β  β”‚ β””β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”˜ Table: Special characters in character data And here are the predefined entities in GAPDoc: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ &GAP; β”‚ GAP β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ &GAPDoc; β”‚ GAPDoc β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ &TeX; β”‚ TeX β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ &LaTeX; β”‚ LaTeX β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ &BibTeX; β”‚ BibTeX β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ &MeatAxe; β”‚ MeatAxe β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ &XGAP; β”‚ XGAP β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ ©right; β”‚ Β© β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ Table: Predefined Entities in the GAPDoc system And some more for mathematical symbols: β„‚, β„€, β„•, β„™, β„š, ℍ, ℝ. A An Appendix [β†’ B.11] This is an appendix. B The Source B.1 TitlePage (Source) ────────────────────────────────────────────────────────────────────────────   A Complete Example (&see; <Ref Sect="One"/>)  Every element shows up  Version 1.6.7     If the subtitle ist not sufficient, this <TitleComment>   element can be used for a slightly longer text on the front page.    Frank LΓΌbeck   Frank.Luebeck@Math.RWTH-Aachen.De     Max NeunhΓΆffer   neunhoef at mcs.st-and.ac.uk    January 2022 
  Lehrstuhl fΓΌr Algebra und Zahlentheorie
Pontdriesch   14/16
52062 Aachen
(Germany) 
  This document tries to use all elements that exist in &GAPDoc;.  In addition, the final output not only contains the usual  content, but also an appendix with the source text. There  are also links from the usual content to the corresponding  source text. This should enable new users to learn &GAPDoc;  quickly.    ©right; 2000-2022 by Frank LΓΌbeck and Max NeunhΓΆffer    We thank Lehrstuhl fΓΌr Algebra und Zahlentheorie   (former Lehrstuhl D fΓΌr Mathematik).    This is the Colophon page.   
 ──────────────────────────────────────────────────────────────────────────── B.2 Before First Chapter (Source) ────────────────────────────────────────────────────────────────────────────      Text before chapter .  Sectioning Elements   Text before the section . ──────────────────────────────────────────────────────────────────────────── B.3 First Chapter (Source) [1.0] ──────────────────────────────────────────────────────────────────────────── 
Normal subsections   A subsection   This is text in the first subsection.      Another subsection    This is text in the second subsection. This subsection   has a label, such that one can reference it.     
 ──────────────────────────────────────────────────────────────────────────── B.4 ManSections (Source) [1.2] ──────────────────────────────────────────────────────────────────────────── 
ManSections       an element in or fail.    This function calculates something.             This method is for an operation with a tricky name.             The operation operates on x.              This method calculates something by the generic method.             This is the super-fast method for the operation  if the argument x is in the  representation . It will become even faster if  the optional argument good_hint is given.             The constructor constructs from x  an object in filt.             For objects in this representation there is a super-fast method  (see ) for the operation  .             A property.             An attribute. Number of blobbs.             This global variable holds a list of all blibbs.             Family of all blibbs.             This info class is used throughout the library of blibbs.       
 ──────────────────────────────────────────────────────────────────────────── B.5 Various Types of Text (Source) [2.0] ──────────────────────────────────────────────────────────────────────────── Other Markup  
Various types of text  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 .    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 &LaTeX; output. This is other than &LaTeX; output, namely: HTML]]> Text output.  

 ──────────────────────────────────────────────────────────────────────────── B.6 Verbatim-like text (Source) [2.1] ──────────────────────────────────────────────────────────────────────────── There are also three elements to typeset verbatim-like text. 

 The first is a Listing:  

    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 Formulae (Source) [2.2] ──────────────────────────────────────────────────────────────────────────── 
Formulae  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:

    \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     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:  and e < f. 

 ──────────────────────────────────────────────────────────────────────────── B.8 Crossreferencing (Source) [2.3] ──────────────────────────────────────────────────────────────────────────── 
Crossreferencing  
 ──────────────────────────────────────────────────────────────────────────── B.9 Lists and Tables (Source) [2.4] ──────────────────────────────────────────────────────────────────────────── 
Lists and Tables  There are   lists  enumerations, and  tables  or:   lists  enumerations, and  tables  or with marks:   lists: not numbered  enumerations: numbered  tables: two-dimensional   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:          ObjectPriceavailable          Shoe$1,00there        Hat$2,00not there     
Prices
  
 ──────────────────────────────────────────────────────────────────────────── B.10 Entities and Special Characters (Source) [2.5] ──────────────────────────────────────────────────────────────────────────── 
Entities and Special Characters 
  
   ──────────────────────────────────────────────────────────────────────────── B.11 Appendix (Source) [A.0] ───────────────────────────── GAPDoc source ────────────────────────────── An Appendix  This is an appendix.  ──────────────────────────────────────────────────────────────────────────── References [CR81] Curtis, C. W. and Reiner, I., Methods of Representation Theory, John Wiley & Sons, I, New York, Chichester, Brisbane, Toronto, Singapore (1981). ──────────────────────────────────────────────────────────────────────────── Index \^\{\}\[\]\<\&, for nothing 1.2-2 Aachen, Hauptbahnhof 2.3 AllBlibbs 1.2-10 BlibbsFamily 1.2-11 f 1.2-1 GAPDoc, for GAP programmers 2.3 InfoBlibbs 1.2-12 IsBla 1.2-7 IsBlubb 1.2-8 MyConstructor 1.2-6 MyOperation 1.2-3 First 1.2-4 for bla 1.2-5 NumberBlobbs 1.2-9 RWTH 2.3 TeX-UserGroup 2.3 -------------------------------------------------------