... now with 35% more arrogance!

Wednesday, August 10, 2011

In Before The Lock

Blogger is going into read-only mode sometime today (and who knows how long that may last?) And I have some errands to run during the scheduled down-time. And I don't have much to say at the moment, because I'm mulling over some longer topics. So I'll just point to a post a couple days ago on Places to Go, People to Be that included a short comment and link about formatting with troff. I've never done that, specifically, but I've done the equivalent, which is to use Markdown in a plaintext document and then pass it through Pandoc to create HTML, RTF, or an OpenOffice ODT file (and ultimately a PDF.) Markdown's a good option, because you can force yourself to think about content and avoid the distraction of format and fonts until after you've got some work done. The kind of formatting you might *have* to insert while writing is mainly italics and bold, which is easy and intuitive when using Markdown: put asterisks around the word, exactly as I did around the word "have", with double asterisks for stronger emphasis. The other kind of formatting you might absolutely need to do is headers, which can be done by underlining a line with hyphens or equal signs, like this:
Chapter Title
=============
...or bullet lists or numbered lists, which are done in plaintext exactly how you'd expect them to be done, with an asterisk or number at the beginning of each line. There are other features in Markdown, but you don't absolutely need them, especially during the writing phase. You may need to put together tables, though, which is easier to do with Pandoc's extensions to Markdown and mostly just involves spacing data manually and underlining each column header, so again it's pretty easy to get used to. However, after some experience with formatting quirks, I think it's best to do each table as a separate text file and wait until later to combine all the elements.

Useful links:
  • Markdown's main site, in case you want to use it
    without using Pandoc.

  • Showdown, a Javascript version of Markdown, in case
    you want to try it out without installing Perl. I'm
    directing you to GitHub instead of the official site,
    because it looks like attacklab.net has been hacked by
    spammers.

  • Pandoc, for translating text files into other
    formats.
  • Edit to add a link to try Pandoc online; the default mode translates Pandoc's extended Markdown into HTML, which is what Showdown does, so this page is a good substitute.

2 comments:

  1. As a Perl programmer I'm embarrassed I didn't know about Markdown.

    And thanks for the link.

    ReplyDelete
  2. My pleasure!

    I love Markdown as a formatting technique. It looks the most like ordinary text, like you'd write on a typewriter in the pre-computer days, which means you can do a lot of decent formatting without concentrating on format.

    I found out about it via a simple commenting system written using PerlHP. The comments were formatted in a stripped-down version of Markdown.

    ReplyDelete