New functionality related to MMD and LaTex

I figured that the help and questions section would be a better place to post my question and to make a more coherent attempt at what I’m wondering. I previously posted a question on the release notes, but will likely delete it. Drafts 15.2 (iOS) Released:

I’m curious about the LaTex support. I spent some time playing around with some things related to LaTex to try to figure out what is supported and how to use the support, but I’m not able to exactly figure it out.

Question

Would it be possible to use LaTex and a saved .bib (Documentation around BibTex, and Flecher’s documentation with it’s use in MultiMarkdown) file with my reference entries saved in it, call the citation key and potentially have it generate a bibliography and or in-text citations for me using the new functionality? I was playing around with it trying to figure out how I would do it, but not having much luck.

Background

I do a lot of my academic writing in Drafts. I have to hand right the citations and reference list entries because I’ve struggled finding an iPad app that is also a good reference manager and does the things I’d like on iPad even if they do it on the Mac (see Mendely, Readcube Papers, EndNote). I just want to be able to generate the reference list entries (and maybe the in-text citations) in Drafts. I then usually export my writing as HTML and post it into my forums for my university. Works great, but currently I have to write it all out and just do it markdown and convert it. If I could pull the citations that would be awesome, but understand that might be beyond the scope of this.

1 Like

And, while we’re at it, can someone post a minimal LaTeX draft?

The “new functionality” is just syntax highlighting for blocks of LaTex embedded in MultiMarkdown using the delimiters supported by the MultiMarkdown extensions. It treats them like code blocks, essentially. Drafts has always had the full MultiMarkdown parser (currently v6.4) embedded and supports scripting output to other formats than HTML with the MultiMarkdown scripting object.

Honestly, I don’t know much about how it’s used in some of these more advanced processing formats, so may not be much help on how these things all tie together in a typical publishing flow.

I tried just the brackets the other day and didn’t get LaTeX formatting out of it - not that I know LaTeX.

I guess I could just delete the metadata lines, one by one, until it stops working… :slight_smile:

… but asking the question seemed a better way.

So the minimal I got to work was:

<script type="text/javascript"
                src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
 </script>
An example of math within a paragraph --- \\({e}^{i\pi }+1=0\\)
--- easy enough.

And an equation on it's own:

\\[ {x}_{1,2}=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a} \\]

That's it.

I’m wondering if it’s possible to swipe MathJax.js or if it takes in a load of other parts.

If so one could paste it into a javascript action and invoke it against the current draft.