When I posted a link to the Nurse Jackie screenplay earlier this month, someone left a comment asking for help with formatting screenplays for the Kindle.
I am always up for a challenge, at least until I grow bored or frustrated, so today I tried to figure out a solution. What I finally came up with is a bit convoluted, but hopefully it lays the groundwork for others to figure out more elegant solutions in the future.
First, I just played around with sending pdf, html, and txt files to Amazon to let them convert it to see what happened. The results were not good. I did a search online for advice on conversions and saw someone mention using FinalDraft–something about how you can set up the style guide with that program and export a correctly formatted document that can then be used by the Kindle.
Well I’m not paying $$$ for FinalDraft obviously. Instead, I remembered an open-source and free-as-in-beer alternative, Celtx. I figured I’d try that. It’s available for Windows, Apple, and Linux platforms.
Next, I went to a website that has html versions of screenplays and downloaded a sample script. (Note that I didn’t try any pdf documents–someone else will have to try that, as I’ve exhausted my curiosity for this problem today.)
Finally, I relied on Calibre, another free software, that manages ebooks for a variety of devices. It also handles conversions.
Once I had all the raw materials–html version of screenplay, Celtx screenplay formatting software, and Calibre ebook software–I started experimenting.
Summary for the technically inclined: Import in Celtx, export as html, replace CSS code in exported doc with this code (modify as per your tastes), import into Calibre, convert to MOBI, send to device.
- In Celtx
html.txt version of a screenplay (see the special note in the dashed box above)
- export it as html
Why? Because by doing this, you get Celtx to replace whatever formatting the original document used with a consistent set of CSS mark-up tags, which is important to have in order to get the Kindle to display the formatting properly.
- Open the newly exported html file in a simple text editor, e.g. WordPad on Windows XP, or in a real HTML editing application (note that fancier editors like Microsoft Word may hide the html code from you, and really really simple editors like Notepad may do the same)
- delete ALL the current CSS style code — everything between <style type=”text/css”> and </style> — from the top of the document (make sure you don’t actually delete the “style” tags as well)
- paste this CSS code instead
- save the file
- In Calibre
- Import this new html file (or drag and drop it into your list of documents and it will be copied over automatically
- Highlight the file in the Calibre list by clicking on it once
- Click the big “Convert E-books” button at top of screen
- Click “Page Setup” and change Destination profile to Kindle
- Hit Okay
- Wait for hourglass in the bottom right corner to stop spinning
- Right click the file name in the Calibre list
- Select “Send to device”
That’s it! It probably looks more complicated than it is, because I’m trying to include enough detail here for beginners to use these instructions.
I experimented with the CSS style code for a while until I got something that worked for me, but I noticed a couple of weird issues with it:
- The Kindle seems to ignore right-side margins
- Although I used percentages in the CSS style code, hoping it would scale appropriately when different text sizes are used, it doesn’t seem to work that way. The CSS I settled on looks good when the text display size on the Kindle is at one of the smallest two settings, but on the bigger settings the left-side margins start to get really obnoxious. It’s a puzzle to me.
And finally, here are two things I noticed that you should be aware of:
- The final version will only be as good as the original screenplay you export from Celtx. If the formatting isn’t correct there, clean it up there and make sure everything’s standardized before exporting it. Otherwise, the CSS markup tags won’t be used correctly throughout the document.
- You can change that CSS code to whatever you want. If you don’t like the margins I chose, simply play around with the CSS code before you import the file into Calibre for conversion. The primary three areas you’ll want to play with are marked p.character, p.parenthetical, and p.dialog. Also, I stripped out a lot of other CSS code to make this simpler; it’s possible you can customize the code to include far more elaborate mark-up rules, so long as you always reference the tags that Celtx uses.
(Photo: Vikki Heartbreak)