Zim

Comment 6 for bug 495898

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: [Bug 495898] Re: [Request] Markdown syntax support

On Sun, Mar 4, 2012 at 6:35 PM, Christoph Zwerschke <email address hidden> wrote:
>
> I agree that Markdown syntax should be supported, and actually replace
> the current DokuWiki based syntax. Here are some reasons:
>
> * MarkDown is much more wide-spread and well-known
> * MarkDown syntax is usually easier to type, e.g. *bold* instead of **bold**
>
> * MarkDown's syntax is closer to the way people format "ASCII" text anyway
> * MarkDown was developed for being both easy-to-read and easy-to-write, so fits very well with Zim's collapsed edit/view mode
> * MarkDown is better supported as a source language by Pandoc
> * MarkDown has mechanisms for escaping for special characters

Yes all excellent arguments. But please explain how to deal with
features that are missing in markdown.

See the discussion here:
http://groups.google.com/group/pandoc-discuss/browse_thread/thread/7b13743028bc5932/813ac3c57bf9832d?lnk=gst&q=zim#813ac3c57bf9832d

Open issues & questions:

A) How to deal with underline / mark formatting ? Now rendering as
bold, which is acceptable for the time being

B) How to deal with indented paragraphs in zim ? Now ignoring any
indenting, because it would turn paragraphs into verbatim in markdown

This is a very difficult one to solve, since the "indent for verbatim"
rule markdown makes it completely incompatible with any natural syntax
for normal indented paragraphs.

Note that zim made the same mistake early on, but we fixed it by
introducing quotes for verbatim. I don't imagine we could convince the
whole markdown community to do the same ?

C) How to deal with image properties, like setting width and height ?

D) How to deal with with tags (and in the future anchors) ? For now
will just put them in as plain text

E) How to deal with inline objects ? (This is a future feature being
tested, allows plugins to do custom rendering for a block of data.)
Probably can re-use syntax for verbatim with code highlighting
properties - e.g. ask to highlight as "x-zim-plugin-foo". This will be
transparent as verbatim text if not supported.

In summary: the zim syntax was designed specifically to support zim's
feature set, markdown is not. Supporting markdown for export is one
thing. But using it as native format means it needs to be compatible
with all zim features.