Manipulating text in a TextBox in Adobe InDesign CS5
Asked Answered
J

1

7

How can I do some manipulations with the text in a TextBox on resize in Adobe InDesign CS5?

The main goal is too split the last word on every row to achieve something like a custom hyphenation.

Is it possible using JavaScript (or ExtendScript?) ?

Thanks.

UPDATE

I've tried to describe my problem in comments

I need an example on ExtendScript, which would find textbox dimensions and hyphenate the text according to dimension and after I'd like to create an event on textbox resize, which would do the same thing after every resize.

Jenijenica answered 21/4, 2011 at 7:44 Comment(2)
I've copied some sample text into a textframe in InDesign cs5, and the Justification to "Justify all lines". This gives the hyphenation at the end of lines and also adds/removes them as it needs when I drag to resize it. I would imagine resizing via javascript would give the same results. Is that you what you're looking for?Reichert
Lloyd, justification is what I'm looking for. When you justify it hyphenates words, but it doesn't work for Armenian, that's why I need to make a hyphenation like algorithm by myself. That's the main problem.Jenijenica
W
0

You'll probably be able to write a script to do what you want, but the functionality is already built into InDesign.

If I understand your problem correctly it's InDesign does not hyphenate Armenian properly? You can insert manual hyphenationsin the text using the text tool and pressing 'Ctrl'+'-' where you want the hyphen in the text. Unfortunately you'll have to do that everytime you resize the box, because the words will move around - which is probably the problem you're having.

You can set the language in InDesign in the Character tab (shortcut is 'Ctrl'+'t') and upload custom dictionaries/word lists with rules specific to your language including rules for spelling and hyphenation. Unfortunately I couldn't find Armenian in my short search, but perhaps you're more lucky.

Check out the link for more details:

http://help.adobe.com/en_US/indesign/cs/using/WSa285fff53dea4f8617383751001ea8cb3f-6f4da.html

Weight answered 16/10, 2011 at 19:59 Comment(1)
You got me right, but unfortunately the problem is that I can't find any kind of support for Armenian language neither in Adobe, nor in any external tool. I've found "Adobe Linguistic Library Plug-In SDK". You can write hyphenation by yourself, but it's too complicated for me. I've tried to find example on ExtendScript, which would find textbox dimensions and hyphenate the text according to that and after I'd like to create an event on textbox resize, which would do the same thing after every resize. Thank you for your response:Jenijenica

© 2022 - 2024 — McMap. All rights reserved.