Yesterday I sat down to put some of my old screenplays online. Screenplays have a very specific format – monospaced fonts, fixed directions for margins, etc. Unfortunately all those rules are for paper and if there’s one thing I really don’t plan on doing, it’s distributing my writing on dead trees. But I still wanted to put my work online and have it look like a screenplay.
When I was taking my creative writing class last semester I used LaTeX to output nicely formatted PDFs to submit and I wrote directly in LaTeX. Though PDFs are great for class submissions and printing I’m very much an HTML fanboy when it comes to publishing online. Unfortunately LaTeX doesn’t seem to export directly to HTML. That’s understandable, HTML still has a way to go before it supports all the beautiful typographic nuances that LaTeX is capable of. There are some LaTeX-to-HTML converters out there, but I couldn’t them to compile on my Macbook. Instead of trying to debug the compile process I threw some regexes at the existing LaTeX source and turned it into fairly semantic hypertext.
HTML is a flexible markup language, but there was some abuse of existing HTML elements involved in coming up with a structure that worked for screenplays. Each piece of dialog becomes a section tag and I’ve really abused the header and paragraph tags. If you can come up with a more semantically “correct” interpretation, I’d love to see it. Anyways, the translation went quickly and with some CSS the result isn’t bad, in my opinion. I converted one of my shorter pieces and put it on my website, if you care to take a look. The whole process took about half an hour including fiddling with regexes and CSS.
So much for taking a LaTeX screenplay and translating it to HTML. But what about writing a screenplay for the web first? By way of inspiration, Stories and Novels is a beautiful site that features complete stories and novels in a beautiful web format (as well as Kindle editions). I’d love to see something similar for screenplays. Now admittedly, people don’t usually read screenplays the same way they read novels or stories, but who’s to say that once the trend starts it won’t pick up (and it would be a interesting experiment regardless)?
Of course, writing HTML (or any form of XML) by hand is not something I would wish on my worst enemy. It’s ok when working on a design and layout but I’d rather not write entire screenplays (or stories or novels or even blog posts) in HTML by hand. Recently, lightweight markup languages such as Markdown and Textile have become popular. They’re designed to be easily converted to HTML and they feel natural to write in. Maybe we could come up with something similar for screenplays? Sounds like an interesting weekend project, I’ll let you know how it goes on Monday.