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

Suppress scene header at start of build output #1756

Closed
Tracked by #1269
awqk opened this issue Mar 13, 2024 · 5 comments · Fixed by #1759
Closed
Tracked by #1269

Suppress scene header at start of build output #1756

awqk opened this issue Mar 13, 2024 · 5 comments · Fixed by #1759
Labels
build tool Component: Exports or the build tool enhancement Request: New feature or improvement next release Note: Features planned for next release

Comments

@awqk
Copy link

awqk commented Mar 13, 2024

The non-existence of a text paragraph before the scene header should be enough to block scene headers/headings.

In my use case (short story), I do not want either level 1 or level 2 headers, because pandoc and the docx template already take care of title, author etc. The document is built from "standard markdown" build output, prefixed with a yaml metadata block.

Admittedly, this is nothing serious, only a minor annoyance.
Related: #1704,#1711,#1716

@awqk awqk added the enhancement Request: New feature or improvement label Mar 13, 2024
@vkbo
Copy link
Owner

vkbo commented Mar 13, 2024

That's fairly easy to fix. Currently the flag to skip next separator is set to False initially, set to True when a level 1 or 2 heading is encountered, and set to False after a level 3 heading has been processed.

All that is needed for your use case is to set it to True initially.

Text paragraphs have no impact on separator decision any more, so with or without initial text, the separator will be skipped. Only a level 1 or 2 heading will cause a skip as it is now.

@vkbo
Copy link
Owner

vkbo commented Mar 13, 2024

Another option that could solve such a use case is to add a switch to hide partition and chapter headers from the output. Same as for scene and section. That way you can add the headings if you want to, but just not include them in the output.

I can add both options really. This could be useful for other cases as well.

@vkbo vkbo added this to the Release 2.4 Beta 1 milestone Mar 13, 2024
@vkbo vkbo mentioned this issue Mar 13, 2024
28 tasks
@vkbo vkbo added build tool Component: Exports or the build tool next release Note: Features planned for next release labels Mar 13, 2024
@awqk
Copy link
Author

awqk commented Mar 13, 2024

All that is needed for your use case is to set it to True initially.

This sounds like it would be enough. It's unlikely to break other things, with the benefit that it works out of the box without needing any user interaction.

[...] add a switch to hide partition and chapter headers from the output. [...]

I can add both options really. This could be useful for other cases as well.

I can't think of another use case, though it would add some symmetry to the build dialog.

@vkbo
Copy link
Owner

vkbo commented Mar 13, 2024

I can't think of another use case, though it would add some symmetry to the build dialog.

For partitions, there definitely is a use case. I create partitions for each act in my story. They are useful to have in the drafts, but maybe not in the final manuscript.

For chapters, maybe less so. Although you can write chapter-less novels. Terry Pratchett did it all the time. It is still useful to have the option to add such headers as separators for the project tree, even if they're not actual chapters and you don't intend to include them in the manuscript.

@vkbo
Copy link
Owner

vkbo commented Mar 14, 2024

I implemented the feature yesterday, and I think it completes the settings page, even if hiding chapters is probably not going to be used often. The others are more relevant.

image

vkbo added a commit that referenced this issue Mar 14, 2024
@vkbo vkbo linked a pull request Mar 14, 2024 that will close this issue
6 tasks
@vkbo vkbo closed this as completed Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build tool Component: Exports or the build tool enhancement Request: New feature or improvement next release Note: Features planned for next release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants