Tuesday, March 30, 2010

text variable: maximum length setting...

Is there any way to limit the length of an text variable to a maximum of 4 letters?

I would like to limit the page headers for a dictionary (which are generated with a text variable from a character format) to a maximum of 4 letters.

There's no possibility within the text variable settings to do this.

Will scripting helpful to find a solution?

Any ideas would be appreciated!

Thanks a lot in advance,

WoK

text variable: maximum length setting...

Make a new character style. Name it 4 Letters or something.

Go the heading that you want to appear in the running head.

Edit that paragraph style. Apply a Nested Style and say ''4 Letters'' up to 4 characters

Say Ok.

Type%26gt;Text Variables%26gt;Define

New Variable

Choose Character Style

Select 4 Letters from the style drop down menu.

Inser the variable on the master page.

text variable: maximum length setting...

Could this be done by creating a new character style that would get applied to the first 4 letters?

Then using this character style to generate the running heads?

If you have CS4, I believe GREP styles could manage this for you as part of the nested styles.

If you have CS3, a GREP search should be able to apply the style for you.

--edit: I see others had this idea also while I was writing...

Thanks to both of you for your help!

I've just tested the GREP search function which is very important because there a several thousands of entries in the dictionary.

Thanks a lot again!

You don't need to a GREP search.

Just apply a nested style to the first 4 characters of the paragraph style.

Make a variable based on a character style instead of the paragraph style

Eugene, you right! Thank you! I never used nested styles until now. Great!

Thanks a lot again!

No comments:

Post a Comment