@BeginGroup [grpname]
@EndGroup
@BeginExample and @EndExample
@BeginExampleSession and @EndExampleSession
@BeginLog and @EndLog
@BeginLogSession and @EndLogSession
@DoNotReadRestOfFile
@BeginChunk name, @EndChunk, and @InsertChunk name
@BeginCode name, @EndCode, and @InsertCode name
@LatexOnly text, @BeginLatexOnly, and @EndLatexOnly
@NotLatex text, @BeginNotLatex, and @EndNotLatex
@Index key [entry text]
You can document declarations of global functions and variables, operations, attributes etc. by inserting AutoDoc comments into your sources before these declarations. An AutoDoc comment always starts with #!. This is also the smallest possible AutoDoc command. If you want your declaration documented, just write #! at the line before the documentation. For example:
#!
DeclareOperation( "AnOperation",
[ IsList ] );
This will produce a manual entry for the operation AnOperation.
For declaration documentation, the associated declaration must appear immediately after the AutoDoc comment block. In particular, do not insert other code (such as if false then or assignments) between the comment block and the Declare... statement.
This also works for InstallMethod and InstallOtherMethod. In that case, AutoDoc uses the installed method's name and filter list to create a manual entry for the implemented item. For example,
#! @Description
#! Returns the number of elements of <A>L</A>.
#! @Arguments L
#! @Returns a nonnegative integer
InstallMethod( CountElements, "for a list", [ IsList ],
L -> Length( L ) );
leads to this:
<ManSection> <Meth Arg="L" Name="CountElements" Label="for IsList"/> <Returns>a nonnegative integer </Returns> <Description> Returns the number of elements of <A>L</A>. </Description> </ManSection>
The label is derived from the filter list; the method's description string "for a list" is not used.
Inside of AutoDoc comments, AutoDoc commands starting with @ can be used to control the output AutoDoc produces. Any comment line that does not start with an AutoDoc command is treated as regular documentation text and may contain (almost) arbitrary GAPDoc XML markup, such as <Ref>, <A>, <List>, and similar tags. This lets you use the normal GAPDoc formatting toolbox directly inside AutoDoc comments.
For example:
#! @Description #! See <Ref Chap="Chapter_Tutorials"/> for setup details. #! The argument <A>obj</A> must satisfy <K>IsObject</K>.
As explained in chapter 1, you can combine AutoDoc comments with hand-written XML and classic GAPDoc comments. For practical setup and migration workflows, see chapter 2.
The commands in this section create chapters, appendices, sections and subsections, and select where subsequent text and manual entries go.
@Chapter nameSets the active chapter, all subsequent functions which do not have an explicit chapter declared in their AutoDoc comment via @ChapterInfo will be added to this chapter. Also all text comments, i.e. lines that begin with #! without a command, and which do not follow after @Description, will be added to the chapter as regular text; see 3.1-5 for the details. Additionally, the chapters label will be set to Chapter_name.
Example:
#! @Chapter My chapter #! This is my chapter. #! I document my stuff in it.
The @ChapterLabel label command can be used to set the label of the chapter to Chapter_label instead of Chapter_name.
Additionally, the chapter will be stored as _Chapter_label.xml.
The @ChapterTitle title command can be used to set a heading for the chapter that is different from name. Note that the title does not affect the label.
If you use all three commands, i.e.,
#! @Chapter name #! @ChapterLabel label #! @ChapterTitle title
title is used for the headline, label for cross-referencing, and name for setting the same chapter as active chapter again.
@Appendix nameThis is analogous to @Chapter, but generates Appendix elements instead of Chapter elements. When scaffolding generates the main XML file, appendices created this way are included automatically after any files listed in scaffold.appendix.
Example:
@Appendix Supplementary material @Section Additional tables
@Section nameSets an active section like @Chapter sets an active chapter. The section automatically ends with the next @Section or @Chapter command.
#! @Section My first manual section #! In this section I am going to document my first method.
The @SectionLabel label command can be used to set the label of the section to Section_label instead of Chapter_chaptername_Section_name.
The @SectionTitle title command can be used to set a heading for the section that is different from name.
#! @Section A rather long section name #! @SectionLabel ShortSec #! @SectionTitle A short heading
Other parts of the manual can now refer to this section via <Ref Sect="Section_ShortSec"/>.
@Subsection nameSets an active subsection like @Section sets an active section. The subsection automatically ends with the next @Subsection, @Section or @Chapter command. It also ends with the next documented function. Indeed, internally each function manpage
is treated like a subsection.
#! @Subsection My first manual subsection #! In this subsection I am going to document my first example.
The @SubsectionLabel label command can be used to set the label of the subsection to Subsection_label instead of Chapter_chaptername_Section_sectionname_Subsection_name.
The @SubsectionTitle title command can be used to set a heading for the subsection that is different from name.
#! @Subsection Details on the input #! @SubsectionLabel Input #! @SubsectionTitle Input
This subsection is referred to via <Ref Subsect="Subsection_Input"/>.
A plain text line is a line of an AutoDoc comment, or of a .autodoc file, that is neither an AutoDoc command nor part of the documentation of a declaration (such as the text after @Description), an example, a chunk or a similar block. Such a line is appended to the active subsection, or if there is none to the active section, or else to the active chapter. In detail:
Files are read one after another, in the order described for the autodoc.files and autodoc.scan_dirs options of AutoDoc (4.3-1). Each file starts with no active chapter, section or subsection.
Text read while no chapter is active is discarded, and AutoDoc prints a warning.
Activating a chapter, section or subsection that already exists, for example by repeating @Chapter name in another file, appends to its end.
A documented declaration ends the active subsection. Text after it is added to the section, after the manual entry.
Text appended to a chapter after one of its sections, or to a section after one of its subsections, is placed after that section resp. subsection. As GAPDoc marks where a section begins but not where it ends, readers see this text as part of the last section resp. subsection, so AutoDoc prints a warning.
For example, if one file contains
#! @Chapter Intro #! @Section Basics #! Some basic facts.
and a file read later contains
#! @Chapter Intro #! More introductory text.
then More introductory text.
appears at the end of section Basics
. To avoid this, put all text that introduces a chapter before its first section, or move it into a section of its own.
In the bare form above, the manual entry for AnOperation will not contain much more than the name of the operation. In order to change this, there are several commands you can put into the AutoDoc comment before the declaration. Currently, the following commands are provided:
@Description descrAdds the text in the following lines of the AutoDoc to the description of the declaration in the manual. Lines are until the next AutoDoc command or until the declaration is reached.
#! @Description #! Returns the largest entry of the list <A>L</A>. #! The list must not be empty. DeclareOperation( "LargestEntry", [ IsList ] );
@Returns ret valThe string ret_val is added to the documentation, with the text Returns:
put in front of it. This should usually give a brief hint about the type or meaning of the value returned by the documented function.
#! @Returns a positive integer DeclareAttribute( "Exponent", IsGroup );
@Arguments argsThe string args contains a description of the arguments the function expects, including optional parts, which are denoted by square brackets. The argument names can be separated by whitespace, commas or square brackets for the optional arguments, like grp[, elm]
or xx[y[z] ]
. If GAP options are used, this can be followed by a colon : and one or more assignments, like n[, r]: tries := 100
.
#! @Arguments G[, n]: tries := 100 DeclareGlobalFunction( "RandomGenerators" );
For DeclareGlobalName, using @Arguments or @Returns also makes AutoDoc document the item as a function. This is useful because DeclareGlobalName itself does not reveal whether the name denotes a function or a variable.
@ItemType kindOverrides the kind of manual item created for the following declaration or installed method. The supported values are Attr, Cat, Coll, Constr, Fam, Filt, Func, InfoClass, Meth, Oper, Prop, Repr, and Var.
The values Cat, Coll, and Repr are AutoDoc-specific aliases. They emit Filt entries with the corresponding GAPDoc filter type.
This is useful when the source code alone does not determine which manual item kind should be emitted. For many declarations such as DeclareAttribute or DeclareProperty, AutoDoc already knows the intended type from the declaration itself.
It is useful for DeclareGlobalName, because that declaration can refer to either a function or a variable. AutoDoc defaults such entries to Var, but switches to Func as soon as @Arguments or @Returns indicates function-style documentation. You can still use @ItemType to override this explicitly.
It is useful for DeclareSynonym, because that declaration can document a function synonym or one of several filter-like synonyms. Use @ItemType Filt, Cat, Coll, or Repr to control which kind of filter entry should be emitted.
For example:
#! @ItemType Repr DeclareSynonym( "IsSomethingRep", IsComponentObjectRep );
This makes AutoDoc emit a <Filt Type="Representation" .../> manual entry.
@Group grpnameAdds the following method to a group with the given name. See section 3.6 for more information about groups.
#! @Description #! The width of <A>obj</A>. #! @Arguments obj #! @Group Dimensions DeclareAttribute( "Width", IsObject ); #! @Arguments obj #! @Group Dimensions DeclareAttribute( "Height", IsObject );
Both attributes end up in one manual entry, with the description given once.
@Label labelAdds label to the function as label.
If this is not specified, then for declarations that involve a list of input filters (as is the case for DeclareOperation, DeclareAttribute, etc.), a default label is generated from this filter list.
#! @Label testlabel
DeclareProperty( "AProperty",
IsObject );
leads to this:
<ManSection> <Prop Arg="arg" Name="AProperty" Label="testlabel"/> <Returns> <K>true</K> or <K>false</K> </Returns> <Description> </Description> </ManSection>
while
#!
DeclareProperty( "AProperty",
IsObject );
leads to this:
<ManSection> <Prop Arg="arg" Name="AProperty" Label="for IsObject"/> <Returns> <K>true</K> or <K>false</K> </Returns> <Description> </Description> </ManSection>
@ChapterInfo chapter, sectionAdds the entry to the given chapter and section. Here, chapter and section are the respective titles. As an example, a full AutoDoc comment with all options could look like this:
#! @Description
#! Computes the list of lists of degrees of ordinary characters
#! associated to the $p$-blocks of the group $G$
#! with $p$-modular character table <A>modtbl</A>
#! and underlying ordinary character table `ordtbl`.
#! @Returns a list
#! @Arguments modtbl
#! @Group CharacterDegreesOfBlocks
#! @Label chardegblocks
#! @ChapterInfo Blocks, Attributes
DeclareAttribute( "CharacterDegreesOfBlocks",
IsBrauerTable );
There are also some commands which can be used in AutoDoc comments that are not associated to any declaration. This is useful for additional text in your documentation, examples, mathematical chapters, etc.
@BeginGroup [grpname]Starts a group. All following documented declarations without an explicit @Group command are grouped together in the same group with the given name. If no name is given, then a new nameless group is generated. The effect of this command is ended when an @EndGroup command is reached.
See section 3.6 for more information about groups.
@EndGroupEnds the current group.
#! @BeginGroup MyGroup
#!
DeclareAttribute( "GroupedAttribute",
IsList );
DeclareOperation( "NonGroupedOperation",
[ IsObject ] );
#!
DeclareOperation( "GroupedOperation",
[ IsList, IsRubbish ] );
#! @EndGroup
Sets the subsection heading for the current group to title. In the absence of any @GroupTitle command, the heading will be the name of the first entry in the group. See 3.6 for more information.
#! @BeginGroup Dimensions #! @GroupTitle Width and height
@BeginExample and @EndExample@BeginExample marks the start of an example to be put into the manual. It differs from GAPDoc's <Example> (see GAPDoc: Log), in that it expects actual code (not in a comment) interspersed with comments, to allow for examples files that can be both executed by GAP, and parsed by AutoDoc. To achieve this, GAP commands are not preceded by a comment, while output has to be preceded by an AutoDoc comment. The gap> prompt for the display in the manual is added by AutoDoc. @EndExample ends the example block.
To illustrate this command, consider this input:
#! @BeginExample S5 := SymmetricGroup(5); #! Sym( [ 1 .. 5 ] ) Order(S5); #! 120 #! @EndExample
This results in the following output:
gap> S5 := SymmetricGroup(5); Sym( [ 1 .. 5 ] ) gap> Order(S5); 120
The AutoDoc command @Example is an alias of @BeginExample. If you enable extract_examples := true when calling AutoDoc (4.3-1), these examples can also be turned into .tst files (see Section 2.4-1).
@BeginExampleSession and @EndExampleSession@BeginExampleSession marks the start of an example to be put into the manual, while @EndExampleSession ends the example block. It is the direct analog of GAPDoc's <Example> (see GAPDoc: Log).
To illustrate this command, consider this input:
#! @BeginExampleSession #! gap> S5 := SymmetricGroup(5); #! Sym( [ 1 .. 5 ] ) #! gap> Order(S5); #! 120 #! @EndExampleSession
This results in the following output:
gap> S5 := SymmetricGroup(5); Sym( [ 1 .. 5 ] ) gap> Order(S5); 120
It inserts an example into the manual just as @Example would do, but all lines are commented and therefore not executed when the file is read. All lines that should be part of the example displayed in the manual have to start with an AutoDoc comment (#!). The comment will be removed, and, if the following character is a space, this space will also be removed. There is never more than one space removed. To ensure examples are correctly colored in the manual, there should be exactly one space between #! and the gap> prompt. The AutoDoc command @ExampleSession is an alias of @BeginExampleSession.
@BeginLog and @EndLogWorks just like the @BeginExample command, but the example will not be tested. See the GAPDoc manual for more information. The AutoDoc command @Log is an alias of @BeginLog.
#! @BeginLog Runtime(); #! 1234 #! @EndLog
@BeginLogSession and @EndLogSessionWorks just like the @BeginExampleSession command, but the example will not be tested if manual examples are run. It is the direct analog of GAPDoc's <Log> (see GAPDoc: Log). The AutoDoc command @LogSession is an alias of @BeginLogSession.
#! @BeginLogSession #! gap> Runtime(); #! 1234 #! @EndLogSession
@DoNotReadRestOfFilePrevents the rest of the file from being read by the parser. Useful for unfinished or temporary files.
#! This will appear in the manual #! @DoNotReadRestOfFile #! This will not appear in the manual.
@BeginChunk name, @EndChunk, and @InsertChunk nameText inside a @BeginChunk / @EndChunk part will not be inserted into the final documentation directly. Instead, the text is stored in an internal buffer.
That chunk of text can then later on be inserted in any other place by using the @InsertChunk name command.
If you do not provide an @EndChunk, the chunk ends at the end of the file.
#! @BeginChunk MyChunk #! Hello, world. #! @EndChunk #! @InsertChunk MyChunk ## The text "Hello, world." is inserted right before this.
You can use this to define an example like this in one file:
#! @BeginChunk Example_Symmetric_Group #! @BeginExample S5 := SymmetricGroup(5); #! Sym( [ 1 .. 5 ] ) Order(S5); #! 120 #! @EndExample #! @EndChunk
And then later, insert the example in a different file, like this:
#! @InsertChunk Example_Symmetric_Group
@BeginCode name, @EndCode, and @InsertCode nameInserts the text between @BeginCode and @EndCode verbatim at the point where @InsertCode is called. This is useful to insert code excerpts directly into the manual.
#! @BeginCode Increment i := i + 1; #! @EndCode #! @InsertCode Increment ## Code is inserted here.
@LatexOnly text, @BeginLatexOnly, and @EndLatexOnlyCode inserted between @BeginLatexOnly and @EndLatexOnly or after @LatexOnly is only inserted in the PDF version of the manual or worksheet. It can hold arbitrary LaTeX-commands.
#! @BeginLatexOnly
#! \include{picture.tex}
#! @EndLatexOnly
#! @LatexOnly \include{picture.tex}
@NotLatex text, @BeginNotLatex, and @EndNotLatexCode inserted between @BeginNotLatex and @EndNotLatex or after @NotLatex is inserted in the HTML and text versions of the manual or worksheet, but not in the PDF version.
#! @BeginNotLatex #! For further information see the PDF version of this manual. #! @EndNotLatex #! @NotLatex For further information see the PDF version of this manual.
@Index key [entry text]Adds an index entry to the current documentation text. The command @Index key entry text generates <Index Key="key">entry text</Index>. If no entry text is provided, then the entry text is empty. To use keys containing spaces, wrap the key in double quotes, e.g. @Index "my key" entry text. The entry text is processed like normal documentation text, so markdown-like inline code such as true is supported.
#! @Index "coset enumeration" Coset enumeration, see `ToddCoxeter`
generates
<Index Key="coset enumeration">Coset enumeration, see <Code>ToddCoxeter</Code></Index>
The following commands can be used to add corresponding parts to the title page of a document generated by AutoDoc.
@Title
@Subtitle
@Version
@TitleComment
@Author
@Date
@Address
@Abstract
@Copyright
@Acknowledgements
@Colophon
Many of these values can (and for package manuals typically should) be extracted from PackageInfo.g. If you set them explicitly in comments, they override extracted or scaffold-defined values. This is usually most useful for worksheets created with AutoDocWorksheet (4.1-1), since worksheets do not have a PackageInfo.g file from which this information could be extracted.
For example, a worksheet could start like this:
#! @Title Groups made easy #! @Subtitle A worked example #! @Author Jane Doe #! @Date 2026-11-07 #! @Abstract #! This worksheet shows how to set title page data.
@Title, @Subtitle, @Version, @Author, and @Date take only the rest of their line; the others also take all following text lines up to the next command.
Files that have the suffix .autodoc and are listed in the autodoc.files option of AutoDoc (4.3-1), resp. are contained in one of the directories listed in autodoc.scan_dirs or one of their subdirectories, are treated as standalone AutoDoc input files. They are meant for manual text that does not belong next to a single declaration: chapters, sections, tutorials, worked examples, index entries, chunks, title-page metadata, and similar prose-heavy material.
Conceptually, a .autodoc file uses the same parser as AutoDoc comments, but without the comment marker. In a .autodoc file, lines do not need to start with #! and in fact usually should not. This makes .autodoc files one convenient way to replace hand-written XML chapters when you prefer AutoDoc's command syntax and Markdown-like text features. However, it is not the only supported style: chapter and section commands inside source comments remain fully supported, and AutoDoc itself still uses that style in files such as gap/Magic.gd. For the surrounding workflow, see Chapter 2.
The most important difference from declaration comments is that a plain text file does not document a declaration by adjacency. There is no following Declare... or InstallMethod statement for AutoDoc to inspect. So commands whose meaning depends on such a declaration only make sense in source comments immediately before that declaration.
In practice, this gives the following rule of thumb.
Use source comments beginning with #! to document declarations. This is the mode for @Description, @Returns, @Arguments, @Label, @Group, and @ChapterInfo.
Use either .autodoc files or source comments for standalone manual structure and prose. Commands such as @Chapter, @Section, @Subsection, grouping commands, examples and logs, chunks and code insertion, @Index, title-page commands, Markdown-style headings, fenced code blocks, and ordinary GAPDoc XML markup work in both styles.
As a concrete example, the following file can serve as a complete chapter written in .autodoc format.
@Chapter Test @Section First Section @Subsection First Subsection This text belongs directly to the manual chapter. It can use XML tags such as <A>arg</A> or <Ref .../>. @BeginExampleSession gap> S5 := SymmetricGroup(5); Sym( [ 1 .. 5 ] ) gap> Size(S5); 120 @EndExampleSession @Index "Worksheet Autoplain" Plain worksheet index entry with `true`
This is essentially the style used in the worksheet fixture tst/worksheets/autoplain.sheet/plain.autodoc.
The same structural commands can also be used inside source comments, for example:
#! @Chapter Reference #! @Section The AutoDoc() function #! Some introductory text for this section.
This source-comment style is still fully supported and is used in gap/Magic.gd.
The mixed-workflow case is equally common. Suppose an existing manual still has a hand-written main XML file and perhaps some hand-written XML chapters. Then you can keep those files, include _AutoDocMainFile.xml from the main XML file as described in Chapter 2, and add one or more .autodoc files via autodoc.files or autodoc.scan_dirs. Those files can provide tutorial chapters or appendices, while declaration documentation continues to live in source comments and older XML chapters remain unchanged.
One caveat is worth keeping in mind. If you want a standalone .autodoc file to pause and resume around declaration documentation that is written in source comments, the current workaround is to use chunks. That interleaving workflow is currently limited; see issue #60 in the AutoDoc issue tracker.
So, while .autodoc files and source comments share most of the same text syntax, they can be combined freely. The main distinction is simply that declaration-bound commands attach metadata to a following declaration, while standalone manual text can live wherever you find it most convenient.
In GAPDoc, it is possible to make groups of manual items, i.e., when documenting a function, operation, etc., it is possible to group them into suitable chunks. This can be particularly useful if there are several definitions of an operation with several different argument types, all doing more or less the same to the arguments. Then their manual items can be grouped, sharing the same description and return type information. You can give a heading to the group in the manual with the @GroupTitle command; if that is not supplied, then the heading of the first manual item in the group will be used as the heading.
Note that group names are globally unique throughout the whole manual. That is, groups with the same name are in fact merged into a single group, even if they were declared in different source files. Thus you can have multiple @BeginGroup / @EndGroup pairs using the same group name, in different places, and these all will refer to the same group.
Moreover, this means that you can add items to a group via the @Group command in the AutoDoc comment of an arbitrary declaration, at any time.
The following code
#! @BeginGroup Group1 #! @GroupTitle A family of operations #! @Description #! First sentence. DeclareOperation( "FirstOperation", [ IsInt ] ); #! @Description #! Second sentence. DeclareOperation( "SecondOperation", [ IsInt, IsGroup ] ); #! @EndGroup ## .. Stuff .. #! @Description #! Third sentence. #! @Group Group1 KeyDependentOperation( "ThirdOperation", IsGroup, IsInt, "prime );
produces the following:
<ManSection Label="Group1"> <Heading>A family of operations</Heading> <Oper Arg="arg" Name="FirstOperation" Label="for IsInt"/> <Oper Arg="arg1,arg2" Name="SecondOperation" Label="for IsInt, IsGroup"/> <Oper Arg="arg1,arg2" Name="ThirdOperation" Label="for IsGroup, IsInt"/> <Description> First sentence. Second sentence. Third sentence. </Description> </ManSection>
AutoDoc has some convenient ways to insert special format into text, like math formulas and lists. The syntax for them are inspired by Markdown and LaTeX, but do not follow them strictly. Neither are all features of the Markdown language supported. The following subsections describe what is possible.
One can create lists of items by beginning a new line with *, +, -, followed by one space. The first item starts the list. When items are longer than one line, the following lines have to be indented by at least two spaces. The list ends when a line which does not start a new item is not indented by two spaces. Of course lists can be nested. Here is an example:
#! The list starts in the next line #! * item 1 #! * item 2 #! which is a bit longer #! * and also contains a nested list #! * with two items #! * item 3 of the outer list #! This does not belong to the list anymore.
This is the output:
The list starts in the next line
item 1
item 2 which is a bit longer
and also contains a nested list
with two items
item 3 of the outer list
This does not belong to the list anymore.
The *, -, and + are fully interchangeable and can even be used mixed, but this is not recommended.
One can start an inline formula with a $, and also end it with $, just like in LaTeX. This will translate into GAPDocs inline math environment. For display mode one can use $$, also like LaTeX.
#! This is an inline formula: $1+1 = 2$.
#! This is a display formula:
#! $$ \sum_{i=1}^n i. $$
produces the following output:
This is an inline formula: \(1+1 = 2\). This is a display formula:
\[ \sum_{i=1}^n i. \]
One can emphasize text by using two asterisks (**) or two underscores (__) at the beginning and the end of the text which should be emphasized. Example:
#! **This** is very important. #! This is __also important__. #! **Naturally, more than one line #! can be important.**
This produces the following output:
This is very important. This is also important. Naturally, more than one line can be important.
One can mark inline code snippets by using backticks (`) at the beginning and the end of the text which should be marked as code. Example:
#! Call function `foobar()` at the start.
This produces the following output:
Call function foobar() at the start.
One can insert verbatim code blocks by placing the code between lines containing at least three backticks or at least three tildes. The opening fence may optionally be followed by an info string. The values @listing, @example, and @log select the corresponding GAPDoc element; any other value is currently ignored. If nothing is specified the default is to generate <Listing>. Example:
#! ```@listing
#! if x = 2 then
#! Print("1 + 1 = 2 holds, all is good\n");
#! fi;
#! ```
#! ~~~@example
#! gap> [ 1 .. 3 ] ^ 2;
#! [ 1, 4, 9 ]
#! ~~~
#! ```@log
#! #I some log message
#! ```
This produces the following output:
if x = 2 then
Print("1 + 1 = 2 holds, all is good\n");
fi;
gap> [ 1 .. 3 ] ^ 2; [ 1, 4, 9 ]
#I some log message
The following commands used to be supported, but are not supported anymore.
@EndSectionYou can simply remove any use of this, AutoDoc ends sections automatically at the start of any new section or chapter.
@EndSubsectionYou can simply remove any use of this, AutoDoc ends subsections automatically at the start of any new subsection, section or chapter.
@BeginAutoDoc and @EndAutoDocIt suffices to prepend each declaration that is meant to appear in the manual with a minimal AutoDoc comment #!.
@BeginSystem name, @EndSystem, and @InsertSystem namePlease use the chunk commands from subsection 3.3-9 instead.
@AutoDocPlainText and @EndAutoDocPlainTextUse .autodoc files or AutoDoc comments instead.
generated by GAPDoc2HTML