CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

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

Views: 418346
1
<Chapter Label="Comments">
2
<Heading>&AutoDoc; documentation comments</Heading>
3
4
You can document declarations of global functions and variables, operations,
5
attributes etc. by inserting <E>&AutoDoc;</E> comments into your sources before these declaration.
6
An &AutoDoc; comment always starts with <C>#!</C>. This is also the smallest possible
7
&AutoDoc; command. If you want your declaration documented, just write
8
<C>#!</C> at the line before the documentation. For example:
9
10
<Listing><![CDATA[
11
#!
12
DeclareOperation( "AnOperation",
13
[ IsList ] );
14
]]></Listing>
15
16
This will produce a manual entry for the operation <C>AnOperation</C>.
17
<P/>
18
19
Inside of &AutoDoc; comments, <E>&AutoDoc; commands</E>
20
starting with <C>@</C> can be used to control the output &AutoDoc; produces.
21
22
23
<Section>
24
<Heading>Documenting declarations</Heading>
25
26
In the bare form above, the manual entry for <C>AnOperation</C> will not
27
contain much more than the name of the operation. In order to change
28
this, there are several commands you can put into the &AutoDoc; comment
29
before the declaration. Currently, the following commands are provided:
30
31
<Subsection Label="@Description">
32
<Index Key="@Description"><C>@Description</C></Index>
33
<Heading>@Description <A>descr</A></Heading>
34
Adds the text in the following lines of the &AutoDoc; to the description
35
of the declaration in the manual. Lines are until the next &AutoDoc; command
36
or until the declaration is reached.
37
</Subsection>
38
39
<Subsection Label="@Returns">
40
<Index Key="@Returns"><C>@Returns</C></Index>
41
<Heading>@Returns <A>ret_val</A></Heading>
42
The string <A>ret_val</A> is added to the documentation, with the text <Q>Returns: </Q>
43
put in front of it. This should usually give a brief hint about the type or meaning
44
of the value retuned by the documented function.
45
</Subsection>
46
47
<Subsection Label="@Arguments">
48
<Index Key="@Arguments"><C>@Arguments</C></Index>
49
<Heading>@Arguments <A>args</A></Heading>
50
The string <A>args</A> contains a description of the arguments the
51
function expects, including optional parts, which are denoted by square
52
brackets. The argument names can be separated by whitespace, commas or
53
square brackets for the optional arguments, like <Q>grp[, elm]</Q> or
54
<Q>xx[y[z] ]</Q>. If &GAP; options are used, this can be followed by a colon :
55
and one or more assignments, like <Q>n[, r]: tries := 100</Q>.
56
</Subsection>
57
58
<Subsection Label="@Group">
59
<Index Key="@Group"><C>@Group</C></Index>
60
<Heading>@Group <A>grpname</A></Heading>
61
Adds the following method to a group with the given name.
62
See section <Ref Sect="Groups"/> for more information about groups.
63
</Subsection>
64
65
<Subsection Label="@Label">
66
<Index Key="@Label"><C>@Label</C></Index>
67
<Heading>@Label <A>label</A></Heading>
68
Adds label to the function as label.
69
70
If this is not specified, then for declarations that involve a list of input filters
71
(as is the case for <C>DeclareOperation</C>, <C>DeclareAttribute</C>, etc.),
72
a default label is generated from this filter list.
73
</Subsection>
74
75
<Listing><![CDATA[
76
#! @Label testlabel
77
DeclareProperty( "AProperty",
78
IsObject );
79
]]></Listing>
80
leads to this:
81
<ManSection>
82
<Prop Arg="arg" Name="AProperty" Label="testlabel"/>
83
<Returns> <C>true</C> or <C>false</C>
84
</Returns>
85
<Description>
86
</Description>
87
</ManSection>
88
while
89
<Listing><![CDATA[
90
#!
91
DeclareProperty( "AProperty",
92
IsObject );
93
]]></Listing>
94
leads to this:
95
<ManSection>
96
<Prop Arg="arg" Name="AProperty" Label="for IsObject"/>
97
<Returns> <C>true</C> or <C>false</C>
98
</Returns>
99
<Description>
100
</Description>
101
</ManSection>
102
103
104
<Subsection Label="@ChapterInfo">
105
<Index Key="@ChapterInfo"><C>@ChapterInfo</C></Index>
106
<Heading>@ChapterInfo <A>chapter, section</A></Heading>
107
Adds the entry to the given chapter and section. Here,
108
<A>chapter</A> and <A>section</A> are the respective
109
titles.
110
</Subsection>
111
112
113
As an example, a full &AutoDoc; comment for with all options could look like this:
114
115
<Listing><![CDATA[
116
#! @Description
117
#! Computes the list of lists of degrees of ordinary characters
118
#! associated to the <A>p</A>-blocks of the group <A>G</A>
119
#! with <A>p</A>-modular character table <A>modtbl</A>
120
#! and underlying ordinary character table <A>ordtbl</A>.
121
#! @Returns a list
122
#! @Arguments modtbl
123
#! @Group CharacterDegreesOfBlocks
124
#! @FunctionLabel chardegblocks
125
#! @ChapterInfo Blocks, Attributes
126
DeclareAttribute( "CharacterDegreesOfBlocks",
127
IsBrauerTable );
128
]]></Listing>
129
130
</Section>
131
132
<Section>
133
<Heading>Other documentation comments</Heading>
134
135
There are also some commands which can be used in &AutoDoc; comments
136
that are not associated to any declaration. This is useful for additional
137
text in your documentation, examples, mathematical chapters, etc..
138
139
<Subsection Label="@Chapter">
140
<Index Key="@Chapter"><C>@Chapter</C></Index>
141
<Index Key="@ChapterLabel"><C>@ChapterLabel</C></Index>
142
<Heading>@Chapter <A>name</A></Heading>
143
Sets a chapter, all functions without separate info will be added to this chapter.
144
Also all text comments, i.e. lines that begin with #! without a command, and which do not
145
follow after @description, will be added to the chapter as regular text.
146
147
Example:
148
149
<Listing><![CDATA[
150
#! @Chapter My chapter
151
#! This is my chapter.
152
#! I document my stuff in it.
153
]]></Listing>
154
155
The <C>@ChapterLabel</C> <A>label</A> command
156
can be used to set the label of the chapter to <C>Chapter_</C><A>label</A>.
157
158
Additionally, the chapter will be stored as <C>_Chapter_</C><A>label</A><C>.xml</C>.
159
160
161
</Subsection>
162
163
<Subsection Label="@Section">
164
<Index Key="@Section"><C>@Section</C></Index>
165
<Index Key="@SectionLabel"><C>@SectionLabel</C></Index>
166
<Heading>@Section <A>name</A></Heading>
167
Sets a section like chapter sets a chapter.
168
169
<Listing><![CDATA[
170
#! @Section My first manual section
171
#! In this section I am going to document my first method.
172
]]></Listing>
173
174
The <C>@SectionLabel</C> <A>label</A> command
175
can be used to set the label of the section to <C>Section_</C><A>label</A>.
176
</Subsection>
177
178
<Subsection Label="@EndSection">
179
<Index Key="@EndSection"><C>@EndSection</C></Index>
180
<Heading>@EndSection</Heading>
181
Closes the current section. Please be careful here. Closing a section before
182
opening it might cause unexpected errors.
183
184
<Listing><![CDATA[
185
#! @EndSection
186
#### The following text again belongs to the chapter
187
#! Now we could start a second section if we want to.
188
]]></Listing>
189
</Subsection>
190
191
<Subsection Label="@Subsection">
192
<Index Key="@Subsection"><C>@Subsection</C></Index>
193
<Index Key="@SubsectionLabel"><C>@SubsectionLabel</C></Index>
194
<Heading>@Subsection <A>name</A></Heading>
195
Sets a subsection like chapter sets a chapter.
196
197
<Listing><![CDATA[
198
#! @Subsection My first manual subsection
199
#! In this subsection I am going to document my first example.
200
]]></Listing>
201
202
The <C>@SubsectionLabel</C> <A>label</A> command
203
can be used to set the label of the subsection to <C>Subsection_</C><A>label</A>.
204
205
</Subsection>
206
207
<Subsection Label="@EndSubsection">
208
<Index Key="@EndSubsection"><C>@EndSubsection</C></Index>
209
<Heading>@EndSubsection</Heading>
210
Closes the current subsection. Please be careful here. Closing a subsection before
211
opening it might cause unexpected errors.
212
<Listing><![CDATA[
213
#! @EndSubsection
214
#### The following text again belongs to the section
215
#! Now we are in the section again
216
]]></Listing>
217
</Subsection>
218
219
<Subsection Label="@BeginAutoDoc">
220
<Index Key="@BeginAutoDoc"><C>@BeginAutoDoc</C></Index>
221
<Heading>@BeginAutoDoc</Heading>
222
Causes all subsequent declarations to be documented in the manual,
223
regardless of whether they have an &AutoDoc; comment in front of
224
them or not.
225
</Subsection>
226
227
<Subsection Label="@EndAutoDoc">
228
<Index Key="@EndAutoDoc"><C>@EndAutoDoc</C></Index>
229
<Heading>@EndAutoDoc</Heading>
230
Ends the affect of <C>@BeginAutoDoc</C>. So from here on, again only declarations
231
with an explicit &AutoDoc; comment in front are added to the manual.
232
233
<Listing><![CDATA[
234
#! @BeginAutoDoc
235
236
DeclareOperation( "Operation1", [ IsList ] );
237
238
DeclareProperty( "IsProperty", IsList );
239
240
#! @EndAutoDoc
241
]]></Listing>
242
Both, <C>Operation1</C> and <C>IsProperty</C> would appear in the manual.
243
</Subsection>
244
245
<Subsection Label="@BeginGroup">
246
<Index Key="@BeginGroup"><C>@BeginGroup</C></Index>
247
<Heading>@BeginGroup <A>[grpname]</A></Heading>
248
Starts a group. All following documented declarations without an
249
explicit <C>@Group</C> command are grouped together in the same group
250
with the given name. If no name is given, then a new nameless group is
251
generated.
252
The effect of this command is ended when an <C>@EndGroup</C> command
253
is reached.
254
<P/>
255
256
See section <Ref Sect="Groups"/> for more information about groups.
257
</Subsection>
258
259
<Subsection Label="@EndGroup">
260
<Index Key="@EndGroup"><C>@EndGroup</C></Index>
261
<Heading>@EndGroup</Heading>
262
Ends the current group.
263
264
<Listing><![CDATA[
265
#! @BeginGroup MyGroup
266
#!
267
DeclareAttribute( "GroupedAttribute",
268
IsList );
269
270
DeclareOperation( "NonGroupedOperation",
271
[ IsObject ] );
272
273
#!
274
DeclareOperation( "GroupedOperation",
275
[ IsList, IsRubbish ] );
276
#! @EndGroup
277
]]></Listing>
278
</Subsection>
279
280
<Subsection Label="@Level">
281
<Index Key="@Level"><C>@Level</C></Index>
282
<Heading>@Level <A>lvl</A></Heading>
283
Sets the current level of the documentation. All items created after this,
284
chapters, sections, and items, are given the level <A>lvl</A>,
285
until the <C>@ResetLevel</C> command resets the level to 0 or another level
286
is set.
287
<P/>
288
289
See section <Ref Sect="Level"/> for more information about groups.
290
</Subsection>
291
292
<Subsection Label="@ResetLevel">
293
<Index Key="@ResetLevel"><C>@ResetLevel</C></Index>
294
<Heading>@ResetLevel</Heading>
295
Resets the current level to 0.
296
<P/>
297
</Subsection>
298
299
300
<Subsection Label="@BeginExample">
301
<Index Key="@BeginExample"><C>@BeginExample and @EndExample</C></Index>
302
<Heading>@BeginExample and @EndExample</Heading>
303
@BeginExample inserts an example into the manual. The syntax for examples is different from
304
GAPDocs example syntax in order to have a
305
file that contains the example and is GAP readable. To achieve this, GAP commands are not preceded by a comment,
306
while output has to be preceded by an &AutoDoc; comment.
307
The GAP prompt for the display in the manual is added by AutoDoc.
308
@EndExample ends the example block.
309
<Listing><![CDATA[
310
#! @BeginExample
311
S5 := SymmetricGroup(5);
312
#! Sym( [ 1 .. 5 ] )
313
Order(S5);
314
#! 120
315
#! @EndExample
316
]]></Listing>
317
</Subsection>
318
319
320
<Subsection Label="@ExampleSession">
321
<Index Key="@ExampleSession"><C>@ExampleSession, @BeginExampleSession, and @EndExampleSession</C></Index>
322
<Heading>@ExampleSession and @EndExampleSession</Heading>
323
@ExampleSession inserts an example into the manual, but in a different syntax.
324
For example, consider
325
<Listing><![CDATA[
326
#! @BeginExample
327
S5 := SymmetricGroup(5);
328
#! Sym( [ 1 .. 5 ] )
329
Order(S5);
330
#! 120
331
#! @EndExample
332
]]></Listing>
333
As you can see, the commands are not commented and hence are executed when the file containing
334
the example block is read. To insert examples directly into source code files, one can instead
335
use @ExampleSession:
336
<Listing><![CDATA[
337
#! @ExampleSession
338
#! gap> S5 := SymmetricGroup(5);
339
#! Sym( [ 1 .. 5 ] )
340
#! gap> Order(S5);
341
#! 120
342
#! @EndExampleSession
343
]]></Listing>
344
It inserts an example into the manual just as @Example would do, but all lines are commented
345
and therefore not executed when the file is read.
346
</Subsection>
347
348
349
350
<Subsection Label="@BeginLog">
351
<Index Key="@BeginLog"><C>@BeginLog and @EndLog</C></Index>
352
<Heading>@BeginLog and @EndLog</Heading>
353
Works just like the @BeginExample command, but the example
354
will not be tested. See the GAPDoc manual for more information.
355
</Subsection>
356
357
<Subsection Label="@BeginLogSession">
358
<Index Key="@BeginLogSession"><C>@BeginLogSession and @EndLogSession</C></Index>
359
<Heading>@BeginLogSession and @EndLogSession</Heading>
360
Works just like the @BeginExampleSession command, but the example
361
will not be tested if manual examples are run. See the GAPDoc manual for more information.
362
</Subsection>
363
364
<Subsection Label="@DoNotReadRestOfFile">
365
<Index Key="DoNotReadRestOfFile"><C>@DoNotReadRestOfFile</C></Index>
366
<Heading>@DoNotReadRestOfFile</Heading>
367
Prevents the rest of the file from being read by the parser. Useful for
368
not finished or temporary files.
369
370
<Listing><![CDATA[
371
#! This will appear in the manual
372
373
#! @DoNotReadRestOfFile
374
375
#! This will not appear in the manual.
376
]]></Listing>
377
</Subsection>
378
379
<Subsection Label="@BeginChunk">
380
<Index Key="@BeginChunk"><C>@BeginChunk, @EndChunk, and @InsertChunk</C></Index>
381
<Heading>@BeginChunk <A>name</A>, @EndChunk, and @InsertChunk <A>name</A></Heading>
382
Text insider of a @BeginChunk / @EndChunk part will not be inserted into
383
the final documentation directly. Instead, the text is stored in an internal buffer.
384
385
That chunk of text can then later on be inserted in any other place by using the
386
@InsertChunk <A>name</A> command.
387
388
If you do not provide an @EndChunk, the chunk ends at the end of the file.
389
<Listing><![CDATA[
390
#! @BeginChunk MyChunk
391
#! Hello, world.
392
#! @EndChunk
393
394
#! @InsertChunk MyChunk
395
## The text "Hello, world." is inserted right before this.
396
]]></Listing>
397
398
You can use this to define an example like this in one file:
399
400
<Listing><![CDATA[
401
#! @BeginChunk Example_Symmetric_Group
402
#! @BeginExample
403
S5 := SymmetricGroup(5);
404
#! Sym( [ 1 .. 5 ] )
405
Order(S5);
406
#! 120
407
#! @EndExample
408
#! @EndChunk
409
]]></Listing>
410
411
And then later, insert the example in a different file, like this:
412
413
<Listing><![CDATA[
414
#! @InsertChunk Example_Symmetric_Group
415
]]></Listing>
416
417
</Subsection>
418
419
<Subsection Label="@BeginSystem">
420
<Index Key="@BeginSystem"><C>@BeginSystem, @EndSystem, and @InsertSystem</C></Index>
421
<Heading>@BeginSystem <A>name</A>, @EndSystem, and @InsertSystem <A>name</A></Heading>
422
Same as @BeginChunk etc. This command is deprecated. Please use chunk instead.
423
</Subsection>
424
425
<Subsection Label="@BeginCode">
426
<Index Key="@BeginCode"><C>@BeginCode, @EndCode, and @InsertCode</C></Index>
427
<Heading>@BeginCode <A>name</A>, @EndCode, and @InsertCode <A>name</A></Heading>
428
Inserts the text between @BeginCode and @EndCode verbatim at the point where
429
@InsertCode is called. This is useful to insert code excerpts
430
directly into the manual.
431
<Listing><![CDATA[
432
#! @BeginCode Increment
433
i := i + 1;
434
#! @EndCode
435
436
#! @InsertCode Increment
437
## Code is inserted here.
438
]]></Listing>
439
</Subsection>
440
441
<Subsection Label="@LatexOnly">
442
<Index Key="@LatexOnly"><C>@@LatexOnly, @BeginLatexOnly, and @EndLatexOnly</C></Index>
443
<Heading>@LatexOnly <A>text</A>, @BeginLatexOnly , and @EndLatexOnly</Heading>
444
Code inserted between @BeginLatexOnly and @EndLatexOnly or after @LatexOnly is only inserted
445
in the PDF version of the manual or worksheet. It can hold arbitrary LaTeX-commands.
446
<Listing><![CDATA[
447
#! @BeginLatexOnly
448
#! \include{picture.tex}
449
#! @EndLatexOnly
450
451
#! @LatexOnly \include{picture.tex}
452
]]></Listing>
453
</Subsection>
454
455
</Section>
456
457
458
<Section Label="TitlepageCommands">
459
<Heading>Title page commands</Heading>
460
461
The following commands can be used to add the corresponding parts to the title page of
462
the document, in case the scaffolding is enabled.
463
<List>
464
<Item>
465
@Title
466
</Item>
467
<Item>
468
@Subtitle
469
</Item>
470
<Item>
471
@Version
472
</Item>
473
<Item>
474
@TitleComment
475
</Item>
476
<Item>
477
@Author
478
</Item>
479
<Item>
480
@Date
481
</Item>
482
<Item>
483
@Address
484
</Item>
485
<Item>
486
@Abstract
487
</Item>
488
<Item>
489
@Copyright
490
</Item>
491
<Item>
492
@Acknowledgements
493
</Item>
494
<Item>
495
@Colophon
496
</Item>
497
</List>
498
Those add the following lines at the corresponding point of the title page. Please note that many of those
499
things can be (better) extracted from the PackageInfo.g. In case you set some of those,
500
the extracted or in scaffold defined items will be overwritten. While this is not very useful for
501
documenting packages, they are necessary for worksheets created with <Ref Func="AutoDocWorksheet"/>,
502
since they do not have a PackageInfo to extract those information.
503
</Section>
504
505
<Section Label="PlainText">
506
<Heading>Plain text files</Heading>
507
508
AutoDoc plain text files work exactly like AutoDoc comments, except that the
509
#! is unnecessary at the beginning of a line which should be documented.
510
Files that have the suffix .autodoc will automatically regarded as plain text files
511
while the commands @AutoDocPlainText and @EndAutoDocPlainText mark parts in plain text files which
512
should be regarded as AutoDoc parts. All commands can be used like before.
513
514
</Section>
515
516
<Section Label="Groups">
517
<Heading>Grouping</Heading>
518
519
In &GAPDoc;, it is possible to make groups of ManItems, i.e., when documenting
520
a function, operation, etc., it is possible to group them into suitable chunks.
521
This can be particularly useful if there are several definitions of an operation
522
with several different argument types, all doing more or less the same to the arguments.
523
Then their manual items can be grouped, sharing the same description and return type information.
524
Note that it is currently not possible to give a header to the Group in the manual,
525
but the generated ManItem heading of the first entry will be used.
526
<P/>
527
528
Note that group names are globally unique throughout the whole manual.
529
That is, groups with the same name are in fact merged into a single group, even if they
530
were declared in different source files.
531
Thus you can have multiple <C>@BeginGroup</C> / <C>@EndGroup</C> pairs using the
532
same group name, in different places, and these all will refer to the same group.
533
<P/>
534
535
Moreover, this means that you can add items to a group via the <C>@Group</C> command
536
in the &AutoDoc; comment of an arbitrary declaration, at any time.
537
538
The following code
539
<Listing><![CDATA[
540
#! @BeginGroup Group1
541
542
#! @Description
543
#! First sentence.
544
DeclareOperation( "FirstOperation", [ IsInt ] );
545
546
#! @Description
547
#! Second sentence.
548
DeclareOperation( "SecondOperation", [ IsInt, IsGroup ] );
549
550
#! @EndGroup
551
552
## .. Stuff ..
553
554
#! @Description
555
#! Third sentence.
556
#! @Group Group1
557
KeyDependentOperation( "ThirdOperation", IsGroup, IsInt, "prime );
558
]]></Listing>
559
560
produces the following:
561
562
<ManSection Label="Group1">
563
<Oper Arg="arg" Name="FirstOperation" Label="for IsInt"/>
564
<Oper Arg="arg1,arg2" Name="SecondOperation" Label="for IsInt, IsGroup"/>
565
<Oper Arg="arg1,arg2" Name="ThirdOperation" Label="for IsGroupIsGroup, "/>
566
<Returns></Returns>
567
<Description>
568
First sentence.
569
Second sentence.
570
Third sentence.
571
</Description>
572
</ManSection>
573
574
</Section>
575
576
<Section Label="Level">
577
<Heading>Level</Heading>
578
Levels can be set to not write certain parts in the manual by default.
579
Every entry has by default the level 0. The command <C>@Level</C> can
580
be used to set the level of the following part to a higher level, for
581
example 1, and prevent it from being printed to the manual by default.
582
However, if one sets the level to a higher value in the autodoc option of
583
<C>AutoDoc</C>, the parts will be included in the manual at the specific place.
584
585
<Listing><![CDATA[
586
#! This text will be printed to the manual.
587
#! @Level 1
588
#! This text will be printed to the manual if created with level 1 or higher.
589
#! @Level 2
590
#! This text will be printed to the manual if created with level 2 or higher.
591
#! @ResetLevel
592
#! This text will be printed to the manual.
593
]]></Listing>
594
</Section>
595
596
<Section Label="MarkdownExtension">
597
<Heading>Markdown-like formatting of text in &AutoDoc;</Heading>
598
599
&AutoDoc; has some convenient ways to insert special format into text, like
600
math formulas and lists. The syntax for them are inspired by Markdown and LaTeX,
601
but do not follow them strictly. Neither are all features of the Markdown language
602
supported. The following subsections describe what is possible.
603
604
<Subsection Label="MarkdownExtensionList">
605
<Heading>Lists</Heading>
606
607
One can create lists of items by beginning a new line with *, +, -, followed by one
608
space. The first item starts the list. When items are longer than one line, the following lines
609
have to be indented by at least two spaces. The list ends when a line which does not start a new
610
item is not indented by two spaces. Of course lists can be nested. Here is an example:
611
612
<Listing><![CDATA[
613
#! The list starts in the next line
614
#! * item 1
615
#! * item 2
616
#! which is a bit longer
617
#! * and also contains a nested list
618
#! * with two items
619
#! * item 3 of the outer list
620
#! This does not belong to the list anymore.
621
]]></Listing>
622
623
This is the output:<Br/>
624
The list starts in the next line
625
<List>
626
<Item>
627
item 1
628
</Item>
629
<Item>
630
item 2
631
which is a bit longer
632
<List>
633
<Item>
634
and also contains a nested list
635
</Item>
636
<Item>
637
with two items
638
</Item>
639
</List>
640
</Item>
641
<Item>
642
item 3 of the outer list
643
</Item>
644
</List>
645
This does not belong to the list anymore.<Br/>
646
647
648
The *, -, and + are fully interchangeable and can even be used mixed, but this is not recommended.
649
650
</Subsection>
651
652
<Subsection Label="MarkdownExtensionMath">
653
<Heading>Math modes</Heading>
654
655
One can start an inline formula with a $, and also end it with $, just like in &LaTeX;. This will translate into
656
&GAPDoc;s inline math environment. For display mode one can use $$, also like &LaTeX;.
657
658
<Listing><![CDATA[
659
#! This is an inline formula: $1+1 = 2$.
660
#! This is a display formula:
661
#! $$ \sum_{i=1}^n i. $$
662
]]></Listing>
663
664
produces the following output:<Br/>
665
This is an inline formula: <Math>1+1 = 2</Math>.
666
This is a display formula:
667
<Display> \sum_{i=1}^n i. </Display>
668
669
</Subsection>
670
671
<Subsection Label="MarkdownExtensionEmph">
672
<Heading>Emphasize</Heading>
673
674
One can emphasize text by using two asterisks (**) or two underscores (__) at the
675
beginning and the end of the text which should be emphasized. Example:
676
677
<Listing><![CDATA[
678
#! **This** is very important.
679
#! This is __also important__.
680
#! **Naturally, more than one line
681
#! can be important.**
682
]]></Listing>
683
684
This produces the following output:<Br/>
685
<E>This</E> is very important.
686
This is <E>also important</E>.
687
<E>Naturally, more than one line
688
can be important.</E>
689
690
</Subsection>
691
</Section>
692
693
</Chapter>
694
695