Home

Awesome

The qbook lisp documentation system

qbook generates HTML (or LaTeX) formatted code listings of Common Lisp source files. Comments in the source code are rendered as HTML paragraphs, text is rendered in <pre> blocks. Headings are created by preceding the text of the comment with one or more * chars.

This is inspired by Luke Gorrie's pbook.el.

How to use it

Load qbook system

qbook can be started directly from ASDF.

Be sure to have loaded the qbook system:

`(asdf:oos 'asdf:load-op 'qbook)`

Write comments to be formatted as documentation

Write commented text in your Lisp sources, with at least four semi colons.

These are the rules:

Add @include directives to your ASDF file. Include the source files you want.

For example, like this:

;;;;@include "src/code-analysis.lisp"

;;;;@include "src/defcode-info-collector.lisp"

;;;;@include "src/html.lisp"

;;;;@include "src/stylesheets.lisp"

;;;;@include "src/latex.lisp"

Publish the documentation

Assuming that your ASDF package is called 'my-system', use the following commands to create the documentation in

  1. HTML format:

(qbook:publish-system-qbook :my-system
                        'qbook:html-generator
                        :output-directory "/path/to/folder/"
                        :title "Documentation for my system")
  1. LaTeX format:

(qbook:publish-system-qbook :my-system
                             'qbook:latex-generator
                             :output-file "/path/to/file"
                             :title "Documentation for my system")