I searched for the word “conditional” and saw a thread about conditional compilation. However, my question/suggestion may be different.
Is there – or could you add to the wish list – the ability to have conditional inclusion based on whether one is publishing for PDF vs. for EPUB or MOBI?
I ask because I “single-source” my new books such that I use the same Scrivener project to export to PDF (for paperback publishing), to EPUB (for Google Play, Kobo, and Nook), and to MOBI (for Kindle).
However, when I am about to export, I have to checkmark and uncheckmark certain items depending on the target.
For example, I might have a page with a hyperlinked URL that I want included when the target is EPUB or MOBI, and I would have a separate page with the non-hyperlinked version of the URL when the target is PDF, given that PDF is destined for paperback publication and I don’t want underlines on printed URLs.
As another example, I might have a blank-page document (Is this the right word?) that I want to follow as the backside of a section-heading page in the paperback but I DON’T want to follow when the section-heading page is in a MOBI file.
There are other examples, but you get the idea, I hope.
My question/suggestion is about the ability to mark a document in a Scrivener project such that I am indicating with the marking that it should be auto-included for a certain target file format (e.g., PDF) and should be auto-excluded for all other target file formats (e.g., EPUB and MOBI).
There is an option (on the Mac version; I’m away from my Windows machine so can’t check if it’s in there yet right now, but if not it’s coming) to choose a “Front matter” folder to be inserted at the start of the text being compiled, precisely so that you can have different front matter for different formats. Back matter will be coming in the future. You can also filter out documents containing a certain label or status, so that would be another way to do it, too.
Windows currently supports front matter; it does not have the option to filter by keyword, etc. but if you don’t depend on the binder hierarchy for formatting (i.e. if you don’t use different formatting for items at different levels in the binder), you could compile a collection rather than the Draft or a subgroup of the Draft, and the collection could then be built off a keyword or label search.
I think all of the things you are asking for will eventually become much easier, based on the planned features for compile:
- There will be a filtering function which can either define the compile group entirely or exclude from the compile group based on a list of items. You will be able to use labels, status and collections (dynamic and arbitrary) as source material for the filter list.
- Project presets, as opposed to global “Format As” presets, provide easy to swap settings that are only available to that one project, making it possible to build variant presets with different settings, without cluttering up the main list. But do note you can already do that with the current system, at the cost of clutter. (Assuming you meant settings, when you referred to checkboxes. If you were talking about stuff in the Contents pane, that isn’t dictated by presets.)
- Dedicated functions for keeping major breaks on one side of the book or the other, so the whole bit 2 adding blank pages yourself is something you’ll be able to entirely do away with.
Note that the current “Front matter” feature may already prove to be of some help. This was designed for these types of scenarios, where you may have different extra materials around the main matter, or the book itself, that you need to swap out for varying formats.
Thank you, everyone!
I already had been creating two “stacks” of front matter above the remaining stack for the body of the book, as well as two stacks of back matter beneath the stack for the body.
I’ve become accustomed to enabling/disabling their inclusion after pressing Ctrl-Shift-E, depending on whether I want to compile for PDF or for any type of ebook.
That’s good to know that Scrivener already supports conditional inclusion of front matter!
Given that I still must manually include/exclude back matter at compilation time, I suppose that I’ll stay with my current, manual approach for the front matter, too.
And, I’ll enable/disable those blank pages manually depending on whether I’m targeting PDF or ebook.
However, I look forward to the day when Scrivener for Windows supports the goodies discussed above!
Thank you again for your prompt and detailed responses!
#2 looks intriguing. I’ve got a hydra-like project that contains lots of short stuff (flash fic, character studies, ideas, short stories, Novel In A Day chapters, blog posts) which could benefit from that feature.