Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 4183461[1X2 [33X[0;0YOther Markup[133X[101X234[1X2.1 [33X[0;0YVarious types of text[133X[101X56[33X[0;0Y[→ [14XB.5[114X][133X78[33X[0;0YIn this section we present examples for all the various types of text that9are possible in [5XGAPDoc[105X:[133X1011[30X [33X[0;6Y[13XThis[113X is [13Xemphasized[113X.[133X1213[30X [33X[0;6Y[13XKeywords[113X are typeset like [9Xthis[109X and [9Xthat[109X.[133X1415[30X [33X[0;6Y[13XArguments[113X of functions have an element. They look like this: [3Xx[103X and [3Xy[103X.[133X1617[30X [33X[0;6Y[13XCode[113X can be written with the Code element: [10Xif x = y then18Print("Equal"); fi;[110X or [10Xwhile true do Print("Hello"); od;[110X.[133X1920[30X [33X[0;6Y[13XFilenames[113X have their own element: [11X/usr/local/ca/gap4r2[111X or21[11Xpkg/xgap/doc[111X.[133X2223[30X [33X[0;6Y[13XButtons[113X, [13Xmenus[113X, [13Xmenu entries[113X, and such things are also supported: [12XOK[112X24or [12XCancel[112X.[133X2526[30X [33X[0;6Y[13XPackages[113X are typeset like this: [5XSmall Groups Library[105X[133X2728[30X [33X[0;6Y[13XQuoted[113X text: [21XThis is a text in quotes.[121X[133X2930[33X[0;0Y[13XParagraphs[113X are separated by the empty [10XPar[110X or [10XP[110X element.[133X3132[33X[0;0Y[13XAlternatives[113X for different output formats: This is other than LaTeX output,33namely: Text output.[133X3435[33X[0;0YThere are also three elements to typeset [21Xverbatim-like[121X text. (→ [14XB.6[114X)[133X3637[33X[0;0YThe first is a [13XListing[113X:[133X3839[4X[32X GAP code [32X[104X40[4XSieve := function(n)[104X41[4X # Returns the primes less than n[104X42[4X local l,p,i;[104X43[4X l := [1..n]; Unbind(l[1]);[104X44[4X p := 2;[104X45[4X while p^2 <= n do[104X46[4X if IsBound(l[p]) then[104X47[4X i := 2 * p;[104X48[4X while i <= n do Unbind(l[i]); i := i + p; od;[104X49[4X fi;[104X50[4X p := p + 1;[104X51[4X od;[104X52[4X return Compacted(l);[104X53[4Xend;[104X54[4X[32X[104X5556[33X[0;0YHere is a [13XLog[113X of a [5XGAP[105X session using this function:[133X5758[4X[32X Example [32X[104X59[4X[25Xgap>[125X [27XSieve(100);[127X[104X60[4X[28X[ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61,[128X[104X61[4X[28X 67, 71, 73, 79, 83, 89, 97 ][128X[104X62[4X[25Xgap>[125X [27XLength(last);[127X[104X63[4X[28X25[128X[104X64[4X[32X[104X6566[33X[0;0YHere is a [5XGAP[105X [13XExample[113X session that is automatically tested:[133X6768[4X[32X Example [32X[104X69[4X[25Xgap>[125X [27Xs := Size(CharacterTable("M"));[127X[104X70[4X[28X808017424794512875886459904961710757005754368000000000[128X[104X71[4X[25Xgap>[125X [27Xs < 10^53; [127X[104X72[4X[28Xfalse[128X[104X73[4X[25Xgap>[125X [27Xs < 10^54;[127X[104X74[4X[28Xtrue[128X[104X75[4X[32X[104X767778[1X2.2 [33X[0;0YFormulae[133X[101X7980[33X[0;0Y[→ [14XB.7[114X][133X8182[33X[0;0YThere are three types of formulae.[133X8384[33X[0;0YThe first is the [13Xnormal math mode[113X of LaTeX: [23Xb_i \cdot b_j = \sum_{k=1}^d85h_{ijk} b_k[123X. Then there are [13Xdisplayed formulae[113X:[133X868788[24X[33X[0;6Y\Longrightarrow \quad \left(\sum_{i=1}^d x_i b_i \right) \cdot89\left(\sum_{j=1}^d y_j b_j \right) = \sum_{k=1}^d \left( \sum_{i,j} x_i y_j90h_{ijk} \right) b_k[133X9192[124X9394[33X[0;0YIf possible, use the [10XAlt[110X element to specify a better readable text version95of such a formula as in the following example:[133X9697d d d98----- ----- ----- -----99\ \ \ \100==> ( ) x_i b_i )( ) y_j b_j ) = ) ( ) x_i y_j h_ijk ) b_k101/ / / /102----- ----- ----- -----103i = 1 j = 1 k = 1 i,j104105[33X[0;0YFor small formulae without [21Xdifficult[121X parts use the [10XM[110X element: [22Xb_i[122X, [22Xx^2[122X, [22Xx^2106+ 2x + 1 = (x + 1)^2[122X. Note that here whitespace matters for text (or HTML)107output.[133X108109[33X[0;0YHere are two formulae containing less than characters which are special110characters for XML: [22Xa < b < c < d[122X and [22Xe < f[122X.[133X111112[33X[0;0YUsing the [10XMode[110X attribute of a [10XDisplay[110X element formulae like[133X113114115[24X[33X[0;6Ya ⟶ a mod m'[133X[124X116117[33X[0;0Ycan also be displayed nicely in text and HTML output.[133X118119120[1X2.3 [33X[0;0YCrossreferencing[133X[101X121122[33X[0;0Y[→ [14XB.8[114X][133X123124[33X[0;0YIn this section we demonstrate various references to parts of this document.125Here is a reference to this section: [14X2.3[114X. Here is a reference to chapter [14X1[114X,126to appendix [14XA[114X, and to subsection [14X1.1-1[114X.[133X127128[33X[0;0YWe distinguish among others references to functions (see [2Xf[102X ([14X1.2-1[114X)), to129methods with tricky name (see [2X\^\{\}\[\]\<\&[102X ([14X1.2-2[114X)), to operations (see130[2XMyOperation[102X ([14X1.2-3[114X)), to methods (see [2XMyOperation[102X ([14X1.2-4[114X) or [2XMyOperation[102X131([14X1.2-5[114X)), to filters (see [2XIsBla[102X ([14X1.2-7[114X)), to properties (see [2XIsBlubb[102X132([14X1.2-8[114X)), to attributes (see [2XNumberBlobbs[102X ([14X1.2-9[114X)), to variables ([2XAllBlibbs[102X133([14X1.2-10[114X)), to families (see [2XBlibbsFamily[102X ([14X1.2-11[114X)), and to info classes (see134[2XInfoBlibbs[102X ([14X1.2-12[114X)).[133X135136[33X[0;0YThere are also references to labels: see [14X2.3[114X, to other books: see [14X'GAPDoc:137What is a DTD?'[114X or [2XIsSubgroup[102X ([14XReference: IsSubgroup[114X) in the [5XGAP[105X reference138manual.[133X139140[33X[0;0YReferences to sections come in two styles: [14X1[114X or [14X'[33X[0;0YSectioning Elements[133X'[114X.[133X141142[33X[0;0YAnother type of cross referencing is bibliography. Here is a citation:143[CR81, (5.22)] is an interesting lemma.[133X144145[33X[0;0YThere are also URLs:[133X146147[33X[0;0Y[7Xhttp://www.math.rwth-aachen.de/[107X[133X148149[33X[0;0YEmail addresses have a special element:150[7Xmailto:[email protected][107X[133X151152[33X[0;0Yand Homepages another one: [7Xhttp://www-groups.mcs.st-and.ac.uk/~neunhoef/[107X[133X153154[33X[0;0YAnd here is a link to the [5XEDIM[105X archives155([7Xhttp://www.math.rwth-aachen.de/~Frank.Luebeck/gap/EDIM/index.html#ARCHS[107X).[133X156157[33X[0;0YOne can generate index entries as follows (look up the words [21XTeX-UserGroup[121X,158[21XRWTH[121X, [21XAachen, Hauptbahnhof[121X, and [21X[5XGAPDoc[105X, for [5XGAP[105X programmers[121X).[133X159160161[1X2.4 [33X[0;0YLists and Tables[133X[101X162163[33X[0;0Y[→ [14XB.9[114X][133X164165[33X[0;0YThere are[133X166167[30X [33X[0;6Ylists[133X168169[30X [33X[0;6Yenumerations, and[133X170171[30X [33X[0;6Ytables[133X172173[33X[0;0Yor:[133X174175[31X1[131X [33X[0;6Ylists[133X176177[31X2[131X [33X[0;6Yenumerations, and[133X178179[31X3[131X [33X[0;6Ytables[133X180181[33X[0;0Yor with marks:[133X182183[8Xlists:[108X184[33X[0;6Ynot numbered[133X185186[8Xenumerations:[108X187[33X[0;6Ynumbered[133X188189[8Xtables:[108X190[33X[0;6Ytwo-dimensional[133X191192[33X[0;0YLists can also be nested:[133X193194[31X1[131X [31X1[131X [33X[0;12Yfirst item of inner enumeration[133X195196[31X2[131X [33X[0;12Ysecond item of inner enumeration[133X197198[31X2[131X [30X [33X[0;12Yfirst item of inner list[133X199200[30X [33X[0;12Ysecond item of inner list[133X201202[33X[0;0YHere is a [13Xtable[113X:[133X203204┌────────┬───────┬───────────┐205│ Object │ Price │ available │206├────────┼───────┼───────────┤207├────────┼───────┼───────────┤208│ Shoe │ $1,00 │ there │209├────────┼───────┼───────────┤210│ Hat │ $2,00 │ not there │211└────────┴───────┴───────────┘212213[1XTable:[101X Prices214215216217[1X2.5 [33X[0;0YEntities and Special Characters[133X[101X218219[33X[0;0Y[→ [14XB.10[114X][133X220221[33X[0;0YHere is a table of special characters, the first two are special for XML and222must be typed in by entities in [5XGAPDoc[105X documents. The other characters are223special for LaTeX but in [5XGAPDoc[105X they can be typed directly.[133X224225┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐226│ [10X&[110X │ [10X<[110X │ [10X>[110X │ [10X#[110X │ [10X$[110X │ [10X%[110X │ [10X~[110X │ [10X\[110X │ [10X{[110X │ [10X}[110X │ [10X_[110X │ [10X^[110X │ [10X [110X │227└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘228229[1XTable:[101X Special characters in character data230231232[33X[0;0YAnd here are the predefined entities in [5XGAPDoc[105X:[133X233234┌─────────────┬─────────┐235│ [10X&GAP;[110X │ [5XGAP[105X │236├─────────────┼─────────┤237│ [10X&GAPDoc;[110X │ [5XGAPDoc[105X │238├─────────────┼─────────┤239│ [10X&TeX;[110X │ TeX │240├─────────────┼─────────┤241│ [10X&LaTeX;[110X │ LaTeX │242├─────────────┼─────────┤243│ [10X&BibTeX;[110X │ BibTeX │244├─────────────┼─────────┤245│ [10X&MeatAxe;[110X │ [5XMeatAxe[105X │246├─────────────┼─────────┤247│ [10X&XGAP;[110X │ [5XXGAP[105X │248├─────────────┼─────────┤249│ [10X©right;[110X │ © │250└─────────────┴─────────┘251252[1XTable:[101X Predefined Entities in the [5XGAPDoc[105X system253254255[33X[0;0YAnd some more for mathematical symbols: ℂ, ℤ, ℕ, ℙ, ℚ, ℍ, ℝ.[133X256257258259