Package atdoc
This is the documentation of a fork of the package ATDOC which generates documentation for Common Lisp packages. ATDOC extracts documention strings written
using a custom markup language and generates HTML pages. At this time the fork of ATDOC does not allow to generate TeX documents, and Info files. The original package ATDOC was written by David Lichteblau and is
available under an X11-style license.
This fork of ATDOC extends the possibilities for formating and extracting informations about the package, which has to be documented.
This fork of ATDOC extends the possibilities for formating and extracting informations about the package, which has to be documented.
About This PackageOutput formats Sample Documentation Writing a documentation string The At-sign syntax Generating formatted documentation Generating unformatted XML OverviewAuthorCopyright (C) 2006, 2007, 2008 David LichteblauCopyright (C) 2012 Dieter Kaiser VersionThis is a documentation of a fork of atdoc from February 22, 2012.HomepageSee http://www.lichteblau.com/atdoc/ for the orginal version and ATDOC for this fork.Mailing ListNo mailing list.DownloadGet the source code of this fork of ATDOC from the git repository at gitorious.org/lisp-projects/atdoc or download a tarball master from the repository from this link gitorious.org/lisp-projects/atdoc/archive-tarball/masterGet a tarball of the original version from http://www.lichteblau.com/atdoc/download/, or get it from git at http://www.lichteblau.com/git/atdoc.git InstallationASDF is used for compilation. Register the .asd file, e. g. by symlinking it, then compile atdoc using asdf:load-system.$ ln -sf `pwd`/atdoc.asd /path/to/your/registry/ * (asdf:load-system :atdoc) DependenciesATDOC needs Closure XML, Split sequence, Slime's swank, Xuriella XSLT, Closer-MOP, and their dependencies.Output formatsATDOC can currently generate documentation in these formats:
Sample DocumentationAs an example, code from the book Lisp (3rd edition) by Winston and Horn is chosen. You can find the code with an ASDF definition in the example/ subdirectory of the ATDOC sources so that you can easily compile it yourself. The code included is the Blocks World, from chapters 21 ("The Blocks World with Classes and Methods") and 22 ("Answering Questions about Goals"). Note that the source code from the book has been taken from the publically available lisp3 tarball and is covered by its own license, different from the license of ATDOC.The multi-page example linked above was generated using: (let* ((base (asdf:component-pathname (asdf:find-system :blocks-world))) (output-directory (merge-pathnames "example/" base))) (ensure-directories-exist output-directory) (atdoc:generate-html-documentation '(:blocks-world :blocks-world-goals) output-directory :author "Crategus" :author-url "http://www.crategus.com" :index-title "blocks-world API documentation" :heading "blocks-world" :css "crategus.css" :logo nil :single-page-p nil :include-slot-definitions-p t :include-internal-symbols-p nil)) Writing a documentation stringHere is a complete example of what the documentation of the Lisp function compile could look like using ATDOC. The output from ATDOC is shown at compile with atdoc.@argument[name]{a @term{function name}, or @sym{nil}.} @argument[definition]{a @term{lambda expression} or a @term{function}. The default is the function definition of @arg{name} if it names a @term{function}, or the @term{macro function} of @arg{name} if it names a @term{macro}. The consequences are undefined if no @term{definition} is supplied when the @term{name} is @sym{nil}.} @return{@arg{function} -- the @term{function-name}, or a @term{compiled function}.@br{} @arg{warnings-p} -- a @term{generalized boolean}.@br{} @arg{failure-p} -- a @term{generalized boolean}.} @short{Compiles an @term{interpreted function}.}Note that parts of the documentation strings are just documentation text, which will be included in a section "Details" of the page. Other parts, however, are not part of the actual text, and will be extracted from the documentation string as the first step of processing it. In this case, @argument, @return, and @see-function are the tags that will be removed. All @argument tags will be collected into a section about the function's arguments, all @see-function tags will be collected into a "See also" section. Tags for use only in the docstring of a package itself
Tags for use in the documentation textThe following tags are predefined to emphasize the use of symbols in a way similar to the Common Lisp Hyperspec. The fonts of these tags are predefined in a style sheet, which can be overwritten. Furthermore, these fonts are used within other tags like @argument, @return, or @syntax. This way a uniform style can be ensured over the generated documentation.
Tags for ListsUse the following tags to generate unordered, ordered, or defintion lists in the documentation.
The At-sign syntaxATDOC looks for markup tags start with an at-sign @, in either a long or a short form. The short form looks like this:@return{the computed result}The long form can be convenient for multiple lines of text: @begin{return} the computed result @end{return}Except for the additional whitespace due to line breaks in the second example, the two forms are completely interchangeable. Behind the scenes, both produce an XML element with tag name result, <result>the computed result</result>. Both forms take an optional argument, written with brackets. To pass a hyperlink use the form: @a[http://www.cliki.net]{Cliki}This form gets translated into <a a="http://www.cliki.net">Cliki</a>, until the XSLT stylesheets rename a into href. A second example is @begin[Title]{section} body @end{section}which gets translated into <section section="Title">body</section>. The at-sign also escapes special characters. E. g. closing braces need to be escaped with the at-sign like {n,m@}. Multiple line breaks delimit paragraphs: First paragraph. Generating formatted documentationSeparate functions are offered for each output format: HTML pages, LaTeX/PDF output, and .info files. There is also an older function called generate-documentation, which in now an alias for generate-html-documentation.Generates HTML documentation for packages. ... Generates TeX documentation for packages. ... Function generate-info-documentation (packages directory &key name title include-slot-definitions-p) Generates Info documentation for packages. ... A deprecated alias for generate-html-documentation. Generating unformatted XMLPower users might want to extract docstrings into XML and then send that XML through their own XSLT stylesheets. The following function can be used for that purpose. Extracts docstrings from packages and writes them in XML syntax to the file .atdoc.xml in the specified directory. ... | Exported Symbol Index
|