I am new to both Scrivener and MMD3 (still working on trial version of Scrivener). I have read the MMD 3 and Scrivener manual for last two days and am still trying to understand the XSLT.
I read some similar posts below, but my main problem is the one with MMD 3 where it changes \ to $\backslash$. My workflow that I want to have is Papers2->Scrivener->TextMate->PDF, but I can’t get the Papers2 to insert the citation in MMD format (it can only insert in \cite{} format). I am aware that I can bypass the problem by putting , but this really makes the writing more difficult and I wonder if there is a way to get around it.
I noticed that MMD2 (that came with Scrivener) does not have this issue, so I looked into the XSLT that came with Scrivener and in ~/Library/Application Support/MultiMarkdown/XSLT folder. Since I read that Scrivener reads the ~/Library/Application Support/MultiMarkdown/XSLT folder if it exist, I changed the clean-text.xslt file in that folder but it does not change a thing. I changed the meta-data (LaTeX Mode, LaTeX XSLT) option when I compile, but it does not seem to make the problem go away.
Can anyone please help me with this one? I like Scrivener very much so far and this is the only problem I am facing. The temporary solution is to use MMD2 to avoid putting command so many times, but my feeling is that there’s gotta be a way to have the same convenience in MMD3 as well.
I looked at the /usr/local/bin folder to see if I have mmd2tex-xslt, but I couldn’t find while I saw the rest (mmd, mmd2odf, mmd2opml, mmd2pdf, mmd2tex and multimarkdown). Also the terminal command mmd2tex-xslt does not work while the same command line with mmd2tex does.
Does anyone have any insight on my current situation?
I really appreciate your help.
The attached is what I put in the meta-data field. The clean-text-allow-latex.xslt file is located in ~/Library/Application Support/MultiMarkdown/XSLT
Hi jinster, not sure if this is still an issue for you, but by default MMD3 does not use XSLT at all. If Scrivener supported regular expressions, you could auto-html-quote citations during compile automagically, but we’ll have to wait for Scrivener 3 for that IINM.
BUT Scrivener 2.x using MMD3 does call mmd2LaTeX.pl and I imagine you can edit that to run a regexp replace to fix the citations before multimarkdown gets called?
Or just keep using the default MMD2 until Scrivener officially supports MMD3
I don’t think we need to wait until Scrivener has native MMD3 support.
I have a similar issue with pushing a few tags through MMD to Latex, but I’m going to experiment with using replacements in the compile settings.
A replacement of W/m2K with should give me the right units in Latex.
Using replacements will also make the text in Scrivener slightly more readable than having the raw Latex in it, which is one of the goals of MMD.
In the OP’s case I could see it might need two replacements as the content of the { } will change, which makes me wonder if setting up two simple replacements:
\ to
would automatically comment out the Latex? Although the closing } might need to be tweaked to stop crazy things happening mid-expression. Say }^ or something else equally unlikely.
In Complie solves the OPs simplest problem IINM. Regular Expression would still make this much more flexible (so one could convert Endnote <->Bibtex references for example).