Wandering Thoughts archives


Thinking about more text formatting for DWiki

What DWiki is used to write about has drifted a fair bit from what I originally wrote it for, and some of the choices I originally made no longer seem so ideal. I've been thinking for a while that DWikiText, the wiki-text formatting language here, needs some more formatting features; this entry is at least in part me thinking out loud about them.

So, here are the new features I think I want:

  • 'literal words', words that appear exactly was written without any special characters in them doing things.

    I really want a way of writing about the x86_64 architecture without having to quote it all the time; currently I write it as [[x86_64|]], and you don't want to know how I had to write that quoted version.

  • a more aesthetic way of quoting things in general; the current approach is too ugly to make me happy if it's used very often. I think the syntax I like best for this is ``...''.

  • a way of doing literal text that linewraps, because almost always this is what I want. If I was doing DWikiText over from scratch, this would be the default for literal text and non-linewrapping literal text would be the special case, but as it is I am basically stuck.

  • a way of turning off special characters in text, especially the _ character. Underscore was a great special character when I was planning to mostly write about Unix commands; it is a bad one when I am talking about programs, because it's a common character in identifiers.

  • I like the idea of some sort of simple macro scheme, on the order of what Mark Dominus did for his Blosxom installation, for much the same reason as he wrote his.

I've come up with trial implementations of most of these features (I've actually been sitting on the last two for some time), but so far I can't decide if I really like them all. Since once I start actually using them, I am more or less stuck (especially if they appear in comments), I feel I need to be extra sure before I commit to them.

(I have already been stuck with one or two bad choices that linger only for backwards compatibility with existing text.)

I could avoid a fair amount of the problem if I was willing to move seriously to using Unicode characters in my entries. For example, my previous ugly example could be rewritten as a big quoted block with literal Unicode arrow characters. Using Unicode characters would also give me lots of choices for special formatting characters, and would actually make escaping them reasonably acceptable if I ever needed to write them literally; I could just use the existing mechanism I have for arbitrary Unicode characters.

(And I am peculiar enough to get amusement out of using, say, 「 and 」 as my literal quotation characters.)

python/MoreDWikiFormatting written at 22:52:45; Add Comment

Page tools: See As Normal.
Login: Password:
Atom Syndication: Recent Pages, Recent Comments.

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.