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

Support for include workflow #92

Open
rnkn opened this issue Apr 2, 2018 · 6 comments
Open

Support for include workflow #92

rnkn opened this issue Apr 2, 2018 · 6 comments
Labels

Comments

@rnkn
Copy link

rnkn commented Apr 2, 2018

Hi Piotr,

There's an addition to the Fountain spec for including external files, similar to a LaTeX compile. I'm not sure that it has become official yet, but is part of Highland, and I've added it to Fountain Mode. The syntax is a modified version of Mountain:

{{ include: FILENAME }}

where FILENAME is relative to the current file, and recursive, so that a master file could have:

{{ include: Act 1/Act 1.fountain }}

And then Act 1.fountain could have:

{{ include: Prison Break.fountain }}

where Prison Break.fountain is within the Act 1 folder.

Sound like something you'd like to implement in afterwriting CLI?

@ifrost ifrost added the pdf label Apr 2, 2018
@ifrost
Copy link
Owner

ifrost commented Apr 2, 2018

It doesn't seem to be part of the official spec but I like it! I think everything that makes writer's life easier is worth adding :) Thanks!

@rnkn
Copy link
Author

rnkn commented Apr 2, 2018

Great! Yeah I'm not really sure what's happening with the official spec, John has been adding things to Highland 2 for the past couple of years without any additions to fountain.io so I'm not sure if he intends these to be just for a .highland format or not.

@rnkn
Copy link
Author

rnkn commented Jan 11, 2020

Dear Piotr,

I'm considering removing a bunch of features in the next major version of Fountain Mode, chief among these being the Emacs-based export functionality, and relying only on external tools (e.g. your lovely CLI program).

I'd want to strip any writing feature not supported by exporting. This include workflow would be one of them.

Personally I never use an include workflow, and tend to this this could be better achieved by e.g. concatenating the Fountain source file within Emacs and feeding that to the export CLI. I also think this feature would be cumbersome in the afterwriting web UI. But I wanted to get your opinion — do you think this feature is vital for working in Fountain, or better to leave it to history?

@ifrost
Copy link
Owner

ifrost commented Feb 16, 2020

I think "include" could be useful for some writers. The feature probably makes sense only on desktop though so it doesn't need to be supported by all tools (e.g. web based). How about handling it as a special comment/boneyard for example: /* include: path/to/file */- this way apps which don't support this feature couldn't simply skip it without affecting the output.

@rnkn
Copy link
Author

rnkn commented Feb 17, 2020

I ended up removing support for {{ include: FILE }} in Fountain mode. It caused a bunch of annoying edge cases like messing up the heading hierarchy, page counting, etc. and I don't think writers want to see curly code braces in their scripts.

This was more of an issue when I was parsing the buffer into an AST for export, but anyway, Emacs already has a builtin command insert-file, and given that none of the export tools support it, I figured best to ditch it.

I think Mountain had the right idea from the start: just make these notes:

# ACT I

= Meet the **Hero**.

[[include: intro.fountain]]

# ACT II

# ACT III

## Finale

[[include: the-end.fountain]]

AFAIK no export tools currently have the option to print notes in the PDF, but some are considering this, so not exactly the same as comments, but at least going with notes allows people to keep using Mountain if they like, and currently won't cause any problems with export tools.

@rnkn
Copy link
Author

rnkn commented Aug 29, 2021

I actually use Makefiles for this kind of workflow these days, so for the sake of housekeeping if I was the only person wanting this you can safely close if you like.

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

No branches or pull requests

2 participants