eBook Creation With Scrivener

Does anyone use Scrivener for eBook creation? I know I can use Compile & Print then save as PDF but I can’t seem to get the chapters formatted correctly (ie, a new chapter starts at a new page).

Also, I cant figure out how to add a header/footer image on every page of the book.

Are there any guides for using Scrivener for actual eBook creation and formatting.

I love scrivener for writing and I would love to be able to use it for eBook creation.

Thanks everyone!

In the Compile Draft window, under ‘content’, check the box in the first column after your chapter-name. It says ‘Pg break before’ (so every chapter will start at a new page)

The header/footer image is beyond the scope of Scrivener. You may want to export to a .doc and fix that in Pages/Neoffice/Word.
You may be able to do it in LaTeX, but I have too little experience with it (and it has been a while) to be sure you can.

hope this helps,


You can do pretty much anything in LaTeX. The question isn’t whether something is possible, but whether you want it badly enough to tolerate the necessary level of pain and suffering.

IIRC–and it’s been a very long time-- setting up headers and footers in LaTeX is pretty easy. Incorporating an image is probably only a matter of showing LaTeX where to find the appropriate file.


Hmm maybe I should look into this. It’s been a few months since I seriously looked into LaTeX, but I do remember figuring out at some point how to add an image to the chapter number. Don’t know how exactly (I’d have to go and find those files) but it did work just by adding 1.png and 2.png to the same directory as the LaTeX file itself. I’m guessing that creating a header/footer image would also simply require them in the same directory.
Hmm… maybe I’ll look into this.


Thanks for the help guys! I will definitely look into these options :slight_smile:

I found a way to put a small image in the header / footer by using LaTeX. The basics turned out pretty easy, I had done most of the research / work when I wanted to add an image based on chapter (cause my boyfriend said ‘Wouldn’t it be cool if your book had images at the start of the chapter? Just like those old children’s books!’ and I couldn’t let that one slide).
I’m still fine-tuning, but if you’re interested and willing to do a little funky stuff like creating your own XLST file (not that hard really, you can mostly copy an existing one or perhaps I can upload mine).




I’m definitely interested :slight_smile: I appreciate it!


I’ve done most of the fine-tuning, could you let me know what image you’d want in the header/footer? Mostly the width-height in pixels, but if you want to attach it (or anything with the same size) to this post, that would work too.

I have assumed that you’d still want chapters to start on a new page (leaving previous page partially blank) and because it’s an ebook I’ve set the page-numbering to right on all pages. I can easily change this though.

With the image I can easily make an example pdf and describe the process of making it.



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 :wink: ) 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.

Anyway, enjoy.

ebook.xslt.zip (2.93 KB)

Thanks for putting this together! I have copied this topic over to the MultiMarkdown section as it will be a useful resource for people looking there. If you wish to make further posts, please post over there. I’m locking this thread.