Writing with Markdown and Textile   Post2PDF

I do a lot of writing for the Web. Articles for various Web sites, blog posts, and content for sites that I maintain. Over the last year or so, I’ve changed the way in which I complete many of these tasks. And it’s not the way you might think.

How do I do it? Using a text editor and a couple of lightweight markup languages (sometimes called humane text formats).

Curious? Then read on.

Why not use a word processor?

bad_html.png Word processors have their place, but they’re definitely not HTML editors. If you’ve ever saved a Word or OpenOffice.org Writer file as HTML you’ll notice that the HTML isn’t clean. By clean, I mean a lack of superfluous junk in the file; something that word processors like to liberally toss in. Like code to set the appearance of the document, extra information in the top portion of the file, and more. If you look at the image to the left, you’ll see the ugliness of a word processor file that was converted to HTML. All that additional cruft adds considerably to the size of the file, too.

Anyway, as you might recall from a few previous posts, there are times when I like to use minimalist tools to write. Writing blog posts and Web articles are a couple of those times.

Use HTML or plain text, instead

HTML, if you didn’t already know, is the formatting language used on the Web. It consists of a set of tags that tell a browser how to display the parts of a Web page.

I’m very familiar with HTML — I’ve been working with it for about 12 or 13 years. But I’m also lazy. I don’t like adding HTML tags manually. Sure, I could use an HTML editor that enables me to add tags with a click of the mouse, but I find that disrupts the flow of my work.

Plain text, like a word processor, has its place. But not when you’re dealing with Web content. You’ll have to add markup eventually. And even if you write your blog posts in plain text and then copy them to your blog, you might still need to add formatting and links.

Enter Markdown and Textile

Markdown and Textile refer to two things: simple languages that enable you to add formatting to a document, and small programs (called scripts) that convert the formatted documents to HTML.

While you can use Textile online, you can also download a version that will run on your computer. To use it, you need to install some additional software called Python. To use Markdown, you need to install a piece of software called Perl. That’s all kind of geeky, though, and can be a bit daunting (as I’ll discuss a little later).

I first toyed with Markdown and Textile a couple or three years ago. And to be honest, I wasn’t overly impressed with them. At the time, I just couldn’t see the point. But after trying them again, Markdown and Textile have grown on me.

Note: Throughout the rest of this post, I’ll be using the words Markdown and Textile to refer to both the syntax and the conversion tools.

How I use them

For the most part, I use Markdown and Textile to write content for the Web. I also generate other documents (especially PDFs) from the files that I write, but not too often.

With articles and similar content I write, convert, and send the resulting files off to the publication. Or, I drop them into a page or article template and post it on one of the Web sites that I maintain.

As for blog posts, I’m not always connected to the Internet. Using Markdown and Textile, I can quickly write multiple posts and convert them to HTML. When I’m back online, I just copy and paste the posts into WordPress and publish them. It’s quick and it’s simple.

All of this sounds like a lot of extra work, but it isn’t. I found that syntax used with Markdown and Textile was easy to learn, and I can write quickly using either. The conversion to HTML only takes a few seconds.

Why both, and not just one?

My main reason is that Markdown is simpler to use, but lacks some Textile’s features. Markdown is great for writing simple Web documents, articles, and (mainly) blog posts. Textile, on the other hand, enables me to add tables and even format text using Cascading Style Sheets. That’s especially important for the content that I post on my sites.

One isn’t better than the other, in my opinion. Markdown and Textile are complementary, in my view.

Good for me, but maybe not for everyone

I’ve got Markdown and Textile installed on all three of my laptops. I’m comfortable using them, and have at least two editors that play very nicely with both.

Some people may not want to subject themselves to the very shallow learning curve required to become proficient with Markdown and Textile. Others may not want or be comfortable with installing the software engines that Markdown and Textile require (although, as I mentioned earlier, you can convert Textile to HTML on the Web).

I’ve found, though, that using Markdown and Textile mesh nicely with my writing flow. I can still write quickly and efficiently, and adding formatting is pretty seamless. Even with the conversion to HTML, I save a lot of time writing with Markdown and Textile.

Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.

Comments

Thanks for the breakdown!

Leave a comment

(required)

(required)