I consider myself a fairly advanced Scrivener user, but it’s only recently that I started using MMD to output my writings in LaTeX. This works incredibly well, but I have run into a few issues - one of them being special characters. I typeset using XeLaTeX, which should support unicode characters, including ü ö é å and the like. However, when compiling to a LaTeX file, the output looks like this:
I suspect this has something to do with the encoding, as the output file is standard TeX Western Roman and not utf-8. Any suggestions how to solve this?
Is the Latex file coming out as Western Roman? What about the intermediate MMD? (That is, could you check the encoding of both the MMD->Latex file and an MMD file? That could help isolate the step.)
How do I check this? Just to be clear, I compile directly from Scrivener, and get the .tex file as result. Is there a way to access the intermediate MMD file in any way?
Compile just an MMD file. So where in compile it says “MMD->Latex”, just do the “MMD” option. That’ll produce the intermediate file that MMD uses to make your Latex file.
Sure. Just tried to do that, and the intermediate file is indeed encoded in Western Roman. Is it supposed to be this way, and is there any way to change this?
That I am less sure about. I would at thus point post in the support forum of mail Keith directly. If there is not an option, it would be helpful to those who work outside a western alphabet atmosphere.
What are you using to verify the encoding of the .tex file? I just did a test compile of a .tex file and a raw .md file, and both were UTF-8, as verified in TextWranger and TextMate. The above advice is accurate: best way to test if Scrivener is working right is to use the regular “MultiMarkdown”. All of the other choices introduce thousands of external variables as they execute MultiMarkdown for you. The first option does not invoke MMD at all, and is 100% a product of Scrivener.
After playing around with this issue, I think I found some sort of solution to the problem. In TextEdit I changed the default encoding for opening and saving plain text files from “Automatic” to “UTF-8”. Now all MMD and TeX files compiled by Scrivener appear as UTF-8 files with utf-specific characters rendering fine in all applications that I open these files in. Thanks for your help with issue, AmberV and napaxton!