I’ve flipped some switch or other in the MMD, Export or Scrivener preferences while wrestling with the MMD export sensitivities and, while I’m succeeding in getting it to parse as I’m led to expect now, I’m getting a piece of text – (null) – in the first line of the of the exported file.
Can any of you MMD gurus help me with this please? I thought it might have to do with gaps in header levels, but I don’t think that’s it. But I could be convinced I’m wrong about that.
Thanks for your help.
First, something to try to eliminate a possibility. Export the draft from Scrivener, but choose the basic MultiMarkdown exporter. Do not use any of the conversion routines. This will simply create an MMD file and the actual MMD scripts will not be touched. This file is useful for archival and bug testing. Open that up in a text editor and see if there is a (null) in the file. If there is, then Scrivener is causing the bug. I’m guessing you’ll see it there, because “(null)” is how Cocoa expresses null values, whereas Perl expresses null values by simply outputting nothing.
If it is there, do this: In the Export Draft window, press the “Save…” button that is near the bottom and save your current settings. Then press the “Load…” button and load something like “Default - Novel Standard…” You’ll want to make a few changes, no doubt, such as the actual export format, but try to keep the changes as minimal as possible. This is just to test and see if the (null) still comes up with a default export profile.
But if I’m wrong, and there is no (null) in the source document, some questions:
Do you have MMD installed in your user Library folder, or are you using the built-in copy that came with Scrivener?
Have you messed with either one’s source code?
Something to try: Download a fresh copy of MMD from the MultiMarkdown site. Just unzip it and copy that directory into ~/Library/Application Support. If you have already have one installed there with modifications, obviously you’ll want to rename the old one first so you do not lose your changes.
Run the export again in Scrivener. It will use the new version you just installed. If you still get the same thing, I’d recommend contacting Fletcher for further tech support. He can be reached at the same site where you downloaded MMD, or on the Google group.
Many thanks, Amber. That’s one professional post you made. And it helped.
I got to the vanilla MMD export phase and discovered the ‘(null)’ string in the meta-data segment, in XHTML Header:
I had been frustrated by the style code that is, by default, written into the HTML document; it was over riding a bunch of stuff I was trying to customize in some external sheets.
I understood Fletcher to write in the online documentation that you can get rid of that internal style code by defining a blank XHTML Header in the MMD settings window. I did that and Scrivener, I guess, was outputting (null) in that spot.
I added a space character to the XHTML Header: value and the (null) has disappeared.
I think that’s got it. Thanks again. …edN
Curious problem. Well if you can still duplicate the (null) bug, Keith would probably appreciate seeing the settings that you are using. Probably easiest to save the export settings and send them via email.
I agree re: the styling. When we were coming up with the initial conception for Scrivener+MMD, it was presumed, at the time, that people would like to drive the basic font look from the export palette. That way a user would not need to be familiar with CSS at all if they simply wanted to change a body paragraph font. I think in principle it is a good idea to convert the export font settings to CSS – but I do wish it was a bit easier to disable for the users who have the knowledge to create their own CSS, and indeed probably already have their own all set up and attached to the MMD file with the CSS meta-data field… To me, that little checkbox at the top of the Formatting tab seems as if it should toggle whether or not Scrivener places its own XHTML Header tag.
Anyway, at least there is a way to do it; it just isn’t very intuitive!