The main job this should do:
- Reads Fountain (or a variant)
- Output to a beautifully formatted document for printing
Thoughts:
- Use an AST for the structure of the document
- Maybe adapt EarmarkParser to read Fountain
- What does the tricky bits of formatting?
- Writing directly to PDF seems forbiddingly difficult
- Maybe output to IDML?
- Better: write to a ConTeXt file
- The tokens contain snippets of HTML e.g.:
<span class="underline">
<br />
- etc...
- The parser fails on character names with accented vowels e.g.
MÁNLED
.- (Was an easy fix to the regex)
- When a metrical line is divided across lines from multiple characters!!!
Markdown-like language for screenplays
Typesetting system
https://wiki.contextgarden.net/Main_Page
A custom pandoc reader for Fountain screenplay markup.
https://github.com/pandoc/pandoc-fountain
https://github.com/htdebeer/paru
https://ctan.org/topic/drama-script
https://mirror.cse.unsw.edu.au/pub/CTAN/macros/latex/contrib/thalie/thalie.pdf
https://github.com/jonnygreenwald/fountain-js
Elixir-based Markdown parser & processor
Earkmark: https://github.com/pragdave/earmark EarmarkParser: https://github.com/robertdober/earmark_parser
Adobe's XML-based open format for InDesign
https://wwwimages.adobe.com/content/dam/acom/en/devnet/indesign/sdk/cs6/idml/idml-specification.pdf
Go-based tool for working with Fountain and 'Wrap' documents
- Combine scenes into a single file
- Strip pipe characters (with optional following space)
- Parse via pandoc-fountain and output to Pandoc AST JSON
Command should be something like:
pandoc -f fountain-stage-reader.lua script.fountain -s -f thalie.rb -t latex -o script.tex
pdflatex script.tex
pandoc -f fountain-stage-reader-reader.lua sample.fountain --to latex-thalie-writer.lua > out/sample.tex