Using character styles for dot leaders

The topic of tabs and leaders has been covered on InDesignSecrets before in a 6-part series but it’s worth sharing this particular tip as it saves me plenty of heartache in my day-to-day role.

Usual technique

The usual practice of creating a dotted line (usually for either leading up to a page number in a table of contents OR preparing a space for users to add information to a handwritten form) is often accomplished by the tabs feature. For example:

This is achieved by making a paragraph style that has a tab stop that has been right-aligned to the end of the text frame, and in the leader text field of the tab dialog box, a period has been entered, and it is this period that repeats to generate the dotted line.

Issues with this technique

However, I find this is quite restrictive in terms of:

My preferred technique

Instead, I prefer to make a character style called “dotted line” giving it the dotted line appearance that I’m after in the underline panel of the character style dialog box.

If more control is required, I can also prepare a stroke style specifying the dot style and frequency that the dots appear.

I can then either apply the character style manually to the areas requiring the dotted lines, or I can make a paragraph style that calls the dotted line character style using a GREP style that looks for tab spaces.

Bonus tip

Note that my GREP style is looking for \t|~y rather than just \t – the ~y represents a right indent tab. For dot leaders that need to go to text at the end of a text-frame, I prefer to use a right indent tab instead of setting a right align tab, because if the text frame changes width and I want the right aligned item to remain right aligned to the text frame, I don’t have to adjust the tab stop of the right align tab.

To insert a right indent tab, press SHIFT+TAB. This will work anywhere in a text frame except within a table where it will highlight the previous cell. To apply a right indent tab inside a table, either insert one via right-clicking to call upon the contextual menu, then navigate to Insert Special Characters, Other, then Right Indent Tab.

Otherwise, it can be called upon by opening the quick-apply menu via COMMAND+RETURN on Mac (or CONTROL+RETURN on Windows) and type either Right Indent Tab (or, if you’re really lazy – nt tab as highlighted in pink in the figure below).

Advertisements

Of interest: New Data Merge techniques and quote bug

In the latest Colecandoo Youtube episode, four Data Merge specific features are covered, namely:

  • Adding faux-returns to a data merge field to split over lines, and subsequent limitations of this technique;
  • Using GREP styles to swap a character for a glyph during a Data Merge;
  • Highlighting field codes so that they are easier to see when not showing live data; and
  • A bug that occurs when a double-quote is at the start of any field in a Data Merge text file.

Faux returns within a field

The faux-returns technique is written about elsewhere, so rather than spoil their presentations, please read the articles directly from the appropriate sources:

I’m a fan of this trick, but emphasise that this is a workaround rather than a long-term solution, given that formatting is limited and there are more appropriate ways of accomplishing this task such as dedicated plug-ins or an XML workflow.

Swap characters for glyphs

Daniel Solis also features a clever trick to swap phrases with glyphs during a Data Merge that uses both GREP styles and ligatures. Again, rather than simply repeat the technique, please see his original video here.

A similar method can be employed using Indiscripts’ Indyfont script, but rather than swapping phrases with glyphs, will swap single characters.

Highlight Field Codes

The video also shows a method for highlighting field-codes when Data Merge is not in the preview mode. It relies on the [Basic Paragraph] style using a GREP style that contains a large highlight, and that any other styles in the document are based off of the [Basic Paragraph] style. It also means the document has to be styled correctly.

I’d demonstrated this technique following a real-world example of a live file where fields were very hard to see, and the file had to have an offset shell printed with variable data printed afterwards, so making sure the shell had no variable data on it was crucial. Using this technique would make finding the field codes much easier to see.

Double Quote bug

Also featured in the video was an issue that once again arose from a real-world example where a customer had provided a database that had double-quotes at the beginning of fields, but no closing quotes, resulting in rather unusual results.

 

Colecandoo is now on Youtube!

Since the middle of the year, I’ve been feverishly toiling away on several projects. One has been the Data Merge to single record scripts (which is now available from the Downloads page), and the other has been to create Colecandoo tutorial videos to follow along with the articles that are published on this site.

That said, the Colecandoo Youtube channel has now been created and has several videos on offer at the time of writing:

  • Two videos showing the Data Merge to single record script in action;
  • The “Square Peg, Round Hole” GREP style trick;
  • Using the Chartwell Bars font to move a graphic on X-Y coordinates; and
  • Swapping paragraphs during a Data Merge.

More content will follow soon, so don’t forget to like and subscribe, and stay tuned!

Map GREP styles from one Paragraph Style to another… or many!

There’s no doubt that GREP styles are useful, but hiding the GREP style function within the Paragraph Style dialog box makes applying GREP styles difficult:

  • Previously saved searches made in the find/change dialog box cannot be selected;
  • GREP styles applied to one paragraph style cannot be easily applied to another existing paragraph style

Perhaps a GREP styles panel would be easier. The panel would be like any other panel available in InDesign, and would list the GREP searches by GREP style names (similar to Paragraph and Character styles). Upon double-clicking a GREP style, a dialog box would open and allow the style to be applied to one or many Paragraph styles at once, what Character style the GREP style should apply, and the ability to load previously saved GREP searches from the find/change dialog box (where appropriate).

Great huh? Well, there isn’t one. Perhaps enough people requesting such a panel on Adobe’s wishlist page might persuade the developers at Adobe make one… perhaps fix the footnotes feature at the same time – hint, hint!

Well, until the software developers at Adobe create such a panel, the next best thing is to use workarounds or third party solutions provided in the form of javascripts.

Map GREP styles from one Paragraph Style to one or many Paragraph styles:

A combination of two scripts by separate contributors on the Adobe Forums allowed what I had not thought possible to become possible – select a paragraph style with the desired GREP styles, and then select multiple destination paragraph styles for the GREP styles to be applied. The script can be found here.

Similarly useful GREP style utilities

Peter Kahrel has a page dedicated to his various GREP utilities. Apart from having many GREP tools, his utilities accomplish other GREP style tasks, such as:

  • Ability to map a newly created (or saved search) to one or many paragraph styles with a specific character style.
  • Ability to highlight the results of a GREP search in real time.

Marijan Tompa (aka Tomaxxi) has two GREP scripts, but of interest is TomaxxiGREP. This script presents a panel that shows what GREP styles are applied to highlighted text, and gives real-time ability to change the search code and character style of the GREP style without opening the Paragraph Styles panel.

General GREP assistance

Roland Dreger has a script that highlights the results of a GREP search in real-time in a similar fashion to Peter Kahrel’s GREP editor.

Jongware has a dedicated GREP help page and a script titled “whatthegrep” that takes a GREP search and shows in layman’s terms what is being searched for.

InDesignSecrets website has a dedicated page to providing information about GREP.

Virtuosi Media‘s website provided this gem that contains long GREP chains to find specific items such as date formats or, country postcodes.

 

%d bloggers like this: