Copy link to clipboard
Copied
I've decided that having one text flow per document is too problematic to retain, because even small changes to styles may case significant repagination; so every style change requires a tedious re-check of every single page in the book.
So I'd like to break text flow between frames as it stands right now, so any repagination that requires more space will generate an overset-text error. But I want to keep one story; not have a separate story on every page.
Is this possible? The flow-breaking scripts in the samples collection both break the story.
Copy link to clipboard
Copied
For more advices. show us a screensot of your problems.
Copy link to clipboard
Copied
Thanks.
Everything in the document is meticulously styled. There are no garbage characters or ad-hoc styling.
There is no visible problem to provide a screen shot of. The problem is that, if I'm editing a document and I decide that some combination of paragraph styles needs a bit more space between them, it may cause the amount of text on some pages to change. This is unacceptable in our environment, because every page is separately approved by a regulatory authority.
Therefore, if I change a style, I need an alert to the fact that text has suddenly overflowed a page.
Copy link to clipboard
Copied
… every page is separately approved by a regulatory authority.
By @Thomas_Calvin
Can (should?) you not insert a page break after each? At the very least that would usually simplify spotting overflowed pages.
Copy link to clipboard
Copied
That's what I've done. The problem is that, every time I change spacing on a style, I have to check every page of a 500-page manual to see if any page breaks are messed up. And if they are, InDesign will have messed up parent-page overrides and Undo doesn't fix them. Good times.
Copy link to clipboard
Copied
Hi @Thomas_Calvin:
Try the Break Text Thread script found here: https://www.id-extras.com/break-text-thread/. It's from one of our Community Experts, @TAW.
~Barb
Copy link to clipboard
Copied
Thanks Barb! The question is whether the story crosses the break. I still only want one story per document.
Copy link to clipboard
Copied
Hi @Thomas_Calvin!
I'm confused (but you knew that):
I've decided that having one story per document is too problematic to retain...
doesn't reconcile with
I still only want one story per document.
Only end of stories can generate overset text messages, so if you want overset errors to appear in the middle of the document, you have to have multiple stories.
I know. I'm not getting it. Can you try one more time?
~Barb
Copy link to clipboard
Copied
Yep, that was some bad phrasing there, so I edited it. What I mean is one text flow, not one story. I guess it's probably impossible to separate the two, so I'll probably have to split the story per page as the pages are laid out now; then I'll have to figure out how to export them all as a continuous story. The DOM documentation for UXP scripting lacks so many fundamental objects, however, that this task is an unknown at the moment.
Copy link to clipboard
Copied
There's the ExportAllStories script:
I think it will export each story as a separate text, but combining text files into one should be an easy task.
then I'll have to figure out how to export them all as a continuous story.
By @Thomas_Calvin
Copy link to clipboard
Copied
It's actually pretty useless. You wind up with dozens or even hundreds of stories, many of which are just a word or two from headers or footers.
Copy link to clipboard
Copied
I can't help with scripting, other than to add the scripting tag to your question, if you think it would be useful. Or maybe it's best to post that final sentence on a new thread.
As for:
What I mean is one text flow, not one story. I guess it's probably impossible to separate the two, so I'll probably have to split the story per page as the pages are laid out now; then I'll have to figure out how to export them all as a continuous story.
I'm unclear how you are differentiating flow from story. In my (albeit little) brain, a FrameMaker text flow is the exact same thing as an InDesign story, so to me they are synonyms.
What you are asking for is FrameMaker's old (and now deprecated) Freeze Pagination command. Invoking it would make all auto-connected frames in a flow/story disconnected and overset text moved to point pages. For example, edits to a frozen page 35 would be numbered 35.1, 35.2, etc. Unfreezing would reconnect the pages and the page numbers would return to normal. I'm wondering if this need in your documentation stems from use of this feature many years ago.
Fast forward to 2025 and InDesign: you can break each page into into its own story with the SplitStory script that is included in the Application folder. Then you could get an overset error on each edited page that oversets.
Maybe—I haven't used it but this again from a reputable developer—Merge TextFrames would help restore them into a single story at the end. https://ajarproductions.com/blog/2017/07/17/merge-textframes-for-indesign-updated-with-highly-reques....
~Barb
Copy link to clipboard
Copied
Thanks Barb.
edits to a frozen page 35 would be numbered 35.1, 35.2, etc.
This is exactly what we do by hand, creating new pages numbered 35A, B, and so froth.
Sounds like we would've been a lot better off with FrameMaker. In the meantime, I'll just have to figure out how to programmatically identify the "main" story on each page so I can dump it out. I'll pursue the means to do this in a new thread.
Copy link to clipboard
Copied
Hi @Thomas_Calvin , If you check the InDesign DOM, a story’s parent is the document not a text frame. A story’s text does have parentStory and parentTextFrames properties, but you would have to split the story into multiple stories in order to stop the text flow and not have overflows.
This script demos the object model hierarchy —the document has 1 story flowing through 5 text frames:
var s = app.documents[0].stories
alert("\rThis document contains : " + s.length + " Story\rThe story flows through : " + s[0].texts[0].parentTextFrames.length + " text frames\rIts parent is the: " + s[0].parent.constructor.name)
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Story.html
Copy link to clipboard
Copied
Thanks Rob!
I am resigned to splitting all the stories on their pages. But now I need to figure out how to iterate through the pages and dump the central body of text to a file (I'll probably generate XML and put the styles in there too). The biggest text frame on any given page will be the one that contains the text I want to retain.
I'm using UXP scripting, so the (partial) DOM doc is here.
Copy link to clipboard
Copied
What will you do if there needs to be an edit that adds more text than will fit in the single text frame? Aren’t you just going to get text overflow markers? What if the overflows don’t fit on the page?
Copy link to clipboard
Copied
An edit that adds text isn't a problem, because we know about it. In those situations we typically add an A or B page, and add the new pages to the log of pages that appears at the end of each of our manuals.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now