rnkn / fountain-mode

Emacs major mode for screenwriting in Fountain plain-text markup
https://fountain-mode.org
GNU General Public License v3.0
391 stars 16 forks source link

export to typeset script to different formatting conventions (eg: for screen, for stage)? #96

Closed sten0 closed 5 years ago

sten0 commented 6 years ago

Hi,

I'm wondering if this is really display only, or if fountain-mode can output a script typeset to different conventions: "WYSIWYG auto-align elements (display only…screenplay, stageplay, or user-defined format".

Thanks! Nicholas

rnkn commented 6 years ago

Sorry I'm a bit unclear what you mean.

The auto-align feature is so you can write in the Fountain format but get a vague approximation of what a screenplay looks like within Emacs, e.g. a character element will appear to be prefixed with 20 spaces but the source file will not have those spaces (as per the Fountain spec). This changes if you change the script format, e.g. to "stageplay".

The export formats are very much separate. The export format templates (HTML, LaTeX, etc.) are currently aimed towards screenplays, but they are customisable with a little bit of effort, so it depends on what you're after.

What kind of different conventions do you want to achieve?

rnkn commented 6 years ago

Ah sorry, I was replying on my phone and didn't see your full issue subject says for stage.

As mentioned, in theory you could edit the LaTeX export template fountain-export-tex-template to typeset to stageplay conventions, but it would depend on your skill with LaTeX. Changing dialogue would be easy enough:

\setlength{\characterindent}{1in}
\setlength{\characterwidth}{4in}
\setlength{\dialogindent}{1in}
\setlength{\dialogwidth}{3.5in}

...however you'd need to create a new \newcommand for action, since it's just exported as body text.

Eventually the plan is to export directly to PostScript in Emacs (#70), which would allow creating a stageplay pretty easily, but this is a heavy undertaking and I can't promise when it will happen.

Luckily, if you write in Fountain you're not limited to Emacs; you will undoubtedly find an export tool that supports creating stageplay PDFs somewhere. (Unfortunately my export tool of choice, afterwriting, only supports screenplays.)

I hope that helps.

sten0 commented 5 years ago

Hi @rnkn,

So sorry it took me almost a year to reply! Last year gmail started unlabeling/archiving my incoming mail and it's taken me this long to find the time to either remember to look for old correspondances or to work through the thousands of hidden emails to find the ones that I need to follow up on.

Thank you for the fountain-export-tex-template tip; that sounds like it might do the trick, but I wonder if there is an easier way?

Have you considered using an intermediary format during conversion? Converting to RST as an intermediate format seems like it would be easier than implementing PostScript export, and while it's not as flexible as LaTeX it still has great support for destination formats. It supports hard page breaks for PDF export (https://rst2pdf.org/static/manual.html#page-breaks) and "frame breaks" (https://rst2pdf.org/static/manual.html#frame-breaks). Pandoc also supports this from what I can tell. I guess Pandoc might also be a decent intermediary format (with Lua filters), but a lot of people don't like it because its dependencies are extensive and heavy. That said, I've read that it supports raw TeX for more control over the output, which seems like it might be useful. A page-break related discussion is here: https://github.com/jgm/pandoc/issues/1934

Why all the talk about page-breaks? I think epub support that includes page numbers that match those used in the paper copy is a killer feature https://sketchytech.blogspot.com/2017/01/when-is-page-break-not-page-break-epub.html and http://www.robertdesprez.com/2013/04/05/controlling-page-breaks-in-an-epub-file, and recently I've frustrated with the amount of work it takes to format scripts nicely for my Kobo (eink ebook reader)... At any rate, being able to reference page numbers between paper/PDF and digital copies would be really nice to have. Also, afaict afterwriting doesn't support this.

Cheers, Nicholas

rnkn commented 5 years ago

The hard parts of the PostScript export are pretty much done with the page counting and element filling functions, it's just a matter of me finding the time to sew it all together. Once that's done you get stageplay exporting for free, since all the element formatting is done with Emacs text manipulation. The plaintext export is where half the work is done. The rest is page splitting.

Proper pagination is essential for production, and really even for sending out a script, because people will only ever say "on page 43, where James comes in...".

I have a Kobo too, and spent some time trying to reflow scripts into ePub or HTML or RTF... but in the end the best thing I found was to use pdfcrop to just crop down to the page's text body. The text was still small, but not uncomfortably so.

While I think I have an issue here for ePub export, it probably won't be something I'll implement. Tthe package is FSF now, so there's more chance someone with a better understanding of the ePub format will implement something.

sten0 commented 5 years ago

On Thu, Aug 01, 2019 at 06:54:15AM -0700, Paul W. Rankin wrote:

The hard parts of the PostScript export are pretty much done with the page counting and element filling functions, it's just a matter of me finding the time to sew it all together. Once that's done you get stageplay exporting for free, since all the element formatting is done with Emacs text manipulation. The plaintext export is where half the work is done. The rest is page splitting.

Brilliant, looking forward to it!

Proper pagination is essential for production, and really even for sending out a script, because people will only ever say "on page 43, where James comes in...".

Yup :-)