Let me start off by saying I understand Scrivener is not intended as a formatting tool, like Vellum is. We’re looking for an answer to several specific, but related problems. They all relate to paperbacks.
- Sub-section title on one page, opening paragraph of section on the next.
- Embedded image on one page, image caption on next page.
- Bullet points split across two pages.
It’s a combination of Keep With Next (KWN) and Do Not Split… is that a thing? The key is it’s not paragraphs I want to KWN, it’s a mixture of elements of different kinds.
My question is this… is there ANY tool out there which will do this stuff automatically? We’re having to add Page Breaks manually and that means they all need to be checked whenever we revise the book.
@nontroppo is the local expert on LaTaX (https://www.latex-project.org/) and Pandoc (https://pandoc.org/), so with any luck they will be along to advise soon. In the meantime, have you looked at the Scrivener project version of the Scrivener manual (https://www.literatureandlatte.com/learn-and-support/user-guides)? You can download it (scroll to the bottom of the “Select Format” drop-down), and it would give you an idea of what can be done to format a Scrivener project.
Edit: you might want to take a look at @nontroppo’s Scrivomatic page: https://github.com/iandol/scrivomatic.
Pandoc dmg installed okay…
chas$ gem install pandocomatic
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
You may need to run gem under sudo, with the gem folder being located in global /Library. It’s something I have to do on Linux, but I don’t recall ever having the need to do so on Mac (maybe Apple changed things in 10.15? I don’t know, I’ve never upgraded to it).
Before you waste too much time installing different componenets: Keep-with-next is not natively supported by Pandoc. But as it knows about the document structure, if the target output supports some form of KWN mechanism, then a Pandoc filter may be able to insert the RAW commands to enable that. What output formats can you use? This will define the possibility or not. But each format deals with document structure in different ways. LaTeX normally automates “optimal” layout, though there are packages to help you to override the default layout. If I had to make books from Scrivener, I would be tempted to use HTML + CSS for publishing via PrinceXML: princexml.com/doc/prince-for-books
Personally I find CSS more understandable for layout, LaTeX is like the dark arts in comparison, though there are packages to do almost everything for you and impressive outputs (like Scrivener’s manual!)… You need to decide what your output will be, and what workflow you are able to support.
On a simpler question, to force a page break in different outputs, you can use the latex command \newpage and a Pandoc filter can convert this into the equivalent code for HTML/EPUB/DOCX/ODT: github.com/jgm/pandoc/issues/1934
Thank you… I’ll check that out.