Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Explorer ,
Feb 25, 2013 Feb 25, 2013

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!

TOPICS
Scripting
2.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Oct 28, 2013 Oct 28, 2013

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.

Translate
Community Expert ,
Feb 25, 2013 Feb 25, 2013

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 26, 2013 Feb 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:

EPUB Export Options-1.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 26, 2013 Feb 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!)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 26, 2013 Feb 26, 2013

Yes, in the sample above it's set to break on 02 Part Title and 02 Chapter Title.

I can't get it to replicate choosing [Basic Paragraph], so I might have just tried something really weird with the iteration of the script that gave me that.

In other news: you can chose to break a document on [Basic Paragraph] but only via script, not through the UI even if [Basic Paragraph] is used in the document.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 26, 2013 Feb 26, 2013

It looks like Adobe forgot to update this option. It's the same property as in CS5.5, so it seems *not* updated to make use of the new possibilities in CS6.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 26, 2013 Feb 26, 2013

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 28, 2013 Oct 28, 2013
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines