Home Link

Hello, my name is Brett Terpstra, and it’s nice to meet you. Elegant solutions to complex problems. Curious?

Using Textile in Marked

Using Textile in Marked Tagged:

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:

  1. Install Textile from https://​github​.com/​b​r​a​d​c​h​o​a​t​e​/​t​e​x​t​-​t​e​x​t​ile OR sudo gem install RedCloth in Terminal.
  2. Set your preferences like this for the Perl version. Use /usr/bin/redcloth for 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!

9 Responses to “Using Textile in Marked”

  1. Hey, and would there be a way to preview LaTeX in marked? That would so increase the number of buyers…

  2. Dan Michael says:

    While simple, this program is actually quite useful! Do you know a MediaWiki command line parser?

  3. Dan Michael says:

    Thanks. I’m not into Ruby, but putting together a CLI was really simple: https://​gist​.github​.com/​1​0​8​5​604 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/​q​u​e​s​t​i​o​n​s​/​1​3​5​6​8​8​/​s​e​t​t​i​n​g​-​e​n​v​i​r​o​n​m​e​n​t​-​v​a​r​i​a​b​l​e​s​-​i​n​-​o​s​-​x​/​3​7​5​6​6​8​6​#​3​7​5​6​686 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

  4. Chuck McKnight says:

    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!

  5. Steffan says:

    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…

Leave a Reply

Comments may use standard Markdown formatting


Notify me of followup comments via e-mail. You can also subscribe without commenting.

Entries (RSS) and Comments (RSS), or Subscribe by Email