Scribble
Scribble extends the Common Lisp reader with the text markup syntax of Scribe/Skribe and Scribble document preparation systems.

The Scribe being discussed is the Scheme-based document preparation system by Manuel Serrano, the author of Bigloo. It is not the antique system of same name that inspired LaTeX and was used in early CMUCL documentation. Its successor is named Skribe. Scribble is a syntax extension for the Racket system, developed by Eli Barzilay. It was named Scribble independently from the first version of this library, that predated it, and initially only supported an extension of the Skribe syntax.

In Skribe mode, Scribble defines #\[ as a macro-character that reads a Lisp-extended markup language. Scribble may be useful to you if like Skribe's syntax and want to use it in Common Lisp application. At one point, my documents could compile on both Manuel Serrano's Bigloo-based Scribe and my own CL-based Exscribe, though support for this may have bitrotten.

The Skribe syntax is a markup syntax that allows to develop documents in a programmatic way. The syntax integrates very nicely with the LISP syntax; it is infinitely nicer than XML (easy thing to do); and it is noticeably shorter than the equivalent SEXP it produces.

  • [foo ,(bar [baz]) quux] is read as (LIST "foo " (bar "baz") " quux")

Scribble also contains some extensions to the Scribe syntax:

  • [:emph foo] is read as (emph "foo")
  • [: (font :size 1) bar] is read as (font :size 1 "bar")
  • [foo ,[:emph bar] baz] is (list "foo" (emph "bar") "baz")
  • [\:\\\[\]] is read as ":\[]" (well, actually that's ":\\[]")
The actual result is configurable, and configurations already exist for several html generation backends (see below).

Scribble also features an optional extension to Scribe's semantics: [foo] can be actually read as (pp "foo") rather than "foo", so you can wrap or preprocess strings. You can for instance (with-preprocessor #'string-upcase [foo]). This applies to the strings in the cases demonstrated above; they have been shown with this extension disabled for the sake of simplicity.

Scribble source code is at: http://common-lisp.net/gitweb?p=users/frideau/scribble.git

ASDF-install package (obsolete) http://common-lisp.net/gitweb?p=users/frideau/scribble.git;a=snapshot;sf=tgz

Scribble depends on Meta by Jochen Schmidt, version 1.0.0 or later, that implements the famous META parsing technique as documented by Henry Baker.

Mind that this package emphatically does not implement any of Skribe's semantics. It only implements the reader. In particular, it doesn't include an implementation of Skribe's semantics for keyword arguments, and it doesn't include any infrastructure to output HTML, LaTeX, info, Text, etc., from Scribe documents. Instead, Scribble will be a nice front-end for your usual CL Web infrastructure or Lisp Markup Languages, if only customized with the proper setf. The html generation backends from the following packages are already supported in version 1.18: lml2, htmlgen from allegroserve, and also araneida (with a patch); should work but untested: cl-who, htout, yaclml.

However, for HTML-producing semantics, see Exscribe, that uses Scribble as its default syntax reader.