Documentation for Textile 2 Character Macros: a Cheat Sheet
Adam Gessaman has released a great Textile 2 plugin — based on the work of Dean Allen, Brad Choate, and Jim Riggs — that is both more complete and faster than the one bundled with WordPress 1.2.
One of the more interesting innovations of Textile 2 was character macros. With these, you could type an ASCII representation of a Unicode character in curly brackets and have the Textile engine spit out the proper XHTML entity for the Unicode character automatically. No more wracking your brain for the correct named entity! No more reference tables! Well, not so fast…
The character macros, while they “can be guessed,” are over 157 in number. That’s a lot of guessing. There didn’t seem to be any comprehensive documentation for these macros, so I dug into the source code of Jim’s PHP version to create a reference table of my own. I hope this proves handy to all the Textile users out there, and maybe it can be rolled into the documentation of a future release as well. You can give feedback or corrections in a comment to this post. You can also, of course, e-mail me.
I’m very interested in getting Textile 2 to work on this weblog, since the “Textile way” is more intuitive and faster than hand-coding XHTML. Unfortunately, there are still some problems with the way Textile handles the contents of <code> tags, and it would break several of my old entries in currently unfixable ways. For those who don’t post code samples, however, it’s an outstanding way to simplify your daily blogging life. I highly recommend you check it out. You can start by trying Dean’s older version here.
Updates:
- 6/5/2004 — Textpattern user “greenrift” has responded to my announcement of Jim Riggs’s TextilePHP on the Textpattern forums with a hack to integrate the new version into Textpattern!
-
6/12/2004 — I’ve re-arranged this post and changed the title in an effort to make it easier to find for people who google for Textile documentation. These changes were inspired by John Gruber’s advice in “Writing for Google” on Daring Fireball. The URL of the post remains the same.
Also, some clarification may be in order as to why I’ve chosen the Creative Commons Attribution-ShareAlike license for this document rather than the GNU Free Documentation license. While it’s true that the intentions of the GFDL are more directly in line with my desire to allow others to reuse this reference table in their own documentation, it is also far too restrictive and/or vague in some areas for me to feel comfortable foisting its terms onto someone else. Even the Debian Project has some issues with the GFDL.
For more information on the possible drawbacks of the GFDL, read Nathanael Nerode’s article “Why You Shouldn’t Use the GNU FDL” or Wikitravel’s explanation of why their information isn’t covered by the license.
- 6/20/2004 — Adam Gessaman’s latest release of WP-Textile
includes a fix for a bug I’d found in the macro for the bullet
character (a hex value was used instead of decimal). WP-Textile users
should consider upgrading to have access to all the macros.


Hallelujah! Umlauts! At last!
Too bad it’s only for WordPress at the moment. (The irony….)
Comment by Hans — June 4, 2004 @ 1:07 pm
Well, Adam (the other Adam) says that the WP plugin is just a simple wrapper around Jim Riggs’s PHP port. If that’s all it takes to implement the code in WordPress, I can’t imagine that it would be that hard to put to use in Textpattern. Perhaps just ripping out the old Textile code and replacing it with Jim’s would do the trick?
I’m not enough of a PHP programmer (yet) to know, but I’m sure that with Textpattern’s new BSD-like open-source license someone is bound to try it.
Comment by Adam M. — June 4, 2004 @ 2:50 pm
Textpattern user “greenrift” has responded to my announcement of Jim Riggs’s TextilePHP on the Textpattern forums with a hack to integrate the new version into Textpattern! Woo hoo!
Comment by Adam M. — June 5, 2004 @ 11:52 pm
When I use a hex value instead of decimal I always get an error when compiling the code
Comment by John — June 28, 2004 @ 12:08 pm
I’m not sure I follow you, John.
There was a bug in earlier releases of WP-Textile and TextilePHP, wherein the macro for the bullet glyph produced hex code rather than decimal (the problem being that hex doesn’t render). This has since been fixed in (to my knowledge) TextilePHP, WP-Textile, and PyTextile. If you’re having problems with hex values for character macros, I recommend you download the latest version of whichever package you’re using.
Hope that helps.
Comment by Adam — June 28, 2004 @ 4:26 pm
to add a few character entity references I often use on this site. 2145: ‘…’ => ‘…’, # HORIZONTAL ELLIPSIS 2146: ‘ ‘ => ‘ ’, # NON-BREAKING SPACE 2147: ‘x’ => ‘×’, # MULTIPLICATION SIGN Adam Messinger’scheat sheet for Textile 2 character macros is useful in determining what references are missing from the current version of Textile.pm.
Pingback by bajada.net — September 16, 2004 @ 2:59 am
[…] […]
Pingback by dealmeida.net : en/Projects/PyTextile — September 15, 2005 @ 4:19 pm
[…] The Brad Choate’s version of Textile has been ported to PHP by Jim Riggs who brought to us TextilePHP. TextilePHP is also available as a WordPress plugin, developped by Adam Gessaman. Adam Messinger wrote a list of Character Macros for Textile 2 (see the entry Documentation for Textile 2 Character Macros: a Cheat Sheet for the complete story). […]
Pingback by Jean-Philippe Leboeuf Notebook: Main styling and markups formatting languages for XHTML: a few notes — May 7, 2006 @ 5:09 am