Skip to main content
Inspiring
February 25, 2013
Answered

CS6 ePub "Split document: Based on Paragraph Style Export Tags"

  • February 25, 2013
  • 1 reply
  • 2376 views

I've been trying to work out how to set the ePub Export Option "Split document: Based on Paragraph Style Export Tags" using javascript. It doesn't appear to be part of epubExportPreferences, as

myDocument.epubExportPreferences.breakDocument = true;

Sets the document to break on [Basic Paragraph]. I can change it to another single paragraph easily enough, but that isn't what I need.

I'm probably just looking in the wrong place, But if anyone could point me in the right direction I would be very grateful.

My code is here (which does work, but doesn't set this option): https://github.com/makeBetterEBooks/eprdctn/blob/master/DBW_ePubExport.jsx

Thanks!

This topic has been closed for replies.
Correct answer @naomikennedy

Thanks for confirming. I've been digging around for a long time.

I'll put in an official request to get it added to the next version of InDesign


I found the answer a while ago, but thought I would post it here for anyone else looking.

You have to set the paragraph style name to an empty string:

myDocument.epubExportPreferences.breakDocument = true;

myDocument.epubExportPreferences.paragraphStyleName = "";

Then it will break on the export tags.

1 reply

Jongware
Community Expert
Community Expert
February 25, 2013

Check out http://jongware.mit.edu/idcs6js/pc_StyleExportTagMap.html -- this sets per-style options for ePub exports.

Inspiring
February 26, 2013

Thanks Jongware, you have created an awesome resource that I frequently use, but I'm not having problems with styleExportTagMaps. Take a look at the code I linked to for an example of how I hope to use it.

I specifically want to tell the ePub Export Options dialog to use the break mapping specified in that object. It's the very first option of the "Advanced" panel:

Jongware
Community Expert
Community Expert
February 26, 2013

Ah right. Did you set (some of) your paragraph styles to break on? It's a Per-Paragraph setting, so that's why I pointed you to ExportTagMaps.

(It's kind of weird that it breaks on Basic Paragraph Style by default. It's not even in that list!)