Live Text Masking in InDesign

Until now, to make a text-mask with InDesign, type normally has to be converted to curves so that the type can now be treated like a placeholder. This works fine until the type has to change, such as:

  • Correcting a typographical error;
  • Including more text or resizing it; or
  • During a data merge.

In these instances, it would be ideal for the type to still be live so that changes could be made while maintaining the masking of the type.

Surely someone had thought of this before… but instead of being an easy search in Google, it took hours of research to find this little nugget of information from the Phoenix InDesign Users Group:

Excited, I followed the instructions to the letter, but discovered that this trick isn’t true text masking. Let me explain.

A text mask created the usual way of converting to curves and then placing the image within the new shape works this way:

However, a text mask created using the tutorial from the Users Group behaves more like a stencil. That is, it does mask the image, but shows the stencil:

This is fine if the background is white… but in this instance the background is pale yellow. The solution in this instance is to make the image to be masked sent to the background, and the image which is in the background become the foreground:

So while this technique works, it does not work as well as masking within shapes, given that:

  • not all effects (drop shadows, bevels, transparencies) can be applied to the masked text; and
  • the background effectively is brought forward; and the item to be masked is effectively in the background.

This technique also works with background images. To demonstrate this, I’ve upgraded an earlier post featuring “Square Pegs Round Holes” to demonstrate how this masking works with live text.

As usual, files for the above demonstration can be found here.

Advertisements

Make find/change behave more like a Word macro

Recently on the Adobe Forums, I have responded to several posts from fellow users wondering how to “chain” find and change or GREP searches so that they are performed all at once rather than one at a time. It is possible to do but it is hardly documented anywhere, and needs a significant amount of tweaking and a basic knowledge of a text editor and reading code before it is of any real use.

“Chaining” searches has many advantages. For example, where a document has many double spaces, double returns, etc, normally each find/change would need to be run one after another. If chained together, the search need only be performed once. This is ideal for formatting text with inconsistent spacing.

To users out there who just want a “quick fix” and a better solution, there are two external links to point to:

  • The first is a text cleaner by Keith Gilbert and is Mac only and can be found here.
  • The second is a proprietary plug-in which is mentioned in other posts on this site but is not only great; but how i feel the actual InDesign software should have been shipped. It is called Multi Find/Change and is written by Automatication and can be found here.

For users either not prepared to spend a cent and/or wanting to get their hands dirty, read on…

In Adobe InDesign, there is a script which ships with adobe indesign called findchangebylist.jsx. There is also a subfolder in the script folder called FindChangeSupport.

What findchangebylist.jsx does is it loops many find/greps together by referencing a text file of the changes which is in the FindChangeSupport folder. This text file is called  FindChangeList.txt. If this is opened up in textedit, notepad, textwrangler, whatever text editor of your choice, find/grep searches are listed here. It’s all pretty cody though.

However, if you go to the FindChangeSupport folder and change the name of this FindChangeList.txt to FindChangeList2.txt for example and then run the findchangebylist.jsx, the script does not run. Instead, a dialog box asks which file to open. From here, you can then navigate to the FindChangeList2.txt file and open it.

At work,  I have several different text files which each contain various finds/greps which i may need to run for different projects, and they are named Yearbookfix.txt or businesscardfix.txt etc, and then i run the findchangebylist.jsx and then navigate to whatever file i need to run.

Sadly as i’ve said before, it is all fairly cody. Here is an example of one line of a find/change routine line in one of the scripts which I use at work:

grep    {findWhat:”\\s\\r”}    {changeTo:”\\r”}    {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}

In simple english, this line tells the find/change to behave as a GREP, and to look for any space followed by paragraph return and to change it to a paragraph return only. It is also telling the GREP to search footnotes, master pages and hidden layers.

But for me to add a new search parameter to this textfile without really knowing how to write the code is quite daunting.

Luckily, there is another script which effectively takes a change made in the find/change dialog box and writes the code for you. It is called RecordFindChange_CS3-CS5.jsx and is written by Kasyan Servetsky.

The way this script works is you would type in the find/grep which you want in the find/change dialog box, and once it is typed into the dialog box and ready to search, run the RecordFindChange_CS3-CS5.jsx. Within moments, a textfile will appear with the pre-coded form of the find/grep which can then be cut and added to the txt file containing your customised find/greps.

In terms of learning more about the power of GREP searches, go to the indesignsecrets.com GREP portion of their website. Otherwise, theindesigner.com‘s Michael Murphy has some excellent resources.

%d bloggers like this: