-:78: parser error : internal error
30 September 2009 18:23 Just back from town and I can’t believe my luck a
^
-:78: parser error : Extra content at the end of the document
30 September 2009 18:23 Just back from town and I can’t believe my luck a
^
unable to parse -
I assume this is using MultiMarkdown? You’ll probably get more luck in the MMD forum, so I’ll move this there, where the resident MMD experts will hopefully be able to give you some help.
Initially I disregarded the strange character at the front as being part of a bad paste, but now that I look at it again that might be the issue. What do you have at the front of this line? Is it some kind of bullet or something? For me it just shows up as the standard I-Don’t-Know Unicode symbol. I’d try to find this line in Scrivener and delete whatever is in there or replace it with the matching entity code if you want to keep it.
Thanks a million!
It’s interesting isn’t it - to quote Ronseal “If you do what it says on the can - it does what it says on the can…”
I did some fishing round and looked at the Multimarkdown site fletcherpenney.net/multimarkdown/faq/ and guess what, when I checked the text in Text Wrangler somehow a red “¿” had worked its way into the text…
No Idea how.
A further salutary lesson I have learned is in mixing text which is dragged and dropped in from websites into my writing - boy does it carry nasties which need sorting in TeXShop! I know, I know I should have dropped it into the Research folder… However, using Text Wrangler and the appropriately named “Zap Gremlins” option under Text and then pasting back into Scrivener, does the trick.
With a 170 page document to sort aren’t I sorry I didn’t take notice of the label!
Still if it helps anyone out there…
Thanks again for you prompt response, and for a brilliant product.
Hi Amber,
Sorry I haven’t replied; been away for a while.
Your modification sounds a good idea as it has happened again - trouble is I might need a bit of a hand hold here - eg. how would I ‘modify the mmd script’?
My question reveals my level of competency so please feel free not to engage,I am more than willing to learn - but life may be too short for you to teach!
Many thanks again for helping me sort the initial problem.
Kind regards,
Robert
Not a problem. You’ll first need to get an updated version of MultiMarkdown and install it on your computer. Instructions for doing so are located here.
Once you have that set up, open up [b]~/Library/Application Support/MultiMarkdown/bin/MultiMarkdown/Support[/b] in a text editor. Scroll down until you find the subroutine ProcessMMD2LaTeX (it’s around line 60 for me). Down near the bottom of this section you’ll see a bit of code like this:
if ($os =~ /MSWin/) {
$xslt = "| xsltproc -nonet -novalid XSLT\\$xslt_file -" if ($xslt_file ne "");
$MMDPath =~ s/\//\\/g;
open (MultiMarkdown, "| cd \"$MMDPath\" & perl bin\\MultiMarkdown.pl | perl bin\\$SmartyPants $xslt | perl Utilities\\cleancites.pl $out");
} else {
$xslt = "| xsltproc -nonet -novalid XSLT/$xslt_file -" if ($xslt_file ne "");
open (MultiMarkdown, "| cd \"$MMDPath\"; bin/MultiMarkdown.pl | bin/$SmartyPants $xslt | Utilities/cleancites.pl $out");
}
The important part of that comes after the [b]else[/b], everything above is for Windows users. The next to last line (which starts with “open”) will need to be altered. I’d copy the line and comment one of the duplicates out so you have a backup of the original method. The result should look like this:
# open (MultiMarkdown, "| cd \"$MMDPath\"; bin/MultiMarkdown.pl | bin/$SmartyPants $xslt | Utilities/cleancites.pl $out");
open (MultiMarkdown, "| cd \"$MMDPath\"; iconv -c -f utf-8 -t ASCII//TRANSLIT | bin/MultiMarkdown.pl | bin/$SmartyPants $xslt | Utilities/cleancites.pl $out");
If you know anything about UNIX, it should be fairly clear what is going on here. This line in Perl just sets up a string of pipes, and we’ve inserted the Unicode cleaner at the very front of the process so that everything downward from that point is sanitised.
Naturally, this fix will only adjust LaTeX output. If you want to adjust other output forms for MMD, you’ll need to make similar adjustments to the other subroutines.
Thanks again Amber, I have a deadline approaching so need to crack on a bit - will look at this when I have more time. I really do appreciate you help.
Kind regards