Archives For markdown

My first book, PHP for the World Wide Web: Visual QuickStart Guide, came out about 12 years ago now (it covered both PHP 3 and 4!). In the dozen years since then, I’ve written 22 more books (including revisions), with three different publishers. About 2-3 years ago, I first started thinking about self-publishing a book, and as of Fall 2012, am finally doing so with The Yii Book. I occasionally get asked, probably by people that also want to self-publish, about the tools I’m using for writing and self-publishing this book: technically speaking, how am I doing it? The introduction to the book does discuss this, but as not everyone has purchased the book, I thought I’d write up my process.

Continue Reading...

Markdown and MultiMarkdown

January 8, 2011

I’ve recently (and finally) started using Markdown and MultiMarkdown, two excellent tools for writers. Markdown was created by John Gruber, in 2004. What it does is simple and brilliant: Markdown allows you to write using plain text, without a lot of markup or effort, and then export your writing as HTML. So instead of creating H tags, you can do just this:

# This is a Header 1
## This is a Header 2

To create emphasis, text is wrapped with one or two asterisks or underlines: Here is some *emphasis*. Here is more **emphasis**. You want to create a new paragraph? Just add a blank line. Simple! There are also ways to create lists, links, add images, and so forth.

You can learn the basics and the syntax at Gruber’s site, which also has an online tool, named Dingus, for converting Markdown text to HTML. What’s great about Markdown is there aren’t many rules to learn and you can write using it so easily. If you do a lot of writing that gets published online, like a blog, Markdown really lets you focus on the writing without spending too much time creating and balancing tags. Secondarily, text written using Markdown is easy to read, which means it’s also easier for the original writer to edit. If you work with a team of people on documents, there’s a lot to be said for Markdown as a format to use.

MultiMarkdown, which I haven’t used as much yet, is an extension of Markdown, adding features that Fletcher Penney, its creator, thought necessary. For starters, Multimarkdown lets you quickly create tables, footnotes and citations, metadata, definition lists, and more. More importantly (to me) MultiMarkdown can also be exported to more formats beyond HTML, because MultiMarkdown includes a tool that supports LaTeX. Through it, you can create PDFs, RTF documents, Word documents, and more. This means you can create entire books, PDF articles, and presentations using MultiMarkdown (along with HTML documents, of course).

I’ve been using Markdown for a couple of months now for my [intlink id=”2087″ type=”page”]newsletter[/intlink]. The newsletter gets sent out as HTML, but I write it as plain text. Not having to worry about the HTML, or even see it, as I do rewrite upon rewrite, speeds up the process tremendously. In a couple of weeks I’m going to begin writing a JavaScript book, to be self-published. For it I’ll use MultiMarkdown. By doing so I can export the final product as a series of HTML pages, to be published online, and as a PDF, to be printed as a bound or electronic book. I was looking for the best solution for my self-publishing ventures and I think MultiMarkdown will fit the bill nicely. (My previous inclination was to import plain text into InDesign, then do all the layout and formatting there. This would mean, for starters, that I’d have to learn InDesign.) For both my newsletters and the JavaScript book, I’ve taken to the Mac text editing application Scrivener, which has support for MultiMarkdown built-in (there’s a TextMate bundle for MultiMarkdown, too), which is a strong argument in favor of both Scrivener and MultiMarkdown.

Neither Markdown nor MultiMarkdown is something everyone needs, but if you do writing that needs to be published in HTML format, or in multiple formats, both are worth checking out.