MultiMarkDown to Latex XSLT loading problem

I’ve upgraded a test version of my phd dissertation project to Scrivener 2 and receive the following error when compiling MultiMarkDown --> Latex:

“warning: failed to load external entity “XSLT/dissertation.xslt”
cannot parse XSLT/dissertation.xslt”

I have a customised MultiMarkDown in ~/Library/Application Support/MultiMarkdown/ containing dissertation.xslt, and to do tests, I tried moving that file into the application bundle’s copy of MultiMarkDown with the same error.

The compile settings have a meta-data entry for “LaTex XSLT” = dissertation.xslt

Building the same project in Scrivener 1.54 still compiles. Are there any MultiMarkDown / Scrivener notes I should read to set up Scrivener 2 to do the same thing?

When I remove the meta-data entry for “LaTex XSLT” in v2, the LaTex file compiles, but without all the niceness I’ve customised.

What version of MMD is bundled in Scrivener 2? Can we use custom installations in the same way as 1.54?

I’ve attached the dissertation.xslt in case there is something obviously wrong - weird it works as planned in 1.54. I’ve also customised 6x9book.xslt and memoir.xslt (dependencies of dissertation.xslt) - just adding boilerplate text and making some document directives, nothing radical.

Kind regards, Ian Grant
dissertation.xslt.txt (9.66 KB)

“Cannot parse…” error doesn’t happen when the XSLT cannot be loaded or found, but when the file is correctly found, but it generates an error in the course of attempting to convert your document with it. Whenever you get bugs like that that you can’t sort out, it’s best to not try to one-shot it, and instead compile to MultiMarkdown plain, and analyse the file that Scrivener is generating. I’d do that for 1.54 and 2.0 and compare them side-by-side. 2.0 does do some things differently, and it might be some setting is on that you weren’t expecting and it is causing the XSLT to glitch.

Hi, thanks for the reply. Two steps works, but something is different in Scrivener 2 it seems.
Compiling to MMD with Scrivener 2 then using Textmate to convert to latex, then building works as expected.
I’ve diffed the XSLTs and can’t see any obvious differences. I also diffed the MMD exported from v1.54 and v2 and they are both the same. Somethings definitely choking Scrivener 2.
Regards, Ian

I’ve hit the same issue here. It happens even when I select a single document which contains one sentence and no formatting. Gah.

As a test, I ran the compile with the memoir.xslt. That worked fine.

I then copied and renamed memoir.xslt as memoircopy.xslt. Didn’t open it, didn’t change anything else. When I ran the compile with that as the Latex XSLT it choked - same message.

That, to me, suggests there is something other than the content of the xslt involved. But of course, there may be something completely other going on which is utterly beyond me.

Right. I think I have this licked:

  1. Renamed the Application Support/MultiMarkdown to Application Support/MultiMarkdown_old.

  2. Downloaded latest version of MMD (2.0.b6) and installed into a new Application Support/MultiMarkdown.

  3. Copied my customised XSLTs from MultiMarkdown_old into Multimarkdown.

  4. Ran compile using the customised XSLTs.

  5. Compiles without a hitch.

So it looks like it’s not something in the XSLTs but some incompatibility between Scriv 2.0 and the older (2.0.b5) version of MMD.

The main thing is that it works and that I don’t have to tinker with those XSLTs again.

Thanks for posting a follow-up MrGruff. I meant to respond to this thread with exactly the advice you ended up taking. The new version of Scrivener addresses the latest MMD system, which has been altered from the old system in terms of command line calls. So if you are having random problems using custom workflows or XSLTs, definitely try upgrading MMD (or removing it and using Scrivener’s built-in version) and see if that solves the problem.

Another thing you’ll need to watch out for, if you haven’t upgraded MMD in a long while and have written custom XSLTs, is namespacing. The old version let you just match whatever you wanted, like “h2”. These now need to be namespaced to HTML specific, like “html:h2” so.

Thanks for the tip… I installed new MMD on new laptop and used it for the first time today. My old custom xslt was producing the very odd output of just the “backmatter” comment and the end bit. I added in the html: prefixes to the templates, and it worked.

I only wanted to make a one-line difference to the memoir.xslt:


I made that change and saved as a new file, memoir-harvard.xslt, in the same multimarkdown folder of the application, and got the errors described above.

when i made the same change direct to memoir.xslt without saving it as a new file, however, it seems to have worked fine. This has left me confused!