GAPDoc ( Version 1.6.6 ) July 2022 Frank Lübeck Max Neunhöffer Frank Lübeck Email: mailto:Frank.Luebeck@Math.RWTH-Aachen.De Homepage: http://www.math.rwth-aachen.de/~Frank.Luebeck Max Neunhöffer Email: mailto:neunhoef at mcs.st-and.ac.uk Homepage: http://www-groups.mcs.st-and.ac.uk/~neunhoef/ ------------------------------------------------------- Copyright © 2000-2022 by Frank Lübeck and Max Neunhöffer GAPDoc is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (http://www.fsf.org/licenses/gpl.html) as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ------------------------------------------------------- Contents (GAPDoc) 1 Introduction and Example 1.1 XML 1.2 A complete example 1.3 Some questions 2 How To Type a GAPDoc Document 2.1 General XML Syntax 2.1-1 Head of XML Document 2.1-2 Comments 2.1-3 Processing Instructions 2.1-4 Names in XML and Whitespace 2.1-5 Elements 2.1-6 Start Tags 2.1-7 End Tags 2.1-8 Combined Tags for Empty Elements 2.1-9 Entities 2.1-10 Special Characters in XML 2.1-11 Rules for Attribute Values 2.1-12 CDATA 2.1-13 Encoding of an XML Document 2.1-14 Well Formed and Valid XML Documents 2.2 Entering GAPDoc Documents 2.2-1 Other special characters 2.2-2 Mathematical Formulae 2.2-3 More Entities 3 The Document Type Definition 3.1 What is a DTD? 3.2 Overall Document Structure 3.2-1  3.2-2  3.2-3  3.2-4 <Subtitle> 3.2-5 <Version> 3.2-6 <TitleComment> 3.2-7 <Author> 3.2-8 <Date> 3.2-9 <Address> 3.2-10 <Abstract> 3.2-11 <Copyright> 3.2-12 <Acknowledgements> 3.2-13 <Colophon> 3.2-14 <TableOfContents> 3.2-15 <Bibliography> 3.2-16 <TheIndex> 3.3 Sectioning Elements 3.3-1 <Body> 3.3-2 <Chapter> 3.3-3 <Heading> 3.3-4 <Appendix> 3.3-5 <Section> 3.3-6 <Subsection> 3.4 ManSection–a special kind of subsection 3.4-1 <ManSection> 3.4-2 <Func> 3.4-3 <Oper> 3.4-4 <Constr> 3.4-5 <Meth> 3.4-6 <Filt> 3.4-7 <Prop> 3.4-8 <Attr> 3.4-9 <Var> 3.4-10 <Fam> 3.4-11 <InfoClass> 3.5 Cross Referencing and Citations 3.5-1 <Ref> 3.5-2 <Label> 3.5-3 <Cite> 3.5-4 <Index> 3.5-5 <URL> 3.5-6 <Email> 3.5-7 <Homepage> 3.6 Structural Elements like Lists 3.6-1 <List> 3.6-2 <Mark> 3.6-3 <Item> 3.6-4 <Enum> 3.6-5 <Table> 3.7 Types of Text 3.7-1 <Emph> and <E> 3.7-2 <Quoted> and <Q> 3.7-3 <Keyword> and <K> 3.7-4 <Arg> and <A> 3.7-5 <Code> and <C> 3.7-6 <File> and <F> 3.7-7 <Button> and <B> 3.7-8 <Package> 3.7-9 <Listing> 3.7-10 <Log> and <Example> 3.7-11 <Verb> 3.8 Elements for Mathematical Formulae 3.8-1 <Math> and <Display> 3.8-2 <M> 3.9 Everything else 3.9-1 <Alt> 3.9-2 <Par> and <P> 3.9-3 <Br> 3.9-4 <Ignore> 4 Distributing a Document into Several Files 4.1 The Conventions 4.2 A Tool for Collecting a Document 4.2-1 ComposedDocument 4.2-2 OriginalPositionDocument 4.2-3 FilenameGAP 5 The Converters and an XML Parser 5.1 Producing Documentation from Source Files 5.1-1 MakeGAPDocDoc 5.2 Parsing XML Documents 5.2-1 ParseTreeXMLString 5.2-2 StringXMLElement 5.2-3 EntitySubstitution 5.2-4 DisplayXMLStructure 5.2-5 ApplyToNodesParseTree 5.2-6 GetTextXMLTree 5.2-7 XMLElements 5.2-8 CheckAndCleanGapDocTree 5.2-9 AddParagraphNumbersGapDocTree 5.2-10 InfoXMLParser 5.2-11 XMLValidate 5.2-12 ValidateGAPDoc 5.3 The Converters 5.3-1 GAPDoc2LaTeX 5.3-2 GAPDoc2Text 5.3-3 GAPDoc2TextPrintTextFiles 5.3-4 AddPageNumbersToSix 5.3-5 PrintSixFile 5.3-6 SetGAPDocTextTheme 5.3-7 GAPDoc2HTML 5.3-8 GAPDoc2HTMLPrintHTMLFiles 5.3-9 Stylesheet files 5.3-10 CopyHTMLStyleFiles 5.3-11 SetGAPDocHTMLStyle 5.3-12 InfoGAPDoc 5.3-13 SetGapDocLanguage 5.4 Testing Manual Examples 5.4-1 ExtractExamples 5.4-2 RunExamples 6 String and Text Utilities 6.1 Text Utilities 6.1-1 WHITESPACE 6.1-2 TextAttr 6.1-3 WrapTextAttribute 6.1-4 FormatParagraph 6.1-5 SubstitutionSublist 6.1-6 StripBeginEnd 6.1-7 StripEscapeSequences 6.1-8 RepeatedString 6.1-9 NumberDigits 6.1-10 LabelInt 6.1-11 PositionMatchingDelimiter 6.1-12 WordsString 6.1-13 Base64String 6.2 Unicode Strings 6.2-1 Unicode Strings and Characters 6.2-2 Encode 6.2-3 Lengths of UTF-8 strings 6.2-4 InitialSubstringUTF8String 6.3 Print Utilities 6.3-1 PrintTo1 6.3-2 StringPrint 6.3-3 PrintFormattedString 6.3-4 Page 6.3-5 StringFile 7 Utilities for Bibliographies 7.1 Parsing BibTeX Files 7.1-1 ParseBibFiles 7.1-2 NormalizedNameAndKey 7.1-3 WriteBibFile 7.1-4 LabelsFromBibTeX 7.1-5 InfoBibTools 7.2 The BibXMLext Format 7.3 Utilities for BibXMLext data 7.3-1 Translating BibTeX to BibXMLext 7.3-2 HeuristicTranslationsLaTeX2XML.Apply 7.3-3 StringBibAsXMLext 7.3-4 ParseBibXMLextString 7.3-5 WriteBibXMLextFile 7.3-6 Bibliography Entries as Records 7.3-7 RecBibXMLEntry 7.3-8 AddHandlerBuildRecBibXMLEntry 7.3-9 StringBibXMLEntry 7.3-10 TemplateBibXML 7.4 Getting BibTeX entries from MathSciNet 7.4-1 SearchMR A The File 3k+1.xml B The File gapdoc.dtd C The File bibxmlext.dtd