piersdeseilligny / betterfountain

A screenwriting app integrated into visual studio code
https://marketplace.visualstudio.com/items?itemName=piersdeseilligny.betterfountain
MIT License
359 stars 54 forks source link

Feature Request: Page Breaks in Live Preview #191

Closed cyniphile closed 1 year ago

cyniphile commented 1 year ago

I often use page count as a heuristic for timing the length of scenes, pacing, etc. but there are no page breaks in the live preview, so I have to sometimes export it to pdf over and over. Not an expert in TS but perhaps I could implement myself with a little direction.

piersdeseilligny commented 1 year ago

Hi @cyniphile, thanks for the feature request! Unfortunately this isn't really currently possible: all the page layout calculations are done as part of the PDF Rendering process - the live preview is designed to give a fast real-time approximation of the layout, at the cost of accuracy and more complex aspects of the layout, such as when to insert page breaks.

However to help you out a bit there's always the statistics panel, which includes page length as part of the stats: image It's not real-time, but you can quickly refresh it with the Refresh button in the bottom-left, which changes whenever the statistics are out of date, rather than re-rendering a PDF: image

Hope this helps at least a little!

cyniphile commented 1 year ago

I feel like given this information, simple roughly accurate page breaks could be inserted, even if they are just dotted lines. For example, if you have a screenplay that's X lines long and is roughly Y pages, you could put a break every X/Y lines.

I use the stats panel for the overall screenplay, but sometimes I'm working on a scene and want to see how many pages it takes up.

piersdeseilligny commented 1 year ago

I'm not sure how that would be from a UX perspective, because users might assume that's where the line breaks are definitely going to end up, rather than seeing them as an estimate, even if it's just dotted lines (and it also won't be great to figure out length if the scene starts in the middle of a page).

I do appreciate the need to be aware of the length of a scene though. What would you think of a hover, such as these?

Which could contain extra information like

Duration (estimate):
    - 3½ pages
    - 00:03:15 
Characters:
    - BOB (5 lines)
    - ALICE (2 lines)
cyniphile commented 1 year ago

That could work pretty well. This would pop up on the betterfountain outline sidebar?

Side note: so far I don't find much use for the live preview, as it slows down VSCode a bit and also doesn't really do formatting accurately enough (or show page breaks) to be useful for it's main purpose (showing formatting).

Side side note: I find the extension overall EXTREMELY useful so thanks again for making it!

piersdeseilligny commented 1 year ago

It could pop up when you hover over a scene in the sidebar, or over a scene title in the screenplay :) and thank you for the kind words!!

cyniphile commented 1 year ago

For my part, I've found a work around. I made a fork that doesn't prompt for "are you sure you want to overwrite?" on pdf export. I then export occasionally with one keybinding, and my vscode pdf reader automatically refreshes with the changes. Works pretty well except I have to manually scroll the two windows to keep them in sync.

On Wed, Feb 8, 2023 at 4:00 PM Piers Deseilligny @.***> wrote:

It could pop up when you hover over a scene in the sidebar, or over a scene title in the screenplay :) and thank you for the kind words!!

— Reply to this email directly, view it on GitHub https://github.com/piersdeseilligny/betterfountain/issues/191#issuecomment-1423231437, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKA3AAD3QOHLXX4Y5DR6TTWWQCNRANCNFSM6AAAAAAUFS4KFA . You are receiving this because you were mentioned.Message ID: @.***>

piersdeseilligny commented 1 year ago

That's actually wouldn't be a bad workflow, especially if the PDF Reader was integrated into betterfountain, without the need to save/read an actual pdf file. It could also be approximately synced to the current page (if the versions are up to date), and automated to refresh on save, just like the stats page is... Hopefully this should make it into the next release ;) image

piersdeseilligny commented 1 year ago

Fixed by the PDF Preview feature in 1.12.0