Recently I was introduced to the hidden "World-Ready composer" in InDesign CS4. It is really nice to see a little of how Adobe is preparing for the future in typesetting complicated, right to left languages etc.

After becoming aware of this new composer, some of the documentation I had previously stumbled across in InDesigns AppleScript library became more obvious, "kashidas", "diacritic position" etc.

An example of Arabic in InDesign CS4.

Arabic text in InDesign CS4

A little searching around the internet, I ended up at Thomas Phinney's fantastic blog, World-Ready Composer in Adobe CS4, where he explains the specifics about what the new composer is for, and why it wasn't officially documented and included in CS4, and gives you a lot of different tools to enable and use these features in InDesign.

The settings

After reading through all the documentation I could find, i have made a short list here, of things that can be applied to text in InDesign CS4 through e.g. AppleScript.

character direction

The direction of the character. Can be default direction, left to right direction or right to left direction.

composer

The text composer to use to compose the text. Can be "Adobe World-Ready Paragraph Composer", "Adobe World-Ready Single-line Composer", "Adobe Paragraph Composer" or "Adobe Single-line Composer".

diacritic position

Position of diacriticical characters. Can be default position, loose position, medium position, tight position or opentype position.

digits type

The digits type. Can be default digits, arabic digits, hindi digits, farsi digits, Native digits, full farsi digits, thai digits, lao digits, devanagari digits, bengali digits, gurmukhi digits, gujarati digits, oriya digits, tamil digits, telugu digits, kannada digits, malayalam digits, tibetan digits, khmer digits or burmese digits.

kashidas

Use of Kashidas for justification. Can be default kashidas or kashidas off.

keyboard direction

The keyboard direction of the character. Can be default direction, left to right direction or right to left direction.

paragraph direction

Paragraph direction. Can be left to right direction or right to left direction.

paragraph justification

Paragraph justification. Can be default justification, arabic justification or naskh justification.

x offset diacritic

The x (horizontal) offset for diacritic adjustment.

y offset diacritic

The y (vertical) offset for diacritic adjustment.

Small activation script

If you would like to play around with this, I have written a small piece of AppleScriptJavaScript that creates a paragraph style with these settings:

  • character direction: right to left direction
  • composer: "Adobe World-Ready Paragraph Composer"
  • digits type: arabic digits
  • paragraph direction: right to left direction
  • paragraph justification: arabic justification
  • kashidas: default kashidas
  • diacritic position: opentype position

The AppleScriptJavaScript can be downloaded here: create_arabic_pstyle.jsx. Modify the script to your needs, the AppleScriptJavaScript syntax should be quite easy to understand.

You can add it to your Scripts palette and run it from there. To do that, place the file inside the "~/Library/Preferences/Adobe InDesign/Version 6.0/Scripts/Scripts Panel" folder.

GREP searching was a highly needed and really convenient addition to InDesign, when it was added in CS3. Earlier, doing complicated search/replace, and cleaning up documents for extra spaces, tabs etc. was a longer procedure.

Still GREP's greatest force (in my opinion) inside InDesign was added in CS4, when GREP styles was introduced. Being able to change text appearance based on regexp is amazing.

As always, a little something for the wishlist:

Using groups in GREP styles

Being able to search for a longer string, but only applying the character style to the matched part of the results. If you want to highlight the word "bar", but only when "foo" is in front of it: "foo bar" >< "this bar". I would suggest being able to search for something like "foo (bar)" and only apply the character style to the group, "(bar)".

Character and paragraph style aware GREP searching

Prior to CS3, where GREP was introduced in InDesign, I normally would export the text story as InDesign Tagged Text and apply all my advanced searching on that document in any text editor. And I still do this, because what InDesigns GREP search lacks, are character and paragraph awareness.

In GREP search you are able to find/change formatting as well, which lets you target specific paragraph styles, but you are unable to search for "paragraph_style_1 followed by paragraph_style_2"-combinations, which can be really handy if you want to remove e.g. indentation from all paragraphs located after blank lines, subheadings etc.

Searching on pairs of paragraph styles isn't possible inside InDesign - to do the more advanced searches you still have to export the document as InDesign Tagged Text, and do the searches in your preffered text editor.

Searching in InDesign Tagged Text in TextMate

Also, you can use the regular regexp anchors, ^ and $, but these only applies to paragraphs. So if you search for a specific character style, you can't tell InDesign to look in the beginning/end of the found text, it only applies to the current paragraph. A set of extra anchors in InDesign please?

Searching from the beginning of a character style doesn't work. The ^ anchor still applies to the beginning of the paragraph.

GREP anchors and character styles

If you run an InCopy workflow, or you have found this post by searching the web, you probably know the issue with markup up index words in InCopy - the tool is missing.

In the projects where we run an InCopy workflow, it is mainly books, where the editors easily can proofread and correct in the story itself, and letting them mark up index words would be a great in that process as well. I can't see any obvious reason to why Adobe left it out, other than InCopy might be more minded on magazine editing(?), and there isn't much use for indexing in magazines.

The solution

In books where the index are marked up late in the process, after the book is typeset and proofread, we either mark it up ourselves from a printed copy with highlighted words, or we let the editors mark up the index words in InCopy using a colour swatch. When we receive the InCopy story from them, an AppleScriptJavaScript in InDesign takes care of finding all the coloured words and marking them up as index words. When the script is done, a quick search/replace takes care of colouring the words back to their original colour.

The dialog box that asks you which swatch you want to make an index from.

Index from colour

The script might come in handy in other cases as well, but the InCopy case is the most obvious. The same script could be done with character styles as well, but since I'd like to enable marking up that already have a character style applied, I found swatches better suited.

The script

I have uploaded the basic script - letting you select a swatch from a list and it searches the current document, marking up words. You are free to modify it to your needs - might come in handy to convert words to lowercase or things like that.

You can add it to your Scripts palette and run it from there. To do that, place the file inside the "~/Library/Preferences/Adobe InDesign/Version X.0/Scripts/Scripts Panel" folder.

Download index_from_colour.jsx.

The second screencast is ready, delivering 5 simple tips for the common InDesign user. You might know all the tips - then I am truly sorry I took your time - but if you don't, the ones you don't know might save you some time in the future.

5 simple but useful tips.

I am talking about Quick apply, layers, stacked objects, scaling objects and jumping to pages.

I usually keep all styling that differs from the paragraph styles I have created in character styles, making one for bold, italic, superscript ... text. But sometimes I wish I could apply more than one character style to the same text.

This wish probably originates from my background with HTML and CSS - being used to nest things within each others. When I look at a InDesign document, I see the same structure, character styles are inline objects inside the paragraph styles which are block objects.

Case 1: Superscript and italic text

In this case, I have a document with some text, some of the text are italic, and some of the text are superscript. I have created a character style for both, but suddenly I need to style a letter both italic and superscript. My only option: creating a new character style for this place alone.

Case 2: Coloured text

In this case my text is black, but different sentences are highlighted with a red text colour. Some of the text in one of the sentences are already italic - my only option: creating a new character style for this place alone.

Italicised text that is also marked red.

Italicised text that is also marked red

Some might call my crazy, but I never locally apply any formatting. I don't, because I don't want to risk anything loosing its formatting later in the process, if accidently overrides are cleared.

I thought of some different workarounds, like applying my red character style to the sentence, and then using Nested Style, Nested Line Styles, Drop Caps or GREP Style to apply the italic style to some text, and it actually worked in the different arrangements I tried.

Applying GREP style to text already marked with a character style.

Applying GREP style to text already marked with a character style

After testing a bit it turns out that you can do this as much as you like, applying unlimited amounts (only tested up to 10) of different character styles to the same text, using the 4 different types of nested styles available in InDesign. There is a hierarchy though, Nested Line Styles > Nested Styles > Drop Caps > GREP Style. Applying multiple GREP styles, they are prioritised after position in the GREP Style section, lowest with highest priority.

This is the only workaround I have been able to figure out, and honestly, it doesn't really solve anything, does it? It is a fun feature, and probably can be useful in some cases, but not specifically in the two I mentioned.

So please Adobe, make it possible to apply multiple character styles?