Using Textile in Marked
A few people have asked how to get Textile working in Marked. You need to have a Textile converter available from the command line. There are a few options, including Pandoc, but the two easiest I’ve found are RedCloth for Ruby and Textile for Perl (requires that the Developer Tools be installed). Install one or the other:
- Install Textile from https://github.com/bradchoate/text-textile OR
sudo gem install RedClothin Terminal. - Set your preferences like this for the Perl version. Use
/usr/bin/redclothfor RedCloth.
Note: your install paths may differ. You can determine the correct path using which textile or which redcloth in the Terminal.
Now Marked is a Textile previewer for you!

Hey, and would there be a way to preview LaTeX in marked? That would so increase the number of buyers…
I’ll look into it, but it’s not likely with the current manifestation, I’m afraid.
Pandoc (http://johnmacfarlane.net/pandoc/) would be an option, as it reads every text format under the sun, and outputs to html (among others). Unforunately, support for it right now is really flakey (command line options aren’t passed for some reason).
If Marked could officially support Pandoc, it would make the product useful to many more people.
Just create a shell script with the necessary command line options and call that instead of calling Pandoc directly.
While simple, this program is actually quite useful! Do you know a MediaWiki command line parser?
There’s a Ruby lib called WikiCloth that would be a good start (http://code.google.com/p/wikicloth/), but I haven’t used it and I’m not sure if there’s a CLI for it.
Thanks. I’m not into Ruby, but putting together a CLI was really simple: https://gist.github.com/1085604 The parser is actually quite good, and even handles references in some cases, while not all.
At first I only got a blank window in Marked, but it was just a PATH issue. With some help from http://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x/3756686#3756686 I got it working.
A few other things that would be cool: – Allowing for different processors for different extensions (or remove the extension limitation altogether..) – enable copy/paste in the “custom markdown processor” text field in Prefs – an error message when the processor fails, not just a blank window
I’ve followed the instructions for adding textile to Marked, but I’m somehow not getting it to work. I verified at the command line that both the Perl textile application and RedCloth applications do the correct conversion. However, Marked only shows it as two paragraphs without the correct markup. I’ve verified that the paths to the two applications are correct, so I’m a bit lost at this point.
Thanks!
After ‘sudo gem install RedCloth’ I got.…
Building native extensions. This could take a while… ERROR: Error installing RedCloth: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb mkmf.rb can’t find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/RedCloth-4.2.9 for inspection. Results logged to /Library/Ruby/Gems/1.8/gems/RedCloth-4.2.9/ext/redcloth_scan/gem_make.out
As for Perl, that is a mystery to me…