My indesign document have lot of paragraph. My client dont want word and punctuation stack. That means, we dont want three same character, hyphens... So what i do is giving trackin/kerning or giving non-breaking space to avoid this stsck.
Is there any way to control this through script?
Also is there any way to control loose/tight line?
Thanks in advance,
I don't know what you are asking. If you don't want more than a certain number of consecutive hyphenated words, that can be set in the Hyphenation settings using "Hyphen Limit".
Thanks for your reply. Actually i mean, i dont want three consecutive hyphen or character or punctuations at end opf word in a paragraph. We can set hyphen limit in indesgn. But my requirement is different.
For example, Pls take alook at below screenshot,
Try enabling "Optical Margin Alignment" in Story panel.
It enables punctation and hyphens to go outside text frame.
Thanks for the screenshot. It made what you wanted much more clear. It wasn't really possible to understand from your original question.
I do not think Optical Margin Alignment is what you want.
You want to adjust the tracking and breaking of the paragraph such that these "stacks" do not occur at the last character.
It is certainly possible to do this with scripting. But you are not likely to find a canned solution -- you will need to learn and write it yourself.
To get started, you need to decide on a very clear sequence of steps that would be taken to identify and address this problem.
I would start by turning on the Single-line [paragraph] Composer, so that a change you make at the end of the paragraph will not affect the beginning of the paragraph.
Then you must loop over the lines of the paragraph, and remeber the last line that it is safe to change tracking in, and check to see if you have a stack. If you find a stack, then go back to that last safe line and start adjusting the text's tracking to remove the stack. You'll have to define some tolerances. They will depend on your type of text. At our newspaper, we track between -15 and +15, but that may not be appropriate for you. Once you've removed the stack,
you need to check and make sure you have not inadvertatly created a ne wstack.
Once you succesfully adjust the tracking to remove the stack, then you should reset the safe line counter to the next line following your stack, and then keep searching for more stacks.
Is that what you want to do? I guess the above algorithm might not work if you have a case of two overlapping stacks. Where lines 1-3 form a stack, and when you fix them, lines 3-5 form a stack, and when you fix them, lines 1-3 form a stack a swell. So you'll have to be careful.
It would also help if you were VERY clear in your english, because it can be hard to understand you.
Can someone draw Big Red Circles on the offending positions? I still don't get it. Only thing I see -- dark gray text on a black background, ugh! What were you thinking? -- is a "stack" of consecutive hyphens, and those can and will be affected by the Consecutive Hyphen option that has been mentioned twice.
Jongware, you have to click on his image, the forums are cropping it; and it's a CMYK JPEG. Or try this one:
Anyhow, the problem is a vertical stack of hyphens or other characters at the right margin.
Ah -- Mac Preview Strikes Again. This is what I see:
(So, next to Tip #1, which is "an image of reasonable size", let's add Tip #2: "No CMYK JPEGs.")
Still, I don't see "the problem". The top circle (barely visible, on my screen) shows three consecutive hyphens, and the bottom one shows one single hyphen. That hardly counts as a "stack", doesn't it?
I still don't get what "other characters" is referring to.
Surely its visible in my version?
Anyhow, the problem is a stack of OTHER characters in the last example. The letter 'o', in this case.
Thanks for everyone who spent time for reply my question. Really sorry maybe my english is bad. Now i want to explain clearly what i exactly what.
The above screen shots show the stack, my hyphenation and justification settings.
Maybe this will help you. I am eagerly waiting for your answers. Please help me regarding this issue. It will make a bit pain to me.
OK, so have you tried to learn scripting? You should give it a shot! It seems like the kind of thing where you will have to do a lot of fine-tuning of the scripts, so it's important that you understand what you're doing.
This is not a case where you can run the script once and forget it...
Thank you so much. It helps me to get some solution now.
I need your help TPK,
Sorry for asking this.
Your completed for above script?
I have some doubt TPK.
Does anyone happen to know if theres a similar script available that does not rely on character styles? My documents often include multiple scripts, so I rely highly on character styles already and can't allow a script to possibly override the cstyles I've already applied.