Adding additional output formats for Markdown?

Fletcher T. Penney fletcher at alumni.duke.edu
Wed Jul 27 21:53:53 EDT 2005


If this response is a bit long, it's because I actually have a day
off tomorrow, and had time to think about this tonight. It is not
intended as a rant. ;)


On Jul 27, 2005, at 9:55 AM, John Gruber wrote:


>

> I think you're mixing apples and oranges here. You're building both

> an extension to the Markdown syntax *and* you're building a

> publishing tool.

>

> It's a fine idea to build a publishing tool based on plain text

> files, where each file has a defined structure of one or more

> metadata headers at the beginning, followed by a blank line,

> followed by Markdown-formatted text (or, in your case,

> Markdown-plus-extra-stuff-formatted text).

>

> But I think it's a mistake, or at least an unnecessary conflation,

> to include the headers as part of your syntax itself. The

> Markdown-ish syntax should only apply to the prose itself.

>

> Most of my use of Markdown is in Movable Type, but there's a reason

> why there's nothing MT-specific in the Markdown syntax itself.

> Whereas in your project, the syntax is implicitly tied to your

> specific publishing model.


I disagree (or perhaps we are looking at it differently). I am
trying to do the opposite. Every (almost) use of Markdown involves
some form of explicit or implicit metadata - Movable Type documents
have a title (url), they have an author, they have a date of
publication, modification, etc. Some of this data exists, but cannot
be accessed, and some of it is understood, if not actually defined
(you are understood to be the author of Markdown formatted page on
your Movable Type website, even if it is not shown on the page
somewhere).

Similarly, if you reformatted a Markdown text file as a pdf, the
author would be the same, but perhaps the title you would want might
be different. Or the date of publication. Or the url.

Blosxom specifically has a meta plugin to handle this sort of
information. Movable type as the MT-Meta plugin. They are not
intrinsically compatible (I believe - I haven't used blosxom in a
year or two, and don't use MT)

For me, my dream for Markdown would be to use it as the default
syntax for most of my text-ish documents - weblogs, wiki pages,
academic papers, readme's for my software, etc. A single Markdown
document would likely end up becoming a variety of different kinds of
documents, each of which would have a different means of specifying
the title, author, etc.

By defining a standard way of (optionally) including that information
within the document (in much the same way that a printed email, or a
piece of business correspondence includes the sender, recipient,
date, and possibly a subject), you can the use that information in
whatever way is appropriate for a given output format.

The example document on my website includes metadata for author,
title, date, and keywords. All of the data is used to form the
metadata for the pdf. The title is used to create the title in the
XHTML header for the XHTML version. The utility of this is self-
evident.

By "stick[ing] with the Markdown philosophy", I mean that the reason
I continue to choose Markdown over other syntaxes is that I like the
way it looks. It is easy to remember, and easy to interpret when you
are reading "raw source." I feel like the example of metadata I gave
is also inherently readable. Any individual implementation of a
Markdown application is free to ignore it ( I understand that it is
not, and may not ever be a part of the official Markdown syntax, and
therefore would not exist in order to be parsed out. ;) But for
"Markdownish" programs that use it, many new opportunities are opened
up.

The headers would not be interpreted by the Markdown Parser in any
way, if that is what you meant by:


> The Markdown-ish syntax should only apply to the prose itself.


I do not envision lists, or code blocks, etc within the metadata.
Straight text only.

As for:


> Whereas in your project, the syntax is implicitly tied to your

> specific publishing model.


That is exactly what I am trying to free Markdown from. Currently,
you cannot use a single Markdown text file to generate a LaTeX pdf
with a title page _AND_ an XHTML web page with a title without human
intervention. With my program, you can do this, and much more. The
metadata, and the rest of the document, can be used for any type of
document creation one would like. And if (big if) the meta-data was
part of the official syntax, then other tools would be free to ignore
it. In any case, no one is required to include metadata in the
source document.

Markdown was originally designed (per your website) as a tool to
assist in crafting valid (X)HTML. I understand this. But the syntax
could be used for much more, and from searching the archives, I am
not alone in this desire or in creating tools to try and make it
reality. I really like the pdf format, and would like to be able to
type a file in "Markdown-ese", and have it automatically converted to
a pdf using my favorite LaTeX style. With MultiMarkdown (or whatever
it should be called), this is a trivial problem. A single shell
script can convert a single Markdown text file to an unlimited
variety of output formats without any human intervention.

A weblog entry could be downloaded as a pdf, or an ebook, or an RTF,
or whatever. "The possibilities are endless..." ;)


>> Please let me know what you think. (Also, John (and anybody else) if

>> I have incorrectly used any code, or stepped on toes - please let me

>> know!!!)

>>

>

> What you've done is perfectly acceptable given Markdown's licensing.

> I don't really think it's a great idea to fork the formatting syntax

> in the ways you're proposing, but I don't have a problem with it

> either.

>

> -J.G.


Like I imagine others (eg Michel Fortin) would like, I would love to
have a single standard version of Markdown that incorporates these
features, just as I would like to have standardized support for
tables. My goal is not to define "the" format for metadata. Nor to
insist that you have to change your vision of Markdown.

It is simply to point out that with one simple addition, the utility
of Markdown is greatly enhanced. And, yes, I am aware of the trap of
incremental feature bloat and love Markdown's simplicity. If no one
else out there wants to use these features, then I can easily
continue to hack my own copy of Markdown and use it as desired. But
I wanted to bring the example up for demonstration and discussion in
case others were interested.

And as always, feedback is welcome!

Thanks to anyone who actually read this far,

Fletcher


--
Fletcher T. Penney
fletcher at alumni.duke.edu

An intelligent man is sometimes forced to be drunk to spend
time with his friends.
- Ernest Hemingway


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3949 bytes
Desc: not available
Url : http://six.pairlist.net/pipermail/markdown-discuss/attachments/20050727/603dd648/smime-0001.bin


More information about the Markdown-Discuss mailing list