Thither MT-Textile 2 (beta)

Ok, so Dean has taken the wraps off his version, so I shall do the same. MT-Textile 2 is back in beta. I assure you, there are bugs to be found, so please go git 'em!

The test CGI I've created has been updated to use the new code. It's a great way to play with the syntax prior to unleashing it on your Movable Type installation. The Mantis bug tracker is the preferred way to report any bugs you find.

The beta version of the plugin is available here. But please remember it is a beta release. It may produce "funky" results (OK, let's not start that again).

Here's a rundown of some of the new syntax:

Basic formatting

TechniqueExample
Style assignmentp{color:red}. This is a red paragraph.
Class assignmentp(first-para). This is the first paragraph.
Id assignmentp(#copyright). This is the copyright
Class/Idp(blah#bleh). Class blah, Id bleh.
Align rightp>. Align to right
Align leftp<. Align left
Centeredp=. Align center
Justifiedp<>. Justified text
Language assignmentp[fr]. en Française

Table Formatting

table{width:400px}=. |\2. This demonstrates a column span. colspan = 2 |-/2. rowspan = 2, vertically centered |
|{background-color:yellow}. This shows you can use styles with table cells. |>. With alignment |
{background-color:#ccc}|_. Header cell, with row-level style assignment. | *Inline formatting* | And you can even
span multiple lines
now. |

produces...

This demonstrates a column span. colspan = 2rowspan = 2, vertically centered
This shows you can use styles with table cells.With alignment
Header cell, with row-level style assignment.Inline formattingAnd you can even
span multiple lines
now.

Alignment Characters for Tables

CharacterAlignment
>right
<left
=center
-middle (for vertical alignment)
^align top (like 'sup' marker)
~align bottom (like 'sub' marker)
<>justified (align to left and right)
/nRowspan - n=number ('/' reads push downward)
\nColspan - n=number ('\' reads push forward)

Footnotes!

Example

This is an example of a footnote[1].

fn1. Here is where the footnote is placed.

producing...

This is an example of a footnote1.

1 Here is where the footnote is placed.

Image Alignments

CharacterAlignment
>right (floats right)
<left (floats left)
-inline text, middle/centered
^inline text, align at top
~inline text, align at bottom

Padding

Padding characters are placed with the block markers. Like "p)." or "p(.". You can also repeat and mix them as desired: "p(())." means to pad 2em on both the left and right sides.

CharacterMeaning
(Pad on left side (1em for each)
)Pad on right side (1em for each)

Spans

%this is a span%

and

%(class#id)this span has a CSS class and id%

Putting it all together

Here's an example of how you can do a lot of formatting with a little bit of Textile:

<div style="width:350px" class="center">

table)>. |!/photos/summer2003/DSCN0814.thumb.jpg 75% (Georgia Choate)!|
|=. <small>_My wife, Georgia_</small>|

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed sed odio a
mauris tincidunt consectetuer. Maecenas libero. Lorem ipsum dolor sit
amet, consectetuer adipiscing elit. Praesent rhoncus est sit amet augue.
Ut non libero. Aliquam mollis eros eu purus. In hac habitasse platea
dictumst. Fusce nulla elit, blandit ac, hendrerit quis, sollicitudin eget,
enim. Integer sit amet eros ut risus convallis auctor. Duis tortor.
Integer imperdiet dignissim neque.

</div>

Which produces:

Georgia Choate
My wife, Georgia

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed sed odio a mauris tincidunt consectetuer. Maecenas libero. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent rhoncus est sit amet augue. Ut non libero. Aliquam mollis eros eu purus. In hac habitasse platea dictumst. Fusce nulla elit, blandit ac, hendrerit quis, sollicitudin eget, enim. Integer sit amet eros ut risus convallis auctor. Duis tortor. Integer imperdiet dignissim neque.

And briefly

A quick note to those that wonder why all the fuss. Dean set out to create a kind of shorthand for composing for the web. To be able to write and format your writing with less fuss. Textile is not a replacement for HTML, but complimentary to it. Textile allows you to include HTML and use it's shorthand in the same space. But for most things you write, you can probably avoid hitting those "<" and ">" keys altogether.

TrackBack

TrackBack URL for this entry:
http://bradchoate.com/mt/feedback/tb/716

Listed below are links to weblogs that reference Thither MT-Textile 2 (beta):

» brad choate: thither mt-textile 2 (beta) from WE ARE HUGH
brad choate: thither mt-textile 2 (beta) [Read More]

» Textile 2.0 b from The Maelström
Notre amis Brad Choate a revu son plugin pour Movable Type. Il vient de lancer une version beta de son... [Read More]

» Textile 2.0 b from The Maelström
Notre amis Brad Choate a revu son plugin pour Movable Type. Il vient de lancer une version beta de son... [Read More]

» Textile 2 sigue avanzando from mini-d
El avance de Textile 2.0 hará que mucha gente pueda escribir en la web sin tener que aprender HTML. [Read More]

» Textile 2 sigue avanzando from mini-d
El avance de Textile 2.0 hará que mucha gente pueda escribir en la web sin tener que aprender HTML. [Read More]

» Bandwagon from FeralBlog
Couple of quick updates: I made a few changes to templates on the site, including using the very cool MTOtherBlog plugin from David Raynes to cross-list new posts from the new Medium Archive on this page, and vice-versa. I've also... [Read More]

» Jabberings #6 from John's Jottings
I've had that image on the scanner for at least 9 months so I suppose Erin had just turned four when she drew it. She is a lot better at coloring between the lines now. I'd been too lazy to figure out what was wrong with the scanner but tonight when I... [Read More]

» New Textile Plugin Beta from magpiebrain
There's a new version of Brad Choate's MT-Textile plugin. Not too much that id use myself - I don't tend to do that much formatting, although the footnote support looks handy, and would probably eliminate all those bracketed asides I... [Read More]

» ... and textile has been installed from Notes and Jottings
Okay, Brad Choate's MT-Textile plugin has now been installed. The theory would be that this will certainly create a valid XHTML structure, not that writing XHTML is a chore :p But it'll be interesting to see if this makes it easier to mark up entries.... [Read More]

» Friday link dump from Brilliant Corners
The tech links: The Pie/Atom/whatever naming process falls apart Gina’s excellent two posts on file extensions Jason Kottke on RSS feeds Adam Kalsey’s great tip for formatting ordered lists Ftrain is back from vacation Textile 2 is in beta,... [Read More]

» MovableType: Textile plugin from spravodaj
Textile je plugin pre MovableType a mal by vediet konvertovat text prispevkov na html tagy. [www.spravodaj.tk] [Read More]

» Building from Kitsched
I mentioned yesterday that I'm working on the Movable Type templates and the rest of the site. Fact is I want to make as much of the site as I can manageable with MT. It's such a nice tool and... [Read More]

» MT-Textile 2 beta from Tribblescape
Congratulations! You’ve become an unwitting beta tester for Brad Choate’s MT-Textile 2 formatting plugin for Movable Type. I’m using MT-Textile 2 as a lazy formatter for all my blog entries right now, so if you see any really odd form... [Read More]

» MT-Textile 2 extended syntax from Tribblescape
I’m sick of entering “Textile” into the search box at bradchoate.com over and over again to find this entry. I’m tossing a link into my own blog so I can get sick of entering “Textile” into the search box here,... [Read More]

» Sticky Textile block formatting from Tribblescape
I’ve been trying to find some easy way to use Textile formatting in this blog to create multiple-paragraph blockquotes, in which all the paragraphs are contained within a single <blockquote> tag. For example, the code generated by MT-Textil... [Read More]

» Look Mom! from Rizwan Kassim's Public Log
See what I’ve done? The side bars (just left for now) are collapsable, and not in the stupid way that the blogrolling is collapsable… It actually doesn’t transmit the data if it doesn’t need to, meaning an even quicker download... [Read More]

» Look Mom! from Rizwan Kassim's Public Log
See what I’ve done? The side bars (just left for now) are collapsable, and not in the stupid way that the blogrolling is collapsable… It actually doesn’t transmit the data if it doesn’t need to, meaning an even quicker download... [Read More]

» MT-Textile2 from 10 Goto 10
I was looking at the new version of Brad Choate’s MT-Textile 2 plugin for MovableType, and I ran into a problem. It does not support relative links… a couple minutes, and my favorite Perl editor later… voila! I changed line... [Read More]

» Textile 2.0 b from The Maelström - Blog
Notre amis Brad Choate a revu son plugin pour Movable Type. Il vient de lancer une version beta de son oeuvre appellée Textile 2.0. Textile est un outil permettant de formatter chacune des entrées faite dans votre Blog sur Movable... [Read More]

» Si comentas enséñame tu icono from Merodeando por la enredadera
Hace algún tiempo escribí una anotación sobre el favicon y cómo usarlo. Hoy he encontrado MTIcon, un plugin de MT que te permite mostrar el icono del blog (o página web) del que comenta una de tus anotaciones. Ahora... [Read More]

» WordPress — Initial Impressions from Zoinger
Wow! I kind of like it… WordPress that is. Like they say the world-famous five minute install is spot on. I might have even beaten that mark. So far, I have noticed that it’s really fast when compared to MovableType.... [Read More]

» WordPress — Initial Impressions from Zoinger
Wow! I kind of like it… WordPress that is. Like they say the world-famous five minute install is spot on. I might have even beaten that mark. So far, I have noticed that it’s really fast when compared to MovableType.... [Read More]

15 Comments

Sebastian said:

So... where can we download the plugin?

Fil said:

Kick ass Brad. I can't wait to "unleash" it!

roxanne said:

i can't read your website. The entire left column with content is displaying one word under the other!

ed nixon said:

This is great! Thanks.

A minor nit/question on syntax: the mixture of round, square and curly brackets?

I guess there is no way to try to standardize on one set. It seems to me one of those tiny little things that people will always be forgetting and screwing up and wasting time with. A small usability thing.

I like the period delimiter. I was trying to get Dean's attention a while back about that old war horse, Digital Standard Runoff (DSR). the troff/nroff tool on VAXs. It was my first text processing tool and it still rings with a lot of conmonsensical consistency and utility. In Runoff, the commands began with a period in column one and were terminated with a semi-colon. It was a very powerful utility and would have been a real boon for generating xHTML, etc.

Great work and thanks for squashing some angle brackets!

yowkee said:

I like MT-Textile, and it's great that Dean and you both working on the syntax. So we would have standardised Textile implementations. :)

Brad Author Profile Page said:

ed: Yeah, I know. Lotsa punctuation. But each serves a different purpose. The parenthesis for class/id, the brackets for language, the curly braces for doing style attributes. You can't just use one set of delimiters for everything or Textile may not know what you're really trying to do. It also makes it easier for the writer to see what is what.

Abe Fettig said:

It seems like the general idea of Textile is to use it for one-time HTML generation only. However, I can see situations where a user might want to go back and edit their document, and if they wrote in in textile they won't want to look at a bunch of machine-generated HTML. So for hep I'm planning to store the original textile document when possible. This means that I need a mimetype to associate with textile documents.

Do you have a mimetype already? If not, any suggestions? text/textile? application/textile? text/vnd.textile?

juegos said:

I like MT-Textile, and it’s great that Dean and you both working on the syntax. So we would have standardised Textile implementations

KO said:

Urls in blockquotes are not working in the beta.

Also, what if a blockquote has two paragraphs? Currently when using bq. if i put a two line breaks then the bq ends, so if I want two paragrapghs in the bq i have to manually put the tags, or use

around them. In the bq. tag,there needs to be a way to have paragraphs.

hlb said:

When will we get the final version of manual? I'm willing to translate it into Chinese!
Great work! =)

Todd Larason said:

Is format_inline intended to be a public interface? If I have some text that I don't want to be split into paragraphs (ie, the intended contents of a blog article's 'title'), is it legal to call format_inline() on it?

Tom Newman said:

Textile.pm works fine with perl 5.6.0 for me on
my home computer. But my hosting service is
running perl 5.004_04. perl -w Textile.pm gives
me:
/=[a-zA-Z0-9./])
# Match the leading part (proto://hostname, or just hostname)
(/: unmatched () in regexp at Textile.pm line 160.

I'd appreciate any help that would enable me to rewrite all such syntax to work with perl
5.004_04

Allen said:

There doesn't seem to be any way to center an image on a page. You can float either way, but not center.

That said... this rocks! I just discovered Textile yesterday and I think I'm in love.

Diz said:

First, the congratulions. Man, this is real good even for someone who knows XHTML. Second, the problem (lol).

I'm having failures at rebuilding. It gets to "Rebuilding entry: Individual" and doesn't change to "Rebuilding entry: Monthly" as expected.

I deleted every file of the plugin and now MT works fine, just like before. I wish I could tell you my Perl and Apache versions but I'm not so damn good at this.

Any idea?

lotta said:

hey. first of all, thanks for great plugins! I re-wrote the textile plugin a little since I wanted the acronym-tag to be applied to small letters as well as caps.

but, I'm not very into how to rewrite plugins so I wonder if there is a way to get for an example, the acronym-tag, to work with other characters exept a-z, like å, ä and ö. I tried, but didn't succeed. :)

About

This article was published on July 8, 2003 3:20 PM.

The article previously posted was Whither MT-Textile 2?.

The next article is Doing your whole site with MT.

Many more can be found on the home page or by looking through the archives.

Powered by Movable Type