opening it up with Common Lisp

Favorite weblogs

Lisp Related

Bill Clementson

Finding Lisp

Lemonodor

Lispmeister.com

Planet Lisp

Politics

Orcinus

Talking Points Memo

This Modern World

Working for Change

Other home

Polliblog

Recent Readings

Book review: Darwinia
Reviewed: Friday, August 11, 2006

Summer reading: Spin
Reviewed: Saturday, August 5, 2006

Runner
Reviewed: Tuesday, July 18, 2006

the Omnivoire's Delimma
Reviewed: Wednesday, July 12, 2006

the Golem's Eye
Reviewed: Wednesday, May 31, 2006





tinderbox
 width=

Some CL-Markdown design questions for public review
Tuesday, July 18, 2006

I've been using Peter Seibel's Markup (see also here for a fork by Cyrus Harmon) lately for a project. If you've seen LaTeX then Markup will be familiar. The nicest thing about it is that Peter has made it really easy to extend the language with your own commands. It's also very well integrated with Lisp and with Peter's other tools. On the other hand, it's not Markdown. This means that Markup documents tend to look like documents with Markup and that there is no convenient round trip from Markup to HTML and back again. Now I'd like to be able to say that CL-Markdown provided Markdown's extremely readable syntax with Markup's cool customization but I can't. At least, not yet. Here then, are my thoughts on the matter. Please let me know if anything resonates positively or, perhaps even more importantly, negatively with you.

First, what do I want to support?

  • I'd like an easy to way to associate properties with a document and to use those properties later,
  • I'd like to add some Wiki-link syntax to make using Markdown in a Wiki a bit more natural,
  • I'd like to add simple customization so that one can define commands in Lisp and invoke those commands at well known points during document parsing and production, and
  • I'd like the syntax to seem natural so that it doesn't get too much in the way of normal writing and reading.

Second, what do I propose:

  • I'm intending to make #\{ and #\} special characters (you can always escape them if you need to use them for more pedestrian purposes). Stuff between a pair of curly braces will be treated as a Lisp function invocation where the first word denotes the function and the rest of the words denotes arguments. Here are some examples.

    • {table-of-contents} - add a table of contents (based on H1, H2, and so forth headings). If you only want to go down to H3, then use {table-of-contents :depth 3}.

    • {set-property document-name "general"} - sets a property. In this case, document-name would be a well defined property that controls the name of the output file. You can use {property name} to retreive already set properties.

    • {function document-system} - used to output documentation for the function named 'document-system (cf. Tinaa)

    All of these examples presuppose that I (or someone) has written commands to accept and process them. I think that this mechanism handles about 90% of what I want. The only missing bit is Wiki-links.

  • For Wiki-links, I'm thinking of using double brackets. E.g. {{Another page}} would like to "Another%20Page". But one also wants to be able to specify different text and I think something like {{Another page} different text} would do fine. The syntax starts to get a bit overloaded but I think that even {{Another Page} different text :title This leads to another page :class funky-link} would be fine.

I'm not sure when I'll get to this... Soon, I hope but let me know (gwking@metabang.com) when you see something I've missing. Thanks.


|

Home | About | Quotes | Recent | Archives

Copyright -- Gary Warren King, 2004 - 2006