Totally rewritten version of MultiMarkdown in the works

12/04/2010 11:01:21

As I mentioned in a message on the mailing list, I have been looking into rewriting MultiMarkdown as a derivation of John MacFarlane’s peg-markdown.

I won’t go into all the details (read the original post), but the new version will offer a tremendous speed boost, and a bit more flexibility. Customization of LaTeX output will be much easier, though not quite as powerful by default. However, the current XSLT-based approach can always be used in the future.

The main downside (for the moment) is that it can be a bit trickier to install. The reason for this is the need to have glib2 installed. John MacFarlane used this library to allow for dynamic strings (that can be modified after creation). It is easy to use, but requires installing the entire glib2 library for that one feature. I am not an expert in programming in C, and could use some help in finding an appropriate workaround (custom routine, an alternate library, a way to embed the necessary parts?).

A big upside, once it’s been rewritten, is that the new version should be able to compile on any system. Once I remove the requirement of glib2, it should compile without any additional requirements. I should also be able to host pre-compiled binaries for Mac and Windows, if not Linux.

So, if you’re comfortable with the command line, and compiling software, I welcome you to take a look at the peg-multimarkdown project.

And any help is appreciated in solving 2 issues:

  • Adjusting the makefile to compile on any system, including 32 bit Mac OS X (I had to use an ugly hack)

  • Getting rid of the requirement to use glib2

Similar Pages

Old Comments

Wouldn’t a replacement for Gstring be C++’s STL?

Best wishes, Charles

I could be completely misinformed, but I believe that peg-markdown and peg/leg are basically ANSI C compliant, except for the reliance on GString. I think this means that if I could replace glib2 with something else ANSI C compliant, then the program could be easily compiled on just about any OS with basically no headaches.

Would the same thing be true of using C++ and STL? Or am I totally misunderstanding the whole problem from the beginning?

From Wikipedia:

“After years of development, the C++ programming language standard was ratified in 1998 as ISO/IEC 14882:1998. That standard is still current, but is amended by the 2003 technical corrigendum, ISO/IEC 14882:2003. The next standard version (known informally as C++0x) is in development.”

C++ might be slightly less portable than straight ANSI C.

Aren’t your choices just a few? If you want portability to iOS, you don’t want something like libglib2. You could write your own version (either cribbing glib code or not), or you could take something off the shelf. You could do it with Objective-C, but that would limit your portability. C++ is likely portable to any OS you’d want to use. Perhaps any more obscure 3rd-party solution would be a headache.

Best, Charles

Hi Fletcher-

Have you seen this?

http://www.and.org/vstr/comparison

HTH, Charles