All right, I have tinkered enough!
I have attached ‘ebook.xslt’, which you should place in ~/Library/Application Support/Multimarkdown/XSLT right next to the other xslt-files.
In Scrivener you can set the header and/or footer image through the MultiMarkdown Settings panel. Add a ‘Headerimg’ and/or ‘Footerimg’ as the key and on the right fill in the name of the image. You don’t have to use the extension, as LaTeX will search for appropriate files apparently. As far as I know .jpg, .png and .eps will all work.
In the settingspanel also set the key ‘Latex XSLT’ to ‘ebook.xslt’
Once you have finished your document (remember to use Multimarkdown markup ) you can compile and export to LaTeX. Make sure you place the image(s) you want to use in the same directory as the resulting .tex file.
Use whatever you use to convert the LaTeX file to PDF.
I personally use TextMate because I can easily edit MultiMarkdown files in it and convert them to LaTeX from there, should I ever run into problems.
Should you want to use ebook.xslt but don’t want to use a headerimage, I recommend changing the following line either in ebook.xslt if you want to use it always, or in the resulting .tex file:
For a no headerimg document change it to:
(or something else if you like that better)
Slightly lowering this will make the resulting document look better.
Also, pay attention to the following line:
You can remove this without problems. I put it in because I found quite a few ebooks that would start the first chapter at page 1, but reading it in a PDF-reader would show that was page 4 (or 5 or 6) and any reference to another page got a bit messed up, due to the unsynchronised pages and page-numbers. For a table of contents, you need to run whatever you use to create the pdf twice, normally. After the first time you can check the actual page the first chapter starts on page 4 or not (sometimes the table of contents will overflow onto the next page, so keep that in mind when you have lots of chapters and sections and such). You can change the number 4 to any other number to fit the actual pagenumbering or remove it completely if you don’t mind the unsynchronised pages.
ebook.xslt.zip (2.93 KB)