Copy link to clipboard
Copied
Hello,
Note: somehow switching computer solved the forum's "wrong html" issue so I updated this post to have the images directly here....
I have encountered an odd behaviour in the following situation:
When switching from one conditional-based document to the other I apply the following script, in that particular order:
Problem is, in some specific situation, it seems that the orphan lines setting is messed up when some text is hidden by conditional show/hide settings. Here is an example of this happening (had to blur text for confidentiality reasons)
The text surrounded the red rectangle, section 7.7.5, is a paragraph that is supposed to be placed after the paragraph on the end of the right column (after 7.7.4), not to be split across both columns like that, which doesn't make sense in terms of text flow anyways.
Also the two orphan lines after the 7.7.5 title shouldn't be allowed by the paragraph design.
IMHO what happens is that the EDD has somehow messed up the paragraph design 6 orphan lines setting. In section 7.7.5 there is a significant part of the text that is hidden by conditional settings, so I thought this may be related.
A solution that I was able to find was to add a step right after the EDD import, that is to re-import the template but with only paragraph formats like this:
While this solves the orphan lines problem, it messes the figure caption, that is set to be "In Column" by the EDD attribute-dependent condition (see EDD extract above). Now the paragraph format import has overridden the EDD condition and the caption is set accross all columns, leading to the following result, surrounded by red rectangle:
The 7.7.5 part has been pushed to the next page as expected, which is good, but we lost the caption format.
Is it a bug of Framemaker, that doesn't consider correctly the paragraph formating when updating the EDD, or is there something that I could do to solve this issue ?
Thanks in advance.
Best regards
Eric
Copy link to clipboard
Copied
(removed pdf because I was finally able to add images in the original post)
Copy link to clipboard
Copied
It sounds like you have a hybrid environment that relies on unstructured variables and formatting rules. Have you tried defining the variables and paragraph formatting in the EDD and or structured application instead?
-Matt
Copy link to clipboard
Copied
Hello Matt,
Thanks a lot for your answer !
This is our Framemaker-related file system:
Link between formats and EDD is made by EDD linking to named character/paragraph formats.
This is a way we found to be working for us but we are still open for better ways to work.
Thanks in advance.
Best regards
Eric
Copy link to clipboard
Copied
Hello,
I tried something to try to force the orphan lines from the EDD by adding the following "all context rules" to the "para" element, but I still get the same result
So I am still looking for a solution 😉
Any help would be apreciated !
Thanks in advance
Best regards
Eric
Copy link to clipboard
Copied
It looks like you have multiple things you need to solve in this post, including a context rule and a widow orphan issue. I suggest you test these things in a simplified test environment to isolate what is happening. For starters, try writing your context rule to change color so you can confirm that it is being applied correctly. Also, I recommend you break up your items into separate posts so we can address them directly.
Copy link to clipboard
Copied
Hello Matt,
I'll try to have a "minimal reproductible example" working, for now I couldn't trigger the problem on a separate file, with simplified EDD...
The dynamic orphan lines change did work though, as for the test I forced it to another value than the one in the template and saw it change when importing the EDD.
Thanks
Eric
Copy link to clipboard
Copied
You should only have one All Contexts rule. I can't remember which one wins, the first or last, but they are mutually exclusive.
Copy link to clipboard
Copied
To see which one is being triggered, select the element in the Structure View and choose Structure > Show Element Context. Follow the pseudo arrows (->) to see which EDD rule is being applied.
Copy link to clipboard
Copied
There shouldn't be an issue with multiple All Context Rules, other than housekeeping.
Separating them is often helpful in identifying the purpose of each part.
I'm near certain they are applied in order.
Copy link to clipboard
Copied
I think you are right, but I will try to check. Thanks for the correction Matt.
Copy link to clipboard
Copied
Hello Matt, FrameExpert,
I tried to have 2 pretty visible AllContextRules (one that changes orphan lines to 11 and on that sets the text background to green) and i see them both being applied. BTW Framemaker shows an error when I try putting more than one rule within an AllContextRules.
For now, I couldn't reproduce the bug in a simplified version, but I noticed that if I select the problematic text frame (CTRL click on the frame edge) and open the "Object Properties..." from right-click/contextual menu and just hit "apply" without changing anything, problem is solved: section 7.7.5 goes to the next page, which is what is expected. This does look like there is a bug where FM is not updating something automatically, isn't it?
Is there a way to force the "Object properties apply" of all text frames for all pages from an ExtendScript script ?
Thanks in advance.
Best regards
Eric
Copy link to clipboard
Copied
I think I found a hack to correct the problem, it is done by ading the following steps in the script after EDD update:
Didn't see any residual issue, I hope I won't find one later 😉