vkbo / novelWriter

novelWriter is an open source plain text editor designed for writing novels. It supports a minimal markdown-like syntax for formatting text. It is written with Python 3 (3.9+) and Qt 5 (5.15) for cross-platform support.
https://novelwriter.io
GNU General Public License v3.0
2.05k stars 106 forks source link

Blank section breaks #972

Closed ben-albon closed 2 years ago

ben-albon commented 2 years ago

When building a novel project, I would like to separate sections using an empty line (as is the convention for soft scene breaks).

There seems to be no obvious way to achieve this with the existing UI. At the moment, if I enter nothing, or whitespace, into the Build Novel Project UI - then no separator is printed.

vkbo commented 2 years ago

You mean sections as in four ####? No, currently the section is just ignored entirely then. The empty line is reserved for scenes only, in order to not mix them.

Do want to use section headers to insert breaks mid-scene? The sections weren't really intended for this use. They were added so that you could mark a new invisible section where you could change meta data, like switching point-of-view character. Changing meta data requires a new heading. That's why the sections disappear entirely if the format is blank. It's the only way to hide them at the moment.

Multiple empty lines in the source text are concatenated on export, but you can force a break with "Insert > Page Break and Space > Vertical Space" in the menu. To ensure it works as you want, insert the break as its own paragraph. That is, add a blank line before and after.

I could change the section format to work the same way the scene format does, and instead add switches to hide them entirely. Then the user has a bit more flexibility in how they want to use them. This is how scene and section formats used to work, but I simplified the interface a bit when I rewrote the Build tool.

ben-albon commented 2 years ago

You mean sections as in four ####?

Exactly. I might be laying things out wrong, but I'm using ## for chapter breaks, ### for hard scene breaks (such as a change of POV), and #### for soft scene breaks.

Hard scene breaks are usually formatted as three asterisks (and this works fine), but soft scene breaks are usually formatted as an empty line. Right now I'm using a single (centred) period, but a few of my critique partners are reading that as a page break.

It might be that I'm mis-using the #### section break, in which case I apologise for the feature request!

vkbo commented 2 years ago

I don't do a lot of POV shifting, and if I do, I do it on chapter breaks, so I haven't given much thought to supporting a different flow. I added the ability to insert blank paragraphs to support such a flow though, but then it doesn't count as two scenes. But neither do section breaks.

The section breaks are really meant for blocking up your text within scenes for your own purpose, including shifting POV within scenes without a break (which isn't a very common case, but an interesting technique when used well). Anyway, this is why section headers can be taken out entirely.

I am happy to add better support for a soft/hard scene formatting distinction. I'm just thinking of the best way to do it. Both level one and level two headers have alternative formats which involves adding an exclamation point to the hash symbols.

I could solve this by adding a ###! as an alternative scene type that the author can use in such a way. As with #! and ##!, they would only affect formatting when building the manuscript. It is technically easy to do as well as most of the code ignores the distinction.

How does that sound?

vkbo commented 2 years ago

It occurred to me, after thinking about this for a bit, that having an alternative scene format doesn't really solve the issue in a satisfactory way. Whether something is a soft or hard scene break depends on the nature of the adjacent scenes, and isn't a property of a single scene on its own. The whole point of the project tree in novelWriter is that you can re-arrange scenes as you please.

How about I for now add the ability to make blank sections so that you can do it the way you do, and when I redesign the build tool I add a way to detect whether a scene break involves a change of POV or focus character? I could add the detection as an automated feature that can be overridden if it guesses wrong on individual scenes.

I plan to do a major redesign of the build tool for the 1.7 release. I have a bunch of ideas and feature requests for improvements, and adding a better way to distinguish between hard and soft scene breaks is easy enough to add.

ben-albon commented 2 years ago

I agree - I don't think that that an alternative scene format is quite what I'm looking for.

I've also been thinking about this, and it's quite likely that I'm over structuring my work. When I first sit down to write a scene, I like to lay out the key beats - and I've been using #### section headers to do this, but I can change to using % comments.

That being said - if you did add the ability to make blank section breaks would be really useful for me, as I wouldn't have to go through my whole novel and replace all the #### section breaks with [VPSACE] and % comments!

Re: the project tree, I find novelwriter's markdown approach to novel structure to be really clean, and it's one of the main reasons why I use novelwriter instead of scrivener or bibisco. I wouldn't want any change to compromise that.

Re: automated detection I don't know that I would want to have hard scene breaks tied to POV changes in this way. It's one thing to say that a POV change suggests a hard scene break (or a chapter break), but I wouldn't want a hard scene break mandating a POV change. Not all hard scene breaks mean there has been a change of POV (if that makes sense).

vkbo commented 2 years ago

Re automation, I only meant that the export tool would suggest which are hard or soft breaks based on a set of rules. The final decision would be up to you.

However, using sections in this way, to add a hierarchical layer of hard scene breaks over soft scene breaks, is also pretty logical. The point of the section header is to leave some structure up to the writer to use as is most convenient.

In any case, I'll reintroduce the "hide section" option that used to be in the first build tool. Leaving the format empty will then produce a blank line instead, just like for scenes. It's a very small change, and can easily be included already for the upcoming release.

vkbo commented 2 years ago

The code for this was still there in the exports, so I just added the options to the Build tool. This feature should be included in the next (pre)release.