Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: PDF Formatting Using Layout Language (maybe FDXT?) #181

Open
anthonyjoeseph opened this issue Oct 16, 2022 · 1 comment

Comments

@anthonyjoeseph
Copy link

anthonyjoeseph commented Oct 16, 2022

I'm a huge fan of this project and I use it constantly!

I'd like to be able to export a pdf laid out as a stage play rather than a screenplay

After some googling, I came across this blog explaining how to do this in Final Draft - blog post

This uses a file called DramatistsGuildModernStageplay.fdxt, a layout encoded as xml

Final Draft has a library of these .fdxt layouts, which are downloadable - docs

Maybe it'd be possible to extend betterfountain's custom font support to support more layout features like margins, sizes, positioning etc via FDXT

My day gig is typescript development, would a PR for something like this be welcome?

P.S. maybe rather than something proprietary like FDXT, some open-source layout language already exists? An analog where .fdx:.fountain :: .fdxt:fountaint maybe? Maybe this should be developed?

@anthonyjoeseph anthonyjoeseph changed the title Feature Request: PDF Formatting Using Templating Language (maybe FDXT?) Feature Request: PDF Formatting Using Layout Language (maybe FDXT?) Oct 16, 2022
@piersdeseilligny
Copy link
Owner

@anthonyjoeseph thanks for opening this issue, and apologies for the late response!

BetterFountain defines the PDF layout in the print.ts file (that's how the differences in printing layout for a4 and letter formats are defined), so that might be a good place to start a potential PR on this.

I'm open to translating fdxt layouts, but I doubt complete interoperability would ever be possible, so it might make more sense (and especially be clearer) to use a JSON file, that could extend/inherit the PrintProfile already selected in the settings (a4 or letter).

Then the question is what the best way of doing this is... My first guess would be something like having a JSON file sit alongside the .fountain, maybe with a .bflayout extension or something, and then we can define a set of rules defining when this sidecar file is used and when it's not (based on filename). But there might be better ways of doing this, let me know what you think!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants