Markdown - Footnotes - MultiMarkdown


(Andreas Grimm) #1

Thanks for implementing Markdown-support in TBX v.7.2.

Markdown - Footnotes

However, the Preview seems not be able to display Markdown-footnotes.

Markdown - Multimarkdown

Is it possible to render the Preview instead of “just” Markdown as MultiMarkdown as well … which automatically takes care of the footnote-feature missing from plain Markdown-Preview-Rendering.

Ideas?


(eastgate) #2

Just put the path to your MultiMarkdown script into $HTMLPreviewCommand in the Markdown prototype and you’ll be set.

(Are footnotes part of Markdown per se? I don’t see them here: https://daringfireball.net/projects/markdown/syntax)

(ed: corrected attribute name above)


(Andreas Grimm) #3

Thanks, @eastgate. Works well. (Though I just had to figure out not to look for $PreviewCommand but for $HTMLPreviewCommand.)

And you’re right: Original Markdown comes without footnotes. Only extension enhanced versions do.


(David Bertenshaw) #4

Andreas,

Where do you get the multimarkdown script from please?

I have Scrivener and MultiMarkdown Composer and Marked 2, all of which work fine for MultiMarkdown, but I don’t actually know where the underlying command/script is, so what is it exactly that I have to point to in $PreviewCommand please?

Thanks!


(Paul Walters) #5

If you have Multimarkdown installed or have been using other Markdown editors, you’re like to find scripts here

/usr/local/bin

with names such as

markdown
mm2gv
mmd
mmd2all
mmd2odf
mmd2opml
mmd2pdf
mmd2rtf
mmd2tex
multimarkdown

BTW, scripts do not have do be markdown parsers. You can use LaTex or similar parsers. I’m not sure pandoc would work, but you can try it too.


(David Bertenshaw) #6

Thanks for the reply Paul.

There’s actually nothing relevant in /usr/local/bin, but in the end I went diving into the gnarly depths of the Scrivener app.

For anybody else in this position (i.e. you want to use multimarkdown not markdown) the following works if you’ve got Scrivener installed: change the value of $HTMLPreviewCommand in the Markdown template to point to /Applications/Scrivener.app/Contents/Resources/MultiMarkdown/bin/multimarkdown.

$HTMLPreviewCommand='/Applications/Scrivener.app/Contents/Resources/MultiMarkdown/bin/multimarkdown.

Thanks again.


(Andreas Grimm) #7

Thanks @PaulWalters.

Using markdown.pl and multimarkdown.pl is self- explanatory in this context.

But could you kindly explain what Preview-Output one is supposed to get once using mmd2RTF.pl

Because all I get seems to be “gibberish”.


(Paul Walters) #8

Well, that “gibberish” is raw RTF code – as the parser’s name implies, it converts “multi-markdown to RTF”. So you get

{\rtf1\ansi\deff0 {\fonttbl {\f0\froman Times New Roman;} {\f1\fswiss Arial;} {\f2\fmodern Courier New;} } {\stylesheet {\s0 \qj\sa180\f0\fs24 Normal;}

I should have been explicit:

  1. The scripts are not necessarily useful, they just happen to be what various programs including Multimarkdown install.
  2. They are not installed by macOS.
  3. The names say what the scripts do – experiment and see which ones work. YMMV
  4. If you use the built in “Markdown” prototype that Mark included in Tinderbox you’ll get $HTMLPreviewCommand pointing at

'/Applications/Tinderbox 7.app/Contents/Resources/Markdown/Markdown.pl'


(John Sidiropoulos) #9

Pandoc works! Some examples are the following:

MediaWiki to HTML:

/usr/local/bin/pandoc -f mediawiki -t html

LaTeX to HTML:

/usr/local/bin/pandoc -f latex -t html

Thank you very much, Paul, for the Pandoc suggestion and of course Mark Bernstein for implementing such an impressive feature!


(Andreas Grimm) #10

@johnsidi could you give an example of some mediawiki/latex/markdown notes in Tinderbox that you successfully converted to html using pandoc in $HTMLPreviewCommand?

Or did you even get pandoc to work displaying those mediawiki/latex/markdown notes within Tinderbox in Preview-Mode?

Thanks in advance


(Andreas Grimm) #11

Meanwhile, I can happily report back that it, indeed, just works as described by @johnsidi here.

Thank you, John, and thank you @eastgate! This is HUGE!


(John Sidiropoulos) #12

In the following screenshots you can see how Pandoc converts expressions written in MediaWiki and LaTex to HTML which you can preview instantaneously on the Preview pane of Tinderbox. Generally, it works really well. Only some Latex symbols and equations cannot be converted by Pandoc.

As a result, for the first time I can write, preview and store my notes written in multiple markup languages using only one program, the amazing Tinderbox! I have never expected this to be a reality! :slight_smile:

  • MediaWiki

  • LaTeX markup

  • Multimarkdown (using /Applications/Scrivener.app/Contents/Resources/MultiMarkdown/bin/multimarkdown)

For rendering mathematical expressions in Multimarkdown you just need to add the following line at the beginning of a note and be connected on the internet.

 

If you want to see clearly all the examples please click on the images or download them because the images are very tall.


Tables in Notes & Markdown
(Paul Atlan) #13

Thanks for this @johnsidi, very useful.
The multi markdown preview works wonders with me, except for the maths part. I’ve added the script call to MathJax at the beginning of the note but it doesn’t seem effective as the Math at the end is rendered as plain text.
Is there a toggle in TinderBox to activate scripting calls?


(Paul Atlan) #14

SOLVED
It seems the MathJax repository you were using has been deactivated. Following the recommendations on the MathJax website I used this line, which works for me:


(Andreas Grimm) #15

How does one install MultiMarkdown on mac OSX? I kindly ask for your help.

I used to have everything set-up. But after a clean mac OSX install everything is gone.

So I installed MacTex lite, pandoc, MultiMarkdown-Composter … but nothing shows up in /usr/local/bin/ except pandoc and pandoc-citeproc … but nothing PaulWalters was pointing at in this post by @PaulWalters

on my entire machine I don’t find anything like that:

markdown
mm2gv
mmd
mmd2all
mmd2odf
mmd2opml
mmd2pdf
mmd2rtf
mmd2tex
multimarkdown


(Andreas Grimm) #16

Meanwhile I figured out where to find sort of an “multimarkdown.pl” although, of course, it is not an .pl, exactly.

'/Applications/Scrivener.app/Contents/Resources/MultiMarkdown/bin/multimarkdown'

These things are hard to come by these days.

Still looking for a resource that explains well how to install MultiMarkdown and having it system-wide available. Or am I just completely mistaken?


(Andreas Grimm) #17

@johnsidi Can use pandoc to convert markdown html (in order to preview the markdown written text within Tinderbox’ Preview) or is one supposed to use a dedicated multimarkdown-converter like the one you chose from Scrivener?


(Paul Walters) #18

Get MultiMarkdown here.

(Google is a wonderful invention :sunglasses:)


(Andreas Grimm) #19

You’re so right, again, @PaulWalters. I googled down the rapid hole … searching for this

Thank you for being so patient.